home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / ghostscript-2.6.2-diffs.gz / ghostscript-2.6.2-diffs
Text File  |  1996-10-13  |  356KB  |  12,208 lines

  1. This file contains patches that transform the baseline version into
  2. the amiga version.  Assuming that you have unarchived the baseline
  3. version in the current directory, just run the command:
  4.  
  5.     patch -p1 -E -b .pbak <diff-file
  6.  
  7. where 'diff-file' is this patch file.  After running patch you should
  8. remove all the generated *.pbak files, and look for any *.rej files
  9. that indicate a problem patching the baseline source.
  10.  
  11. diff -rup --new-file baseline/fsf/ghostscript/Makefile.in amiga/fsf/ghostscript/Makefile.in
  12. --- baseline/fsf/ghostscript/Makefile.in    Wed Dec 31 17:00:00 1969
  13. +++ amiga/fsf/ghostscript/Makefile.in    Sat Sep 28 00:00:00 1996
  14. @@ -0,0 +1,1886 @@
  15. +# Copyright (C) 1989, 1992, 1993 Aladdin Enterprises.  All rights reserved.
  16. +#
  17. +# This file is part of Ghostscript.
  18. +#
  19. +# Ghostscript is distributed in the hope that it will be useful, but
  20. +# WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  21. +# to anyone for the consequences of using it or for whether it serves any
  22. +# particular purpose or works at all, unless he says so in writing.  Refer
  23. +# to the Ghostscript General Public License for full details.
  24. +#
  25. +# Everyone is granted permission to copy, modify and redistribute
  26. +# Ghostscript, but only under the conditions described in the Ghostscript
  27. +# General Public License.  A copy of this license is supposed to have been
  28. +# given to you along with Ghostscript so you can know your rights and
  29. +# responsibilities.  It should be in a file named COPYING.  Among other
  30. +# things, the copyright notice and this notice must be preserved on all
  31. +# copies.
  32. +
  33. +#### Start of system configuration section. ####
  34. +
  35. +VPATH = @srcdir@
  36. +srcdir = @srcdir@
  37. +
  38. +# Common prefix for machine-independent installed files.
  39. +prefix = /ade
  40. +# Common prefix for machine-dependent installed files.
  41. +exec_prefix = $(prefix)
  42. +
  43. +# Directory to install executables in.
  44. +bindir = $(exec_prefix)/bin
  45. +# Directory to install libraries in.
  46. +libdir = $(exec_prefix)/lib
  47. +# Directory to install the Info files in.
  48. +infodir = $(prefix)/info
  49. +# Directory to install the man page in.
  50. +mandir = $(prefix)/man/man$(manext)
  51. +# Number to put on the man page filename.
  52. +manext = 1
  53. +
  54. +# Program to install executables.
  55. +INSTALL_PROGRAM = @INSTALL_PROGRAM@
  56. +# Program to install data like man pages.
  57. +INSTALL_DATA = @INSTALL_DATA@
  58. +# Generic install program.
  59. +INSTALL = @INSTALL@
  60. +
  61. +CC = @CC@
  62. +#FPU_FLAG =-Dm68881
  63. +#CPU_FLAG =-Dm68030
  64. +DEFS = @DEFS@ $(FPU_FLAG) $(CPU_FLAG) -DUSG
  65. +CFLAGS = @CFLAGS@
  66. +
  67. +LDFLAGS = @LDFLAGS@
  68. +LIBS = @LIBS@
  69. +
  70. +EXTRALIBS = -lamiga
  71. +#### End of system configuration section. ####
  72. +
  73. +.c.o:
  74. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $< $(OUTPUT_OPTION)
  75. +
  76. +
  77. +# Define the default directories for the runtime
  78. +# initialization and font files.  Separate multiple directories with a ','.
  79. +
  80. +datadir = $(prefix)/lib
  81. +gsdatadir = $(libdir)/ghostscript
  82. +gsfontdir = $(gsdatadir)/fonts
  83. +GS_LIB_DEFAULT=$(gsdatadir),$(gsfontdir)
  84. +
  85. +# Define the name of the Ghostscript initialization file.
  86. +# (There is no reason to change this.)
  87. +
  88. +GS_INIT=gs_init.ps
  89. +
  90. +# Define the name of the executable file.
  91. +
  92. +GS=gs
  93. +
  94. +# Choose the language feature(s) to include.  See gs.mak for details.
  95. +
  96. +FEATURE_DEVS=filter.dev dps.dev level2.dev
  97. +
  98. +# Choose the device(s) to include.  See devs.mak for details.
  99. +
  100. +DEVICE_DEVS=amiga_.dev amiga.dev amiga_low.dev amiga_high.dev amiga_super.dev
  101. +DEVICE_DEVS1=amiga_a2024.dev amiga_picassoii.dev amiga_printer.dev
  102. +DEVICE_DEVS2=amiga_ilbm.dev amiga_custom.dev
  103. +
  104. +# Define the name of the makefile -- used in dependencies.
  105. +
  106. +MAKEFILE=Makefile
  107. +
  108. +# Define the ANSI-to-K&R dependency.  (gcc accepts ANSI syntax.)
  109. +
  110. +AK=
  111. +
  112. +# Define the platform name.  For a "stock" System V platform,
  113. +# use sysv_ instead of unix_.
  114. +
  115. +PLATFORM=amiga
  116. +
  117. +# Define the extensions for the object and executable files.
  118. +
  119. +OBJ=o
  120. +XE=
  121. +
  122. +# Define the source directory prefix, shell quote string, and shell names.
  123. +
  124. +EXP=$(srcdir)/
  125. +QQ=\"
  126. +SHELL=/bin/sh
  127. +SH=$(SHELL)
  128. +SHP=$(SH) $(EXP)
  129. +
  130. +#    GS - the name of the executable (without the extension, if any).
  131. +#    GS_LIB_DEFAULT - the default directory/ies for searching for the
  132. +#        initialization and font files at run time.
  133. +#    DEVICE_DEVS - the devices to include in the executable.
  134. +#        See devs.mak for details.
  135. +#    DEVICE_DEVS1...DEVICE_DEVS9 - additional devices, if the definition of
  136. +#        DEVICE_DEVS doesn't fit on one line.
  137. +#        See devs.mak for details.
  138. +#    FEATURE_DEVS - the optional features to include in the
  139. +#        executable.  Current features are:
  140. +#            dps - (partial) support for Display PostScript extensions:
  141. +#            see language.doc for details.
  142. +#            level2 - (partial) support for PostScript Level 2
  143. +#            extensions: see language.doc for details.
  144. +#            compfont - support for composite (type 0) fonts.
  145. +#            *** NOT IMPLEMENTED YET. ***
  146. +#            filter - support for Level 2 filters (other than eexec,
  147. +#            ASCIIHexEncode/Decode, NullEncode, PFBDecode,
  148. +#            and SubFileDecode, which are always included).
  149. +#            ccfonts - precompile fonts into C, and link them
  150. +#            with the executable.  In the standard makefiles,
  151. +#            this is only implemented for a very few fonts:
  152. +#            see fonts.doc for details.
  153. +# It is very unlikely that anyone would want to edit the remaining
  154. +#   symbols, but we describe them here for completeness:
  155. +#    GS_INIT - the name of the initialization file for Ghostscript,
  156. +#        normally gs_init.ps.
  157. +#    PLATFORM - a "device" name for the platform, so that platforms can
  158. +#        add various kinds of resources like devices and features.
  159. +#    QQ - a " preceded by whatever escape characters are needed to
  160. +#        persuade the shell to pass a " to a program (" on MS-DOS,
  161. +#        \" on Unix).
  162. +#    XE - the extension for executable files (e.g., null or .exe).
  163. +#    OBJ - the extension for relocatable object files (e.g., o or obj).
  164. +#    BEGINFILES - the list of files that `make begin' should delete.
  165. +#    CCBEGIN - the compilation command for `make begin', normally
  166. +#        $(CC) -c $(CFLAGS) $(DEFS) *.c.
  167. +#    CCC - the C invocation for normal compilation.
  168. +#    CCD - the C invocation for files that store into frame buffers or
  169. +#        device registers.  Needed because some optimizing compilers
  170. +#        will eliminate necessary stores.
  171. +#    CCCF - the C invocation for compiled fonts and other large,
  172. +#        self-contained data modules.  Needed because MS-DOS
  173. +#        requires using the 'huge' memory model for these.
  174. +#    CCINT - the C invocation for compiling the main interpreter module,
  175. +#        normally the same as CCC: this is needed because the
  176. +#        Borland compiler generates *worse* code for this module
  177. +#        (but only this module) when optimization (-O) is turned on.
  178. +#    AK - if source files must be converted from ANSI to K&R syntax,
  179. +#        this is ansi2knr$(XE); if not, it is null.
  180. +#        If a particular platform requires other utility programs
  181. +#        to be built, AK must include them too.
  182. +#    SHP - the prefix for invoking a shell script in the current directory
  183. +#        (null for MS-DOS, $(SH) ./ for Unix).
  184. +#    EXPP, EXP - the prefix for invoking an executable program in the
  185. +#        current directory (null for MS-DOS, ./ for Unix).
  186. +#    SH - the shell for scripts (null on MS-DOS, sh on Unix).
  187. +# The platform-specific makefiles must also include rules for creating
  188. +#   ansi2knr$(XE), genarch$(XE), and genconf$(XE) from the corresponding
  189. +#   .c files -- this is needed because Turbo C and Unix C treat the -o
  190. +#   switch slightly differently (Turbo C requires no following space,
  191. +#   Unix C requires a following space), and I haven't found a way to capture
  192. +#   the difference in a macro.
  193. +
  194. +all default: $(GS)$(XE)
  195. +
  196. +distclean realclean: clean
  197. +    rm -f $(MAKEFILE)
  198. +
  199. +clean mostlyclean:
  200. +    rm -f *.$(OBJ) *.a core gmon.out
  201. +    rm -f *.dev *.d_* arch.h gconfig*.h o*.tr l*.tr
  202. +    rm -f t _temp_* _temp_*.* *.map *.sym
  203. +    rm -f ansi2knr$(XE) echogs$(XE) genarch$(XE) genconf$(XE)
  204. +    rm -f $(GS)$(XE) $(BEGINFILES)
  205. +
  206. +# A rule to do a quick and dirty compilation attempt when first installing
  207. +# Ghostscript.  Many of the compilations will fail: follow this with 'make'.
  208. +
  209. +begin:
  210. +    rm -f arch.h genarch$(XE) $(GS)$(XE) $(BEGINFILES)
  211. +    make arch.h
  212. +    - $(CCBEGIN)
  213. +    rm -f gconfig.$(OBJ) gdev*.$(OBJ) gp_*.$(OBJ) gsmisc.$(OBJ)
  214. +    rm -f iccfont.$(OBJ) iinit.$(OBJ) interp.$(OBJ) zfiledev.$(OBJ)
  215. +
  216. +# Auxiliary programs
  217. +
  218. +arch.h: genarch$(XE)
  219. +    genarch$(XE) arch.h
  220. +
  221. +# Define the inter-dependencies of the .h files.
  222. +# Since not all versions of `make' defer expansion of macros,
  223. +# we must list these in bottom-to-top order.
  224. +
  225. +# Generic files
  226. +
  227. +arch_h=arch.h
  228. +std_h=std.h $(arch_h)
  229. +
  230. +# Platform interfaces
  231. +
  232. +gp_h=gp.h
  233. +gpcheck_h=gpcheck.h
  234. +
  235. +# C library interfaces
  236. +
  237. +# Because of variations in the "standard" header files between systems, and
  238. +# because we must include std.h before any file that includes sys/types.h,
  239. +# we define local include files named *_.h to substitute for <*.h>.
  240. +
  241. +vmsmath_h=vmsmath.h
  242. +
  243. +dos__h=dos_.h
  244. +ctype__h=ctype_.h $(std_h)
  245. +errno__h=errno_.h
  246. +malloc__h=malloc_.h $(std_h)
  247. +math__h=math_.h $(std_h) $(vmsmath_h)
  248. +memory__h=memory_.h $(std_h)
  249. +stat__h=stat_.h $(std_h)
  250. +stdio__h=stdio_.h $(std_h)
  251. +string__h=string_.h $(std_h)
  252. +time__h=time_.h $(std_h)
  253. +windows__h=windows_.h
  254. +
  255. +# Miscellaneous
  256. +
  257. +gdebug_h=gdebug.h
  258. +gsio_h=gsio.h
  259. +gstypes_h=gstypes.h
  260. +gs_h=gs.h $(stdio__h) $(gsio_h) $(gstypes_h)
  261. +gx_h=gx.h $(gs_h) $(gdebug_h)
  262. +gconfig_h=gconfig.h gsconfig.h
  263. +gserrors_h=gserrors.h
  264. +
  265. +GX=$(AK) $(gx_h)
  266. +GXERR=$(GX) $(gserrors_h)
  267. +
  268. +###### Low-level facilities and utilities
  269. +
  270. +### Include files
  271. +
  272. +gsccode_h=gsccode.h
  273. +gschar_h=gschar.h $(gsccode_h)
  274. +gscie_h=gscie.h
  275. +gscolor_h=gscolor.h
  276. +gscolor2_h=gscolor2.h
  277. +gscoord_h=gscoord.h
  278. +gscrypt1_h=gscrypt1.h
  279. +gscspace_h=gscspace.h
  280. +gsfont_h=gsfont.h
  281. +gsimage_h=gsimage.h
  282. +gsmatrix_h=gsmatrix.h
  283. +gspaint_h=gspaint.h
  284. +gspath_h=gspath.h
  285. +gsprops_h=gsprops.h
  286. +gsstate_h=gsstate.h $(gscolor_h)
  287. +gstype1_h=gstype1.h
  288. +gsuid_h=gsuid.h
  289. +gsutil_h=gsutil.h
  290. +gsxfont_h=gsxfont.h
  291. +
  292. +gxarith_h=gxarith.h
  293. +gxbitmap_h=gxbitmap.h
  294. +gxcache_h=gxcache.h $(gsuid_h) $(gsxfont_h)
  295. +gxcdir_h=gxcdir.h
  296. +gxchar_h=gxchar.h $(gschar_h)
  297. +gxclist_h=gxclist.h
  298. +# gxcldev is out of order because it include gxclist.
  299. +gxcldev_h=gxcldev.h $(gxclist_h)
  300. +gxcpath_h=gxcpath.h
  301. +gxdevice_h=gxdevice.h $(gsmatrix_h) $(gsxfont_h) $(gxbitmap_h)
  302. +gxdevmem_h=gxdevmem.h
  303. +gxfdir_h=gxfdir.h $(gxcdir_h)
  304. +gxfixed_h=gxfixed.h
  305. +gxfont_h=gxfont.h $(gsfont_h) $(gsuid_h)
  306. +gxfrac_h=gxfrac.h
  307. +gximage_h=gximage.h $(gscspace_h) $(gsimage_h)
  308. +gxlum_h=gxlum.h
  309. +gxmatrix_h=gxmatrix.h $(gsmatrix_h)
  310. +gxop1_h=gxop1.h
  311. +gxpath_h=gxpath.h
  312. +gxrefct_h=gxrefct.h
  313. +gxtype1_h=gxtype1.h $(gscrypt1_h) $(gstype1_h)
  314. +gxxfont_h=gxxfont.h $(gsccode_h) $(gsmatrix_h) $(gsuid_h) $(gsxfont_h)
  315. +# gxcolor and gxfmap are out of order because they include other files.
  316. +gxcolor_h=gxcolor.h $(gxfrac_h) $(gsuid_h)
  317. +gxfmap_h=gxfmap.h $(gxfrac_h) $(gxrefct_h)
  318. +
  319. +gzcolor_h=gzcolor.h $(gscolor_h) $(gxfmap_h) $(gxlum_h)
  320. +gzdevice_h=gzdevice.h $(gxdevice_h)
  321. +gzht_h=gzht.h
  322. +gzline_h=gzline.h
  323. +gzpath_h=gzpath.h $(gxpath_h)
  324. +gzstate_h=gzstate.h $(gsstate_h) $(gxfixed_h) $(gxmatrix_h)
  325. +
  326. +### Executable code
  327. +
  328. +gp_nofb.$(OBJ): gp_nofb.c $(AK) \
  329. +  $(gx_h) $(gp_h) $(gxdevice_h)
  330. +
  331. +gsutil.$(OBJ): gsutil.c $(AK) \
  332. +  $(std_h) $(gsprops_h) $(gsutil_h)
  333. +
  334. +gxccache.$(OBJ): gxccache.c $(GXERR) $(gpcheck_h) \
  335. +  $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gzcolor_h) \
  336. +  $(gxcpath_h) $(gxdevmem_h) $(gxfont_h) $(gxfdir_h) $(gxchar_h) \
  337. +  $(gxcache_h) $(gxxfont_h) $(gzstate_h) $(gzpath_h) \
  338. +  $(gscspace_h) $(gsimage_h)
  339. +
  340. +gxccman.$(OBJ): gxccman.c $(GXERR) $(gpcheck_h) \
  341. +  $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gzcolor_h) \
  342. +  $(gxcpath_h) $(gxdevmem_h) $(gxfont_h) $(gxfdir_h) $(gxchar_h) \
  343. +  $(gxcache_h) $(gxxfont_h) $(gzstate_h) $(gzpath_h)
  344. +
  345. +gxclist.$(OBJ): gxclist.c $(GXERR) $(gpcheck_h) \
  346. +  $(gsmatrix_h) $(gxbitmap_h) $(gxcldev_h) $(gxdevice_h) $(gxdevmem_h)
  347. +
  348. +gxclread.$(OBJ): gxclread.c $(GXERR) $(gpcheck_h) \
  349. +  $(gsmatrix_h) $(gxbitmap_h) $(gxcldev_h) $(gxdevice_h) $(gxdevmem_h)
  350. +
  351. +gxcmap.$(OBJ): gxcmap.c $(GXERR) \
  352. +  $(gscspace_h) \
  353. +  $(gxcolor_h) $(gxdevice_h) $(gxfrac_h) $(gxlum_h) \
  354. +  $(gzcolor_h) $(gzstate_h)
  355. +
  356. +gxcpath.$(OBJ): gxcpath.c $(GXERR) \
  357. +  $(gxdevice_h) $(gxfixed_h) $(gzcolor_h) $(gzpath_h) $(gxcpath_h)
  358. +
  359. +gxdither.$(OBJ): gxdither.c $(GX) \
  360. +  $(gxfixed_h) $(gxlum_h) $(gxmatrix_h) $(gzstate_h) $(gzdevice_h) $(gzcolor_h) $(gzht_h)
  361. +
  362. +gxdraw.$(OBJ): gxdraw.c $(GXERR) $(gpcheck_h) \
  363. +  $(gxfixed_h) $(gxmatrix_h) $(gxbitmap_h) $(gzcolor_h) $(gzdevice_h) $(gzstate_h)
  364. +
  365. +gxfill.$(OBJ): gxfill.c $(GXERR) \
  366. +  $(gxfixed_h) $(gxmatrix_h) $(gxdevice_h) $(gzcolor_h) $(gzpath_h) $(gzstate_h) $(gxcpath_h)
  367. +
  368. +gxhint1.$(OBJ): gxhint1.c $(GXERR) \
  369. +  $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gxdevmem_h) $(gxchar_h) $(gxfont_h) $(gxtype1_h) \
  370. +  $(gzdevice_h) $(gzstate_h)
  371. +
  372. +gxhint2.$(OBJ): gxhint2.c $(GXERR) \
  373. +  $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gxdevmem_h) $(gxchar_h) $(gxfont_h) $(gxtype1_h) $(gxop1_h) \
  374. +  $(gzdevice_h) $(gzstate_h)
  375. +
  376. +gxht.$(OBJ): gxht.c $(GXERR) \
  377. +  $(gxfixed_h) $(gxmatrix_h) $(gxbitmap_h) $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h)
  378. +
  379. +gxpath.$(OBJ): gxpath.c $(GXERR) \
  380. +  $(gxfixed_h) $(gzpath_h)
  381. +
  382. +gxpath2.$(OBJ): gxpath2.c $(GXERR) \
  383. +  $(gxfixed_h) $(gxarith_h) $(gzpath_h)
  384. +
  385. +gxpcopy.$(OBJ): gxpcopy.c $(GXERR) \
  386. +  $(gxfixed_h) $(gxarith_h) $(gzpath_h)
  387. +
  388. +gxstroke.$(OBJ): gxstroke.c $(GXERR) $(gpcheck_h) \
  389. +  $(gscoord_h) $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) \
  390. +  $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzline_h) $(gzpath_h)
  391. +
  392. +###### High-level facilities
  393. +
  394. +gschar.$(OBJ): gschar.c $(GXERR) \
  395. +  $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gzdevice_h) $(gxdevmem_h) $(gxfont_h) $(gxchar_h) $(gxcache_h) $(gstype1_h) $(gspath_h) $(gzpath_h) $(gzcolor_h) $(gzstate_h)
  396. +
  397. +gscolor.$(OBJ): gscolor.c $(GXERR) \
  398. +  $(gscspace_h) $(gxcolor_h) $(gxdevice_h) $(gxrefct_h) \
  399. +  $(gzstate_h) $(gzcolor_h)
  400. +
  401. +gscoord.$(OBJ): gscoord.c $(GXERR) \
  402. +  $(gsccode_h) $(gxarith_h) $(gxfixed_h) $(gxfont_h) $(gxmatrix_h) \
  403. +  $(gzdevice_h) $(gzstate_h) $(gscoord_h)
  404. +
  405. +gsdevice.$(OBJ): gsdevice.c $(GXERR) \
  406. +  $(gxarith_h) $(gsprops_h) $(gsutil_h) $(gxbitmap_h) $(gxdevmem_h) \
  407. +  $(gzstate_h) $(gzdevice_h)
  408. +
  409. +gsfile.$(OBJ): gsfile.c $(GXERR) \
  410. +  $(gsmatrix_h) $(gxdevice_h) $(gxdevmem_h)
  411. +
  412. +gsfont.$(OBJ): gsfont.c $(GXERR) \
  413. +  $(gxdevice_h) $(gxfixed_h) $(gxmatrix_h) $(gxfont_h) $(gxfdir_h) \
  414. +  $(gzstate_h)
  415. +
  416. +gsht.$(OBJ): gsht.c $(GXERR) \
  417. +  $(gzht_h) $(gzstate_h)
  418. +
  419. +gsimage.$(OBJ): gsimage.c $(GXERR) $(gpcheck_h) \
  420. +  $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gspaint_h) \
  421. +  $(gzcolor_h) $(gzdevice_h) $(gzpath_h) $(gzstate_h) \
  422. +  $(gxcolor_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
  423. +
  424. +gsimage1.$(OBJ): gsimage1.c $(GXERR) $(gpcheck_h) \
  425. +  $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gscspace_h) $(gspaint_h) \
  426. +  $(gzcolor_h) $(gzdevice_h) $(gzpath_h) $(gzstate_h) \
  427. +  $(gxcolor_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
  428. +
  429. +gsimage2.$(OBJ): gsimage2.c $(GXERR) $(gpcheck_h) \
  430. +  $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gscspace_h) $(gspaint_h) \
  431. +  $(gzcolor_h) $(gzdevice_h) $(gzpath_h) $(gzstate_h) \
  432. +  $(gxcolor_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
  433. +
  434. +gsimpath.$(OBJ): gsimpath.c $(GXERR) \
  435. +  $(gsmatrix_h) $(gsstate_h) $(gspath_h)
  436. +
  437. +gsline.$(OBJ): gsline.c $(GXERR) \
  438. +  $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gzline_h)
  439. +
  440. +gsmatrix.$(OBJ): gsmatrix.c $(GXERR) \
  441. +  $(gxfixed_h) $(gxarith_h) $(gxmatrix_h)
  442. +
  443. +gsmisc.$(OBJ): gsmisc.c $(GX) $(errno__h) $(malloc__h) $(memory__h) $(MAKEFILE)
  444. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DUSE_ASM=0$(USE_ASM) $(srcdir)/gsmisc.c
  445. +
  446. +gspaint.$(OBJ): gspaint.c $(GXERR) $(gpcheck_h) \
  447. +  $(gxfixed_h) $(gxmatrix_h) $(gspaint_h) $(gzpath_h) $(gzstate_h) $(gzdevice_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
  448. +
  449. +gspath.$(OBJ): gspath.c $(GXERR) \
  450. +  $(gxfixed_h) $(gxmatrix_h) $(gxpath_h) $(gzstate_h)
  451. +
  452. +gspath2.$(OBJ): gspath2.c $(GXERR) \
  453. +  $(gspath_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gzpath_h) $(gzdevice_h)
  454. +
  455. +gsstate.$(OBJ): gsstate.c $(GXERR) \
  456. +  $(gscie_h) $(gscolor2_h) $(gscspace_h) $(gxcolor_h) $(gxrefct_h) \
  457. +  $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h) $(gzline_h) $(gzpath_h)
  458. +
  459. +gstdev.$(OBJ): gstdev.c $(GXERR) \
  460. +  $(gxbitmap_h) $(gxdevice_h) $(gxfixed_h) $(gxmatrix_h)
  461. +
  462. +gstype1.$(OBJ): gstype1.c $(GXERR) \
  463. +  $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gxchar_h) $(gxdevmem_h) $(gxop1_h) $(gxtype1_h) \
  464. +  $(gzstate_h) $(gzdevice_h) $(gzpath_h)
  465. +
  466. +###### The internal devices
  467. +
  468. +gdevmem_h=gdevmem.h
  469. +
  470. +gdevemap.$(OBJ): gdevemap.c $(AK) $(std_h)
  471. +
  472. +gdevmem1.$(OBJ): gdevmem1.c $(AK) \
  473. +  $(gx_h) $(gserrors_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h)
  474. +
  475. +gdevmem2.$(OBJ): gdevmem2.c $(AK) \
  476. +  $(gx_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h)
  477. +
  478. +gdevmem3.$(OBJ): gdevmem3.c $(AK) \
  479. +  $(gx_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h)
  480. +
  481. +###### Files dependent on the installed devices, features, and platform.
  482. +# Generating gconfig.h also generates o*.tr and l*.tr.
  483. +
  484. +# gconfig.h shouldn't have to depend on ALL_DEVS, but that would
  485. +# involve rewriting gsconfig to only save the device name, not the
  486. +# contents of the <device>.D_# files.
  487. +
  488. +ALL_DEVS=$(FEATURE_DEVS) $(PLATFORM).dev \
  489. +  $(DEVICE_DEVS) $(DEVICE_DEVS1) \
  490. +  $(DEVICE_DEVS2) $(DEVICE_DEVS3) $(DEVICE_DEVS4) $(DEVICE_DEVS5)\
  491. +  $(DEVICE_DEVS6) $(DEVICE_DEVS7) $(DEVICE_DEVS8) $(DEVICE_DEVS9)
  492. +
  493. +gconfig.h obj.tr objw.tr ld.tr lib.tr: \
  494. +  devs.mak $(MAKEFILE) echogs$(XE) genconf$(XE) $(ALL_DEVS)
  495. +    echogs -w t.cfg - $(FEATURE_DEVS) $(PLATFORM).dev
  496. +    echogs -a t.cfg - $(DEVICE_DEVS)
  497. +    echogs -a t.cfg - $(DEVICE_DEVS1)
  498. +    echogs -a t.cfg - $(DEVICE_DEVS2)
  499. +    echogs -a t.cfg - $(DEVICE_DEVS3)
  500. +    echogs -a t.cfg - $(DEVICE_DEVS4)
  501. +    echogs -a t.cfg - $(DEVICE_DEVS5)
  502. +    echogs -a t.cfg - $(DEVICE_DEVS6)
  503. +    echogs -a t.cfg - $(DEVICE_DEVS7)
  504. +    echogs -a t.cfg - $(DEVICE_DEVS8)
  505. +    echogs -a t.cfg - $(DEVICE_DEVS9)
  506. +    genconf @t.cfg -h gconfig.h -l lib.tr -o obj.tr -u ld.tr -w objw.tr
  507. +    rm t.cfg
  508. +    echogs -a gconfig.h -x 23 define GS_LIB_DEFAULT -x 2022 $(GS_LIB_DEFAULT) -x 22
  509. +    echogs -a gconfig.h -x 23 define GS_INIT -x 2022 $(GS_INIT) -x 22
  510. +
  511. +gconfig.$(OBJ): gconfig.c $(AK) $(gconfig_h) $(MAKEFILE)
  512. +
  513. +###### On Unix, we pre-link all of the library except the back end.
  514. +###### On MS-DOS, we have to do the whole thing at once.
  515. +
  516. +LIBGS=gschar.$(OBJ) gscolor.$(OBJ) gscoord.$(OBJ) \
  517. + gsdevice.$(OBJ) gsfile.$(OBJ) gsfont.$(OBJ) gsht.$(OBJ) \
  518. + gsimage.$(OBJ) gsimage1.$(OBJ) gsimage2.$(OBJ) \
  519. + gsimpath.$(OBJ) gsline.$(OBJ) gsmatrix.$(OBJ) gsmisc.$(OBJ) \
  520. + gspaint.$(OBJ) gspath.$(OBJ) gspath2.$(OBJ) \
  521. + gsstate.$(OBJ) gstdev.$(OBJ) gstype1.$(OBJ) gsutil.$(OBJ) \
  522. + gxccache.$(OBJ) gxccman.$(OBJ) gxclist.$(OBJ) gxclread.$(OBJ) \
  523. + gxcmap.$(OBJ) gxcpath.$(OBJ) \
  524. + gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \
  525. + gxhint1.$(OBJ) gxhint2.$(OBJ) gxht.$(OBJ) \
  526. + gxpath.$(OBJ) gxpath2.$(OBJ) gxpcopy.$(OBJ) gxstroke.$(OBJ) \
  527. + gdevmem1.$(OBJ) gdevmem2.$(OBJ) gdevmem3.$(OBJ) gconfig.$(OBJ)
  528. +
  529. +# ------------------------------ Interpreter ------------------------------ #
  530. +
  531. +###### Include files
  532. +
  533. +alloc_h=alloc.h
  534. +astate_h=astate.h
  535. +ccfont_h=ccfont.h
  536. +dict_h=dict.h
  537. +dparam_h=dparam.h
  538. +dstack_h=dstack.h
  539. +errors_h=errors.h
  540. +estack_h=estack.h
  541. +filedev_h=filedev.h
  542. +files_h=files.h
  543. +font_h=font.h
  544. +ilevel_h=ilevel.h
  545. +iname_h=iname.h
  546. +iref_h=iref.h
  547. +iscan_h=iscan.h
  548. +ivmspace_h=ivmspace.h
  549. +iutil_h=iutil.h
  550. +main_h=main.h
  551. +opdef_h=opdef.h
  552. +ostack_h=ostack.h
  553. +overlay_h=overlay.h
  554. +packed_h=packed.h
  555. +save_h=save.h
  556. +scanchar_h=scanchar.h
  557. +sbits_h=sbits.h
  558. +shc_h=shc.h
  559. +state_h=state.h
  560. +store_h=store.h
  561. +stream_h=stream.h
  562. +# Nested include files
  563. +bfont_h=bfont.h $(font_h)
  564. +ghost_h=ghost.h $(gx_h) $(iref_h)
  565. +oper_h=oper.h $(gsutil_h) $(iutil_h) $(opdef_h) $(ostack_h)
  566. +scf_h=scf.h $(shc_h)
  567. +sdct_h=sdct.h $(shc_h)
  568. +# Include files for optional features
  569. +bnum_h=bnum.h
  570. +bseq_h=bseq.h
  571. +btoken_h=btoken.h
  572. +
  573. +comp1_h=comp1.h $(ghost_h) $(oper_h) $(gserrors_h) $(gxfixed_h) $(gxop1_h)
  574. +
  575. +gdevprn_h=gdevprn.h $(memory__h) $(string__h) $(gx_h) \
  576. +  $(gserrors_h) $(gsmatrix_h) $(gxdevice_h) $(gxdevmem_h) $(gxclist_h)
  577. +
  578. +###### Utilities
  579. +
  580. +GH=$(AK) $(ghost_h)
  581. +
  582. +ialloc.$(OBJ): ialloc.c $(AK) $(gx_h) $(alloc_h) $(astate_h) $(ivmspace_h)
  583. +
  584. +iccfont.$(OBJ): iccfont.c $(GH) gconfigf.h \
  585. +  $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) \
  586. +  $(font_h) $(iutil_h) $(iname_h) $(oper_h) $(save_h) $(store_h)
  587. +
  588. +idebug.$(OBJ): idebug.c $(GH) \
  589. +  $(iutil_h) $(dict_h) $(iname_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h)
  590. +
  591. +idict.$(OBJ): idict.c $(GH) \
  592. +  $(alloc_h) $(errors_h) $(ivmspace_h) $(iname_h) $(packed_h) \
  593. +  $(save_h) $(store_h) $(iutil_h) $(dict_h) $(dstack_h)
  594. +
  595. +idparam.$(OBJ): idparam.c $(GH) \
  596. +  $(gsmatrix_h) $(dict_h) $(dparam_h) $(errors_h) $(iutil_h)
  597. +
  598. +iinit.$(OBJ): iinit.c $(GH) $(gconfig_h) \
  599. +  $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) $(ilevel_h) $(iname_h) $(oper_h) $(store_h)
  600. +
  601. +iname.$(OBJ): iname.c $(GH) $(alloc_h) $(errors_h) $(ivmspace_h) $(iname_h) $(store_h)
  602. +
  603. +isave.$(OBJ): isave.c $(GH) $(alloc_h) $(astate_h) $(errors_h) $(iname_h) $(packed_h) $(save_h) $(store_h)
  604. +
  605. +iscan.$(OBJ): iscan.c $(GH) $(ctype__h) \
  606. +  $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) \
  607. +  $(ilevel_h) $(iutil_h) $(iscan_h) $(ivmspace_h) \
  608. +  $(iname_h) $(ostack_h) $(packed_h) $(store_h) $(stream_h) $(scanchar_h)
  609. +
  610. +iutil.$(OBJ): iutil.c $(GH) \
  611. +  $(errors_h) $(alloc_h) $(dict_h) $(iutil_h) $(ivmspace_h) \
  612. +  $(iname_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h) \
  613. +  $(gsmatrix_h) $(gxdevice_h) $(gzcolor_h)
  614. +
  615. +sfilter.$(OBJ): sfilter.c $(AK) $(stdio__h) \
  616. +  $(scanchar_h) $(stream_h) $(gscrypt1_h)
  617. +
  618. +stream.$(OBJ): stream.c $(AK) $(stdio__h) $(memory__h) \
  619. +  $(gpcheck_h) $(scanchar_h) $(stream_h)
  620. +
  621. +###### Operators
  622. +
  623. +OP=$(GH) $(errors_h) $(oper_h)
  624. +
  625. +### Non-graphics operators
  626. +
  627. +zarith.$(OBJ): zarith.c $(OP) $(store_h)
  628. +
  629. +zarray.$(OBJ): zarray.c $(OP) $(alloc_h) $(packed_h) $(store_h)
  630. +
  631. +zcontrol.$(OBJ): zcontrol.c $(OP) $(estack_h) $(iutil_h) $(store_h)
  632. +
  633. +zdict.$(OBJ): zdict.c $(OP) $(dict_h) $(dstack_h) $(iname_h) $(store_h)
  634. +
  635. +zfile.$(OBJ): zfile.c $(OP) $(gp_h) \
  636. +  $(alloc_h) $(estack_h) $(filedev_h) $(files_h) $(ilevel_h) $(iutil_h) \
  637. +  $(save_h) $(stream_h) $(store_h)
  638. +
  639. +zfiledev.$(OBJ): zfiledev.c $(OP) $(string__h) $(gp_h) $(gconfig_h) \
  640. +  $(filedev_h) $(files_h) $(stream_h)
  641. +
  642. +zfileio.$(OBJ): zfileio.c $(OP) $(gp_h) \
  643. +  $(estack_h) $(files_h) $(iscan_h) $(store_h) $(stream_h) \
  644. +  $(gsmatrix_h) $(gxdevice_h) $(gxdevmem_h)
  645. +
  646. +zfilter.$(OBJ): zfilter.c $(OP) $(alloc_h) $(stream_h)
  647. +
  648. +zgeneric.$(OBJ): zgeneric.c $(OP) \
  649. +  $(dict_h) $(estack_h) $(ivmspace_h) $(iname_h) $(packed_h) $(store_h)
  650. +
  651. +zmath.$(OBJ): zmath.c $(OP) $(store_h)
  652. +
  653. +zmisc.$(OBJ): zmisc.c $(OP) $(gp_h) $(errno__h) $(memory__h) $(string__h) \
  654. +  $(alloc_h) $(dict_h) $(dstack_h) $(iname_h) $(ivmspace_h) $(packed_h) $(store_h) \
  655. +  $(gscrypt1_h)
  656. +
  657. +zpacked.$(OBJ): zpacked.c $(OP) \
  658. +  $(alloc_h) $(dict_h) $(ivmspace_h) $(iname_h) $(packed_h) $(save_h) $(store_h)
  659. +
  660. +zprops.$(OBJ): zprops.c $(OP) \
  661. +  $(alloc_h) $(dict_h) $(iname_h) $(state_h) $(store_h) \
  662. +  $(gsprops_h) $(gsmatrix_h) $(gxdevice_h) $(gsstate_h)
  663. +
  664. +zrelbit.$(OBJ): zrelbit.c $(OP) $(store_h) $(dict_h)
  665. +
  666. +zstack.$(OBJ): zstack.c $(OP) $(store_h)
  667. +
  668. +zstring.$(OBJ): zstring.c $(OP) \
  669. +  $(alloc_h) $(iscan_h) $(iutil_h) $(iname_h) $(store_h) $(stream_h)
  670. +
  671. +ztype.$(OBJ): ztype.c $(OP) \
  672. +  $(dict_h) $(iscan_h) $(iutil_h) $(iname_h) $(stream_h) $(store_h)
  673. +
  674. +zvmem.$(OBJ): zvmem.c $(OP) $(alloc_h) $(dict_h) $(dstack_h) $(estack_h) $(save_h) $(state_h) $(store_h) \
  675. +  $(gsmatrix_h) $(gsstate_h)
  676. +
  677. +###### Graphics operators
  678. +
  679. +zchar.$(OBJ): zchar.c $(OP) $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) \
  680. +  $(gschar_h) $(gxtype1_h) $(gxdevice_h) $(gxfont_h) $(gzpath_h) $(gzstate_h) \
  681. +  $(alloc_h) $(dict_h) $(font_h) $(estack_h) $(ilevel_h) $(iname_h) $(state_h) $(store_h)
  682. +
  683. +zcolor.$(OBJ): zcolor.c $(OP) $(alloc_h) $(estack_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gxdevice_h) $(gzcolor_h) $(iutil_h) $(state_h) $(store_h)
  684. +
  685. +zdevice.$(OBJ): zdevice.c $(OP) $(alloc_h) $(state_h) $(gsmatrix_h) $(gsstate_h) $(gxdevice_h) $(store_h)
  686. +
  687. +zfont.$(OBJ): zfont.c $(OP) \
  688. +  $(gsmatrix_h) $(gxdevice_h) $(gxfont_h) $(gxfdir_h) $(gxcache_h) \
  689. +  $(alloc_h) $(bfont_h) $(dict_h) $(iname_h) $(packed_h) $(save_h) $(state_h) $(store_h)
  690. +
  691. +zfont1.$(OBJ): zfont1.c $(OP) $(gsmatrix_h) $(gxdevice_h) $(gschar_h) $(gxfixed_h) $(gxfont_h) \
  692. +  $(bfont_h) $(dict_h) $(dparam_h) $(iname_h) $(store_h)
  693. +
  694. +zfont2.$(OBJ): zfont2.c $(OP) $(gsmatrix_h) $(gxdevice_h) $(gschar_h) $(gxfixed_h) $(gxfont_h) \
  695. +  $(alloc_h) $(bfont_h) $(dict_h) $(dparam_h) $(ilevel_h) $(iname_h) \
  696. +  $(packed_h) $(save_h) $(store_h)
  697. +
  698. +zgstate.$(OBJ): zgstate.c $(OP) $(alloc_h) $(gsmatrix_h) $(gsstate_h) $(state_h) $(store_h)
  699. +
  700. +zht.$(OBJ): zht.c $(OP) $(alloc_h) $(estack_h) $(gsmatrix_h) $(gsstate_h) $(state_h) $(store_h)
  701. +
  702. +zmatrix.$(OBJ): zmatrix.c $(OP) $(gsmatrix_h) $(state_h) $(gscoord_h) $(store_h)
  703. +
  704. +zpaint.$(OBJ): zpaint.c $(OP) \
  705. +  $(alloc_h) $(estack_h) $(ilevel_h) $(state_h) $(store_h) $(stream_h) \
  706. +  $(gsimage_h) $(gsmatrix_h) $(gspaint_h)
  707. +
  708. +zpath.$(OBJ): zpath.c $(OP) $(gsmatrix_h) $(gspath_h) $(state_h) $(store_h)
  709. +
  710. +zpath2.$(OBJ): zpath2.c $(OP) $(alloc_h) $(estack_h) $(gspath_h) $(state_h) $(store_h)
  711. +
  712. +###### Linking
  713. +
  714. +INT=ialloc.$(OBJ) idebug.$(OBJ) idict.$(OBJ) idparam.$(OBJ) \
  715. + iinit.$(OBJ) iname.$(OBJ) \
  716. + interp.$(OBJ) isave.$(OBJ) iscan.$(OBJ) iutil.$(OBJ) \
  717. + sfilter.$(OBJ) stream.$(OBJ) \
  718. + zarith.$(OBJ) zarray.$(OBJ) zcontrol.$(OBJ) zdict.$(OBJ) \
  719. + zfile.$(OBJ) zfiledev.$(OBJ) zfileio.$(OBJ) zfilter.$(OBJ) zgeneric.$(OBJ) \
  720. + zmath.$(OBJ) zmisc.$(OBJ) zpacked.$(OBJ) zprops.$(OBJ) zrelbit.$(OBJ) \
  721. + zstack.$(OBJ) zstring.$(OBJ) ztype.$(OBJ) zvmem.$(OBJ) \
  722. + zchar.$(OBJ) zcolor.$(OBJ) zfont.$(OBJ) zfont1.$(OBJ) zfont2.$(OBJ) \
  723. + zdevice.$(OBJ) zgstate.$(OBJ) zht.$(OBJ) zmatrix.$(OBJ) \
  724. + zpaint.$(OBJ) zpath.$(OBJ) zpath2.$(OBJ)
  725. +
  726. +# -------------------------- Optional features ---------------------------- #
  727. +
  728. +### Additions common to Display PostScript and Level 2
  729. +
  730. +# We have to split up the module list because of limitations
  731. +# on the number of arguments to a DOS batch file.
  732. +dpsand2a_=gsdps1.$(OBJ) ibnum.$(OBJ) iscan2.$(OBJ)
  733. +dpsand2b_=zbseq.$(OBJ) zchar2.$(OBJ) zdps1.$(OBJ) zupath.$(OBJ) zvmem2.$(OBJ)
  734. +dpsand2_=$(dpsand2a_) $(dpsand2b_)
  735. +dpsand2.dev: $(dpsand2_) gssetmod gsaddmod
  736. +    $(SHP)gssetmod dpsand2 $(dpsand2a_)
  737. +    $(SHP)gsaddmod dpsand2 -obj $(dpsand2b_)
  738. +    $(SHP)gsaddmod dpsand2 -oper2 zbseq zchar2 zdps1 zupath zvmem2
  739. +    $(SHP)gsaddmod dpsand2 -ps gs_dps1
  740. +
  741. +gsdps1.$(OBJ): gsdps1.c $(GXERR) $(gxfixed_h) $(gxmatrix_h) $(gzpath_h) $(gzstate_h)
  742. +
  743. +ibnum.$(OBJ): ibnum.c $(GH) $(errors_h) $(stream_h) $(bnum_h) $(btoken_h)
  744. +
  745. +iscan2.$(OBJ): iscan2.c $(GH) $(errors_h) \
  746. +  $(alloc_h) $(dict_h) $(dstack_h) $(iscan_h) $(iutil_h) $(ivmspace_h) \
  747. +  $(iname_h) $(ostack_h) $(save_h) $(store_h) $(stream_h) \
  748. +  $(bseq_h) $(btoken_h) $(bnum_h)
  749. +
  750. +zbseq.$(OBJ): zbseq.c $(OP) $(save_h) $(store_h) $(stream_h) $(files_h) $(iname_h) $(bnum_h) $(btoken_h) $(bseq_h)
  751. +
  752. +zchar2.$(OBJ): zchar2.c $(OP) $(gschar_h) $(gsmatrix_h) $(gxfixed_h) $(gxfont_h) \
  753. +  $(alloc_h) $(estack_h) $(font_h) $(iname_h) $(state_h) $(store_h) $(stream_h) $(bnum_h)
  754. +
  755. +zdps1.$(OBJ): zdps1.c $(OP) $(gsmatrix_h) $(gspath_h) $(gsstate_h) \
  756. +  $(alloc_h) $(ivmspace_h) $(state_h) $(store_h) $(stream_h) $(bnum_h)
  757. +
  758. +zupath.$(OBJ): zupath.c $(OP) \
  759. +  $(dict_h) $(dstack_h) $(iutil_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) \
  760. +  $(gscoord_h) $(gsmatrix_h) $(gspaint_h) $(gspath_h) $(gsstate_h) \
  761. +  $(gxfixed_h) $(gxdevice_h) $(gxpath_h)
  762. +
  763. +zvmem2.$(OBJ): zvmem2.c $(OP) \
  764. +  $(ivmspace_h) $(store_h)
  765. +
  766. +### Display PostScript
  767. +# We should include zcontext, but it isn't in good enough shape yet:
  768. +#    $(SHP)gsaddmod dps -oper2 zcontext
  769. +
  770. +dps_=
  771. +dps.dev: dpsand2.dev $(dps_) gssetmod gsaddmod
  772. +    $(SHP)gssetmod dps $(dps_)
  773. +    $(SHP)gsaddmod dps -include dpsand2
  774. +
  775. +zcontext.$(OBJ): zcontext.c $(OP) \
  776. +  $(alloc_h) $(dict_h) $(dstack_h) $(estack_h) $(state_h) $(store_h)
  777. +
  778. +### Composite font support
  779. +
  780. +gschar0.$(OBJ): gschar0.c $(GXERR) \
  781. +  $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gxdevmem_h) $(gxfont_h) $(gxchar_h) $(gzstate_h)
  782. +
  783. +zfont0.$(OBJ): zfont0.c $(OP) $(gsmatrix_h) $(gxdevice_h) $(gxfont_h) \
  784. +  $(alloc_h) $(bfont_h) $(dict_h) $(iname_h) $(state_h) $(store_h)
  785. +
  786. +compfont_=zchar2.$(OBJ) zfont0.$(OBJ) gschar0.$(OBJ)
  787. +compfont.dev: $(compfont_) gssetmod gsaddmod
  788. +    $(SHP)gssetmod compfont $(compfont_)
  789. +    $(SHP)gsaddmod compfont -oper zfont0 zchar2
  790. +    $(SHP)gsaddmod compfont -ps gs_type0
  791. +
  792. +### Level 2 additions
  793. +
  794. +# We have to split up the module list because of limitations
  795. +# on the number of arguments to a DOS batch file.
  796. +level2a_=gscie.$(OBJ) gscolor2.$(OBJ) zcie.$(OBJ) zcolor2.$(OBJ)
  797. +level2b_=zcspace2.$(OBJ) zht2.$(OBJ) zimage2.$(OBJ) zmisc2.$(OBJ)
  798. +level2_=$(level2a_) $(level2b_)
  799. +level2.dev: compfont.dev dpsand2.dev filter.dev $(level2_) gssetmod gsaddmod
  800. +    $(SHP)gssetmod level2 $(level2a_)
  801. +    $(SHP)gsaddmod level2 -obj $(level2b_)
  802. +    $(SHP)gsaddmod level2 -include compfont dpsand2 filter
  803. +    $(SHP)gsaddmod level2 -oper zmisc2_level
  804. +    $(SHP)gsaddmod level2 -oper2 zcie zcolor2 zcspace2
  805. +    $(SHP)gsaddmod level2 -oper2 zht2 zimage2 zmisc2
  806. +    $(SHP)gsaddmod level2 -ps gs_lev2
  807. +
  808. +gscie.$(OBJ): gscie.c $(GXERR) \
  809. +  $(gscspace_h) $(gscie_h) $(gscolor2_h) \
  810. +  $(gxarith_h) $(gxcolor_h) $(gxdevice_h) $(gxrefct_h) \
  811. +  $(gzcolor_h) $(gzstate_h)
  812. +
  813. +gscolor2.$(OBJ): gscolor2.c $(GXERR) \
  814. +  $(gscie_h) $(gscolor2_h) $(gscspace_h) \
  815. +  $(gxcolor_h) $(gxdevice_h) $(gxfixed_h) $(gxmatrix_h) $(gxrefct_h) \
  816. +  $(gzcolor_h) $(gzstate_h)
  817. +
  818. +zcie.$(OBJ): zcie.c $(OP) \
  819. +  $(gscspace_h) $(gscolor2_h) $(gscie_h) $(gxcolor_h) $(gxrefct_h) \
  820. +  $(alloc_h) $(dict_h) $(dparam_h) $(estack_h) $(save_h) $(state_h) $(store_h)
  821. +
  822. +zcolor2.$(OBJ): zcolor2.c $(OP) \
  823. +  $(gscolor_h) $(gxcolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) \
  824. +  $(dict_h) $(dparam_h) $(iname_h) $(state_h) $(store_h)
  825. +
  826. +zcspace2.$(OBJ): zcspace2.c $(OP) \
  827. +  $(gscolor_h) $(gxcolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) \
  828. +  $(dict_h) $(dparam_h) $(estack_h) $(iname_h) $(state_h) $(store_h)
  829. +
  830. +zht2.$(OBJ): zht2.c $(OP) \
  831. +  $(dict_h) $(dparam_h) $(iname_h) $(state_h) $(store_h)
  832. +
  833. +zimage2.$(OBJ): zimage2.c $(OP) \
  834. +  $(gscolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) $(gxcolor_h) \
  835. +  $(dict_h) $(dparam_h) $(ilevel_h) $(state_h)
  836. +
  837. +zmisc2.$(OBJ): zmisc2.c $(OP) \
  838. +  $(gsfont_h) \
  839. +  $(dict_h) $(dparam_h) $(dstack_h) $(estack_h) $(ilevel_h) $(iname_h) $(store_h)
  840. +
  841. +### Filters other than the ones in sfilter.c
  842. +
  843. +sbits.$(OBJ): sbits.c $(AK) $(stdio__h) $(sbits_h) $(stream_h)
  844. +
  845. +scftab.$(OBJ): scftab.c $(AK) $(std_h) $(scf_h)
  846. +
  847. +scfdtab.$(OBJ): scfdtab.c $(AK) $(std_h) $(scf_h)
  848. +
  849. +scfd.$(OBJ): scfd.c $(AK) $(stdio__h) $(gdebug_h)\
  850. +  $(sbits_h) $(scf_h) $(stream_h)
  851. +
  852. +scfe.$(OBJ): scfe.c $(AK) $(stdio__h) $(gdebug_h)\
  853. +  $(sbits_h) $(scf_h) $(stream_h)
  854. +
  855. +sdctd.$(OBJ): sdctd.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
  856. +
  857. +sdcte.$(OBJ): sdcte.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
  858. +
  859. +sfilter2.$(OBJ): sfilter2.c $(AK) $(stdio__h) $(scanchar_h) $(stream_h)
  860. +
  861. +slzwd.$(OBJ): slzwd.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
  862. +
  863. +slzwe.$(OBJ): slzwe.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
  864. +
  865. +zfilter2.$(OBJ): zfilter2.c $(OP) $(alloc_h) $(dict_h) $(dparam_h) $(sdct_h) $(stream_h)
  866. +
  867. +# Because of size limits on the DOS command line,
  868. +# we have to break this up into two parts.
  869. +filter_1=zfilter2.$(OBJ) sfilter2.$(OBJ) sbits.$(OBJ)
  870. +filter_2=scfdtab.$(OBJ) scftab.$(OBJ) scfd.$(OBJ) scfe.$(OBJ) 
  871. +filter_3=sdctd.$(OBJ) sdcte.$(OBJ) slzwd.$(OBJ) slzwe.$(OBJ)
  872. +filter.dev: $(filter_1) $(filter_2) $(filter_3) gssetmod gsaddmod
  873. +    $(SHP)gssetmod filter $(filter_1)
  874. +    $(SHP)gsaddmod filter -obj $(filter_2)
  875. +    $(SHP)gsaddmod filter -obj $(filter_3)
  876. +    $(SHP)gsaddmod filter -oper zfilter2
  877. +
  878. +### Precompiled fonts.  See fonts.doc for more information.
  879. +
  880. +CCFONT=$(OP) $(ccfont_h)
  881. +
  882. +# List the fonts we are going to compile.
  883. +# Because of intrinsic limitations in `make', we have to list
  884. +# the object file names and the font names separately.
  885. +ccfonts1_=uglyr.$(OBJ)
  886. +ccfonts1=uglyr
  887. +
  888. +ccfonts.dev: $(MAKEFILE) gs.mak iccfont.$(OBJ) gssetmod gsaddmod \
  889. +  $(ccfonts1_) $(ccfonts2_) $(ccfonts3_) $(ccfonts4_) $(ccfonts5_)
  890. +    $(SHP)gssetmod ccfonts iccfont.$(OBJ)
  891. +    $(SHP)gsaddmod ccfonts -obj $(ccfonts1_)
  892. +    $(SHP)gsaddmod ccfonts -obj $(ccfonts2_)
  893. +    $(SHP)gsaddmod ccfonts -obj $(ccfonts3_)
  894. +    $(SHP)gsaddmod ccfonts -obj $(ccfonts4_)
  895. +    $(SHP)gsaddmod ccfonts -obj $(ccfonts5_)
  896. +    $(SHP)gsaddmod ccfonts -oper ccfonts
  897. +
  898. +gconfigf.h: $(MAKEFILE) gs.mak genconf$(XE) gssetmod gsaddmod
  899. +    $(SHP)gssetmod ccfonts_
  900. +    $(SHP)gsaddmod ccfonts_ -font $(ccfonts1)
  901. +    $(SHP)gsaddmod ccfonts_ -font $(ccfonts2)
  902. +    $(SHP)gsaddmod ccfonts_ -font $(ccfonts3)
  903. +    $(SHP)gsaddmod ccfonts_ -font $(ccfonts4)
  904. +    $(SHP)gsaddmod ccfonts_ -font $(ccfonts5)
  905. +    $(EXP)genconf ccfonts_.dev -f gconfigf.h
  906. +
  907. +uglyr.$(OBJ): uglyr.c $(CCFONT)
  908. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/uglyr.c
  909. +
  910. +ncrr.$(OBJ): ncrr.c $(CCFONT)
  911. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/ncrr.c
  912. +
  913. +pagk.$(OBJ): pagk.c $(CCFONT)
  914. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/pagk.c
  915. +
  916. +psyr.$(OBJ): psyr.c $(CCFONT)
  917. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/psyr.c
  918. +
  919. +ptmr.$(OBJ): ptmr.c $(CCFONT)
  920. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/ptmr.c
  921. +
  922. +pzdr.$(OBJ): pzdr.c $(CCFONT)
  923. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/pzdr.c
  924. +
  925. +# ----------------------------- Main program ------------------------------ #
  926. +
  927. +# Interpreter main program
  928. +
  929. +gs.$(OBJ): gs.c $(GH) $(ctype__h) \
  930. +  $(gxdevice_h) $(gxdevmem_h) \
  931. +  $(alloc_h) $(errors_h) $(estack_h) $(files_h) $(iscan_h) $(main_h) $(ostack_h) $(store_h) $(stream_h)
  932. +
  933. +gsmain.$(OBJ): gsmain.c $(GH) \
  934. +  $(gp_h) $(gsmatrix_h) $(gxdevice_h) $(gserrors_h) \
  935. +  $(estack_h) $(files_h) $(iscan_h) $(main_h) $(ostack_h) $(store_h)
  936. +
  937. +interp.$(OBJ): interp.c $(GH) \
  938. +  $(errors_h) $(estack_h) $(iname_h) $(dict_h) $(dstack_h) $(iscan_h) $(oper_h) $(ostack_h) $(packed_h) $(save_h) $(store_h) $(stream_h)
  939. +    $(CC) -c -I. -I$(srcdir) $(CFLAGS) $(DEFS) $(srcdir)/interp.c
  940. +
  941. +# It is possible to build Ghostscript with an arbitrary collection of
  942. +# device drivers, although some drivers are supported only on a subset
  943. +# of the target platforms.  The currently available drivers are:
  944. +
  945. +# Displays:
  946. +#   MS-DOS EGA and VGA:
  947. +#    ega    EGA (640x350, 16-color)
  948. +#    vga    VGA (640x480, 16-color)
  949. +#   MS-DOS SuperVGA:
  950. +# +    atiw    ATI Wonder SuperVGA, 256-color modes
  951. +# +     atiw16  ATI Wonder SuperVGA in 800x600, 16-color mode
  952. +#    s3vga    SuperVGA with S3 86C911 chip (e.g., Diamond Stealth board)
  953. +#    tseng    SuperVGA using Tseng Labs ET3000/4000 chips, 256-color modes
  954. +#    tseng16  Tseng Labs SuperVGA in 800x600, 16-color mode (256K memory)
  955. +# +    tvga    Trident SuperVGA, 256-color modes
  956. +# +    tvga16    Trident SuperVGA in 800x600, 16-color mode (256K memory)
  957. +#   ****** NOTE: The vesa device does not work with the Watcom (32-bit MS-DOS)
  958. +#   ****** compiler or executable.
  959. +#    vesa    SuperVGA with VESA standard API driver
  960. +#   MS-DOS other:
  961. +#    bgi    Borland Graphics Interface (CGA)  [MS-DOS only]
  962. +# *    herc    Hercules Graphics display   [MS-DOS only]
  963. +#    mswin    Microsoft Windows 3.0, 3.1  [MS Windows only]
  964. +#    mswinprn  Microsoft Windows 3.0, 3.1 printer  [MS Windows only]
  965. +# *    pe    Private Eye display
  966. +#   Unix and VMS:
  967. +#   ****** NOTE: For direct frame buffer addressing under SCO Unix or Xenix,
  968. +#   ****** edit the definition of EGAVGA below.
  969. +# *    att3b1    AT&T 3b1/Unixpc monochrome display   [3b1 only]
  970. +# *    sonyfb    Sony Microsystems monochrome display   [Sony only]
  971. +# *    sunview  SunView window system   [SunOS only]
  972. +#    x11    X Windows version 11, release >=4   [Unix and VMS only]
  973. +# Printers:
  974. +# *    appledmp  Apple Dot Matrix Printer (should also work with Imagewriter)
  975. +#    bj10e    Canon BubbleJet BJ10e
  976. +# *    bj200    Canon BubbleJet BJ200
  977. +# *    cdeskjet  H-P DeskJet 500C with 1 bit/pixel color
  978. +# *    cdjcolor  H-P DeskJet 500C with 24 bit/pixel color and
  979. +#        high-quality color (Floyd-Steinberg) dithering
  980. +# *    cdjmono  H-P DeskJet 500C printing black only
  981. +# *    cdj500    H-P DeskJet 500C (same as cdjcolor)
  982. +# *    cdj550    H-P DeskJet 550C
  983. +# *    declj250  alternate DEC LJ250 driver
  984. +# +    deskjet  H-P DeskJet and DeskJet Plus
  985. +# *    dfaxhigh  DigiBoard, Inc.'s DigiFAX software format (high resolution)
  986. +# *    dfaxlow  DigiFAX low (normal) resolution
  987. +#    djet500  H-P DeskJet 500
  988. +# *    djet500c  H-P DeskJet 500C
  989. +#    epson    Epson-compatible dot matrix printers (9- or 24-pin)
  990. +# +    eps9high  Epson-compatible 9-pin, interleaved lines
  991. +#        (triple resolution)
  992. +# *    epsonc    Epson LQ-2550 and Fujitsu 3400/2400/1200 color printers
  993. +# *    escp2    Epson ESC/P 2 language printers, including Stylus 800
  994. +# +     ibmpro  IBM 9-pin Proprinter
  995. +# *    jetp3852  IBM Jetprinter ink-jet color printer (Model #3852)
  996. +# +    laserjet  H-P LaserJet
  997. +# *    la50    DEC LA50 printer
  998. +# *    la75    DEC LA75 printer
  999. +# *    lbp8    Canon LBP-8II laser printer
  1000. +# *    ln03    DEC LN03 printer
  1001. +# *    lj250    DEC LJ250 Companion color printer
  1002. +# +    ljet2p    H-P LaserJet IId/IIp/III* with TIFF compression
  1003. +# +    ljet3    H-P LaserJet III* with Delta Row compression
  1004. +# +    ljet4    H-P LaserJet 4 (defaults to 600 dpi)
  1005. +# +    ljetplus  H-P LaserJet Plus
  1006. +# *    m8510    C.Itoh M8510 printer
  1007. +# *    necp6    NEC P6/P6+/P60 printers at 360 x 360 DPI resolution
  1008. +# *    nwp533  Sony Microsystems NWP533 laser printer   [Sony only]
  1009. +# *    oki182    Okidata MicroLine 182
  1010. +#    paintjet  H-P PaintJet color printer
  1011. +# *    pj    alternate PaintJet XL driver 
  1012. +# *    pjxl    H-P PaintJet XL color printer
  1013. +# *    pjxl300  H-P PaintJet XL300 color printer
  1014. +# *    r4081    Ricoh 4081 laser printer
  1015. +# *    sparc    SPARCprinter
  1016. +# *    t4693d2  Tektronix 4693d color printer, 2 bits per R/G/B component
  1017. +# *    t4693d4  Tektronix 4693d color printer, 4 bits per R/G/B component
  1018. +# *    t4693d8  Tektronix 4693d color printer, 8 bits per R/G/B component
  1019. +# *    tek4696  Tektronix 4695/4696 inkjet plotter
  1020. +# *    trufax    TruFax facsimile driver  [Unix only]
  1021. +# File formats and others:
  1022. +#    bit    A plain "bit bucket" device
  1023. +#    bmpmono    Monochrome MS Windows .BMP file format
  1024. +#    bmp16    4-bit (EGA/VGA) .BMP file format
  1025. +#    bmp256    8-bit (256-color) .BMP file format
  1026. +#    bmp16m    24-bit .BMP file format
  1027. +#    gifmono    Monochrome GIF file format
  1028. +#    gif8    8-bit color GIF file format
  1029. +#    pcxmono    Monochrome PCX file format
  1030. +#    pcxgray    8-bit gray scale PCX file format
  1031. +#    pcx16    Older color PCX file format (EGA/VGA, 16-color)
  1032. +#    pcx256    Newer color PCX file format (256-color)
  1033. +#    pbm    Portable Bitmap (plain format)
  1034. +#    pbmraw    Portable Bitmap (raw format)
  1035. +#    pgm    Portable Graymap (plain format)
  1036. +#    pgmraw    Portable Graymap (raw format)
  1037. +#    ppm    Portable Pixmap (plain format)
  1038. +#    ppmraw    Portable Pixmap (raw format)
  1039. +# *    tiffg3    TIFF/F (G3 fax)
  1040. +
  1041. +# User-contributed drivers marked with * require hardware or software
  1042. +# that is not available to Aladdin Enterprises.  Please contact the
  1043. +# original contributors, not Aladdin Enterprises, if you have questions.
  1044. +# Contact information appears in the driver entry below.
  1045. +#
  1046. +# Drivers marked with a + are maintained by Aladdin Enterprises with
  1047. +# the assistance of users, since Aladdin Enterprises doesn't have access to
  1048. +# the hardware for these either.
  1049. +
  1050. +# If you add drivers, it would be nice if you kept each list
  1051. +# in alphabetical order.
  1052. +
  1053. +# Each platform-specific makefile contains a line of the form
  1054. +#    DEVICE_DEVS=<dev1>.dev ... <devn>.dev
  1055. +# where dev1 ... devn are the devices to be included in the build.
  1056. +# You may edit this line to select any desired set of devices.
  1057. +# dev1 will be used as the default device (unless overridden from
  1058. +# the command line with -sDEVICE=xxx, of course.)  If you can't fit all the
  1059. +# devices on a single line, you may add lines defining
  1060. +#    DEVICE_DEVS2=<dev21>.dev ... <dev2n>.dev
  1061. +#    DEVICE_DEVS3=<dev31>.dev ... <dev3n>.dev
  1062. +# etc. up to DEVICE_DEVS9.
  1063. +# Don't use continuation lines, since this may break the MS-DOS command
  1064. +# processor.
  1065. +
  1066. +# ---------------------------- End of catalog ---------------------------- #
  1067. +
  1068. +# If you want to add a new device driver, the examples below should be
  1069. +# enough of a guide to the correct form for the makefile rules.
  1070. +
  1071. +# All device drivers depend on the following:
  1072. +GDEV=$(AK) echogs$(XE) $(gserrors_h) $(gx_h) $(gxdevice_h)
  1073. +
  1074. +# Define the header files for device drivers.  Every header file used by
  1075. +# more than one device driver must be listed here.
  1076. +gdevpccm_h=gdevpccm.h
  1077. +gdevpcfb_h=gdevpcfb.h $(dos__h)
  1078. +gdevpcl_h=gdevpcl.h
  1079. +gdevsvga_h=gdevsvga.h
  1080. +gdevx_h=gdevx.h
  1081. +
  1082. +###### ------------------- MS-DOS display devices ------------------- ######
  1083. +
  1084. +# There are really only three drivers: an EGA/VGA driver (4 bit-planes,
  1085. +# plane-addressed), a SuperVGA driver (8 bit-planes, byte addressed),
  1086. +# and a special driver for the S3 chip.
  1087. +# To make A4 paper the default, change the compilation line from
  1088. +#    $(CC) $(CFLAGS) $(DEFS) -c ...
  1089. +# to
  1090. +#    $(CC) $(CFLAGS) $(DEFS) -c -DA4
  1091. +
  1092. +### ----------------------- EGA and VGA displays ----------------------- ###
  1093. +
  1094. +gdevegaa.$(OBJ): gdevegaa.asm
  1095. +
  1096. +ETEST=ega.$(OBJ) $(ega_) gdevpcfb.$(OBJ) gdevegaa.$(OBJ)
  1097. +ega.exe: $(ETEST) libc$(MM).tr
  1098. +    $(COMPDIR)\tlink $(LCT) $(LO) $(LIBDIR)\c0$(MM) @ega.tr @libc$(MM).tr
  1099. +
  1100. +ega.$(OBJ): ega.c $(GDEV)
  1101. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -v $(srcdir)/ega.c
  1102. +
  1103. +# The shared MS-DOS makefile defines PCFBASM as either gdevegaa.$(OBJ)
  1104. +# or an empty string.
  1105. +
  1106. +# NOTE: for direct frame buffer addressing under SCO Unix or Xenix,
  1107. +# change gdevevga to gdevsco in the following line.
  1108. +EGAVGA=gdevevga.$(OBJ) gdevpcfb.$(OBJ) $(PCFBASM)
  1109. +
  1110. +gdevevga.$(OBJ): gdevevga.c $(GDEV) $(gdevpcfb_h)
  1111. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gdevevga.c
  1112. +
  1113. +gdevsco.$(OBJ): gdevsco.c $(GDEV) $(gdevpcfb_h)
  1114. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gdevsco.c
  1115. +
  1116. +# Common code for MS-DOS and SCO.
  1117. +gdevpcfb.$(OBJ): gdevpcfb.c $(GDEV) $(MAKEFILE) $(gdevpcfb_h)
  1118. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DUSE_ASM=0$(USE_ASM) $(srcdir)/gdevpcfb.c
  1119. +
  1120. +# The EGA/VGA family includes: EGA, VGA, and
  1121. +# the ATI Wonder, Tseng ET3000/4000, and Trident SuperVGA in 16-color mode.
  1122. +
  1123. +ega.dev: $(EGAVGA) gssetdev
  1124. +    $(SHP)gssetdev ega $(EGAVGA)
  1125. +
  1126. +vga.dev: $(EGAVGA) gssetdev
  1127. +    $(SHP)gssetdev vga $(EGAVGA)
  1128. +
  1129. +atiw16.dev: $(EGAVGA) gssetdev
  1130. +    $(SHP)gssetdev atiw16 $(EGAVGA)
  1131. +
  1132. +tseng16.dev: $(EGAVGA) gssetdev
  1133. +    $(SHP)gssetdev tseng16 $(EGAVGA)
  1134. +
  1135. +tvga16.dev: $(EGAVGA) gssetdev
  1136. +    $(SHP)gssetdev tvga16 $(EGAVGA)
  1137. +
  1138. +### ------------------------- SuperVGA displays ------------------------ ###
  1139. +
  1140. +SVGA=gdevsvga.$(OBJ) $(PCFBASM)
  1141. +
  1142. +gdevsvga.$(OBJ): gdevsvga.c $(GDEV) $(MAKEFILE) \
  1143. +  $(gdevpcfb_h) $(gdevsvga_h)
  1144. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DUSE_ASM=0$(USE_ASM) $(srcdir)/gdevsvga.c
  1145. +
  1146. +# The SuperVGA family includes: ATI Wonder, S3, Trident, Tseng ET3000/4000,
  1147. +# and VESA.
  1148. +
  1149. +atiw.dev: $(SVGA) gssetdev
  1150. +    $(SHP)gssetdev atiw $(SVGA)
  1151. +
  1152. +tseng.dev: $(SVGA) gssetdev
  1153. +    $(SHP)gssetdev tseng $(SVGA)
  1154. +
  1155. +tvga.dev: $(SVGA) gssetdev
  1156. +    $(SHP)gssetdev tvga $(SVGA)
  1157. +
  1158. +vesa.dev: $(SVGA) gssetdev
  1159. +    $(SHP)gssetdev vesa $(SVGA)
  1160. +
  1161. +# The S3 driver doesn't share much code with the others.
  1162. +
  1163. +s3vga_=$(SVGA) gdevs3ga.$(OBJ)
  1164. +s3vga.dev: $(s3vga_) gssetdev
  1165. +    $(SHP)gssetdev s3vga $(s3vga_)
  1166. +
  1167. +gdevs3ga.$(OBJ): gdevs3ga.c $(GDEV) $(MAKEFILE) $(gdevpcfb_h) $(gdevsvga_h)
  1168. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gdevs3ga.c
  1169. +
  1170. +### ------------ The BGI (Borland Graphics Interface) device ----------- ###
  1171. +
  1172. +cgaf.$(OBJ): $(BGIDIR)\cga.bgi
  1173. +    $(BGIDIR)\bgiobj /F $(BGIDIR)\cga
  1174. +
  1175. +egavgaf.$(OBJ): $(BGIDIR)\egavga.bgi
  1176. +    $(BGIDIR)\bgiobj /F $(BGIDIR)\egavga
  1177. +
  1178. +# Include egavgaf.$(OBJ) for debugging only.
  1179. +bgi_=gdevbgi.$(OBJ) cgaf.$(OBJ)
  1180. +bgi.dev: $(bgi_) gssetdev gsaddmod
  1181. +    $(SHP)gssetdev bgi $(bgi_)
  1182. +    $(SHP)gsaddmod bgi -lib $(LIBDIR)\graphics
  1183. +
  1184. +gdevbgi.$(OBJ): gdevbgi.c $(GDEV) $(MAKEFILE) $(gxxfont_h)
  1185. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DBGI_LIB=$(QQ)$(BGIDIRSTR)$(QQ) $(srcdir)/gdevbgi.c
  1186. +
  1187. +### ------------------- The Hercules Graphics display ------------------- ###
  1188. +
  1189. +herc_=gdevherc.$(OBJ)
  1190. +herc.dev: $(herc_) gssetdev
  1191. +    $(SHP)gssetdev herc $(herc_)
  1192. +
  1193. +gdevherc.$(OBJ): gdevherc.c $(GDEV)
  1194. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gdevherc.c
  1195. +
  1196. +###### ------------------- The Private Eye display ------------------- ######
  1197. +### Note: this driver was contributed by a user:                          ###
  1198. +###   please contact narf@media-lab.media.mit.edu if you have questions.  ###
  1199. +
  1200. +pe_=gdevpe.$(OBJ)
  1201. +pe.dev: $(pe_) gssetdev
  1202. +    $(SHP)gssetdev pe $(pe_)
  1203. +
  1204. +gdevpe.$(OBJ): gdevpe.c $(GDEV)
  1205. +
  1206. +###### ----------------- The MS-Windows 3.n display ------------------ ######
  1207. +
  1208. +gdevmswn_h=gdevmswn.h $(GDEV) gp_mswin.h
  1209. +
  1210. +# Choose one of gdevwddb or gdevwdib here.
  1211. +mswin_=gdevmswn.$(OBJ) gdevmsxf.$(OBJ) gdevwdib.$(OBJ) \
  1212. +  gdevemap.$(OBJ) gdevpccm.$(OBJ)
  1213. +mswin.dev: $(mswin_) gssetdev
  1214. +    $(SHP)gssetdev mswin $(mswin_)
  1215. +
  1216. +gdevmswn.$(OBJ): gdevmswn.c $(gdevmswn_h) $(gp_h) $(gpcheck_h) \
  1217. +  $(gsprops_h) $(gdevpccm_h)
  1218. +
  1219. +gdevmsxf.$(OBJ): gdevmsxf.c $(ctype__h) $(math__h) $(memory__h) \
  1220. +  $(gdevmswn_h) $(gsutil_h) $(gxxfont_h)
  1221. +
  1222. +# An implementation using a device-dependent bitmap.
  1223. +gdevwddb.$(OBJ): gdevwddb.c $(gdevmswn_h)
  1224. +
  1225. +# An implementation using a DIB filled by an image device.
  1226. +gdevwdib.$(OBJ): gdevwdib.c $(dos__h) $(gdevmswn_h)
  1227. +
  1228. +###### ----------------- The MS-Windows 3.n printer ------------------ ######
  1229. +
  1230. +mswinprn_=gdevwprn.$(OBJ) gdevmsxf.$(OBJ)
  1231. +mswinprn.dev: $(mswinprn_) gssetdev
  1232. +    $(SHP)gssetdev mswinprn $(mswinprn_)
  1233. +
  1234. +gdevwprn.$(OBJ): gdevwprn.c $(gdevmswn_h) $(gp_h) $(gpcheck_h) \
  1235. +  $(gsprops_h) $(gdevpccm_h)
  1236. +
  1237. +### ---------------- Amiga display/printer/file devices ---------------- ###
  1238. +### Note: this driver was contributed by a user: please contact          ###
  1239. +###       Olaf Barthel (olsen@sourcery.han.de) if you have questions.    ###
  1240. +###       He would also like to hear from anyone using the driver.       ###
  1241. +### Please consult the source code for additional documentation.         ###
  1242. +
  1243. +amiga_=gdevamiga.$(OBJ)
  1244. +
  1245. +amiga.dev: $(amiga_) gssetdev
  1246. +    $(SHP)gssetdev amiga $(amiga_)
  1247. +
  1248. +amiga_low.dev: $(amiga_) gssetdev
  1249. +    $(SHP)gssetdev amiga_low $(amiga_)
  1250. +
  1251. +amiga_high.dev: $(amiga_) gssetdev
  1252. +    $(SHP)gssetdev amiga_high $(amiga_)
  1253. +
  1254. +amiga_super.dev: $(amiga_) gssetdev
  1255. +    $(SHP)gssetdev amiga_super $(amiga_)
  1256. +
  1257. +amiga_a2024.dev: $(amiga_) gssetdev
  1258. +    $(SHP)gssetdev amiga_a2024 $(amiga_)
  1259. +
  1260. +amiga_picassoii.dev: $(amiga_) gssetdev
  1261. +    $(SHP)gssetdev amiga_picassoii $(amiga_)
  1262. +
  1263. +amiga_custom.dev: $(amiga_) gssetdev
  1264. +    $(SHP)gssetdev amiga_custom $(amiga_)
  1265. +
  1266. +amiga_printer.dev: $(amiga_) gssetdev
  1267. +    $(SHP)gssetdev amiga_printer $(amiga_)
  1268. +
  1269. +amiga_ilbm.dev: $(amiga_) gssetdev
  1270. +    $(SHP)gssetdev amiga_ilbm $(amiga_)
  1271. +
  1272. +gdevamiga.$(OBJ): gdevamiga.c $(GDEV) $(arch_h)
  1273. +
  1274. +###### ----------- The AT&T 3b1 Unixpc monochrome display ------------ ######
  1275. +### Note: this driver was contributed by a user: please contact           ###
  1276. +###       Andy Fyfe (andy@cs.caltech.edu) if you have questions.          ###
  1277. +
  1278. +att3b1_=gdev3b1.$(OBJ)
  1279. +att3b1.dev: $(att3b1_) gssetdev
  1280. +    $(SHP)gssetdev att3b1 $(att3b1_)
  1281. +
  1282. +gdev3b1.$(OBJ): gdev3b1.c
  1283. +
  1284. +###### --------------- Memory-buffered printer devices --------------- ######
  1285. +
  1286. +# The dependency list for printers includes devs.mak because
  1287. +# you can specify -DA4 to make A4 paper the default.
  1288. +# See below under, e.g., gdevdjet.c.
  1289. +PDEVH=$(GDEV) $(gdevprn_h) devs.mak
  1290. +
  1291. +gdevprn.$(OBJ): gdevprn.c $(PDEVH) $(gp_h) $(gsprops_h)
  1292. +
  1293. +### ------------------- The Apple DMP printer device ------------------- ###
  1294. +
  1295. +appledmp_=gdevadmp.$(OBJ) gdevprn.$(OBJ)
  1296. +
  1297. +appledmp.dev: $(appledmp_) gssetdev
  1298. +    $(SHP)gssetdev appledmp $(appledmp_)
  1299. +
  1300. +### ------------ The Canon BubbleJet BJ10e and BJ200 devices ------------ ###
  1301. +
  1302. +bj10e_=gdevbj10.$(OBJ) gdevprn.$(OBJ)
  1303. +
  1304. +bj10e.dev: $(bj10e_) gssetdev
  1305. +    $(SHP)gssetdev bj10e $(bj10e_)
  1306. +
  1307. +bj200.dev: $(bj10e_) gssetdev
  1308. +    $(SHP)gssetdev bj200 $(bj10e_)
  1309. +
  1310. +gdevbj10.$(OBJ): gdevbj10.c $(PDEVH)
  1311. +
  1312. +### -------------------------- The DigiFAX device ----------------------- ###
  1313. +###    This driver outputs images in a format suitable for use with       ###
  1314. +###    DigiBoard, Inc.'s DigiFAX software.  Use -sDEVICE=dfaxhigh for     ###
  1315. +###    high resolution output, -sDEVICE=dfaxlow for normal output.        ###
  1316. +### Note: this driver was contributed by a user: please contact           ###
  1317. +###       Rick Richardson (rick@digibd.com) if you have questions.        ###
  1318. +
  1319. +digifax_=gdevdfax.$(OBJ) gdevprn.$(OBJ)
  1320. +dfaxhigh.dev: $(digifax_) gssetdev
  1321. +    $(SHP)gssetdev dfaxhigh $(digifax_)
  1322. +
  1323. +dfaxlow.dev: $(digifax_) gssetdev
  1324. +    $(SHP)gssetdev dfaxlow $(digifax_)
  1325. +
  1326. +gdevdfax.$(OBJ): gdevdfax.c $(GDEV) $(gdevprn_h) gdevdfg3.h
  1327. +
  1328. +### ----------- The H-P DeskJet and LaserJet printer devices ----------- ###
  1329. +
  1330. +### These are essentially the same device.
  1331. +### You can make A4 paper the default: see below.
  1332. +### NOTE: printing at full resolution (300 DPI) requires a printer
  1333. +###   with at least 1.5 Mb of memory.  150 DPI only requires .5 Mb.
  1334. +
  1335. +HPPCL=gdevprn.$(OBJ) gdevpcl.$(OBJ)
  1336. +HPMONO=gdevdjet.$(OBJ) $(HPPCL)
  1337. +
  1338. +gdevpcl.$(OBJ): gdevpcl.c $(PDEVH) $(gdevpcl_h)
  1339. +
  1340. +# To make A4 paper the default, change the second line below this to
  1341. +#    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DA4 gdevdjet.c
  1342. +gdevdjet.$(OBJ): gdevdjet.c $(PDEVH) $(gdevpcl_h)
  1343. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gdevdjet.c
  1344. +
  1345. +deskjet.dev: $(HPMONO) gssetdev
  1346. +    $(SHP)gssetdev deskjet $(HPMONO)
  1347. +
  1348. +djet500.dev: $(HPMONO) gssetdev
  1349. +    $(SHP)gssetdev djet500 $(HPMONO)
  1350. +
  1351. +laserjet.dev: $(HPMONO) gssetdev
  1352. +    $(SHP)gssetdev laserjet $(HPMONO)
  1353. +
  1354. +ljetplus.dev: $(HPMONO) gssetdev
  1355. +    $(SHP)gssetdev ljetplus $(HPMONO)
  1356. +
  1357. +### Selecting ljet2p provides TIFF (mode 2) compression on LaserJet III,
  1358. +### IIIp, IIId, IIIsi, IId, and IIp. 
  1359. +
  1360. +ljet2p.dev: $(HPMONO) gssetdev
  1361. +    $(SHP)gssetdev ljet2p $(HPMONO)
  1362. +
  1363. +### Selecting ljet3 provides Delta Row (mode 3) compression on LaserJet III,
  1364. +### IIIp, IIId, IIIsi.
  1365. +
  1366. +ljet3.dev: $(HPMONO) gssetdev
  1367. +    $(SHP)gssetdev ljet3 $(HPMONO)
  1368. +
  1369. +### Selecting ljet4 also provides Delta Row compression on LaserJet IV series.
  1370. +
  1371. +ljet4.dev: $(HPMONO) gssetdev
  1372. +    $(SHP)gssetdev ljet4 $(HPMONO)
  1373. +
  1374. +###- The H-P DeskJet 500C/550C and PaintJet family color printer devices -###
  1375. +### Note: there are two different 500C drivers, both contributed by users.###
  1376. +###   If you have questions about the djet500c driver,                    ###
  1377. +###       please contact AKayser@et.tudelft.nl.                           ###
  1378. +###   If you have questions about the cdj* drivers,                       ###
  1379. +###       please contact g.cameron@biomed.abdn.ac.uk.                     ###
  1380. +
  1381. +cdeskjet_=gdevcdj.$(OBJ) $(HPPCL)
  1382. +
  1383. +cdeskjet.dev: $(cdeskjet_) gssetdev
  1384. +    $(SHP)gssetdev cdeskjet $(cdeskjet_)
  1385. +
  1386. +cdjcolor.dev: $(cdeskjet_) gssetdev
  1387. +    $(SHP)gssetdev cdjcolor $(cdeskjet_)
  1388. +
  1389. +cdjmono.dev: $(cdeskjet_) gssetdev
  1390. +    $(SHP)gssetdev cdjmono $(cdeskjet_)
  1391. +
  1392. +cdj500.dev: $(cdeskjet_) gssetdev
  1393. +    $(SHP)gssetdev cdj500 $(cdeskjet_)
  1394. +
  1395. +cdj550.dev: $(cdeskjet_) gssetdev
  1396. +    $(SHP)gssetdev cdj550 $(cdeskjet_)
  1397. +
  1398. +declj250.dev: $(cdeskjet_) gssetdev
  1399. +    $(SHP)gssetdev declj250 $(cdeskjet_)
  1400. +
  1401. +pj.dev: $(cdeskjet_) gssetdev
  1402. +    $(SHP)gssetdev pj $(cdeskjet_)
  1403. +
  1404. +pjxl.dev: $(cdeskjet_) gssetdev
  1405. +    $(SHP)gssetdev pjxl $(cdeskjet_)
  1406. +
  1407. +pjxl300.dev: $(cdeskjet_) gssetdev
  1408. +    $(SHP)gssetdev pjxl300 $(cdeskjet_)
  1409. +
  1410. +# NB: you can also customise the build if required, using -DA4 (for A4 paper)
  1411. +# and -DBitsPerPixel=<number> if you wish the default to be other than 24
  1412. +# for the generic drivers (cdj500, cdj550, pjxl300, pjtest, pjxltest).
  1413. +# E.g,. to make A4 paper the default, change the second line below this to
  1414. +#    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DA4 gdevdjet.c
  1415. +gdevcdj.$(OBJ): gdevcdj.c $(PDEVH) $(gdevpcl_h)
  1416. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gdevcdj.c
  1417. +
  1418. +djet500c_=gdevdjtc.$(OBJ) $(HPPCL)
  1419. +djet500c.dev: $(djet500c_) gssetdev
  1420. +    $(SHP)gssetdev djet500c $(djet500c_)
  1421. +
  1422. +gdevdjtc.$(OBJ): gdevdjtc.c $(PDEVH) $(gdevpcl_h)
  1423. +
  1424. +### ----------------- The generic Epson printer device ----------------- ###
  1425. +
  1426. +epson_=gdevepsn.$(OBJ) gdevprn.$(OBJ)
  1427. +
  1428. +epson.dev: $(epson_) gssetdev
  1429. +    $(SHP)gssetdev epson $(epson_)
  1430. +
  1431. +eps9high.dev: $(epson_) gssetdev
  1432. +    $(SHP)gssetdev eps9high $(epson_)
  1433. +
  1434. +gdevepsn.$(OBJ): gdevepsn.c $(PDEVH)
  1435. +
  1436. +### ----------------- The IBM Proprinter printer device ---------------- ###
  1437. +
  1438. +ibmpro.dev: $(epson_) gssetdev
  1439. +    $(SHP)gssetdev ibmpro $(epson_)
  1440. +
  1441. +### -------------- The Epson LQ-2550 color printer device -------------- ###
  1442. +### Note: this driver was contributed by users: please contact           ###
  1443. +###       Dave St. Clair (dave@exlog.com) if you have questions.         ###
  1444. +
  1445. +epsonc_=gdevepsc.$(OBJ) gdevprn.$(OBJ)
  1446. +epsonc.dev: $(epsonc_) gssetdev
  1447. +    $(SHP)gssetdev epsonc $(epsonc_)
  1448. +
  1449. +gdevepsc.$(OBJ): gdevepsc.c $(PDEVH)
  1450. +
  1451. +### -------------- The Epson ESC/P 2 language printer device ----------- ###
  1452. +### Note: this driver was contributed by a user: if you have questions,  ###
  1453. +###       please contact Richard Brown (rab@tauon.ph.unimelb.edu.au).    ###
  1454. +
  1455. +escp2_=gdevescp.$(OBJ) gdevprn.$(OBJ)
  1456. +escp2.dev: $(escp2_) gssetdev
  1457. +    $(SHP)gssetdev escp2 $(escp2_)
  1458. +
  1459. +gdevescp.$(OBJ): gdevescp.c $(PDEVH)
  1460. +
  1461. +### ------------ The H-P PaintJet color printer device ----------------- ###
  1462. +### Note: this driver also supports the DEC LJ250 color printer, which   ###
  1463. +###       has a PaintJet-compatible mode, and the PaintJet XL.           ###
  1464. +### If you have questions about the XL, please contact Rob Reiss         ###
  1465. +###       (rob@moray.berkeley.edu).                                      ###
  1466. +
  1467. +PJET=gdevpjet.$(OBJ) $(HPPCL)
  1468. +
  1469. +gdevpjet.$(OBJ): gdevpjet.c $(PDEVH) $(gdevpcl_h)
  1470. +
  1471. +lj250.dev: $(PJET) gssetdev
  1472. +    $(SHP)gssetdev lj250 $(PJET)
  1473. +
  1474. +paintjet.dev: $(PJET) gssetdev
  1475. +    $(SHP)gssetdev paintjet $(PJET)
  1476. +
  1477. +pjetxl.dev: $(PJET) gssetdev
  1478. +    $(SHP)gssetdev pjetxl $(PJET)
  1479. +
  1480. +### ------- The IBM 3852 JetPrinter color inkjet printer device -------- ###
  1481. +### Note: this driver was contributed by users: please contact           ###
  1482. +###       Kevin Gift (kgift@draper.com) if you have questions.           ###
  1483. +### Note that the paper size that can be addressed by the graphics mode  ###
  1484. +###   used in this driver is fixed at 7-1/2 inches wide (the printable   ###
  1485. +###   width of the jetprinter itself.)                                   ###
  1486. +
  1487. +jetp3852_=gdev3852.$(OBJ) gdevprn.$(OBJ)
  1488. +jetp3852.dev: $(jetp3852_) gssetdev
  1489. +    $(SHP)gssetdev jetp3852 $(jetp3852_)
  1490. +
  1491. +gdevjetp.$(OBJ): gdevjetp.c $(PDEVH) $(gdevpcl_h)
  1492. +
  1493. +### ----------------- The Canon LBP-8II printer device ----------------- ###
  1494. +### Note: this driver was contributed by users: please contact           ###
  1495. +###       Tom Quinn (trq@prg.oxford.ac.uk) if you have questions.        ###
  1496. +### Note that the standard paper size for this driver is the European    ###
  1497. +###   A4 size, not the American 8.5" x 11" size.                         ###
  1498. +
  1499. +lbp8_=gdevlbp8.$(OBJ) gdevprn.$(OBJ)
  1500. +lbp8.dev: $(lbp8_) gssetdev
  1501. +    $(SHP)gssetdev lbp8 $(lbp8_)
  1502. +
  1503. +gdevlbp8.$(OBJ): gdevlbp8.c $(PDEVH)
  1504. +
  1505. +### -------------- The DEC LN03/LA50/LA75 printer devices -------------- ###
  1506. +### Note: this driver was contributed by users: please contact           ###
  1507. +###       Ulrich Mueller (ulm@vsnhd1.cern.ch) if you have questions.     ###
  1508. +### For questions about LA50 and LA75: please contact                    ###
  1509. +###       Ian MacPhedran (macphed@dvinci.USask.CA).                     ###
  1510. +### For the LN03, you can make A4 paper the default: see below.          ###
  1511. +
  1512. +ln03_=gdevln03.$(OBJ) gdevprn.$(OBJ)
  1513. +ln03.dev: $(ln03_) gssetdev
  1514. +    $(SHP)gssetdev ln03 $(ln03_)
  1515. +
  1516. +la50.dev: $(ln03_) gssetdev
  1517. +    $(SHP)gssetdev la50 $(ln03_)
  1518. +
  1519. +la75.dev: $(ln03_) gssetdev
  1520. +    $(SHP)gssetdev la75 $(ln03_)
  1521. +
  1522. +# To make A4 paper the default, change the second line below this to
  1523. +#    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DA4 gdevln03.c
  1524. +gdevln03.$(OBJ): gdevln03.c $(PDEVH)
  1525. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gdevln03.c
  1526. +
  1527. +### -------------- The C.Itoh M8510 printer device --------------------- ###
  1528. +### Note: this driver was contributed by a user: please contact Bob      ###
  1529. +###       Smith <bob@snuffy.penfield.ny.us> if you have questions.       ###
  1530. +
  1531. +m8510_=gdev8510.$(OBJ) gdevprn.$(OBJ)
  1532. +m8510.dev: $(m8510_) gssetdev
  1533. +    $(SHP)gssetdev m8510 $(m8510_)
  1534. +
  1535. +gdev8510.$(OBJ): gdev8510.c $(PDEVH)
  1536. +
  1537. +### --------------------- The NEC P6 family devices -------------------- ###
  1538. +
  1539. +necp6_=gdevnp6.$(OBJ) gdevprn.$(OBJ)
  1540. +necp6.dev: $(necp6_) gssetdev
  1541. +    $(SHP)gssetdev necp6 $(necp6_)
  1542. +
  1543. +gdevnp6.$(OBJ): gdevnp6.c $(PDEVH)
  1544. +
  1545. +### ----------------- The Okidata MicroLine 182 device ----------------- ###
  1546. +### Note: this driver was contributed by a user: please contact          ###
  1547. +###       Maarten Koning (smeg@bnr.ca) if you have questions.            ###
  1548. +
  1549. +oki182_=gdevo182.$(OBJ) gdevprn.$(OBJ)
  1550. +oki182.dev: $(oki182_) gssetdev
  1551. +    $(SHP)gssetdev oki182 $(oki182_)
  1552. +
  1553. +gdevo182.$(OBJ): gdevo182.c $(PDEVH)
  1554. +
  1555. +### ------------- The Ricoh 4081 laser printer device ------------------ ###
  1556. +### Note: this driver was contributed by users:                          ###
  1557. +###       please contact kdw@oasis.icl.co.uk if you have questions.      ###
  1558. +
  1559. +r4081_=gdev4081.$(OBJ) gdevprn.$(OBJ)
  1560. +r4081.dev: $(r4081_) gssetdev
  1561. +    $(SHP)gssetdev r4081 $(r4081_)
  1562. +
  1563. +gdev4081.$(OBJ): gdev4081.c $(PDEVH)
  1564. +
  1565. +###### ------------------------ Sony devices ------------------------ ######
  1566. +### Note: these drivers were contributed by users: please contact        ###
  1567. +###       Mike Smolenski (mike@intertech.com) if you have questions.     ###
  1568. +
  1569. +### ------------------- Sony NeWS frame buffer device ------------------ ###
  1570. +
  1571. +sonyfb_=gdevsnfb.$(OBJ) gdevprn.$(OBJ)
  1572. +sonyfb.dev: $(sonyfb_) gssetdev
  1573. +    $(SHP)gssetdev sonyfb $(sonyfb_)
  1574. +
  1575. +gdevsnfb.$(OBJ): gdevsnfb.c $(PDEVH)
  1576. +
  1577. +### -------------------- Sony NWP533 printer device -------------------- ###
  1578. +### Note: this driver was contributed by a user: please contact Tero     ###
  1579. +###       Kivinen (kivinen@joker.cs.hut.fi) if you have questions.       ###
  1580. +
  1581. +nwp533_=gdevn533.$(OBJ) gdevprn.$(OBJ)
  1582. +nwp533.dev: $(nwp533_) gssetdev
  1583. +    $(SHP)gssetdev nwp533 $(nwp533_)
  1584. +
  1585. +gdevn533.$(OBJ): gdevn533.c $(PDEVH)
  1586. +
  1587. +### ------------------------- The SPARCprinter ------------------------- ###
  1588. +### Note: this driver was contributed by users: please contact Martin    ###
  1589. +###       Schulte (schulte@thp.uni-koeln.de) if you have questions.      ###
  1590. +###       He would also like to hear from anyone using the driver.       ###
  1591. +### Please consult the source code for additional documentation.         ###
  1592. +
  1593. +sparc_=gdevsppr.$(OBJ) gdevprn.$(OBJ)
  1594. +sparc.dev: $(sparc_) gssetdev
  1595. +    $(SHP)gssetdev sparc $(sparc_)
  1596. +
  1597. +gdevsppr.$(OBJ): gdevsppr.c $(PDEVH)
  1598. +
  1599. +###### --------------------- The SunView device --------------------- ######
  1600. +### Note: this driver is maintained by a user: if you have questions,    ###
  1601. +###       please contact Andreas Stolcke (stolcke@icsi.berkeley.edu).    ###
  1602. +
  1603. +sunview_=gdevsun.$(OBJ)
  1604. +sunview.dev: $(sunview_) gssetdev gsaddmod
  1605. +    $(SHP)gssetdev sunview $(sunview_)
  1606. +    $(SHP)gsaddmod sunview -lib suntool sunwindow pixrect
  1607. +
  1608. +gdevsun.$(OBJ): gdevsun.c $(GDEV) $(arch_h)
  1609. +
  1610. +### ----------------- Tektronix 4396d color printer -------------------- ###
  1611. +### Note: this driver was contributed by a user: please contact          ###
  1612. +###       Karl Hakimian (hakimian@haney.eecs.wsu.edu)                    ###
  1613. +###       if you have questions.                                         ###
  1614. +
  1615. +t4693d_=gdev4693.$(OBJ) gdevprn.$(OBJ)
  1616. +t4693d2.dev: $(t4693d_) gssetdev
  1617. +    $(SHP)gssetdev t4693d2 $(t4693d_)
  1618. +
  1619. +t4693d4.dev: $(t4693d_) gssetdev
  1620. +    $(SHP)gssetdev t4693d4 $(t4693d_)
  1621. +
  1622. +t4693d8.dev: $(t4693d_) gssetdev
  1623. +    $(SHP)gssetdev t4693d8 $(t4693d_)
  1624. +
  1625. +gdev4693.$(OBJ): gdev4693.c $(GDEV)
  1626. +
  1627. +### -------------------- Tektronix ink-jet printers -------------------- ###
  1628. +### Note: this driver was contributed by a user: please contact          ###
  1629. +###       Karsten Spang (spang@nbivax.nbi.dk) if you have questions.     ###
  1630. +
  1631. +tek4696_=gdevtknk.$(OBJ) gdevprn.$(OBJ)
  1632. +tek4696.dev: $(tek4696_) gssetdev
  1633. +    $(SHP)gssetdev tek4696 $(tek4696_)
  1634. +
  1635. +gdevtknk.$(OBJ): gdevtknk.c $(PDEVH)
  1636. +
  1637. +### ----------------- The TruFax facsimile device ---------------------- ###
  1638. +### Note: this driver was contributed by users: please contact           ###
  1639. +###       Neil Ostroff (nao@maestro.bellcore.com) if you have questions. ###
  1640. +### Note that the driver requires a file encode_l.o supplied by the      ###
  1641. +###   makers of the TruFax product.                                      ###
  1642. +
  1643. +trufax_=gdevtrfx.$(OBJ) gdevprn.$(OBJ) encode_l.$(OBJ)
  1644. +trufax.dev: $(trufax_) gssetdev
  1645. +    $(SHP)gssetdev trufax $(trufax_)
  1646. +
  1647. +gdevtrfx.$(OBJ): gdevtrfx.c $(GDEV)
  1648. +
  1649. +###### ----------------------- The X11 device ----------------------- ######
  1650. +
  1651. +# Aladdin Enterprises does not support Ghostview.  For more information
  1652. +# about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu).
  1653. +
  1654. +x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ)
  1655. +x11.dev: $(x11_) gssetdev gsaddmod
  1656. +    $(SHP)gssetdev x11 $(x11_)
  1657. +    $(SHP)gsaddmod x11 -lib Xt X11 Xext
  1658. +
  1659. +# See the main makefile for the definition of XINCLUDE.
  1660. +GDEVX=$(GDEV) x_.h gdevx.h $(MAKEFILE)
  1661. +gdevx.$(OBJ): gdevx.c $(GDEVX) $(gsprops_h) $(gsutil_h)
  1662. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(XINCLUDE) $(srcdir)/gdevx.c
  1663. +
  1664. +gdevxini.$(OBJ): gdevxini.c $(GDEVX) $(ctype__h)
  1665. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(XINCLUDE) $(srcdir)/gdevxini.c
  1666. +
  1667. +gdevxxf.$(OBJ): gdevxxf.c $(GDEVX) $(gsutil_h) $(gxxfont_h)
  1668. +    $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(XINCLUDE) $(srcdir)/gdevxxf.c
  1669. +
  1670. +### ---------------------- The bit bucket device ----------------------- ###
  1671. +
  1672. +bit_=gdevbit.$(OBJ) gdevprn.$(OBJ)
  1673. +bit.dev: $(bit_) gssetdev
  1674. +    $(SHP)gssetdev bit $(bit_)
  1675. +
  1676. +gdevbit.$(OBJ): gdevbit.c $(PDEVH)
  1677. +
  1678. +###### ----------------------- PC file formats ---------------------- ######
  1679. +
  1680. +gdevpccm.$(OBJ): gdevpccm.c $(AK) \
  1681. +  $(gs_h) $(gsmatrix_h) $(gxdevice_h) $(gdevpccm_h)
  1682. +
  1683. +### ------------------------- .BMP file formats ------------------------- ###
  1684. +
  1685. +bmp_=gdevbmp.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
  1686. +
  1687. +gdevbmp.$(OBJ): gdevbmp.c $(PDEVH) $(gdevpccm_h)
  1688. +
  1689. +bmpmono.dev: $(bmp_) gssetdev
  1690. +    $(SHP)gssetdev bmpmono $(bmp_)
  1691. +
  1692. +bmp16.dev: $(bmp_) gssetdev
  1693. +    $(SHP)gssetdev bmp16 $(bmp_)
  1694. +
  1695. +bmp256.dev: $(bmp_) gssetdev
  1696. +    $(SHP)gssetdev bmp256 $(bmp_)
  1697. +
  1698. +bmp16m.dev: $(bmp_) gssetdev
  1699. +    $(SHP)gssetdev bmp16m $(bmp_)
  1700. +
  1701. +### ------------------------- GIF file formats ------------------------- ###
  1702. +
  1703. +GIF=gdevgif.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
  1704. +
  1705. +gdevgif.$(OBJ): gdevgif.c $(PDEVH) $(gdevpccm_h)
  1706. +
  1707. +gifmono.dev: $(GIF) gssetdev
  1708. +    $(SHP)gssetdev gifmono $(GIF)
  1709. +
  1710. +gif8.dev: $(GIF) gssetdev
  1711. +    $(SHP)gssetdev gif8 $(GIF)
  1712. +
  1713. +### ------------------------- PCX file formats ------------------------- ###
  1714. +
  1715. +pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
  1716. +
  1717. +gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) $(gxlum_h)
  1718. +
  1719. +pcxmono.dev: $(pcx_) gssetdev
  1720. +    $(SHP)gssetdev pcxmono $(pcx_)
  1721. +
  1722. +pcxgray.dev: $(pcx_) gssetdev
  1723. +    $(SHP)gssetdev pcxgray $(pcx_)
  1724. +
  1725. +pcx16.dev: $(pcx_) gssetdev
  1726. +    $(SHP)gssetdev pcx16 $(pcx_)
  1727. +
  1728. +pcx256.dev: $(pcx_) gssetdev
  1729. +    $(SHP)gssetdev pcx256 $(pcx_)
  1730. +
  1731. +###### ------------------- Portable Bitmap devices ------------------ ######
  1732. +### For more information, see the pbm(5), pgm(5), and ppm(5) man pages.  ###
  1733. +
  1734. +pxm_=gdevpbm.$(OBJ) gdevprn.$(OBJ)
  1735. +
  1736. +gdevpbm.$(OBJ): gdevpbm.c $(PDEVH) $(gxlum_h)
  1737. +
  1738. +### Portable Bitmap (PBM, plain or raw format, magic numbers "P1" or "P4")
  1739. +
  1740. +pbm.dev: $(pxm_) gssetdev
  1741. +    $(SHP)gssetdev pbm $(pxm_)
  1742. +
  1743. +pbmraw.dev: $(pxm_) gssetdev
  1744. +    $(SHP)gssetdev pbmraw $(pxm_)
  1745. +
  1746. +### Portable Graymap (PGM, plain or raw format, magic numbers "P2" or "P5")
  1747. +
  1748. +pgm.dev: $(pxm_) gssetdev
  1749. +    $(SHP)gssetdev pgm $(pxm_)
  1750. +
  1751. +pgmraw.dev: $(pxm_) gssetdev
  1752. +    $(SHP)gssetdev pgmraw $(pxm_)
  1753. +
  1754. +### Portable Pixmap (PPM, plain or raw format, magic numbers "P3" or "P6")
  1755. +
  1756. +ppm.dev: $(pxm_) gssetdev
  1757. +    $(SHP)gssetdev ppm $(pxm_)
  1758. +
  1759. +ppmraw.dev: $(pxm_) gssetdev
  1760. +    $(SHP)gssetdev ppmraw $(pxm_)
  1761. +
  1762. +### -------------------------- TIFF/F device ---------------------------- ###
  1763. +###    This driver outputs images in a TIFF format               ###
  1764. +###    Use -sDEVICE=tiffg3 and                          ###
  1765. +###      -r204x98 for low resolution output, or              ###
  1766. +###      -r204x196 for high resolution output                  ###
  1767. +###    Note also that 3 page sizes are understood: letter, A4, and B4      ###
  1768. +### Note: this driver was contributed by a user: please contact           ###
  1769. +###       Sam Leffler (sam@sgi.com) if you have questions.              ###
  1770. +
  1771. +tiffg3_=gdevtiff.$(OBJ) gdevprn.$(OBJ)
  1772. +tiffg3.dev: $(tiffg3_) gssetdev
  1773. +    $(SHP)gssetdev tiffg3 $(tiffg3_)
  1774. +gdevtiff.$(OBJ): gdevtiff.c $(GDEV) $(gdevprn_h) gdevdfg3.h gdevtiff.h
  1775. +#    Copyright (C) 1990, 1992, 1993 Aladdin Enterprises.  All rights reserved.
  1776. +#
  1777. +# This file is part of Ghostscript.
  1778. +#
  1779. +# Ghostscript is distributed in the hope that it will be useful, but
  1780. +# WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  1781. +# to anyone for the consequences of using it or for whether it serves any
  1782. +# particular purpose or works at all, unless he says so in writing.  Refer
  1783. +# to the Ghostscript General Public License for full details.
  1784. +#
  1785. +# Everyone is granted permission to copy, modify and redistribute
  1786. +# Ghostscript, but only under the conditions described in the Ghostscript
  1787. +# General Public License.  A copy of this license is supposed to have been
  1788. +# given to you along with Ghostscript so you can know your rights and
  1789. +# responsibilities.  It should be in a file named COPYING.  Among other
  1790. +# things, the copyright notice and this notice must be preserved on all
  1791. +# copies.
  1792. +
  1793. +# Partial makefile for Ghostscript, common to all Unix configurations.
  1794. +
  1795. +# This is the last part of the makefile for Unix configurations.
  1796. +# Since Unix make doesn't have an 'include' facility, we concatenate
  1797. +# the various parts of the makefile together by brute force (in tar_cat).
  1798. +
  1799. +# The following prevents GNU make from constructing argument lists that
  1800. +# include all environment variables, which can easily be longer than
  1801. +# brain-damaged system V allows.
  1802. +
  1803. +.NOEXPORT:
  1804. +
  1805. +# -------------------------------- Library -------------------------------- #
  1806. +
  1807. +## The Commodore Amiga
  1808. +
  1809. +amiga__=gp_nofb.$(OBJ) gp_amiga.$(OBJ) gdevpipe.$(OBJ)
  1810. +amiga_.dev: $(amiga__) gssetmod gsaddmod
  1811. +    $(SHP)gssetmod amiga_ $(amiga__)
  1812. +    $(SHP)gsaddmod amiga_ -fdev pipe
  1813. +
  1814. +gp_amiga.$(OBJ): gp_amiga.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
  1815. +
  1816. +## The Unix platforms
  1817. +
  1818. +# We have to include a test for the existence of sys/time.h,
  1819. +# because some System V platforms don't have it.
  1820. +
  1821. +# All reasonable Unix platforms.
  1822. +unix__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gdevpipe.$(OBJ)
  1823. +unix_.dev: $(unix__) gssetmod gsaddmod
  1824. +    $(SHP)gssetmod unix_ $(unix__)
  1825. +    $(SHP)gsaddmod unix_ -fdev pipe
  1826. +
  1827. +gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
  1828. + $(gsutil_h) $(stat__h) $(time__h)
  1829. +    if ( test -f /ade/include/sys/time.h ) then $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gp_unix.c;\
  1830. +    else $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DNOSYSTIME $(srcdir)/gp_unix.c; fi
  1831. +
  1832. +gdevpipe.$(OBJ): gdevpipe.c $(AK) $(stdio__h) $(gstypes_h) \
  1833. +  $(filedev_h) $(stream_h)
  1834. +
  1835. +# Brain-damaged System V platforms.
  1836. +sysv__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gp_sysv.$(OBJ)
  1837. +sysv_.dev: $(sysv__) gssetmod
  1838. +    $(SHP)gssetmod sysv_ $(sysv__)
  1839. +
  1840. +gp_sysv.$(OBJ): gp_sysv.c $(time__h) $(AK)
  1841. +    if ( test -f /ade/include/sys/time.h ) then $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) $(srcdir)/gp_sysv.c;\
  1842. +    else $(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) -DNOSYSTIME $(srcdir)/gp_sysv.c; fi
  1843. +
  1844. +# -------------------------- Auxiliary programs --------------------------- #
  1845. +
  1846. +ansi2knr$(XE): ansi2knr.c $(stdio__h) $(string__h) $(malloc__h)
  1847. +    $(CC) -o ansi2knr$(XE) $(CFLAGS) $(srcdir)/ansi2knr.c
  1848. +
  1849. +echogs$(XE): echogs.c
  1850. +    $(CC) -o echogs$(XE) $(CFLAGS) $(srcdir)/echogs.c
  1851. +
  1852. +# On the RS/6000 (at least), compiling genarch.c with gcc with -O
  1853. +# produces a buggy executable.
  1854. +genarch$(XE): genarch.c
  1855. +    $(CC) -o genarch$(XE) $(srcdir)/genarch.c
  1856. +
  1857. +genconf$(XE): genconf.c
  1858. +    $(CC) -o genconf$(XE) $(srcdir)/genconf.c
  1859. +
  1860. +# ----------------------------- Main program ------------------------------ #
  1861. +
  1862. +BEGINFILES=
  1863. +CCBEGIN=$(CC) -c -I. -I$(srcdir) $(DEFS) $(CFLAGS) *.c
  1864. +
  1865. +# Interpreter main program
  1866. +
  1867. +GSAMIGA=gs.$(OBJ) gsmain.$(OBJ) $(INT) $(LIBGS)
  1868. +
  1869. +# The second call on echogs writes a \.  This is the only
  1870. +# way to do it that works with all flavors of shell!
  1871. +$(GS)$(XE): $(GSAMIGA) ld.tr echogs $(ALL_DEVS)
  1872. +    echogs -n - $(CC) $(LDFLAGS) $(XLIBDIRS) -o gs $(GSAMIGA) >_temp_
  1873. +    echogs -x 205c >>_temp_
  1874. +    cat ld.tr >>_temp_
  1875. +    echogs - $(EXTRALIBS) -lm >>_temp_
  1876. +    $(SH) <_temp_
  1877. +
  1878. +# Installation
  1879. +
  1880. +TAGS:
  1881. +    etags -t *.c *.h
  1882. +
  1883. +docdir=$(gsdatadir)/doc
  1884. +exdir=$(gsdatadir)/examples
  1885. +
  1886. +install: $(GS)
  1887. +    if [ -d $(bindir) ]; then true; else mkdir $(bindir); fi
  1888. +    if [ -d $(libdir) ]; then true; else mkdir $(libdir); fi
  1889. +    if [ -d $(gsdatadir) ]; then true; else mkdir $(gsdatadir); fi
  1890. +    if [ -d $(gsdatadir)/fonts ]; then true; else mkdir $(gsdatadir)/fonts; fi
  1891. +    if [ -d $(docdir) ]; then true; else mkdir $(docdir); fi
  1892. +    if [ -d $(exdir) ]; then true; else mkdir $(exdir); fi
  1893. +    for f in $(GS) ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done
  1894. +    for f in gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $(srcdir)/$$f $(bindir)/$$f ; done
  1895. +    for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_dbt_e.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $(srcdir)/$$f $(gsdatadir)/$$f ; done
  1896. +    for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $(srcdir)/$$f $(docdir)/$$f ; done
  1897. +    for f in chess.ps cheq.ps colorcir.ps golfer.ps escher.ps snowflak.ps tiger.ps ; do $(INSTALL_DATA) $(srcdir)/$$f $(exdir)/$$f ; done
  1898. +
  1899. +Makefile:    config.status $(srcdir)/Makefile.in
  1900. +        $(SHELL) config.status
  1901. diff -rup --new-file baseline/fsf/ghostscript/NEWS amiga/fsf/ghostscript/NEWS
  1902. --- baseline/fsf/ghostscript/NEWS    Wed Apr 19 16:35:44 1995
  1903. +++ amiga/fsf/ghostscript/NEWS    Sat Sep 28 00:00:00 1996
  1904. @@ -1211,7 +1211,7 @@ recognized) for setting the output file 
  1905.  
  1906.  For Unix systems, changes the directories in GS_LIB_DEFAULT from
  1907.  `pwd` to $(gsdatadir), i.e., normally $(datadir)/ghostscript, where
  1908. -datadir is normally /usr/local/lib.
  1909. +datadir is normally /ade/lib.
  1910.  
  1911.  Adds a note in the header file to the effect that the X Windows
  1912.  driver expects to find header files in $(XINCLUDE)/X11, not in
  1913. diff -rup --new-file baseline/fsf/ghostscript/Product-Info amiga/fsf/ghostscript/Product-Info
  1914. --- baseline/fsf/ghostscript/Product-Info    Wed Dec 31 17:00:00 1969
  1915. +++ amiga/fsf/ghostscript/Product-Info    Sat Sep 28 00:00:00 1996
  1916. @@ -0,0 +1,26 @@
  1917. +.name
  1918. +ghostscript
  1919. +.fullname
  1920. +Ghostscript language interpreter and library
  1921. +.type
  1922. +Miscellaneous
  1923. +.short
  1924. +GNU postscript interpreter
  1925. +.description
  1926. +Ghostscript is the name of a set of software that provides an
  1927. +interpreter for the PostScript (TM) language, and a set of C
  1928. +procedures (the Ghostscript library) that implement the graphics
  1929. +capabilities that appear as primitive operations in the PostScript
  1930. +language.
  1931. +.version
  1932. +2.6.2
  1933. +.author
  1934. +L. Peter Deutsch
  1935. +.requirements
  1936. +Amiga binaries require ixemul.library.
  1937. +.distribution
  1938. +Ghostscript General Public License
  1939. +.email
  1940. +ghost@aladdin.com
  1941. +.described-by
  1942. +Fred Fish (fnf@amigalib.com)
  1943. diff -rup --new-file baseline/fsf/ghostscript/amiga-gcc.mak amiga/fsf/ghostscript/amiga-gcc.mak
  1944. --- baseline/fsf/ghostscript/amiga-gcc.mak    Wed Dec 31 17:00:00 1969
  1945. +++ amiga/fsf/ghostscript/amiga-gcc.mak    Sat Sep 28 00:00:00 1996
  1946. @@ -0,0 +1,2010 @@
  1947. +#    Copyright (C) 1989, 1992, 1993 Aladdin Enterprises.  All rights reserved.
  1948. +#
  1949. +# This file is part of Ghostscript.
  1950. +#
  1951. +# Ghostscript is distributed in the hope that it will be useful, but
  1952. +# WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  1953. +# to anyone for the consequences of using it or for whether it serves any
  1954. +# particular purpose or works at all, unless he says so in writing.  Refer
  1955. +# to the Ghostscript General Public License for full details.
  1956. +#
  1957. +# Everyone is granted permission to copy, modify and redistribute
  1958. +# Ghostscript, but only under the conditions described in the Ghostscript
  1959. +# General Public License.  A copy of this license is supposed to have been
  1960. +# given to you along with Ghostscript so you can know your rights and
  1961. +# responsibilities.  It should be in a file named COPYING.  Among other
  1962. +# things, the copyright notice and this notice must be preserved on all
  1963. +# copies.
  1964. +
  1965. +# makefile for Ghostscript, Unix/gcc/X11 configuration.
  1966. +# Note: this makefile assumes you are using gcc in ANSI mode.
  1967. +
  1968. +# ------------------------------- Options ------------------------------- #
  1969. +
  1970. +####### The following are the only parts of the file you should need to edit.
  1971. +
  1972. +# ------ Generic options ------ #
  1973. +
  1974. +# Define the installation commands and target directories for
  1975. +# executables and files.  Only relevant to `make install'.
  1976. +
  1977. +INSTALL = install -c
  1978. +INSTALL_PROGRAM = $(INSTALL) -m 775
  1979. +INSTALL_DATA = $(INSTALL) -m 664
  1980. +
  1981. +prefix = /ade
  1982. +exec_prefix = $(prefix)
  1983. +bindir = $(exec_prefix)/bin
  1984. +datadir = $(prefix)/lib
  1985. +gsdatadir = $(datadir)/ghostscript
  1986. +
  1987. +# Define the default directory/ies for the runtime
  1988. +# initialization and font files.  Separate multiple directories with a ','.
  1989. +
  1990. +GS_LIB_DEFAULT=$(gsdatadir),$(gsdatadir)/fonts
  1991. +
  1992. +# Define the name of the Ghostscript initialization file.
  1993. +# (There is no reason to change this.)
  1994. +
  1995. +GS_INIT=gs_init.ps
  1996. +
  1997. +# Choose generic configuration options.
  1998. +
  1999. +# -DDEBUG
  2000. +#    includes debugging features (-Z switch) in the code.
  2001. +#      Code runs substantially slower even if no debugging switches
  2002. +#      are set.
  2003. +# -DNOPRIVATE
  2004. +#    makes private (static) procedures and variables public,
  2005. +#      so they are visible to the debugger and profiler.
  2006. +#      No execution time or space penalty.
  2007. +
  2008. +GENOPT=
  2009. +
  2010. +# Define the name of the executable file.
  2011. +
  2012. +GS=gs
  2013. +
  2014. +# ------ Platform-specific options ------ #
  2015. +
  2016. +# Define the name of the C compiler.
  2017. +
  2018. +CC=gcc
  2019. +
  2020. +# Define the other compilation flags.
  2021. +# Add -DBSD4_2 for 4.2bsd systems.
  2022. +# Add -DUSG (GNU convention) or -DSYSV for System V or DG/UX.
  2023. +# Add -DSYSV -D__SVR3 for SCO ODT, ISC Unix 2.2 or before,
  2024. +#   or any System III Unix, or System V release 3-or-older Unix.
  2025. +# Add -DSVR4 (not -DSYSV) for System V release 4.
  2026. +# XCFLAGS can be set from the command line.
  2027. +# We don't include -ansi, because this gets in the way of the platform-
  2028. +#   specific stuff that <math.h> typically needs; nevertheless, we expect
  2029. +#   gcc to accept ANSI-style function prototypes and function definitions.
  2030. +
  2031. +#FPU_FLAG =-Dm68881
  2032. +#CPU_FLAG =-Dm68030
  2033. +XCFLAGS = -O6 $(FPU_FLAG) $(CPU_FLAG)
  2034. +CFLAGS=-DUSG $(XCFLAGS)
  2035. +
  2036. +# Define platform flags for ld.
  2037. +# SunOS and some others want -X; Ultrix wants -x.
  2038. +# SunOS 4.n may need -Bstatic.
  2039. +# XLDFLAGS can be set from the command line.
  2040. +
  2041. +LDFLAGS=$(XLDFLAGS)
  2042. +
  2043. +# Define any extra libraries to link into the executable.
  2044. +# ISC Unix 2.2 wants -linet.
  2045. +# SCO Unix needs -lsocket if you aren't including the X11 driver.
  2046. +# (Libraries required by individual drivers are handled automatically.)
  2047. +
  2048. +EXTRALIBS=
  2049. +
  2050. +# Define the include switch(es) for the X11 header files.
  2051. +# This can be null if handled in some other way (e.g., the files are
  2052. +# in /ade/include, or the directory is supplied by an environment variable).
  2053. +# Note that x_.h expects to find the header files in $(XINCLUDE)/X11,
  2054. +# not in $(XINCLUDE).
  2055. +
  2056. +#XINCLUDE=-I/ade/X/include
  2057. +
  2058. +# Define the directory/ies for the X11 library files.
  2059. +# This can be null if these files are in the default linker search path.
  2060. +
  2061. +#XLIBDIRS=-L/ade/X/lib
  2062. +
  2063. +# ------ Devices and features ------ #
  2064. +
  2065. +# Choose the language feature(s) to include.  See gs.mak for details.
  2066. +
  2067. +FEATURE_DEVS=filter.dev dps.dev level2.dev
  2068. +
  2069. +# Choose the device(s) to include.  See devs.mak for details.
  2070. +
  2071. +DEVICE_DEVS=amiga_.dev amiga.dev amiga_low.dev amiga_high.dev amiga_super.dev
  2072. +DEVICE_DEVS1=amiga_a2024.dev amiga_picassoii.dev amiga_printer.dev
  2073. +DEVICE_DEVS2=amiga_ilbm.dev amiga_custom.dev
  2074. +
  2075. +# ---------------------------- End of options --------------------------- #
  2076. +
  2077. +# Define the name of the makefile -- used in dependencies.
  2078. +
  2079. +MAKEFILE=amiga-gcc.mak
  2080. +
  2081. +# Define the ANSI-to-K&R dependency.  (gcc accepts ANSI syntax.)
  2082. +
  2083. +AK=
  2084. +
  2085. +# Define the compilation rules and flags.
  2086. +
  2087. +CCC=$(CC) $(CCFLAGS) -c
  2088. +
  2089. +# --------------------------- Generic makefile ---------------------------- #
  2090. +
  2091. +# The remainder of the makefile (unixhead.mak, gs.mak, devs.mak, unixtail.mak)
  2092. +# is generic.  tar_cat concatenates all these together.
  2093. +#    Copyright (C) 1990, 1991, 1993 Aladdin Enterprises.  All rights reserved.
  2094. +#
  2095. +# This file is part of Ghostscript.
  2096. +#
  2097. +# Ghostscript is distributed in the hope that it will be useful, but
  2098. +# WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  2099. +# to anyone for the consequences of using it or for whether it serves any
  2100. +# particular purpose or works at all, unless he says so in writing.  Refer
  2101. +# to the Ghostscript General Public License for full details.
  2102. +#
  2103. +# Everyone is granted permission to copy, modify and redistribute
  2104. +# Ghostscript, but only under the conditions described in the Ghostscript
  2105. +# General Public License.  A copy of this license is supposed to have been
  2106. +# given to you along with Ghostscript so you can know your rights and
  2107. +# responsibilities.  It should be in a file named COPYING.  Among other
  2108. +# things, the copyright notice and this notice must be preserved on all
  2109. +# copies.
  2110. +
  2111. +# Partial makefile for Ghostscript, common to all Unix configurations.
  2112. +
  2113. +# This part of the makefile gets inserted after the compiler-specific part
  2114. +# (xxx-head.mak) and before gs.mak and devs.mak.
  2115. +
  2116. +# ----------------------------- Generic stuff ----------------------------- #
  2117. +
  2118. +# Define the platform name.  For a "stock" System V platform,
  2119. +# use sysv_ instead of unix_.
  2120. +
  2121. +PLATFORM=amiga
  2122. +
  2123. +# Define the extensions for the object and executable files.
  2124. +
  2125. +OBJ=o
  2126. +XE=
  2127. +
  2128. +# Define the current directory prefix, shell quote string, and shell names.
  2129. +
  2130. +EXP=
  2131. +QQ=\"
  2132. +SHELL=/bin/sh
  2133. +SH=$(SHELL)
  2134. +SHP=$(SH) $(EXP)
  2135. +
  2136. +# Define the compilation rules and flags.
  2137. +
  2138. +CCFLAGS=$(GENOPT) $(CFLAGS)
  2139. +
  2140. +.c.o: $(AK)
  2141. +    $(CCC) $*.c
  2142. +
  2143. +CCCF=$(CCC)
  2144. +CCD=$(CCC)
  2145. +CCINT=$(CCC)
  2146. +#    Copyright (C) 1989, 1992, 1993 Aladdin Enterprises.  All rights reserved.
  2147. +#
  2148. +# This file is part of Ghostscript.
  2149. +#
  2150. +# Ghostscript is distributed in the hope that it will be useful, but
  2151. +# WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  2152. +# to anyone for the consequences of using it or for whether it serves any
  2153. +# particular purpose or works at all, unless he says so in writing.  Refer
  2154. +# to the Ghostscript General Public License for full details.
  2155. +#
  2156. +# Everyone is granted permission to copy, modify and redistribute
  2157. +# Ghostscript, but only under the conditions described in the Ghostscript
  2158. +# General Public License.  A copy of this license is supposed to have been
  2159. +# given to you along with Ghostscript so you can know your rights and
  2160. +# responsibilities.  It should be in a file named COPYING.  Among other
  2161. +# things, the copyright notice and this notice must be preserved on all
  2162. +# copies.
  2163. +
  2164. +# Generic makefile for Ghostscript.
  2165. +# The platform-specific makefiles `include' this file.
  2166. +# They define the following symbols:
  2167. +#    GS - the name of the executable (without the extension, if any).
  2168. +#    GS_LIB_DEFAULT - the default directory/ies for searching for the
  2169. +#        initialization and font files at run time.
  2170. +#    DEVICE_DEVS - the devices to include in the executable.
  2171. +#        See devs.mak for details.
  2172. +#    DEVICE_DEVS1...DEVICE_DEVS9 - additional devices, if the definition of
  2173. +#        DEVICE_DEVS doesn't fit on one line.
  2174. +#        See devs.mak for details.
  2175. +#    FEATURE_DEVS - the optional features to include in the
  2176. +#        executable.  Current features are:
  2177. +#            dps - (partial) support for Display PostScript extensions:
  2178. +#            see language.doc for details.
  2179. +#            level2 - (partial) support for PostScript Level 2
  2180. +#            extensions: see language.doc for details.
  2181. +#            compfont - support for composite (type 0) fonts.
  2182. +#            *** NOT IMPLEMENTED YET. ***
  2183. +#            filter - support for Level 2 filters (other than eexec,
  2184. +#            ASCIIHexEncode/Decode, NullEncode, PFBDecode,
  2185. +#            and SubFileDecode, which are always included).
  2186. +#            ccfonts - precompile fonts into C, and link them
  2187. +#            with the executable.  In the standard makefiles,
  2188. +#            this is only implemented for a very few fonts:
  2189. +#            see fonts.doc for details.
  2190. +# It is very unlikely that anyone would want to edit the remaining
  2191. +#   symbols, but we describe them here for completeness:
  2192. +#    GS_INIT - the name of the initialization file for Ghostscript,
  2193. +#        normally gs_init.ps.
  2194. +#    PLATFORM - a "device" name for the platform, so that platforms can
  2195. +#        add various kinds of resources like devices and features.
  2196. +#    QQ - a " preceded by whatever escape characters are needed to
  2197. +#        persuade the shell to pass a " to a program (" on MS-DOS,
  2198. +#        \" on Unix).
  2199. +#    XE - the extension for executable files (e.g., null or .exe).
  2200. +#    OBJ - the extension for relocatable object files (e.g., o or obj).
  2201. +#    BEGINFILES - the list of files that `make begin' should delete.
  2202. +#    CCBEGIN - the compilation command for `make begin', normally
  2203. +#        $(CCC) *.c.
  2204. +#    CCC - the C invocation for normal compilation.
  2205. +#    CCD - the C invocation for files that store into frame buffers or
  2206. +#        device registers.  Needed because some optimizing compilers
  2207. +#        will eliminate necessary stores.
  2208. +#    CCCF - the C invocation for compiled fonts and other large,
  2209. +#        self-contained data modules.  Needed because MS-DOS
  2210. +#        requires using the 'huge' memory model for these.
  2211. +#    CCINT - the C invocation for compiling the main interpreter module,
  2212. +#        normally the same as CCC: this is needed because the
  2213. +#        Borland compiler generates *worse* code for this module
  2214. +#        (but only this module) when optimization (-O) is turned on.
  2215. +#    AK - if source files must be converted from ANSI to K&R syntax,
  2216. +#        this is ansi2knr$(XE); if not, it is null.
  2217. +#        If a particular platform requires other utility programs
  2218. +#        to be built, AK must include them too.
  2219. +#    SHP - the prefix for invoking a shell script in the current directory
  2220. +#        (null for MS-DOS, $(SH) ./ for Unix).
  2221. +#    EXPP, EXP - the prefix for invoking an executable program in the
  2222. +#        current directory (null for MS-DOS, ./ for Unix).
  2223. +#    SH - the shell for scripts (null on MS-DOS, sh on Unix).
  2224. +# The platform-specific makefiles must also include rules for creating
  2225. +#   ansi2knr$(XE), genarch$(XE), and genconf$(XE) from the corresponding
  2226. +#   .c files -- this is needed because Turbo C and Unix C treat the -o
  2227. +#   switch slightly differently (Turbo C requires no following space,
  2228. +#   Unix C requires a following space), and I haven't found a way to capture
  2229. +#   the difference in a macro.
  2230. +
  2231. +all default: $(GS)$(XE)
  2232. +
  2233. +distclean realclean: clean
  2234. +    rm -f makefile
  2235. +
  2236. +clean mostlyclean:
  2237. +    rm -f *.$(OBJ) *.a core gmon.out
  2238. +    rm -f *.dev *.d_* arch.h gconfig*.h o*.tr l*.tr
  2239. +    rm -f t _temp_* _temp_*.* *.map *.sym
  2240. +    rm -f ansi2knr$(XE) echogs$(XE) genarch$(XE) genconf$(XE)
  2241. +    rm -f $(GS)$(XE) $(BEGINFILES)
  2242. +
  2243. +# A rule to do a quick and dirty compilation attempt when first installing
  2244. +# Ghostscript.  Many of the compilations will fail: follow this with 'make'.
  2245. +
  2246. +begin:
  2247. +    rm -f arch.h genarch$(XE) $(GS)$(XE) $(BEGINFILES)
  2248. +    make arch.h
  2249. +    - $(CCBEGIN)
  2250. +    rm -f gconfig.$(OBJ) gdev*.$(OBJ) gp_*.$(OBJ) gsmisc.$(OBJ)
  2251. +    rm -f iccfont.$(OBJ) iinit.$(OBJ) interp.$(OBJ) zfiledev.$(OBJ)
  2252. +
  2253. +# Auxiliary programs
  2254. +
  2255. +arch.h: genarch$(XE)
  2256. +    $(EXPP) $(EXP)genarch arch.h
  2257. +
  2258. +# -------------------------------- Library -------------------------------- #
  2259. +
  2260. +# Define the inter-dependencies of the .h files.
  2261. +# Since not all versions of `make' defer expansion of macros,
  2262. +# we must list these in bottom-to-top order.
  2263. +
  2264. +# Generic files
  2265. +
  2266. +arch_h=arch.h
  2267. +std_h=std.h $(arch_h)
  2268. +
  2269. +# Platform interfaces
  2270. +
  2271. +gp_h=gp.h
  2272. +gpcheck_h=gpcheck.h
  2273. +
  2274. +# C library interfaces
  2275. +
  2276. +# Because of variations in the "standard" header files between systems, and
  2277. +# because we must include std.h before any file that includes sys/types.h,
  2278. +# we define local include files named *_.h to substitute for <*.h>.
  2279. +
  2280. +vmsmath_h=vmsmath.h
  2281. +
  2282. +dos__h=dos_.h
  2283. +ctype__h=ctype_.h $(std_h)
  2284. +errno__h=errno_.h
  2285. +malloc__h=malloc_.h $(std_h)
  2286. +math__h=math_.h $(std_h) $(vmsmath_h)
  2287. +memory__h=memory_.h $(std_h)
  2288. +stat__h=stat_.h $(std_h)
  2289. +stdio__h=stdio_.h $(std_h)
  2290. +string__h=string_.h $(std_h)
  2291. +time__h=time_.h $(std_h)
  2292. +windows__h=windows_.h
  2293. +
  2294. +# Miscellaneous
  2295. +
  2296. +gdebug_h=gdebug.h
  2297. +gsio_h=gsio.h
  2298. +gstypes_h=gstypes.h
  2299. +gs_h=gs.h $(stdio__h) $(gsio_h) $(gstypes_h)
  2300. +gx_h=gx.h $(gs_h) $(gdebug_h)
  2301. +gconfig_h=gconfig.h gsconfig.h
  2302. +gserrors_h=gserrors.h
  2303. +
  2304. +GX=$(AK) $(gx_h)
  2305. +GXERR=$(GX) $(gserrors_h)
  2306. +
  2307. +###### Low-level facilities and utilities
  2308. +
  2309. +### Include files
  2310. +
  2311. +gsccode_h=gsccode.h
  2312. +gschar_h=gschar.h $(gsccode_h)
  2313. +gscie_h=gscie.h
  2314. +gscolor_h=gscolor.h
  2315. +gscolor2_h=gscolor2.h
  2316. +gscoord_h=gscoord.h
  2317. +gscrypt1_h=gscrypt1.h
  2318. +gscspace_h=gscspace.h
  2319. +gsfont_h=gsfont.h
  2320. +gsimage_h=gsimage.h
  2321. +gsmatrix_h=gsmatrix.h
  2322. +gspaint_h=gspaint.h
  2323. +gspath_h=gspath.h
  2324. +gsprops_h=gsprops.h
  2325. +gsstate_h=gsstate.h $(gscolor_h)
  2326. +gstype1_h=gstype1.h
  2327. +gsuid_h=gsuid.h
  2328. +gsutil_h=gsutil.h
  2329. +gsxfont_h=gsxfont.h
  2330. +
  2331. +gxarith_h=gxarith.h
  2332. +gxbitmap_h=gxbitmap.h
  2333. +gxcache_h=gxcache.h $(gsuid_h) $(gsxfont_h)
  2334. +gxcdir_h=gxcdir.h
  2335. +gxchar_h=gxchar.h $(gschar_h)
  2336. +gxclist_h=gxclist.h
  2337. +# gxcldev is out of order because it include gxclist.
  2338. +gxcldev_h=gxcldev.h $(gxclist_h)
  2339. +gxcpath_h=gxcpath.h
  2340. +gxdevice_h=gxdevice.h $(gsmatrix_h) $(gsxfont_h) $(gxbitmap_h)
  2341. +gxdevmem_h=gxdevmem.h
  2342. +gxfdir_h=gxfdir.h $(gxcdir_h)
  2343. +gxfixed_h=gxfixed.h
  2344. +gxfont_h=gxfont.h $(gsfont_h) $(gsuid_h)
  2345. +gxfrac_h=gxfrac.h
  2346. +gximage_h=gximage.h $(gscspace_h) $(gsimage_h)
  2347. +gxlum_h=gxlum.h
  2348. +gxmatrix_h=gxmatrix.h $(gsmatrix_h)
  2349. +gxop1_h=gxop1.h
  2350. +gxpath_h=gxpath.h
  2351. +gxrefct_h=gxrefct.h
  2352. +gxtype1_h=gxtype1.h $(gscrypt1_h) $(gstype1_h)
  2353. +gxxfont_h=gxxfont.h $(gsccode_h) $(gsmatrix_h) $(gsuid_h) $(gsxfont_h)
  2354. +# gxcolor and gxfmap are out of order because they include other files.
  2355. +gxcolor_h=gxcolor.h $(gxfrac_h) $(gsuid_h)
  2356. +gxfmap_h=gxfmap.h $(gxfrac_h) $(gxrefct_h)
  2357. +
  2358. +gzcolor_h=gzcolor.h $(gscolor_h) $(gxfmap_h) $(gxlum_h)
  2359. +gzdevice_h=gzdevice.h $(gxdevice_h)
  2360. +gzht_h=gzht.h
  2361. +gzline_h=gzline.h
  2362. +gzpath_h=gzpath.h $(gxpath_h)
  2363. +gzstate_h=gzstate.h $(gsstate_h) $(gxfixed_h) $(gxmatrix_h)
  2364. +
  2365. +### Executable code
  2366. +
  2367. +gp_nofb.$(OBJ): gp_nofb.c $(AK) \
  2368. +  $(gx_h) $(gp_h) $(gxdevice_h)
  2369. +
  2370. +gsutil.$(OBJ): gsutil.c $(AK) \
  2371. +  $(std_h) $(gsprops_h) $(gsutil_h)
  2372. +
  2373. +gxccache.$(OBJ): gxccache.c $(GXERR) $(gpcheck_h) \
  2374. +  $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gzcolor_h) \
  2375. +  $(gxcpath_h) $(gxdevmem_h) $(gxfont_h) $(gxfdir_h) $(gxchar_h) \
  2376. +  $(gxcache_h) $(gxxfont_h) $(gzstate_h) $(gzpath_h) \
  2377. +  $(gscspace_h) $(gsimage_h)
  2378. +
  2379. +gxccman.$(OBJ): gxccman.c $(GXERR) $(gpcheck_h) \
  2380. +  $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gzcolor_h) \
  2381. +  $(gxcpath_h) $(gxdevmem_h) $(gxfont_h) $(gxfdir_h) $(gxchar_h) \
  2382. +  $(gxcache_h) $(gxxfont_h) $(gzstate_h) $(gzpath_h)
  2383. +
  2384. +gxclist.$(OBJ): gxclist.c $(GXERR) $(gpcheck_h) \
  2385. +  $(gsmatrix_h) $(gxbitmap_h) $(gxcldev_h) $(gxdevice_h) $(gxdevmem_h)
  2386. +
  2387. +gxclread.$(OBJ): gxclread.c $(GXERR) $(gpcheck_h) \
  2388. +  $(gsmatrix_h) $(gxbitmap_h) $(gxcldev_h) $(gxdevice_h) $(gxdevmem_h)
  2389. +
  2390. +gxcmap.$(OBJ): gxcmap.c $(GXERR) \
  2391. +  $(gscspace_h) \
  2392. +  $(gxcolor_h) $(gxdevice_h) $(gxfrac_h) $(gxlum_h) \
  2393. +  $(gzcolor_h) $(gzstate_h)
  2394. +
  2395. +gxcpath.$(OBJ): gxcpath.c $(GXERR) \
  2396. +  $(gxdevice_h) $(gxfixed_h) $(gzcolor_h) $(gzpath_h) $(gxcpath_h)
  2397. +
  2398. +gxdither.$(OBJ): gxdither.c $(GX) \
  2399. +  $(gxfixed_h) $(gxlum_h) $(gxmatrix_h) $(gzstate_h) $(gzdevice_h) $(gzcolor_h) $(gzht_h)
  2400. +
  2401. +gxdraw.$(OBJ): gxdraw.c $(GXERR) $(gpcheck_h) \
  2402. +  $(gxfixed_h) $(gxmatrix_h) $(gxbitmap_h) $(gzcolor_h) $(gzdevice_h) $(gzstate_h)
  2403. +
  2404. +gxfill.$(OBJ): gxfill.c $(GXERR) \
  2405. +  $(gxfixed_h) $(gxmatrix_h) $(gxdevice_h) $(gzcolor_h) $(gzpath_h) $(gzstate_h) $(gxcpath_h)
  2406. +
  2407. +gxhint1.$(OBJ): gxhint1.c $(GXERR) \
  2408. +  $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gxdevmem_h) $(gxchar_h) $(gxfont_h) $(gxtype1_h) \
  2409. +  $(gzdevice_h) $(gzstate_h)
  2410. +
  2411. +gxhint2.$(OBJ): gxhint2.c $(GXERR) \
  2412. +  $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gxdevmem_h) $(gxchar_h) $(gxfont_h) $(gxtype1_h) $(gxop1_h) \
  2413. +  $(gzdevice_h) $(gzstate_h)
  2414. +
  2415. +gxht.$(OBJ): gxht.c $(GXERR) \
  2416. +  $(gxfixed_h) $(gxmatrix_h) $(gxbitmap_h) $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h)
  2417. +
  2418. +gxpath.$(OBJ): gxpath.c $(GXERR) \
  2419. +  $(gxfixed_h) $(gzpath_h)
  2420. +
  2421. +gxpath2.$(OBJ): gxpath2.c $(GXERR) \
  2422. +  $(gxfixed_h) $(gxarith_h) $(gzpath_h)
  2423. +
  2424. +gxpcopy.$(OBJ): gxpcopy.c $(GXERR) \
  2425. +  $(gxfixed_h) $(gxarith_h) $(gzpath_h)
  2426. +
  2427. +gxstroke.$(OBJ): gxstroke.c $(GXERR) $(gpcheck_h) \
  2428. +  $(gscoord_h) $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) \
  2429. +  $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzline_h) $(gzpath_h)
  2430. +
  2431. +###### High-level facilities
  2432. +
  2433. +gschar.$(OBJ): gschar.c $(GXERR) \
  2434. +  $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gzdevice_h) $(gxdevmem_h) $(gxfont_h) $(gxchar_h) $(gxcache_h) $(gstype1_h) $(gspath_h) $(gzpath_h) $(gzcolor_h) $(gzstate_h)
  2435. +
  2436. +gscolor.$(OBJ): gscolor.c $(GXERR) \
  2437. +  $(gscspace_h) $(gxcolor_h) $(gxdevice_h) $(gxrefct_h) \
  2438. +  $(gzstate_h) $(gzcolor_h)
  2439. +
  2440. +gscoord.$(OBJ): gscoord.c $(GXERR) \
  2441. +  $(gsccode_h) $(gxarith_h) $(gxfixed_h) $(gxfont_h) $(gxmatrix_h) \
  2442. +  $(gzdevice_h) $(gzstate_h) $(gscoord_h)
  2443. +
  2444. +gsdevice.$(OBJ): gsdevice.c $(GXERR) \
  2445. +  $(gxarith_h) $(gsprops_h) $(gsutil_h) $(gxbitmap_h) $(gxdevmem_h) \
  2446. +  $(gzstate_h) $(gzdevice_h)
  2447. +
  2448. +gsfile.$(OBJ): gsfile.c $(GXERR) \
  2449. +  $(gsmatrix_h) $(gxdevice_h) $(gxdevmem_h)
  2450. +
  2451. +gsfont.$(OBJ): gsfont.c $(GXERR) \
  2452. +  $(gxdevice_h) $(gxfixed_h) $(gxmatrix_h) $(gxfont_h) $(gxfdir_h) \
  2453. +  $(gzstate_h)
  2454. +
  2455. +gsht.$(OBJ): gsht.c $(GXERR) \
  2456. +  $(gzht_h) $(gzstate_h)
  2457. +
  2458. +gsimage.$(OBJ): gsimage.c $(GXERR) $(gpcheck_h) \
  2459. +  $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gspaint_h) \
  2460. +  $(gzcolor_h) $(gzdevice_h) $(gzpath_h) $(gzstate_h) \
  2461. +  $(gxcolor_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
  2462. +
  2463. +gsimage1.$(OBJ): gsimage1.c $(GXERR) $(gpcheck_h) \
  2464. +  $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gscspace_h) $(gspaint_h) \
  2465. +  $(gzcolor_h) $(gzdevice_h) $(gzpath_h) $(gzstate_h) \
  2466. +  $(gxcolor_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
  2467. +
  2468. +gsimage2.$(OBJ): gsimage2.c $(GXERR) $(gpcheck_h) \
  2469. +  $(gxfixed_h) $(gxarith_h) $(gxmatrix_h) $(gscspace_h) $(gspaint_h) \
  2470. +  $(gzcolor_h) $(gzdevice_h) $(gzpath_h) $(gzstate_h) \
  2471. +  $(gxcolor_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
  2472. +
  2473. +gsimpath.$(OBJ): gsimpath.c $(GXERR) \
  2474. +  $(gsmatrix_h) $(gsstate_h) $(gspath_h)
  2475. +
  2476. +gsline.$(OBJ): gsline.c $(GXERR) \
  2477. +  $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gzline_h)
  2478. +
  2479. +gsmatrix.$(OBJ): gsmatrix.c $(GXERR) \
  2480. +  $(gxfixed_h) $(gxarith_h) $(gxmatrix_h)
  2481. +
  2482. +gsmisc.$(OBJ): gsmisc.c $(GX) $(errno__h) $(malloc__h) $(memory__h) $(MAKEFILE)
  2483. +    $(CCC) -DUSE_ASM=0$(USE_ASM) gsmisc.c
  2484. +
  2485. +gspaint.$(OBJ): gspaint.c $(GXERR) $(gpcheck_h) \
  2486. +  $(gxfixed_h) $(gxmatrix_h) $(gspaint_h) $(gzpath_h) $(gzstate_h) $(gzdevice_h) $(gxcpath_h) $(gxdevmem_h) $(gximage_h)
  2487. +
  2488. +gspath.$(OBJ): gspath.c $(GXERR) \
  2489. +  $(gxfixed_h) $(gxmatrix_h) $(gxpath_h) $(gzstate_h)
  2490. +
  2491. +gspath2.$(OBJ): gspath2.c $(GXERR) \
  2492. +  $(gspath_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gzpath_h) $(gzdevice_h)
  2493. +
  2494. +gsstate.$(OBJ): gsstate.c $(GXERR) \
  2495. +  $(gscie_h) $(gscolor2_h) $(gscspace_h) $(gxcolor_h) $(gxrefct_h) \
  2496. +  $(gzstate_h) $(gzcolor_h) $(gzdevice_h) $(gzht_h) $(gzline_h) $(gzpath_h)
  2497. +
  2498. +gstdev.$(OBJ): gstdev.c $(GXERR) \
  2499. +  $(gxbitmap_h) $(gxdevice_h) $(gxfixed_h) $(gxmatrix_h)
  2500. +
  2501. +gstype1.$(OBJ): gstype1.c $(GXERR) \
  2502. +  $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) $(gxchar_h) $(gxdevmem_h) $(gxop1_h) $(gxtype1_h) \
  2503. +  $(gzstate_h) $(gzdevice_h) $(gzpath_h)
  2504. +
  2505. +###### The internal devices
  2506. +
  2507. +gdevmem_h=gdevmem.h
  2508. +
  2509. +gdevemap.$(OBJ): gdevemap.c $(AK) $(std_h)
  2510. +
  2511. +gdevmem1.$(OBJ): gdevmem1.c $(AK) \
  2512. +  $(gx_h) $(gserrors_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h)
  2513. +
  2514. +gdevmem2.$(OBJ): gdevmem2.c $(AK) \
  2515. +  $(gx_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h)
  2516. +
  2517. +gdevmem3.$(OBJ): gdevmem3.c $(AK) \
  2518. +  $(gx_h) $(gxdevice_h) $(gxdevmem_h) $(gdevmem_h)
  2519. +
  2520. +###### Files dependent on the installed devices, features, and platform.
  2521. +# Generating gconfig.h also generates o*.tr and l*.tr.
  2522. +
  2523. +# gconfig.h shouldn't have to depend on ALL_DEVS, but that would
  2524. +# involve rewriting gsconfig to only save the device name, not the
  2525. +# contents of the <device>.D_# files.
  2526. +
  2527. +ALL_DEVS=$(FEATURE_DEVS) $(PLATFORM).dev \
  2528. +  $(DEVICE_DEVS) $(DEVICE_DEVS1) \
  2529. +  $(DEVICE_DEVS2) $(DEVICE_DEVS3) $(DEVICE_DEVS4) $(DEVICE_DEVS5)\
  2530. +  $(DEVICE_DEVS6) $(DEVICE_DEVS7) $(DEVICE_DEVS8) $(DEVICE_DEVS9)
  2531. +
  2532. +gconfig.h obj.tr objw.tr ld.tr lib.tr: \
  2533. +  devs.mak $(MAKEFILE) echogs$(XE) genconf$(XE) $(ALL_DEVS)
  2534. +    $(EXP)echogs -w t.cfg - $(FEATURE_DEVS) $(PLATFORM).dev
  2535. +    $(EXP)echogs -a t.cfg - $(DEVICE_DEVS)
  2536. +    $(EXP)echogs -a t.cfg - $(DEVICE_DEVS1)
  2537. +    $(EXP)echogs -a t.cfg - $(DEVICE_DEVS2)
  2538. +    $(EXP)echogs -a t.cfg - $(DEVICE_DEVS3)
  2539. +    $(EXP)echogs -a t.cfg - $(DEVICE_DEVS4)
  2540. +    $(EXP)echogs -a t.cfg - $(DEVICE_DEVS5)
  2541. +    $(EXP)echogs -a t.cfg - $(DEVICE_DEVS6)
  2542. +    $(EXP)echogs -a t.cfg - $(DEVICE_DEVS7)
  2543. +    $(EXP)echogs -a t.cfg - $(DEVICE_DEVS8)
  2544. +    $(EXP)echogs -a t.cfg - $(DEVICE_DEVS9)
  2545. +    $(EXP)genconf @t.cfg -h gconfig.h -l lib.tr -o obj.tr -u ld.tr -w objw.tr
  2546. +    rm t.cfg
  2547. +    $(EXP)echogs -a gconfig.h -x 23 define GS_LIB_DEFAULT -x 2022 $(GS_LIB_DEFAULT) -x 22
  2548. +    $(EXP)echogs -a gconfig.h -x 23 define GS_INIT -x 2022 $(GS_INIT) -x 22
  2549. +
  2550. +gconfig.$(OBJ): gconfig.c $(AK) $(gconfig_h) $(MAKEFILE)
  2551. +
  2552. +###### On Unix, we pre-link all of the library except the back end.
  2553. +###### On MS-DOS, we have to do the whole thing at once.
  2554. +
  2555. +LIBGS=gschar.$(OBJ) gscolor.$(OBJ) gscoord.$(OBJ) \
  2556. + gsdevice.$(OBJ) gsfile.$(OBJ) gsfont.$(OBJ) gsht.$(OBJ) \
  2557. + gsimage.$(OBJ) gsimage1.$(OBJ) gsimage2.$(OBJ) \
  2558. + gsimpath.$(OBJ) gsline.$(OBJ) gsmatrix.$(OBJ) gsmisc.$(OBJ) \
  2559. + gspaint.$(OBJ) gspath.$(OBJ) gspath2.$(OBJ) \
  2560. + gsstate.$(OBJ) gstdev.$(OBJ) gstype1.$(OBJ) gsutil.$(OBJ) \
  2561. + gxccache.$(OBJ) gxccman.$(OBJ) gxclist.$(OBJ) gxclread.$(OBJ) \
  2562. + gxcmap.$(OBJ) gxcpath.$(OBJ) \
  2563. + gxdither.$(OBJ) gxdraw.$(OBJ) gxfill.$(OBJ) \
  2564. + gxhint1.$(OBJ) gxhint2.$(OBJ) gxht.$(OBJ) \
  2565. + gxpath.$(OBJ) gxpath2.$(OBJ) gxpcopy.$(OBJ) gxstroke.$(OBJ) \
  2566. + gdevmem1.$(OBJ) gdevmem2.$(OBJ) gdevmem3.$(OBJ) gconfig.$(OBJ)
  2567. +
  2568. +# ------------------------------ Interpreter ------------------------------ #
  2569. +
  2570. +###### Include files
  2571. +
  2572. +alloc_h=alloc.h
  2573. +astate_h=astate.h
  2574. +ccfont_h=ccfont.h
  2575. +dict_h=dict.h
  2576. +dparam_h=dparam.h
  2577. +dstack_h=dstack.h
  2578. +errors_h=errors.h
  2579. +estack_h=estack.h
  2580. +filedev_h=filedev.h
  2581. +files_h=files.h
  2582. +font_h=font.h
  2583. +ilevel_h=ilevel.h
  2584. +iname_h=iname.h
  2585. +iref_h=iref.h
  2586. +iscan_h=iscan.h
  2587. +ivmspace_h=ivmspace.h
  2588. +iutil_h=iutil.h
  2589. +main_h=main.h
  2590. +opdef_h=opdef.h
  2591. +ostack_h=ostack.h
  2592. +overlay_h=overlay.h
  2593. +packed_h=packed.h
  2594. +save_h=save.h
  2595. +scanchar_h=scanchar.h
  2596. +sbits_h=sbits.h
  2597. +shc_h=shc.h
  2598. +state_h=state.h
  2599. +store_h=store.h
  2600. +stream_h=stream.h
  2601. +# Nested include files
  2602. +bfont_h=bfont.h $(font_h)
  2603. +ghost_h=ghost.h $(gx_h) $(iref_h)
  2604. +oper_h=oper.h $(gsutil_h) $(iutil_h) $(opdef_h) $(ostack_h)
  2605. +scf_h=scf.h $(shc_h)
  2606. +sdct_h=sdct.h $(shc_h)
  2607. +# Include files for optional features
  2608. +bnum_h=bnum.h
  2609. +bseq_h=bseq.h
  2610. +btoken_h=btoken.h
  2611. +
  2612. +comp1_h=comp1.h $(ghost_h) $(oper_h) $(gserrors_h) $(gxfixed_h) $(gxop1_h)
  2613. +
  2614. +gdevprn_h=gdevprn.h $(memory__h) $(string__h) $(gx_h) \
  2615. +  $(gserrors_h) $(gsmatrix_h) $(gxdevice_h) $(gxdevmem_h) $(gxclist_h)
  2616. +
  2617. +###### Utilities
  2618. +
  2619. +GH=$(AK) $(ghost_h)
  2620. +
  2621. +ialloc.$(OBJ): ialloc.c $(AK) $(gx_h) $(alloc_h) $(astate_h) $(ivmspace_h)
  2622. +
  2623. +iccfont.$(OBJ): iccfont.c $(GH) gconfigf.h \
  2624. +  $(ghost_h) $(alloc_h) $(ccfont_h) $(dict_h) $(dstack_h) $(errors_h) \
  2625. +  $(font_h) $(iutil_h) $(iname_h) $(oper_h) $(save_h) $(store_h)
  2626. +
  2627. +idebug.$(OBJ): idebug.c $(GH) \
  2628. +  $(iutil_h) $(dict_h) $(iname_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h)
  2629. +
  2630. +idict.$(OBJ): idict.c $(GH) \
  2631. +  $(alloc_h) $(errors_h) $(ivmspace_h) $(iname_h) $(packed_h) \
  2632. +  $(save_h) $(store_h) $(iutil_h) $(dict_h) $(dstack_h)
  2633. +
  2634. +idparam.$(OBJ): idparam.c $(GH) \
  2635. +  $(gsmatrix_h) $(dict_h) $(dparam_h) $(errors_h) $(iutil_h)
  2636. +
  2637. +iinit.$(OBJ): iinit.c $(GH) $(gconfig_h) \
  2638. +  $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) $(ilevel_h) $(iname_h) $(oper_h) $(store_h)
  2639. +
  2640. +iname.$(OBJ): iname.c $(GH) $(alloc_h) $(errors_h) $(ivmspace_h) $(iname_h) $(store_h)
  2641. +
  2642. +isave.$(OBJ): isave.c $(GH) $(alloc_h) $(astate_h) $(errors_h) $(iname_h) $(packed_h) $(save_h) $(store_h)
  2643. +
  2644. +iscan.$(OBJ): iscan.c $(GH) $(ctype__h) \
  2645. +  $(alloc_h) $(dict_h) $(dstack_h) $(errors_h) \
  2646. +  $(ilevel_h) $(iutil_h) $(iscan_h) $(ivmspace_h) \
  2647. +  $(iname_h) $(ostack_h) $(packed_h) $(store_h) $(stream_h) $(scanchar_h)
  2648. +
  2649. +iutil.$(OBJ): iutil.c $(GH) \
  2650. +  $(errors_h) $(alloc_h) $(dict_h) $(iutil_h) $(ivmspace_h) \
  2651. +  $(iname_h) $(ostack_h) $(opdef_h) $(packed_h) $(store_h) \
  2652. +  $(gsmatrix_h) $(gxdevice_h) $(gzcolor_h)
  2653. +
  2654. +sfilter.$(OBJ): sfilter.c $(AK) $(stdio__h) \
  2655. +  $(scanchar_h) $(stream_h) $(gscrypt1_h)
  2656. +
  2657. +stream.$(OBJ): stream.c $(AK) $(stdio__h) $(memory__h) \
  2658. +  $(gpcheck_h) $(scanchar_h) $(stream_h)
  2659. +
  2660. +###### Operators
  2661. +
  2662. +OP=$(GH) $(errors_h) $(oper_h)
  2663. +
  2664. +### Non-graphics operators
  2665. +
  2666. +zarith.$(OBJ): zarith.c $(OP) $(store_h)
  2667. +
  2668. +zarray.$(OBJ): zarray.c $(OP) $(alloc_h) $(packed_h) $(store_h)
  2669. +
  2670. +zcontrol.$(OBJ): zcontrol.c $(OP) $(estack_h) $(iutil_h) $(store_h)
  2671. +
  2672. +zdict.$(OBJ): zdict.c $(OP) $(dict_h) $(dstack_h) $(iname_h) $(store_h)
  2673. +
  2674. +zfile.$(OBJ): zfile.c $(OP) $(gp_h) \
  2675. +  $(alloc_h) $(estack_h) $(filedev_h) $(files_h) $(ilevel_h) $(iutil_h) \
  2676. +  $(save_h) $(stream_h) $(store_h)
  2677. +
  2678. +zfiledev.$(OBJ): zfiledev.c $(OP) $(string__h) $(gp_h) $(gconfig_h) \
  2679. +  $(filedev_h) $(files_h) $(stream_h)
  2680. +
  2681. +zfileio.$(OBJ): zfileio.c $(OP) $(gp_h) \
  2682. +  $(estack_h) $(files_h) $(iscan_h) $(store_h) $(stream_h) \
  2683. +  $(gsmatrix_h) $(gxdevice_h) $(gxdevmem_h)
  2684. +
  2685. +zfilter.$(OBJ): zfilter.c $(OP) $(alloc_h) $(stream_h)
  2686. +
  2687. +zgeneric.$(OBJ): zgeneric.c $(OP) \
  2688. +  $(dict_h) $(estack_h) $(ivmspace_h) $(iname_h) $(packed_h) $(store_h)
  2689. +
  2690. +zmath.$(OBJ): zmath.c $(OP) $(store_h)
  2691. +
  2692. +zmisc.$(OBJ): zmisc.c $(OP) $(gp_h) $(errno__h) $(memory__h) $(string__h) \
  2693. +  $(alloc_h) $(dict_h) $(dstack_h) $(iname_h) $(ivmspace_h) $(packed_h) $(store_h) \
  2694. +  $(gscrypt1_h)
  2695. +
  2696. +zpacked.$(OBJ): zpacked.c $(OP) \
  2697. +  $(alloc_h) $(dict_h) $(ivmspace_h) $(iname_h) $(packed_h) $(save_h) $(store_h)
  2698. +
  2699. +zprops.$(OBJ): zprops.c $(OP) \
  2700. +  $(alloc_h) $(dict_h) $(iname_h) $(state_h) $(store_h) \
  2701. +  $(gsprops_h) $(gsmatrix_h) $(gxdevice_h) $(gsstate_h)
  2702. +
  2703. +zrelbit.$(OBJ): zrelbit.c $(OP) $(store_h) $(dict_h)
  2704. +
  2705. +zstack.$(OBJ): zstack.c $(OP) $(store_h)
  2706. +
  2707. +zstring.$(OBJ): zstring.c $(OP) \
  2708. +  $(alloc_h) $(iscan_h) $(iutil_h) $(iname_h) $(store_h) $(stream_h)
  2709. +
  2710. +ztype.$(OBJ): ztype.c $(OP) \
  2711. +  $(dict_h) $(iscan_h) $(iutil_h) $(iname_h) $(stream_h) $(store_h)
  2712. +
  2713. +zvmem.$(OBJ): zvmem.c $(OP) $(alloc_h) $(dict_h) $(dstack_h) $(estack_h) $(save_h) $(state_h) $(store_h) \
  2714. +  $(gsmatrix_h) $(gsstate_h)
  2715. +
  2716. +###### Graphics operators
  2717. +
  2718. +zchar.$(OBJ): zchar.c $(OP) $(gxarith_h) $(gxfixed_h) $(gxmatrix_h) \
  2719. +  $(gschar_h) $(gxtype1_h) $(gxdevice_h) $(gxfont_h) $(gzpath_h) $(gzstate_h) \
  2720. +  $(alloc_h) $(dict_h) $(font_h) $(estack_h) $(ilevel_h) $(iname_h) $(state_h) $(store_h)
  2721. +
  2722. +zcolor.$(OBJ): zcolor.c $(OP) $(alloc_h) $(estack_h) $(gxfixed_h) $(gxmatrix_h) $(gzstate_h) $(gxdevice_h) $(gzcolor_h) $(iutil_h) $(state_h) $(store_h)
  2723. +
  2724. +zdevice.$(OBJ): zdevice.c $(OP) $(alloc_h) $(state_h) $(gsmatrix_h) $(gsstate_h) $(gxdevice_h) $(store_h)
  2725. +
  2726. +zfont.$(OBJ): zfont.c $(OP) \
  2727. +  $(gsmatrix_h) $(gxdevice_h) $(gxfont_h) $(gxfdir_h) $(gxcache_h) \
  2728. +  $(alloc_h) $(bfont_h) $(dict_h) $(iname_h) $(packed_h) $(save_h) $(state_h) $(store_h)
  2729. +
  2730. +zfont1.$(OBJ): zfont1.c $(OP) $(gsmatrix_h) $(gxdevice_h) $(gschar_h) $(gxfixed_h) $(gxfont_h) \
  2731. +  $(bfont_h) $(dict_h) $(dparam_h) $(iname_h) $(store_h)
  2732. +
  2733. +zfont2.$(OBJ): zfont2.c $(OP) $(gsmatrix_h) $(gxdevice_h) $(gschar_h) $(gxfixed_h) $(gxfont_h) \
  2734. +  $(alloc_h) $(bfont_h) $(dict_h) $(dparam_h) $(ilevel_h) $(iname_h) \
  2735. +  $(packed_h) $(save_h) $(store_h)
  2736. +
  2737. +zgstate.$(OBJ): zgstate.c $(OP) $(alloc_h) $(gsmatrix_h) $(gsstate_h) $(state_h) $(store_h)
  2738. +
  2739. +zht.$(OBJ): zht.c $(OP) $(alloc_h) $(estack_h) $(gsmatrix_h) $(gsstate_h) $(state_h) $(store_h)
  2740. +
  2741. +zmatrix.$(OBJ): zmatrix.c $(OP) $(gsmatrix_h) $(state_h) $(gscoord_h) $(store_h)
  2742. +
  2743. +zpaint.$(OBJ): zpaint.c $(OP) \
  2744. +  $(alloc_h) $(estack_h) $(ilevel_h) $(state_h) $(store_h) $(stream_h) \
  2745. +  $(gsimage_h) $(gsmatrix_h) $(gspaint_h)
  2746. +
  2747. +zpath.$(OBJ): zpath.c $(OP) $(gsmatrix_h) $(gspath_h) $(state_h) $(store_h)
  2748. +
  2749. +zpath2.$(OBJ): zpath2.c $(OP) $(alloc_h) $(estack_h) $(gspath_h) $(state_h) $(store_h)
  2750. +
  2751. +###### Linking
  2752. +
  2753. +INT=ialloc.$(OBJ) idebug.$(OBJ) idict.$(OBJ) idparam.$(OBJ) \
  2754. + iinit.$(OBJ) iname.$(OBJ) \
  2755. + interp.$(OBJ) isave.$(OBJ) iscan.$(OBJ) iutil.$(OBJ) \
  2756. + sfilter.$(OBJ) stream.$(OBJ) \
  2757. + zarith.$(OBJ) zarray.$(OBJ) zcontrol.$(OBJ) zdict.$(OBJ) \
  2758. + zfile.$(OBJ) zfiledev.$(OBJ) zfileio.$(OBJ) zfilter.$(OBJ) zgeneric.$(OBJ) \
  2759. + zmath.$(OBJ) zmisc.$(OBJ) zpacked.$(OBJ) zprops.$(OBJ) zrelbit.$(OBJ) \
  2760. + zstack.$(OBJ) zstring.$(OBJ) ztype.$(OBJ) zvmem.$(OBJ) \
  2761. + zchar.$(OBJ) zcolor.$(OBJ) zfont.$(OBJ) zfont1.$(OBJ) zfont2.$(OBJ) \
  2762. + zdevice.$(OBJ) zgstate.$(OBJ) zht.$(OBJ) zmatrix.$(OBJ) \
  2763. + zpaint.$(OBJ) zpath.$(OBJ) zpath2.$(OBJ)
  2764. +
  2765. +# -------------------------- Optional features ---------------------------- #
  2766. +
  2767. +### Additions common to Display PostScript and Level 2
  2768. +
  2769. +# We have to split up the module list because of limitations
  2770. +# on the number of arguments to a DOS batch file.
  2771. +dpsand2a_=gsdps1.$(OBJ) ibnum.$(OBJ) iscan2.$(OBJ)
  2772. +dpsand2b_=zbseq.$(OBJ) zchar2.$(OBJ) zdps1.$(OBJ) zupath.$(OBJ) zvmem2.$(OBJ)
  2773. +dpsand2_=$(dpsand2a_) $(dpsand2b_)
  2774. +dpsand2.dev: $(dpsand2_) gssetmod gsaddmod
  2775. +    $(SHP)gssetmod dpsand2 $(dpsand2a_)
  2776. +    $(SHP)gsaddmod dpsand2 -obj $(dpsand2b_)
  2777. +    $(SHP)gsaddmod dpsand2 -oper2 zbseq zchar2 zdps1 zupath zvmem2
  2778. +    $(SHP)gsaddmod dpsand2 -ps gs_dps1
  2779. +
  2780. +gsdps1.$(OBJ): gsdps1.c $(GXERR) $(gxfixed_h) $(gxmatrix_h) $(gzpath_h) $(gzstate_h)
  2781. +
  2782. +ibnum.$(OBJ): ibnum.c $(GH) $(errors_h) $(stream_h) $(bnum_h) $(btoken_h)
  2783. +
  2784. +iscan2.$(OBJ): iscan2.c $(GH) $(errors_h) \
  2785. +  $(alloc_h) $(dict_h) $(dstack_h) $(iscan_h) $(iutil_h) $(ivmspace_h) \
  2786. +  $(iname_h) $(ostack_h) $(save_h) $(store_h) $(stream_h) \
  2787. +  $(bseq_h) $(btoken_h) $(bnum_h)
  2788. +
  2789. +zbseq.$(OBJ): zbseq.c $(OP) $(save_h) $(store_h) $(stream_h) $(files_h) $(iname_h) $(bnum_h) $(btoken_h) $(bseq_h)
  2790. +
  2791. +zchar2.$(OBJ): zchar2.c $(OP) $(gschar_h) $(gsmatrix_h) $(gxfixed_h) $(gxfont_h) \
  2792. +  $(alloc_h) $(estack_h) $(font_h) $(iname_h) $(state_h) $(store_h) $(stream_h) $(bnum_h)
  2793. +
  2794. +zdps1.$(OBJ): zdps1.c $(OP) $(gsmatrix_h) $(gspath_h) $(gsstate_h) \
  2795. +  $(alloc_h) $(ivmspace_h) $(state_h) $(store_h) $(stream_h) $(bnum_h)
  2796. +
  2797. +zupath.$(OBJ): zupath.c $(OP) \
  2798. +  $(dict_h) $(dstack_h) $(iutil_h) $(state_h) $(store_h) $(stream_h) $(bnum_h) \
  2799. +  $(gscoord_h) $(gsmatrix_h) $(gspaint_h) $(gspath_h) $(gsstate_h) \
  2800. +  $(gxfixed_h) $(gxdevice_h) $(gxpath_h)
  2801. +
  2802. +zvmem2.$(OBJ): zvmem2.c $(OP) \
  2803. +  $(ivmspace_h) $(store_h)
  2804. +
  2805. +### Display PostScript
  2806. +# We should include zcontext, but it isn't in good enough shape yet:
  2807. +#    $(SHP)gsaddmod dps -oper2 zcontext
  2808. +
  2809. +dps_=
  2810. +dps.dev: dpsand2.dev $(dps_) gssetmod gsaddmod
  2811. +    $(SHP)gssetmod dps $(dps_)
  2812. +    $(SHP)gsaddmod dps -include dpsand2
  2813. +
  2814. +zcontext.$(OBJ): zcontext.c $(OP) \
  2815. +  $(alloc_h) $(dict_h) $(dstack_h) $(estack_h) $(state_h) $(store_h)
  2816. +
  2817. +### Composite font support
  2818. +
  2819. +gschar0.$(OBJ): gschar0.c $(GXERR) \
  2820. +  $(gxfixed_h) $(gxmatrix_h) $(gzdevice_h) $(gxdevmem_h) $(gxfont_h) $(gxchar_h) $(gzstate_h)
  2821. +
  2822. +zfont0.$(OBJ): zfont0.c $(OP) $(gsmatrix_h) $(gxdevice_h) $(gxfont_h) \
  2823. +  $(alloc_h) $(bfont_h) $(dict_h) $(iname_h) $(state_h) $(store_h)
  2824. +
  2825. +compfont_=zchar2.$(OBJ) zfont0.$(OBJ) gschar0.$(OBJ)
  2826. +compfont.dev: $(compfont_) gssetmod gsaddmod
  2827. +    $(SHP)gssetmod compfont $(compfont_)
  2828. +    $(SHP)gsaddmod compfont -oper zfont0 zchar2
  2829. +    $(SHP)gsaddmod compfont -ps gs_type0
  2830. +
  2831. +### Level 2 additions
  2832. +
  2833. +# We have to split up the module list because of limitations
  2834. +# on the number of arguments to a DOS batch file.
  2835. +level2a_=gscie.$(OBJ) gscolor2.$(OBJ) zcie.$(OBJ) zcolor2.$(OBJ)
  2836. +level2b_=zcspace2.$(OBJ) zht2.$(OBJ) zimage2.$(OBJ) zmisc2.$(OBJ)
  2837. +level2_=$(level2a_) $(level2b_)
  2838. +level2.dev: compfont.dev dpsand2.dev filter.dev $(level2_) gssetmod gsaddmod
  2839. +    $(SHP)gssetmod level2 $(level2a_)
  2840. +    $(SHP)gsaddmod level2 -obj $(level2b_)
  2841. +    $(SHP)gsaddmod level2 -include compfont dpsand2 filter
  2842. +    $(SHP)gsaddmod level2 -oper zmisc2_level
  2843. +    $(SHP)gsaddmod level2 -oper2 zcie zcolor2 zcspace2
  2844. +    $(SHP)gsaddmod level2 -oper2 zht2 zimage2 zmisc2
  2845. +    $(SHP)gsaddmod level2 -ps gs_lev2
  2846. +
  2847. +gscie.$(OBJ): gscie.c $(GXERR) \
  2848. +  $(gscspace_h) $(gscie_h) $(gscolor2_h) \
  2849. +  $(gxarith_h) $(gxcolor_h) $(gxdevice_h) $(gxrefct_h) \
  2850. +  $(gzcolor_h) $(gzstate_h)
  2851. +
  2852. +gscolor2.$(OBJ): gscolor2.c $(GXERR) \
  2853. +  $(gscie_h) $(gscolor2_h) $(gscspace_h) \
  2854. +  $(gxcolor_h) $(gxdevice_h) $(gxfixed_h) $(gxmatrix_h) $(gxrefct_h) \
  2855. +  $(gzcolor_h) $(gzstate_h)
  2856. +
  2857. +zcie.$(OBJ): zcie.c $(OP) \
  2858. +  $(gscspace_h) $(gscolor2_h) $(gscie_h) $(gxcolor_h) $(gxrefct_h) \
  2859. +  $(alloc_h) $(dict_h) $(dparam_h) $(estack_h) $(save_h) $(state_h) $(store_h)
  2860. +
  2861. +zcolor2.$(OBJ): zcolor2.c $(OP) \
  2862. +  $(gscolor_h) $(gxcolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) \
  2863. +  $(dict_h) $(dparam_h) $(iname_h) $(state_h) $(store_h)
  2864. +
  2865. +zcspace2.$(OBJ): zcspace2.c $(OP) \
  2866. +  $(gscolor_h) $(gxcolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) \
  2867. +  $(dict_h) $(dparam_h) $(estack_h) $(iname_h) $(state_h) $(store_h)
  2868. +
  2869. +zht2.$(OBJ): zht2.c $(OP) \
  2870. +  $(dict_h) $(dparam_h) $(iname_h) $(state_h) $(store_h)
  2871. +
  2872. +zimage2.$(OBJ): zimage2.c $(OP) \
  2873. +  $(gscolor_h) $(gscolor2_h) $(gscspace_h) $(gsmatrix_h) $(gxcolor_h) \
  2874. +  $(dict_h) $(dparam_h) $(ilevel_h) $(state_h)
  2875. +
  2876. +zmisc2.$(OBJ): zmisc2.c $(OP) \
  2877. +  $(gsfont_h) \
  2878. +  $(dict_h) $(dparam_h) $(dstack_h) $(estack_h) $(ilevel_h) $(iname_h) $(store_h)
  2879. +
  2880. +### Filters other than the ones in sfilter.c
  2881. +
  2882. +sbits.$(OBJ): sbits.c $(AK) $(stdio__h) $(sbits_h) $(stream_h)
  2883. +
  2884. +scftab.$(OBJ): scftab.c $(AK) $(std_h) $(scf_h)
  2885. +
  2886. +scfdtab.$(OBJ): scfdtab.c $(AK) $(std_h) $(scf_h)
  2887. +
  2888. +scfd.$(OBJ): scfd.c $(AK) $(stdio__h) $(gdebug_h)\
  2889. +  $(sbits_h) $(scf_h) $(stream_h)
  2890. +
  2891. +scfe.$(OBJ): scfe.c $(AK) $(stdio__h) $(gdebug_h)\
  2892. +  $(sbits_h) $(scf_h) $(stream_h)
  2893. +
  2894. +sdctd.$(OBJ): sdctd.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
  2895. +
  2896. +sdcte.$(OBJ): sdcte.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
  2897. +
  2898. +sfilter2.$(OBJ): sfilter2.c $(AK) $(stdio__h) $(scanchar_h) $(stream_h)
  2899. +
  2900. +slzwd.$(OBJ): slzwd.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
  2901. +
  2902. +slzwe.$(OBJ): slzwe.c $(AK) $(stdio__h) $(gdebug_h) $(stream_h)
  2903. +
  2904. +zfilter2.$(OBJ): zfilter2.c $(OP) $(alloc_h) $(dict_h) $(dparam_h) $(sdct_h) $(stream_h)
  2905. +
  2906. +# Because of size limits on the DOS command line,
  2907. +# we have to break this up into two parts.
  2908. +filter_1=zfilter2.$(OBJ) sfilter2.$(OBJ) sbits.$(OBJ)
  2909. +filter_2=scfdtab.$(OBJ) scftab.$(OBJ) scfd.$(OBJ) scfe.$(OBJ) 
  2910. +filter_3=sdctd.$(OBJ) sdcte.$(OBJ) slzwd.$(OBJ) slzwe.$(OBJ)
  2911. +filter.dev: $(filter_1) $(filter_2) $(filter_3) gssetmod gsaddmod
  2912. +    $(SHP)gssetmod filter $(filter_1)
  2913. +    $(SHP)gsaddmod filter -obj $(filter_2)
  2914. +    $(SHP)gsaddmod filter -obj $(filter_3)
  2915. +    $(SHP)gsaddmod filter -oper zfilter2
  2916. +
  2917. +### Precompiled fonts.  See fonts.doc for more information.
  2918. +
  2919. +CCFONT=$(OP) $(ccfont_h)
  2920. +
  2921. +# List the fonts we are going to compile.
  2922. +# Because of intrinsic limitations in `make', we have to list
  2923. +# the object file names and the font names separately.
  2924. +ccfonts1_=uglyr.$(OBJ)
  2925. +ccfonts1=uglyr
  2926. +
  2927. +ccfonts.dev: $(MAKEFILE) gs.mak iccfont.$(OBJ) gssetmod gsaddmod \
  2928. +  $(ccfonts1_) $(ccfonts2_) $(ccfonts3_) $(ccfonts4_) $(ccfonts5_)
  2929. +    $(SHP)gssetmod ccfonts iccfont.$(OBJ)
  2930. +    $(SHP)gsaddmod ccfonts -obj $(ccfonts1_)
  2931. +    $(SHP)gsaddmod ccfonts -obj $(ccfonts2_)
  2932. +    $(SHP)gsaddmod ccfonts -obj $(ccfonts3_)
  2933. +    $(SHP)gsaddmod ccfonts -obj $(ccfonts4_)
  2934. +    $(SHP)gsaddmod ccfonts -obj $(ccfonts5_)
  2935. +    $(SHP)gsaddmod ccfonts -oper ccfonts
  2936. +
  2937. +gconfigf.h: $(MAKEFILE) gs.mak genconf$(XE) gssetmod gsaddmod
  2938. +    $(SHP)gssetmod ccfonts_
  2939. +    $(SHP)gsaddmod ccfonts_ -font $(ccfonts1)
  2940. +    $(SHP)gsaddmod ccfonts_ -font $(ccfonts2)
  2941. +    $(SHP)gsaddmod ccfonts_ -font $(ccfonts3)
  2942. +    $(SHP)gsaddmod ccfonts_ -font $(ccfonts4)
  2943. +    $(SHP)gsaddmod ccfonts_ -font $(ccfonts5)
  2944. +    $(EXP)genconf ccfonts_.dev -f gconfigf.h
  2945. +
  2946. +uglyr.$(OBJ): uglyr.c $(CCFONT)
  2947. +    $(CCCF) uglyr.c
  2948. +
  2949. +ncrr.$(OBJ): ncrr.c $(CCFONT)
  2950. +    $(CCCF) ncrr.c
  2951. +
  2952. +pagk.$(OBJ): pagk.c $(CCFONT)
  2953. +    $(CCCF) pagk.c
  2954. +
  2955. +psyr.$(OBJ): psyr.c $(CCFONT)
  2956. +    $(CCCF) psyr.c
  2957. +
  2958. +ptmr.$(OBJ): ptmr.c $(CCFONT)
  2959. +    $(CCCF) ptmr.c
  2960. +
  2961. +pzdr.$(OBJ): pzdr.c $(CCFONT)
  2962. +    $(CCCF) pzdr.c
  2963. +
  2964. +# ----------------------------- Main program ------------------------------ #
  2965. +
  2966. +# Interpreter main program
  2967. +
  2968. +gs.$(OBJ): gs.c $(GH) $(ctype__h) \
  2969. +  $(gxdevice_h) $(gxdevmem_h) \
  2970. +  $(alloc_h) $(errors_h) $(estack_h) $(files_h) $(iscan_h) $(main_h) $(ostack_h) $(store_h) $(stream_h)
  2971. +
  2972. +gsmain.$(OBJ): gsmain.c $(GH) \
  2973. +  $(gp_h) $(gsmatrix_h) $(gxdevice_h) $(gserrors_h) \
  2974. +  $(estack_h) $(files_h) $(iscan_h) $(main_h) $(ostack_h) $(store_h)
  2975. +
  2976. +interp.$(OBJ): interp.c $(GH) \
  2977. +  $(errors_h) $(estack_h) $(iname_h) $(dict_h) $(dstack_h) $(iscan_h) $(oper_h) $(ostack_h) $(packed_h) $(save_h) $(store_h) $(stream_h)
  2978. +    $(CCINT) interp.c
  2979. +#    Copyright (C) 1989, 1992, 1993 Aladdin Enterprises.  All rights reserved.
  2980. +#
  2981. +# This file is part of Ghostscript.
  2982. +#
  2983. +# Ghostscript is distributed in the hope that it will be useful, but
  2984. +# WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  2985. +# to anyone for the consequences of using it or for whether it serves any
  2986. +# particular purpose or works at all, unless he says so in writing.  Refer
  2987. +# to the Ghostscript General Public License for full details.
  2988. +#
  2989. +# Everyone is granted permission to copy, modify and redistribute
  2990. +# Ghostscript, but only under the conditions described in the Ghostscript
  2991. +# General Public License.  A copy of this license is supposed to have been
  2992. +# given to you along with Ghostscript so you can know your rights and
  2993. +# responsibilities.  It should be in a file named COPYING.  Among other
  2994. +# things, the copyright notice and this notice must be preserved on all
  2995. +# copies.
  2996. +
  2997. +# makefile for Ghostscript device drivers.
  2998. +
  2999. +# -------------------------------- Catalog ------------------------------- #
  3000. +
  3001. +# It is possible to build Ghostscript with an arbitrary collection of
  3002. +# device drivers, although some drivers are supported only on a subset
  3003. +# of the target platforms.  The currently available drivers are:
  3004. +
  3005. +# Displays:
  3006. +#   MS-DOS EGA and VGA:
  3007. +#    ega    EGA (640x350, 16-color)
  3008. +#    vga    VGA (640x480, 16-color)
  3009. +#   MS-DOS SuperVGA:
  3010. +# +    atiw    ATI Wonder SuperVGA, 256-color modes
  3011. +# +     atiw16  ATI Wonder SuperVGA in 800x600, 16-color mode
  3012. +#    s3vga    SuperVGA with S3 86C911 chip (e.g., Diamond Stealth board)
  3013. +#    tseng    SuperVGA using Tseng Labs ET3000/4000 chips, 256-color modes
  3014. +#    tseng16  Tseng Labs SuperVGA in 800x600, 16-color mode (256K memory)
  3015. +# +    tvga    Trident SuperVGA, 256-color modes
  3016. +# +    tvga16    Trident SuperVGA in 800x600, 16-color mode (256K memory)
  3017. +#   ****** NOTE: The vesa device does not work with the Watcom (32-bit MS-DOS)
  3018. +#   ****** compiler or executable.
  3019. +#    vesa    SuperVGA with VESA standard API driver
  3020. +#   MS-DOS other:
  3021. +#    bgi    Borland Graphics Interface (CGA)  [MS-DOS only]
  3022. +# *    herc    Hercules Graphics display   [MS-DOS only]
  3023. +#    mswin    Microsoft Windows 3.0, 3.1  [MS Windows only]
  3024. +#    mswinprn  Microsoft Windows 3.0, 3.1 printer  [MS Windows only]
  3025. +# *    pe    Private Eye display
  3026. +#   Unix and VMS:
  3027. +#   ****** NOTE: For direct frame buffer addressing under SCO Unix or Xenix,
  3028. +#   ****** edit the definition of EGAVGA below.
  3029. +# *    att3b1    AT&T 3b1/Unixpc monochrome display   [3b1 only]
  3030. +# *    sonyfb    Sony Microsystems monochrome display   [Sony only]
  3031. +# *    sunview  SunView window system   [SunOS only]
  3032. +#    x11    X Windows version 11, release >=4   [Unix and VMS only]
  3033. +# Printers:
  3034. +# *    appledmp  Apple Dot Matrix Printer (should also work with Imagewriter)
  3035. +#    bj10e    Canon BubbleJet BJ10e
  3036. +# *    bj200    Canon BubbleJet BJ200
  3037. +# *    cdeskjet  H-P DeskJet 500C with 1 bit/pixel color
  3038. +# *    cdjcolor  H-P DeskJet 500C with 24 bit/pixel color and
  3039. +#        high-quality color (Floyd-Steinberg) dithering
  3040. +# *    cdjmono  H-P DeskJet 500C printing black only
  3041. +# *    cdj500    H-P DeskJet 500C (same as cdjcolor)
  3042. +# *    cdj550    H-P DeskJet 550C
  3043. +# *    declj250  alternate DEC LJ250 driver
  3044. +# +    deskjet  H-P DeskJet and DeskJet Plus
  3045. +# *    dfaxhigh  DigiBoard, Inc.'s DigiFAX software format (high resolution)
  3046. +# *    dfaxlow  DigiFAX low (normal) resolution
  3047. +#    djet500  H-P DeskJet 500
  3048. +# *    djet500c  H-P DeskJet 500C
  3049. +#    epson    Epson-compatible dot matrix printers (9- or 24-pin)
  3050. +# +    eps9high  Epson-compatible 9-pin, interleaved lines
  3051. +#        (triple resolution)
  3052. +# *    epsonc    Epson LQ-2550 and Fujitsu 3400/2400/1200 color printers
  3053. +# *    escp2    Epson ESC/P 2 language printers, including Stylus 800
  3054. +# +     ibmpro  IBM 9-pin Proprinter
  3055. +# *    jetp3852  IBM Jetprinter ink-jet color printer (Model #3852)
  3056. +# +    laserjet  H-P LaserJet
  3057. +# *    la50    DEC LA50 printer
  3058. +# *    la75    DEC LA75 printer
  3059. +# *    lbp8    Canon LBP-8II laser printer
  3060. +# *    ln03    DEC LN03 printer
  3061. +# *    lj250    DEC LJ250 Companion color printer
  3062. +# +    ljet2p    H-P LaserJet IId/IIp/III* with TIFF compression
  3063. +# +    ljet3    H-P LaserJet III* with Delta Row compression
  3064. +# +    ljet4    H-P LaserJet 4 (defaults to 600 dpi)
  3065. +# +    ljetplus  H-P LaserJet Plus
  3066. +# *    m8510    C.Itoh M8510 printer
  3067. +# *    necp6    NEC P6/P6+/P60 printers at 360 x 360 DPI resolution
  3068. +# *    nwp533  Sony Microsystems NWP533 laser printer   [Sony only]
  3069. +# *    oki182    Okidata MicroLine 182
  3070. +#    paintjet  H-P PaintJet color printer
  3071. +# *    pj    alternate PaintJet XL driver 
  3072. +# *    pjxl    H-P PaintJet XL color printer
  3073. +# *    pjxl300  H-P PaintJet XL300 color printer
  3074. +# *    r4081    Ricoh 4081 laser printer
  3075. +# *    sparc    SPARCprinter
  3076. +# *    t4693d2  Tektronix 4693d color printer, 2 bits per R/G/B component
  3077. +# *    t4693d4  Tektronix 4693d color printer, 4 bits per R/G/B component
  3078. +# *    t4693d8  Tektronix 4693d color printer, 8 bits per R/G/B component
  3079. +# *    tek4696  Tektronix 4695/4696 inkjet plotter
  3080. +# *    trufax    TruFax facsimile driver  [Unix only]
  3081. +# File formats and others:
  3082. +#    bit    A plain "bit bucket" device
  3083. +#    bmpmono    Monochrome MS Windows .BMP file format
  3084. +#    bmp16    4-bit (EGA/VGA) .BMP file format
  3085. +#    bmp256    8-bit (256-color) .BMP file format
  3086. +#    bmp16m    24-bit .BMP file format
  3087. +#    gifmono    Monochrome GIF file format
  3088. +#    gif8    8-bit color GIF file format
  3089. +#    pcxmono    Monochrome PCX file format
  3090. +#    pcxgray    8-bit gray scale PCX file format
  3091. +#    pcx16    Older color PCX file format (EGA/VGA, 16-color)
  3092. +#    pcx256    Newer color PCX file format (256-color)
  3093. +#    pbm    Portable Bitmap (plain format)
  3094. +#    pbmraw    Portable Bitmap (raw format)
  3095. +#    pgm    Portable Graymap (plain format)
  3096. +#    pgmraw    Portable Graymap (raw format)
  3097. +#    ppm    Portable Pixmap (plain format)
  3098. +#    ppmraw    Portable Pixmap (raw format)
  3099. +# *    tiffg3    TIFF/F (G3 fax)
  3100. +
  3101. +# User-contributed drivers marked with * require hardware or software
  3102. +# that is not available to Aladdin Enterprises.  Please contact the
  3103. +# original contributors, not Aladdin Enterprises, if you have questions.
  3104. +# Contact information appears in the driver entry below.
  3105. +#
  3106. +# Drivers marked with a + are maintained by Aladdin Enterprises with
  3107. +# the assistance of users, since Aladdin Enterprises doesn't have access to
  3108. +# the hardware for these either.
  3109. +
  3110. +# If you add drivers, it would be nice if you kept each list
  3111. +# in alphabetical order.
  3112. +
  3113. +# Each platform-specific makefile contains a line of the form
  3114. +#    DEVICE_DEVS=<dev1>.dev ... <devn>.dev
  3115. +# where dev1 ... devn are the devices to be included in the build.
  3116. +# You may edit this line to select any desired set of devices.
  3117. +# dev1 will be used as the default device (unless overridden from
  3118. +# the command line with -sDEVICE=xxx, of course.)  If you can't fit all the
  3119. +# devices on a single line, you may add lines defining
  3120. +#    DEVICE_DEVS2=<dev21>.dev ... <dev2n>.dev
  3121. +#    DEVICE_DEVS3=<dev31>.dev ... <dev3n>.dev
  3122. +# etc. up to DEVICE_DEVS9.
  3123. +# Don't use continuation lines, since this may break the MS-DOS command
  3124. +# processor.
  3125. +
  3126. +# ---------------------------- End of catalog ---------------------------- #
  3127. +
  3128. +# If you want to add a new device driver, the examples below should be
  3129. +# enough of a guide to the correct form for the makefile rules.
  3130. +
  3131. +# All device drivers depend on the following:
  3132. +GDEV=$(AK) echogs$(XE) $(gserrors_h) $(gx_h) $(gxdevice_h)
  3133. +
  3134. +# Define the header files for device drivers.  Every header file used by
  3135. +# more than one device driver must be listed here.
  3136. +gdevpccm_h=gdevpccm.h
  3137. +gdevpcfb_h=gdevpcfb.h $(dos__h)
  3138. +gdevpcl_h=gdevpcl.h
  3139. +gdevsvga_h=gdevsvga.h
  3140. +gdevx_h=gdevx.h
  3141. +
  3142. +###### ------------------- MS-DOS display devices ------------------- ######
  3143. +
  3144. +# There are really only three drivers: an EGA/VGA driver (4 bit-planes,
  3145. +# plane-addressed), a SuperVGA driver (8 bit-planes, byte addressed),
  3146. +# and a special driver for the S3 chip.
  3147. +# To make A4 paper the default, change the compilation line from
  3148. +#    $(CCD) ...
  3149. +# to
  3150. +#    $(CCD) -DA4
  3151. +
  3152. +### ----------------------- EGA and VGA displays ----------------------- ###
  3153. +
  3154. +gdevegaa.$(OBJ): gdevegaa.asm
  3155. +
  3156. +ETEST=ega.$(OBJ) $(ega_) gdevpcfb.$(OBJ) gdevegaa.$(OBJ)
  3157. +ega.exe: $(ETEST) libc$(MM).tr
  3158. +    $(COMPDIR)\tlink $(LCT) $(LO) $(LIBDIR)\c0$(MM) @ega.tr @libc$(MM).tr
  3159. +
  3160. +ega.$(OBJ): ega.c $(GDEV)
  3161. +    $(CCC) -v ega.c
  3162. +
  3163. +# The shared MS-DOS makefile defines PCFBASM as either gdevegaa.$(OBJ)
  3164. +# or an empty string.
  3165. +
  3166. +# NOTE: for direct frame buffer addressing under SCO Unix or Xenix,
  3167. +# change gdevevga to gdevsco in the following line.
  3168. +EGAVGA=gdevevga.$(OBJ) gdevpcfb.$(OBJ) $(PCFBASM)
  3169. +
  3170. +gdevevga.$(OBJ): gdevevga.c $(GDEV) $(gdevpcfb_h)
  3171. +    $(CCD) gdevevga.c
  3172. +
  3173. +gdevsco.$(OBJ): gdevsco.c $(GDEV) $(gdevpcfb_h)
  3174. +    $(CCD) gdevsco.c
  3175. +
  3176. +# Common code for MS-DOS and SCO.
  3177. +gdevpcfb.$(OBJ): gdevpcfb.c $(GDEV) $(MAKEFILE) $(gdevpcfb_h)
  3178. +    $(CCD) -DUSE_ASM=0$(USE_ASM) gdevpcfb.c
  3179. +
  3180. +# The EGA/VGA family includes: EGA, VGA, and
  3181. +# the ATI Wonder, Tseng ET3000/4000, and Trident SuperVGA in 16-color mode.
  3182. +
  3183. +ega.dev: $(EGAVGA) gssetdev
  3184. +    $(SHP)gssetdev ega $(EGAVGA)
  3185. +
  3186. +vga.dev: $(EGAVGA) gssetdev
  3187. +    $(SHP)gssetdev vga $(EGAVGA)
  3188. +
  3189. +atiw16.dev: $(EGAVGA) gssetdev
  3190. +    $(SHP)gssetdev atiw16 $(EGAVGA)
  3191. +
  3192. +tseng16.dev: $(EGAVGA) gssetdev
  3193. +    $(SHP)gssetdev tseng16 $(EGAVGA)
  3194. +
  3195. +tvga16.dev: $(EGAVGA) gssetdev
  3196. +    $(SHP)gssetdev tvga16 $(EGAVGA)
  3197. +
  3198. +### ------------------------- SuperVGA displays ------------------------ ###
  3199. +
  3200. +SVGA=gdevsvga.$(OBJ) $(PCFBASM)
  3201. +
  3202. +gdevsvga.$(OBJ): gdevsvga.c $(GDEV) $(MAKEFILE) \
  3203. +  $(gdevpcfb_h) $(gdevsvga_h)
  3204. +    $(CCD) -DUSE_ASM=0$(USE_ASM) gdevsvga.c
  3205. +
  3206. +# The SuperVGA family includes: ATI Wonder, S3, Trident, Tseng ET3000/4000,
  3207. +# and VESA.
  3208. +
  3209. +atiw.dev: $(SVGA) gssetdev
  3210. +    $(SHP)gssetdev atiw $(SVGA)
  3211. +
  3212. +tseng.dev: $(SVGA) gssetdev
  3213. +    $(SHP)gssetdev tseng $(SVGA)
  3214. +
  3215. +tvga.dev: $(SVGA) gssetdev
  3216. +    $(SHP)gssetdev tvga $(SVGA)
  3217. +
  3218. +vesa.dev: $(SVGA) gssetdev
  3219. +    $(SHP)gssetdev vesa $(SVGA)
  3220. +
  3221. +# The S3 driver doesn't share much code with the others.
  3222. +
  3223. +s3vga_=$(SVGA) gdevs3ga.$(OBJ)
  3224. +s3vga.dev: $(s3vga_) gssetdev
  3225. +    $(SHP)gssetdev s3vga $(s3vga_)
  3226. +
  3227. +gdevs3ga.$(OBJ): gdevs3ga.c $(GDEV) $(MAKEFILE) $(gdevpcfb_h) $(gdevsvga_h)
  3228. +    $(CCD) gdevs3ga.c
  3229. +
  3230. +### ------------ The BGI (Borland Graphics Interface) device ----------- ###
  3231. +
  3232. +cgaf.$(OBJ): $(BGIDIR)\cga.bgi
  3233. +    $(BGIDIR)\bgiobj /F $(BGIDIR)\cga
  3234. +
  3235. +egavgaf.$(OBJ): $(BGIDIR)\egavga.bgi
  3236. +    $(BGIDIR)\bgiobj /F $(BGIDIR)\egavga
  3237. +
  3238. +# Include egavgaf.$(OBJ) for debugging only.
  3239. +bgi_=gdevbgi.$(OBJ) cgaf.$(OBJ)
  3240. +bgi.dev: $(bgi_) gssetdev gsaddmod
  3241. +    $(SHP)gssetdev bgi $(bgi_)
  3242. +    $(SHP)gsaddmod bgi -lib $(LIBDIR)\graphics
  3243. +
  3244. +gdevbgi.$(OBJ): gdevbgi.c $(GDEV) $(MAKEFILE) $(gxxfont_h)
  3245. +    $(CCC) -DBGI_LIB=$(QQ)$(BGIDIRSTR)$(QQ) gdevbgi.c
  3246. +
  3247. +### ------------------- The Hercules Graphics display ------------------- ###
  3248. +
  3249. +herc_=gdevherc.$(OBJ)
  3250. +herc.dev: $(herc_) gssetdev
  3251. +    $(SHP)gssetdev herc $(herc_)
  3252. +
  3253. +gdevherc.$(OBJ): gdevherc.c $(GDEV)
  3254. +    $(CCC) gdevherc.c
  3255. +
  3256. +###### ------------------- The Private Eye display ------------------- ######
  3257. +### Note: this driver was contributed by a user:                          ###
  3258. +###   please contact narf@media-lab.media.mit.edu if you have questions.  ###
  3259. +
  3260. +pe_=gdevpe.$(OBJ)
  3261. +pe.dev: $(pe_) gssetdev
  3262. +    $(SHP)gssetdev pe $(pe_)
  3263. +
  3264. +gdevpe.$(OBJ): gdevpe.c $(GDEV)
  3265. +
  3266. +###### ----------------- The MS-Windows 3.n display ------------------ ######
  3267. +
  3268. +gdevmswn_h=gdevmswn.h $(GDEV) gp_mswin.h
  3269. +
  3270. +# Choose one of gdevwddb or gdevwdib here.
  3271. +mswin_=gdevmswn.$(OBJ) gdevmsxf.$(OBJ) gdevwdib.$(OBJ) \
  3272. +  gdevemap.$(OBJ) gdevpccm.$(OBJ)
  3273. +mswin.dev: $(mswin_) gssetdev
  3274. +    $(SHP)gssetdev mswin $(mswin_)
  3275. +
  3276. +gdevmswn.$(OBJ): gdevmswn.c $(gdevmswn_h) $(gp_h) $(gpcheck_h) \
  3277. +  $(gsprops_h) $(gdevpccm_h)
  3278. +
  3279. +gdevmsxf.$(OBJ): gdevmsxf.c $(ctype__h) $(math__h) $(memory__h) \
  3280. +  $(gdevmswn_h) $(gsutil_h) $(gxxfont_h)
  3281. +
  3282. +# An implementation using a device-dependent bitmap.
  3283. +gdevwddb.$(OBJ): gdevwddb.c $(gdevmswn_h)
  3284. +
  3285. +# An implementation using a DIB filled by an image device.
  3286. +gdevwdib.$(OBJ): gdevwdib.c $(dos__h) $(gdevmswn_h)
  3287. +
  3288. +###### ----------------- The MS-Windows 3.n printer ------------------ ######
  3289. +
  3290. +mswinprn_=gdevwprn.$(OBJ) gdevmsxf.$(OBJ)
  3291. +mswinprn.dev: $(mswinprn_) gssetdev
  3292. +    $(SHP)gssetdev mswinprn $(mswinprn_)
  3293. +
  3294. +gdevwprn.$(OBJ): gdevwprn.c $(gdevmswn_h) $(gp_h) $(gpcheck_h) \
  3295. +  $(gsprops_h) $(gdevpccm_h)
  3296. +
  3297. +### ---------------- Amiga display/printer/file devices ---------------- ###
  3298. +### Note: this driver was contributed by a user: please contact          ###
  3299. +###       Olaf Barthel (olsen@sourcery.han.de) if you have questions.    ###
  3300. +###       He would also like to hear from anyone using the driver.       ###
  3301. +### Please consult the source code for additional documentation.         ###
  3302. +
  3303. +amiga_=gdevamiga.$(OBJ)
  3304. +
  3305. +amiga.dev: $(amiga_) gssetdev
  3306. +    $(SHP)gssetdev amiga $(amiga_)
  3307. +
  3308. +amiga_low.dev: $(amiga_) gssetdev
  3309. +    $(SHP)gssetdev amiga_low $(amiga_)
  3310. +
  3311. +amiga_high.dev: $(amiga_) gssetdev
  3312. +    $(SHP)gssetdev amiga_high $(amiga_)
  3313. +
  3314. +amiga_super.dev: $(amiga_) gssetdev
  3315. +    $(SHP)gssetdev amiga_super $(amiga_)
  3316. +
  3317. +amiga_a2024.dev: $(amiga_) gssetdev
  3318. +    $(SHP)gssetdev amiga_a2024 $(amiga_)
  3319. +
  3320. +amiga_picassoii.dev: $(amiga_) gssetdev
  3321. +    $(SHP)gssetdev amiga_picassoii $(amiga_)
  3322. +
  3323. +amiga_custom.dev: $(amiga_) gssetdev
  3324. +    $(SHP)gssetdev amiga_custom $(amiga_)
  3325. +
  3326. +amiga_printer.dev: $(amiga_) gssetdev
  3327. +    $(SHP)gssetdev amiga_printer $(amiga_)
  3328. +
  3329. +amiga_ilbm.dev: $(amiga_) gssetdev
  3330. +    $(SHP)gssetdev amiga_ilbm $(amiga_)
  3331. +
  3332. +gdevamiga.$(OBJ): gdevamiga.c $(GDEV) $(arch_h)
  3333. +
  3334. +###### ----------- The AT&T 3b1 Unixpc monochrome display ------------ ######
  3335. +### Note: this driver was contributed by a user: please contact           ###
  3336. +###       Andy Fyfe (andy@cs.caltech.edu) if you have questions.          ###
  3337. +
  3338. +att3b1_=gdev3b1.$(OBJ)
  3339. +att3b1.dev: $(att3b1_) gssetdev
  3340. +    $(SHP)gssetdev att3b1 $(att3b1_)
  3341. +
  3342. +gdev3b1.$(OBJ): gdev3b1.c
  3343. +
  3344. +###### --------------- Memory-buffered printer devices --------------- ######
  3345. +
  3346. +# The dependency list for printers includes devs.mak because
  3347. +# you can specify -DA4 to make A4 paper the default.
  3348. +# See below under, e.g., gdevdjet.c.
  3349. +PDEVH=$(GDEV) $(gdevprn_h) devs.mak
  3350. +
  3351. +gdevprn.$(OBJ): gdevprn.c $(PDEVH) $(gp_h) $(gsprops_h)
  3352. +
  3353. +### ------------------- The Apple DMP printer device ------------------- ###
  3354. +
  3355. +appledmp_=gdevadmp.$(OBJ) gdevprn.$(OBJ)
  3356. +
  3357. +appledmp.dev: $(appledmp_) gssetdev
  3358. +    $(SHP)gssetdev appledmp $(appledmp_)
  3359. +
  3360. +### ------------ The Canon BubbleJet BJ10e and BJ200 devices ------------ ###
  3361. +
  3362. +bj10e_=gdevbj10.$(OBJ) gdevprn.$(OBJ)
  3363. +
  3364. +bj10e.dev: $(bj10e_) gssetdev
  3365. +    $(SHP)gssetdev bj10e $(bj10e_)
  3366. +
  3367. +bj200.dev: $(bj10e_) gssetdev
  3368. +    $(SHP)gssetdev bj200 $(bj10e_)
  3369. +
  3370. +gdevbj10.$(OBJ): gdevbj10.c $(PDEVH)
  3371. +
  3372. +### -------------------------- The DigiFAX device ----------------------- ###
  3373. +###    This driver outputs images in a format suitable for use with       ###
  3374. +###    DigiBoard, Inc.'s DigiFAX software.  Use -sDEVICE=dfaxhigh for     ###
  3375. +###    high resolution output, -sDEVICE=dfaxlow for normal output.        ###
  3376. +### Note: this driver was contributed by a user: please contact           ###
  3377. +###       Rick Richardson (rick@digibd.com) if you have questions.        ###
  3378. +
  3379. +digifax_=gdevdfax.$(OBJ) gdevprn.$(OBJ)
  3380. +dfaxhigh.dev: $(digifax_) gssetdev
  3381. +    $(SHP)gssetdev dfaxhigh $(digifax_)
  3382. +
  3383. +dfaxlow.dev: $(digifax_) gssetdev
  3384. +    $(SHP)gssetdev dfaxlow $(digifax_)
  3385. +
  3386. +gdevdfax.$(OBJ): gdevdfax.c $(GDEV) $(gdevprn_h) gdevdfg3.h
  3387. +
  3388. +### ----------- The H-P DeskJet and LaserJet printer devices ----------- ###
  3389. +
  3390. +### These are essentially the same device.
  3391. +### You can make A4 paper the default: see below.
  3392. +### NOTE: printing at full resolution (300 DPI) requires a printer
  3393. +###   with at least 1.5 Mb of memory.  150 DPI only requires .5 Mb.
  3394. +
  3395. +HPPCL=gdevprn.$(OBJ) gdevpcl.$(OBJ)
  3396. +HPMONO=gdevdjet.$(OBJ) $(HPPCL)
  3397. +
  3398. +gdevpcl.$(OBJ): gdevpcl.c $(PDEVH) $(gdevpcl_h)
  3399. +
  3400. +# To make A4 paper the default, change the second line below this to
  3401. +#    $(CCC) -DA4 gdevdjet.c
  3402. +gdevdjet.$(OBJ): gdevdjet.c $(PDEVH) $(gdevpcl_h)
  3403. +    $(CCC) gdevdjet.c
  3404. +
  3405. +deskjet.dev: $(HPMONO) gssetdev
  3406. +    $(SHP)gssetdev deskjet $(HPMONO)
  3407. +
  3408. +djet500.dev: $(HPMONO) gssetdev
  3409. +    $(SHP)gssetdev djet500 $(HPMONO)
  3410. +
  3411. +laserjet.dev: $(HPMONO) gssetdev
  3412. +    $(SHP)gssetdev laserjet $(HPMONO)
  3413. +
  3414. +ljetplus.dev: $(HPMONO) gssetdev
  3415. +    $(SHP)gssetdev ljetplus $(HPMONO)
  3416. +
  3417. +### Selecting ljet2p provides TIFF (mode 2) compression on LaserJet III,
  3418. +### IIIp, IIId, IIIsi, IId, and IIp. 
  3419. +
  3420. +ljet2p.dev: $(HPMONO) gssetdev
  3421. +    $(SHP)gssetdev ljet2p $(HPMONO)
  3422. +
  3423. +### Selecting ljet3 provides Delta Row (mode 3) compression on LaserJet III,
  3424. +### IIIp, IIId, IIIsi.
  3425. +
  3426. +ljet3.dev: $(HPMONO) gssetdev
  3427. +    $(SHP)gssetdev ljet3 $(HPMONO)
  3428. +
  3429. +### Selecting ljet4 also provides Delta Row compression on LaserJet IV series.
  3430. +
  3431. +ljet4.dev: $(HPMONO) gssetdev
  3432. +    $(SHP)gssetdev ljet4 $(HPMONO)
  3433. +
  3434. +###- The H-P DeskJet 500C/550C and PaintJet family color printer devices -###
  3435. +### Note: there are two different 500C drivers, both contributed by users.###
  3436. +###   If you have questions about the djet500c driver,                    ###
  3437. +###       please contact AKayser@et.tudelft.nl.                           ###
  3438. +###   If you have questions about the cdj* drivers,                       ###
  3439. +###       please contact g.cameron@biomed.abdn.ac.uk.                     ###
  3440. +
  3441. +cdeskjet_=gdevcdj.$(OBJ) $(HPPCL)
  3442. +
  3443. +cdeskjet.dev: $(cdeskjet_) gssetdev
  3444. +    $(SHP)gssetdev cdeskjet $(cdeskjet_)
  3445. +
  3446. +cdjcolor.dev: $(cdeskjet_) gssetdev
  3447. +    $(SHP)gssetdev cdjcolor $(cdeskjet_)
  3448. +
  3449. +cdjmono.dev: $(cdeskjet_) gssetdev
  3450. +    $(SHP)gssetdev cdjmono $(cdeskjet_)
  3451. +
  3452. +cdj500.dev: $(cdeskjet_) gssetdev
  3453. +    $(SHP)gssetdev cdj500 $(cdeskjet_)
  3454. +
  3455. +cdj550.dev: $(cdeskjet_) gssetdev
  3456. +    $(SHP)gssetdev cdj550 $(cdeskjet_)
  3457. +
  3458. +declj250.dev: $(cdeskjet_) gssetdev
  3459. +    $(SHP)gssetdev declj250 $(cdeskjet_)
  3460. +
  3461. +pj.dev: $(cdeskjet_) gssetdev
  3462. +    $(SHP)gssetdev pj $(cdeskjet_)
  3463. +
  3464. +pjxl.dev: $(cdeskjet_) gssetdev
  3465. +    $(SHP)gssetdev pjxl $(cdeskjet_)
  3466. +
  3467. +pjxl300.dev: $(cdeskjet_) gssetdev
  3468. +    $(SHP)gssetdev pjxl300 $(cdeskjet_)
  3469. +
  3470. +# NB: you can also customise the build if required, using -DA4 (for A4 paper)
  3471. +# and -DBitsPerPixel=<number> if you wish the default to be other than 24
  3472. +# for the generic drivers (cdj500, cdj550, pjxl300, pjtest, pjxltest).
  3473. +# E.g,. to make A4 paper the default, change the second line below this to
  3474. +#    $(CCC) -DA4 gdevdjet.c
  3475. +gdevcdj.$(OBJ): gdevcdj.c $(PDEVH) $(gdevpcl_h)
  3476. +    $(CCC) gdevcdj.c
  3477. +
  3478. +djet500c_=gdevdjtc.$(OBJ) $(HPPCL)
  3479. +djet500c.dev: $(djet500c_) gssetdev
  3480. +    $(SHP)gssetdev djet500c $(djet500c_)
  3481. +
  3482. +gdevdjtc.$(OBJ): gdevdjtc.c $(PDEVH) $(gdevpcl_h)
  3483. +
  3484. +### ----------------- The generic Epson printer device ----------------- ###
  3485. +
  3486. +epson_=gdevepsn.$(OBJ) gdevprn.$(OBJ)
  3487. +
  3488. +epson.dev: $(epson_) gssetdev
  3489. +    $(SHP)gssetdev epson $(epson_)
  3490. +
  3491. +eps9high.dev: $(epson_) gssetdev
  3492. +    $(SHP)gssetdev eps9high $(epson_)
  3493. +
  3494. +gdevepsn.$(OBJ): gdevepsn.c $(PDEVH)
  3495. +
  3496. +### ----------------- The IBM Proprinter printer device ---------------- ###
  3497. +
  3498. +ibmpro.dev: $(epson_) gssetdev
  3499. +    $(SHP)gssetdev ibmpro $(epson_)
  3500. +
  3501. +### -------------- The Epson LQ-2550 color printer device -------------- ###
  3502. +### Note: this driver was contributed by users: please contact           ###
  3503. +###       Dave St. Clair (dave@exlog.com) if you have questions.         ###
  3504. +
  3505. +epsonc_=gdevepsc.$(OBJ) gdevprn.$(OBJ)
  3506. +epsonc.dev: $(epsonc_) gssetdev
  3507. +    $(SHP)gssetdev epsonc $(epsonc_)
  3508. +
  3509. +gdevepsc.$(OBJ): gdevepsc.c $(PDEVH)
  3510. +
  3511. +### -------------- The Epson ESC/P 2 language printer device ----------- ###
  3512. +### Note: this driver was contributed by a user: if you have questions,  ###
  3513. +###       please contact Richard Brown (rab@tauon.ph.unimelb.edu.au).    ###
  3514. +
  3515. +escp2_=gdevescp.$(OBJ) gdevprn.$(OBJ)
  3516. +escp2.dev: $(escp2_) gssetdev
  3517. +    $(SHP)gssetdev escp2 $(escp2_)
  3518. +
  3519. +gdevescp.$(OBJ): gdevescp.c $(PDEVH)
  3520. +
  3521. +### ------------ The H-P PaintJet color printer device ----------------- ###
  3522. +### Note: this driver also supports the DEC LJ250 color printer, which   ###
  3523. +###       has a PaintJet-compatible mode, and the PaintJet XL.           ###
  3524. +### If you have questions about the XL, please contact Rob Reiss         ###
  3525. +###       (rob@moray.berkeley.edu).                                      ###
  3526. +
  3527. +PJET=gdevpjet.$(OBJ) $(HPPCL)
  3528. +
  3529. +gdevpjet.$(OBJ): gdevpjet.c $(PDEVH) $(gdevpcl_h)
  3530. +
  3531. +lj250.dev: $(PJET) gssetdev
  3532. +    $(SHP)gssetdev lj250 $(PJET)
  3533. +
  3534. +paintjet.dev: $(PJET) gssetdev
  3535. +    $(SHP)gssetdev paintjet $(PJET)
  3536. +
  3537. +pjetxl.dev: $(PJET) gssetdev
  3538. +    $(SHP)gssetdev pjetxl $(PJET)
  3539. +
  3540. +### ------- The IBM 3852 JetPrinter color inkjet printer device -------- ###
  3541. +### Note: this driver was contributed by users: please contact           ###
  3542. +###       Kevin Gift (kgift@draper.com) if you have questions.           ###
  3543. +### Note that the paper size that can be addressed by the graphics mode  ###
  3544. +###   used in this driver is fixed at 7-1/2 inches wide (the printable   ###
  3545. +###   width of the jetprinter itself.)                                   ###
  3546. +
  3547. +jetp3852_=gdev3852.$(OBJ) gdevprn.$(OBJ)
  3548. +jetp3852.dev: $(jetp3852_) gssetdev
  3549. +    $(SHP)gssetdev jetp3852 $(jetp3852_)
  3550. +
  3551. +gdevjetp.$(OBJ): gdevjetp.c $(PDEVH) $(gdevpcl_h)
  3552. +
  3553. +### ----------------- The Canon LBP-8II printer device ----------------- ###
  3554. +### Note: this driver was contributed by users: please contact           ###
  3555. +###       Tom Quinn (trq@prg.oxford.ac.uk) if you have questions.        ###
  3556. +### Note that the standard paper size for this driver is the European    ###
  3557. +###   A4 size, not the American 8.5" x 11" size.                         ###
  3558. +
  3559. +lbp8_=gdevlbp8.$(OBJ) gdevprn.$(OBJ)
  3560. +lbp8.dev: $(lbp8_) gssetdev
  3561. +    $(SHP)gssetdev lbp8 $(lbp8_)
  3562. +
  3563. +gdevlbp8.$(OBJ): gdevlbp8.c $(PDEVH)
  3564. +
  3565. +### -------------- The DEC LN03/LA50/LA75 printer devices -------------- ###
  3566. +### Note: this driver was contributed by users: please contact           ###
  3567. +###       Ulrich Mueller (ulm@vsnhd1.cern.ch) if you have questions.     ###
  3568. +### For questions about LA50 and LA75: please contact                    ###
  3569. +###       Ian MacPhedran (macphed@dvinci.USask.CA).                     ###
  3570. +### For the LN03, you can make A4 paper the default: see below.          ###
  3571. +
  3572. +ln03_=gdevln03.$(OBJ) gdevprn.$(OBJ)
  3573. +ln03.dev: $(ln03_) gssetdev
  3574. +    $(SHP)gssetdev ln03 $(ln03_)
  3575. +
  3576. +la50.dev: $(ln03_) gssetdev
  3577. +    $(SHP)gssetdev la50 $(ln03_)
  3578. +
  3579. +la75.dev: $(ln03_) gssetdev
  3580. +    $(SHP)gssetdev la75 $(ln03_)
  3581. +
  3582. +# To make A4 paper the default, change the second line below this to
  3583. +#    $(CCC) -DA4 gdevln03.c
  3584. +gdevln03.$(OBJ): gdevln03.c $(PDEVH)
  3585. +    $(CCC) gdevln03.c
  3586. +
  3587. +### -------------- The C.Itoh M8510 printer device --------------------- ###
  3588. +### Note: this driver was contributed by a user: please contact Bob      ###
  3589. +###       Smith <bob@snuffy.penfield.ny.us> if you have questions.       ###
  3590. +
  3591. +m8510_=gdev8510.$(OBJ) gdevprn.$(OBJ)
  3592. +m8510.dev: $(m8510_) gssetdev
  3593. +    $(SHP)gssetdev m8510 $(m8510_)
  3594. +
  3595. +gdev8510.$(OBJ): gdev8510.c $(PDEVH)
  3596. +
  3597. +### --------------------- The NEC P6 family devices -------------------- ###
  3598. +
  3599. +necp6_=gdevnp6.$(OBJ) gdevprn.$(OBJ)
  3600. +necp6.dev: $(necp6_) gssetdev
  3601. +    $(SHP)gssetdev necp6 $(necp6_)
  3602. +
  3603. +gdevnp6.$(OBJ): gdevnp6.c $(PDEVH)
  3604. +
  3605. +### ----------------- The Okidata MicroLine 182 device ----------------- ###
  3606. +### Note: this driver was contributed by a user: please contact          ###
  3607. +###       Maarten Koning (smeg@bnr.ca) if you have questions.            ###
  3608. +
  3609. +oki182_=gdevo182.$(OBJ) gdevprn.$(OBJ)
  3610. +oki182.dev: $(oki182_) gssetdev
  3611. +    $(SHP)gssetdev oki182 $(oki182_)
  3612. +
  3613. +gdevo182.$(OBJ): gdevo182.c $(PDEVH)
  3614. +
  3615. +### ------------- The Ricoh 4081 laser printer device ------------------ ###
  3616. +### Note: this driver was contributed by users:                          ###
  3617. +###       please contact kdw@oasis.icl.co.uk if you have questions.      ###
  3618. +
  3619. +r4081_=gdev4081.$(OBJ) gdevprn.$(OBJ)
  3620. +r4081.dev: $(r4081_) gssetdev
  3621. +    $(SHP)gssetdev r4081 $(r4081_)
  3622. +
  3623. +gdev4081.$(OBJ): gdev4081.c $(PDEVH)
  3624. +
  3625. +###### ------------------------ Sony devices ------------------------ ######
  3626. +### Note: these drivers were contributed by users: please contact        ###
  3627. +###       Mike Smolenski (mike@intertech.com) if you have questions.     ###
  3628. +
  3629. +### ------------------- Sony NeWS frame buffer device ------------------ ###
  3630. +
  3631. +sonyfb_=gdevsnfb.$(OBJ) gdevprn.$(OBJ)
  3632. +sonyfb.dev: $(sonyfb_) gssetdev
  3633. +    $(SHP)gssetdev sonyfb $(sonyfb_)
  3634. +
  3635. +gdevsnfb.$(OBJ): gdevsnfb.c $(PDEVH)
  3636. +
  3637. +### -------------------- Sony NWP533 printer device -------------------- ###
  3638. +### Note: this driver was contributed by a user: please contact Tero     ###
  3639. +###       Kivinen (kivinen@joker.cs.hut.fi) if you have questions.       ###
  3640. +
  3641. +nwp533_=gdevn533.$(OBJ) gdevprn.$(OBJ)
  3642. +nwp533.dev: $(nwp533_) gssetdev
  3643. +    $(SHP)gssetdev nwp533 $(nwp533_)
  3644. +
  3645. +gdevn533.$(OBJ): gdevn533.c $(PDEVH)
  3646. +
  3647. +### ------------------------- The SPARCprinter ------------------------- ###
  3648. +### Note: this driver was contributed by users: please contact Martin    ###
  3649. +###       Schulte (schulte@thp.uni-koeln.de) if you have questions.      ###
  3650. +###       He would also like to hear from anyone using the driver.       ###
  3651. +### Please consult the source code for additional documentation.         ###
  3652. +
  3653. +sparc_=gdevsppr.$(OBJ) gdevprn.$(OBJ)
  3654. +sparc.dev: $(sparc_) gssetdev
  3655. +    $(SHP)gssetdev sparc $(sparc_)
  3656. +
  3657. +gdevsppr.$(OBJ): gdevsppr.c $(PDEVH)
  3658. +
  3659. +###### --------------------- The SunView device --------------------- ######
  3660. +### Note: this driver is maintained by a user: if you have questions,    ###
  3661. +###       please contact Andreas Stolcke (stolcke@icsi.berkeley.edu).    ###
  3662. +
  3663. +sunview_=gdevsun.$(OBJ)
  3664. +sunview.dev: $(sunview_) gssetdev gsaddmod
  3665. +    $(SHP)gssetdev sunview $(sunview_)
  3666. +    $(SHP)gsaddmod sunview -lib suntool sunwindow pixrect
  3667. +
  3668. +gdevsun.$(OBJ): gdevsun.c $(GDEV) $(arch_h)
  3669. +
  3670. +### ----------------- Tektronix 4396d color printer -------------------- ###
  3671. +### Note: this driver was contributed by a user: please contact          ###
  3672. +###       Karl Hakimian (hakimian@haney.eecs.wsu.edu)                    ###
  3673. +###       if you have questions.                                         ###
  3674. +
  3675. +t4693d_=gdev4693.$(OBJ) gdevprn.$(OBJ)
  3676. +t4693d2.dev: $(t4693d_) gssetdev
  3677. +    $(SHP)gssetdev t4693d2 $(t4693d_)
  3678. +
  3679. +t4693d4.dev: $(t4693d_) gssetdev
  3680. +    $(SHP)gssetdev t4693d4 $(t4693d_)
  3681. +
  3682. +t4693d8.dev: $(t4693d_) gssetdev
  3683. +    $(SHP)gssetdev t4693d8 $(t4693d_)
  3684. +
  3685. +gdev4693.$(OBJ): gdev4693.c $(GDEV)
  3686. +
  3687. +### -------------------- Tektronix ink-jet printers -------------------- ###
  3688. +### Note: this driver was contributed by a user: please contact          ###
  3689. +###       Karsten Spang (spang@nbivax.nbi.dk) if you have questions.     ###
  3690. +
  3691. +tek4696_=gdevtknk.$(OBJ) gdevprn.$(OBJ)
  3692. +tek4696.dev: $(tek4696_) gssetdev
  3693. +    $(SHP)gssetdev tek4696 $(tek4696_)
  3694. +
  3695. +gdevtknk.$(OBJ): gdevtknk.c $(PDEVH)
  3696. +
  3697. +### ----------------- The TruFax facsimile device ---------------------- ###
  3698. +### Note: this driver was contributed by users: please contact           ###
  3699. +###       Neil Ostroff (nao@maestro.bellcore.com) if you have questions. ###
  3700. +### Note that the driver requires a file encode_l.o supplied by the      ###
  3701. +###   makers of the TruFax product.                                      ###
  3702. +
  3703. +trufax_=gdevtrfx.$(OBJ) gdevprn.$(OBJ) encode_l.$(OBJ)
  3704. +trufax.dev: $(trufax_) gssetdev
  3705. +    $(SHP)gssetdev trufax $(trufax_)
  3706. +
  3707. +gdevtrfx.$(OBJ): gdevtrfx.c $(GDEV)
  3708. +
  3709. +###### ----------------------- The X11 device ----------------------- ######
  3710. +
  3711. +# Aladdin Enterprises does not support Ghostview.  For more information
  3712. +# about Ghostview, please contact Tim Theisen (ghostview@cs.wisc.edu).
  3713. +
  3714. +x11_=gdevx.$(OBJ) gdevxini.$(OBJ) gdevxxf.$(OBJ) gdevemap.$(OBJ)
  3715. +x11.dev: $(x11_) gssetdev gsaddmod
  3716. +    $(SHP)gssetdev x11 $(x11_)
  3717. +    $(SHP)gsaddmod x11 -lib Xt X11 Xext
  3718. +
  3719. +# See the main makefile for the definition of XINCLUDE.
  3720. +GDEVX=$(GDEV) x_.h gdevx.h $(MAKEFILE)
  3721. +gdevx.$(OBJ): gdevx.c $(GDEVX) $(gsprops_h) $(gsutil_h)
  3722. +    $(CCC) $(XINCLUDE) gdevx.c
  3723. +
  3724. +gdevxini.$(OBJ): gdevxini.c $(GDEVX) $(ctype__h)
  3725. +    $(CCC) $(XINCLUDE) gdevxini.c
  3726. +
  3727. +gdevxxf.$(OBJ): gdevxxf.c $(GDEVX) $(gsutil_h) $(gxxfont_h)
  3728. +    $(CCC) $(XINCLUDE) gdevxxf.c
  3729. +
  3730. +### ---------------------- The bit bucket device ----------------------- ###
  3731. +
  3732. +bit_=gdevbit.$(OBJ) gdevprn.$(OBJ)
  3733. +bit.dev: $(bit_) gssetdev
  3734. +    $(SHP)gssetdev bit $(bit_)
  3735. +
  3736. +gdevbit.$(OBJ): gdevbit.c $(PDEVH)
  3737. +
  3738. +###### ----------------------- PC file formats ---------------------- ######
  3739. +
  3740. +gdevpccm.$(OBJ): gdevpccm.c $(AK) \
  3741. +  $(gs_h) $(gsmatrix_h) $(gxdevice_h) $(gdevpccm_h)
  3742. +
  3743. +### ------------------------- .BMP file formats ------------------------- ###
  3744. +
  3745. +bmp_=gdevbmp.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
  3746. +
  3747. +gdevbmp.$(OBJ): gdevbmp.c $(PDEVH) $(gdevpccm_h)
  3748. +
  3749. +bmpmono.dev: $(bmp_) gssetdev
  3750. +    $(SHP)gssetdev bmpmono $(bmp_)
  3751. +
  3752. +bmp16.dev: $(bmp_) gssetdev
  3753. +    $(SHP)gssetdev bmp16 $(bmp_)
  3754. +
  3755. +bmp256.dev: $(bmp_) gssetdev
  3756. +    $(SHP)gssetdev bmp256 $(bmp_)
  3757. +
  3758. +bmp16m.dev: $(bmp_) gssetdev
  3759. +    $(SHP)gssetdev bmp16m $(bmp_)
  3760. +
  3761. +### ------------------------- GIF file formats ------------------------- ###
  3762. +
  3763. +GIF=gdevgif.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
  3764. +
  3765. +gdevgif.$(OBJ): gdevgif.c $(PDEVH) $(gdevpccm_h)
  3766. +
  3767. +gifmono.dev: $(GIF) gssetdev
  3768. +    $(SHP)gssetdev gifmono $(GIF)
  3769. +
  3770. +gif8.dev: $(GIF) gssetdev
  3771. +    $(SHP)gssetdev gif8 $(GIF)
  3772. +
  3773. +### ------------------------- PCX file formats ------------------------- ###
  3774. +
  3775. +pcx_=gdevpcx.$(OBJ) gdevpccm.$(OBJ) gdevprn.$(OBJ)
  3776. +
  3777. +gdevpcx.$(OBJ): gdevpcx.c $(PDEVH) $(gdevpccm_h) $(gxlum_h)
  3778. +
  3779. +pcxmono.dev: $(pcx_) gssetdev
  3780. +    $(SHP)gssetdev pcxmono $(pcx_)
  3781. +
  3782. +pcxgray.dev: $(pcx_) gssetdev
  3783. +    $(SHP)gssetdev pcxgray $(pcx_)
  3784. +
  3785. +pcx16.dev: $(pcx_) gssetdev
  3786. +    $(SHP)gssetdev pcx16 $(pcx_)
  3787. +
  3788. +pcx256.dev: $(pcx_) gssetdev
  3789. +    $(SHP)gssetdev pcx256 $(pcx_)
  3790. +
  3791. +###### ------------------- Portable Bitmap devices ------------------ ######
  3792. +### For more information, see the pbm(5), pgm(5), and ppm(5) man pages.  ###
  3793. +
  3794. +pxm_=gdevpbm.$(OBJ) gdevprn.$(OBJ)
  3795. +
  3796. +gdevpbm.$(OBJ): gdevpbm.c $(PDEVH) $(gxlum_h)
  3797. +
  3798. +### Portable Bitmap (PBM, plain or raw format, magic numbers "P1" or "P4")
  3799. +
  3800. +pbm.dev: $(pxm_) gssetdev
  3801. +    $(SHP)gssetdev pbm $(pxm_)
  3802. +
  3803. +pbmraw.dev: $(pxm_) gssetdev
  3804. +    $(SHP)gssetdev pbmraw $(pxm_)
  3805. +
  3806. +### Portable Graymap (PGM, plain or raw format, magic numbers "P2" or "P5")
  3807. +
  3808. +pgm.dev: $(pxm_) gssetdev
  3809. +    $(SHP)gssetdev pgm $(pxm_)
  3810. +
  3811. +pgmraw.dev: $(pxm_) gssetdev
  3812. +    $(SHP)gssetdev pgmraw $(pxm_)
  3813. +
  3814. +### Portable Pixmap (PPM, plain or raw format, magic numbers "P3" or "P6")
  3815. +
  3816. +ppm.dev: $(pxm_) gssetdev
  3817. +    $(SHP)gssetdev ppm $(pxm_)
  3818. +
  3819. +ppmraw.dev: $(pxm_) gssetdev
  3820. +    $(SHP)gssetdev ppmraw $(pxm_)
  3821. +
  3822. +### -------------------------- TIFF/F device ---------------------------- ###
  3823. +###    This driver outputs images in a TIFF format               ###
  3824. +###    Use -sDEVICE=tiffg3 and                          ###
  3825. +###      -r204x98 for low resolution output, or              ###
  3826. +###      -r204x196 for high resolution output                  ###
  3827. +###    Note also that 3 page sizes are understood: letter, A4, and B4      ###
  3828. +### Note: this driver was contributed by a user: please contact           ###
  3829. +###       Sam Leffler (sam@sgi.com) if you have questions.              ###
  3830. +
  3831. +tiffg3_=gdevtiff.$(OBJ) gdevprn.$(OBJ)
  3832. +tiffg3.dev: $(tiffg3_) gssetdev
  3833. +    $(SHP)gssetdev tiffg3 $(tiffg3_)
  3834. +gdevtiff.$(OBJ): gdevtiff.c $(GDEV) $(gdevprn_h) gdevdfg3.h gdevtiff.h
  3835. +#    Copyright (C) 1990, 1992, 1993 Aladdin Enterprises.  All rights reserved.
  3836. +#
  3837. +# This file is part of Ghostscript.
  3838. +#
  3839. +# Ghostscript is distributed in the hope that it will be useful, but
  3840. +# WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  3841. +# to anyone for the consequences of using it or for whether it serves any
  3842. +# particular purpose or works at all, unless he says so in writing.  Refer
  3843. +# to the Ghostscript General Public License for full details.
  3844. +#
  3845. +# Everyone is granted permission to copy, modify and redistribute
  3846. +# Ghostscript, but only under the conditions described in the Ghostscript
  3847. +# General Public License.  A copy of this license is supposed to have been
  3848. +# given to you along with Ghostscript so you can know your rights and
  3849. +# responsibilities.  It should be in a file named COPYING.  Among other
  3850. +# things, the copyright notice and this notice must be preserved on all
  3851. +# copies.
  3852. +
  3853. +# Partial makefile for Ghostscript, common to all Unix configurations.
  3854. +
  3855. +# This is the last part of the makefile for Unix configurations.
  3856. +# Since Unix make doesn't have an 'include' facility, we concatenate
  3857. +# the various parts of the makefile together by brute force (in tar_cat).
  3858. +
  3859. +# The following prevents GNU make from constructing argument lists that
  3860. +# include all environment variables, which can easily be longer than
  3861. +# brain-damaged system V allows.
  3862. +
  3863. +.NOEXPORT:
  3864. +
  3865. +# -------------------------------- Library -------------------------------- #
  3866. +
  3867. +## The Commodore Amiga
  3868. +
  3869. +amiga__=gp_nofb.$(OBJ) gp_amiga.$(OBJ) gdevpipe.$(OBJ)
  3870. +amiga_.dev: $(amiga__) gssetmod gsaddmod
  3871. +    $(SHP)gssetmod amiga_ $(amiga__)
  3872. +    $(SHP)gsaddmod amiga_ -fdev pipe
  3873. +
  3874. +gp_amiga.$(OBJ): gp_amiga.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
  3875. +
  3876. +## The Unix platforms
  3877. +
  3878. +# We have to include a test for the existence of sys/time.h,
  3879. +# because some System V platforms don't have it.
  3880. +
  3881. +# All reasonable Unix platforms.
  3882. +unix__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gdevpipe.$(OBJ)
  3883. +unix_.dev: $(unix__) gssetmod gsaddmod
  3884. +    $(SHP)gssetmod unix_ $(unix__)
  3885. +    $(SHP)gsaddmod unix_ -fdev pipe
  3886. +
  3887. +gp_unix.$(OBJ): gp_unix.c $(AK) $(memory__h) $(string__h) $(gx_h) $(gp_h) \
  3888. + $(gsutil_h) $(stat__h) $(time__h)
  3889. +    if ( test -f /ade/include/sys/time.h ) then $(CCC) gp_unix.c;\
  3890. +    else $(CCC) -DNOSYSTIME gp_unix.c; fi
  3891. +
  3892. +gdevpipe.$(OBJ): gdevpipe.c $(AK) $(stdio__h) $(gstypes_h) \
  3893. +  $(filedev_h) $(stream_h)
  3894. +
  3895. +# Brain-damaged System V platforms.
  3896. +sysv__=gp_nofb.$(OBJ) gp_unix.$(OBJ) gp_sysv.$(OBJ)
  3897. +sysv_.dev: $(sysv__) gssetmod
  3898. +    $(SHP)gssetmod sysv_ $(sysv__)
  3899. +
  3900. +gp_sysv.$(OBJ): gp_sysv.c $(time__h) $(AK)
  3901. +    if ( test -f /ade/include/sys/time.h ) then $(CCC) gp_sysv.c;\
  3902. +    else $(CCC) -DNOSYSTIME gp_sysv.c; fi
  3903. +
  3904. +# -------------------------- Auxiliary programs --------------------------- #
  3905. +
  3906. +ansi2knr$(XE): ansi2knr.c $(stdio__h) $(string__h) $(malloc__h)
  3907. +    $(CC) -o ansi2knr$(XE) $(CFLAGS) ansi2knr.c
  3908. +
  3909. +echogs$(XE): echogs.c
  3910. +    $(CC) -o echogs$(XE) $(CFLAGS) echogs.c
  3911. +
  3912. +# On the RS/6000 (at least), compiling genarch.c with gcc with -O
  3913. +# produces a buggy executable.
  3914. +genarch$(XE): genarch.c
  3915. +    $(CC) -o genarch$(XE) genarch.c
  3916. +
  3917. +genconf$(XE): genconf.c
  3918. +    $(CC) -o genconf$(XE) genconf.c
  3919. +
  3920. +# ----------------------------- Main program ------------------------------ #
  3921. +
  3922. +BEGINFILES=
  3923. +CCBEGIN=$(CCC) *.c
  3924. +
  3925. +# Interpreter main program
  3926. +
  3927. +GSAMIGA=gs.$(OBJ) gsmain.$(OBJ) $(INT) $(LIBGS)
  3928. +
  3929. +# The second call on echogs writes a \.  This is the only
  3930. +# way to do it that works with all flavors of shell!
  3931. +$(GS)$(XE): $(GSAMIGA) ld.tr echogs $(ALL_DEVS)
  3932. +    ./echogs -n - $(CC) $(LDFLAGS) $(XLIBDIRS) -o gs $(GSAMIGA) >_temp_
  3933. +    ./echogs -x 205c >>_temp_
  3934. +    cat ld.tr >>_temp_
  3935. +    ./echogs - $(EXTRALIBS) -lm >>_temp_
  3936. +    $(SH) <_temp_
  3937. +
  3938. +# Installation
  3939. +
  3940. +TAGS:
  3941. +    etags -t *.c *.h
  3942. +
  3943. +docdir=$(gsdatadir)/doc
  3944. +exdir=$(gsdatadir)/examples
  3945. +
  3946. +install: $(GS)
  3947. +    if [ -d $(bindir) ]; then true; else mkdir $(bindir); fi
  3948. +    if [ -d $(datadir) ]; then true; else mkdir $(datadir); fi
  3949. +    if [ -d $(gsdatadir) ]; then true; else mkdir $(gsdatadir); fi
  3950. +    if [ -d $(gsdatadir)/fonts ]; then true; else mkdir $(gsdatadir)/fonts; fi
  3951. +    if [ -d $(docdir) ]; then true; else mkdir $(docdir); fi
  3952. +    if [ -d $(exdir) ]; then true; else mkdir $(exdir); fi
  3953. +    for f in $(GS) gsbj gsdj gslj gslp gsnd bdftops font2c ps2ascii ps2epsi ; do $(INSTALL_PROGRAM) $$f $(bindir)/$$f ; done
  3954. +    for f in README gslp.ps gs_init.ps gs_dps1.ps gs_fonts.ps gs_lev2.ps gs_statd.ps gs_type0.ps gs_dbt_e.ps gs_sym_e.ps quit.ps Fontmap uglyr.gsf bdftops.ps decrypt.ps font2c.ps impath.ps landscap.ps level1.ps prfont.ps ps2ascii.ps ps2epsi.ps ps2image.ps pstoppm.ps showpage.ps type1ops.ps wrfont.ps ; do $(INSTALL_DATA) $$f $(gsdatadir)/$$f ; done
  3955. +    for f in NEWS ansi2knr.1 devices.doc drivers.doc fonts.doc gs.1 hershey.doc history.doc humor.doc language.doc lib.doc make.doc ps2epsi.doc psfiles.doc readme.doc use.doc xfonts.doc ; do $(INSTALL_DATA) $$f $(docdir)/$$f ; done
  3956. +    for f in chess.ps cheq.ps colorcir.ps golfer.ps escher.ps snowflak.ps tiger.ps ; do $(INSTALL_DATA) $$f $(exdir)/$$f ; done
  3957. diff -rup --new-file baseline/fsf/ghostscript/amiga.doc amiga/fsf/ghostscript/amiga.doc
  3958. --- baseline/fsf/ghostscript/amiga.doc    Wed Dec 31 17:00:00 1969
  3959. +++ amiga/fsf/ghostscript/amiga.doc    Sat Sep 28 00:00:00 1996
  3960. @@ -0,0 +1,318 @@
  3961. +GNU Ghostscript 2.6.1 Amiga port, revised 29 January 1994
  3962. +=========================================================
  3963. +This port requires:
  3964. +
  3965. +- An  Amiga  equipped  with  an '020 CPU or any successor CPU model and and
  3966. +  Kickstart 2.04 or higher.
  3967. +
  3968. +- Approx. 4.7 MBytes of hard disk space available.
  3969. +
  3970. +- A  minimum  of 1 MByte of chip memory, depending on what you will want to
  3971. +  do  with  the  interpreter.  Printer output requires at least 2 MBytes of
  3972. +  contiguous memory (any memory, not necessarily chip memory).
  3973. +
  3974. +- ixemul.library and a bunch of Postscript/Ghostscript fonts.
  3975. +
  3976. +
  3977. +New features in the revised v2.6.1 release
  3978. +------------------------------------------
  3979. +By  public  request  I have recompiled the program to use the built-in math
  3980. +library,  so  you  no  longer need an FPU to run the program. I also took a
  3981. +closer  look  at  the  code  which  tries  to  determine  the  printer page
  3982. +resolution:  you  will  no  longer  have  trouble  with  printers featuring
  3983. +built-in  paper  tractors.  I  tried all printer drivers to be found on the
  3984. +Workbench  disk  to  make  sure the printer support code really works. Good
  3985. +luck!  Some  small  bugs  were  ironed  out and I also took the time to add
  3986. +support  for  another  two  display  drivers  (the  Picasso II driver which
  3987. +requires  the  Picasso  monitor  driver  v2.14  to  work  correctly and the
  3988. +`custom' driver which requires asl.library v38 to be installed). The entire
  3989. +program was recompiled using GCC 2.4.5.
  3990. +
  3991. +
  3992. +New Amiga features in release v2.6.1
  3993. +------------------------------------
  3994. +The  v2.6.0 port used to implement only monochrome drivers, the v2.6.1 port
  3995. +supports  colour  output on most devices, exceptions where noted. You don't
  3996. +need  a  special  brand  of graphics hardware expansion, colour output will
  3997. +work  on  any  Amiga  model, provided there is enough memory available. All
  3998. +devices capable of doing colour output will reduce the number of colours to
  3999. +be displayed if in dire need of memory. As for the display oriented devices
  4000. +this will go mostly unnoticed as the Ghostscript halftoning algorithms will
  4001. +compensate  for  any  colour reductions. However, printer output quality is
  4002. +very likely to suffer from colour reduction. So, watch out!
  4003. +   As  the display oriented devices start up in colour output mode, black &
  4004. +white  rendering  may  be slightly slowed. The printer device is configured
  4005. +according  to  the  Preferences  settings;  `Black  & white' will result in
  4006. +monochrome  output,  `Grayscale  1'  and  `Grayscale  2'  will also produce
  4007. +monochrome  output  but will internally use a true colour representation of
  4008. +the  page,  so  does  `Color'. Please note that `true colour' refers to the
  4009. +Amiga  12  bit colour model, at this time of writing 24 bit colour printing
  4010. +is not yet implemented.
  4011. +   The  default  output  device  (a  super-bitmap  window  to opened on the
  4012. +default  public  screen,  such  as  Workbench)  will  take advantage of the
  4013. +Kickstart  3.0  pen  sharing  feature  if  enough  colours  (eight or more)
  4014. +are available.
  4015. +
  4016. +The v2.6.0 port used to rely on printer drivers to initialize their maximum
  4017. +page  size  information  upon startup. Several users reported problems with
  4018. +certain  drivers  which  would  make  this information available only after
  4019. +having  been  asked  to do so. The v2.6.1 port now follows the programmers'
  4020. +guidelines  how  to determine the maximum page size closely. The driver may
  4021. +still  complain  if  configured for `Grayscale 1', `Grayscale 2' or `Color'
  4022. +output  and  there  is  not  enough  memory  available  for  the page to be
  4023. +displayed.
  4024. +
  4025. +
  4026. +Installation
  4027. +------------
  4028. +Enter  the  command  line interpreter, Create a directory on your hard disk
  4029. +drive,  label  it "ghostscript". Let's assume that the fully qualified name
  4030. +of  this  directory  will  be  "Work:ghostscript". Enter this directory and
  4031. +unpack  the  archive  "gs-2.6.1-amiga.lha".  This will create the directory
  4032. +"doc" which contains the Ghostscript documentation files, and the directory
  4033. +"examples" which is to hold some Postscript example files. To add the fonts
  4034. +from  the  Ghostscript distribution (not included in this release) create a
  4035. +directory  called  "Fonts" in the directory "Work:ghostscript" and copy all
  4036. +the  font files into it. You also need the `ixemul.library' included in the
  4037. +Amiga GCC distribution which should be copied to the `Libs:' directory. Now
  4038. +edit your `S:User-Startup' file, adding the following lines:
  4039. +
  4040. +   Assign ghostscript: "Work:ghostscript"
  4041. +   Path ghostscript: add
  4042. +
  4043. +Save the file back to disk and reboot your machine.
  4044. +
  4045. +
  4046. +Running the interpreter
  4047. +-----------------------
  4048. +Enter  the  command  line  interpreter,  type  "gs"  and  press return. The
  4049. +interpreter   will  be  loaded  and  will  try  to  initialize  itself.  If
  4050. +successfully initialized, a window should have been opened on the Workbench
  4051. +screen. The Shell window now should display the following text:
  4052. +
  4053. +   Initializing... done.
  4054. +   Ghostscript 2.6.1 (5/28/93)
  4055. +   Copyright (C) 1990-1993 Aladdin Enterprises, Menlo Park, CA.
  4056. +     All rights reserved.
  4057. +   Ghostscript comes with NO WARRANTY: see the file COPYING for details.
  4058. +   GS>
  4059. +
  4060. +At  the  command  prompt,  enter "(ghostscript:examples/golfer.ps) run" and
  4061. +press  return.  Click  on  the `Zoom' button in the top right corner of the
  4062. +window  to  bring it to full screen size, move the scrollers and watch what
  4063. +will  happen. When rendering is finished, the Shell window will display the
  4064. +following text:
  4065. +
  4066. +   >>showpage, press <return> to continue<<
  4067. +
  4068. +Press  return  to  erase  the  contents  of the window and to continue. The
  4069. +interpreter  will  be  in  interactive  mode  again, enter "quit" and press
  4070. +return to end this session.
  4071. +
  4072. +For  more  information  refer to the documentation in the "ghostscript:doc"
  4073. +drawer.
  4074. +
  4075. +
  4076. +How to print a document
  4077. +-----------------------
  4078. +As the corresponding Ghostscript device will always keep the entire page in
  4079. +memory  the  printer need not be capable of strip-printing. The bad news is
  4080. +that  the  entire page will consume *a lot* of memory. This Amiga port will
  4081. +keep  the page in any public memory area, so it will not necessarily eat up
  4082. +precious chip memory. This should make it possible to print pages on Amigas
  4083. +with  only  1  MByte of chip memory or less, provided enough fast memory is
  4084. +available.
  4085. +
  4086. +Enter  the  command  line interpreter, type "gs -sDEVICE=amiga_printer" and
  4087. +press  return.  This  will  invoke  the  Ghostscript  interpreter  with the
  4088. +"amiga_printer"  device  driver  selected  as  the startup device. When the
  4089. +command prompt appears, enter "(ghostscript:examples/butterfly.ps) run" and
  4090. +press return. The rendered image will be sent to the printer. When printing
  4091. +is finished, press return and enter "quit" to end this session.
  4092. +
  4093. +Note:  unless you want Ghostscript to prompt you to press return after each
  4094. +page  is  printed and ejected you should include "-dNOPAUSE" on the command
  4095. +line.
  4096. +
  4097. +
  4098. +Available device drivers
  4099. +------------------------
  4100. +This port implements the following nine device drivers:
  4101. +
  4102. +   amiga
  4103. +
  4104. +      (This is the default output device)
  4105. +
  4106. +      Rendering  takes  place  in a super-bitmap window to be opened on the
  4107. +      Workbench  screen.  This  window  contains  scroller  handles to move
  4108. +      around in the bitmap. Usually, the bitmap will be four times as large
  4109. +      as the screen the window opens upon.
  4110. +
  4111. +   amiga_low
  4112. +
  4113. +      Renders into a low-resolution custom screen.
  4114. +
  4115. +   amiga_high
  4116. +
  4117. +      Renders into a high-resolution custom screen.
  4118. +
  4119. +   amiga_super
  4120. +
  4121. +      Renders into a super-high-resolution custom screen.
  4122. +
  4123. +   amiga_a2024¹
  4124. +
  4125. +      Renders into an A2024 resolution custom screen.
  4126. +
  4127. +   amiga_picassoii
  4128. +
  4129. +      Renders  into  a Picasso  II custom  screen (note: a plain  Intuition
  4130. +      custom screen  will be opened, this  driver will not directly  access
  4131. +      the  Picasso II  hardware).  The  Picasso  monitor  driver  v2.14  is
  4132. +      required for this driver to work.
  4133. +
  4134. +   amiga_custom
  4135. +
  4136. +      Unlike   the  other  display  drivers  which  will  open  screens  in
  4137. +      predefined  resolutions  and modes the `amiga_custom' driver will let
  4138. +      you select the display mode to use. On first invocation of the driver
  4139. +      a  screen mode requester will be opened for you to select the display
  4140. +      mode  to use. The name of the display mode selected will be stored in
  4141. +      a local environment variable called "GSCUSTOMMODE". The next time you
  4142. +      run  the  GhostScript  interpreter  with  the  `amiga_custom'  device
  4143. +      selected   the   device   will  try  to  read  the  contents  of  the
  4144. +      "GSCUSTOMMODE"  variable.  The list of screen display modes available
  4145. +      will  be scanned for a mode which name matches the variable. Wildcard
  4146. +      patterns  are  supported,  so  setting "GSCUSTOMMODE" to "#?lowres#?"
  4147. +      will  match  any  screen display mode with the string "lowres" in it,
  4148. +      such  as "NTSC:LowRes", "PAL:LowRes", etc. If you wish, you could set
  4149. +      the  global  environment  variable  "GSCUSTOMMODE" to a special value
  4150. +      which the `amiga_custom' device will always use. Please note that the
  4151. +      screen  mode  requester  will  only  be  opened if no local or global
  4152. +      environment variable "GSCUSTOMMODE" is defined.
  4153. +
  4154. +   amiga_printer
  4155. +
  4156. +      Outputs  pages  on  the  currently  configured  preferences  printer.
  4157. +      Respects density and resolution settings. Requires a lot of memory to
  4158. +      run.
  4159. +
  4160. +   amiga_ilbm¹
  4161. +
  4162. +      Will prompt for a file name to save the current page contents to. The
  4163. +      page  will  be  saved  as  a standard IFF-ILBM picture, including DPI
  4164. +      information,   suitable   for  postprocessing  using  standard  image
  4165. +      processing and editing software.
  4166. +
  4167. +
  4168. +   ¹) Monochrome output only
  4169. +
  4170. +
  4171. +Properties
  4172. +----------
  4173. +With  Ghostscript  2.6.1 one can specify several driver specific options on
  4174. +the  command  line.  As  for  the Amiga drivers, they support the following
  4175. +properties:
  4176. +
  4177. +- PageWidth and PageHeight
  4178. +
  4179. +  The  dimensions  of  the  page  to  render  into.  The physical page size
  4180. +  Ghostscript  will  use  for  rendering is limited by these dimensions. On
  4181. +  startup  The Amiga drivers will default to a page size roughly equivalent
  4182. +  to A4 unless different dimensions are specified. The size definitions may
  4183. +  include  measuring  units  (e.g. "-sPageWidth=21cm"), the following units
  4184. +  are  supported: pt (points, the default if no unit is given), pc (picas),
  4185. +  in  (inches),  cm  (centimeters), mm (millimeters), dd (didôt points), cc
  4186. +  (ciceros).
  4187. +
  4188. +- OutputFile
  4189. +
  4190. +  The  amiga_ilbm device pays attention to this property, which it will use
  4191. +  to  construct  the  output  file  names for pages to be saved with. Thus,
  4192. +  `-sOutputFile="ram:page"'    yields    the   files   "ram:page0001.ilbm",
  4193. +  "ram:page0002.ilbm", etc.
  4194. +
  4195. +
  4196. +Not all devices will pay attention to DPI page resolutions.
  4197. +
  4198. +
  4199. +Installing fonts
  4200. +----------------
  4201. +The   Ghostscript  distribution  includes  a  number  of  public-domain  or
  4202. +otherwise  freely  distributable  fonts.  However, these are mostly of poor
  4203. +quality.  In  order  to  install  a  new  font  or to replace a font with a
  4204. +different one, the following steps are required:
  4205. +
  4206. +1. The  font  must  be  converted  to  Ghostscript format. For font files in
  4207. +   BDF-format  (such  as  the  fonts included in the X-Windows distribution)
  4208. +   this  requires  processing  with  the  "bdftops"  script  file (syntax is
  4209. +   "bdftops <Source file> <Destination file>"). Fonts in standard ASCII text
  4210. +   format (".PFA" format) or packed binary file format (".PFB" format), such
  4211. +   as  most  Adobe-Type-1  hinted outline fonts to be purchased from various
  4212. +   vendors, need  not  be converted as this is the native format Ghostscript
  4213. +   expects.
  4214. +
  4215. +2. Copy  the resulting output file to the "ghostscript:fonts" drawer, choose
  4216. +   a   suitable   name   (see   the   file  "ghostscript:fontmap"  for  more
  4217. +   information).
  4218. +
  4219. +3. Edit  the  file "ghostscript:fontmap" to include the font which will make
  4220. +   it visible to the interpreter. Read this file carefully as it gives basic
  4221. +   hints  how  to  name  a  font file and how to edit the corresponding font
  4222. +   entry.
  4223. +
  4224. +
  4225. +The Workbench window
  4226. +--------------------
  4227. +The  default output device (the Workbench window) can be controlled both by
  4228. +mouse and by keyboard:
  4229. +
  4230. +   Cursor  keys  will  move the currently visible area of the page, holding
  4231. +   down  a  Shift  or  Control  key will increase the size of the scrolling
  4232. +   steps.
  4233. +
  4234. +   Control+C  and  Escape  will  send the interpreter a signal to terminate
  4235. +   processing, so does clicking the window close button.
  4236. +
  4237. +By  default  the  page  size  will  always  be  four  times as large as the
  4238. +currently visible portion of the Workbench screen, see the section entitled
  4239. +"Page sizes and resolutions" for more information.
  4240. +
  4241. +
  4242. +Troubleshooting
  4243. +---------------
  4244. +This  interpreter  implementation  requires a lot of chip memory to run. In
  4245. +order  to  assure that enough memory will be available, close any Workbench
  4246. +drawers  or  Shell  windows  which  are  not necessarily require to run the
  4247. +interpreter.
  4248. +
  4249. +Most  Postscript  documents  use  hard-coded  document page sizes, i.e. the
  4250. +output  page  size  will not be scaled to fit the currently set output page
  4251. +size.  In  these  cases  you may want to make use of the Postscript "scale"
  4252. +operator. Say, you wish to preview the file "butterfly.ps" in just half its
  4253. +size.  Enter  "0.5  dup  scale" and press return, now enter "(butterfly.ps)
  4254. +run"  and  press return; et voilà: the butterfly will be rendered just half
  4255. +as large as usual.
  4256. +
  4257. +Some  documents,  such  as  "porsche.ps",  contain no "showpage" command to
  4258. +finish  the  batch  job.  In this case, type "showpage" and press return or
  4259. +enter "erasepage" and press return to clear the page.
  4260. +
  4261. +
  4262. +About the Amiga port
  4263. +--------------------
  4264. +This  port  is  based  on  Ghostscript  2.6.1. It was implemented using GCC
  4265. +2.4.5,  so  you  will  have  to refer to the file "COPYING" for copying and
  4266. +licensing information.
  4267. +
  4268. +                      This Amiga port was created by:
  4269. +
  4270. +                           Olaf `Olsen' Barthel
  4271. +                             Brabeckstrasse 35
  4272. +                             D-30559 Hannover
  4273. +
  4274. +                        Federal Republic of Germany
  4275. +
  4276. +                       eMail: olsen@sourcery.han.de
  4277. +
  4278. +The source code is included in the "amiga-src" drawer.
  4279. diff -rup --new-file baseline/fsf/ghostscript/bdftops amiga/fsf/ghostscript/bdftops
  4280. --- baseline/fsf/ghostscript/bdftops    Tue Oct 22 00:12:14 1991
  4281. +++ amiga/fsf/ghostscript/bdftops    Sat Sep 28 00:00:00 1996
  4282. @@ -1 +1,4 @@
  4283. -gs -q -dNODISPLAY -- bdftops.ps $*
  4284. +.key ARGS/F
  4285. +.bra {
  4286. +.ket }
  4287. +gs -q -dNODISPLAY -- bdftops.ps {ARGS}
  4288. diff -rup --new-file baseline/fsf/ghostscript/configure amiga/fsf/ghostscript/configure
  4289. --- baseline/fsf/ghostscript/configure    Wed Dec 31 17:00:00 1969
  4290. +++ amiga/fsf/ghostscript/configure    Mon Sep 30 22:44:58 1996
  4291. @@ -0,0 +1,1055 @@
  4292. +#! /bin/sh
  4293. +
  4294. +# Guess values for system-dependent variables and create Makefiles.
  4295. +# Generated automatically using autoconf version 2.10 
  4296. +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  4297. +#
  4298. +# This configure script is free software; the Free Software Foundation
  4299. +# gives unlimited permission to copy, distribute and modify it.
  4300. +
  4301. +# Defaults:
  4302. +ac_help=
  4303. +ac_default_prefix=/usr/local
  4304. +# Any additions from configure.in:
  4305. +
  4306. +# Initialize some variables set by options.
  4307. +# The variables have the same names as the options, with
  4308. +# dashes changed to underlines.
  4309. +build=NONE
  4310. +cache_file=./config.cache
  4311. +exec_prefix=NONE
  4312. +host=NONE
  4313. +no_create=
  4314. +nonopt=NONE
  4315. +no_recursion=
  4316. +prefix=NONE
  4317. +program_prefix=NONE
  4318. +program_suffix=NONE
  4319. +program_transform_name=s,x,x,
  4320. +silent=
  4321. +site=
  4322. +srcdir=
  4323. +target=NONE
  4324. +verbose=
  4325. +x_includes=NONE
  4326. +x_libraries=NONE
  4327. +bindir='${exec_prefix}/bin'
  4328. +sbindir='${exec_prefix}/sbin'
  4329. +libexecdir='${exec_prefix}/libexec'
  4330. +datadir='${prefix}/share'
  4331. +sysconfdir='${prefix}/etc'
  4332. +sharedstatedir='${prefix}/com'
  4333. +localstatedir='${prefix}/var'
  4334. +libdir='${exec_prefix}/lib'
  4335. +includedir='${prefix}/include'
  4336. +oldincludedir='/usr/include'
  4337. +infodir='${prefix}/info'
  4338. +guidedir='${prefix}/guide'
  4339. +psdir='${prefix}/ps'
  4340. +dvidir='${prefix}/dvi'
  4341. +mandir='${prefix}/man'
  4342. +
  4343. +# Initialize some other variables.
  4344. +subdirs=
  4345. +MFLAGS= MAKEFLAGS=
  4346. +
  4347. +ac_prev=
  4348. +for ac_option
  4349. +do
  4350. +
  4351. +  # If the previous option needs an argument, assign it.
  4352. +  if test -n "$ac_prev"; then
  4353. +    eval "$ac_prev=\$ac_option"
  4354. +    ac_prev=
  4355. +    continue
  4356. +  fi
  4357. +
  4358. +  case "$ac_option" in
  4359. +  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  4360. +  *) ac_optarg= ;;
  4361. +  esac
  4362. +
  4363. +  # Accept the important Cygnus configure options, so we can diagnose typos.
  4364. +
  4365. +  case "$ac_option" in
  4366. +
  4367. +  -bindir | --bindir | --bindi | --bind | --bin | --bi)
  4368. +    ac_prev=bindir ;;
  4369. +  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  4370. +    bindir="$ac_optarg" ;;
  4371. +
  4372. +  -build | --build | --buil | --bui | --bu)
  4373. +    ac_prev=build ;;
  4374. +  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  4375. +    build="$ac_optarg" ;;
  4376. +
  4377. +  -cache-file | --cache-file | --cache-fil | --cache-fi \
  4378. +  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  4379. +    ac_prev=cache_file ;;
  4380. +  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  4381. +  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  4382. +    cache_file="$ac_optarg" ;;
  4383. +
  4384. +  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  4385. +    ac_prev=datadir ;;
  4386. +  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  4387. +  | --da=*)
  4388. +    datadir="$ac_optarg" ;;
  4389. +
  4390. +  -disable-* | --disable-*)
  4391. +    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  4392. +    # Reject names that are not valid shell variable names.
  4393. +    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  4394. +      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  4395. +    fi
  4396. +    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  4397. +    eval "enable_${ac_feature}=no" ;;
  4398. +
  4399. +  -enable-* | --enable-*)
  4400. +    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  4401. +    # Reject names that are not valid shell variable names.
  4402. +    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  4403. +      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  4404. +    fi
  4405. +    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  4406. +    case "$ac_option" in
  4407. +      *=*) ;;
  4408. +      *) ac_optarg=yes ;;
  4409. +    esac
  4410. +    eval "enable_${ac_feature}='$ac_optarg'" ;;
  4411. +
  4412. +  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  4413. +  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  4414. +  | --exec | --exe | --ex)
  4415. +    ac_prev=exec_prefix ;;
  4416. +  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  4417. +  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  4418. +  | --exec=* | --exe=* | --ex=*)
  4419. +    exec_prefix="$ac_optarg" ;;
  4420. +
  4421. +  -gas | --gas | --ga | --g)
  4422. +    # Obsolete; use --with-gas.
  4423. +    with_gas=yes ;;
  4424. +
  4425. +  -help | --help | --hel | --he)
  4426. +    # Omit some internal or obsolete options to make the list less imposing.
  4427. +    # This message is too long to be a string in the A/UX 3.1 sh.
  4428. +    cat << EOF
  4429. +Usage: configure [options] [host]
  4430. +Options: [defaults in brackets after descriptions]
  4431. +Configuration:
  4432. +  --cache-file=FILE       cache test results in FILE
  4433. +  --help                  print this message
  4434. +  --no-create             do not create output files
  4435. +  --quiet, --silent       do not print \`checking...' messages
  4436. +  --version               print the version of autoconf that created configure
  4437. +Directory and file names:
  4438. +  --prefix=PREFIX         install architecture-independent files in PREFIX
  4439. +                          [$ac_default_prefix]
  4440. +  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
  4441. +                          [same as prefix]
  4442. +  --bindir=DIR            user executables in DIR [EPREFIX/bin]
  4443. +  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
  4444. +  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
  4445. +  --datadir=DIR           read-only architecture-independent data in DIR
  4446. +                          [PREFIX/share]
  4447. +  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
  4448. +  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
  4449. +                          [PREFIX/com]
  4450. +  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
  4451. +  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
  4452. +  --includedir=DIR        C header files in DIR [PREFIX/include]
  4453. +  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  4454. +  --infodir=DIR           info documentation in DIR [PREFIX/info]
  4455. +  --guidedir=DIR          Amigaguide documentation in DIR [PREFIX/guide]
  4456. +  --psdir=DIR             postscript documentation in DIR [PREFIX/ps]
  4457. +  --dvidir=DIR            TeX dvi documentation in DIR [PREFIX/dvi]
  4458. +  --mandir=DIR            man documentation in DIR [PREFIX/man]
  4459. +  --srcdir=DIR            find the sources in DIR [configure dir or ..]
  4460. +  --program-prefix=PREFIX prepend PREFIX to installed program names
  4461. +  --program-suffix=SUFFIX append SUFFIX to installed program names
  4462. +  --program-transform-name=PROGRAM
  4463. +                          run sed PROGRAM on installed program names
  4464. +EOF
  4465. +    cat << EOF
  4466. +Host type:
  4467. +  --build=BUILD           configure for building on BUILD [BUILD=HOST]
  4468. +  --host=HOST             configure for HOST [guessed]
  4469. +  --target=TARGET         configure for TARGET [TARGET=HOST]
  4470. +Features and packages:
  4471. +  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  4472. +  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  4473. +  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  4474. +  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  4475. +  --x-includes=DIR        X include files are in DIR
  4476. +  --x-libraries=DIR       X library files are in DIR
  4477. +EOF
  4478. +    if test -n "$ac_help"; then
  4479. +      echo "--enable and --with options recognized:$ac_help"
  4480. +    fi
  4481. +    exit 0 ;;
  4482. +
  4483. +  -host | --host | --hos | --ho)
  4484. +    ac_prev=host ;;
  4485. +  -host=* | --host=* | --hos=* | --ho=*)
  4486. +    host="$ac_optarg" ;;
  4487. +
  4488. +  -includedir | --includedir | --includedi | --included | --include \
  4489. +  | --includ | --inclu | --incl | --inc)
  4490. +    ac_prev=includedir ;;
  4491. +  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  4492. +  | --includ=* | --inclu=* | --incl=* | --inc=*)
  4493. +    includedir="$ac_optarg" ;;
  4494. +
  4495. +  -infodir | --infodir | --infodi | --infod | --info | --inf)
  4496. +    ac_prev=infodir ;;
  4497. +  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  4498. +    infodir="$ac_optarg" ;;
  4499. +
  4500. + -guidedir | --guidedir | --guidedi | --guided | --guide | --gui)
  4501. +   ac_prev=guidedir ;;
  4502. + -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+    guidedir="$ac_optarg" ;;
  4503. +
  4504. + -psdir | --psdir | --psdi | --psd | --ps)
  4505. +   ac_prev=psdir ;;
  4506. + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+    psdir="$ac_optarg" ;;
  4507. +
  4508. + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
  4509. +   ac_prev=dvidir ;;
  4510. + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+    dvidir="$ac_optarg" ;;
  4511. +
  4512. +  -libdir | --libdir | --libdi | --libd)
  4513. +    ac_prev=libdir ;;
  4514. +  -libdir=* | --libdir=* | --libdi=* | --libd=*)
  4515. +    libdir="$ac_optarg" ;;
  4516. +
  4517. +  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  4518. +  | --libexe | --libex | --libe)
  4519. +    ac_prev=libexecdir ;;
  4520. +  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  4521. +  | --libexe=* | --libex=* | --libe=*)
  4522. +    libexecdir="$ac_optarg" ;;
  4523. +
  4524. +  -localstatedir | --localstatedir | --localstatedi | --localstated \
  4525. +  | --localstate | --localstat | --localsta | --localst \
  4526. +  | --locals | --local | --loca | --loc | --lo)
  4527. +    ac_prev=localstatedir ;;
  4528. +  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  4529. +  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  4530. +  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  4531. +    localstatedir="$ac_optarg" ;;
  4532. +
  4533. +  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  4534. +    ac_prev=mandir ;;
  4535. +  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  4536. +    mandir="$ac_optarg" ;;
  4537. +
  4538. +  -nfp | --nfp | --nf)
  4539. +    # Obsolete; use --without-fp.
  4540. +    with_fp=no ;;
  4541. +
  4542. +  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  4543. +  | --no-cr | --no-c)
  4544. +    no_create=yes ;;
  4545. +
  4546. +  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  4547. +  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  4548. +    no_recursion=yes ;;
  4549. +
  4550. +  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  4551. +  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  4552. +  | --oldin | --oldi | --old | --ol | --o)
  4553. +    ac_prev=oldincludedir ;;
  4554. +  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  4555. +  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  4556. +  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  4557. +    oldincludedir="$ac_optarg" ;;
  4558. +
  4559. +  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  4560. +    ac_prev=prefix ;;
  4561. +  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  4562. +    prefix="$ac_optarg" ;;
  4563. +
  4564. +  -program-prefix | --program-prefix | --program-prefi | --program-pref \
  4565. +  | --program-pre | --program-pr | --program-p)
  4566. +    ac_prev=program_prefix ;;
  4567. +  -program-prefix=* | --program-prefix=* | --program-prefi=* \
  4568. +  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  4569. +    program_prefix="$ac_optarg" ;;
  4570. +
  4571. +  -program-suffix | --program-suffix | --program-suffi | --program-suff \
  4572. +  | --program-suf | --program-su | --program-s)
  4573. +    ac_prev=program_suffix ;;
  4574. +  -program-suffix=* | --program-suffix=* | --program-suffi=* \
  4575. +  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  4576. +    program_suffix="$ac_optarg" ;;
  4577. +
  4578. +  -program-transform-name | --program-transform-name \
  4579. +  | --program-transform-nam | --program-transform-na \
  4580. +  | --program-transform-n | --program-transform- \
  4581. +  | --program-transform | --program-transfor \
  4582. +  | --program-transfo | --program-transf \
  4583. +  | --program-trans | --program-tran \
  4584. +  | --progr-tra | --program-tr | --program-t)
  4585. +    ac_prev=program_transform_name ;;
  4586. +  -program-transform-name=* | --program-transform-name=* \
  4587. +  | --program-transform-nam=* | --program-transform-na=* \
  4588. +  | --program-transform-n=* | --program-transform-=* \
  4589. +  | --program-transform=* | --program-transfor=* \
  4590. +  | --program-transfo=* | --program-transf=* \
  4591. +  | --program-trans=* | --program-tran=* \
  4592. +  | --progr-tra=* | --program-tr=* | --program-t=*)
  4593. +    program_transform_name="$ac_optarg" ;;
  4594. +
  4595. +  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  4596. +  | -silent | --silent | --silen | --sile | --sil)
  4597. +    silent=yes ;;
  4598. +
  4599. +  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  4600. +    ac_prev=sbindir ;;
  4601. +  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  4602. +  | --sbi=* | --sb=*)
  4603. +    sbindir="$ac_optarg" ;;
  4604. +
  4605. +  -sharedstatedir | --sharedstatedir | --sharedstatedi \
  4606. +  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  4607. +  | --sharedst | --shareds | --shared | --share | --shar \
  4608. +  | --sha | --sh)
  4609. +    ac_prev=sharedstatedir ;;
  4610. +  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  4611. +  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  4612. +  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  4613. +  | --sha=* | --sh=*)
  4614. +    sharedstatedir="$ac_optarg" ;;
  4615. +
  4616. +  -site | --site | --sit)
  4617. +    ac_prev=site ;;
  4618. +  -site=* | --site=* | --sit=*)
  4619. +    site="$ac_optarg" ;;
  4620. +
  4621. +  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  4622. +    ac_prev=srcdir ;;
  4623. +  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  4624. +    srcdir="$ac_optarg" ;;
  4625. +
  4626. +  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  4627. +  | --syscon | --sysco | --sysc | --sys | --sy)
  4628. +    ac_prev=sysconfdir ;;
  4629. +  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  4630. +  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  4631. +    sysconfdir="$ac_optarg" ;;
  4632. +
  4633. +  -target | --target | --targe | --targ | --tar | --ta | --t)
  4634. +    ac_prev=target ;;
  4635. +  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  4636. +    target="$ac_optarg" ;;
  4637. +
  4638. +  -v | -verbose | --verbose | --verbos | --verbo | --verb)
  4639. +    verbose=yes ;;
  4640. +
  4641. +  -version | --version | --versio | --versi | --vers)
  4642. +    echo "configure generated by autoconf version 2.10"
  4643. +    exit 0 ;;
  4644. +
  4645. +  -with-* | --with-*)
  4646. +    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  4647. +    # Reject names that are not valid shell variable names.
  4648. +    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  4649. +      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  4650. +    fi
  4651. +    ac_package=`echo $ac_package| sed 's/-/_/g'`
  4652. +    case "$ac_option" in
  4653. +      *=*) ;;
  4654. +      *) ac_optarg=yes ;;
  4655. +    esac
  4656. +    eval "with_${ac_package}='$ac_optarg'" ;;
  4657. +
  4658. +  -without-* | --without-*)
  4659. +    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  4660. +    # Reject names that are not valid shell variable names.
  4661. +    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  4662. +      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  4663. +    fi
  4664. +    ac_package=`echo $ac_package| sed 's/-/_/g'`
  4665. +    eval "with_${ac_package}=no" ;;
  4666. +
  4667. +  --x)
  4668. +    # Obsolete; use --with-x.
  4669. +    with_x=yes ;;
  4670. +
  4671. +  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  4672. +  | --x-incl | --x-inc | --x-in | --x-i)
  4673. +    ac_prev=x_includes ;;
  4674. +  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  4675. +  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  4676. +    x_includes="$ac_optarg" ;;
  4677. +
  4678. +  -x-libraries | --x-libraries | --x-librarie | --x-librari \
  4679. +  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  4680. +    ac_prev=x_libraries ;;
  4681. +  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  4682. +  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  4683. +    x_libraries="$ac_optarg" ;;
  4684. +
  4685. +  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  4686. +    ;;
  4687. +
  4688. +  *)
  4689. +    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  4690. +      echo "configure: warning: $ac_option: invalid host type" 1>&2
  4691. +    fi
  4692. +    if test "x$nonopt" != xNONE; then
  4693. +      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  4694. +    fi
  4695. +    nonopt="$ac_option"
  4696. +    ;;
  4697. +
  4698. +  esac
  4699. +done
  4700. +
  4701. +if test -n "$ac_prev"; then
  4702. +  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  4703. +fi
  4704. +
  4705. +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  4706. +
  4707. +# File descriptor usage:
  4708. +# 0 standard input
  4709. +# 1 file creation
  4710. +# 2 errors and warnings
  4711. +# 3 some systems may open it to /dev/tty
  4712. +# 4 used on the Kubota Titan
  4713. +# 6 checking for... messages and results
  4714. +# 5 compiler messages saved in config.log
  4715. +if test "$silent" = yes; then
  4716. +  exec 6>/dev/null
  4717. +else
  4718. +  exec 6>&1
  4719. +fi
  4720. +exec 5>./config.log
  4721. +
  4722. +echo "\
  4723. +This file contains any messages produced by compilers while
  4724. +running configure, to aid debugging if configure makes a mistake.
  4725. +" 1>&5
  4726. +
  4727. +# Strip out --no-create and --no-recursion so they do not pile up.
  4728. +# Also quote any args containing shell metacharacters.
  4729. +ac_configure_args=
  4730. +for ac_arg
  4731. +do
  4732. +  case "$ac_arg" in
  4733. +  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  4734. +  | --no-cr | --no-c) ;;
  4735. +  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  4736. +  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  4737. +  *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  4738. +  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  4739. +  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  4740. +  esac
  4741. +done
  4742. +
  4743. +# NLS nuisances.
  4744. +# Only set LANG and LC_ALL to C if already set.
  4745. +# These must not be set unconditionally because not all systems understand
  4746. +# e.g. LANG=C (notably SCO).
  4747. +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  4748. +if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  4749. +
  4750. +# confdefs.h avoids OS command line length limits that DEFS can exceed.
  4751. +rm -rf conftest* confdefs.h
  4752. +# AIX cpp loses on an empty file, so make sure it contains at least a newline.
  4753. +echo > confdefs.h
  4754. +
  4755. +# A filename unique to this package, relative to the directory that
  4756. +# configure is in, which we can look for to find out if srcdir is correct.
  4757. +ac_unique_file=gs.h
  4758. +
  4759. +# Find the source files, if location was not specified.
  4760. +if test -z "$srcdir"; then
  4761. +  ac_srcdir_defaulted=yes
  4762. +  # Try the directory containing this script, then its parent.
  4763. +  ac_prog=$0
  4764. +  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  4765. +  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  4766. +  srcdir=$ac_confdir
  4767. +  if test ! -r $srcdir/$ac_unique_file; then
  4768. +    srcdir=..
  4769. +  fi
  4770. +else
  4771. +  ac_srcdir_defaulted=no
  4772. +fi
  4773. +if test ! -r $srcdir/$ac_unique_file; then
  4774. +  if test "$ac_srcdir_defaulted" = yes; then
  4775. +    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  4776. +  else
  4777. +    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  4778. +  fi
  4779. +fi
  4780. +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  4781. +
  4782. +# Prefer explicitly selected file to automatically selected ones.
  4783. +if test -z "$CONFIG_SITE"; then
  4784. +  if test "x$prefix" != xNONE; then
  4785. +    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  4786. +  else
  4787. +    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  4788. +  fi
  4789. +fi
  4790. +for ac_site_file in $CONFIG_SITE; do
  4791. +  if test -r "$ac_site_file"; then
  4792. +    echo "loading site script $ac_site_file"
  4793. +    . "$ac_site_file"
  4794. +  fi
  4795. +done
  4796. +
  4797. +if test -r "$cache_file"; then
  4798. +  echo "loading cache $cache_file"
  4799. +  . $cache_file
  4800. +else
  4801. +  echo "creating cache $cache_file"
  4802. +  > $cache_file
  4803. +fi
  4804. +
  4805. +ac_ext=c
  4806. +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  4807. +ac_cpp='$CPP $CPPFLAGS'
  4808. +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  4809. +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  4810. +
  4811. +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  4812. +  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  4813. +  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  4814. +    ac_n= ac_c='
  4815. +' ac_t='    '
  4816. +  else
  4817. +    ac_n=-n ac_c= ac_t=
  4818. +  fi
  4819. +else
  4820. +  ac_n= ac_c='\c' ac_t=
  4821. +fi
  4822. +
  4823. +
  4824. +
  4825. +# We want these before the checks, so the checks can modify their values.
  4826. +test -z "$CFLAGS" && CFLAGS= auto_cflags=1
  4827. +test -z "$LDFLAGS" && LDFLAGS=
  4828. +
  4829. +# Extract the first word of "gcc", so it can be a program name with args.
  4830. +set dummy gcc; ac_word=$2
  4831. +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4832. +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  4833. +  echo $ac_n "(cached) $ac_c" 1>&6
  4834. +else
  4835. +  if test -n "$CC"; then
  4836. +  ac_cv_prog_CC="$CC" # Let the user override the test.
  4837. +else
  4838. +  IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4839. +  for ac_dir in $PATH; do
  4840. +    test -z "$ac_dir" && ac_dir=.
  4841. +    if test -f $ac_dir/$ac_word; then
  4842. +      ac_cv_prog_CC="gcc"
  4843. +      break
  4844. +    fi
  4845. +  done
  4846. +  IFS="$ac_save_ifs"
  4847. +fi
  4848. +fi
  4849. +CC="$ac_cv_prog_CC"
  4850. +if test -n "$CC"; then
  4851. +  echo "$ac_t""$CC" 1>&6
  4852. +else
  4853. +  echo "$ac_t""no" 1>&6
  4854. +fi
  4855. +
  4856. +if test -z "$CC"; then
  4857. +  # Extract the first word of "cc", so it can be a program name with args.
  4858. +set dummy cc; ac_word=$2
  4859. +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  4860. +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  4861. +  echo $ac_n "(cached) $ac_c" 1>&6
  4862. +else
  4863. +  if test -n "$CC"; then
  4864. +  ac_cv_prog_CC="$CC" # Let the user override the test.
  4865. +else
  4866. +  IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  4867. +  ac_prog_rejected=no
  4868. +  for ac_dir in $PATH; do
  4869. +    test -z "$ac_dir" && ac_dir=.
  4870. +    if test -f $ac_dir/$ac_word; then
  4871. +      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  4872. +        ac_prog_rejected=yes
  4873. +    continue
  4874. +      fi
  4875. +      ac_cv_prog_CC="cc"
  4876. +      break
  4877. +    fi
  4878. +  done
  4879. +  IFS="$ac_save_ifs"
  4880. +if test $ac_prog_rejected = yes; then
  4881. +  # We found a bogon in the path, so make sure we never use it.
  4882. +  set dummy $ac_cv_prog_CC
  4883. +  shift
  4884. +  if test $# -gt 0; then
  4885. +    # We chose a different compiler from the bogus one.
  4886. +    # However, it has the same basename, so the bogon will be chosen
  4887. +    # first if we set CC to just the basename; use the full file name.
  4888. +    shift
  4889. +    set dummy "$ac_dir/$ac_word" "$@"
  4890. +    shift
  4891. +    ac_cv_prog_CC="$@"
  4892. +  fi
  4893. +fi
  4894. +fi
  4895. +fi
  4896. +CC="$ac_cv_prog_CC"
  4897. +if test -n "$CC"; then
  4898. +  echo "$ac_t""$CC" 1>&6
  4899. +else
  4900. +  echo "$ac_t""no" 1>&6
  4901. +fi
  4902. +
  4903. +  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  4904. +fi
  4905. +
  4906. +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  4907. +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  4908. +  echo $ac_n "(cached) $ac_c" 1>&6
  4909. +else
  4910. +  cat > conftest.c <<EOF
  4911. +#ifdef __GNUC__
  4912. +  yes;
  4913. +#endif
  4914. +EOF
  4915. +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  4916. +  ac_cv_prog_gcc=yes
  4917. +else
  4918. +  ac_cv_prog_gcc=no
  4919. +fi
  4920. +fi
  4921. +
  4922. +echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  4923. +if test $ac_cv_prog_gcc = yes; then
  4924. +  GCC=yes
  4925. +  if test "${CFLAGS+set}" != set; then
  4926. +    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  4927. +if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  4928. +  echo $ac_n "(cached) $ac_c" 1>&6
  4929. +else
  4930. +  echo 'void f(){}' > conftest.c
  4931. +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  4932. +  ac_cv_prog_gcc_g=yes
  4933. +else
  4934. +  ac_cv_prog_gcc_g=no
  4935. +fi
  4936. +rm -f conftest*
  4937. +
  4938. +fi
  4939. +
  4940. +echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  4941. +    if test $ac_cv_prog_gcc_g = yes; then
  4942. +      CFLAGS="-g -O2"
  4943. +    else
  4944. +      CFLAGS="-O2"
  4945. +    fi
  4946. +  fi
  4947. +else
  4948. +  GCC=
  4949. +  test "${CFLAGS+set}" = set || CFLAGS="-g"
  4950. +fi
  4951. +
  4952. +
  4953. +# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
  4954. +test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
  4955. +
  4956. +
  4957. +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  4958. +# On Suns, sometimes $CPP names a directory.
  4959. +if test -n "$CPP" && test -d "$CPP"; then
  4960. +  CPP=
  4961. +fi
  4962. +if test -z "$CPP"; then
  4963. +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  4964. +  echo $ac_n "(cached) $ac_c" 1>&6
  4965. +else
  4966. +    # This must be in double quotes, not single quotes, because CPP may get
  4967. +  # substituted into the Makefile and "${CC-cc}" will confuse make.
  4968. +  CPP="${CC-cc} -E"
  4969. +  # On the NeXT, cc -E runs the code through the compiler's parser,
  4970. +  # not just through cpp.
  4971. +  cat > conftest.$ac_ext <<EOF
  4972. +#line 682 "configure"
  4973. +#include "confdefs.h"
  4974. +#include <assert.h>
  4975. +Syntax Error
  4976. +EOF
  4977. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4978. +{ (eval echo configure:688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4979. +ac_err=`grep -v '^ *+' conftest.out`
  4980. +if test -z "$ac_err"; then
  4981. +  :
  4982. +else
  4983. +  echo "$ac_err" >&5
  4984. +  rm -rf conftest*
  4985. +  CPP="${CC-cc} -E -traditional-cpp"
  4986. +  cat > conftest.$ac_ext <<EOF
  4987. +#line 697 "configure"
  4988. +#include "confdefs.h"
  4989. +#include <assert.h>
  4990. +Syntax Error
  4991. +EOF
  4992. +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  4993. +{ (eval echo configure:703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  4994. +ac_err=`grep -v '^ *+' conftest.out`
  4995. +if test -z "$ac_err"; then
  4996. +  :
  4997. +else
  4998. +  echo "$ac_err" >&5
  4999. +  rm -rf conftest*
  5000. +  CPP=/lib/cpp
  5001. +fi
  5002. +rm -f conftest*
  5003. +fi
  5004. +rm -f conftest*
  5005. +  ac_cv_prog_CPP="$CPP"
  5006. +fi
  5007. +  CPP="$ac_cv_prog_CPP"
  5008. +else
  5009. +  ac_cv_prog_CPP="$CPP"
  5010. +fi
  5011. +echo "$ac_t""$CPP" 1>&6
  5012. +
  5013. +if test $ac_cv_prog_gcc = yes; then
  5014. +    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
  5015. +if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
  5016. +  echo $ac_n "(cached) $ac_c" 1>&6
  5017. +else
  5018. +    ac_pattern="Autoconf.*'x'"
  5019. +  cat > conftest.$ac_ext <<EOF
  5020. +#line 730 "configure"
  5021. +#include "confdefs.h"
  5022. +#include <sgtty.h>
  5023. +Autoconf TIOCGETP
  5024. +EOF
  5025. +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  5026. +  egrep "$ac_pattern" >/dev/null 2>&1; then
  5027. +  rm -rf conftest*
  5028. +  ac_cv_prog_gcc_traditional=yes
  5029. +else
  5030. +  rm -rf conftest*
  5031. +  ac_cv_prog_gcc_traditional=no
  5032. +fi
  5033. +rm -f conftest*
  5034. +
  5035. +
  5036. +  if test $ac_cv_prog_gcc_traditional = no; then
  5037. +    cat > conftest.$ac_ext <<EOF
  5038. +#line 748 "configure"
  5039. +#include "confdefs.h"
  5040. +#include <termio.h>
  5041. +Autoconf TCGETA
  5042. +EOF
  5043. +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  5044. +  egrep "$ac_pattern" >/dev/null 2>&1; then
  5045. +  rm -rf conftest*
  5046. +  ac_cv_prog_gcc_traditional=yes
  5047. +fi
  5048. +rm -f conftest*
  5049. +
  5050. +  fi
  5051. +fi
  5052. +
  5053. +echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
  5054. +  if test $ac_cv_prog_gcc_traditional = yes; then
  5055. +    CC="$CC -traditional"
  5056. +  fi
  5057. +fi
  5058. +
  5059. +ac_aux_dir=
  5060. +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  5061. +  if test -f $ac_dir/install-sh; then
  5062. +    ac_aux_dir=$ac_dir
  5063. +    ac_install_sh="$ac_aux_dir/install-sh -c"
  5064. +    break
  5065. +  elif test -f $ac_dir/install.sh; then
  5066. +    ac_aux_dir=$ac_dir
  5067. +    ac_install_sh="$ac_aux_dir/install.sh -c"
  5068. +    break
  5069. +  fi
  5070. +done
  5071. +if test -z "$ac_aux_dir"; then
  5072. +  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  5073. +fi
  5074. +ac_config_guess=$ac_aux_dir/config.guess
  5075. +ac_config_sub=$ac_aux_dir/config.sub
  5076. +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  5077. +
  5078. +# Find a good install program.  We prefer a C program (faster),
  5079. +# so one script is as good as another.  But avoid the broken or
  5080. +# incompatible versions:
  5081. +# SysV /etc/install, /usr/sbin/install
  5082. +# SunOS /usr/etc/install
  5083. +# IRIX /sbin/install
  5084. +# AIX /bin/install
  5085. +# AmigaOS /c/install
  5086. +# AFS /usr/afsws/bin/install, which mishandles nonexistent args
  5087. +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  5088. +# ./install, which can be erroneously created by make from ./install.sh.
  5089. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  5090. +if test -z "$INSTALL"; then
  5091. +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  5092. +  echo $ac_n "(cached) $ac_c" 1>&6
  5093. +else
  5094. +    IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  5095. +  for ac_dir in $PATH; do
  5096. +    # Account for people who put trailing slashes in PATH elements.
  5097. +    case "$ac_dir/" in
  5098. +    /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  5099. +    *)
  5100. +      # OSF1 and SCO ODT 3.0 have their own names for install.
  5101. +      for ac_prog in ginstall installbsd scoinst install; do
  5102. +        if test -f $ac_dir/$ac_prog; then
  5103. +      if test $ac_prog = install &&
  5104. +            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  5105. +        # AIX install.  It has an incompatible calling convention.
  5106. +        # OSF/1 installbsd also uses dspmsg, but is usable.
  5107. +        :
  5108. +      else
  5109. +        ac_cv_path_install="$ac_dir/$ac_prog -c"
  5110. +        break 2
  5111. +      fi
  5112. +    fi
  5113. +      done
  5114. +      ;;
  5115. +    esac
  5116. +  done
  5117. +  IFS="$ac_save_ifs"
  5118. +
  5119. +fi
  5120. +  if test "${ac_cv_path_install+set}" = set; then
  5121. +    INSTALL="$ac_cv_path_install"
  5122. +  else
  5123. +    # As a last resort, use the slow shell script.  We don't cache a
  5124. +    # path for INSTALL within a source directory, because that will
  5125. +    # break other packages using the cache if that directory is
  5126. +    # removed, or if the path is relative.
  5127. +    INSTALL="$ac_install_sh"
  5128. +  fi
  5129. +fi
  5130. +echo "$ac_t""$INSTALL" 1>&6
  5131. +
  5132. +# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  5133. +# It thinks the first close brace ends the variable substitution.
  5134. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  5135. +
  5136. +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  5137. +
  5138. +
  5139. +trap '' 1 2 15
  5140. +cat > confcache <<\EOF
  5141. +# This file is a shell script that caches the results of configure
  5142. +# tests run on this system so they can be shared between configure
  5143. +# scripts and configure runs.  It is not useful on other systems.
  5144. +# If it contains results you don't want to keep, you may remove or edit it.
  5145. +#
  5146. +# By default, configure uses ./config.cache as the cache file,
  5147. +# creating it if it does not exist already.  You can give configure
  5148. +# the --cache-file=FILE option to use a different cache file; that is
  5149. +# what configure does when it calls configure scripts in
  5150. +# subdirectories, so they share the cache.
  5151. +# Giving --cache-file=/dev/null disables caching, for debugging configure.
  5152. +# config.status only pays attention to the cache file if you give it the
  5153. +# --recheck option to rerun configure.
  5154. +#
  5155. +EOF
  5156. +# Ultrix sh set writes to stderr and can't be redirected directly,
  5157. +# and sets the high bit in the cache file unless we assign to the vars.
  5158. +(set) 2>&1 |
  5159. +  sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  5160. +  >> confcache
  5161. +if cmp -s $cache_file confcache; then
  5162. +  :
  5163. +else
  5164. +  if test -w $cache_file; then
  5165. +    echo "updating cache $cache_file"
  5166. +    cat confcache > $cache_file
  5167. +  else
  5168. +    echo "not updating unwritable cache $cache_file"
  5169. +  fi
  5170. +fi
  5171. +rm -f confcache
  5172. +
  5173. +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  5174. +
  5175. +test "x$prefix" = xNONE && prefix=$ac_default_prefix
  5176. +# Let make expand exec_prefix.
  5177. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  5178. +
  5179. +# Any assignment to VPATH causes Sun make to only execute
  5180. +# the first set of double-colon rules, so remove it if not needed.
  5181. +# If there is a colon in the path, we need to keep it.
  5182. +if test "x$srcdir" = x.; then
  5183. +  ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  5184. +fi
  5185. +
  5186. +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  5187. +
  5188. +# Transform confdefs.h into DEFS.
  5189. +# Protect against shell expansion while executing Makefile rules.
  5190. +# Protect against Makefile macro expansion.
  5191. +cat > conftest.defs <<\EOF
  5192. +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
  5193. +s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
  5194. +s%\[%\\&%g
  5195. +s%\]%\\&%g
  5196. +s%\$%$$%g
  5197. +EOF
  5198. +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  5199. +rm -f conftest.defs
  5200. +
  5201. +
  5202. +# Without the "./", some shells look in PATH for config.status.
  5203. +: ${CONFIG_STATUS=./config.status}
  5204. +
  5205. +echo creating $CONFIG_STATUS
  5206. +# Some systems, like AmigaOS, won't allow you to remove a script that is
  5207. +# being executed, so just move it out of the way instead.
  5208. +if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  5209. +cat > $CONFIG_STATUS <<EOF
  5210. +#! /bin/sh
  5211. +# Generated automatically by configure.
  5212. +# Run this file to recreate the current configuration.
  5213. +# This directory was configured as follows,
  5214. +# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  5215. +#
  5216. +# $0 $ac_configure_args
  5217. +#
  5218. +# Compiler output produced by configure, useful for debugging
  5219. +# configure, is in ./config.log if it exists.
  5220. +
  5221. +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  5222. +for ac_option
  5223. +do
  5224. +  case "\$ac_option" in
  5225. +  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  5226. +    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  5227. +    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  5228. +  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  5229. +    echo "$CONFIG_STATUS generated by autoconf version 2.10"
  5230. +    exit 0 ;;
  5231. +  -help | --help | --hel | --he | --h)
  5232. +    echo "\$ac_cs_usage"; exit 0 ;;
  5233. +  *) echo "\$ac_cs_usage"; exit 1 ;;
  5234. +  esac
  5235. +done
  5236. +
  5237. +ac_given_srcdir=$srcdir
  5238. +ac_given_INSTALL="$INSTALL"
  5239. +
  5240. +trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  5241. +EOF
  5242. +cat >> $CONFIG_STATUS <<EOF
  5243. +
  5244. +# Protect against being on the right side of a sed subst in config.status.
  5245. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  5246. + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  5247. +$ac_vpsub
  5248. +$extrasub
  5249. +s%@CFLAGS@%$CFLAGS%g
  5250. +s%@CPPFLAGS@%$CPPFLAGS%g
  5251. +s%@CXXFLAGS@%$CXXFLAGS%g
  5252. +s%@DEFS@%$DEFS%g
  5253. +s%@LDFLAGS@%$LDFLAGS%g
  5254. +s%@LIBS@%$LIBS%g
  5255. +s%@exec_prefix@%$exec_prefix%g
  5256. +s%@prefix@%$prefix%g
  5257. +s%@program_transform_name@%$program_transform_name%g
  5258. +s%@bindir@%$bindir%g
  5259. +s%@sbindir@%$sbindir%g
  5260. +s%@libexecdir@%$libexecdir%g
  5261. +s%@datadir@%$datadir%g
  5262. +s%@sysconfdir@%$sysconfdir%g
  5263. +s%@sharedstatedir@%$sharedstatedir%g
  5264. +s%@localstatedir@%$localstatedir%g
  5265. +s%@libdir@%$libdir%g
  5266. +s%@includedir@%$includedir%g
  5267. +s%@oldincludedir@%$oldincludedir%g
  5268. +s%@infodir@%$infodir%g
  5269. +s%@guidedir@%$guidedir%g
  5270. +s%@psdir@%$psdir%g
  5271. +s%@dvidir@%$dvidir%g
  5272. +s%@mandir@%$mandir%g
  5273. +s%@CC@%$CC%g
  5274. +s%@CPP@%$CPP%g
  5275. +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  5276. +s%@INSTALL_DATA@%$INSTALL_DATA%g
  5277. +
  5278. +CEOF
  5279. +EOF
  5280. +cat >> $CONFIG_STATUS <<EOF
  5281. +
  5282. +CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
  5283. +EOF
  5284. +cat >> $CONFIG_STATUS <<\EOF
  5285. +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  5286. +  # Support "outfile[:infile]", defaulting infile="outfile.in".
  5287. +  case "$ac_file" in
  5288. +  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  5289. +       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  5290. +  *) ac_file_in="${ac_file}.in" ;;
  5291. +  esac
  5292. +
  5293. +  # Adjust relative srcdir, etc. for subdirectories.
  5294. +
  5295. +  # Remove last slash and all that follows it.  Not all systems have dirname.
  5296. +  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  5297. +  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  5298. +    # The file is in a subdirectory.
  5299. +    test ! -d "$ac_dir" && mkdir "$ac_dir"
  5300. +    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  5301. +    # A "../" for each directory in $ac_dir_suffix.
  5302. +    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  5303. +  else
  5304. +    ac_dir_suffix= ac_dots=
  5305. +  fi
  5306. +
  5307. +  case "$ac_given_srcdir" in
  5308. +  .)  srcdir=.
  5309. +      if test -z "$ac_dots"; then top_srcdir=.
  5310. +      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  5311. +  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  5312. +  *) # Relative path.
  5313. +    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  5314. +    top_srcdir="$ac_dots$ac_given_srcdir" ;;
  5315. +  esac
  5316. +
  5317. +  case "$ac_given_INSTALL" in
  5318. +  [/$]*) INSTALL="$ac_given_INSTALL" ;;
  5319. +  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  5320. +  esac
  5321. +  echo creating "$ac_file"
  5322. +  rm -f "$ac_file"
  5323. +  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  5324. +  case "$ac_file" in
  5325. +  *Makefile*) ac_comsub="1i\\
  5326. +# $configure_input" ;;
  5327. +  *) ac_comsub= ;;
  5328. +  esac
  5329. +  sed -e "$ac_comsub
  5330. +s%@configure_input@%$configure_input%g
  5331. +s%@srcdir@%$srcdir%g
  5332. +s%@top_srcdir@%$top_srcdir%g
  5333. +s%@INSTALL@%$INSTALL%g
  5334. +" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  5335. +fi; done
  5336. +rm -f conftest.subs
  5337. +
  5338. +
  5339. +
  5340. +exit 0
  5341. +EOF
  5342. +chmod +x $CONFIG_STATUS
  5343. +rm -f CONFIG.STATUS.old
  5344. +rm -fr confdefs* $ac_clean_files
  5345. +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  5346. +
  5347. diff -rup --new-file baseline/fsf/ghostscript/configure.in amiga/fsf/ghostscript/configure.in
  5348. --- baseline/fsf/ghostscript/configure.in    Wed Dec 31 17:00:00 1969
  5349. +++ amiga/fsf/ghostscript/configure.in    Sat Sep 28 00:00:00 1996
  5350. @@ -0,0 +1,20 @@
  5351. +dnl Process this file with autoconf to produce a configure script.
  5352. +AC_INIT(gs.h)
  5353. +
  5354. +# We want these before the checks, so the checks can modify their values.
  5355. +test -z "$CFLAGS" && CFLAGS= auto_cflags=1
  5356. +test -z "$LDFLAGS" && LDFLAGS=
  5357. +
  5358. +AC_PROG_CC
  5359. +
  5360. +# If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS.
  5361. +test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
  5362. +
  5363. +AC_SUBST(CFLAGS)dnl
  5364. +AC_SUBST(LDFLAGS)dnl
  5365. +
  5366. +AC_PROG_CPP
  5367. +AC_GCC_TRADITIONAL
  5368. +AC_PROG_INSTALL
  5369. +
  5370. +AC_OUTPUT(Makefile)
  5371. diff -rup --new-file baseline/fsf/ghostscript/font2c amiga/fsf/ghostscript/font2c
  5372. --- baseline/fsf/ghostscript/font2c    Tue Feb 25 03:24:34 1992
  5373. +++ amiga/fsf/ghostscript/font2c    Sat Sep 28 00:00:00 1996
  5374. @@ -1 +1,4 @@
  5375. -gs -q -dNODISPLAY -dWRITESYSTEMDICT -- font2c.ps $*
  5376. +.key ARGS/F
  5377. +.bra {
  5378. +.ket }
  5379. +gs -q -dNODISPLAY -dWRITESYSTEMDICT -- font2c.ps {ARGS}
  5380. diff -rup --new-file baseline/fsf/ghostscript/fonts/Makefile.in amiga/fsf/ghostscript/fonts/Makefile.in
  5381. --- baseline/fsf/ghostscript/fonts/Makefile.in    Wed Dec 31 17:00:00 1969
  5382. +++ amiga/fsf/ghostscript/fonts/Makefile.in    Sat Sep 28 00:00:00 1996
  5383. @@ -0,0 +1,43 @@
  5384. +# Ghostscript fonts Makefile.
  5385. +
  5386. +#### Start of system configuration section. ####
  5387. +
  5388. +VPATH = @srcdir@
  5389. +srcdir = @srcdir@
  5390. +
  5391. +# Common prefix for machine-independent installed files.
  5392. +prefix = /ade
  5393. +# Common prefix for machine-dependent installed files.
  5394. +exec_prefix = $(prefix)
  5395. +
  5396. +# Directory to install libraries in.
  5397. +libdir = $(exec_prefix)/lib
  5398. +
  5399. +# Program to install data like man pages.
  5400. +INSTALL_DATA = @INSTALL_DATA@
  5401. +# Generic install program.
  5402. +INSTALL = @INSTALL@
  5403. +
  5404. +#### End of system configuration section. ####
  5405. +
  5406. +# Define the default directories for the runtime
  5407. +# initialization and font files.  Separate multiple directories with a ','.
  5408. +
  5409. +gsdatadir = $(libdir)/ghostscript
  5410. +gsfontsdir = $(gsdatadir)/fonts
  5411. +
  5412. +# Installation
  5413. +
  5414. +all:
  5415. +
  5416. +clean:
  5417. +
  5418. +clobber:
  5419. +
  5420. +install:
  5421. +    if [ -d $(libdir) ]; then true; else mkdir $(libdir); fi
  5422. +    if [ -d $(gsfontsdir) ]; then true; else mkdir $(gsfontsdir); fi
  5423. +    for f in `(cd $(srcdir)/fonts ; find . -type f -print)` ; do $(INSTALL_DATA) $(srcdir)/fonts/$$f $(gsfontsdir)/$$f ; done
  5424. +
  5425. +Makefile:    config.status $(srcdir)/Makefile.in
  5426. +        $(SHELL) config.status
  5427. diff -rup --new-file baseline/fsf/ghostscript/gdevamiga.c amiga/fsf/ghostscript/gdevamiga.c
  5428. --- baseline/fsf/ghostscript/gdevamiga.c    Wed Dec 31 17:00:00 1969
  5429. +++ amiga/fsf/ghostscript/gdevamiga.c    Sat Sep 28 00:00:00 1996
  5430. @@ -0,0 +1,5537 @@
  5431. +/* Copyright (C) 1992 Aladdin Enterprises.  All rights reserved.
  5432. +   Distributed by Free Software Foundation, Inc.
  5433. +
  5434. +This file is part of Ghostscript.
  5435. +
  5436. +Ghostscript is distributed in the hope that it will be useful, but
  5437. +WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  5438. +to anyone for the consequences of using it or for whether it serves any
  5439. +particular purpose or works at all, unless he says so in writing.  Refer
  5440. +to the Ghostscript General Public License for full details.
  5441. +
  5442. +Everyone is granted permission to copy, modify and redistribute
  5443. +Ghostscript, but only under the conditions described in the Ghostscript
  5444. +General Public License.  A copy of this license is supposed to have been
  5445. +given to you along with Ghostscript so you can know your rights and
  5446. +responsibilities.  It should be in a file named COPYING.  Among other
  5447. +things, the copyright notice and this notice must be preserved on all
  5448. +copies.  */
  5449. +
  5450. +/* gdevamiga.c */
  5451. +/* Amiga driver for Ghostscript library, requires Kickstart 2.04 or higher */
  5452. +
  5453. +/* Written by Olaf `Olsen' Barthel, last change 29 January 1994
  5454. + *
  5455. + * My address:   Olaf Barthel
  5456. + *               Brabeckstrasse 35
  5457. + *             D-30559 Hannover
  5458. + *
  5459. + *      eMail:   olsen@sourcery.han.de
  5460. + */
  5461. +
  5462. +#define CheckIO foo123
  5463. +#define ushort foo
  5464. +
  5465. +#include <intuition/intuitionbase.h>
  5466. +#include <intuition/gadgetclass.h>
  5467. +#include <intuition/imageclass.h>
  5468. +#include <intuition/icclass.h>
  5469. +#include <graphics/displayinfo.h>
  5470. +#include <libraries/iffparse.h>
  5471. +#include <graphics/gfxbase.h>
  5472. +#include <devices/printer.h>
  5473. +#include <devices/prtbase.h>
  5474. +#include <devices/prtgfx.h>
  5475. +#include <libraries/asl.h>
  5476. +#include <exec/memory.h>
  5477. +#include <clib/macros.h>
  5478. +#include <dos/dostags.h>
  5479. +#include <dos/rdargs.h>
  5480. +#include <dos/var.h>
  5481. +#include <dos/dos.h>
  5482. +
  5483. +#include <clib/intuition_protos.h>
  5484. +#include <clib/graphics_protos.h>
  5485. +#include <clib/iffparse_protos.h>
  5486. +#include <clib/utility_protos.h>
  5487. +#include <clib/layers_protos.h>
  5488. +#include <clib/exec_protos.h>
  5489. +#include <clib/dos_protos.h>
  5490. +#include <clib/asl_protos.h>
  5491. +
  5492. +/*
  5493. +#include <inline/stubs.h>
  5494. +#include <inline/iffparse.h>
  5495. +#include <inline/utility.h>
  5496. +#include <inline/exec.h>
  5497. +#include <inline/dos.h>
  5498. +*/
  5499. +
  5500. +#include <string.h>
  5501. +#include <signal.h>
  5502. +
  5503. +#undef ushort
  5504. +#undef CheckIO
  5505. +
  5506. +struct IORequest *CheckIO(struct IORequest *);
  5507. +
  5508. +#include "gx.h"        /* for gx_bitmap; includes std.h */
  5509. +#include "gsmatrix.h"    /* needed for gxdevice.h */
  5510. +#include "gxdevice.h"
  5511. +#include "gserrors.h"
  5512. +#include "gsprops.h"
  5513. +
  5514. +    /* Here is how to select a default page size format:
  5515. +     *
  5516. +     * Either enter include a line such as
  5517. +     *
  5518. +     *   #define AMIGA_PAGE_A4 1
  5519. +     *
  5520. +     * Somewhere above in this module, or edit the makefile
  5521. +     * to feature the option
  5522. +     *
  5523. +     *   -dAMIGA_PAGE_A4
  5524. +     *
  5525. +     * among the device specific flags. Available default page
  5526. +     * size formats are:
  5527. +     *
  5528. +     *   AMIGA_PAGE_A4         European A4 page size (default)
  5529. +     *   AMIGA_PAGE_A3         European A3 page size
  5530. +     *   AMIGA_PAGE_LETTER     US letter page size
  5531. +     *   AMIGA_PAGE_LEGAL      US legal page size
  5532. +     *   AMIGA_PAGE_LEDGER     US ledger paper size
  5533. +     *   AMIGA_PAGE_TABLOID    US tabloid paper size
  5534. +     */
  5535. +
  5536. +    /* Select the default paper size if none specified. */
  5537. +
  5538. +#if !defined(AMIGA_PAGE_A4) && !defined(AMIGA_PAGE_A3) && !defined(AMIGA_PAGE_LETTER) && !defined(AMIGA_PAGE_LEGAL) && !defined(AMIGA_PAGE_LEDGER) && !defined(AMIGA_PAGE_TABLOID)
  5539. +/*#define AMIGA_PAGE_A4 1*/
  5540. +#define AMIGA_PAGE_A3 1
  5541. +#endif    /* PAGE SIZE */
  5542. +
  5543. +    /* A4 page size (in inches!) */
  5544. +
  5545. +#ifdef AMIGA_PAGE_A4
  5546. +#define DEFAULT_WIDTH        8.2
  5547. +#define DEFAULT_HEIGHT        11.6
  5548. +#endif    /* AMIGA_PAGE_A4 */
  5549. +
  5550. +    /* A3 page size */
  5551. +
  5552. +#ifdef AMIGA_PAGE_A3
  5553. +#define DEFAULT_WIDTH        11.6
  5554. +#define DEFAULT_HEIGHT        16.5
  5555. +#endif    /* AMIGA_PAGE_A4 */
  5556. +
  5557. +    /* US letter page size */
  5558. +
  5559. +#ifdef AMIGA_PAGE_LETTER
  5560. +#define DEFAULT_WIDTH        8.5
  5561. +#define DEFAULT_HEIGHT        11.0
  5562. +#endif    /* AMIGA_PAGE_LETTER */
  5563. +
  5564. +    /* US legal page size */
  5565. +
  5566. +#ifdef AMIGA_PAGE_LEGAL
  5567. +#define DEFAULT_WIDTH        8.5
  5568. +#define DEFAULT_HEIGHT        14.0
  5569. +#endif    /* AMIGA_PAGE_LEGAL */
  5570. +
  5571. +    /* US ledger page size */
  5572. +
  5573. +#ifdef AMIGA_PAGE_LEDGER
  5574. +#define DEFAULT_WIDTH        16.0
  5575. +#define DEFAULT_HEIGHT        11.0
  5576. +#endif    /* AMIGA_PAGE_LEDGER */
  5577. +
  5578. +    /* US tabloid page size */
  5579. +
  5580. +#ifdef AMIGA_PAGE_TABLOID
  5581. +#define DEFAULT_WIDTH        11.0
  5582. +#define DEFAULT_HEIGHT        17.0
  5583. +#endif    /* AMIGA_PAGE_LEDGER */
  5584. +
  5585. +    /* Default output file name. */
  5586. +
  5587. +#define DEFAULT_FILENAME    "gs_page"
  5588. +
  5589. +    /* Turn a byte into a 24 bit colour value. */
  5590. +
  5591. +#define SPREAD(i)    ((ULONG)(i) << 24 | (ULONG)(i) << 16 | (ULONG)(i) << 8 | (i))
  5592. +
  5593. +    /* Scroller gadget IDs. */
  5594. +
  5595. +enum    {    VERTICAL_SCROLLER,    HORIZONTAL_SCROLLER,
  5596. +        UP_ARROW,        DOWN_ARROW,
  5597. +        LEFT_ARROW,        RIGHT_ARROW,
  5598. +
  5599. +        GADGET_COUNT };
  5600. +
  5601. +    /* Scroller arrow IDs. */
  5602. +
  5603. +enum    {    UP_IMAGE,        DOWN_IMAGE,
  5604. +        LEFT_IMAGE,        RIGHT_IMAGE,
  5605. +
  5606. +        IMAGE_COUNT };
  5607. +
  5608. +    /* Codes for the MoveAround() routine. */
  5609. +
  5610. +enum    {    MOVE_MIN,MOVE_FAR_DOWN,MOVE_DOWN,MOVE_UP,MOVE_FAR_UP,MOVE_MAX };
  5611. +
  5612. +    /* Some handy bit masks. */
  5613. +
  5614. +#define SIG_KILL    SIGBREAKF_CTRL_C
  5615. +#define SIG_HANDSHAKE    SIGF_SINGLE
  5616. +
  5617. +    /* Static dimensions of scroller arrows. */
  5618. +
  5619. +#define ARROW_WIDTH    16
  5620. +#define ARROW_HEIGHT    11
  5621. +
  5622. +    /* The `Help' key raw code. */
  5623. +
  5624. +#define HELP_CODE    95
  5625. +
  5626. +    /* Minimum window inner area dimension. */
  5627. +
  5628. +#define MINIMUM_WIDTH    64
  5629. +#define MINIMUM_HEIGHT    32
  5630. +
  5631. +    /* Handy superbitmap window macros. */
  5632. +
  5633. +#define LAYERXOFFSET(w)    ((w) -> RPort -> Layer -> Scroll_X)
  5634. +#define LAYERYOFFSET(w)    ((w) -> RPort -> Layer -> Scroll_Y)
  5635. +
  5636. +    /* User input to listen to. */
  5637. +
  5638. +#define IDCMP_FLAGS    (IDCMP_IDCMPUPDATE | IDCMP_GADGETUP | IDCMP_GADGETDOWN | IDCMP_MOUSEMOVE | IDCMP_NEWSIZE | IDCMP_CLOSEWINDOW | IDCMP_VANILLAKEY | IDCMP_RAWKEY)
  5639. +
  5640. +    /* Chunk IDs. */
  5641. +
  5642. +#define ID_ILBM        MAKE_ID('I','L','B','M')
  5643. +#define ID_BMHD        MAKE_ID('B','M','H','D')
  5644. +#define ID_CMAP        MAKE_ID('C','M','A','P')
  5645. +#define ID_CAMG        MAKE_ID('C','A','M','G')
  5646. +#define ID_ANNO        MAKE_ID('A','N','N','O')
  5647. +#define ID_DPI        MAKE_ID('D','P','I',' ')
  5648. +#define ID_BODY        MAKE_ID('B','O','D','Y')
  5649. +
  5650. +    /* Chunk contents definitions. */
  5651. +
  5652. +typedef struct
  5653. +{
  5654. +    UWORD        w,h;            /* raster width & height in pixels */
  5655. +    WORD        x,y;            /* position for this image */
  5656. +    UBYTE        nPlanes;        /* # source bitplanes */
  5657. +    UBYTE        masking;        /* masking technique */
  5658. +    UBYTE        compression;        /* compression algoithm */
  5659. +    UBYTE        pad1;            /* UNUSED.  For consistency, put 0 here.*/
  5660. +    UWORD        transparentColor;    /* transparent "color number" */
  5661. +    UBYTE        xAspect,yAspect;    /* aspect ratio, a rational number x/y */
  5662. +    WORD        pageWidth,pageHeight;    /* source "page" size in pixels */
  5663. +} BitMapHeader;
  5664. +
  5665. +typedef struct
  5666. +{
  5667. +    UWORD        dpi_x;
  5668. +    UWORD        dpi_y;
  5669. +} DPIHeader;
  5670. +
  5671. +    /* Packer modes. */
  5672. +
  5673. +#define DUMP        0
  5674. +#define RUN        1
  5675. +
  5676. +    /* Minimum data run size, maximum data run size and maximum cache size. */
  5677. +
  5678. +#define MINRUN        3
  5679. +#define MAXRUN        128
  5680. +#define MAXDAT        128
  5681. +
  5682. +    /* This module actually implements four different Amiga based
  5683. +     * devices. As the rendering operations are all the same,
  5684. +     * one single device definition is sufficient.
  5685. +     */
  5686. +
  5687. +typedef struct gx_device_amiga
  5688. +{
  5689. +    gx_device_common;
  5690. +
  5691. +    struct Screen    *screen;    /* Any screen */
  5692. +    struct Window    *window;    /* Some window to be opened on the Workbench screen */
  5693. +
  5694. +    LONG         super_width,    /* Superbitmap width */
  5695. +             super_height;    /* Superbitmap height */
  5696. +
  5697. +    struct BitMap    *super_bitmap;    /* Window superbitmap area */
  5698. +    struct Gadget    **gadget;    /* Scroller gadgets */
  5699. +    struct Image    **image;    /* Scroller arrow images */
  5700. +
  5701. +    struct Task    *dispatcher;    /* Slider dispatch task */
  5702. +    struct Process    *main;        /* Main program */
  5703. +
  5704. +    struct RastPort    *rport;        /* Rendering area */
  5705. +
  5706. +    struct IODRPReq *printer;    /* Printer interface data */
  5707. +    struct MsgPort    *port;        /* Printer io data */
  5708. +
  5709. +    struct ColorMap    *colormap;    /* A black/white colour map */
  5710. +    struct BitMap    *bitmap;    /* Rendering bitmap data */
  5711. +    PLANEPTR     bitplane;    /* Rendering raster */
  5712. +
  5713. +    gx_color_index     last_pen;    /* The last colour set */
  5714. +
  5715. +    float         page_width,    /* The page width */
  5716. +             page_height;    /* The page height */
  5717. +    char         file_name[256];/* The output file name */
  5718. +    int         page_count;    /* The page number counter */
  5719. +
  5720. +    int         cube_size;    /* Colour cube size, 0 for b/w */
  5721. +    struct RastPort    *temp_rport;    /* Temporary raster port for pixmap imaging. */
  5722. +    UBYTE        *temp_array;    /* Temporary colour manipulation array. */
  5723. +    LONG        *pens;
  5724. +} gx_device_amiga;
  5725. +
  5726. +    /* Function prototypes */
  5727. +
  5728. +VOID            set_mono_device(gx_device_amiga *dev);
  5729. +VOID            set_colour_device(gx_device_amiga *dev,int cube_size,LONG *pens);
  5730. +VOID            set_colour_printer_device(gx_device_amiga *dev,LONG CubeSize);
  5731. +VOID            DeleteBitMap(struct BitMap *BitMap,BOOL Private);
  5732. +struct BitMap *        CreateBitMap(LONG Width,LONG Height,LONG Depth,ULONG Flags,struct BitMap *Friend,BOOL Private);
  5733. +VOID            DeleteTempRPort(struct RastPort *Temp);
  5734. +struct RastPort *    CreateTempRPort(struct RastPort *Source);
  5735. +LONG            Euclid(LONG a,LONG b);
  5736. +BYTE *            PutDump(register BYTE *Destination,register LONG Count);
  5737. +BYTE *            PutRun(register BYTE *Destination,LONG Count,WORD Char);
  5738. +LONG            PackRow(PLANEPTR *SourcePtr,register BYTE *Destination,LONG RowSize);
  5739. +BOOL            PutBODY(struct IFFHandle *Handle,struct BitMap *BitMap);
  5740. +BOOL            PutANNO(struct IFFHandle *Handle);
  5741. +BOOL            PutCAMG(struct IFFHandle *Handle);
  5742. +BOOL            PutCMAP(struct IFFHandle *Handle);
  5743. +BOOL            PutDPI(struct IFFHandle *Handle,UWORD X_DPI,UWORD Y_DPI);
  5744. +BOOL            PutBMHD(struct IFFHandle *Handle,LONG Width,LONG Height,UWORD X_DPI,UWORD Y_DPI);
  5745. +BOOL            SaveBitMap(STRPTR Name,struct BitMap *BitMap,LONG Width,LONG Height,UWORD X_DPI,UWORD Y_DPI);
  5746. +float            GetInches(STRPTR Buffer);
  5747. +VOID            DispatchTask(VOID);
  5748. +VOID            DeleteScrollers(gx_device *dev);
  5749. +BOOL            CreateScrollers(gx_device *dev,struct Screen *Screen);
  5750. +VOID            WindowResize(gx_device *dev);
  5751. +VOID            WindowUpdate(struct Gadget *Gadget,gx_device *dev);
  5752. +VOID            MoveAround(struct Gadget *Gadget,LONG How,gx_device *dev);
  5753. +VOID            DispatchSuperWindow(gx_device *dev);
  5754. +void            devcleanup(VOID);
  5755. +gx_color_index        amiga_map_rgb_color(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue);
  5756. +int            amiga_map_color_rgb(gx_device *dev,gx_color_index color,gx_color_value rgb[3]);
  5757. +LONG *            AllocatePens(struct ViewPort *VPort,LONG CubeSize);
  5758. +int            amiga_open_default(gx_device *dev);
  5759. +int            amiga_open_low(gx_device *dev);
  5760. +int            amiga_open_high(gx_device *dev);
  5761. +int            amiga_open_super(gx_device *dev);
  5762. +int            amiga_open_a2024(gx_device *dev);
  5763. +int            amiga_open_picassoii(gx_device *dev);
  5764. +int            amiga_open_custom(gx_device *dev);
  5765. +int            amiga_open_printer(gx_device *dev);
  5766. +int            amiga_output_page_printer(gx_device *dev,int num_copies,int flush);
  5767. +int            amiga_close_printer(gx_device *dev);
  5768. +int            amiga_get_bits(gx_device *dev,int y,byte *str,byte **actual_data);
  5769. +int            amiga_open(gx_device *dev,ULONG Mode);
  5770. +int            amiga_output_page(gx_device *dev,int num_copies,int flush);
  5771. +int            amiga_close(gx_device *dev);
  5772. +int            amiga_fill_rectangle(gx_device *dev,int x,int y,int w,int h,gx_color_index color);
  5773. +int            amiga_copy_mono(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h,gx_color_index zero,gx_color_index one);
  5774. +int            amiga_copy_color(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h);
  5775. +int            amiga_draw_line(gx_device *dev,int x0,int y0,int x1,int y1,gx_color_index color);
  5776. +int            amiga_copy_mono_raw(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h,gx_color_index zero,gx_color_index one);
  5777. +int            amiga_copy_color_raw(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h);
  5778. +int            amiga_fill_rectangle_raw(gx_device *dev,int x,int y,int w,int h,gx_color_index color);
  5779. +int            amiga_draw_line_raw(gx_device *dev,int x,int y,int x1,int y1,gx_color_index color);
  5780. +int            amiga_open_ilbm(gx_device *dev);
  5781. +int            amiga_output_page_ilbm(gx_device *dev,int num_copies,int flush);
  5782. +int            amiga_close_ilbm(gx_device *dev);
  5783. +int            amiga_get_props(gx_device *dev,gs_prop_item *plist);
  5784. +int            amiga_put_props(gx_device *dev,gs_prop_item *plist,int count);
  5785. +gx_color_index        amiga_color_map_rgb_color(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue);
  5786. +int            amiga_color_map_color_rgb(gx_device *dev,gx_color_index color,gx_color_value rgb[3]);
  5787. +gx_color_index        amiga_color_map_rgb_color_pen(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue);
  5788. +int            amiga_color_map_color_rgb_pen(gx_device *dev,gx_color_index color,gx_color_value rgb[3]);
  5789. +int            amiga_copy_color8(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h);
  5790. +int            amiga_copy_mono_raw_color(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h,gx_color_index zero,gx_color_index one);
  5791. +int            amiga_copy_color_raw_color16(gx_device *dev,const UBYTE *data,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h);
  5792. +int            amiga_fill_rectangle_raw_color(gx_device *dev,int x,int y,int w,int h,gx_color_index color);
  5793. +int            amiga_draw_line_raw_color(gx_device *dev,int x,int y,int x1,int y1,gx_color_index color);
  5794. +
  5795. +    /* External reference to some libraries, required for version checking, etc. */
  5796. +
  5797. +extern struct GfxBase *GfxBase;
  5798. +extern struct Library *AslBase;
  5799. +
  5800. +    /* Number of packed bytes and pack buffer. */
  5801. +
  5802. +LONG    PackedBytes;
  5803. +BYTE    Buffer[MAXDAT + 1];
  5804. +
  5805. +    /* Bit masks. */
  5806. +
  5807. +STATIC UBYTE    shift[8] = { 128, 64, 32, 16,  8,  4,  2,  1 },
  5808. +        masks[8] = { 127,191,223,239,247,251,253,254 };
  5809. +
  5810. +    /* Device routine jump tables */
  5811. +
  5812. +STATIC gx_device_procs amiga_default_procs =
  5813. +{
  5814. +    amiga_open_default,
  5815. +    gx_default_get_initial_matrix,
  5816. +    gx_default_sync_output,
  5817. +    amiga_output_page,
  5818. +    amiga_close,
  5819. +    amiga_map_rgb_color,
  5820. +    amiga_map_color_rgb,
  5821. +    amiga_fill_rectangle,
  5822. +    gx_default_tile_rectangle,
  5823. +    amiga_copy_mono,
  5824. +    amiga_copy_color,
  5825. +    amiga_draw_line,
  5826. +    gx_default_get_bits,
  5827. +    amiga_get_props,
  5828. +    amiga_put_props
  5829. +};
  5830. +
  5831. +STATIC gx_device_procs amiga_low_procs =
  5832. +{
  5833. +    amiga_open_low,
  5834. +    gx_default_get_initial_matrix,
  5835. +    gx_default_sync_output,
  5836. +    amiga_output_page,
  5837. +    amiga_close,
  5838. +    amiga_map_rgb_color,
  5839. +    amiga_map_color_rgb,
  5840. +    amiga_fill_rectangle,
  5841. +    gx_default_tile_rectangle,
  5842. +    amiga_copy_mono,
  5843. +    amiga_copy_color,
  5844. +    amiga_draw_line,
  5845. +    gx_default_get_bits,
  5846. +    amiga_get_props,
  5847. +    amiga_put_props
  5848. +};
  5849. +
  5850. +STATIC gx_device_procs amiga_high_procs =
  5851. +{
  5852. +    amiga_open_high,
  5853. +    gx_default_get_initial_matrix,
  5854. +    gx_default_sync_output,
  5855. +    amiga_output_page,
  5856. +    amiga_close,
  5857. +    amiga_map_rgb_color,
  5858. +    amiga_map_color_rgb,
  5859. +    amiga_fill_rectangle,
  5860. +    gx_default_tile_rectangle,
  5861. +    amiga_copy_mono,
  5862. +    amiga_copy_color,
  5863. +    amiga_draw_line,
  5864. +    gx_default_get_bits,
  5865. +    amiga_get_props,
  5866. +    amiga_put_props
  5867. +};
  5868. +
  5869. +STATIC gx_device_procs amiga_super_procs =
  5870. +{
  5871. +    amiga_open_super,
  5872. +    gx_default_get_initial_matrix,
  5873. +    gx_default_sync_output,
  5874. +    amiga_output_page,
  5875. +    amiga_close,
  5876. +    amiga_map_rgb_color,
  5877. +    amiga_map_color_rgb,
  5878. +    amiga_fill_rectangle,
  5879. +    gx_default_tile_rectangle,
  5880. +    amiga_copy_mono,
  5881. +    amiga_copy_color,
  5882. +    amiga_draw_line,
  5883. +    gx_default_get_bits,
  5884. +    amiga_get_props,
  5885. +    amiga_put_props
  5886. +};
  5887. +
  5888. +STATIC gx_device_procs amiga_a2024_procs =
  5889. +{
  5890. +    amiga_open_a2024,
  5891. +    gx_default_get_initial_matrix,
  5892. +    gx_default_sync_output,
  5893. +    amiga_output_page,
  5894. +    amiga_close,
  5895. +    amiga_map_rgb_color,
  5896. +    amiga_map_color_rgb,
  5897. +    amiga_fill_rectangle,
  5898. +    gx_default_tile_rectangle,
  5899. +    amiga_copy_mono,
  5900. +    amiga_copy_color,
  5901. +    amiga_draw_line,
  5902. +    gx_default_get_bits,
  5903. +    amiga_get_props,
  5904. +    amiga_put_props
  5905. +};
  5906. +
  5907. +STATIC gx_device_procs amiga_picassoii_procs =
  5908. +{
  5909. +    amiga_open_picassoii,
  5910. +    gx_default_get_initial_matrix,
  5911. +    gx_default_sync_output,
  5912. +    amiga_output_page,
  5913. +    amiga_close,
  5914. +    amiga_map_rgb_color,
  5915. +    amiga_map_color_rgb,
  5916. +    amiga_fill_rectangle,
  5917. +    gx_default_tile_rectangle,
  5918. +    amiga_copy_mono,
  5919. +    amiga_copy_color,
  5920. +    amiga_draw_line,
  5921. +    gx_default_get_bits,
  5922. +    amiga_get_props,
  5923. +    amiga_put_props
  5924. +};
  5925. +
  5926. +STATIC gx_device_procs amiga_custom_procs =
  5927. +{
  5928. +    amiga_open_custom,
  5929. +    gx_default_get_initial_matrix,
  5930. +    gx_default_sync_output,
  5931. +    amiga_output_page,
  5932. +    amiga_close,
  5933. +    amiga_map_rgb_color,
  5934. +    amiga_map_color_rgb,
  5935. +    amiga_fill_rectangle,
  5936. +    gx_default_tile_rectangle,
  5937. +    amiga_copy_mono,
  5938. +    amiga_copy_color,
  5939. +    amiga_draw_line,
  5940. +    gx_default_get_bits,
  5941. +    amiga_get_props,
  5942. +    amiga_put_props
  5943. +};
  5944. +
  5945. +STATIC gx_device_procs amiga_printer_procs =
  5946. +{
  5947. +    amiga_open_printer,
  5948. +    gx_default_get_initial_matrix,
  5949. +    gx_default_sync_output,
  5950. +    amiga_output_page_printer,
  5951. +    amiga_close_printer,
  5952. +    amiga_map_rgb_color,
  5953. +    amiga_map_color_rgb,
  5954. +    amiga_fill_rectangle_raw,
  5955. +    gx_default_tile_rectangle,
  5956. +    amiga_copy_mono_raw,
  5957. +    amiga_copy_color_raw,
  5958. +    amiga_draw_line_raw,
  5959. +    amiga_get_bits,
  5960. +    amiga_get_props,
  5961. +    amiga_put_props
  5962. +};
  5963. +
  5964. +STATIC gx_device_procs amiga_ilbm_procs =
  5965. +{
  5966. +    amiga_open_ilbm,
  5967. +    gx_default_get_initial_matrix,
  5968. +    gx_default_sync_output,
  5969. +    amiga_output_page_ilbm,
  5970. +    amiga_close_ilbm,
  5971. +    amiga_map_rgb_color,
  5972. +    amiga_map_color_rgb,
  5973. +    amiga_fill_rectangle_raw,
  5974. +    gx_default_tile_rectangle,
  5975. +    amiga_copy_mono_raw,
  5976. +    amiga_copy_color_raw,
  5977. +    amiga_draw_line_raw,
  5978. +    amiga_get_bits,
  5979. +    amiga_get_props,
  5980. +    amiga_put_props
  5981. +};
  5982. +
  5983. +    /* Default device: opens a window on the Workbench screen and renders into it */
  5984. +
  5985. +gx_device_amiga gs_amiga_device =
  5986. +{
  5987. +    sizeof(gx_device_amiga),    /* params_size */
  5988. +    &amiga_default_procs,        /* procs */
  5989. +    "amiga",            /* dname */
  5990. +    0, 0,                /* width, height */
  5991. +    72.27, 72.27,            /* xdpi, ydpi */
  5992. +    no_margins,            /* margins */
  5993. +    dci_black_and_white,        /* color info */
  5994. +    0,                /* is_open */
  5995. +
  5996. +    NULL,                /* screen */
  5997. +    NULL,                /* window */
  5998. +
  5999. +    0,                /* super_width */
  6000. +    0,                /* super_height */
  6001. +    NULL,                /* super_bitmap */
  6002. +    NULL,                /* gadget */
  6003. +    NULL,                /* image */
  6004. +
  6005. +    NULL,                /* dispatcher */
  6006. +    NULL,                /* main */
  6007. +
  6008. +    NULL,                /* rport */
  6009. +
  6010. +    NULL,                /* printer */
  6011. +    NULL,                /* port */
  6012. +    NULL,                /* colormap */
  6013. +    NULL,                /* bitmap */
  6014. +    NULL,                /* bitplane */
  6015. +
  6016. +    1,                /* last_pen */
  6017. +
  6018. +    DEFAULT_WIDTH,            /* page width */
  6019. +    DEFAULT_HEIGHT,            /* page height */
  6020. +    DEFAULT_FILENAME,        /* output file */
  6021. +    1,                /* page counter */
  6022. +
  6023. +    0,                /* cube_size */
  6024. +    NULL,                /* temp_rport */
  6025. +    NULL,                /* temp_array */
  6026. +    NULL                /* pens */
  6027. +};
  6028. +
  6029. +    /* Low resolution device: opens a lores custom screen and renders into it */
  6030. +
  6031. +gx_device_amiga gs_amiga_low_device =
  6032. +{
  6033. +    sizeof(gx_device_amiga),    /* params_size */
  6034. +    &amiga_low_procs,        /* procs */
  6035. +    "amiga_low",            /* dname */
  6036. +    0, 0,                /* width, height */
  6037. +    72.27, 72.27,            /* xdpi, ydpi */
  6038. +    no_margins,            /* margins */
  6039. +    dci_black_and_white,        /* color info */
  6040. +    0,                /* is_open */
  6041. +
  6042. +    NULL,                /* screen */
  6043. +    NULL,                /* window */
  6044. +
  6045. +    0,                /* super_width */
  6046. +    0,                /* super_height */
  6047. +    NULL,                /* super_bitmap */
  6048. +    NULL,                /* gadget */
  6049. +    NULL,                /* image */
  6050. +
  6051. +    NULL,                /* dispatcher */
  6052. +    NULL,                /* main */
  6053. +
  6054. +    NULL,                /* rport */
  6055. +
  6056. +    NULL,                /* printer */
  6057. +    NULL,                /* port */
  6058. +    NULL,                /* colormap */
  6059. +    NULL,                /* bitmap */
  6060. +    NULL,                /* bitplane */
  6061. +
  6062. +    1,                /* last_pen */
  6063. +
  6064. +    DEFAULT_WIDTH,            /* page width */
  6065. +    DEFAULT_HEIGHT,            /* page height */
  6066. +    DEFAULT_FILENAME,        /* output file */
  6067. +    1,                /* page counter */
  6068. +
  6069. +    0,                /* cube_size */
  6070. +    NULL,                /* temp_rport */
  6071. +    NULL,                /* temp_array */
  6072. +    NULL                /* pens */
  6073. +};
  6074. +
  6075. +    /* High resolution device: opens a highres-interlaced custom screen */
  6076. +
  6077. +gx_device_amiga gs_amiga_high_device =
  6078. +{
  6079. +    sizeof(gx_device_amiga),    /* params_size */
  6080. +    &amiga_high_procs,        /* procs */
  6081. +    "amiga_high",            /* dname */
  6082. +    0, 0,                /* width, height */
  6083. +    72.27, 72.27,            /* xdpi, ydpi */
  6084. +    no_margins,            /* margins */
  6085. +    dci_black_and_white,        /* color info */
  6086. +    0,                /* is_open */
  6087. +
  6088. +    NULL,                /* screen */
  6089. +    NULL,                /* window */
  6090. +
  6091. +    0,                /* super_width */
  6092. +    0,                /* super_height */
  6093. +    NULL,                /* super_bitmap */
  6094. +    NULL,                /* gadget */
  6095. +    NULL,                /* image */
  6096. +
  6097. +    NULL,                /* dispatcher */
  6098. +    NULL,                /* main */
  6099. +
  6100. +    NULL,                /* rport */
  6101. +
  6102. +    NULL,                /* printer */
  6103. +    NULL,                /* port */
  6104. +    NULL,                /* colormap */
  6105. +    NULL,                /* bitmap */
  6106. +    NULL,                /* bitplane */
  6107. +
  6108. +    1,                /* last_pen */
  6109. +
  6110. +    DEFAULT_WIDTH,            /* page width */
  6111. +    DEFAULT_HEIGHT,            /* page height */
  6112. +    DEFAULT_FILENAME,        /* output file */
  6113. +    1,                /* page counter */
  6114. +
  6115. +    0,                /* cube_size */
  6116. +    NULL,                /* temp_rport */
  6117. +    NULL,                /* temp_array */
  6118. +    NULL                /* pens */
  6119. +};
  6120. +
  6121. +    /* Super high resolution device: opens a super-highres-interlaced custom screen */
  6122. +
  6123. +gx_device_amiga gs_amiga_super_device =
  6124. +{
  6125. +    sizeof(gx_device_amiga),    /* params_size */
  6126. +    &amiga_super_procs,        /* procs */
  6127. +    "amiga_super",            /* dname */
  6128. +    0, 0,                /* width, height */
  6129. +    72.27, 72.27,            /* xdpi, ydpi */
  6130. +    no_margins,            /* margins */
  6131. +    dci_black_and_white,        /* color info */
  6132. +    0,                /* is_open */
  6133. +
  6134. +    NULL,                /* screen */
  6135. +    NULL,                /* window */
  6136. +
  6137. +    0,                /* super_width */
  6138. +    0,                /* super_height */
  6139. +    NULL,                /* super_bitmap */
  6140. +    NULL,                /* gadget */
  6141. +    NULL,                /* image */
  6142. +
  6143. +    NULL,                /* dispatcher */
  6144. +    NULL,                /* main */
  6145. +
  6146. +    NULL,                /* rport */
  6147. +
  6148. +    NULL,                /* printer */
  6149. +    NULL,                /* port */
  6150. +    NULL,                /* colormap */
  6151. +    NULL,                /* bitmap */
  6152. +    NULL,                /* bitplane */
  6153. +
  6154. +    1,                /* last_pen */
  6155. +
  6156. +    DEFAULT_WIDTH,            /* page width */
  6157. +    DEFAULT_HEIGHT,            /* page height */
  6158. +    DEFAULT_FILENAME,        /* output file */
  6159. +    1,                /* page counter */
  6160. +
  6161. +    0,                /* cube_size */
  6162. +    NULL,                /* temp_rport */
  6163. +    NULL,                /* temp_array */
  6164. +    NULL                /* pens */
  6165. +};
  6166. +
  6167. +    /* A2024 device: opens an A2024 custom screen */
  6168. +
  6169. +gx_device_amiga gs_amiga_a2024_device =
  6170. +{
  6171. +    sizeof(gx_device_amiga),    /* params_size */
  6172. +    &amiga_a2024_procs,        /* procs */
  6173. +    "amiga_a2024",            /* dname */
  6174. +    0, 0,                /* width, height */
  6175. +    72.27, 72.27,            /* xdpi, ydpi */
  6176. +    no_margins,            /* margins */
  6177. +    dci_black_and_white,        /* color info */
  6178. +    0,                /* is_open */
  6179. +
  6180. +    NULL,                /* screen */
  6181. +    NULL,                /* window */
  6182. +
  6183. +    0,                /* super_width */
  6184. +    0,                /* super_height */
  6185. +    NULL,                /* super_bitmap */
  6186. +    NULL,                /* gadget */
  6187. +    NULL,                /* image */
  6188. +
  6189. +    NULL,                /* dispatcher */
  6190. +    NULL,                /* main */
  6191. +
  6192. +    NULL,                /* rport */
  6193. +
  6194. +    NULL,                /* printer */
  6195. +    NULL,                /* port */
  6196. +    NULL,                /* colormap */
  6197. +    NULL,                /* bitmap */
  6198. +    NULL,                /* bitplane */
  6199. +
  6200. +    1,                /* last_pen */
  6201. +
  6202. +    DEFAULT_WIDTH,            /* page width */
  6203. +    DEFAULT_HEIGHT,            /* page height */
  6204. +    DEFAULT_FILENAME,        /* output file */
  6205. +    1,                /* page counter */
  6206. +
  6207. +    0,                /* cube_size */
  6208. +    NULL,                /* temp_rport */
  6209. +    NULL,                /* temp_array */
  6210. +    NULL                /* pens */
  6211. +};
  6212. +
  6213. +    /* Picasso II device: opens a Picasso II custom screen */
  6214. +
  6215. +gx_device_amiga gs_amiga_picassoii_device =
  6216. +{
  6217. +    sizeof(gx_device_amiga),    /* params_size */
  6218. +    &amiga_picassoii_procs,        /* procs */
  6219. +    "amiga_picassoii",        /* dname */
  6220. +    0, 0,                /* width, height */
  6221. +    72.27, 72.27,            /* xdpi, ydpi */
  6222. +    no_margins,            /* margins */
  6223. +    dci_black_and_white,        /* color info */
  6224. +    0,                /* is_open */
  6225. +
  6226. +    NULL,                /* screen */
  6227. +    NULL,                /* window */
  6228. +
  6229. +    0,                /* super_width */
  6230. +    0,                /* super_height */
  6231. +    NULL,                /* super_bitmap */
  6232. +    NULL,                /* gadget */
  6233. +    NULL,                /* image */
  6234. +
  6235. +    NULL,                /* dispatcher */
  6236. +    NULL,                /* main */
  6237. +
  6238. +    NULL,                /* rport */
  6239. +
  6240. +    NULL,                /* printer */
  6241. +    NULL,                /* port */
  6242. +    NULL,                /* colormap */
  6243. +    NULL,                /* bitmap */
  6244. +    NULL,                /* bitplane */
  6245. +
  6246. +    1,                /* last_pen */
  6247. +
  6248. +    DEFAULT_WIDTH,            /* page width */
  6249. +    DEFAULT_HEIGHT,            /* page height */
  6250. +    DEFAULT_FILENAME,        /* output file */
  6251. +    1,                /* page counter */
  6252. +
  6253. +    0,                /* cube_size */
  6254. +    NULL,                /* temp_rport */
  6255. +    NULL,                /* temp_array */
  6256. +    NULL                /* pens */
  6257. +};
  6258. +
  6259. +    /* Custom device: opens a custom screen, will ask for screen mode or check env variable. */
  6260. +
  6261. +gx_device_amiga gs_amiga_custom_device =
  6262. +{
  6263. +    sizeof(gx_device_amiga),    /* params_size */
  6264. +    &amiga_custom_procs,        /* procs */
  6265. +    "amiga_custom",            /* dname */
  6266. +    0, 0,                /* width, height */
  6267. +    72.27, 72.27,            /* xdpi, ydpi */
  6268. +    no_margins,            /* margins */
  6269. +    dci_black_and_white,        /* color info */
  6270. +    0,                /* is_open */
  6271. +
  6272. +    NULL,                /* screen */
  6273. +    NULL,                /* window */
  6274. +
  6275. +    0,                /* super_width */
  6276. +    0,                /* super_height */
  6277. +    NULL,                /* super_bitmap */
  6278. +    NULL,                /* gadget */
  6279. +    NULL,                /* image */
  6280. +
  6281. +    NULL,                /* dispatcher */
  6282. +    NULL,                /* main */
  6283. +
  6284. +    NULL,                /* rport */
  6285. +
  6286. +    NULL,                /* printer */
  6287. +    NULL,                /* port */
  6288. +    NULL,                /* colormap */
  6289. +    NULL,                /* bitmap */
  6290. +    NULL,                /* bitplane */
  6291. +
  6292. +    1,                /* last_pen */
  6293. +
  6294. +    DEFAULT_WIDTH,            /* page width */
  6295. +    DEFAULT_HEIGHT,            /* page height */
  6296. +    DEFAULT_FILENAME,        /* output file */
  6297. +    1,                /* page counter */
  6298. +
  6299. +    0,                /* cube_size */
  6300. +    NULL,                /* temp_rport */
  6301. +    NULL,                /* temp_array */
  6302. +    NULL                /* pens */
  6303. +};
  6304. +
  6305. +    /* Printer device: renders the imagery and sends it to the printer */
  6306. +
  6307. +gx_device_amiga gs_amiga_printer_device =
  6308. +{
  6309. +    sizeof(gx_device_amiga),    /* params_size */
  6310. +    &amiga_printer_procs,        /* procs */
  6311. +    "amiga_printer",        /* dname */
  6312. +    0, 0,                /* width, height */
  6313. +    72.27, 72.27,            /* xdpi, ydpi */
  6314. +    no_margins,            /* margins */
  6315. +    dci_black_and_white,        /* color info */
  6316. +    0,                /* is_open */
  6317. +
  6318. +    NULL,                /* screen */
  6319. +    NULL,                /* window */
  6320. +
  6321. +    0,                /* super_width */
  6322. +    0,                /* super_height */
  6323. +    NULL,                /* super_bitmap */
  6324. +    NULL,                /* gadget */
  6325. +    NULL,                /* image */
  6326. +
  6327. +    NULL,                /* dispatcher */
  6328. +    NULL,                /* main */
  6329. +
  6330. +    NULL,                /* rport */
  6331. +
  6332. +    NULL,                /* printer */
  6333. +    NULL,                /* port */
  6334. +    NULL,                /* colormap */
  6335. +    NULL,                /* bitmap */
  6336. +    NULL,                /* bitplane */
  6337. +
  6338. +    1,                /* last_pen */
  6339. +
  6340. +    DEFAULT_WIDTH,            /* page width */
  6341. +    DEFAULT_HEIGHT,            /* page height */
  6342. +    DEFAULT_FILENAME,        /* output file */
  6343. +    1,                /* page counter */
  6344. +
  6345. +    0,                /* cube_size */
  6346. +    NULL,                /* temp_rport */
  6347. +    NULL,                /* temp_array */
  6348. +    NULL                /* pens */
  6349. +};
  6350. +
  6351. +    /* ILBM device: renders the imagery and saves it to an IFF-ILBM file. */
  6352. +
  6353. +gx_device_amiga gs_amiga_ilbm_device =
  6354. +{
  6355. +    sizeof(gx_device_amiga),    /* params_size */
  6356. +    &amiga_ilbm_procs,        /* procs */
  6357. +    "amiga_ilbm",            /* dname */
  6358. +    0, 0,                /* width, height */
  6359. +    72.27, 72.27,            /* xdpi, ydpi */
  6360. +    no_margins,            /* margins */
  6361. +    dci_black_and_white,        /* color info */
  6362. +    0,                /* is_open */
  6363. +
  6364. +    NULL,                /* screen */
  6365. +    NULL,                /* window */
  6366. +
  6367. +    0,                /* super_width */
  6368. +    0,                /* super_height */
  6369. +    NULL,                /* super_bitmap */
  6370. +    NULL,                /* gadget */
  6371. +    NULL,                /* image */
  6372. +
  6373. +    NULL,                /* dispatcher */
  6374. +    NULL,                /* main */
  6375. +
  6376. +    NULL,                /* rport */
  6377. +
  6378. +    NULL,                /* printer */
  6379. +    NULL,                /* port */
  6380. +    NULL,                /* colormap */
  6381. +    NULL,                /* bitmap */
  6382. +    NULL,                /* bitplane */
  6383. +
  6384. +    1,                /* last_pen */
  6385. +
  6386. +    DEFAULT_WIDTH,            /* page width */
  6387. +    DEFAULT_HEIGHT,            /* page height */
  6388. +    DEFAULT_FILENAME,        /* output file */
  6389. +    1,                /* page counter */
  6390. +
  6391. +    0,                /* cube_size */
  6392. +    NULL,                /* temp_rport */
  6393. +    NULL,                /* temp_array */
  6394. +    NULL                /* pens */
  6395. +};
  6396. +
  6397. +    /* Dark (black) and light (white) rendering colours; the default device
  6398. +     * determines the actual colours to be used by looking into the screen
  6399. +     * colour lookup table, the other device drivers leave these values
  6400. +     * untouched.
  6401. +     */
  6402. +
  6403. +STATIC UBYTE    DarkPen        = 0,
  6404. +        LightPen    = 1;
  6405. +
  6406. +    /* Cheap, but effective ;-) */
  6407. +
  6408. +#define xdev ((gx_device_amiga *)dev)
  6409. +
  6410. +    /* set_mono_device(gx_device_amiga *dev,int cube_size,LONG *pens):
  6411. +     *
  6412. +     *    Reconfigure a device for monochrome output.
  6413. +     */
  6414. +
  6415. +VOID
  6416. +set_mono_device(gx_device_amiga *dev)
  6417. +{
  6418. +    xdev -> color_info . depth        = 1;
  6419. +    xdev -> color_info . num_components    = 1;
  6420. +    xdev -> color_info . max_gray        = 1;
  6421. +    xdev -> color_info . max_rgb        = 0;
  6422. +    xdev -> color_info . dither_gray    = 2;
  6423. +    xdev -> color_info . dither_rgb        = 0;
  6424. +
  6425. +    xdev -> procs -> copy_color        = amiga_copy_color;
  6426. +    xdev -> procs -> map_rgb_color        = amiga_map_rgb_color;
  6427. +    xdev -> procs -> map_color_rgb        = amiga_map_color_rgb;
  6428. +
  6429. +    xdev -> cube_size            = 0;
  6430. +}
  6431. +
  6432. +    /* set_colour_device(gx_device_amiga *dev,int cube_size,LONG *pens):
  6433. +     *
  6434. +     *    Reconfigure a device for colour output.
  6435. +     */
  6436. +
  6437. +VOID
  6438. +set_colour_device(gx_device_amiga *dev,int cube_size,LONG *pens)
  6439. +{
  6440. +    xdev -> color_info . depth        = 8;
  6441. +    xdev -> color_info . num_components    = 3;
  6442. +    xdev -> color_info . max_gray        = cube_size - 1;
  6443. +    xdev -> color_info . max_rgb        = cube_size - 1;
  6444. +    xdev -> color_info . dither_gray    = cube_size;
  6445. +    xdev -> color_info . dither_rgb        = cube_size;
  6446. +
  6447. +    xdev -> procs -> copy_color        = amiga_copy_color8;
  6448. +
  6449. +        /* Any colours to be remapped? */
  6450. +
  6451. +    if(pens)
  6452. +    {
  6453. +        xdev -> procs -> map_rgb_color    = amiga_color_map_rgb_color_pen;
  6454. +        xdev -> procs -> map_color_rgb    = amiga_color_map_color_rgb_pen;
  6455. +        xdev -> pens            = pens;
  6456. +    }
  6457. +    else
  6458. +    {
  6459. +        xdev -> procs -> map_rgb_color    = amiga_color_map_rgb_color;
  6460. +        xdev -> procs -> map_color_rgb    = amiga_color_map_color_rgb;
  6461. +    }
  6462. +
  6463. +        /* Remember the size of the RGB cube. */
  6464. +
  6465. +    xdev -> cube_size            = cube_size;
  6466. +}
  6467. +
  6468. +    /* set_colour_printer_device(gx_device_amiga *dev,LONG CubeSize):
  6469. +     *
  6470. +     *    Configure the printer device for colour output.
  6471. +     */
  6472. +
  6473. +VOID
  6474. +set_colour_printer_device(gx_device_amiga *dev,LONG CubeSize)
  6475. +{
  6476. +    xdev -> color_info . depth        = 16;
  6477. +    xdev -> color_info . num_components    = 3;
  6478. +    xdev -> color_info . max_gray        = CubeSize - 1;
  6479. +    xdev -> color_info . max_rgb        = CubeSize - 1;
  6480. +    xdev -> color_info . dither_gray    = CubeSize;
  6481. +    xdev -> color_info . dither_rgb        = CubeSize;
  6482. +
  6483. +    xdev -> procs -> fill_rectangle        = amiga_fill_rectangle_raw_color;
  6484. +    xdev -> procs -> copy_mono        = amiga_copy_mono_raw_color;
  6485. +    xdev -> procs -> copy_color        = amiga_copy_color_raw_color16;
  6486. +    xdev -> procs -> draw_line        = amiga_draw_line_raw_color;
  6487. +    xdev -> procs -> get_bits        = gx_default_get_bits;
  6488. +    xdev -> procs -> map_rgb_color        = amiga_color_map_rgb_color;
  6489. +    xdev -> procs -> map_color_rgb        = amiga_color_map_color_rgb;
  6490. +    xdev -> cube_size            = CubeSize;
  6491. +}
  6492. +
  6493. +    /* DeleteBitMap(struct BitMap *BitMap,BOOL Private):
  6494. +     *
  6495. +     *    Free memory associated with a custom rendering bitmap.
  6496. +     */
  6497. +
  6498. +VOID
  6499. +DeleteBitMap(struct BitMap *BitMap,BOOL Private)
  6500. +{
  6501. +    if(GfxBase -> LibNode . lib_Version >= 39 && !Private)
  6502. +        FreeBitMap(BitMap);
  6503. +    else
  6504. +    {
  6505. +        LONG i;
  6506. +
  6507. +        for(i = 0 ; i < BitMap -> Depth ; i++)
  6508. +        {
  6509. +            if(BitMap -> Planes[i])
  6510. +                FreeVec(BitMap -> Planes[i]);
  6511. +        }
  6512. +
  6513. +        FreeVec(BitMap);
  6514. +    }
  6515. +}
  6516. +
  6517. +    /* CreateBitMap(LONG Width,LONG Height,LONG Depth,ULONG Flags,struct BitMap *Friend,BOOL Private):
  6518. +     *
  6519. +     *    Create a custom rendering bitmap.
  6520. +     */
  6521. +
  6522. +struct BitMap *
  6523. +CreateBitMap(LONG Width,LONG Height,LONG Depth,ULONG Flags,struct BitMap *Friend,BOOL Private)
  6524. +{
  6525. +    if(GfxBase -> LibNode . lib_Version >= 39 && !Private)
  6526. +        return(AllocBitMap(Width,Height,Depth,Flags,Friend));
  6527. +    else
  6528. +    {
  6529. +        struct BitMap    *BitMap;
  6530. +        LONG         Plus;
  6531. +        ULONG         MemType;
  6532. +
  6533. +            /* Bitmap structure needs to be padded if more
  6534. +             * than the standard eight bitplanes are to be
  6535. +             * allocated.
  6536. +             */
  6537. +
  6538. +        if(Depth > 8)
  6539. +            Plus = (Depth - 8) * sizeof(PLANEPTR);
  6540. +        else
  6541. +            Plus = 0;
  6542. +
  6543. +        if(Private)
  6544. +            MemType = MEMF_ANY;
  6545. +        else
  6546. +            MemType = MEMF_CHIP;
  6547. +
  6548. +        if(BitMap = (struct BitMap *)AllocVec(sizeof(struct BitMap) + Plus,MEMF_ANY | MEMF_CLEAR))
  6549. +        {
  6550. +            LONG i,PageSize;
  6551. +
  6552. +            InitBitMap(BitMap,Depth,Width,Height);
  6553. +
  6554. +            PageSize = BitMap -> BytesPerRow * BitMap -> Rows;
  6555. +
  6556. +            for(i = 0 ; i < BitMap -> Depth ; i++)
  6557. +            {
  6558. +                if(!(BitMap -> Planes[i] = (PLANEPTR)AllocVec(PageSize,MemType)))
  6559. +                {
  6560. +                    LONG j;
  6561. +
  6562. +                    for(j = 0 ; j < i ; j++)
  6563. +                        FreeVec(BitMap -> Planes[j]);
  6564. +
  6565. +                    FreeVec(BitMap);
  6566. +
  6567. +                    return(NULL);
  6568. +                }
  6569. +            }
  6570. +
  6571. +            return(BitMap);
  6572. +        }
  6573. +    }
  6574. +}
  6575. +
  6576. +    /* DeleteTempRPort(struct RastPort *Temp):
  6577. +     *
  6578. +     *    Free memory associated with a temporary raster port.
  6579. +     */
  6580. +
  6581. +VOID
  6582. +DeleteTempRPort(struct RastPort *Temp)
  6583. +{
  6584. +    DeleteBitMap(Temp -> BitMap,FALSE);
  6585. +
  6586. +    FreeVec(Temp);
  6587. +}
  6588. +
  6589. +    /* CreateTempRPort(struct RastPort *Source):
  6590. +     *
  6591. +     *    Allocate memory for temporary raster port (one line high).
  6592. +     */
  6593. +
  6594. +struct RastPort *
  6595. +CreateTempRPort(struct RastPort *Source)
  6596. +{
  6597. +    struct RastPort *Temp;
  6598. +
  6599. +    if(Temp = (struct RastPort *)AllocVec(sizeof(struct RastPort),MEMF_ANY))
  6600. +    {
  6601. +        LONG Width,Depth;
  6602. +
  6603. +        CopyMem(Source,Temp,sizeof(struct RastPort));
  6604. +
  6605. +        Temp -> Layer = NULL;
  6606. +
  6607. +        if(GfxBase -> LibNode . lib_Version >= 39)
  6608. +        {
  6609. +            Width    = GetBitMapAttr(Source -> BitMap,BMA_WIDTH);
  6610. +            Depth    = GetBitMapAttr(Source -> BitMap,BMA_DEPTH);
  6611. +        }
  6612. +        else
  6613. +        {
  6614. +            Width    = Source -> BitMap -> BytesPerRow * 8;
  6615. +            Depth    = Source -> BitMap -> Depth;
  6616. +        }
  6617. +
  6618. +        if(Temp -> BitMap = CreateBitMap(Width,1,Depth,NULL,Source -> BitMap,FALSE))
  6619. +            return(Temp);
  6620. +        else
  6621. +            FreeVec(Temp);
  6622. +    }
  6623. +
  6624. +    return(NULL);
  6625. +}
  6626. +
  6627. +    /* Euclid(LONG a,LONG b):
  6628. +     *
  6629. +     *    Compute the greatest common divisor of two integers.
  6630. +     */
  6631. +
  6632. +LONG
  6633. +Euclid(LONG a,LONG b)
  6634. +{
  6635. +    do
  6636. +    {
  6637. +        if(a < b)
  6638. +        {
  6639. +            LONG t;
  6640. +
  6641. +            t = a;
  6642. +            a = b;
  6643. +            b = t;
  6644. +        }
  6645. +
  6646. +        a = a % b;
  6647. +    }
  6648. +    while(a);
  6649. +
  6650. +    return(b);
  6651. +}
  6652. +
  6653. +    /* PutDump(register BYTE *Destination,register LONG Count):
  6654. +     *
  6655. +     *    Store a byte dump.
  6656. +     */
  6657. +
  6658. +BYTE *
  6659. +PutDump(register BYTE *Destination,register LONG Count)
  6660. +{
  6661. +    register BYTE *Source = Buffer;
  6662. +
  6663. +    *Destination++     = Count - 1;
  6664. +     PackedBytes    += Count + 1;
  6665. +
  6666. +    while(Count--)
  6667. +        *Destination++ = *Source++;
  6668. +
  6669. +    return(Destination);
  6670. +}
  6671. +
  6672. +    /* PutRun(register BYTE *Destination,LONG Count,WORD Char):
  6673. +     *
  6674. +     *    Store a byte run.
  6675. +     */
  6676. +
  6677. +BYTE *
  6678. +PutRun(register BYTE *Destination,LONG Count,WORD Char)
  6679. +{
  6680. +    *Destination++     = -(Count - 1);
  6681. +    *Destination++     = Char;
  6682. +     PackedBytes    += 2; 
  6683. +
  6684. +    return(Destination);
  6685. +}
  6686. +
  6687. +    /* PackRow(PLANEPTR *SourcePtr,register BYTE *Destination,LONG RowSize):
  6688. +     *
  6689. +     *    Pack a raster line using the CmpByteRun1 algorithm.
  6690. +     */
  6691. +
  6692. +LONG
  6693. +PackRow(PLANEPTR *SourcePtr,register BYTE *Destination,LONG RowSize)
  6694. +{
  6695. +    register BYTE *Source = *SourcePtr;
  6696. +
  6697. +    WORD    Buffered    = 1,
  6698. +        RunStart    = 0;
  6699. +    BYTE    Mode        = DUMP,
  6700. +        LastChar,
  6701. +        Char;
  6702. +
  6703. +    PackedBytes = 0;
  6704. +
  6705. +    Buffer[0] = LastChar = Char = *Source++;
  6706. +
  6707. +    RowSize--;
  6708. +
  6709. +    while(RowSize--)
  6710. +    {
  6711. +        Buffer[Buffered++] = Char = *Source++;
  6712. +
  6713. +        if(Mode)
  6714. +        {
  6715. +            if((Char != LastChar) || (Buffered - RunStart > MAXRUN))
  6716. +            {
  6717. +                Destination    = PutRun(Destination,Buffered - 1 - RunStart,LastChar);
  6718. +                Buffer[0]    = Char;
  6719. +                Buffered    = 1;
  6720. +                RunStart    = 0;
  6721. +                Mode        = DUMP;
  6722. +            }
  6723. +        }
  6724. +        else
  6725. +        {
  6726. +            if(Buffered > MAXDAT)
  6727. +            {
  6728. +                Destination    = PutDump(Destination,Buffered - 1);
  6729. +                Buffer[0]    = Char;
  6730. +                Buffered    = 1;
  6731. +                RunStart    = 0;
  6732. +            }
  6733. +            else
  6734. +            {
  6735. +                if(Char == LastChar)
  6736. +                {
  6737. +                    if(Buffered - RunStart >= MINRUN)
  6738. +                    {
  6739. +                        if(RunStart)
  6740. +                            Destination = PutDump(Destination,RunStart);
  6741. +
  6742. +                        Mode = RUN;
  6743. +                    }
  6744. +                    else
  6745. +                    {
  6746. +                        if(!RunStart)
  6747. +                            Mode = RUN;
  6748. +                    }
  6749. +                }
  6750. +                else
  6751. +                    RunStart = Buffered - 1;
  6752. +            }
  6753. +        }
  6754. +
  6755. +        LastChar = Char;
  6756. +    }
  6757. +
  6758. +    if(Mode)
  6759. +        PutRun(Destination,Buffered - RunStart,LastChar);
  6760. +    else
  6761. +        PutDump(Destination,Buffered);
  6762. +
  6763. +    *SourcePtr = Source;
  6764. +
  6765. +    return(PackedBytes);
  6766. +}
  6767. +
  6768. +    /* PutBODY(struct IFFHandle *Handle,struct BitMap *BitMap):
  6769. +     *
  6770. +     *    Store a bitmap in a BODY chunk.
  6771. +     */
  6772. +
  6773. +BOOL
  6774. +PutBODY(struct IFFHandle *Handle,struct BitMap *BitMap)
  6775. +{
  6776. +    PLANEPTR    *Planes;
  6777. +    BYTE        *PackBuffer;
  6778. +    BOOL         Success = FALSE;
  6779. +    LONG         PackedBytes,
  6780. +             i,j;
  6781. +
  6782. +        /* Allocate the bitplane information. */
  6783. +
  6784. +    if(Planes = (PLANEPTR *)AllocVec(BitMap -> Depth * sizeof(PLANEPTR *),MEMF_ANY | MEMF_CLEAR))
  6785. +    {
  6786. +            /* Allocate the compression buffer. */
  6787. +
  6788. +        if(PackBuffer = (BYTE *)AllocVec(BitMap -> BytesPerRow * 2,MEMF_ANY))
  6789. +        {
  6790. +                /* Copy the planes over. */
  6791. +
  6792. +            for(i = 0 ; i < BitMap -> Depth ; i++)
  6793. +                Planes[i] = BitMap -> Planes[i];
  6794. +
  6795. +            if(!PushChunk(Handle,0,ID_BODY,IFFSIZE_UNKNOWN))
  6796. +            {
  6797. +                Success = TRUE;
  6798. +
  6799. +                    /* Run down the rows. */
  6800. +
  6801. +                for(i = 0 ; Success && i < BitMap -> Rows ; i++)
  6802. +                {
  6803. +                    for(j = 0 ; Success && j < BitMap -> Depth ; j++)
  6804. +                    {
  6805. +                            /* Pack the data. */
  6806. +
  6807. +                        PackedBytes = PackRow(&Planes[j],PackBuffer,BitMap -> BytesPerRow);
  6808. +
  6809. +                            /* Write it to disk. */
  6810. +
  6811. +                        if(WriteChunkRecords(Handle,PackBuffer,PackedBytes,1) != 1)
  6812. +                            Success = FALSE;
  6813. +                    }
  6814. +                }
  6815. +
  6816. +                if(PopChunk(Handle))
  6817. +                    Success = FALSE;
  6818. +            }
  6819. +
  6820. +            FreeVec(PackBuffer);
  6821. +        }
  6822. +
  6823. +        FreeVec(Planes);
  6824. +    }
  6825. +
  6826. +    return(Success);
  6827. +}
  6828. +
  6829. +    /* PutANNO(struct IFFHandle *Handle):
  6830. +     *
  6831. +     *    Store annotation chunk.
  6832. +     */
  6833. +
  6834. +BOOL
  6835. +PutANNO(struct IFFHandle *Handle)
  6836. +{
  6837. +    STATIC STRPTR Note = "Rendered by GNU Ghostscript 2.6.0";
  6838. +
  6839. +    if(!PushChunk(Handle,0,ID_ANNO,strlen(Note)))
  6840. +    {
  6841. +        if(WriteChunkRecords(Handle,Note,strlen(Note),1) == 1)
  6842. +        {
  6843. +            if(!PopChunk(Handle))
  6844. +                return(TRUE);
  6845. +        }
  6846. +    }
  6847. +
  6848. +    return(FALSE);
  6849. +}
  6850. +
  6851. +    /* PutCAMG(struct IFFHandle *Handle):
  6852. +     *
  6853. +     *    Store display mode chunk.
  6854. +     */
  6855. +
  6856. +BOOL
  6857. +PutCAMG(struct IFFHandle *Handle)
  6858. +{
  6859. +    ULONG ViewModes = HIRESLACE_KEY;
  6860. +
  6861. +    if(!PushChunk(Handle,0,ID_CAMG,sizeof(ULONG)))
  6862. +    {
  6863. +        if(WriteChunkRecords(Handle,&ViewModes,sizeof(ULONG),1) == 1)
  6864. +        {
  6865. +            if(!PopChunk(Handle))
  6866. +                return(TRUE);
  6867. +        }
  6868. +    }
  6869. +
  6870. +    return(FALSE);
  6871. +}
  6872. +
  6873. +    /* PutCMAP(struct IFFHandle *Handle):
  6874. +     *
  6875. +     *    Store colour map chunk.
  6876. +     */
  6877. +
  6878. +BOOL
  6879. +PutCMAP(struct IFFHandle *Handle)
  6880. +{
  6881. +    STATIC UBYTE Colours[2][3] =
  6882. +    {
  6883. +        0x00,0x00,0x00,
  6884. +        0xFF,0xFF,0xFF
  6885. +    };
  6886. +
  6887. +    if(!PushChunk(Handle,0,ID_CMAP,sizeof(Colours)))
  6888. +    {
  6889. +        if(WriteChunkRecords(Handle,Colours,2,3) == 3)
  6890. +        {
  6891. +            if(!PopChunk(Handle))
  6892. +                return(TRUE);
  6893. +        }
  6894. +    }
  6895. +
  6896. +    return(FALSE);
  6897. +}
  6898. +
  6899. +    /* PutDPI(struct IFFHandle *Handle,UWORD X_DPI,UWORD Y_DPI):
  6900. +     *
  6901. +     *    Store DPI chunk.
  6902. +     */
  6903. +
  6904. +BOOL
  6905. +PutDPI(struct IFFHandle *Handle,UWORD X_DPI,UWORD Y_DPI)
  6906. +{
  6907. +    DPIHeader Header;
  6908. +
  6909. +    Header . dpi_x = X_DPI;
  6910. +    Header . dpi_y = Y_DPI;
  6911. +
  6912. +    if(!PushChunk(Handle,0,ID_DPI,sizeof(Header)))
  6913. +    {
  6914. +        if(WriteChunkRecords(Handle,&Header,sizeof(Header),1) == 1)
  6915. +        {
  6916. +            if(!PopChunk(Handle))
  6917. +                return(TRUE);
  6918. +        }
  6919. +    }
  6920. +
  6921. +    return(FALSE);
  6922. +}
  6923. +
  6924. +    /* PutBMHD(struct IFFHandle *Handle,LONG Width,LONG Height,UWORD X_DPI,UWORD Y_DPI):
  6925. +     *
  6926. +     *    Store BMHD chunk.
  6927. +     */
  6928. +
  6929. +BOOL
  6930. +PutBMHD(struct IFFHandle *Handle,LONG Width,LONG Height,UWORD X_DPI,UWORD Y_DPI)
  6931. +{
  6932. +        /* Valid parameters? */
  6933. +
  6934. +    if(X_DPI > 0 && Y_DPI > 0 && Width > 0 && Height > 0)
  6935. +    {
  6936. +        BitMapHeader    Header;
  6937. +        UWORD        gcd;
  6938. +
  6939. +            /* So we can store neat & small
  6940. +             * aspect ration values.
  6941. +             */
  6942. +
  6943. +        gcd = Euclid(X_DPI,Y_DPI);
  6944. +
  6945. +        Header . w            = Width;
  6946. +        Header . h            = Height;
  6947. +        Header . pageWidth        = Width;
  6948. +        Header . pageHeight        = Height;
  6949. +        Header . x            = 0;
  6950. +        Header . y            = 0;
  6951. +        Header . nPlanes        = 1;
  6952. +        Header . masking        = 0;
  6953. +        Header . compression        = 1;
  6954. +        Header . pad1            = 0;
  6955. +        Header . transparentColor    = 0;
  6956. +        Header . xAspect        = X_DPI / gcd;
  6957. +        Header . yAspect        = Y_DPI / gcd;
  6958. +
  6959. +        if(!PushChunk(Handle,0,ID_BMHD,sizeof(Header)))
  6960. +        {
  6961. +            if(WriteChunkRecords(Handle,&Header,sizeof(Header),1) == 1)
  6962. +            {
  6963. +                if(!PopChunk(Handle))
  6964. +                    return(TRUE);
  6965. +            }
  6966. +        }
  6967. +    }
  6968. +
  6969. +    return(FALSE);
  6970. +}
  6971. +
  6972. +    /* SaveBitMap(STRPTR Name,struct BitMap *BitMap,LONG Width,LONG Height,UWORD X_DPI,UWORD Y_DPI):
  6973. +     *
  6974. +     *    Store a bitmap in an IFF-ILBM file.
  6975. +     */
  6976. +
  6977. +BOOL
  6978. +SaveBitMap(STRPTR Name,struct BitMap *BitMap,LONG Width,LONG Height,UWORD X_DPI,UWORD Y_DPI)
  6979. +{
  6980. +    struct IFFHandle    *Handle;
  6981. +    BOOL             Success = FALSE;
  6982. +
  6983. +    if(Handle = AllocIFF())
  6984. +    {
  6985. +        if(Handle -> iff_Stream = Open(Name,MODE_NEWFILE))
  6986. +        {
  6987. +            InitIFFasDOS(Handle);
  6988. +
  6989. +            if(!OpenIFF(Handle,IFFF_WRITE))
  6990. +            {
  6991. +                if(!PushChunk(Handle,ID_ILBM,ID_FORM,IFFSIZE_UNKNOWN))
  6992. +                {
  6993. +                    if(PutBMHD(Handle,Width,Height,X_DPI,Y_DPI))
  6994. +                    {
  6995. +                        if(PutANNO(Handle))
  6996. +                        {
  6997. +                            if(PutCMAP(Handle))
  6998. +                            {
  6999. +                                if(PutCAMG(Handle))
  7000. +                                {
  7001. +                                    if(PutDPI(Handle,X_DPI,Y_DPI))
  7002. +                                    {
  7003. +                                        if(PutBODY(Handle,BitMap))
  7004. +                                            Success = TRUE;
  7005. +                                    }
  7006. +                                }
  7007. +                            }
  7008. +                        }
  7009. +                    }
  7010. +
  7011. +                    if(PopChunk(Handle))
  7012. +                        Success = FALSE;
  7013. +                }
  7014. +
  7015. +                CloseIFF(Handle);
  7016. +            }
  7017. +
  7018. +            Close(Handle -> iff_Stream);
  7019. +
  7020. +            if(!Success)
  7021. +                DeleteFile(Name);
  7022. +        }
  7023. +
  7024. +        FreeIFF(Handle);
  7025. +    }
  7026. +
  7027. +    return(Success);
  7028. +}
  7029. +
  7030. +    /* GetInches(STRPTR Buffer):
  7031. +     *
  7032. +     *    Turn a parameter string into a number representing
  7033. +     *    a certain number of inches.
  7034. +     */
  7035. +
  7036. +float
  7037. +GetInches(STRPTR Buffer)
  7038. +{
  7039. +    STATIC struct { STRPTR Unit; float Factor; } Units[7] =
  7040. +    {
  7041. +        "pt",    1.0,            /* Point */
  7042. +        "pc",    12.0,            /* Pica */
  7043. +        "in",    72.72,            /* Inch */
  7044. +        "cm",    72.72 / 2.54,        /* Centimeter */
  7045. +        "mm",    727.2 / 2.54,        /* Millimeter */
  7046. +        "dd",    1157.0 / 1238.0,    /* Didot point */
  7047. +        "cc",    1157.0 / 103.0        /* Cicero */
  7048. +    };
  7049. +
  7050. +    UBYTE    Temp[40];
  7051. +    float    Value;
  7052. +    LONG    i;
  7053. +
  7054. +    i = 0;
  7055. +
  7056. +        /* Strip the numeric part. */
  7057. +
  7058. +    while((Buffer[i] >= '0' && Buffer[i] <= '9') || Buffer[i] == '.' || Buffer[i] == '+' || Buffer[i] == '-' || Buffer[i] == 'e')
  7059. +    {
  7060. +        Temp[i] = Buffer[i];
  7061. +
  7062. +        i++;
  7063. +    }
  7064. +
  7065. +        /* Provide null-termination. */
  7066. +
  7067. +    Temp[i] = 0;
  7068. +
  7069. +        /* atof() appears to be broken in ixemul.library 39.45. */
  7070. +
  7071. +    sscanf(Temp,"%f",&Value);
  7072. +
  7073. +    Buffer += i;
  7074. +
  7075. +        /* Which measuring unit? */
  7076. +
  7077. +    for(i = 0 ; i < 7 ; i++)
  7078. +    {
  7079. +            /* Return the result in inches. */
  7080. +
  7081. +        if(!Stricmp(Buffer,Units[i] . Unit))
  7082. +            return(Value * Units[i] . Factor / 72.27);
  7083. +    }
  7084. +
  7085. +        /* Return the result in inches. */
  7086. +
  7087. +    return(Value / 72.27);
  7088. +}
  7089. +
  7090. +    /* DispatchTask():
  7091. +     *
  7092. +     *    Asynchronous window message dispatcher.
  7093. +     */
  7094. +
  7095. +VOID
  7096. +DispatchTask()
  7097. +{
  7098. +    struct Task    *me;
  7099. +    gx_device    *dev;
  7100. +
  7101. +        /* Set up global data area base register. */
  7102. +
  7103. +    ix_geta4();
  7104. +
  7105. +        /* Who am I? */
  7106. +
  7107. +    me = FindTask(NULL);
  7108. +
  7109. +        /* Wait for wakeup call. */
  7110. +
  7111. +    Wait(SIG_HANDSHAKE);
  7112. +
  7113. +        /* Obtain device pointer. */
  7114. +
  7115. +    dev = me -> tc_UserData;
  7116. +
  7117. +        /* Enable user input. */
  7118. +
  7119. +    if(ModifyIDCMP(xdev -> window,IDCMP_FLAGS))
  7120. +    {
  7121. +        ULONG    Mask = 1 << xdev -> window -> UserPort -> mp_SigBit,
  7122. +            Set;
  7123. +        BOOL    Done = FALSE;
  7124. +
  7125. +            /* Fill in the dispatcher entry. */
  7126. +
  7127. +        xdev -> dispatcher = me;
  7128. +
  7129. +            /* Ring back. */
  7130. +
  7131. +        Signal((struct Task *)xdev -> main,SIG_HANDSHAKE);
  7132. +
  7133. +            /* Wait for input... */
  7134. +
  7135. +        do
  7136. +        {
  7137. +            Set = Wait(Mask | SIG_KILL);
  7138. +
  7139. +            if(Set & Mask)
  7140. +                DispatchSuperWindow(dev);
  7141. +
  7142. +            if(Set & SIG_KILL)
  7143. +                Done = TRUE;
  7144. +        }
  7145. +        while(!Done);
  7146. +
  7147. +            /* Disable user input. */
  7148. +
  7149. +        ModifyIDCMP(xdev -> window,NULL);
  7150. +    }
  7151. +
  7152. +        /* Disable task switching. */
  7153. +
  7154. +    Forbid();
  7155. +
  7156. +        /* Clear the dispatcher entry. */
  7157. +
  7158. +    xdev -> dispatcher = NULL;
  7159. +
  7160. +        /* Signal the main process that we are done. */
  7161. +
  7162. +    Signal((struct Task *)xdev -> main,SIG_HANDSHAKE);
  7163. +
  7164. +        /* Remove ourselves. */
  7165. +
  7166. +    RemTask(NULL);
  7167. +}
  7168. +
  7169. +    /* DeleteScrollers(gx_device *dev):
  7170. +     *
  7171. +     *    Delete the window border scrollers.
  7172. +     */
  7173. +
  7174. +VOID
  7175. +DeleteScrollers(gx_device *dev)
  7176. +{
  7177. +    if(xdev -> gadget)
  7178. +    {
  7179. +        if(xdev -> gadget[HORIZONTAL_SCROLLER])
  7180. +            DisposeObject(xdev -> gadget[HORIZONTAL_SCROLLER]);
  7181. +
  7182. +        if(xdev -> gadget[VERTICAL_SCROLLER])
  7183. +            DisposeObject(xdev -> gadget[VERTICAL_SCROLLER]);
  7184. +
  7185. +        if(xdev -> gadget[UP_ARROW])
  7186. +            DisposeObject(xdev -> gadget[UP_ARROW]);
  7187. +
  7188. +        if(xdev -> gadget[DOWN_ARROW])
  7189. +            DisposeObject(xdev -> gadget[DOWN_ARROW]);
  7190. +
  7191. +        if(xdev -> gadget[LEFT_ARROW])
  7192. +            DisposeObject(xdev -> gadget[LEFT_ARROW]);
  7193. +
  7194. +        if(xdev -> gadget[RIGHT_ARROW])
  7195. +            DisposeObject(xdev -> gadget[RIGHT_ARROW]);
  7196. +
  7197. +        FreeVec(xdev -> gadget);
  7198. +
  7199. +        xdev -> gadget = NULL;
  7200. +    }
  7201. +
  7202. +    if(xdev -> image)
  7203. +    {
  7204. +        if(xdev -> image[UP_IMAGE])
  7205. +            DisposeObject(xdev -> image[UP_IMAGE]);
  7206. +
  7207. +        if(xdev -> image[DOWN_IMAGE])
  7208. +            DisposeObject(xdev -> image[DOWN_IMAGE]);
  7209. +
  7210. +        if(xdev -> image[LEFT_IMAGE])
  7211. +            DisposeObject(xdev -> image[LEFT_IMAGE]);
  7212. +
  7213. +        if(xdev -> image[RIGHT_IMAGE])
  7214. +            DisposeObject(xdev -> image[RIGHT_IMAGE]);
  7215. +
  7216. +        FreeVec(xdev -> image);
  7217. +
  7218. +        xdev -> image = NULL;
  7219. +    }
  7220. +}
  7221. +
  7222. +    /* CreateScrollers(gx_device *dev,struct Screen *Screen):
  7223. +     *
  7224. +     *    Create the window border scroller handles.
  7225. +     */
  7226. +
  7227. +BOOL
  7228. +CreateScrollers(gx_device *dev,struct Screen *Screen)
  7229. +{
  7230. +    BOOL Result = FALSE;
  7231. +
  7232. +    if(xdev -> gadget = (struct Gadget **)AllocVec(sizeof(struct Gadget *) * GADGET_COUNT,MEMF_ANY | MEMF_CLEAR | MEMF_PUBLIC))
  7233. +    {
  7234. +        if(xdev -> image = (struct Image **)AllocVec(sizeof(struct Image *) * IMAGE_COUNT,MEMF_ANY | MEMF_CLEAR | MEMF_PUBLIC))
  7235. +        {
  7236. +            struct DrawInfo *DrawInfo;
  7237. +
  7238. +            if(DrawInfo = GetScreenDrawInfo(Screen))
  7239. +            {
  7240. +                LONG    SizeWidth,
  7241. +                    SizeHeight;
  7242. +                UWORD    SizeType;
  7243. +
  7244. +                if(Screen -> Flags & SCREENHIRES)
  7245. +                {
  7246. +                    SizeWidth    = 18;
  7247. +                    SizeHeight    = 10;
  7248. +
  7249. +                    SizeType    = SYSISIZE_MEDRES;
  7250. +                }
  7251. +                else
  7252. +                {
  7253. +                    SizeWidth    = 13;
  7254. +                    SizeHeight    = 11;
  7255. +
  7256. +                    SizeType    = SYSISIZE_LOWRES;
  7257. +                }
  7258. +
  7259. +                if(xdev -> image[UP_IMAGE] = (struct Image *)NewObject(NULL,"sysiclass",
  7260. +                    SYSIA_Size,    SizeType,
  7261. +                    SYSIA_Which,    UPIMAGE,
  7262. +                    SYSIA_DrawInfo,    DrawInfo,
  7263. +                TAG_DONE))
  7264. +                {
  7265. +                    if(xdev -> image[DOWN_IMAGE] = (struct Image *)NewObject(NULL,"sysiclass",
  7266. +                        SYSIA_Size,    SizeType,
  7267. +                        SYSIA_Which,    DOWNIMAGE,
  7268. +                        SYSIA_DrawInfo,    DrawInfo,
  7269. +                    TAG_DONE))
  7270. +                    {
  7271. +                        if(xdev -> image[LEFT_IMAGE] = (struct Image *)NewObject(NULL,"sysiclass",
  7272. +                            SYSIA_Size,    SizeType,
  7273. +                            SYSIA_Which,    LEFTIMAGE,
  7274. +                            SYSIA_DrawInfo,    DrawInfo,
  7275. +                        TAG_DONE))
  7276. +                        {
  7277. +                            if(xdev -> image[RIGHT_IMAGE] = (struct Image *)NewObject(NULL,"sysiclass",
  7278. +                                SYSIA_Size,    SizeType,
  7279. +                                SYSIA_Which,    RIGHTIMAGE,
  7280. +                                SYSIA_DrawInfo,    DrawInfo,
  7281. +                            TAG_DONE))
  7282. +                            {
  7283. +                                if(xdev -> gadget[VERTICAL_SCROLLER] = NewObject(NULL,"propgclass",
  7284. +                                    GA_ID,        VERTICAL_SCROLLER,
  7285. +
  7286. +                                    GA_Top,        Screen -> WBorTop + Screen -> Font -> ta_YSize + 2,
  7287. +                                    GA_RelHeight,    -(Screen -> WBorTop + Screen -> Font -> ta_YSize + 2 + SizeHeight + 1 + 2 * ARROW_HEIGHT),
  7288. +                                    GA_Width,    SizeWidth - 8,
  7289. +                                    GA_RelRight,    -(SizeWidth - 5),
  7290. +
  7291. +                                    GA_GZZGadget,    TRUE,
  7292. +                                    GA_Immediate,    TRUE,
  7293. +                                    GA_FollowMouse,    TRUE,
  7294. +                                    GA_RelVerify,    TRUE,
  7295. +                                    GA_RightBorder,    TRUE,
  7296. +
  7297. +                                    PGA_Freedom,    FREEVERT,
  7298. +                                    PGA_NewLook,    TRUE,
  7299. +                                    PGA_Borderless,    TRUE,
  7300. +
  7301. +                                    PGA_Visible,    1,
  7302. +                                    PGA_Total,    1,
  7303. +                                TAG_DONE))
  7304. +                                {
  7305. +                                    if(xdev -> gadget[HORIZONTAL_SCROLLER] = NewObject(NULL,"propgclass",
  7306. +                                        GA_ID,        HORIZONTAL_SCROLLER,
  7307. +                                        GA_Previous,    xdev -> gadget[VERTICAL_SCROLLER],
  7308. +
  7309. +                                        GA_Height,    SizeHeight - 4,
  7310. +                                        GA_RelBottom,    -(SizeHeight - 4 + 1),
  7311. +                                        GA_Left,    4,
  7312. +                                        GA_RelWidth,    -(2 + SizeWidth + 4 + 2 * ARROW_WIDTH),
  7313. +
  7314. +                                        GA_GZZGadget,    TRUE,
  7315. +                                        GA_Immediate,    TRUE,
  7316. +                                        GA_FollowMouse,    TRUE,
  7317. +                                        GA_RelVerify,    TRUE,
  7318. +                                        GA_BottomBorder,TRUE,
  7319. +
  7320. +                                        PGA_Freedom,    FREEHORIZ,
  7321. +                                        PGA_NewLook,    TRUE,
  7322. +                                        PGA_Borderless,    TRUE,
  7323. +
  7324. +                                        PGA_Visible,    1,
  7325. +                                        PGA_Total,    1,
  7326. +                                    TAG_DONE))
  7327. +                                    {
  7328. +                                        STATIC struct TagItem ArrowMappings[] = { GA_ID, GA_ID, TAG_END };
  7329. +
  7330. +                                        if(xdev -> gadget[UP_ARROW] = NewObject(NULL,"buttongclass",
  7331. +                                            GA_ID,        UP_ARROW,
  7332. +                                            GA_Previous,    xdev -> gadget[HORIZONTAL_SCROLLER],
  7333. +
  7334. +                                            GA_GZZGadget,    TRUE,
  7335. +                                            GA_Image,    xdev -> image[UP_IMAGE],
  7336. +                                            GA_RelRight,    -(SizeWidth - 1),
  7337. +                                            GA_RelBottom,    -(SizeHeight - 1 + 2 * ARROW_HEIGHT),
  7338. +                                            GA_Height,    ARROW_HEIGHT,
  7339. +                                            GA_Width,    SizeWidth,
  7340. +                                            GA_Immediate,    TRUE,
  7341. +                                            GA_RelVerify,    TRUE,
  7342. +                                            GA_RightBorder,    TRUE,
  7343. +
  7344. +                                            ICA_TARGET,    ICTARGET_IDCMP,
  7345. +                                            ICA_MAP,    ArrowMappings,
  7346. +                                        TAG_DONE))
  7347. +                                        {
  7348. +                                            if(xdev -> gadget[DOWN_ARROW] = NewObject(NULL,"buttongclass",
  7349. +                                                GA_ID,        DOWN_ARROW,
  7350. +                                                GA_Previous,    xdev -> gadget[UP_ARROW],
  7351. +
  7352. +                                                GA_GZZGadget,    TRUE,
  7353. +                                                GA_Image,    xdev -> image[DOWN_IMAGE],
  7354. +                                                GA_RelRight,    -(SizeWidth - 1),
  7355. +                                                GA_RelBottom,    -(SizeHeight - 1 + ARROW_HEIGHT),
  7356. +                                                GA_Height,    ARROW_HEIGHT,
  7357. +                                                GA_Width,    SizeWidth,
  7358. +                                                GA_Immediate,    TRUE,
  7359. +                                                GA_RelVerify,    TRUE,
  7360. +                                                GA_RightBorder,    TRUE,
  7361. +
  7362. +                                                ICA_TARGET,    ICTARGET_IDCMP,
  7363. +                                                ICA_MAP,    ArrowMappings,
  7364. +                                            TAG_DONE))
  7365. +                                            {
  7366. +                                                if(xdev -> gadget[LEFT_ARROW] = NewObject(NULL,"buttongclass",
  7367. +                                                    GA_ID,        LEFT_ARROW,
  7368. +                                                    GA_Previous,    xdev -> gadget[DOWN_ARROW],
  7369. +
  7370. +                                                    GA_GZZGadget,    TRUE,
  7371. +                                                    GA_Image,    xdev -> image[LEFT_IMAGE],
  7372. +                                                    GA_RelRight,    -(SizeWidth - 1 + 2 * ARROW_WIDTH),
  7373. +                                                    GA_RelBottom,    -(SizeHeight - 1),
  7374. +                                                    GA_Height,    SizeHeight,
  7375. +                                                    GA_Width,    ARROW_WIDTH,
  7376. +                                                    GA_Immediate,    TRUE,
  7377. +                                                    GA_RelVerify,    TRUE,
  7378. +                                                    GA_BottomBorder,TRUE,
  7379. +
  7380. +                                                    ICA_TARGET,    ICTARGET_IDCMP,
  7381. +                                                    ICA_MAP,    ArrowMappings,
  7382. +                                                TAG_DONE))
  7383. +                                                {
  7384. +                                                    if(xdev -> gadget[RIGHT_ARROW] = NewObject(NULL,"buttongclass",
  7385. +                                                        GA_ID,        RIGHT_ARROW,
  7386. +                                                        GA_Previous,    xdev -> gadget[LEFT_ARROW],
  7387. +
  7388. +                                                        GA_GZZGadget,    TRUE,
  7389. +                                                        GA_Image,    xdev -> image[RIGHT_IMAGE],
  7390. +                                                        GA_RelRight,    -(SizeWidth - 1 + ARROW_WIDTH),
  7391. +                                                        GA_RelBottom,    -(SizeHeight - 1),
  7392. +                                                        GA_Height,    SizeHeight,
  7393. +                                                        GA_Width,    ARROW_WIDTH,
  7394. +                                                        GA_Immediate,    TRUE,
  7395. +                                                        GA_RelVerify,    TRUE,
  7396. +                                                        GA_BottomBorder,TRUE,
  7397. +
  7398. +                                                        ICA_TARGET,    ICTARGET_IDCMP,
  7399. +                                                        ICA_MAP,    ArrowMappings,
  7400. +                                                    TAG_DONE))
  7401. +                                                        Result = TRUE;
  7402. +                                                }
  7403. +                                            }
  7404. +                                        }
  7405. +                                    }
  7406. +                                }
  7407. +                            }
  7408. +                        }
  7409. +                    }
  7410. +                }
  7411. +
  7412. +                FreeScreenDrawInfo(Screen,DrawInfo);
  7413. +            }
  7414. +        }
  7415. +    }
  7416. +
  7417. +    return(Result);
  7418. +}
  7419. +
  7420. +    /* WindowResize(gx_device *dev):
  7421. +     *
  7422. +     *    Update the slider sizes and positions after the window
  7423. +     *    was resized.
  7424. +     */
  7425. +
  7426. +VOID
  7427. +WindowResize(gx_device *dev)
  7428. +{
  7429. +    LONG    DeltaX,
  7430. +        DeltaY,
  7431. +        Temp;
  7432. +
  7433. +        /* Query the current horizontal slider position. */
  7434. +
  7435. +    if((Temp = LAYERXOFFSET(xdev -> window) + xdev -> window -> GZZWidth) > xdev -> super_width)
  7436. +        DeltaX = xdev -> super_width - Temp;
  7437. +    else
  7438. +        DeltaX = 0;
  7439. +
  7440. +        /* Query the current vertical slider position. */
  7441. +
  7442. +    if((Temp = LAYERYOFFSET(xdev -> window) + xdev -> window -> GZZHeight) > xdev -> super_height)
  7443. +        DeltaY = xdev -> super_height - Temp;
  7444. +    else
  7445. +        DeltaY = 0;
  7446. +
  7447. +        /* Move the currently displayed window area around. */
  7448. +
  7449. +    if(DeltaX || DeltaY)
  7450. +        ScrollLayer(NULL,xdev -> window -> RPort -> Layer,DeltaX,DeltaY);
  7451. +
  7452. +        /* Update the new horizontal slider position and size. */
  7453. +
  7454. +    SetGadgetAttrs(xdev -> gadget[HORIZONTAL_SCROLLER],xdev -> window,NULL,
  7455. +        PGA_Top,    LAYERXOFFSET(xdev -> window),
  7456. +        PGA_Visible,    xdev -> window -> GZZWidth,
  7457. +        PGA_Total,    xdev -> super_width,
  7458. +    TAG_DONE);
  7459. +
  7460. +        /* Update the new vertical slider position and size. */
  7461. +
  7462. +    SetGadgetAttrs(xdev -> gadget[VERTICAL_SCROLLER],xdev -> window,NULL,
  7463. +        PGA_Top,    LAYERYOFFSET(xdev -> window),
  7464. +        PGA_Visible,    xdev -> window -> GZZHeight,
  7465. +        PGA_Total,    xdev -> super_height,
  7466. +    TAG_DONE);
  7467. +}
  7468. +
  7469. +    /* WindowUpdate(struct Gadget *Gadget,gx_device *dev):
  7470. +     *
  7471. +     *    Move the currently visible portion of the
  7472. +     *    window according to the current slider
  7473. +     *    position.
  7474. +     */
  7475. +
  7476. +VOID
  7477. +WindowUpdate(struct Gadget *Gadget,gx_device *dev)
  7478. +{
  7479. +    LONG Storage;
  7480. +
  7481. +    switch(Gadget -> GadgetID)
  7482. +    {
  7483. +        case HORIZONTAL_SCROLLER:
  7484. +
  7485. +            if(GetAttr(PGA_Top,Gadget,&Storage))
  7486. +                ScrollLayer(NULL,xdev -> window -> RPort -> Layer,Storage - LAYERXOFFSET(xdev -> window),0);
  7487. +
  7488. +            break;
  7489. +
  7490. +        case VERTICAL_SCROLLER:
  7491. +
  7492. +            if(GetAttr(PGA_Top,Gadget,&Storage))
  7493. +                ScrollLayer(NULL,xdev -> window -> RPort -> Layer,0,Storage - LAYERYOFFSET(xdev -> window));
  7494. +
  7495. +            break;
  7496. +    }
  7497. +}
  7498. +
  7499. +    /* MoveAround(struct Gadget *Gadget,int How,gx_device *dev):
  7500. +     *
  7501. +     *    Move the currently visible window area according to
  7502. +     *    user input.
  7503. +     */
  7504. +
  7505. +VOID
  7506. +MoveAround(struct Gadget *Gadget,LONG How,gx_device *dev)
  7507. +{
  7508. +    LONG Storage;
  7509. +
  7510. +    if(GetAttr(PGA_Top,Gadget,&Storage))
  7511. +    {
  7512. +        LONG Max;
  7513. +
  7514. +        switch(Gadget -> GadgetID)
  7515. +        {
  7516. +            case HORIZONTAL_SCROLLER:
  7517. +
  7518. +                Max = xdev -> super_width - xdev -> window -> GZZWidth;
  7519. +                break;
  7520. +
  7521. +            case VERTICAL_SCROLLER:
  7522. +
  7523. +                Max = xdev -> super_height - xdev -> window -> GZZHeight;
  7524. +                break;
  7525. +        }
  7526. +
  7527. +        switch(How)
  7528. +        {
  7529. +            case MOVE_MIN:
  7530. +
  7531. +                Storage = 0;
  7532. +                break;
  7533. +
  7534. +            case MOVE_MAX:
  7535. +
  7536. +                Storage = Max;
  7537. +                break;
  7538. +
  7539. +            case MOVE_DOWN:
  7540. +
  7541. +                if(Storage > xdev -> super_height / 100)
  7542. +                    Storage -= xdev -> super_height / 100;
  7543. +                else
  7544. +                    Storage = 0;
  7545. +
  7546. +                break;
  7547. +
  7548. +            case MOVE_FAR_DOWN:
  7549. +
  7550. +                if(Storage > xdev -> super_height / 10)
  7551. +                    Storage -= xdev -> super_height / 10;
  7552. +                else
  7553. +                    Storage = 0;
  7554. +
  7555. +                break;
  7556. +
  7557. +            case MOVE_FAR_UP:
  7558. +
  7559. +                if(Storage + xdev -> super_width / 10 < Max)
  7560. +                    Storage += xdev -> super_width / 10;
  7561. +                else
  7562. +                    Storage = Max;
  7563. +
  7564. +                break;
  7565. +
  7566. +            case MOVE_UP:
  7567. +
  7568. +                if(Storage + xdev -> super_width / 100 < Max)
  7569. +                    Storage += xdev -> super_width / 100;
  7570. +                else
  7571. +                    Storage = Max;
  7572. +
  7573. +                break;
  7574. +        }
  7575. +
  7576. +        switch(Gadget -> GadgetID)
  7577. +        {
  7578. +            case HORIZONTAL_SCROLLER:
  7579. +
  7580. +                if(LAYERXOFFSET(xdev -> window) != Storage)
  7581. +                {
  7582. +                    ScrollLayer(NULL,xdev -> window -> RPort -> Layer,Storage - LAYERXOFFSET(xdev -> window),0);
  7583. +
  7584. +                    SetGadgetAttrs(Gadget,xdev -> window,NULL,
  7585. +                        PGA_Top,Storage,
  7586. +                    TAG_DONE);
  7587. +                }
  7588. +
  7589. +                break;
  7590. +
  7591. +            case VERTICAL_SCROLLER:
  7592. +
  7593. +                if(LAYERYOFFSET(xdev -> window) != Storage)
  7594. +                {
  7595. +                    ScrollLayer(NULL,xdev -> window -> RPort -> Layer,0,Storage - LAYERYOFFSET(xdev -> window));
  7596. +
  7597. +                    SetGadgetAttrs(Gadget,xdev -> window,NULL,
  7598. +                        PGA_Top,Storage,
  7599. +                    TAG_DONE);
  7600. +                }
  7601. +
  7602. +                break;
  7603. +        }
  7604. +    }
  7605. +}
  7606. +
  7607. +    /* DispatchSuperWindow(gx_device *dev):
  7608. +     *
  7609. +     *    Dispatch user window input.
  7610. +     */
  7611. +
  7612. +VOID
  7613. +DispatchSuperWindow(gx_device *dev)
  7614. +{
  7615. +    STATIC struct Gadget    *CurrentGadget = NULL;
  7616. +
  7617. +    struct IntuiMessage    *IntuiMessage;
  7618. +    ULONG             MsgClass,
  7619. +                 MsgCode,
  7620. +                 MsgQualifier;
  7621. +    struct Gadget        *MsgGadget;
  7622. +
  7623. +    while(IntuiMessage = (struct IntuiMessage *)GetMsg(xdev -> window -> UserPort))
  7624. +    {
  7625. +        MsgClass    = IntuiMessage -> Class;
  7626. +        MsgCode        = IntuiMessage -> Code;
  7627. +        MsgQualifier    = IntuiMessage -> Qualifier;
  7628. +        MsgGadget    = IntuiMessage -> IAddress;
  7629. +
  7630. +        ReplyMsg((struct Message *)IntuiMessage);
  7631. +
  7632. +        switch(MsgClass)
  7633. +        {
  7634. +            case IDCMP_VANILLAKEY:
  7635. +
  7636. +                if(MsgCode == '\033' || MsgCode == '\003')
  7637. +                    Signal((struct Task *)xdev -> main,SIG_KILL);
  7638. +
  7639. +                break;
  7640. +
  7641. +            case IDCMP_RAWKEY:
  7642. +
  7643. +                switch(MsgCode)
  7644. +                {
  7645. +                    case HELP_CODE:
  7646. +
  7647. +                        DisplayBeep(xdev -> window -> WScreen);
  7648. +
  7649. +                        break;
  7650. +
  7651. +                    case CURSORUP:
  7652. +
  7653. +                        if(MsgQualifier & IEQUALIFIER_CONTROL)
  7654. +                            MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_MIN,dev);
  7655. +                        else
  7656. +                        {
  7657. +                            if(MsgQualifier & (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT))
  7658. +                                MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_FAR_DOWN,dev);
  7659. +                            else
  7660. +                                MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_DOWN,dev);
  7661. +                        }
  7662. +
  7663. +                        break;
  7664. +
  7665. +                    case CURSORLEFT:
  7666. +
  7667. +                        if(MsgQualifier & IEQUALIFIER_CONTROL)
  7668. +                            MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_MIN,dev);
  7669. +                        else
  7670. +                        {
  7671. +                            if(MsgQualifier & (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT))
  7672. +                                MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_FAR_DOWN,dev);
  7673. +                            else
  7674. +                                MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_DOWN,dev);
  7675. +                        }
  7676. +
  7677. +                        break;
  7678. +
  7679. +                    case CURSORRIGHT:
  7680. +
  7681. +                        if(MsgQualifier & IEQUALIFIER_CONTROL)
  7682. +                            MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_MAX,dev);
  7683. +                        else
  7684. +                        {
  7685. +                            if(MsgQualifier & (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT))
  7686. +                                MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_FAR_UP,dev);
  7687. +                            else
  7688. +                                MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_UP,dev);
  7689. +                        }
  7690. +
  7691. +                        break;
  7692. +
  7693. +                    case CURSORDOWN:
  7694. +
  7695. +                        if(MsgQualifier & IEQUALIFIER_CONTROL)
  7696. +                            MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_MAX,dev);
  7697. +                        else
  7698. +                        {
  7699. +                            if(MsgQualifier & (IEQUALIFIER_LSHIFT | IEQUALIFIER_RSHIFT))
  7700. +                                MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_FAR_UP,dev);
  7701. +                            else
  7702. +                                MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_UP,dev);
  7703. +                        }
  7704. +
  7705. +                        break;
  7706. +
  7707. +                    default:
  7708. +
  7709. +                        break;
  7710. +                }
  7711. +
  7712. +                break;
  7713. +
  7714. +            case IDCMP_CLOSEWINDOW:
  7715. +
  7716. +                Signal((struct Task *)xdev -> main,SIG_KILL);
  7717. +
  7718. +                break;
  7719. +
  7720. +            case IDCMP_GADGETDOWN:
  7721. +
  7722. +                CurrentGadget = MsgGadget;
  7723. +
  7724. +                WindowUpdate(MsgGadget,dev);
  7725. +
  7726. +                break;
  7727. +
  7728. +            case IDCMP_GADGETUP:
  7729. +
  7730. +                CurrentGadget = NULL;
  7731. +
  7732. +                WindowUpdate(MsgGadget,dev);
  7733. +
  7734. +                break;
  7735. +
  7736. +            case IDCMP_MOUSEMOVE:
  7737. +
  7738. +                if(CurrentGadget)
  7739. +                    WindowUpdate(CurrentGadget,dev);
  7740. +
  7741. +                break;
  7742. +
  7743. +            case IDCMP_IDCMPUPDATE:
  7744. +
  7745. +                switch(GetTagData(GA_ID,0,(struct TagItem *)MsgGadget))
  7746. +                {
  7747. +                    case UP_ARROW:
  7748. +
  7749. +                        MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_DOWN,dev);
  7750. +                        break;
  7751. +
  7752. +                    case DOWN_ARROW:
  7753. +
  7754. +                        MoveAround(xdev -> gadget[VERTICAL_SCROLLER],MOVE_UP,dev);
  7755. +                        break;
  7756. +
  7757. +                    case LEFT_ARROW:
  7758. +
  7759. +                        MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_DOWN,dev);
  7760. +                        break;
  7761. +
  7762. +                    case RIGHT_ARROW:
  7763. +
  7764. +                        MoveAround(xdev -> gadget[HORIZONTAL_SCROLLER],MOVE_UP,dev);
  7765. +                        break;
  7766. +
  7767. +                    default:
  7768. +
  7769. +                        break;
  7770. +                }
  7771. +
  7772. +                break;
  7773. +
  7774. +            case IDCMP_NEWSIZE:
  7775. +
  7776. +                WindowResize(dev);
  7777. +
  7778. +                break;
  7779. +
  7780. +            default:
  7781. +
  7782. +                break;
  7783. +        }
  7784. +    }
  7785. +}
  7786. +
  7787. +    /* Simple routine to call the cleanup routine of a device,
  7788. +     * all devices are smart enough to handle shutdown in
  7789. +     * case they have not been opened yet.
  7790. +     */
  7791. +
  7792. +STATIC void __inline
  7793. +close_device(gx_device_amiga *dev)
  7794. +{
  7795. +    (*xdev -> procs -> close_device)((gx_device *)dev);
  7796. +}
  7797. +
  7798. +    /* devcleanup():
  7799. +     *
  7800. +     *    Clean up all devices, free all resources.
  7801. +     */
  7802. +
  7803. +void
  7804. +devcleanup()
  7805. +{
  7806. +    close_device(&gs_amiga_device);
  7807. +    close_device(&gs_amiga_low_device);
  7808. +    close_device(&gs_amiga_high_device);
  7809. +    close_device(&gs_amiga_super_device);
  7810. +    close_device(&gs_amiga_a2024_device);
  7811. +    close_device(&gs_amiga_picassoii_device);
  7812. +    close_device(&gs_amiga_custom_device);
  7813. +    close_device(&gs_amiga_printer_device);
  7814. +    close_device(&gs_amiga_ilbm_device);
  7815. +}
  7816. +
  7817. +    /* amiga_set_pen(gx_device *dev,gx_color_index color):
  7818. +     *
  7819. +     *    Sets the rendering pen and remembers the current
  7820. +     *    settings.
  7821. +     */
  7822. +
  7823. +STATIC VOID __inline
  7824. +amiga_set_pen(gx_device *dev,gx_color_index color)
  7825. +{
  7826. +    if(xdev -> last_pen != color)
  7827. +        SetAPen(xdev -> rport,xdev -> last_pen = color);
  7828. +}
  7829. +
  7830. +    /* amiga_map_rgb_color(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue):
  7831. +     *
  7832. +     *    Map a colour either to the black or the light rendering pen.
  7833. +     */
  7834. +
  7835. +gx_color_index
  7836. +amiga_map_rgb_color(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue)
  7837. +{
  7838. +    if((red | green | blue) > gx_max_color_value / 2)
  7839. +        return(LightPen);
  7840. +    else
  7841. +        return(DarkPen);
  7842. +}
  7843. +
  7844. +    /* amiga_map_color_rgb(gx_device *dev,gx_color_index color,gx_color_value rgb[3]):
  7845. +     *
  7846. +     *    Map the light/dark rendering pen to RGB values.
  7847. +     */
  7848. +
  7849. +int
  7850. +amiga_map_color_rgb(gx_device *dev,gx_color_index color,gx_color_value rgb[3])
  7851. +{
  7852. +    int i;
  7853. +
  7854. +    if(color == LightPen)
  7855. +    {
  7856. +        for(i = 0 ; i < 3 ; i++)
  7857. +            rgb[i] = gx_max_color_value;
  7858. +    }
  7859. +    else
  7860. +    {
  7861. +        for(i = 0 ; i < 3 ; i++)
  7862. +            rgb[i] = 0;
  7863. +    }
  7864. +
  7865. +    return(0);
  7866. +}
  7867. +
  7868. +    /* AllocatePens(struct ViewPort *VPort,LONG CubeSize):
  7869. +     *
  7870. +     *    Allocate shareable viewport pens.
  7871. +     */
  7872. +
  7873. +LONG *
  7874. +AllocatePens(struct ViewPort *VPort,LONG CubeSize)
  7875. +{
  7876. +    if(GfxBase -> LibNode . lib_Version >= 39)
  7877. +    {
  7878. +        LONG Total = CubeSize * CubeSize * CubeSize,*Pens;
  7879. +
  7880. +        if(Pens = (LONG *)AllocVec(sizeof(LONG) * Total,MEMF_ANY))
  7881. +        {
  7882. +            LONG i,r,g,b,max = CubeSize - 1;
  7883. +
  7884. +            for(i = 0 ; i < Total ; i++)
  7885. +                Pens[i] = -1;
  7886. +
  7887. +            i = 0;
  7888. +
  7889. +            for(r = 0 ; r < CubeSize ; r++)
  7890. +            {
  7891. +                for(g = 0 ; g < CubeSize ; g++)
  7892. +                {
  7893. +                    for(b = 0 ; b < CubeSize ; b++)
  7894. +                    {
  7895. +                        if((Pens[i++] = ObtainBestPen(VPort -> ColorMap,SPREAD((255 * r) / max),SPREAD((255 * g) / max),SPREAD((255 * b) / max),
  7896. +                            OBP_FailIfBad,    TRUE,
  7897. +                            OBP_Precision,    PRECISION_IMAGE,
  7898. +                        TAG_DONE)) == -1)
  7899. +                        {
  7900. +                            FreeVec(Pens);
  7901. +
  7902. +                            return(NULL);
  7903. +                        }
  7904. +                    }
  7905. +                }
  7906. +            }
  7907. +
  7908. +            return(Pens);
  7909. +        }
  7910. +    }
  7911. +
  7912. +    return(NULL);
  7913. +}
  7914. +
  7915. +    /* amiga_open_default(gx_device *dev):
  7916. +     *
  7917. +     *    Open the default device, i.e. a window on the Workbench screen.
  7918. +     */
  7919. +
  7920. +int
  7921. +amiga_open_default(gx_device *dev)
  7922. +{
  7923. +    struct Screen *DefaultScreen;
  7924. +
  7925. +        /* Get a lock on the default public screen. */
  7926. +
  7927. +    if(DefaultScreen = LockPubScreen(NULL))
  7928. +    {
  7929. +        struct DisplayInfo    DisplayInfo;
  7930. +        ULONG             Mode;
  7931. +
  7932. +            /* Get the default public screen display mode. */
  7933. +
  7934. +        Mode = GetVPModeID(&DefaultScreen -> ViewPort);
  7935. +
  7936. +            /* Inquire display mode information. */
  7937. +
  7938. +        if(GetDisplayInfoData(NULL,(APTR)&DisplayInfo,sizeof(struct DisplayInfo),DTAG_DISP,Mode))
  7939. +        {
  7940. +            LONG    ScreenWidth,
  7941. +                ScreenHeight;
  7942. +            LONG    i;
  7943. +            float    Width,
  7944. +                Height;
  7945. +            LONG    Depth;
  7946. +
  7947. +            if(GfxBase -> LibNode . lib_Version >= 39)
  7948. +                Depth = GetBitMapAttr(DefaultScreen -> RastPort . BitMap,BMA_DEPTH);
  7949. +            else
  7950. +                Depth = DefaultScreen -> RastPort . BitMap -> Depth;
  7951. +
  7952. +                /* Determine screen view dimensions. */
  7953. +
  7954. +            if(DefaultScreen -> ViewPort . ColorMap -> cm_vpe)
  7955. +            {
  7956. +                struct ViewPortExtra *Extra = DefaultScreen -> ViewPort . ColorMap -> cm_vpe;
  7957. +
  7958. +                ScreenWidth    = Extra -> DisplayClip . MaxX - Extra -> DisplayClip . MinX + 1;
  7959. +                ScreenHeight    = Extra -> DisplayClip . MaxY - Extra -> DisplayClip . MinY + 1;
  7960. +            }
  7961. +            else
  7962. +            {
  7963. +                struct ViewPortExtra *Extra;
  7964. +
  7965. +                if(Extra = (struct ViewPortExtra *)GfxLookUp(&DefaultScreen -> ViewPort))
  7966. +                {
  7967. +                    ScreenWidth    = Extra -> DisplayClip . MaxX - Extra -> DisplayClip . MinX + 1;
  7968. +                    ScreenHeight    = Extra -> DisplayClip . MaxY - Extra -> DisplayClip . MinY + 1;
  7969. +                }
  7970. +                else
  7971. +                {
  7972. +                    ScreenWidth    = DefaultScreen -> Width;
  7973. +                    ScreenHeight    = DefaultScreen -> Height;
  7974. +                }
  7975. +            }
  7976. +
  7977. +                /* Use the best guess, we will take the standard
  7978. +                 * low resolution x-dpi value and scale it by
  7979. +                 * the pixel speed.
  7980. +                 */
  7981. +
  7982. +            if(DisplayInfo . PixelSpeed)
  7983. +            {
  7984. +                xdev -> x_pixels_per_inch = (35.0 * 140.0) / (float)DisplayInfo . PixelSpeed;
  7985. +                xdev -> y_pixels_per_inch = (xdev -> x_pixels_per_inch * (float)DisplayInfo . Resolution . x) / (float)DisplayInfo . Resolution . y;
  7986. +            }
  7987. +            else
  7988. +            {
  7989. +                xdev -> x_pixels_per_inch = 72.27;
  7990. +                xdev -> y_pixels_per_inch = 72.27;
  7991. +            }
  7992. +
  7993. +            if(xdev -> width > 0 && xdev -> height > 0)
  7994. +            {
  7995. +                xdev -> super_width    = xdev -> width;
  7996. +                xdev -> super_height    = xdev -> height;
  7997. +            }
  7998. +            else
  7999. +            {
  8000. +                if(xdev -> page_width > 0.0)
  8001. +                    xdev -> super_width = (LONG)(xdev -> page_width * xdev -> x_pixels_per_inch);
  8002. +                else
  8003. +                    xdev -> super_width = 640;
  8004. +
  8005. +                if(xdev -> page_height > 0.0)
  8006. +                    xdev -> super_height = (LONG)(xdev -> page_height * xdev -> y_pixels_per_inch);
  8007. +                else
  8008. +                    xdev -> super_height = 512;
  8009. +            }
  8010. +
  8011. +                /* Allocate a bitmap ready to be used for
  8012. +                 * rendering.
  8013. +                 */
  8014. +
  8015. +            if(xdev -> super_bitmap = CreateBitMap(xdev -> super_width,xdev -> super_height,Depth,BMF_DISPLAYABLE,DefaultScreen -> RastPort . BitMap,FALSE))
  8016. +            {
  8017. +                    /* Clear the bitplanes. */
  8018. +
  8019. +                BltBitMap(xdev -> super_bitmap,0,0,xdev -> super_bitmap,0,0,xdev -> super_width,xdev -> super_height,0x00,(1 << xdev -> super_bitmap -> Depth) - 1,NULL);
  8020. +
  8021. +                    /* Create the scroller handles. */
  8022. +
  8023. +                if(CreateScrollers(dev,DefaultScreen))
  8024. +                {
  8025. +                    struct IBox ZoomBox;
  8026. +
  8027. +                        /* Set up the window alternate
  8028. +                         * position.
  8029. +                         */
  8030. +
  8031. +                    ZoomBox . Left        = 0;
  8032. +                    ZoomBox . Top        = DefaultScreen -> BarHeight + 1;
  8033. +                    ZoomBox . Width        = ScreenWidth;
  8034. +                    ZoomBox . Height    = ScreenHeight - ZoomBox . Top;
  8035. +
  8036. +                        /* Eventually, open the display window. */
  8037. +
  8038. +                    if(xdev -> window = OpenWindowTags(NULL,
  8039. +                        WA_InnerWidth,        MIN(DefaultScreen -> Width / 2,xdev -> super_width),
  8040. +                        WA_InnerHeight,        MIN(DefaultScreen -> Height / 2,xdev -> super_height),
  8041. +                        WA_CloseGadget,        TRUE,
  8042. +                        WA_DepthGadget,        TRUE,
  8043. +                        WA_SizeGadget,        TRUE,
  8044. +                        WA_SizeBRight,        TRUE,
  8045. +                        WA_SizeBBottom,        TRUE,
  8046. +                        WA_Zoom,        &ZoomBox,
  8047. +                        WA_DragBar,        TRUE,
  8048. +                        WA_NoCareRefresh,    TRUE,
  8049. +                        WA_GimmeZeroZero,    TRUE,
  8050. +                        WA_RMBTrap,        TRUE,
  8051. +                        WA_SuperBitMap,        xdev -> super_bitmap,
  8052. +                        WA_Gadgets,        xdev -> gadget[VERTICAL_SCROLLER],
  8053. +                        WA_CustomScreen,    DefaultScreen,
  8054. +                        WA_Title,        "Ghostscript Amiga output window",
  8055. +                    TAG_DONE))
  8056. +                    {
  8057. +                        if(xdev -> temp_rport = CreateTempRPort(xdev -> window -> RPort))
  8058. +                        {
  8059. +                            if(xdev -> temp_array = (UBYTE *)AllocVec((xdev -> window -> WScreen -> Width + 15) & ~15,MEMF_ANY))
  8060. +                            {
  8061. +                                struct Task *Task;
  8062. +
  8063. +                                    /* Bring the window dispatcher task
  8064. +                                     * to life...
  8065. +                                     */
  8066. +
  8067. +                                if(Task = (struct Task *)CreateTask("Ghostscript window dispatcher",5,DispatchTask,8192))
  8068. +                                {
  8069. +                                    const sigset_t trapped = sigmask(SIGINT);
  8070. +
  8071. +                                        /* Cheap... */
  8072. +
  8073. +                                    Task -> tc_UserData = dev;
  8074. +
  8075. +                                        /* Who's calling? */
  8076. +
  8077. +                                    xdev -> main = (struct Process *)FindTask(NULL);
  8078. +
  8079. +                                        /* Don't let anybody interrupt us! */
  8080. +
  8081. +                                    sigprocmask(SIG_BLOCK,&trapped,NULL);
  8082. +
  8083. +                                    Forbid();
  8084. +
  8085. +                                        /* Wake it up. */
  8086. +
  8087. +                                    Signal(Task,SIG_HANDSHAKE);
  8088. +
  8089. +                                        /* Clear the handshake bit. */
  8090. +
  8091. +                                    SetSignal(0,SIG_HANDSHAKE);
  8092. +
  8093. +                                        /* Wait for the report. */
  8094. +
  8095. +                                    Wait(SIG_HANDSHAKE);
  8096. +
  8097. +                                    Permit();
  8098. +
  8099. +                                        /* Get the result. */
  8100. +
  8101. +                                    Task = xdev -> dispatcher;
  8102. +
  8103. +                                        /* Unblock signals. */
  8104. +
  8105. +                                    sigprocmask(SIG_UNBLOCK,&trapped,NULL);
  8106. +                                }
  8107. +
  8108. +                                    /* Did we succeed in creating
  8109. +                                     * the dispatcher task?
  8110. +                                     */
  8111. +
  8112. +                                if(Task)
  8113. +                                {
  8114. +                                    UWORD    MaxValue    = 0,
  8115. +                                        MinValue    = 15000,
  8116. +                                        Value,
  8117. +                                        R,G,B;
  8118. +
  8119. +                                        /* Set the window limits. */
  8120. +
  8121. +                                    WindowLimits(xdev -> window,xdev -> window -> BorderLeft + MINIMUM_WIDTH + xdev -> window -> BorderRight,xdev -> window -> BorderTop + MINIMUM_HEIGHT + xdev -> window -> BorderBottom,xdev -> window -> BorderLeft + xdev -> super_width + xdev -> window -> BorderRight,xdev -> window -> BorderTop + xdev -> super_height + xdev -> window -> BorderBottom);
  8122. +
  8123. +                                        /* Update the sliders. */
  8124. +
  8125. +                                    WindowResize(dev);
  8126. +
  8127. +                                        /* Look for the darkest and the lightest screen colours. */
  8128. +
  8129. +                                    for(i = 0 ; i < MIN(xdev -> window -> WScreen -> ViewPort . ColorMap -> Count,(1 << Depth)) ; i++)
  8130. +                                    {
  8131. +                                        Value = GetRGB4(xdev -> window -> WScreen -> ViewPort . ColorMap,i);
  8132. +
  8133. +                                        R = (Value >> 8) & 0xF;
  8134. +                                        G = (Value >> 4) & 0xF;
  8135. +                                        B =  Value       & 0xF;
  8136. +
  8137. +                                            /* Luminance conversion included */
  8138. +
  8139. +                                        Value = R * 299 + G * 588 + B * 113;
  8140. +
  8141. +                                        if(Value > MaxValue)
  8142. +                                        {
  8143. +                                            MaxValue = Value;
  8144. +
  8145. +                                            LightPen = i;
  8146. +                                        }
  8147. +
  8148. +                                        if(Value < MinValue)
  8149. +                                        {
  8150. +                                            MinValue = Value;
  8151. +
  8152. +                                            DarkPen = i;
  8153. +                                        }
  8154. +                                    }
  8155. +
  8156. +                                        /* Fill in the rest. */
  8157. +
  8158. +                                    xdev -> width    = xdev -> super_width;
  8159. +                                    xdev -> height    = xdev -> super_height;
  8160. +                                    xdev -> rport    = xdev -> window -> RPort;
  8161. +
  8162. +                                        /* Does the display support
  8163. +                                         * at least eight colours?
  8164. +                                         */
  8165. +
  8166. +                                    if(Depth >= 3)
  8167. +                                    {
  8168. +                                        LONG cube_size,max;
  8169. +
  8170. +                                            /* Set up a fitting colour cube. */
  8171. +
  8172. +                                        for(cube_size = 6 ; cube_size >= 2 ; cube_size--)
  8173. +                                        {
  8174. +                                            if((max = cube_size * cube_size * cube_size) <= 1 << Depth)
  8175. +                                                break;
  8176. +                                        }
  8177. +
  8178. +                                            /* Got enough colours? */
  8179. +
  8180. +                                        if(cube_size != 1)
  8181. +                                        {
  8182. +                                            LONG *Pens;
  8183. +
  8184. +                                                /* Try to grab the cube colours,
  8185. +                                                 * making a colour display.
  8186. +                                                 */
  8187. +
  8188. +                                            if(Pens = AllocatePens(&xdev -> window -> WScreen -> ViewPort,cube_size))
  8189. +                                                set_colour_device((gx_device_amiga *)dev,cube_size,Pens);
  8190. +                                        }
  8191. +                                    }
  8192. +
  8193. +                                    SetBPen(xdev -> rport,0);
  8194. +                                    SetDrMd(xdev -> rport,JAM2);
  8195. +
  8196. +                                    amiga_set_pen(dev,DarkPen);
  8197. +
  8198. +                                    UnlockPubScreen(NULL,DefaultScreen);
  8199. +
  8200. +                                    return(0);
  8201. +                                }
  8202. +                                else
  8203. +                                    perror("Ghostscript: failed to create dispatcher task");
  8204. +                            }
  8205. +                            else
  8206. +                                perror("Ghostscript: failed to create temporary line buffer.");
  8207. +                        }
  8208. +                        else
  8209. +                            perror("Ghostscript: failed to create temporary raster port");
  8210. +                    }
  8211. +                    else
  8212. +                        perror("Ghostscript: failed to open window");
  8213. +                }
  8214. +                else
  8215. +                    perror("Ghostscript: failed to allocate scrollers");
  8216. +            }
  8217. +            else
  8218. +                perror("Ghostscript: failed to allocate bitmap");
  8219. +        }
  8220. +        else
  8221. +            perror("Ghostscript: failed to get display mode information");
  8222. +
  8223. +        UnlockPubScreen(NULL,DefaultScreen);
  8224. +    }
  8225. +    else
  8226. +        perror("Ghostscript: failed to lock default public screen");
  8227. +
  8228. +    return(-1);
  8229. +}
  8230. +
  8231. +    /* amiga_open_low(gx_device *dev):
  8232. +     *
  8233. +     *    Open the low resolution device.
  8234. +     */
  8235. +
  8236. +int
  8237. +amiga_open_low(gx_device *dev)
  8238. +{
  8239. +    return(amiga_open(dev,LORES_KEY));
  8240. +}
  8241. +
  8242. +    /* amiga_open_high(gx_device *dev):
  8243. +     *
  8244. +     *    Open the high resolution device.
  8245. +     */
  8246. +
  8247. +int
  8248. +amiga_open_high(gx_device *dev)
  8249. +{
  8250. +    return(amiga_open(dev,HIRESLACE_KEY));
  8251. +}
  8252. +
  8253. +    /* amiga_open_super(gx_device *dev):
  8254. +     *
  8255. +     *    Open the super high resolution device.
  8256. +     */
  8257. +
  8258. +int
  8259. +amiga_open_super(gx_device *dev)
  8260. +{
  8261. +        /* Fall back to the default if not available. */
  8262. +
  8263. +    if(ModeNotAvailable(SUPERLACE_KEY))
  8264. +        return(amiga_open_high(dev));
  8265. +    else
  8266. +        return(amiga_open(dev,SUPERLACE_KEY));
  8267. +}
  8268. +
  8269. +    /* amiga_open_a2024(gx_device *dev):
  8270. +     *
  8271. +     *    Open the A2024 device.
  8272. +     */
  8273. +
  8274. +int
  8275. +amiga_open_a2024(gx_device *dev)
  8276. +{
  8277. +        /* Fall back to the default if not available. */
  8278. +
  8279. +    if(ModeNotAvailable(A2024TENHERTZ_KEY))
  8280. +        return(amiga_open_super(dev));
  8281. +    else
  8282. +        return(amiga_open(dev,A2024TENHERTZ_KEY));
  8283. +}
  8284. +
  8285. +    /* amiga_open_picassoii(gx_device *dev):
  8286. +     *
  8287. +     *    Open the Picasso II device.
  8288. +     */
  8289. +
  8290. +int
  8291. +amiga_open_picassoii(gx_device *dev)
  8292. +{
  8293. +        /* Fall back to the default if not available. */
  8294. +
  8295. +    if(ModeNotAvailable(0x40020002))
  8296. +        return(amiga_open_super(dev));
  8297. +    else
  8298. +        return(amiga_open(dev,0x40020002));
  8299. +}
  8300. +
  8301. +int
  8302. +amiga_open_custom(gx_device *dev)
  8303. +{
  8304. +    UBYTE    Buffer[256];
  8305. +    ULONG    ScreenID    = INVALID_ID;
  8306. +    BOOL    DontTouch    = FALSE;
  8307. +
  8308. +        /* First step: check for an environment variable to give
  8309. +         *             the name of the display mode to use.
  8310. +         */
  8311. +
  8312. +    if(GetVar("GSCUSTOMMODE",Buffer,256,NULL) != -1)
  8313. +    {
  8314. +        UBYTE PatternBuffer[516];
  8315. +
  8316. +            /* Set up the search pattern. */
  8317. +
  8318. +        if(ParsePatternNoCase(Buffer,PatternBuffer,516) >= 0)
  8319. +        {
  8320. +            ULONG CurrentID = INVALID_ID,ID;
  8321. +
  8322. +                /* Scan the entire list. */
  8323. +
  8324. +            while((CurrentID = NextDisplayInfo(CurrentID)) != INVALID_ID)
  8325. +            {
  8326. +                    /* Valid mode? */
  8327. +
  8328. +                if(!ModeNotAvailable(CurrentID))
  8329. +                {
  8330. +                    struct NameInfo    NameInfo;
  8331. +
  8332. +                        /* Get the name information. */
  8333. +
  8334. +                    if(GetDisplayInfoData(NULL,&NameInfo,sizeof(struct NameInfo),DTAG_NAME,CurrentID))
  8335. +                    {
  8336. +                            /* Does the mode name match the pattern given? */
  8337. +
  8338. +                        if(MatchPatternNoCase(PatternBuffer,NameInfo . Name))
  8339. +                        {
  8340. +                            ScreenID = CurrentID;
  8341. +
  8342. +                                /* Don't overwrite the variable contents. */
  8343. +
  8344. +                            DontTouch = TRUE;
  8345. +
  8346. +                            break;
  8347. +                        }
  8348. +                    }
  8349. +                }
  8350. +            }
  8351. +        }
  8352. +    }
  8353. +
  8354. +    if(ScreenID == INVALID_ID && AslBase)
  8355. +    {
  8356. +        struct ScreenModeRequester *ScreenModeRequester;
  8357. +
  8358. +        if(ScreenModeRequester = (struct ScreenModeRequester *)AllocAslRequestTags(ASL_ScreenModeRequest,TAG_DONE))
  8359. +        {
  8360. +            if(AslRequestTags(ScreenModeRequester,
  8361. +                ASLSM_TitleText,    "Select GhostScript screen display mode",
  8362. +                ASLSM_MinDepth,        1,
  8363. +                ASLSM_MaxDepth,        8,
  8364. +            TAG_DONE))
  8365. +                ScreenID = ScreenModeRequester -> sm_DisplayID;
  8366. +
  8367. +            FreeAslRequest(ScreenModeRequester);
  8368. +        }
  8369. +    }
  8370. +
  8371. +        /* Fall back to the default if not available. */
  8372. +
  8373. +    if(ModeNotAvailable(ScreenID))
  8374. +        return(amiga_open_default(dev));
  8375. +    else
  8376. +    {
  8377. +        int result = amiga_open(dev,ScreenID);
  8378. +
  8379. +            /* If successful store the name of the
  8380. +             * screen mode selected.
  8381. +             */
  8382. +
  8383. +        if(!result && !DontTouch)
  8384. +        {
  8385. +            struct NameInfo    NameInfo;
  8386. +
  8387. +            if(GetDisplayInfoData(NULL,&NameInfo,sizeof(struct NameInfo),DTAG_NAME,ScreenID))
  8388. +                SetVar("GSCUSTOMMODE",NameInfo . Name,-1,NULL);
  8389. +        }
  8390. +
  8391. +        return(result);
  8392. +    }
  8393. +}
  8394. +
  8395. +    /* amiga_open_printer(gx_device *dev):
  8396. +     *
  8397. +     *    Open the printer device.
  8398. +     */
  8399. +
  8400. +int
  8401. +amiga_open_printer(gx_device *dev)
  8402. +{
  8403. +    if(xdev -> port = CreateMsgPort())
  8404. +    {
  8405. +        if(xdev -> printer = (struct IODRPReq *)CreateIORequest(xdev -> port,sizeof(struct IODRPReq)))
  8406. +        {
  8407. +            if(!OpenDevice("printer.device",0,(struct IORequest *)xdev -> printer,0))
  8408. +            {
  8409. +                if(xdev -> rport = (struct RastPort *)AllocVec(sizeof(struct RastPort),MEMF_ANY))
  8410. +                {
  8411. +                    const sigset_t    trapped = sigmask(SIGINT);
  8412. +                    struct BitMap    DummyBitMap;
  8413. +                    UWORD        DummyLine[12];
  8414. +
  8415. +                    InitRastPort(xdev -> rport);
  8416. +
  8417. +                        /* Cook up a dummy bitmap to keep
  8418. +                         * `smart' drivers from complaining.
  8419. +                         */
  8420. +
  8421. +                    InitBitMap(&DummyBitMap,12,16,16);
  8422. +
  8423. +                    DummyBitMap . Planes[0] = (PLANEPTR)&DummyLine;
  8424. +
  8425. +                    xdev -> rport -> BitMap = &DummyBitMap;
  8426. +
  8427. +                        /* Query page size requirements. */
  8428. +
  8429. +                    xdev -> printer -> io_Command    = PRD_DUMPRPORT;
  8430. +                    xdev -> printer -> io_RastPort    = xdev -> rport;
  8431. +                    xdev -> printer -> io_SrcWidth    = 16;
  8432. +                    xdev -> printer -> io_SrcHeight    = 16;
  8433. +                    xdev -> printer -> io_Modes    = LORES_KEY;
  8434. +
  8435. +                    xdev -> printer -> io_Special    |= SPECIAL_FULLCOLS | SPECIAL_FULLROWS | SPECIAL_NOPRINT;
  8436. +
  8437. +                        /* Don't let them stop us now! */
  8438. +
  8439. +                    sigprocmask(SIG_BLOCK,&trapped,NULL);
  8440. +
  8441. +                        /* Ask for it... */
  8442. +
  8443. +                    if(!DoIO((struct IORequest *)xdev -> printer))
  8444. +                    {
  8445. +                        struct PrinterExtendedData    *PED;
  8446. +                        struct PrinterData        *PD;
  8447. +                        struct Preferences        *Prefs;
  8448. +                        LONG                 Depth,
  8449. +                                         NumColours,
  8450. +                                         CubeSize;
  8451. +                        LONG                 PageWidth,
  8452. +                                         PageHeight;
  8453. +
  8454. +                            /* Unblock ^C signal. */
  8455. +
  8456. +                        sigprocmask(SIG_UNBLOCK,&trapped,NULL);
  8457. +
  8458. +                        xdev -> printer -> io_Special &= ~(SPECIAL_FULLCOLS | SPECIAL_FULLROWS | SPECIAL_NOPRINT);
  8459. +
  8460. +                            /* Get the printer internal data. */
  8461. +
  8462. +                        PD    = (struct PrinterData *)xdev -> printer -> io_Device;
  8463. +                        PED    = &PD -> pd_SegmentData -> ps_PED;
  8464. +                        Prefs    = &PD -> pd_Preferences;
  8465. +
  8466. +                            /* Calculate the printer page size. */
  8467. +
  8468. +                        PageWidth    = PED -> ped_XDotsInch * (Prefs -> PrintRightMargin - Prefs -> PrintLeftMargin + 1);
  8469. +                        PageHeight    = PED -> ped_YDotsInch * Prefs -> PaperLength;
  8470. +
  8471. +                        switch(Prefs -> PrintPitch)
  8472. +                        {
  8473. +                            case PICA:
  8474. +
  8475. +                                PageWidth /= 10;
  8476. +                                break;
  8477. +
  8478. +                            case ELITE:
  8479. +
  8480. +                                PageWidth /= 12;
  8481. +                                break;
  8482. +
  8483. +                            case FINE:
  8484. +
  8485. +                                PageWidth /= 15;
  8486. +                                break;
  8487. +                        }
  8488. +
  8489. +                        switch(Prefs -> PrintSpacing)
  8490. +                        {
  8491. +                            case SIX_LPI:
  8492. +
  8493. +                                PageHeight /= 6;
  8494. +                                break;
  8495. +
  8496. +                            case EIGHT_LPI:
  8497. +
  8498. +                                PageHeight /= 8;
  8499. +                                break;
  8500. +                        }
  8501. +
  8502. +                        if(PageWidth > PED -> ped_MaxXDots)
  8503. +                            PageWidth = PED -> ped_MaxXDots;
  8504. +
  8505. +                        if(PageHeight > PED -> ped_MaxYDots && PED -> ped_MaxYDots)
  8506. +                            PageHeight = PED -> ped_MaxYDots;
  8507. +
  8508. +                            /* Set up the default colour values. */
  8509. +
  8510. +                        if(Prefs -> PrintShade == SHADE_BW)
  8511. +                        {
  8512. +                            Depth        = 1;
  8513. +                            NumColours    = 2;
  8514. +                            CubeSize    = 0;
  8515. +                        }
  8516. +                        else
  8517. +                        {
  8518. +                            Depth        = 12;
  8519. +                            NumColours    = 4096;
  8520. +                            CubeSize    = 16;
  8521. +                        }
  8522. +
  8523. +                            /* Get the page size */
  8524. +
  8525. +                        if(xdev -> width > 0 && xdev -> height > 0)
  8526. +                        {
  8527. +                            if(PageWidth < xdev -> width)
  8528. +                                xdev -> width = PageWidth;
  8529. +
  8530. +                            if(PageHeight < xdev -> height)
  8531. +                                xdev -> height = PageHeight;
  8532. +                        }
  8533. +                        else
  8534. +                        {
  8535. +                            xdev -> width    = PageWidth;
  8536. +                            xdev -> height    = PageHeight;
  8537. +                        }
  8538. +
  8539. +                            /* Get the DPI values */
  8540. +
  8541. +                        xdev -> x_pixels_per_inch    = (float)PED -> ped_XDotsInch;
  8542. +                        xdev -> y_pixels_per_inch    = (float)PED -> ped_YDotsInch;
  8543. +
  8544. +                            /* Try to allocate a suitable bitmap.
  8545. +                             * If an allocation fails, rescale the
  8546. +                             * colour cube and bitmap depth and
  8547. +                             * retry. Minimum are eight colours.
  8548. +                             */
  8549. +
  8550. +                        do
  8551. +                        {
  8552. +                                /* Try to allocate the raster... */
  8553. +
  8554. +                            if(!(xdev -> bitmap = CreateBitMap(xdev -> width,xdev -> height,Depth,NULL,NULL,TRUE)))
  8555. +                            {
  8556. +                                    /* Any chance to rescale the cube? */
  8557. +
  8558. +                                if(Depth < 2)
  8559. +                                    break;
  8560. +                                else
  8561. +                                {
  8562. +                                        /* One plane less... */
  8563. +
  8564. +                                    Depth--;
  8565. +
  8566. +                                        /* Rescale the cube. */
  8567. +
  8568. +                                    while(CubeSize >= 2)
  8569. +                                    {
  8570. +                                        if((NumColours = CubeSize * CubeSize * CubeSize) <= (1 << Depth))
  8571. +                                            break;
  8572. +                                        else
  8573. +                                            CubeSize--;
  8574. +                                    }
  8575. +
  8576. +                                        /* Less than eight colours? */
  8577. +
  8578. +                                    if(CubeSize < 2)
  8579. +                                        break;
  8580. +                                }
  8581. +                            }
  8582. +                        }
  8583. +                        while(!xdev -> bitmap);
  8584. +
  8585. +                            /* Got the bitmap? */
  8586. +
  8587. +                        if(xdev -> bitmap)
  8588. +                        {
  8589. +                                /* Allocate a suitable colour map. */
  8590. +
  8591. +                            if(xdev -> colormap = GetColorMap(NumColours))
  8592. +                            {
  8593. +                                    /* Black & white only? */
  8594. +
  8595. +                                if(NumColours == 2)
  8596. +                                {
  8597. +                                    SetRGB4CM(xdev -> colormap,0,0x0,0x0,0x0);
  8598. +                                    SetRGB4CM(xdev -> colormap,1,0xF,0xF,0xF);
  8599. +                                }
  8600. +                                else
  8601. +                                {
  8602. +                                    LONG i = 0,r,g,b,max = CubeSize - 1;
  8603. +
  8604. +                                        /* Fill in the colour cube. */
  8605. +
  8606. +                                    for(r = 0 ; r < CubeSize ; r++)
  8607. +                                    {
  8608. +                                        for(g = 0 ; g < CubeSize ; g++)
  8609. +                                        {
  8610. +                                            for(b = 0 ; b < CubeSize ; b++)
  8611. +                                                SetRGB4CM(xdev -> colormap,i++,(15 * r) / max,(15 * g) / max,(15 * b) / max);
  8612. +                                        }
  8613. +                                    }
  8614. +
  8615. +                                    set_colour_printer_device((gx_device_amiga *)dev,CubeSize);
  8616. +                                }
  8617. +
  8618. +                                xdev -> printer -> io_ColorMap    = xdev -> colormap;
  8619. +                                xdev -> rport -> BitMap        = xdev -> bitmap;
  8620. +
  8621. +                                return(0);
  8622. +                            }
  8623. +                            else
  8624. +                                perror("Ghostscript: failed to allocate colour map");
  8625. +                        }
  8626. +                        else
  8627. +                        {
  8628. +                            char buffer[256];
  8629. +
  8630. +                            sprintf(buffer,"Ghostscript: failed to allocate raster (wanted %ld, largest %ld)",(xdev -> width + 15) / 8 * xdev -> height * Depth,AvailMem(MEMF_ANY | MEMF_LARGEST));
  8631. +
  8632. +                            perror(buffer);
  8633. +                        }
  8634. +                    }
  8635. +                    else
  8636. +                    {
  8637. +                        char buffer[256];
  8638. +
  8639. +                        sigprocmask(SIG_UNBLOCK,&trapped,NULL);
  8640. +
  8641. +                        sprintf(buffer,"Ghostscript: failed to query printer page size (error code #%ld)",xdev -> printer -> io_Error);
  8642. +
  8643. +                        perror(buffer);
  8644. +                    }
  8645. +                }
  8646. +                else
  8647. +                    perror("Ghostscript: failed to allocate raster port");
  8648. +            }
  8649. +            else
  8650. +            {
  8651. +                char buffer[256];
  8652. +
  8653. +                sprintf(buffer,"Ghostscript: failed to open printer.device (error code #%ld)",xdev -> printer -> io_Error);
  8654. +
  8655. +                perror(buffer);
  8656. +            }
  8657. +        }
  8658. +        else
  8659. +            perror("Ghostscript: failed to allocate device driver");
  8660. +    }
  8661. +    else
  8662. +        perror("Ghostscript: failed to create io port");
  8663. +
  8664. +    return(-1);
  8665. +}
  8666. +
  8667. +    /* amiga_output_page_printer(gx_device *dev,int,int):
  8668. +     *
  8669. +     *    Send a bitmap to the printer.
  8670. +     */
  8671. +
  8672. +int
  8673. +amiga_output_page_printer(gx_device *dev,int num_copies,int flush)
  8674. +{
  8675. +    const sigset_t trapped = sigmask(SIGINT);
  8676. +    int result,i;
  8677. +    ULONG Signals;
  8678. +
  8679. +    xdev -> printer -> io_Command    = PRD_DUMPRPORT;
  8680. +    xdev -> printer -> io_SrcWidth    = xdev -> width;
  8681. +    xdev -> printer -> io_SrcHeight    = xdev -> height;
  8682. +    xdev -> printer -> io_DestCols    = xdev -> width;
  8683. +    xdev -> printer -> io_DestRows    = xdev -> height;
  8684. +
  8685. +        /* We cannot possibly allow being interrupted in the middle
  8686. +         * of a raster dump!
  8687. +         */
  8688. +
  8689. +    sigprocmask(SIG_BLOCK,&trapped,NULL);
  8690. +
  8691. +    for(i = 0 ; i < num_copies ; i++)
  8692. +    {
  8693. +        SetSignal(0,SIGBREAKF_CTRL_C | (1L << xdev -> port -> mp_SigBit));
  8694. +
  8695. +        SendIO((struct IORequest *)xdev -> printer);
  8696. +
  8697. +        Signals = Wait(SIGBREAKF_CTRL_C | (1L << xdev -> port -> mp_SigBit));
  8698. +
  8699. +        if(Signals & SIGBREAKF_CTRL_C)
  8700. +        {
  8701. +            char buffer[256];
  8702. +
  8703. +            if(!CheckIO((struct IORequest *)xdev -> printer))
  8704. +                AbortIO((struct IORequest *)xdev -> printer);
  8705. +
  8706. +            WaitIO((struct IORequest *)xdev -> printer);
  8707. +
  8708. +            sprintf(buffer,"Ghostscript: printing aborted");
  8709. +
  8710. +            perror(buffer);
  8711. +
  8712. +            result = -1;
  8713. +
  8714. +            sigprocmask(SIG_UNBLOCK,&trapped,NULL);
  8715. +
  8716. +            break;
  8717. +        }
  8718. +
  8719. +        if(Signals & (1L << xdev -> port -> mp_SigBit))
  8720. +        {
  8721. +            if(WaitIO((struct IORequest *)xdev -> printer))
  8722. +            {
  8723. +                char buffer[256];
  8724. +
  8725. +                sprintf(buffer,"Ghostscript: failed to print raster (error code #%ld)",xdev -> printer -> io_Error);
  8726. +
  8727. +                perror(buffer);
  8728. +
  8729. +                result = -1;
  8730. +
  8731. +                sigprocmask(SIG_UNBLOCK,&trapped,NULL);
  8732. +
  8733. +                break;
  8734. +            }
  8735. +            else
  8736. +                result = 0;
  8737. +        }
  8738. +    }
  8739. +
  8740. +    sigprocmask(SIG_UNBLOCK,&trapped,NULL);
  8741. +
  8742. +    return(result);
  8743. +}
  8744. +
  8745. +    /* amiga_close_printer(gx_device *dev):
  8746. +     *
  8747. +     *    Close the printer driver.
  8748. +     */
  8749. +
  8750. +int
  8751. +amiga_close_printer(gx_device *dev)
  8752. +{
  8753. +    if(xdev -> bitmap)
  8754. +    {
  8755. +        DeleteBitMap(xdev -> bitmap,TRUE);
  8756. +
  8757. +        xdev -> bitmap = NULL;
  8758. +    }
  8759. +
  8760. +    if(xdev -> rport)
  8761. +    {
  8762. +        FreeVec(xdev -> rport);
  8763. +
  8764. +        xdev -> rport = NULL;
  8765. +    }
  8766. +
  8767. +    if(xdev -> colormap)
  8768. +    {
  8769. +        FreeColorMap(xdev -> colormap);
  8770. +
  8771. +        xdev -> colormap = NULL;
  8772. +    }
  8773. +
  8774. +    if(xdev -> printer)
  8775. +    {
  8776. +        if(xdev -> printer -> io_Device)
  8777. +            CloseDevice((struct IORequest *)xdev -> printer);
  8778. +
  8779. +        DeleteIORequest(xdev -> printer);
  8780. +
  8781. +        xdev -> printer = NULL;
  8782. +    }
  8783. +
  8784. +    if(xdev -> port)
  8785. +    {
  8786. +        DeleteMsgPort(xdev -> port);
  8787. +
  8788. +        xdev -> port = NULL;
  8789. +    }
  8790. +
  8791. +    xdev -> width = xdev -> height = 0;
  8792. +/*    xdev -> x_pixels_per_inch = x_pixels_per_inch = 72.72;*/
  8793. +
  8794. +    return(0);
  8795. +}
  8796. +
  8797. +    /* amiga_get_bits(gx_device *dev,int y,byte *str,byte **actual_data):
  8798. +     *
  8799. +     *    Read the raster bits into a buffer.
  8800. +     */
  8801. +
  8802. +int
  8803. +amiga_get_bits(gx_device *dev,int y,byte *str,byte **actual_data)
  8804. +{
  8805. +    if(y < 0 || y > xdev -> height)
  8806. +        return(-1);
  8807. +    else
  8808. +    {
  8809. +        if(actual_data)
  8810. +            *actual_data = (byte *)(xdev -> bitmap -> Planes[0] + xdev -> bitmap -> BytesPerRow * y);
  8811. +        else
  8812. +            memcpy(str,xdev -> bitmap -> Planes[0] + xdev -> bitmap -> BytesPerRow * y,xdev -> bitmap -> BytesPerRow);
  8813. +
  8814. +        return(0);
  8815. +    }
  8816. +}
  8817. +
  8818. +    /* amiga_open(gx_device *dev,ULONG Mode):
  8819. +     *
  8820. +     *    Open a custom screen.
  8821. +     */
  8822. +
  8823. +int
  8824. +amiga_open(gx_device *dev,ULONG Mode)
  8825. +{
  8826. +    struct DisplayInfo    DisplayInfo;
  8827. +    struct DimensionInfo    DimensionInfo;
  8828. +
  8829. +        /* Get the display dimensions. */
  8830. +
  8831. +    if(GetDisplayInfoData(NULL,(APTR)&DisplayInfo,sizeof(struct DisplayInfo),DTAG_DISP,Mode) && GetDisplayInfoData(NULL,(APTR)&DimensionInfo,sizeof(struct DimensionInfo),DTAG_DIMS,Mode))
  8832. +    {
  8833. +            /* Two shades only, black & white */
  8834. +
  8835. +        STATIC struct ColorSpec Colours[] =
  8836. +        {
  8837. +             0,    0x0000, 0x0000, 0x0000,
  8838. +             1,    0xFFFF, 0xFFFF, 0xFFFF,
  8839. +
  8840. +            -1
  8841. +        };
  8842. +
  8843. +        float    Width,
  8844. +            Height;
  8845. +        LONG    i,cube_size,max;
  8846. +        LONG    ScreenWidth,
  8847. +            ScreenHeight,
  8848. +            ScreenDepth;
  8849. +
  8850. +            /* Start up with a maximum depth display. */
  8851. +
  8852. +        ScreenDepth = DimensionInfo . MaxDepth;
  8853. +
  8854. +            /* Check to see whether we will be able to
  8855. +             * build a colour display or not.
  8856. +             */
  8857. +
  8858. +        for(cube_size = 6 ; cube_size >= 2 ; cube_size--)
  8859. +        {
  8860. +            if((max = cube_size * cube_size * cube_size) <= 1 << ScreenDepth)
  8861. +                break;
  8862. +        }
  8863. +
  8864. +            /* Got enough colours? */
  8865. +
  8866. +        if(cube_size != 1)
  8867. +            set_colour_device((gx_device_amiga *)dev,cube_size,NULL);
  8868. +        else
  8869. +        {
  8870. +            ScreenDepth = 1;
  8871. +
  8872. +            set_mono_device((gx_device_amiga *)dev);
  8873. +        }
  8874. +
  8875. +        if(xdev -> width > 0 && xdev -> height > 0)
  8876. +        {
  8877. +            Width    = xdev -> width;
  8878. +            Height    = xdev -> height;
  8879. +        }
  8880. +        else
  8881. +        {
  8882. +            if(xdev -> page_width > 0.0)
  8883. +                Width = xdev -> page_width;
  8884. +            else
  8885. +                Width = 0.0;
  8886. +
  8887. +            if(xdev -> page_height > 0.0)
  8888. +                Height = xdev -> page_height;
  8889. +            else
  8890. +                Height = 0.0;
  8891. +        }
  8892. +
  8893. +            /* Use the best guess, we will take the standard
  8894. +             * low resolution x-dpi value and scale it by
  8895. +             * the pixel speed.
  8896. +             */
  8897. +
  8898. +        if(DisplayInfo . PixelSpeed)
  8899. +        {
  8900. +            xdev -> x_pixels_per_inch = (35.0 * 140.0) / (float)DisplayInfo . PixelSpeed;
  8901. +            xdev -> y_pixels_per_inch = (xdev -> x_pixels_per_inch * (float)DisplayInfo . Resolution . x) / (float)DisplayInfo . Resolution . y;
  8902. +        }
  8903. +        else
  8904. +        {
  8905. +            xdev -> x_pixels_per_inch = 72.27;
  8906. +            xdev -> y_pixels_per_inch = 72.27;
  8907. +        }
  8908. +
  8909. +        if(Width > 0.0)
  8910. +            ScreenWidth = (LONG)(Width * xdev -> x_pixels_per_inch);
  8911. +        else
  8912. +            ScreenWidth = 0;
  8913. +
  8914. +        if(Height > 0.0)
  8915. +            ScreenHeight = (LONG)(Height * xdev -> y_pixels_per_inch);
  8916. +        else
  8917. +            ScreenHeight = 0;
  8918. +
  8919. +        if(ScreenWidth < DimensionInfo . MinRasterWidth || ScreenWidth > DimensionInfo . MaxRasterWidth)
  8920. +            ScreenWidth = 0;
  8921. +
  8922. +        if(ScreenHeight < DimensionInfo . MinRasterHeight || ScreenHeight > DimensionInfo . MaxRasterHeight)
  8923. +            ScreenHeight = 0;
  8924. +
  8925. +            /* Try to open a custom screen; if this fails, try to
  8926. +             * rescale the colour cube and retry.
  8927. +             */
  8928. +
  8929. +        do
  8930. +        {
  8931. +            if(!(xdev -> screen = OpenScreenTags(NULL,
  8932. +                SA_Depth,    ScreenDepth,
  8933. +                SA_Overscan,    OSCAN_TEXT,
  8934. +                SA_Quiet,    TRUE,
  8935. +                SA_Behind,    TRUE,
  8936. +                SA_DisplayID,    Mode,
  8937. +                SA_Colors,    Colours,
  8938. +                SA_AutoScroll,    TRUE,
  8939. +                SA_ShowTitle,    FALSE,
  8940. +                SA_Title,    "Ghostscript Amiga output screen",
  8941. +
  8942. +                ScreenWidth  > 0 ? SA_Width  : TAG_IGNORE,    ScreenWidth,
  8943. +                ScreenHeight > 0 ? SA_Height : TAG_IGNORE,    ScreenHeight,
  8944. +            TAG_DONE)))
  8945. +            {
  8946. +                if(ScreenDepth < 2)
  8947. +                    break;
  8948. +                else
  8949. +                {
  8950. +                    ScreenDepth--;
  8951. +
  8952. +                        /* Check to see whether we will be able to
  8953. +                         * build a colour display or not.
  8954. +                         */
  8955. +
  8956. +                    while(cube_size >= 2)
  8957. +                    {
  8958. +                        if((max = cube_size * cube_size * cube_size) <= 1 << ScreenDepth)
  8959. +                            break;
  8960. +                        else
  8961. +                            cube_size--;
  8962. +                    }
  8963. +
  8964. +                        /* Got enough colours? */
  8965. +
  8966. +                    if(cube_size == 1 || ScreenDepth == 1)
  8967. +                    {
  8968. +                            /* Obviously not. */
  8969. +
  8970. +                        ScreenDepth = 1;
  8971. +
  8972. +                        set_mono_device((gx_device_amiga *)dev);
  8973. +                    }
  8974. +                }
  8975. +            }
  8976. +        }
  8977. +        while(!xdev -> screen);
  8978. +
  8979. +            /* Did we succeed in opening the screen? */
  8980. +
  8981. +        if(xdev -> screen)
  8982. +        {
  8983. +            if(xdev -> window = OpenWindowTags(NULL,
  8984. +                WA_Left,    0,
  8985. +                WA_Top,        0,
  8986. +                WA_Width,    xdev -> screen -> Width,
  8987. +                WA_Height,    xdev -> screen -> Height,
  8988. +                WA_Backdrop,    TRUE,
  8989. +                WA_RMBTrap,    TRUE,
  8990. +                WA_Borderless,    TRUE,
  8991. +                WA_CustomScreen,xdev -> screen,
  8992. +            TAG_DONE))
  8993. +            {
  8994. +                xdev -> rport    = xdev -> window -> RPort;
  8995. +                xdev -> width    = xdev -> screen -> Width;
  8996. +                xdev -> height    = xdev -> screen -> Height;
  8997. +            }
  8998. +            else
  8999. +            {
  9000. +                xdev -> rport    = &xdev -> screen -> RastPort;
  9001. +                xdev -> width    = xdev -> screen -> Width;
  9002. +                xdev -> height    = xdev -> screen -> Height;
  9003. +            }
  9004. +
  9005. +                /* Establish defaults. */
  9006. +
  9007. +            DarkPen        = 0;
  9008. +            LightPen    = 1;
  9009. +
  9010. +            SetBPen(xdev -> rport,0);
  9011. +            SetDrMd(xdev -> rport,JAM2);
  9012. +
  9013. +                /* Create the temporary drawing area. */
  9014. +
  9015. +            if(xdev -> temp_rport = CreateTempRPort(xdev -> rport))
  9016. +            {
  9017. +                if(xdev -> temp_array = (UBYTE *)AllocVec((xdev -> screen -> Width + 15) & ~15,MEMF_ANY))
  9018. +                {
  9019. +                        /* Colour output enabled? */
  9020. +
  9021. +                    if(xdev -> cube_size > 0)
  9022. +                    {
  9023. +                        LONG r,g,b,max = xdev -> cube_size - 1;
  9024. +
  9025. +                        i = 0;
  9026. +
  9027. +                            /* Build a suitable colour map. */
  9028. +
  9029. +                        if(GfxBase -> LibNode . lib_Version >= 39)
  9030. +                        {
  9031. +                            for(r = 0 ; r < xdev -> cube_size ; r++)
  9032. +                            {
  9033. +                                for(g = 0 ; g < xdev -> cube_size ; g++)
  9034. +                                {
  9035. +                                    for(b = 0 ; b < xdev -> cube_size ; b++)
  9036. +                                        SetRGB32(&xdev -> screen -> ViewPort,i++,SPREAD((255 * r) / max),SPREAD((255 * g) / max),SPREAD((255 * b) / max));
  9037. +                                }
  9038. +                            }
  9039. +                        }
  9040. +                        else
  9041. +                        {
  9042. +                            for(r = 0 ; r < xdev -> cube_size ; r++)
  9043. +                            {
  9044. +                                for(g = 0 ; g < xdev -> cube_size ; g++)
  9045. +                                {
  9046. +                                    for(b = 0 ; b < xdev -> cube_size ; b++)
  9047. +                                        SetRGB4(&xdev -> screen -> ViewPort,i++,(15 * r) / max,(15 * g) / max,(15 * b) / max);
  9048. +                                }
  9049. +                            }
  9050. +                        }
  9051. +                    }
  9052. +                }
  9053. +                else
  9054. +                {
  9055. +                    perror("Ghostscript: failed to allocate temporary line");
  9056. +
  9057. +                    return(-1);
  9058. +                }
  9059. +            }
  9060. +            else
  9061. +            {
  9062. +                perror("Ghostscript: failed to allocate temporary raster");
  9063. +
  9064. +                return(-1);
  9065. +            }
  9066. +
  9067. +            amiga_set_pen(dev,DarkPen);
  9068. +
  9069. +            return(0);
  9070. +        }
  9071. +        else
  9072. +            perror("Ghostscript: failed to open screen");
  9073. +    }
  9074. +    else
  9075. +        perror("Ghostscript: failed to get display mode information");
  9076. +
  9077. +    return(-1);
  9078. +}
  9079. +
  9080. +    /* amiga_output_page(gx_device *dev,int,int):
  9081. +     *
  9082. +     *    Page is not `buffered', just bring screen/window
  9083. +     *    to the front.
  9084. +     */
  9085. +
  9086. +int
  9087. +amiga_output_page(gx_device *dev,int num_copies,int flush)
  9088. +{
  9089. +    if(xdev -> screen)
  9090. +        ScreenToFront(xdev -> screen);
  9091. +    else
  9092. +    {
  9093. +        if(xdev -> window)
  9094. +            WindowToFront(xdev -> window);
  9095. +    }
  9096. +
  9097. +    return(0);
  9098. +}
  9099. +
  9100. +    /* amiga_close(gx_device *dev):
  9101. +     *
  9102. +     *    Close the screen and free associated resources.
  9103. +     */
  9104. +
  9105. +int
  9106. +amiga_close(gx_device *dev)
  9107. +{
  9108. +    if(xdev -> dispatcher)
  9109. +    {
  9110. +        const sigset_t trapped = sigmask(SIGINT);
  9111. +
  9112. +        sigprocmask(SIG_BLOCK,&trapped,NULL);
  9113. +
  9114. +        Forbid();
  9115. +
  9116. +        Signal(xdev -> dispatcher,SIG_KILL);
  9117. +
  9118. +        SetSignal(0,SIG_HANDSHAKE);
  9119. +
  9120. +        Wait(SIG_HANDSHAKE);
  9121. +
  9122. +        Permit();
  9123. +
  9124. +        sigprocmask(SIG_UNBLOCK,&trapped,NULL);
  9125. +    }
  9126. +
  9127. +    if(xdev -> temp_array)
  9128. +    {
  9129. +        FreeVec(xdev -> temp_array);
  9130. +
  9131. +        xdev -> temp_array = NULL;
  9132. +    }
  9133. +
  9134. +    if(xdev -> pens)
  9135. +    {
  9136. +        LONG i;
  9137. +
  9138. +        for(i = 0 ; i < xdev -> cube_size * xdev -> cube_size * xdev -> cube_size ; i++)
  9139. +        {
  9140. +            if(xdev -> pens[i] != -1)
  9141. +                ReleasePen(xdev -> window -> WScreen -> ViewPort . ColorMap,xdev -> pens[i]);
  9142. +        }
  9143. +
  9144. +        FreeVec(xdev -> pens);
  9145. +
  9146. +        xdev -> pens = NULL;
  9147. +    }
  9148. +
  9149. +    if(xdev -> temp_rport)
  9150. +    {
  9151. +        DeleteTempRPort(xdev -> temp_rport);
  9152. +
  9153. +        xdev -> temp_rport = NULL;
  9154. +    }
  9155. +
  9156. +    if(xdev -> window)
  9157. +    {
  9158. +        CloseWindow(xdev -> window);
  9159. +
  9160. +        xdev -> window = NULL;
  9161. +    }
  9162. +
  9163. +    DeleteScrollers(dev);
  9164. +
  9165. +    if(xdev -> super_bitmap)
  9166. +    {
  9167. +        DeleteBitMap(xdev -> super_bitmap,FALSE);
  9168. +
  9169. +        xdev -> super_bitmap = NULL;
  9170. +    }
  9171. +
  9172. +    if(xdev -> screen)
  9173. +    {
  9174. +        CloseScreen(xdev -> screen);
  9175. +
  9176. +        xdev -> screen = NULL;
  9177. +    }
  9178. +
  9179. +    xdev -> width = xdev -> height = 0;
  9180. +/*    xdev -> x_pixels_per_inch = x_pixels_per_inch = 72.72;*/
  9181. +
  9182. +    return(0);
  9183. +}
  9184. +
  9185. +    /* amiga_fill_rectangle(gx_device *dev,int x,int y,int w,int h,gx_color_index color):
  9186. +     *
  9187. +     *    Fill a rectangle with a given colour. This one is simple as it can
  9188. +     *    be done with the Amiga graphics primitives.
  9189. +     */
  9190. +
  9191. +int
  9192. +amiga_fill_rectangle(gx_device *dev,int x,int y,int w,int h,gx_color_index color)
  9193. +{
  9194. +    if(x < 0 || x > xdev -> width - w || y < 0 || y > xdev -> height - h)
  9195. +        return(-1);
  9196. +    else
  9197. +    {
  9198. +        if(w > 0 && h > 0 && color != gx_no_color_index)
  9199. +        {
  9200. +            amiga_set_pen(dev,color);
  9201. +
  9202. +            RectFill(xdev -> rport,x,y,x + w - 1,y + h - 1);
  9203. +        }
  9204. +
  9205. +        return(0);
  9206. +    }
  9207. +}
  9208. +
  9209. +    /* amiga_copy_mono():
  9210. +     *
  9211. +     *    Copy a monochrome image. This operation requires a bit of work as
  9212. +     *    we cannot simply blit the image into the bitmap.
  9213. +     */
  9214. +
  9215. +int
  9216. +amiga_copy_mono(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h,gx_color_index zero,gx_color_index one)
  9217. +{
  9218. +    if(y < 0 || x < 0 || w < 0 || h < 0)
  9219. +        return(-1);
  9220. +    else
  9221. +    {
  9222. +        if(w > 0 && h > 0)
  9223. +        {
  9224. +            LONG i,j;
  9225. +
  9226. +            if(zero == gx_no_color_index)
  9227. +            {
  9228. +                if(one != gx_no_color_index)
  9229. +                {
  9230. +                    do
  9231. +                    {
  9232. +                        ReadPixelLine8(xdev -> rport,x,y,w,xdev -> temp_array,xdev -> temp_rport);
  9233. +
  9234. +                        for(i = sourcex, j = 0 ; i < sourcex + w ; i++, j++)
  9235. +                        {
  9236. +                            if(base[i >> 3] & shift[i & 7])
  9237. +                                xdev -> temp_array[j] = one;
  9238. +                        }
  9239. +
  9240. +                        WritePixelLine8(xdev -> rport,x,y,w,xdev -> temp_array,xdev -> temp_rport);
  9241. +
  9242. +                        base += raster;
  9243. +
  9244. +                        y++;
  9245. +                    }
  9246. +                    while(--h);
  9247. +                }
  9248. +            }
  9249. +            else
  9250. +            {
  9251. +                if(one == gx_no_color_index)
  9252. +                {
  9253. +                    do
  9254. +                    {
  9255. +                        ReadPixelLine8(xdev -> rport,x,y,w,xdev -> temp_array,xdev -> temp_rport);
  9256. +
  9257. +                        for(i = sourcex, j = 0 ; i < w + sourcex ; i++, j++)
  9258. +                        {
  9259. +                            if(!(base[i >> 3] & shift[i & 7]))
  9260. +                                xdev -> temp_array[j] = zero;
  9261. +                        }
  9262. +
  9263. +                        WritePixelLine8(xdev -> rport,x,y,w,xdev -> temp_array,xdev -> temp_rport);
  9264. +
  9265. +                        base += raster;
  9266. +
  9267. +                        y++;
  9268. +                    }
  9269. +                    while(--h);
  9270. +                }
  9271. +                else
  9272. +                {
  9273. +                    do
  9274. +                    {
  9275. +                        for(i = sourcex, j = 0 ; i < w + sourcex ; i++, j++)
  9276. +                        {
  9277. +                            if(base[i >> 3] & shift[i & 7])
  9278. +                                xdev -> temp_array[j] = one;
  9279. +                            else
  9280. +                                xdev -> temp_array[j] = zero;
  9281. +                        }
  9282. +
  9283. +                        WritePixelLine8(xdev -> rport,x,y,w,xdev -> temp_array,xdev -> temp_rport);
  9284. +
  9285. +                        base += raster;
  9286. +
  9287. +                        y++;
  9288. +                    }
  9289. +                    while(--h);
  9290. +                }
  9291. +            }
  9292. +        }
  9293. +
  9294. +        return(0);
  9295. +    }
  9296. +}
  9297. +
  9298. +    /* amiga_copy_color():
  9299. +     *
  9300. +     *    Copy a color image (oh well...). This is just the same as the
  9301. +     *    copy_mono() routine.
  9302. +     */
  9303. +
  9304. +int
  9305. +amiga_copy_color(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h)
  9306. +{
  9307. +    if(y < 0 || x < 0 || w < 0 || h < 0)
  9308. +        return(-1);
  9309. +    else
  9310. +    {
  9311. +        if(w > 0 && h > 0)
  9312. +        {
  9313. +            LONG i,j;
  9314. +
  9315. +            do
  9316. +            {
  9317. +                for(i = sourcex, j = 0 ; i < w + sourcex ; i++, j++)
  9318. +                {
  9319. +                    if(base[i >> 3] & shift[i & 7])
  9320. +                        xdev -> temp_array[j] = DarkPen;
  9321. +                    else
  9322. +                        xdev -> temp_array[j] = LightPen;
  9323. +                }
  9324. +
  9325. +                WritePixelLine8(xdev -> rport,x,y,w,xdev -> temp_array,xdev -> temp_rport);
  9326. +
  9327. +                base += raster;
  9328. +
  9329. +                y++;
  9330. +            }
  9331. +            while(--h);
  9332. +        }
  9333. +
  9334. +        return(0);
  9335. +    }
  9336. +}
  9337. +
  9338. +    /* amiga_draw_line(gx_device *dev,int x0,int y0,int x1,int y1,gx_color_index color):
  9339. +     *
  9340. +     *    Draw a line between two points. This one is easy as it can be done
  9341. +     *    with the Amiga graphics primitives, the only glitch is having to reset
  9342. +     *    the last dot to its original colour.
  9343. +     */
  9344. +
  9345. +int
  9346. +amiga_draw_line(gx_device *dev,int x0,int y0,int x1,int y1,gx_color_index color)
  9347. +{
  9348. +    if(color != gx_no_color_index && (x0 != x1 || y0 != y1))
  9349. +    {
  9350. +        LONG pen;
  9351. +
  9352. +        pen = ReadPixel(xdev -> rport,x1,y1);
  9353. +
  9354. +        amiga_set_pen(dev,color);
  9355. +
  9356. +        Move(xdev -> rport,x0,y0);
  9357. +        Draw(xdev -> rport,x1,y1);
  9358. +
  9359. +        if(pen == color)
  9360. +        {
  9361. +            amiga_set_pen(dev,pen);
  9362. +
  9363. +            WritePixel(xdev -> rport,x1,y1);
  9364. +        }
  9365. +    }
  9366. +
  9367. +    return(0);
  9368. +}
  9369. +
  9370. +    /* amiga_copy_mono_raw():
  9371. +     *
  9372. +     *    Copy a monochrome image to a bitmap. Just watch the
  9373. +     *    astounding number of case switches.
  9374. +     */
  9375. +
  9376. +int
  9377. +amiga_copy_mono_raw(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h,gx_color_index zero,gx_color_index one)
  9378. +{
  9379. +    if(y < 0 || x < 0 || w < 0 || h < 0)
  9380. +        return(-1);
  9381. +    else
  9382. +    {
  9383. +        if(w > 0 && h > 0)
  9384. +        {
  9385. +            LONG i,j,modulo = xdev -> rport -> BitMap -> BytesPerRow;
  9386. +            UBYTE *line;
  9387. +
  9388. +            w += sourcex;
  9389. +
  9390. +            line = xdev -> rport -> BitMap -> Planes[0] + y * xdev -> rport -> BitMap -> BytesPerRow;
  9391. +
  9392. +            if(zero == gx_no_color_index)
  9393. +            {
  9394. +                if(one != gx_no_color_index)
  9395. +                {
  9396. +                    if(one)
  9397. +                    {
  9398. +                        do
  9399. +                        {
  9400. +                            for(i = sourcex, j = x ; i < w ; i++, j++)
  9401. +                            {
  9402. +                                if(base[i >> 3] & shift[i & 7])
  9403. +                                    line[j >> 3] |= shift[j & 7];
  9404. +                            }
  9405. +
  9406. +                            base += raster;
  9407. +
  9408. +                            line += modulo;
  9409. +                        }
  9410. +                        while(--h);
  9411. +                    }
  9412. +                    else
  9413. +                    {
  9414. +                        do
  9415. +                        {
  9416. +                            for(i = sourcex, j = x ; i < w ; i++, j++)
  9417. +                            {
  9418. +                                if(base[i >> 3] & shift[i & 7])
  9419. +                                    line[j >> 3] &= masks[j & 7];
  9420. +                            }
  9421. +
  9422. +                            base += raster;
  9423. +
  9424. +                            line += modulo;
  9425. +                        }
  9426. +                        while(--h);
  9427. +                    }
  9428. +                }
  9429. +            }
  9430. +            else
  9431. +            {
  9432. +                if(one == gx_no_color_index)
  9433. +                {
  9434. +                    if(zero)
  9435. +                    {
  9436. +                        do
  9437. +                        {
  9438. +                            for(i = sourcex, j = x ; i < w ; i++, j++)
  9439. +                            {
  9440. +                                if(!(base[i >> 3] & shift[i & 7]))
  9441. +                                    line[j >> 3] |= shift[j & 7];
  9442. +                            }
  9443. +
  9444. +                            base += raster;
  9445. +
  9446. +                            line += modulo;
  9447. +                        }
  9448. +                        while(--h);
  9449. +                    }
  9450. +                    else
  9451. +                    {
  9452. +                        do
  9453. +                        {
  9454. +                            for(i = sourcex, j = x ; i < w ; i++, j++)
  9455. +                            {
  9456. +                                if(!(base[i >> 3] & shift[i & 7]))
  9457. +                                    line[j >> 3] &= masks[j & 7];
  9458. +                            }
  9459. +
  9460. +                            base += raster;
  9461. +
  9462. +                            line += modulo;
  9463. +                        }
  9464. +                        while(--h);
  9465. +                    }
  9466. +                }
  9467. +                else
  9468. +                {
  9469. +                    if(one)
  9470. +                    {
  9471. +                        do
  9472. +                        {
  9473. +                            for(i = sourcex, j = x ; i < w ; i++, j++)
  9474. +                            {
  9475. +                                if(base[i >> 3] & shift[i & 7])
  9476. +                                    line[j >> 3] |= shift[j & 7];
  9477. +                                else
  9478. +                                    line[j >> 3] &= masks[j & 7];
  9479. +                            }
  9480. +
  9481. +                            base += raster;
  9482. +
  9483. +                            line += modulo;
  9484. +                        }
  9485. +                        while(--h);
  9486. +                    }
  9487. +                    else
  9488. +                    {
  9489. +                        do
  9490. +                        {
  9491. +                            for(i = sourcex, j = x ; i < w ; i++, j++)
  9492. +                            {
  9493. +                                if(base[i >> 3] & shift[i & 7])
  9494. +                                    line[j >> 3] &= masks[j & 7];
  9495. +                                else
  9496. +                                    line[j >> 3] |= shift[j & 7];
  9497. +                            }
  9498. +
  9499. +                            base += raster;
  9500. +
  9501. +                            line += modulo;
  9502. +                        }
  9503. +                        while(--h);
  9504. +                    }
  9505. +                }
  9506. +            }
  9507. +        }
  9508. +
  9509. +        return(0);
  9510. +    }
  9511. +}
  9512. +
  9513. +    /* amiga_copy_color_raw():
  9514. +     *
  9515. +     *    Copy a color image (oh well...). This is just the same as the
  9516. +     *    copy_mono() routine.
  9517. +     */
  9518. +
  9519. +int
  9520. +amiga_copy_color_raw(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h)
  9521. +{
  9522. +    if(y < 0 || x < 0 || w < 0 || h < 0)
  9523. +        return(-1);
  9524. +    else
  9525. +    {
  9526. +        if(w > 0 && h > 0)
  9527. +        {
  9528. +            LONG i,j,modulo = xdev -> rport -> BitMap -> BytesPerRow;
  9529. +            UBYTE *line;
  9530. +
  9531. +            line = xdev -> rport -> BitMap -> Planes[0] + y * xdev -> rport -> BitMap -> BytesPerRow;
  9532. +
  9533. +            w += sourcex;
  9534. +
  9535. +            do
  9536. +            {
  9537. +                for(i = sourcex, j = x ; i < w ; i++, j++)
  9538. +                {
  9539. +                    if(base[i >> 3] & shift[i & 7])
  9540. +                        line[j >> 3] |= shift[j & 7];
  9541. +                    else
  9542. +                        line[j >> 3] &= masks[j & 7];
  9543. +                }
  9544. +
  9545. +                base += raster;
  9546. +
  9547. +                line += modulo;
  9548. +            }
  9549. +            while(--h);
  9550. +        }
  9551. +
  9552. +        return(0);
  9553. +    }
  9554. +}
  9555. +
  9556. +    /* amiga_fill_rectangle_raw():
  9557. +     *
  9558. +     *    Fill a rectangular area in a bitmap.
  9559. +     */
  9560. +
  9561. +int
  9562. +amiga_fill_rectangle_raw(gx_device *dev,int x,int y,int w,int h,gx_color_index color)
  9563. +{
  9564. +    if(x < 0 || x > xdev -> width - w || y < 0 || y > xdev -> height - h)
  9565. +        return(-1);
  9566. +    else
  9567. +    {
  9568. +        if(w > 0 && h > 0 && color != gx_no_color_index)
  9569. +        {
  9570. +            UBYTE *line,startmask,endmask;
  9571. +            LONG right,mid,modulo = xdev -> rport -> BitMap -> BytesPerRow;
  9572. +
  9573. +            right    = x + w;
  9574. +            mid    = (right >> 3) - (x >> 3);
  9575. +            line    = xdev -> rport -> BitMap -> Planes[0] + y * xdev -> rport -> BitMap -> BytesPerRow + (x >> 3);
  9576. +
  9577. +            x    &= 7;
  9578. +            right    &= 7;
  9579. +
  9580. +            if(color)
  9581. +            {
  9582. +                startmask    = 0xFF >> x;
  9583. +                endmask        = ~(0xFF >> right);
  9584. +
  9585. +                if(mid)
  9586. +                {
  9587. +                    UBYTE *ptr;
  9588. +                    int i;
  9589. +
  9590. +                    do
  9591. +                    {
  9592. +                        ptr = line;
  9593. +
  9594. +                        *ptr++ |= startmask;
  9595. +
  9596. +                        i = mid;
  9597. +
  9598. +                        while(--i > 0)
  9599. +                            *ptr++ = 0xFF;
  9600. +
  9601. +                        *ptr |= endmask;
  9602. +
  9603. +                        line += modulo;
  9604. +                    }
  9605. +                    while(--h);
  9606. +                }
  9607. +                else
  9608. +                {
  9609. +                    startmask &= endmask;
  9610. +
  9611. +                    do
  9612. +                    {
  9613. +                        *line |= startmask;
  9614. +
  9615. +                        line += modulo;
  9616. +                    }
  9617. +                    while(--h);
  9618. +                }
  9619. +            }
  9620. +            else
  9621. +            {
  9622. +                startmask    = ~(0xFF >> x);
  9623. +                endmask        = 0xFF >> right;
  9624. +
  9625. +                if(mid)
  9626. +                {
  9627. +                    UBYTE *ptr;
  9628. +                    LONG i;
  9629. +
  9630. +                    do
  9631. +                    {
  9632. +                        ptr = line;
  9633. +
  9634. +                        *ptr++ &= startmask;
  9635. +
  9636. +                        i = mid;
  9637. +
  9638. +                        while(--i > 0)
  9639. +                            *ptr++ = 0x00;
  9640. +
  9641. +                        *ptr &= endmask;
  9642. +
  9643. +                        line += modulo;
  9644. +                    }
  9645. +                    while(--h);
  9646. +                }
  9647. +                else
  9648. +                {
  9649. +                    startmask |= endmask;
  9650. +
  9651. +                    do
  9652. +                    {
  9653. +                        *line &= startmask;
  9654. +
  9655. +                        line += modulo;
  9656. +                    }
  9657. +                    while(--h);
  9658. +                }
  9659. +            }
  9660. +        }
  9661. +
  9662. +        return(0);
  9663. +    }
  9664. +}
  9665. +
  9666. +    /* amiga_draw_line_raw():
  9667. +     *
  9668. +     *    Draw a hair line, your basic DDA algorithm;
  9669. +     *    keep your fingers crossed.
  9670. +     */
  9671. +
  9672. +int
  9673. +amiga_draw_line_raw(gx_device *dev,int x,int y,int x1,int y1,gx_color_index color)
  9674. +{
  9675. +    if(color != gx_no_color_index && (x != x1 || y != y1))
  9676. +    {
  9677. +        short xstep,ystep,dx,dy,diff,modulo;
  9678. +        UBYTE *line,*plane,pen;
  9679. +        LONG last;
  9680. +
  9681. +        modulo    = xdev -> rport -> BitMap -> BytesPerRow;
  9682. +        plane    = xdev -> rport -> BitMap -> Planes[0];
  9683. +
  9684. +        line    = &plane[y1 * modulo];
  9685. +        last    = y1;
  9686. +        pen    = line[x1 >> 3] & (x1 & 7);
  9687. +
  9688. +        dx = x1 - x;
  9689. +        dy = y1 - y;
  9690. +
  9691. +        if(dx < 0)
  9692. +        {
  9693. +            dx = -dx;
  9694. +            dy = -dy;
  9695. +
  9696. +            x = x1;
  9697. +            y = y1;
  9698. +        }
  9699. +
  9700. +        if(y != last)
  9701. +            line = &plane[(last = y) * modulo];
  9702. +
  9703. +        if(color)
  9704. +        {
  9705. +            line[x >> 3] |= shift[x & 7];
  9706. +
  9707. +            xstep = ystep = 0;
  9708. +
  9709. +            if(dy < 0)
  9710. +            {
  9711. +                if(dx > -dy)
  9712. +                {
  9713. +                    diff = -dx / 2;
  9714. +
  9715. +                    do
  9716. +                    {
  9717. +                        xstep++;
  9718. +
  9719. +                        if(diff > 0)
  9720. +                        {
  9721. +                            ystep--;
  9722. +
  9723. +                            diff = diff - dy - dx;
  9724. +                        }
  9725. +                        else
  9726. +                            diff -= dy;
  9727. +
  9728. +                        {
  9729. +                            LONG x1 = x + xstep,y1 = y + ystep;
  9730. +
  9731. +                            if(y1 != last)
  9732. +                                line = &plane[(last = y1) * modulo];
  9733. +
  9734. +                            line[x1 >> 3] |= shift[x1 & 7];
  9735. +                        }
  9736. +                    }
  9737. +                    while(xstep < dx);
  9738. +                }
  9739. +                else
  9740. +                {
  9741. +                    if(dx == -dy)
  9742. +                        diff = 0;
  9743. +                    else
  9744. +                        diff = -dy / 2;
  9745. +
  9746. +                    do
  9747. +                    {
  9748. +                        ystep--;
  9749. +
  9750. +                        if(diff > 0)
  9751. +                            diff -= dx;
  9752. +                        else
  9753. +                        {
  9754. +                            xstep++;
  9755. +
  9756. +                            diff = diff - dy - dx;
  9757. +                        }
  9758. +
  9759. +                        {
  9760. +                            LONG x1 = x + xstep,y1 = y + ystep;
  9761. +
  9762. +                            if(y1 != last)
  9763. +                                line = &plane[(last = y1) * modulo];
  9764. +
  9765. +                            line[x1 >> 3] |= shift[x1 & 7];
  9766. +                        }
  9767. +                    }
  9768. +                    while(ystep > dy);
  9769. +                }
  9770. +            }
  9771. +            else
  9772. +            {
  9773. +                if(dx > dy)
  9774. +                {
  9775. +                    diff = -dx / 2;
  9776. +
  9777. +                    do
  9778. +                    {
  9779. +                        xstep++;
  9780. +
  9781. +                        if(diff > 0)
  9782. +                        {
  9783. +                            ystep++;
  9784. +
  9785. +                            diff = diff + dy - dx;
  9786. +                        }
  9787. +                        else
  9788. +                            diff += dy;
  9789. +
  9790. +                        {
  9791. +                            LONG x1 = x + xstep,y1 = y + ystep;
  9792. +
  9793. +                            if(y1 != last)
  9794. +                                line = &plane[(last = y1) * modulo];
  9795. +
  9796. +                            line[x1 >> 3] |= shift[x1 & 7];
  9797. +                        }
  9798. +                    }
  9799. +                    while(xstep < dx);
  9800. +                }
  9801. +                else
  9802. +                {
  9803. +                    if(dx == dy)
  9804. +                        diff = 0;
  9805. +                    else
  9806. +                        diff = dy / 2;
  9807. +
  9808. +                    do
  9809. +                    {
  9810. +                        ystep++;
  9811. +
  9812. +                        if(diff > 0)
  9813. +                            diff -= dx;
  9814. +                        else
  9815. +                        {
  9816. +                            xstep++;
  9817. +
  9818. +                            diff = diff + dy - dx;
  9819. +                        }
  9820. +
  9821. +                        {
  9822. +                            LONG x1 = x + xstep,y1 = y + ystep;
  9823. +
  9824. +                            if(y1 != last)
  9825. +                                line = &plane[(last = y1) * modulo];
  9826. +
  9827. +                            line[x1 >> 3] |= shift[x1 & 7];
  9828. +                        }
  9829. +                    }
  9830. +                    while(ystep < dy);
  9831. +                }
  9832. +            }
  9833. +
  9834. +            if(!pen)
  9835. +            {
  9836. +                if(y1 != last)
  9837. +                    line = &plane[(last = y1) * modulo];
  9838. +
  9839. +                line[x1 >> 3] &= masks[x1 & 7];
  9840. +            }
  9841. +        }
  9842. +        else
  9843. +        {
  9844. +            line[x >> 3] &= masks[x & 7];
  9845. +
  9846. +            xstep = ystep = 0;
  9847. +
  9848. +            if(dy < 0)
  9849. +            {
  9850. +                if(dx > -dy)
  9851. +                {
  9852. +                    diff = -dx / 2;
  9853. +
  9854. +                    do
  9855. +                    {
  9856. +                        xstep++;
  9857. +
  9858. +                        if(diff > 0)
  9859. +                        {
  9860. +                            ystep--;
  9861. +
  9862. +                            diff = diff - dy - dx;
  9863. +                        }
  9864. +                        else
  9865. +                            diff -= dy;
  9866. +
  9867. +                        {
  9868. +                            LONG x1 = x + xstep,y1 = y + ystep;
  9869. +
  9870. +                            if(y1 != last)
  9871. +                                line = &plane[(last = y1) * modulo];
  9872. +
  9873. +                            line[x1 >> 3] &= masks[x1 & 7];
  9874. +                        }
  9875. +                    }
  9876. +                    while(xstep < dx);
  9877. +                }
  9878. +                else
  9879. +                {
  9880. +                    if(dx == -dy)
  9881. +                        diff = 0;
  9882. +                    else
  9883. +                        diff = -dy / 2;
  9884. +
  9885. +                    do
  9886. +                    {
  9887. +                        ystep--;
  9888. +
  9889. +                        if(diff > 0)
  9890. +                            diff -= dx;
  9891. +                        else
  9892. +                        {
  9893. +                            xstep++;
  9894. +
  9895. +                            diff = diff - dy - dx;
  9896. +                        }
  9897. +
  9898. +                        {
  9899. +                            LONG x1 = x + xstep,y1 = y + ystep;
  9900. +
  9901. +                            if(y1 != last)
  9902. +                                line = &plane[(last = y1) * modulo];
  9903. +
  9904. +                            line[x1 >> 3] &= masks[x1 & 7];
  9905. +                        }
  9906. +                    }
  9907. +                    while(ystep > dy);
  9908. +                }
  9909. +            }
  9910. +            else
  9911. +            {
  9912. +                if(dx > dy)
  9913. +                {
  9914. +                    diff = -dx / 2;
  9915. +
  9916. +                    do
  9917. +                    {
  9918. +                        xstep++;
  9919. +
  9920. +                        if(diff > 0)
  9921. +                        {
  9922. +                            ystep++;
  9923. +
  9924. +                            diff = diff + dy - dx;
  9925. +                        }
  9926. +                        else
  9927. +                            diff += dy;
  9928. +
  9929. +                        {
  9930. +                            LONG x1 = x + xstep,y1 = y + ystep;
  9931. +
  9932. +                            if(y1 != last)
  9933. +                                line = &plane[(last = y1) * modulo];
  9934. +
  9935. +                            line[x1 >> 3] &= masks[x1 & 7];
  9936. +                        }
  9937. +                    }
  9938. +                    while(xstep < dx);
  9939. +                }
  9940. +                else
  9941. +                {
  9942. +                    if(dx == dy)
  9943. +                        diff = 0;
  9944. +                    else
  9945. +                        diff =  dy / 2;
  9946. +
  9947. +                    do
  9948. +                    {
  9949. +                        ystep++;
  9950. +
  9951. +                        if(diff > 0)
  9952. +                            diff -= dx;
  9953. +                        else
  9954. +                        {
  9955. +                            xstep++;
  9956. +
  9957. +                            diff = diff + dy - dx;
  9958. +                        }
  9959. +
  9960. +                        {
  9961. +                            LONG x1 = x + xstep,y1 = y + ystep;
  9962. +
  9963. +                            if(y1 != last)
  9964. +                                line = &plane[(last = y1) * modulo];
  9965. +
  9966. +                            line[x1 >> 3] &= masks[x1 & 7];
  9967. +                        }
  9968. +                    }
  9969. +                    while(ystep < dy);
  9970. +                }
  9971. +            }
  9972. +
  9973. +            if(pen)
  9974. +            {
  9975. +                if(y1 != last)
  9976. +                    line = &plane[(last = y1) * modulo];
  9977. +
  9978. +                line[x1 >> 3] |= pen;
  9979. +            }
  9980. +        }
  9981. +    }
  9982. +
  9983. +    return(0);
  9984. +}
  9985. +
  9986. +    /* amiga_open_ilbm(gx_device *dev):
  9987. +     *
  9988. +     *    Open the ilbm device.
  9989. +     */
  9990. +
  9991. +int
  9992. +amiga_open_ilbm(gx_device *dev)
  9993. +{
  9994. +    if(xdev -> width <= 0 || xdev -> height <= 0)
  9995. +    {
  9996. +        if(xdev -> page_width > 0.0)
  9997. +            xdev -> width = (int)(xdev -> x_pixels_per_inch * xdev -> page_width);
  9998. +        else
  9999. +            xdev -> width = 640;
  10000. +
  10001. +        if(xdev -> page_height > 0.0)
  10002. +            xdev -> height = (int)(xdev -> y_pixels_per_inch * xdev -> page_height);
  10003. +        else
  10004. +            xdev -> height = 512;
  10005. +    }
  10006. +
  10007. +    if(xdev -> rport = (struct RastPort *)AllocVec(sizeof(struct RastPort),MEMF_ANY))
  10008. +    {
  10009. +        InitRastPort(xdev -> rport);
  10010. +
  10011. +        if(xdev -> bitmap = (struct BitMap *)AllocVec(sizeof(struct BitMap),MEMF_ANY))
  10012. +        {
  10013. +            InitBitMap(xdev -> bitmap,1,xdev -> width,xdev -> height);
  10014. +
  10015. +            if(xdev -> bitplane = AllocVec(xdev -> bitmap -> Rows * xdev -> bitmap -> BytesPerRow,MEMF_ANY | MEMF_CLEAR))
  10016. +            {
  10017. +                xdev -> bitmap -> Planes[0]    = xdev -> bitplane;
  10018. +                xdev -> rport -> BitMap        = xdev -> bitmap;
  10019. +                xdev -> page_count        = 1;
  10020. +
  10021. +                DarkPen        = 0;
  10022. +                LightPen    = 1;
  10023. +
  10024. +                return(0);
  10025. +            }
  10026. +            else
  10027. +            {
  10028. +                char buffer[256];
  10029. +
  10030. +                sprintf(buffer,"Ghostscript: failed to allocate raster (wanted %ld, largest %ld)",xdev -> bitmap -> Rows * xdev -> bitmap -> BytesPerRow,AvailMem(MEMF_ANY | MEMF_LARGEST));
  10031. +
  10032. +                perror(buffer);
  10033. +            }
  10034. +        }
  10035. +        else
  10036. +            perror("Ghostscript: failed to allocate bitmap");
  10037. +    }
  10038. +    else
  10039. +        perror("Ghostscript: failed to allocate raster port");
  10040. +
  10041. +    return(-1);
  10042. +}
  10043. +
  10044. +    /* amiga_output_page_ilbm(gx_device *dev,int,int):
  10045. +     *
  10046. +     *    Send a bitmap to an IFF-ILBM file.
  10047. +     */
  10048. +
  10049. +int
  10050. +amiga_output_page_ilbm(gx_device *dev,int num_copies,int flush)
  10051. +{
  10052. +    const sigset_t trapped = sigmask(SIGINT);
  10053. +    char buffer[270];
  10054. +    LONG result = -1;
  10055. +
  10056. +    sprintf(buffer,"%s_%04d.ilbm",xdev -> file_name,xdev -> page_count);
  10057. +
  10058. +    fprintf(stdout,"\n\033[ASaving page Nº%d to \"%s\"...\033[K",xdev -> page_count,buffer);
  10059. +    fflush(stdout);
  10060. +
  10061. +    sigprocmask(SIG_BLOCK,&trapped,NULL);
  10062. +
  10063. +    if(SaveBitMap(buffer,xdev -> bitmap,xdev -> width,xdev -> height,(UWORD)xdev -> x_pixels_per_inch,xdev -> y_pixels_per_inch))
  10064. +    {
  10065. +        fprintf(stdout,"\n\033[APage saved to file \"%s\".\033[K\n",buffer);
  10066. +
  10067. +        result = 0;
  10068. +
  10069. +        xdev -> page_count;
  10070. +    }
  10071. +    else
  10072. +        perror("\n\033[AGhostscript: error saving page\033[K");
  10073. +
  10074. +    sigprocmask(SIG_UNBLOCK,&trapped,NULL);
  10075. +
  10076. +    return(result);
  10077. +}
  10078. +
  10079. +    /* amiga_close_ilbm(gx_device *dev):
  10080. +     *
  10081. +     *    Close the ilbm driver.
  10082. +     */
  10083. +
  10084. +int
  10085. +amiga_close_ilbm(gx_device *dev)
  10086. +{
  10087. +    if(xdev -> bitplane)
  10088. +    {
  10089. +        FreeVec(xdev -> bitplane);
  10090. +
  10091. +        xdev -> bitplane = NULL;
  10092. +    }
  10093. +
  10094. +    if(xdev -> bitmap)
  10095. +    {
  10096. +        FreeVec(xdev -> bitmap);
  10097. +
  10098. +        xdev -> bitmap = NULL;
  10099. +    }
  10100. +
  10101. +    if(xdev -> rport)
  10102. +    {
  10103. +        FreeVec(xdev -> rport);
  10104. +
  10105. +        xdev -> rport = NULL;
  10106. +    }
  10107. +
  10108. +    xdev -> width = xdev -> height = 0;
  10109. +/*    xdev -> x_pixels_per_inch = x_pixels_per_inch = 72.72;*/
  10110. +
  10111. +    return(0);
  10112. +}
  10113. +
  10114. +private const gs_prop_item props_amiga[] =
  10115. +{
  10116. +    prop_def("PageWidth",    prt_string),
  10117. +    prop_def("PageHeight",    prt_string),
  10118. +    prop_def("OutputFile",    prt_string)
  10119. +};
  10120. +
  10121. +int
  10122. +amiga_get_props(gx_device *dev,gs_prop_item *plist)
  10123. +{
  10124. +    int start = gx_default_get_props(dev,plist);
  10125. +
  10126. +    if(plist != 0)
  10127. +    {
  10128. +        gs_prop_item *pi = plist + start;
  10129. +
  10130. +        memcpy(pi,props_amiga,sizeof(props_amiga));
  10131. +
  10132. +        pi[0] . value .a.p.s    = "";
  10133. +        pi[0] . value .a.size    = -1;
  10134. +
  10135. +        pi[1] . value .a.p.s    = "";
  10136. +        pi[1] . value .a.size    = -1;
  10137. +
  10138. +        pi[2] . value .a.p.s    = "";
  10139. +        pi[2] . value .a.size    = -1;
  10140. +    }
  10141. +
  10142. +    return(start + (sizeof(props_amiga) / sizeof(gs_prop_item)));
  10143. +}
  10144. +
  10145. +int
  10146. +amiga_put_props(gx_device *dev,gs_prop_item *plist,int count)
  10147. +{
  10148. +    gs_prop_item *known[3];
  10149. +    LONG code = 0;
  10150. +
  10151. +    props_extract(plist,count,props_amiga,3,known,0);
  10152. +
  10153. +    if((code = gx_default_put_props(dev,plist,count)) < 0)
  10154. +        return(code);
  10155. +    else
  10156. +    {
  10157. +        if(known[0] != 0)
  10158. +        {
  10159. +            gs_prop_item *pn = known[0];
  10160. +            LONG size = pn -> value . a . size;
  10161. +            char temp[256];
  10162. +
  10163. +            if(size >= 256)
  10164. +            {
  10165. +                pn -> status = pv_limitcheck;
  10166. +
  10167. +                code = gs_error_limitcheck;
  10168. +            }
  10169. +            else
  10170. +            {
  10171. +                memcpy(temp,pn -> value . a . p . s,size);
  10172. +
  10173. +                temp[size] = 0;
  10174. +
  10175. +                xdev -> page_width = GetInches(temp);
  10176. +
  10177. +                if(xdev -> page_width <= 0.0)
  10178. +                {
  10179. +                    xdev -> page_width = 0.0;
  10180. +
  10181. +                    pn -> status = pv_limitcheck;
  10182. +
  10183. +                    code = gs_error_limitcheck;
  10184. +                }
  10185. +                else
  10186. +                {
  10187. +                    if(code == 0)
  10188. +                        code = 1;
  10189. +                }
  10190. +            }
  10191. +        }
  10192. +
  10193. +        if(known[1] != 0)
  10194. +        {
  10195. +            gs_prop_item *pn = known[1];
  10196. +            LONG size = pn -> value . a . size;
  10197. +            char temp[256];
  10198. +
  10199. +            if(size >= 256)
  10200. +            {
  10201. +                pn -> status = pv_limitcheck;
  10202. +
  10203. +                code = gs_error_limitcheck;
  10204. +            }
  10205. +            else
  10206. +            {
  10207. +                memcpy(temp,pn -> value . a . p . s,size);
  10208. +
  10209. +                temp[size] = 0;
  10210. +
  10211. +                xdev -> page_height = GetInches(temp);
  10212. +
  10213. +                if(xdev -> page_height <= 0.0)
  10214. +                {
  10215. +                    xdev -> page_height = 0.0;
  10216. +
  10217. +                    pn -> status = pv_limitcheck;
  10218. +
  10219. +                    code = gs_error_limitcheck;
  10220. +                }
  10221. +                else
  10222. +                {
  10223. +                    if(code == 0)
  10224. +                        code = 1;
  10225. +                }
  10226. +            }
  10227. +        }
  10228. +
  10229. +        if(known[2] != 0)
  10230. +        {
  10231. +            gs_prop_item *pn = known[2];
  10232. +            LONG size = pn -> value . a . size;
  10233. +
  10234. +            if(size >= 256)
  10235. +            {
  10236. +                pn -> status = pv_limitcheck;
  10237. +
  10238. +                code = gs_error_limitcheck;
  10239. +            }
  10240. +            else
  10241. +            {
  10242. +                memcpy(xdev -> file_name,pn -> value . a . p . s,size);
  10243. +
  10244. +                xdev -> file_name[size] = 0;
  10245. +            }
  10246. +        }
  10247. +
  10248. +        if(code < 0)
  10249. +            return_error(code);
  10250. +
  10251. +        if(xdev -> is_open && code)
  10252. +        {
  10253. +            LONG ccode = gs_closedevice(dev);
  10254. +
  10255. +            if(ccode < 0)
  10256. +                return(ccode);
  10257. +        }
  10258. +
  10259. +        return(code);
  10260. +    }
  10261. +}
  10262. +
  10263. +    /* amiga_color_map_rgb_color(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue):
  10264. +     *
  10265. +     *    Turn an RGB colour into a pen index.
  10266. +     */
  10267. +
  10268. +gx_color_index
  10269. +amiga_color_map_rgb_color(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue)
  10270. +{
  10271. +    LONG max = xdev -> cube_size - 1,r,g,b;
  10272. +
  10273. +    r = (max * red)   / gx_max_color_value;
  10274. +    g = (max * green) / gx_max_color_value;
  10275. +    b = (max * blue)  / gx_max_color_value;
  10276. +
  10277. +    return((r * xdev -> cube_size + g) * xdev -> cube_size + b);
  10278. +}
  10279. +
  10280. +    /* amiga_color_map_color_rgb(gx_device *dev,gx_color_index color,gx_color_value rgb[3]):
  10281. +     *
  10282. +     *    Turn a pen index into RGB colour values.
  10283. +     */
  10284. +
  10285. +int
  10286. +amiga_color_map_color_rgb(gx_device *dev,gx_color_index color,gx_color_value rgb[3])
  10287. +{
  10288. +    LONG i,value,max = xdev -> cube_size - 1;
  10289. +
  10290. +    for(i = 2 ; i >= 0 ; i--)
  10291. +    {
  10292. +        value = color % xdev -> cube_size;
  10293. +
  10294. +        rgb[i] = (gx_max_color_value * value) / max;
  10295. +
  10296. +        color /= xdev -> cube_size;
  10297. +    }
  10298. +
  10299. +    return(0);
  10300. +}
  10301. +
  10302. +    /* amiga_color_map_rgb_color_pen(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue):
  10303. +     *
  10304. +     *    Turn an RGB colour into a pen index; this routine takes remapped
  10305. +     *    pens into account.
  10306. +     */
  10307. +
  10308. +gx_color_index
  10309. +amiga_color_map_rgb_color_pen(gx_device *dev,gx_color_value red,gx_color_value green,gx_color_value blue)
  10310. +{
  10311. +    LONG max = xdev -> cube_size - 1,r,g,b;
  10312. +
  10313. +    r = (max * red)   / gx_max_color_value;
  10314. +    g = (max * green) / gx_max_color_value;
  10315. +    b = (max * blue)  / gx_max_color_value;
  10316. +
  10317. +    return(xdev -> pens[(r * xdev -> cube_size + g) * xdev -> cube_size + b]);
  10318. +}
  10319. +
  10320. +    /* amiga_color_map_color_rgb_pen(gx_device *dev,gx_color_index color,gx_color_value rgb[3]):
  10321. +     *
  10322. +     *    Turn a pen index into RGB colour values; this routine takes remapped
  10323. +     *    pens into account.
  10324. +     */
  10325. +
  10326. +int
  10327. +amiga_color_map_color_rgb_pen(gx_device *dev,gx_color_index color,gx_color_value rgb[3])
  10328. +{
  10329. +    LONG i,value,max = xdev -> cube_size - 1;
  10330. +
  10331. +        /* Find the matching pen... */
  10332. +
  10333. +    for(i = 0 ; i < xdev -> cube_size * xdev -> cube_size * xdev -> cube_size ; i++)
  10334. +    {
  10335. +        if(xdev -> pens[i] == color)
  10336. +        {
  10337. +            color = i;
  10338. +
  10339. +            break;
  10340. +        }
  10341. +    }
  10342. +
  10343. +    for(i = 2 ; i >= 0 ; i--)
  10344. +    {
  10345. +        value = color % xdev -> cube_size;
  10346. +
  10347. +        rgb[i] = (gx_max_color_value * value) / max;
  10348. +
  10349. +        color /= xdev -> cube_size;
  10350. +    }
  10351. +
  10352. +    return(0);
  10353. +}
  10354. +
  10355. +    /* amiga_copy_color8():
  10356. +     *
  10357. +     *    Copy a color image, the source is guaranteed to consist of
  10358. +     *    one byte per colour.
  10359. +     */
  10360. +
  10361. +int
  10362. +amiga_copy_color8(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h)
  10363. +{
  10364. +    if(y < 0 || x < 0 || w < 0 || h < 0)
  10365. +        return(-1);
  10366. +    else
  10367. +    {
  10368. +        if(w > 0 && h > 0)
  10369. +        {
  10370. +            base += sourcex;
  10371. +
  10372. +            if(w > xdev -> width)
  10373. +                w = xdev -> width;
  10374. +
  10375. +            do
  10376. +            {
  10377. +                
  10378. +                CopyMem((UBYTE *)base,xdev -> temp_array,w);
  10379. +
  10380. +                WritePixelLine8(xdev -> rport,x,y++,w,xdev -> temp_array,xdev -> temp_rport);
  10381. +
  10382. +                base += raster;
  10383. +            }
  10384. +            while(--h);
  10385. +        }
  10386. +
  10387. +        return(0);
  10388. +    }
  10389. +}
  10390. +
  10391. +    /* amiga_copy_mono_raw_color():
  10392. +     *
  10393. +     *    Copy a monochrome image to a bitmap.
  10394. +     */
  10395. +
  10396. +int
  10397. +amiga_copy_mono_raw_color(gx_device *dev,const UBYTE *base,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h,gx_color_index zero,gx_color_index one)
  10398. +{
  10399. +    if(y < 0 || x < 0 || w < 0 || h < 0)
  10400. +        return(-1);
  10401. +    else
  10402. +    {
  10403. +        if(w > 0 && h > 0 && zero != gx_no_color_index && one != gx_no_color_index)
  10404. +        {
  10405. +            PLANEPTR line[12];
  10406. +            LONG i,j,k,modulo = xdev -> rport -> BitMap -> BytesPerRow,depth = xdev -> rport -> BitMap -> Depth;
  10407. +
  10408. +            for(i = 0 ; i < depth ; i++)
  10409. +                line[i] = xdev -> rport -> BitMap -> Planes[i] + y * modulo;
  10410. +
  10411. +            w += sourcex;
  10412. +
  10413. +            if(zero == gx_no_color_index)
  10414. +            {
  10415. +                do
  10416. +                {
  10417. +                    for(i = sourcex, j = x ; i < w ; i++, j++)
  10418. +                    {
  10419. +                        if(base[i >> 3] & shift[i & 7])
  10420. +                        {
  10421. +                            for(k = 0 ; k < depth ; k++)
  10422. +                            {
  10423. +                                if(one & (1 << k))
  10424. +                                    line[k][j >> 3] |= shift[j & 7];
  10425. +                                else
  10426. +                                    line[k][j >> 3] &= masks[j & 7];
  10427. +                            }
  10428. +                        }
  10429. +                    }
  10430. +
  10431. +                    base += raster;
  10432. +
  10433. +                    for(k = 0 ; k < depth ; k++)
  10434. +                        line[k] += modulo;
  10435. +                }
  10436. +                while(--h);
  10437. +            }
  10438. +            else
  10439. +            {
  10440. +                if(one == gx_no_color_index)
  10441. +                {
  10442. +                    do
  10443. +                    {
  10444. +                        for(i = sourcex, j = x ; i < w ; i++, j++)
  10445. +                        {
  10446. +                            if(base[i >> 3] & shift[i & 7])
  10447. +                            {
  10448. +                                for(k = 0 ; k < depth ; k++)
  10449. +                                {
  10450. +                                    if(zero & (1 << k))
  10451. +                                        line[k][j >> 3] |= shift[j & 7];
  10452. +                                    else
  10453. +                                        line[k][j >> 3] &= masks[j & 7];
  10454. +                                }
  10455. +                            }
  10456. +                        }
  10457. +
  10458. +                        base += raster;
  10459. +
  10460. +                        for(k = 0 ; k < depth ; k++)
  10461. +                            line[k] += modulo;
  10462. +                    }
  10463. +                    while(--h);
  10464. +                }
  10465. +                else
  10466. +                {
  10467. +                    do
  10468. +                    {
  10469. +                        for(i = sourcex, j = x ; i < w ; i++, j++)
  10470. +                        {
  10471. +                            if(base[i >> 3] & shift[i & 7])
  10472. +                            {
  10473. +                                for(k = 0 ; k < depth ; k++)
  10474. +                                {
  10475. +                                    if(one & (1 << k))
  10476. +                                        line[k][j >> 3] |= shift[j & 7];
  10477. +                                    else
  10478. +                                        line[k][j >> 3] &= masks[j & 7];
  10479. +                                }
  10480. +                            }
  10481. +                            else
  10482. +                            {
  10483. +                                for(k = 0 ; k < depth ; k++)
  10484. +                                {
  10485. +                                    if(zero & (1 << k))
  10486. +                                        line[k][j >> 3] |= shift[j & 7];
  10487. +                                    else
  10488. +                                        line[k][j >> 3] &= masks[j & 7];
  10489. +                                }
  10490. +                            }
  10491. +                        }
  10492. +
  10493. +                        base += raster;
  10494. +
  10495. +                        for(k = 0 ; k < depth ; k++)
  10496. +                            line[k] += modulo;
  10497. +                    }
  10498. +                    while(--h);
  10499. +                }
  10500. +            }
  10501. +        }
  10502. +
  10503. +        return(0);
  10504. +    }
  10505. +}
  10506. +
  10507. +    /* amiga_copy_color_raw_color16():
  10508. +     *
  10509. +     *    Copy a color image, the source data is guaranteed to consist
  10510. +     *    of one word per colour.
  10511. +     */
  10512. +
  10513. +int
  10514. +amiga_copy_color_raw_color16(gx_device *dev,const UBYTE *data,int sourcex,int raster,gx_bitmap_id id,int x,int y,int w,int h)
  10515. +{
  10516. +    if(y < 0 || x < 0 || w < 0 || h < 0)
  10517. +        return(-1);
  10518. +    else
  10519. +    {
  10520. +        if(w > 0 && h > 0)
  10521. +        {
  10522. +            PLANEPTR line[12];
  10523. +            LONG i,j,k,modulo = xdev -> rport -> BitMap -> BytesPerRow,depth = xdev -> rport -> BitMap -> Depth;
  10524. +            UWORD *base = (UWORD *)data;
  10525. +
  10526. +            for(i = 0 ; i < depth ; i++)
  10527. +                line[i] = xdev -> rport -> BitMap -> Planes[i] + y * modulo;
  10528. +
  10529. +            w += sourcex;
  10530. +
  10531. +            raster /= 2;
  10532. +
  10533. +            do
  10534. +            {
  10535. +                for(i = sourcex, j = x ; i < w ; i++, j++)
  10536. +                {
  10537. +                    for(k = 0 ; k < depth ; k++)
  10538. +                    {
  10539. +                        if(base[i] & (1 << k))
  10540. +                            line[k][j >> 3] |= shift[j & 7];
  10541. +                        else
  10542. +                            line[k][j >> 3] &= masks[j & 7];
  10543. +                    }
  10544. +                }
  10545. +
  10546. +                base += raster;
  10547. +
  10548. +                for(k = 0 ; k < depth ; k++)
  10549. +                    line[k] += modulo;
  10550. +            }
  10551. +            while(--h);
  10552. +        }
  10553. +
  10554. +        return(0);
  10555. +    }
  10556. +}
  10557. +
  10558. +    /* amiga_fill_rectangle_raw_color():
  10559. +     *
  10560. +     *    Fill a rectangular area in a bitmap.
  10561. +     */
  10562. +
  10563. +int
  10564. +amiga_fill_rectangle_raw_color(gx_device *dev,int x,int y,int w,int h,gx_color_index color)
  10565. +{
  10566. +    if(x < 0 || x > xdev -> width - w || y < 0 || y > xdev -> height - h)
  10567. +        return(-1);
  10568. +    else
  10569. +    {
  10570. +        if(w > 0 && h > 0 && color != gx_no_color_index)
  10571. +        {
  10572. +            PLANEPTR line[12];
  10573. +            LONG i,j,right,mid,modulo = xdev -> rport -> BitMap -> BytesPerRow,depth = xdev -> rport -> BitMap -> Depth;
  10574. +
  10575. +            for(i = 0 ; i < depth ; i++)
  10576. +                line[i] = xdev -> rport -> BitMap -> Planes[i] + y * modulo + (x >> 3);
  10577. +
  10578. +            right    = x + w;
  10579. +            mid    = (right >> 3) - (x >> 3);
  10580. +
  10581. +            x    &= 7;
  10582. +            right    &= 7;
  10583. +
  10584. +            if(mid)
  10585. +            {
  10586. +                UBYTE *ptr;
  10587. +
  10588. +                do
  10589. +                {
  10590. +                    for(j = 0 ; j < depth ; j++)
  10591. +                    {
  10592. +                        ptr = line[j];
  10593. +
  10594. +                        i = mid;
  10595. +
  10596. +                        if(color & (1 << j))
  10597. +                        {
  10598. +                            *ptr++ |= 0xFF >> x;
  10599. +
  10600. +                            while(--i > 0)
  10601. +                                *ptr++ = 0xFF;
  10602. +
  10603. +                            *ptr |= ~(0xFF >> right);
  10604. +                        }
  10605. +                        else
  10606. +                        {
  10607. +                            *ptr++ &= ~(0xFF >> x);
  10608. +
  10609. +                            while(--i > 0)
  10610. +                                *ptr++ = 0x00;
  10611. +
  10612. +                            *ptr &= 0xFF >> right;
  10613. +                        }
  10614. +
  10615. +                        line[j] += modulo;
  10616. +                    }
  10617. +                }
  10618. +                while(--h);
  10619. +            }
  10620. +            else
  10621. +            {
  10622. +                UBYTE    one_mask    = (0xFF >> x) & ~(0xFF >> right),
  10623. +                    zero_mask    = ~(0xFF >> x) | (0xFF >> right);
  10624. +                do
  10625. +                {
  10626. +                    for(j = 0 ; j < depth ; j++)
  10627. +                    {
  10628. +                        if(color & (1 << j))
  10629. +                            *line[j] |= one_mask;
  10630. +                        else
  10631. +                            *line[j] &= zero_mask;
  10632. +
  10633. +                        line[j] += modulo;
  10634. +                    }
  10635. +                }
  10636. +                while(--h);
  10637. +            }
  10638. +        }
  10639. +
  10640. +        return(0);
  10641. +    }
  10642. +}
  10643. +
  10644. +    /* amiga_draw_line_raw_color():
  10645. +     *
  10646. +     *    Draw a hair line, your basic DDA algorithm;
  10647. +     *    keep your fingers crossed.
  10648. +     */
  10649. +
  10650. +int
  10651. +amiga_draw_line_raw_color(gx_device *dev,int x,int y,int x1,int y1,gx_color_index color)
  10652. +{
  10653. +    if(color != gx_no_color_index && (x != x1 || y != y1))
  10654. +    {
  10655. +        LONG xstep,ystep,dx,dy,diff,modulo;
  10656. +        UBYTE *line,*plane,pen;
  10657. +        LONG last,i,orig_x = x,orig_y = y;
  10658. +
  10659. +        modulo = xdev -> rport -> BitMap -> BytesPerRow;
  10660. +
  10661. +        for(i = 0 ; i < xdev -> rport -> BitMap -> Depth ; i++)
  10662. +        {
  10663. +            plane    = xdev -> rport -> BitMap -> Planes[i];
  10664. +            line    = &plane[y1 * modulo];
  10665. +            last    = y1;
  10666. +            pen    = line[x1 >> 3] & (x1 & 7);
  10667. +            x    = orig_x;
  10668. +            y    = orig_y;
  10669. +
  10670. +            dx = x1 - x;
  10671. +            dy = y1 - y;
  10672. +
  10673. +            if(dx < 0)
  10674. +            {
  10675. +                dx = -dx;
  10676. +                dy = -dy;
  10677. +
  10678. +                x = x1;
  10679. +                y = y1;
  10680. +            }
  10681. +
  10682. +            if(y != last)
  10683. +                line = &plane[(last = y) * modulo];
  10684. +
  10685. +            if(color & (1 << i))
  10686. +            {
  10687. +                line[x >> 3] |= shift[x & 7];
  10688. +
  10689. +                xstep = ystep = 0;
  10690. +
  10691. +                if(dy < 0)
  10692. +                {
  10693. +                    if(dx > -dy)
  10694. +                    {
  10695. +                        diff = -dx / 2;
  10696. +
  10697. +                        do
  10698. +                        {
  10699. +                            xstep++;
  10700. +
  10701. +                            if(diff > 0)
  10702. +                            {
  10703. +                                ystep--;
  10704. +
  10705. +                                diff = diff - dy - dx;
  10706. +                            }
  10707. +                            else
  10708. +                                diff -= dy;
  10709. +
  10710. +                            {
  10711. +                                LONG x1 = x + xstep,y1 = y + ystep;
  10712. +
  10713. +                                if(y1 != last)
  10714. +                                    line = &plane[(last = y1) * modulo];
  10715. +
  10716. +                                line[x1 >> 3] |= shift[x1 & 7];
  10717. +                            }
  10718. +                        }
  10719. +                        while(xstep < dx);
  10720. +                    }
  10721. +                    else
  10722. +                    {
  10723. +                        if(dx == -dy)
  10724. +                            diff = 0;
  10725. +                        else
  10726. +                            diff = -dy / 2;
  10727. +
  10728. +                        do
  10729. +                        {
  10730. +                            ystep--;
  10731. +
  10732. +                            if(diff > 0)
  10733. +                                diff -= dx;
  10734. +                            else
  10735. +                            {
  10736. +                                xstep++;
  10737. +
  10738. +                                diff = diff - dy - dx;
  10739. +                            }
  10740. +
  10741. +                            {
  10742. +                                LONG x1 = x + xstep,y1 = y + ystep;
  10743. +
  10744. +                                if(y1 != last)
  10745. +                                    line = &plane[(last = y1) * modulo];
  10746. +
  10747. +                                line[x1 >> 3] |= shift[x1 & 7];
  10748. +                            }
  10749. +                        }
  10750. +                        while(ystep > dy);
  10751. +                    }
  10752. +                }
  10753. +                else
  10754. +                {
  10755. +                    if(dx > dy)
  10756. +                    {
  10757. +                        diff = -dx / 2;
  10758. +
  10759. +                        do
  10760. +                        {
  10761. +                            xstep++;
  10762. +
  10763. +                            if(diff > 0)
  10764. +                            {
  10765. +                                ystep++;
  10766. +
  10767. +                                diff = diff + dy - dx;
  10768. +                            }
  10769. +                            else
  10770. +                                diff += dy;
  10771. +
  10772. +                            {
  10773. +                                LONG x1 = x + xstep,y1 = y + ystep;
  10774. +
  10775. +                                if(y1 != last)
  10776. +                                    line = &plane[(last = y1) * modulo];
  10777. +
  10778. +                                line[x1 >> 3] |= shift[x1 & 7];
  10779. +                            }
  10780. +                        }
  10781. +                        while(xstep < dx);
  10782. +                    }
  10783. +                    else
  10784. +                    {
  10785. +                        if(dx == dy)
  10786. +                            diff = 0;
  10787. +                        else
  10788. +                            diff = dy / 2;
  10789. +
  10790. +                        do
  10791. +                        {
  10792. +                            ystep++;
  10793. +
  10794. +                            if(diff > 0)
  10795. +                                diff -= dx;
  10796. +                            else
  10797. +                            {
  10798. +                                xstep++;
  10799. +
  10800. +                                diff = diff + dy - dx;
  10801. +                            }
  10802. +
  10803. +                            {
  10804. +                                LONG x1 = x + xstep,y1 = y + ystep;
  10805. +
  10806. +                                if(y1 != last)
  10807. +                                    line = &plane[(last = y1) * modulo];
  10808. +
  10809. +                                line[x1 >> 3] |= shift[x1 & 7];
  10810. +                            }
  10811. +                        }
  10812. +                        while(ystep < dy);
  10813. +                    }
  10814. +                }
  10815. +
  10816. +                if(!pen)
  10817. +                {
  10818. +                    if(y1 != last)
  10819. +                        line = &plane[(last = y1) * modulo];
  10820. +
  10821. +                    line[x1 >> 3] &= masks[x1 & 7];
  10822. +                }
  10823. +            }
  10824. +            else
  10825. +            {
  10826. +                line[x >> 3] &= masks[x & 7];
  10827. +
  10828. +                xstep = ystep = 0;
  10829. +
  10830. +                if(dy < 0)
  10831. +                {
  10832. +                    if(dx > -dy)
  10833. +                    {
  10834. +                        diff = -dx / 2;
  10835. +
  10836. +                        do
  10837. +                        {
  10838. +                            xstep++;
  10839. +
  10840. +                            if(diff > 0)
  10841. +                            {
  10842. +                                ystep--;
  10843. +
  10844. +                                diff = diff - dy - dx;
  10845. +                            }
  10846. +                            else
  10847. +                                diff -= dy;
  10848. +
  10849. +                            {
  10850. +                                LONG x1 = x + xstep,y1 = y + ystep;
  10851. +
  10852. +                                if(y1 != last)
  10853. +                                    line = &plane[(last = y1) * modulo];
  10854. +
  10855. +                                line[x1 >> 3] &= masks[x1 & 7];
  10856. +                            }
  10857. +                        }
  10858. +                        while(xstep < dx);
  10859. +                    }
  10860. +                    else
  10861. +                    {
  10862. +                        if(dx == -dy)
  10863. +                            diff = 0;
  10864. +                        else
  10865. +                            diff = -dy / 2;
  10866. +
  10867. +                        do
  10868. +                        {
  10869. +                            ystep--;
  10870. +
  10871. +                            if(diff > 0)
  10872. +                                diff -= dx;
  10873. +                            else
  10874. +                            {
  10875. +                                xstep++;
  10876. +
  10877. +                                diff = diff - dy - dx;
  10878. +                            }
  10879. +
  10880. +                            {
  10881. +                                LONG x1 = x + xstep,y1 = y + ystep;
  10882. +
  10883. +                                if(y1 != last)
  10884. +                                    line = &plane[(last = y1) * modulo];
  10885. +
  10886. +                                line[x1 >> 3] &= masks[x1 & 7];
  10887. +                            }
  10888. +                        }
  10889. +                        while(ystep > dy);
  10890. +                    }
  10891. +                }
  10892. +                else
  10893. +                {
  10894. +                    if(dx > dy)
  10895. +                    {
  10896. +                        diff = -dx / 2;
  10897. +
  10898. +                        do
  10899. +                        {
  10900. +                            xstep++;
  10901. +
  10902. +                            if(diff > 0)
  10903. +                            {
  10904. +                                ystep++;
  10905. +
  10906. +                                diff = diff + dy - dx;
  10907. +                            }
  10908. +                            else
  10909. +                                diff += dy;
  10910. +
  10911. +                            {
  10912. +                                LONG x1 = x + xstep,y1 = y + ystep;
  10913. +
  10914. +                                if(y1 != last)
  10915. +                                    line = &plane[(last = y1) * modulo];
  10916. +
  10917. +                                line[x1 >> 3] &= masks[x1 & 7];
  10918. +                            }
  10919. +                        }
  10920. +                        while(xstep < dx);
  10921. +                    }
  10922. +                    else
  10923. +                    {
  10924. +                        if(dx == dy)
  10925. +                            diff = 0;
  10926. +                        else
  10927. +                            diff =  dy / 2;
  10928. +
  10929. +                        do
  10930. +                        {
  10931. +                            ystep++;
  10932. +
  10933. +                            if(diff > 0)
  10934. +                                diff -= dx;
  10935. +                            else
  10936. +                            {
  10937. +                                xstep++;
  10938. +
  10939. +                                diff = diff + dy - dx;
  10940. +                            }
  10941. +
  10942. +                            {
  10943. +                                LONG x1 = x + xstep,y1 = y + ystep;
  10944. +
  10945. +                                if(y1 != last)
  10946. +                                    line = &plane[(last = y1) * modulo];
  10947. +
  10948. +                                line[x1 >> 3] &= masks[x1 & 7];
  10949. +                            }
  10950. +                        }
  10951. +                        while(ystep < dy);
  10952. +                    }
  10953. +                }
  10954. +
  10955. +                if(pen)
  10956. +                {
  10957. +                    if(y1 != last)
  10958. +                        line = &plane[(last = y1) * modulo];
  10959. +
  10960. +                    line[x1 >> 3] |= pen;
  10961. +                }
  10962. +            }
  10963. +        }
  10964. +    }
  10965. +
  10966. +    return(0);
  10967. +}
  10968. diff -rup --new-file baseline/fsf/ghostscript/gp_amiga.c amiga/fsf/ghostscript/gp_amiga.c
  10969. --- baseline/fsf/ghostscript/gp_amiga.c    Wed Dec 31 17:00:00 1969
  10970. +++ amiga/fsf/ghostscript/gp_amiga.c    Sat Sep 28 00:00:00 1996
  10971. @@ -0,0 +1,344 @@
  10972. +/* Copyright (C) 1989, 1990, 1991 Aladdin Enterprises.  All rights reserved.
  10973. +   Distributed by Free Software Foundation, Inc.
  10974. +
  10975. +This file is part of Ghostscript.
  10976. +
  10977. +Ghostscript is distributed in the hope that it will be useful, but
  10978. +WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  10979. +to anyone for the consequences of using it or for whether it serves any
  10980. +particular purpose or works at all, unless he says so in writing.  Refer
  10981. +to the Ghostscript General Public License for full details.
  10982. +
  10983. +Everyone is granted permission to copy, modify and redistribute
  10984. +Ghostscript, but only under the conditions described in the Ghostscript
  10985. +General Public License.  A copy of this license is supposed to have been
  10986. +given to you along with Ghostscript so you can know your rights and
  10987. +responsibilities.  It should be in a file named COPYING.  Among other
  10988. +things, the copyright notice and this notice must be preserved on all
  10989. +copies.  */
  10990. +
  10991. +/* gp_amiga.c */
  10992. +/* Amiga specific routines for Ghostscript */
  10993. +
  10994. +#define ushort foo2    /* Hide conflicting typedef */
  10995. +
  10996. +#include <intuition/intuitionbase.h>
  10997. +#include <graphics/gfxbase.h>
  10998. +#include <dos/dosextens.h>
  10999. +
  11000. +#include <clib/exec_protos.h>
  11001. +#include <clib/dos_protos.h>
  11002. +
  11003. +/*
  11004. +#include <inline/exec.h>
  11005. +#include <inline/dos.h>
  11006. +*/
  11007. +
  11008. +#include <signal.h>
  11009. +
  11010. +#undef ushort
  11011. +
  11012. +/* gp_amiga.c */
  11013. +/* Amiga-specific routines for Ghostscript */
  11014. +
  11015. +
  11016. +#include "memory_.h"
  11017. +#include "string_.h"
  11018. +#include "gx.h"
  11019. +#include "gp.h"
  11020. +#include "stat_.h"
  11021. +#include "time_.h"
  11022. +
  11023. +struct IntuitionBase    *IntuitionBase;
  11024. +struct GfxBase        *GfxBase;
  11025. +struct Library        *LayersBase,
  11026. +            *IFFParseBase,
  11027. +            *AslBase,
  11028. +            *UtilityBase;
  11029. +
  11030. +/* Nothing happens here */
  11031. +void
  11032. +gs_amiga_init()
  11033. +{
  11034. +}
  11035. +
  11036. +void
  11037. +gp_exit(int exit_status, int code)
  11038. +{
  11039. +}
  11040. +
  11041. +/* Cleanup routine, as called by atexit() trap */
  11042. +void
  11043. +cleanup()
  11044. +{
  11045. +    extern void devcleanup();
  11046. +
  11047. +    devcleanup();
  11048. +
  11049. +    if(IFFParseBase)
  11050. +    {
  11051. +        CloseLibrary(IFFParseBase);
  11052. +
  11053. +        IFFParseBase = NULL;
  11054. +    }
  11055. +
  11056. +    if(AslBase)
  11057. +    {
  11058. +        CloseLibrary(AslBase);
  11059. +
  11060. +        AslBase = NULL;
  11061. +    }
  11062. +
  11063. +    if(UtilityBase)
  11064. +    {
  11065. +        CloseLibrary(UtilityBase);
  11066. +
  11067. +        UtilityBase = NULL;
  11068. +    }
  11069. +
  11070. +    if(LayersBase)
  11071. +    {
  11072. +        CloseLibrary(LayersBase);
  11073. +
  11074. +        LayersBase = NULL;
  11075. +    }
  11076. +
  11077. +    if(GfxBase)
  11078. +    {
  11079. +        CloseLibrary((struct Library *)GfxBase);
  11080. +
  11081. +        GfxBase = NULL;
  11082. +    }
  11083. +
  11084. +    if(IntuitionBase)
  11085. +    {
  11086. +        CloseLibrary((struct Library *)IntuitionBase);
  11087. +
  11088. +        IntuitionBase = NULL;
  11089. +    }
  11090. +}
  11091. +
  11092. +void
  11093. +signal_handler(int signal)
  11094. +{
  11095. +    fprintf(stderr,"*** BREAK: Ghostscript\a\n");
  11096. +
  11097. +    exit(1);
  11098. +}
  11099. +
  11100. +/* Do platform-dependent initialization */
  11101. +void
  11102. +gp_init()
  11103. +{
  11104. +    atexit(cleanup);
  11105. +
  11106. +    signal(SIGINT,signal_handler);
  11107. +
  11108. +    if(!(IntuitionBase = (struct IntuitionBase *)OpenLibrary("intuition.library",37)))
  11109. +    {
  11110. +        perror("Ghostscript: cannot open intuition.library v37");
  11111. +
  11112. +        exit(20);
  11113. +    }
  11114. +
  11115. +    if(!(GfxBase = (struct GfxBase *)OpenLibrary("graphics.library",37)))
  11116. +    {
  11117. +        perror("Ghostscript: cannot open graphics.library v37");
  11118. +
  11119. +        exit(20);
  11120. +    }
  11121. +
  11122. +    if(!(LayersBase = OpenLibrary("layers.library",37)))
  11123. +    {
  11124. +        perror("Ghostscript: cannot open layers.library v37");
  11125. +
  11126. +        exit(20);
  11127. +    }
  11128. +
  11129. +    if(!(UtilityBase = OpenLibrary("utility.library",37)))
  11130. +    {
  11131. +        perror("Ghostscript: cannot open utility.library v37");
  11132. +
  11133. +        exit(20);
  11134. +    }
  11135. +
  11136. +    if(!(IFFParseBase = OpenLibrary("iffparse.library",37)))
  11137. +    {
  11138. +        perror("Ghostscript: cannot open iffparse.library v37");
  11139. +
  11140. +        exit(20);
  11141. +    }
  11142. +
  11143. +    AslBase = OpenLibrary("asl.library",38);
  11144. +}
  11145. +
  11146. +/* Read the current date (in days since Jan. 1, 1980) */
  11147. +/* and time (in milliseconds since midnight). */
  11148. +void
  11149. +gp_get_clock(long *pdt)
  11150. +{
  11151. +    struct DateStamp Date;
  11152. +
  11153. +    DateStamp(&Date);
  11154. +
  11155. +    pdt[0] = Date . ds_Days + 2 * 365;
  11156. +    pdt[1] = (Date . ds_Minute * 60 + Date . ds_Tick / TICKS_PER_SECOND) * 1000;
  11157. +}
  11158. +
  11159. +/* ------ Printer accessing ------ */
  11160. +
  11161. +/* Open a connection to a printer.  A null file name means use the */
  11162. +/* standard printer connected to the machine, if any. */
  11163. +/* "|command" opens an output pipe. */
  11164. +/* Return NULL if the connection could not be opened. */
  11165. +FILE *
  11166. +gp_open_printer(char *fname, int binary_mode)
  11167. +{    return
  11168. +      (strlen(fname) == 0 ?
  11169. +       gp_open_scratch_file(gp_scratch_file_name_prefix, fname, "w") :
  11170. +       fname[0] == '|' ?
  11171. +       popen(fname + 1, "w") :
  11172. +       fopen(fname, "w"));
  11173. +}
  11174. +
  11175. +/* Close the connection to the printer. */
  11176. +void
  11177. +gp_close_printer(FILE *pfile, const char *fname)
  11178. +{    if ( fname[0] == '|' )
  11179. +        pclose(pfile);
  11180. +    else
  11181. +        fclose(pfile);
  11182. +}
  11183. +
  11184. +/* ------ File name syntax ------ */
  11185. +
  11186. +/* Define the character used for separating file names in a list. */
  11187. +const char gp_file_name_list_separator = ',';
  11188. +
  11189. +/* Define the default scratch file name template. */
  11190. +const char gp_scratch_file_name_prefix[] = "T:gs_";
  11191. +
  11192. +/* Define the string to be concatenated with the file mode */
  11193. +/* for opening files without end-of-line conversion. */
  11194. +const char gp_fmode_binary_suffix[] = "b";
  11195. +/* Define the file modes for binary reading or writing. */
  11196. +const char gp_fmode_rb[] = "r";
  11197. +const char gp_fmode_wb[] = "w";
  11198. +
  11199. +/* Create and open a scratch file with a given name prefix. */
  11200. +/* Write the actual file name at fname. */
  11201. +FILE *
  11202. +gp_open_scratch_file(const char *prefix, char *fname, const char *mode)
  11203. +{
  11204. +    strcpy(fname,prefix);
  11205. +    /* Prevent trailing X's in path from being converted by mktemp. */
  11206. +    if ( *fname != 0 && fname[strlen(fname) - 1] == 'X' )
  11207. +        strcat(fname, "-");
  11208. +    strcat(fname, "XXXXXX");
  11209. +    mktemp(fname);
  11210. +    return fopen(fname, mode);
  11211. +}
  11212. +
  11213. +/* Answer whether a file name contains a directory/device specification, */
  11214. +/* i.e. is absolute (not directory- or device-relative). */
  11215. +int
  11216. +gp_file_name_is_absolute(const char *fname, uint len)
  11217. +{
  11218. +    int i;
  11219. +
  11220. +    for(i = 0 ; i < len ; i++)
  11221. +    {
  11222. +        if(fname[i] == ':')
  11223. +            return(1);
  11224. +    }
  11225. +
  11226. +    return(0);
  11227. +}
  11228. +
  11229. +/* Answer the string to be used for combining a directory/device prefix */
  11230. +/* with a base file name.  The file name is known to not be absolute. */
  11231. +const char *
  11232. +gp_file_name_concat_string(const char *prefix, uint plen, const char *fname, uint len)
  11233. +{
  11234. +    if(plen > 0 && (prefix[plen - 1] == '/' || prefix[plen - 1] == ':'))
  11235. +        return("");
  11236. +    else
  11237. +        return("/");
  11238. +}
  11239. +
  11240. +/* ------ File operations ------ */
  11241. +
  11242. +/* If the file given by fname exists, fill in its status and return 1; */
  11243. +/* otherwise return 0. */
  11244. +int
  11245. +gp_file_status(const char *fname, file_status *pstatus)
  11246. +{    struct stat sbuf;
  11247. +    /* The RS/6000 prototype for stat doesn't include const, */
  11248. +    /* so we have to explicitly remove the const modifier. */
  11249. +    if ( stat((char *)fname, &sbuf) < 0 ) return 0;
  11250. +    pstatus->size_pages = stat_blocks(&sbuf);    /* st_blocks is */
  11251. +                    /* missing on some systems, */
  11252. +                    /* see stat_.h */
  11253. +    pstatus->size_bytes = sbuf.st_size;
  11254. +    pstatus->time_referenced = sbuf.st_mtime;
  11255. +    pstatus->time_created = sbuf.st_ctime;
  11256. +    return 1;
  11257. +}
  11258. +
  11259. +
  11260. +/* ------ File enumeration ------ */
  11261. +
  11262. +/****** THIS IS NOT SUPPORTED ON UNIX SYSTEMS. ******/
  11263. +/* Amazingly enough, there is no standard Unix library routine */
  11264. +/* for enumerating the files matching a pattern, */
  11265. +/* or even for enumerating (conveniently) the files in a directory. */
  11266. +
  11267. +struct file_enum_s {
  11268. +    char *pattern;
  11269. +    int first_time;
  11270. +    const gs_memory_procs *mprocs;
  11271. +};
  11272. +
  11273. +/* Initialize an enumeration.  NEEDS WORK ON HANDLING * ? \. */
  11274. +file_enum *
  11275. +gp_enumerate_files_init(const char *pat, uint patlen,
  11276. +  const gs_memory_procs *mprocs)
  11277. +{    file_enum *pfen = (file_enum *)(*mprocs->alloc)(1, sizeof(file_enum), "gp_enumerate_files");
  11278. +    char *pattern;
  11279. +    if ( pfen == 0 ) return 0;
  11280. +    pattern = (*mprocs->alloc)(patlen + 1, 1,
  11281. +                "gp_enumerate_files(pattern)");
  11282. +    if ( pattern == 0 ) return 0;
  11283. +    memcpy(pattern, pat, patlen);
  11284. +    pattern[patlen] = 0;
  11285. +    pfen->pattern = pattern;
  11286. +    pfen->mprocs = mprocs;
  11287. +    pfen->first_time = 1;
  11288. +    return pfen;
  11289. +}
  11290. +
  11291. +/* Enumerate the next file. */
  11292. +/* PUNT: JUST RETURN THE PATTERN. */
  11293. +uint
  11294. +gp_enumerate_files_next(file_enum *pfen, char *ptr, uint maxlen)
  11295. +{    if ( pfen->first_time )
  11296. +    {    char *pattern = pfen->pattern;
  11297. +        uint len = strlen(pattern);
  11298. +        pfen->first_time = 0;
  11299. +        if ( len > maxlen )
  11300. +            return maxlen + 1;
  11301. +        strcpy(ptr, pattern);
  11302. +        return len;
  11303. +    }
  11304. +    return -1;
  11305. +}
  11306. +
  11307. +/* Clean up the file enumeration. */
  11308. +void
  11309. +gp_enumerate_files_close(file_enum *pfen)
  11310. +{    const gs_memory_procs *mprocs = pfen->mprocs;
  11311. +    (*mprocs->free)(pfen->pattern, strlen(pfen->pattern) + 1, 1,
  11312. +            "gp_enumerate_files_close(pattern)");
  11313. +    (*mprocs->free)((char *)pfen, 1, sizeof(file_enum),
  11314. +            "gp_enumerate_files_close");
  11315. +}
  11316. diff -rup --new-file baseline/fsf/ghostscript/gs.1 amiga/fsf/ghostscript/gs.1
  11317. --- baseline/fsf/ghostscript/gs.1    Wed May 19 03:41:20 1993
  11318. +++ amiga/fsf/ghostscript/gs.1    Sat Sep 28 00:00:00 1996
  11319. @@ -154,7 +154,7 @@ if any;
  11320.  3.
  11321.  The directory/ies specified by the GS_LIB_DEFAULT macro in the
  11322.  Ghostscript makefile (which has been set to
  11323. -"/usr/local/lib/ghostscript:/usr/local/lib/ghostscript/fonts").
  11324. +"/ade/lib/ghostscript:/ade/lib/ghostscript/fonts").
  11325.  .PP
  11326.  Each of these (GS_LIB_DEFAULT, GS_LIB, and \-I parameter) may be either
  11327.  a single directory, or a list of directories separated by a `:'.
  11328. @@ -320,16 +320,16 @@ Selects an alternate output file (or pip
  11329.  device, as described above.
  11330.  .SH FILES
  11331.  .TP 
  11332. -.B /usr/local/lib/ghostscript/*
  11333. +.B /ade/lib/ghostscript/*
  11334.  Startup-files, utilities, and basic font definitions.
  11335.  .TP 
  11336. -.B /usr/local/lib/ghostscript/fonts/*
  11337. +.B /ade/lib/ghostscript/fonts/*
  11338.  Additional font definitions.
  11339.  .TP
  11340. -.B /usr/local/lib/ghostscript/examples/*
  11341. +.B /ade/lib/ghostscript/examples/*
  11342.  Demo Ghostscript files.
  11343.  .TP
  11344. -.B /usr/local/lib/doc/ghostscript/doc/*
  11345. +.B /ade/lib/doc/ghostscript/doc/*
  11346.  Assorted document files.
  11347.  .SH "SEE ALSO"
  11348.  The various Ghostscript document files (above).
  11349. diff -rup --new-file baseline/fsf/ghostscript/gsaddmod amiga/fsf/ghostscript/gsaddmod
  11350. --- baseline/fsf/ghostscript/gsaddmod    Sat May 15 23:55:00 1993
  11351. +++ amiga/fsf/ghostscript/gsaddmod    Sat Sep 28 00:00:00 1996
  11352. @@ -1,3 +1,4 @@
  11353.  export m; m=$1
  11354.  shift
  11355. -echo $* >>${m}.dev
  11356. +# The builtin echo in pdksh is not up to this task.
  11357. +/bin/echo $* >>${m}.dev
  11358. diff -rup --new-file baseline/fsf/ghostscript/gsnd amiga/fsf/ghostscript/gsnd
  11359. --- baseline/fsf/ghostscript/gsnd    Mon Feb  8 02:50:18 1993
  11360. +++ amiga/fsf/ghostscript/gsnd    Sat Sep 28 00:00:00 1996
  11361. @@ -1 +1,4 @@
  11362. -gs -DNODISPLAY $*
  11363. +.key ARGS/F
  11364. +.bra {
  11365. +.ket }
  11366. +gs -DNODISPLAY {ARGS}
  11367. diff -rup --new-file baseline/fsf/ghostscript/gssetdev amiga/fsf/ghostscript/gssetdev
  11368. --- baseline/fsf/ghostscript/gssetdev    Sat May 15 23:56:28 1993
  11369. +++ amiga/fsf/ghostscript/gssetdev    Sat Sep 28 00:00:00 1996
  11370. @@ -1,3 +1,4 @@
  11371.  export m; m=$1
  11372.  shift
  11373. -echo -dev ${m} -obj $* >${m}.dev
  11374. +# The builtin echo in pdksh is not up to this task.
  11375. +/bin/echo -dev ${m} -obj $* >${m}.dev
  11376. diff -rup --new-file baseline/fsf/ghostscript/gssetmod amiga/fsf/ghostscript/gssetmod
  11377. --- baseline/fsf/ghostscript/gssetmod    Sat May 15 23:56:14 1993
  11378. +++ amiga/fsf/ghostscript/gssetmod    Sat Sep 28 00:00:00 1996
  11379. @@ -1,3 +1,4 @@
  11380.  export m; m=$1
  11381.  shift
  11382. -echo -obj $* >${m}.dev
  11383. +# The builtin echo in pdksh is not up to this task.
  11384. +/bin/echo -obj $* >${m}.dev
  11385. diff -rup --new-file baseline/fsf/ghostscript/make.doc amiga/fsf/ghostscript/make.doc
  11386. --- baseline/fsf/ghostscript/make.doc    Fri May 28 15:57:00 1993
  11387. +++ amiga/fsf/ghostscript/make.doc    Sat Sep 28 00:00:00 1996
  11388. @@ -82,7 +82,8 @@ The makefiles distributed with Ghostscri
  11389.  follows:
  11390.  
  11391.      - GS_LIB_DEFAULT: on Unix systems, /usr/local/lib/ghostscript
  11392. -and /usr/local/lib/ghostscript/fonts; on MS-DOS systems, C:\GS.
  11393. +and /usr/local/lib/ghostscript/fonts; on MS-DOS systems, C:\GS; on AmigaOS
  11394. +systems, /ade (aka ade:)
  11395.  
  11396.      - TDEBUG: no debugging code included in the build.
  11397.  
  11398. diff -rup --new-file baseline/fsf/ghostscript/manifests/bin amiga/fsf/ghostscript/manifests/bin
  11399. --- baseline/fsf/ghostscript/manifests/bin    Wed Dec 31 17:00:00 1969
  11400. +++ amiga/fsf/ghostscript/manifests/bin    Sat Sep 28 00:00:00 1996
  11401. @@ -0,0 +1,149 @@
  11402. +COPYING
  11403. +COPYING.info
  11404. +bin/bdftops
  11405. +bin/font2c
  11406. +bin/gs
  11407. +bin/gsbj
  11408. +bin/gsdj
  11409. +bin/gslj
  11410. +bin/gslp
  11411. +bin/gsnd
  11412. +bin/ps2ascii
  11413. +bin/ps2epsi
  11414. +lib/ghostscript/Fontmap
  11415. +lib/ghostscript/README
  11416. +lib/ghostscript/bdftops.ps
  11417. +lib/ghostscript/decrypt.ps
  11418. +lib/ghostscript/doc/NEWS
  11419. +lib/ghostscript/doc/ansi2knr.1
  11420. +lib/ghostscript/doc/devices.doc
  11421. +lib/ghostscript/doc/drivers.doc
  11422. +lib/ghostscript/doc/fonts.doc
  11423. +lib/ghostscript/doc/gs.1
  11424. +lib/ghostscript/doc/hershey.doc
  11425. +lib/ghostscript/doc/history.doc
  11426. +lib/ghostscript/doc/humor.doc
  11427. +lib/ghostscript/doc/language.doc
  11428. +lib/ghostscript/doc/lib.doc
  11429. +lib/ghostscript/doc/make.doc
  11430. +lib/ghostscript/doc/ps2epsi.doc
  11431. +lib/ghostscript/doc/psfiles.doc
  11432. +lib/ghostscript/doc/readme.doc
  11433. +lib/ghostscript/doc/use.doc
  11434. +lib/ghostscript/doc/xfonts.doc
  11435. +lib/ghostscript/examples/cheq.ps
  11436. +lib/ghostscript/examples/chess.ps
  11437. +lib/ghostscript/examples/colorcir.ps
  11438. +lib/ghostscript/examples/escher.ps
  11439. +lib/ghostscript/examples/golfer.ps
  11440. +lib/ghostscript/examples/snowflak.ps
  11441. +lib/ghostscript/examples/tiger.ps
  11442. +lib/ghostscript/font2c.ps
  11443. +lib/ghostscript/fonts/bchb.afm
  11444. +lib/ghostscript/fonts/bchb.gsf
  11445. +lib/ghostscript/fonts/bchbi.afm
  11446. +lib/ghostscript/fonts/bchbi.gsf
  11447. +lib/ghostscript/fonts/bchr.afm
  11448. +lib/ghostscript/fonts/bchr.gsf
  11449. +lib/ghostscript/fonts/bchri.afm
  11450. +lib/ghostscript/fonts/bchri.gsf
  11451. +lib/ghostscript/fonts/cyr.gsf
  11452. +lib/ghostscript/fonts/cyri.gsf
  11453. +lib/ghostscript/fonts/hrge_r.gsf
  11454. +lib/ghostscript/fonts/hrge_rb.gsf
  11455. +lib/ghostscript/fonts/hrge_ro.gsf
  11456. +lib/ghostscript/fonts/hrgk_c.gsf
  11457. +lib/ghostscript/fonts/hrgk_s.gsf
  11458. +lib/ghostscript/fonts/hrgr_r.gsf
  11459. +lib/ghostscript/fonts/hrgr_rb.gsf
  11460. +lib/ghostscript/fonts/hrgr_ro.gsf
  11461. +lib/ghostscript/fonts/hrit_r.gsf
  11462. +lib/ghostscript/fonts/hrit_rb.gsf
  11463. +lib/ghostscript/fonts/hrit_ro.gsf
  11464. +lib/ghostscript/fonts/hrpl_r.gsf
  11465. +lib/ghostscript/fonts/hrpl_rb.gsf
  11466. +lib/ghostscript/fonts/hrpl_ro.gsf
  11467. +lib/ghostscript/fonts/hrpl_s.gsf
  11468. +lib/ghostscript/fonts/hrpl_sb.gsf
  11469. +lib/ghostscript/fonts/hrpl_sbo.gsf
  11470. +lib/ghostscript/fonts/hrpl_so.gsf
  11471. +lib/ghostscript/fonts/hrpl_t.gsf
  11472. +lib/ghostscript/fonts/hrpl_tb.gsf
  11473. +lib/ghostscript/fonts/hrpl_tbi.gsf
  11474. +lib/ghostscript/fonts/hrpl_ti.gsf
  11475. +lib/ghostscript/fonts/hrsc_c.gsf
  11476. +lib/ghostscript/fonts/hrsc_cb.gsf
  11477. +lib/ghostscript/fonts/hrsc_co.gsf
  11478. +lib/ghostscript/fonts/hrsc_s.gsf
  11479. +lib/ghostscript/fonts/hrsc_sb.gsf
  11480. +lib/ghostscript/fonts/hrsc_so.gsf
  11481. +lib/ghostscript/fonts/hrsy_r.gsf
  11482. +lib/ghostscript/fonts/n019003l.afm
  11483. +lib/ghostscript/fonts/n019003l.gsf
  11484. +lib/ghostscript/fonts/n021003l.afm
  11485. +lib/ghostscript/fonts/n021003l.gsf
  11486. +lib/ghostscript/fonts/ncrb.gsf
  11487. +lib/ghostscript/fonts/ncrbi.gsf
  11488. +lib/ghostscript/fonts/ncrr.gsf
  11489. +lib/ghostscript/fonts/ncrri.gsf
  11490. +lib/ghostscript/fonts/pagd.gsf
  11491. +lib/ghostscript/fonts/pagdo.gsf
  11492. +lib/ghostscript/fonts/pagk.gsf
  11493. +lib/ghostscript/fonts/pagko.gsf
  11494. +lib/ghostscript/fonts/pbkd.gsf
  11495. +lib/ghostscript/fonts/pbkdi.gsf
  11496. +lib/ghostscript/fonts/pbkl.gsf
  11497. +lib/ghostscript/fonts/pbkli.gsf
  11498. +lib/ghostscript/fonts/phvb.gsf
  11499. +lib/ghostscript/fonts/phvbo.gsf
  11500. +lib/ghostscript/fonts/phvr.gsf
  11501. +lib/ghostscript/fonts/phvro.gsf
  11502. +lib/ghostscript/fonts/phvrrn.gsf
  11503. +lib/ghostscript/fonts/pncb.gsf
  11504. +lib/ghostscript/fonts/pncbi.gsf
  11505. +lib/ghostscript/fonts/pncr.gsf
  11506. +lib/ghostscript/fonts/pncri.gsf
  11507. +lib/ghostscript/fonts/pplb.gsf
  11508. +lib/ghostscript/fonts/pplbi.gsf
  11509. +lib/ghostscript/fonts/pplr.gsf
  11510. +lib/ghostscript/fonts/pplri.gsf
  11511. +lib/ghostscript/fonts/psyr.gsf
  11512. +lib/ghostscript/fonts/ptmb.gsf
  11513. +lib/ghostscript/fonts/ptmbi.gsf
  11514. +lib/ghostscript/fonts/ptmr.gsf
  11515. +lib/ghostscript/fonts/ptmri.gsf
  11516. +lib/ghostscript/fonts/putb.gsf
  11517. +lib/ghostscript/fonts/putbi.gsf
  11518. +lib/ghostscript/fonts/putr.gsf
  11519. +lib/ghostscript/fonts/putri.gsf
  11520. +lib/ghostscript/fonts/pzdr.afm
  11521. +lib/ghostscript/fonts/pzdr.gsf
  11522. +lib/ghostscript/fonts/u003043t.afm
  11523. +lib/ghostscript/fonts/u003043t.gsf
  11524. +lib/ghostscript/fonts/u004006t.afm
  11525. +lib/ghostscript/fonts/u004006t.gsf
  11526. +lib/ghostscript/fonts/zcb.gsf
  11527. +lib/ghostscript/fonts/zcr.gsf
  11528. +lib/ghostscript/fonts/zcro.gsf
  11529. +lib/ghostscript/gs_dbt_e.ps
  11530. +lib/ghostscript/gs_dps1.ps
  11531. +lib/ghostscript/gs_fonts.ps
  11532. +lib/ghostscript/gs_init.ps
  11533. +lib/ghostscript/gs_lev2.ps
  11534. +lib/ghostscript/gs_statd.ps
  11535. +lib/ghostscript/gs_sym_e.ps
  11536. +lib/ghostscript/gs_type0.ps
  11537. +lib/ghostscript/gslp.ps
  11538. +lib/ghostscript/impath.ps
  11539. +lib/ghostscript/landscap.ps
  11540. +lib/ghostscript/level1.ps
  11541. +lib/ghostscript/prfont.ps
  11542. +lib/ghostscript/ps2ascii.ps
  11543. +lib/ghostscript/ps2epsi.ps
  11544. +lib/ghostscript/ps2image.ps
  11545. +lib/ghostscript/pstoppm.ps
  11546. +lib/ghostscript/quit.ps
  11547. +lib/ghostscript/showpage.ps
  11548. +lib/ghostscript/type1ops.ps
  11549. +lib/ghostscript/uglyr.gsf
  11550. +lib/ghostscript/wrfont.ps
  11551. diff -rup --new-file baseline/fsf/ghostscript/manifests/src amiga/fsf/ghostscript/manifests/src
  11552. --- baseline/fsf/ghostscript/manifests/src    Wed Dec 31 17:00:00 1969
  11553. +++ amiga/fsf/ghostscript/manifests/src    Sat Sep 28 00:00:00 1996
  11554. @@ -0,0 +1,553 @@
  11555. +fsf/ghostscript/COPYING
  11556. +fsf/ghostscript/Fontmap
  11557. +fsf/ghostscript/Fontmap.ATM
  11558. +fsf/ghostscript/Fontmap.VMS
  11559. +fsf/ghostscript/Makefile.in
  11560. +fsf/ghostscript/NEWS
  11561. +fsf/ghostscript/Product-Info
  11562. +fsf/ghostscript/README
  11563. +fsf/ghostscript/alloc.h
  11564. +fsf/ghostscript/alphabet.ps
  11565. +fsf/ghostscript/amiga-gcc.mak
  11566. +fsf/ghostscript/amiga.doc
  11567. +fsf/ghostscript/ansi2knr.1
  11568. +fsf/ghostscript/ansi2knr.c
  11569. +fsf/ghostscript/ansihead.mak
  11570. +fsf/ghostscript/astate.h
  11571. +fsf/ghostscript/bc.mak
  11572. +fsf/ghostscript/bcwin.mak
  11573. +fsf/ghostscript/bdftops
  11574. +fsf/ghostscript/bdftops.bat
  11575. +fsf/ghostscript/bdftops.ps
  11576. +fsf/ghostscript/bench.ps
  11577. +fsf/ghostscript/bfont.h
  11578. +fsf/ghostscript/bnum.h
  11579. +fsf/ghostscript/bseq.h
  11580. +fsf/ghostscript/btoken.h
  11581. +fsf/ghostscript/cc-head.mak
  11582. +fsf/ghostscript/ccfont.h
  11583. +fsf/ghostscript/ccgs
  11584. +fsf/ghostscript/cfonts.mak
  11585. +fsf/ghostscript/cheq.ps
  11586. +fsf/ghostscript/chess.ps
  11587. +fsf/ghostscript/colorcir.ps
  11588. +fsf/ghostscript/commprod.doc
  11589. +fsf/ghostscript/configure
  11590. +fsf/ghostscript/configure.in
  11591. +fsf/ghostscript/cp.bat
  11592. +fsf/ghostscript/ctype_.h
  11593. +fsf/ghostscript/decrypt.ps
  11594. +fsf/ghostscript/devices.doc
  11595. +fsf/ghostscript/devs.mak
  11596. +fsf/ghostscript/dict.h
  11597. +fsf/ghostscript/dodebug.h
  11598. +fsf/ghostscript/dos_.h
  11599. +fsf/ghostscript/dparam.h
  11600. +fsf/ghostscript/drivers.doc
  11601. +fsf/ghostscript/dstack.h
  11602. +fsf/ghostscript/echogs.c
  11603. +fsf/ghostscript/ega.c
  11604. +fsf/ghostscript/ega.tr
  11605. +fsf/ghostscript/empty.ps
  11606. +fsf/ghostscript/errno_.h
  11607. +fsf/ghostscript/errors.h
  11608. +fsf/ghostscript/escher.ps
  11609. +fsf/ghostscript/estack.h
  11610. +fsf/ghostscript/filedev.h
  11611. +fsf/ghostscript/files.h
  11612. +fsf/ghostscript/font.h
  11613. +fsf/ghostscript/font2c
  11614. +fsf/ghostscript/font2c.bat
  11615. +fsf/ghostscript/font2c.ps
  11616. +fsf/ghostscript/fonts.doc
  11617. +fsf/ghostscript/fonts.mak
  11618. +fsf/ghostscript/fonts/Makefile.in
  11619. +fsf/ghostscript/fonts/bchb.afm
  11620. +fsf/ghostscript/fonts/bchb.gsf
  11621. +fsf/ghostscript/fonts/bchbi.afm
  11622. +fsf/ghostscript/fonts/bchbi.gsf
  11623. +fsf/ghostscript/fonts/bchr.afm
  11624. +fsf/ghostscript/fonts/bchr.gsf
  11625. +fsf/ghostscript/fonts/bchri.afm
  11626. +fsf/ghostscript/fonts/bchri.gsf
  11627. +fsf/ghostscript/fonts/cyr.gsf
  11628. +fsf/ghostscript/fonts/cyri.gsf
  11629. +fsf/ghostscript/fonts/hrge_r.gsf
  11630. +fsf/ghostscript/fonts/hrge_rb.gsf
  11631. +fsf/ghostscript/fonts/hrge_ro.gsf
  11632. +fsf/ghostscript/fonts/hrgk_c.gsf
  11633. +fsf/ghostscript/fonts/hrgk_s.gsf
  11634. +fsf/ghostscript/fonts/hrgr_r.gsf
  11635. +fsf/ghostscript/fonts/hrgr_rb.gsf
  11636. +fsf/ghostscript/fonts/hrgr_ro.gsf
  11637. +fsf/ghostscript/fonts/hrit_r.gsf
  11638. +fsf/ghostscript/fonts/hrit_rb.gsf
  11639. +fsf/ghostscript/fonts/hrit_ro.gsf
  11640. +fsf/ghostscript/fonts/hrpl_r.gsf
  11641. +fsf/ghostscript/fonts/hrpl_rb.gsf
  11642. +fsf/ghostscript/fonts/hrpl_ro.gsf
  11643. +fsf/ghostscript/fonts/hrpl_s.gsf
  11644. +fsf/ghostscript/fonts/hrpl_sb.gsf
  11645. +fsf/ghostscript/fonts/hrpl_sbo.gsf
  11646. +fsf/ghostscript/fonts/hrpl_so.gsf
  11647. +fsf/ghostscript/fonts/hrpl_t.gsf
  11648. +fsf/ghostscript/fonts/hrpl_tb.gsf
  11649. +fsf/ghostscript/fonts/hrpl_tbi.gsf
  11650. +fsf/ghostscript/fonts/hrpl_ti.gsf
  11651. +fsf/ghostscript/fonts/hrsc_c.gsf
  11652. +fsf/ghostscript/fonts/hrsc_cb.gsf
  11653. +fsf/ghostscript/fonts/hrsc_co.gsf
  11654. +fsf/ghostscript/fonts/hrsc_s.gsf
  11655. +fsf/ghostscript/fonts/hrsc_sb.gsf
  11656. +fsf/ghostscript/fonts/hrsc_so.gsf
  11657. +fsf/ghostscript/fonts/hrsy_r.gsf
  11658. +fsf/ghostscript/fonts/n019003l.afm
  11659. +fsf/ghostscript/fonts/n019003l.gsf
  11660. +fsf/ghostscript/fonts/n021003l.afm
  11661. +fsf/ghostscript/fonts/n021003l.gsf
  11662. +fsf/ghostscript/fonts/ncrb.gsf
  11663. +fsf/ghostscript/fonts/ncrbi.gsf
  11664. +fsf/ghostscript/fonts/ncrr.gsf
  11665. +fsf/ghostscript/fonts/ncrri.gsf
  11666. +fsf/ghostscript/fonts/pagd.gsf
  11667. +fsf/ghostscript/fonts/pagdo.gsf
  11668. +fsf/ghostscript/fonts/pagk.gsf
  11669. +fsf/ghostscript/fonts/pagko.gsf
  11670. +fsf/ghostscript/fonts/pbkd.gsf
  11671. +fsf/ghostscript/fonts/pbkdi.gsf
  11672. +fsf/ghostscript/fonts/pbkl.gsf
  11673. +fsf/ghostscript/fonts/pbkli.gsf
  11674. +fsf/ghostscript/fonts/phvb.gsf
  11675. +fsf/ghostscript/fonts/phvbo.gsf
  11676. +fsf/ghostscript/fonts/phvr.gsf
  11677. +fsf/ghostscript/fonts/phvro.gsf
  11678. +fsf/ghostscript/fonts/phvrrn.gsf
  11679. +fsf/ghostscript/fonts/pncb.gsf
  11680. +fsf/ghostscript/fonts/pncbi.gsf
  11681. +fsf/ghostscript/fonts/pncr.gsf
  11682. +fsf/ghostscript/fonts/pncri.gsf
  11683. +fsf/ghostscript/fonts/pplb.gsf
  11684. +fsf/ghostscript/fonts/pplbi.gsf
  11685. +fsf/ghostscript/fonts/pplr.gsf
  11686. +fsf/ghostscript/fonts/pplri.gsf
  11687. +fsf/ghostscript/fonts/psyr.gsf
  11688. +fsf/ghostscript/fonts/ptmb.gsf
  11689. +fsf/ghostscript/fonts/ptmbi.gsf
  11690. +fsf/ghostscript/fonts/ptmr.gsf
  11691. +fsf/ghostscript/fonts/ptmri.gsf
  11692. +fsf/ghostscript/fonts/putb.gsf
  11693. +fsf/ghostscript/fonts/putbi.gsf
  11694. +fsf/ghostscript/fonts/putr.gsf
  11695. +fsf/ghostscript/fonts/putri.gsf
  11696. +fsf/ghostscript/fonts/pzdr.afm
  11697. +fsf/ghostscript/fonts/pzdr.gsf
  11698. +fsf/ghostscript/fonts/u003043t.afm
  11699. +fsf/ghostscript/fonts/u003043t.gsf
  11700. +fsf/ghostscript/fonts/u004006t.afm
  11701. +fsf/ghostscript/fonts/u004006t.gsf
  11702. +fsf/ghostscript/fonts/zcb.gsf
  11703. +fsf/ghostscript/fonts/zcr.gsf
  11704. +fsf/ghostscript/fonts/zcro.gsf
  11705. +fsf/ghostscript/gcc-head.mak
  11706. +fsf/ghostscript/gconfig.c
  11707. +fsf/ghostscript/gdebug.h
  11708. +fsf/ghostscript/gdev3852.c
  11709. +fsf/ghostscript/gdev3b1.c
  11710. +fsf/ghostscript/gdev4081.c
  11711. +fsf/ghostscript/gdev4693.c
  11712. +fsf/ghostscript/gdev8510.c
  11713. +fsf/ghostscript/gdevadmp.c
  11714. +fsf/ghostscript/gdevamiga.c
  11715. +fsf/ghostscript/gdevbgi.c
  11716. +fsf/ghostscript/gdevbit.c
  11717. +fsf/ghostscript/gdevbj10.c
  11718. +fsf/ghostscript/gdevbmp.c
  11719. +fsf/ghostscript/gdevcdj.c
  11720. +fsf/ghostscript/gdevdfax.c
  11721. +fsf/ghostscript/gdevdfg3.h
  11722. +fsf/ghostscript/gdevdjet.c
  11723. +fsf/ghostscript/gdevdjtc.c
  11724. +fsf/ghostscript/gdevegaa.asm
  11725. +fsf/ghostscript/gdevemap.c
  11726. +fsf/ghostscript/gdevepsc.c
  11727. +fsf/ghostscript/gdevepsn.c
  11728. +fsf/ghostscript/gdevescp.c
  11729. +fsf/ghostscript/gdevevga.c
  11730. +fsf/ghostscript/gdevherc.c
  11731. +fsf/ghostscript/gdevlbp8.c
  11732. +fsf/ghostscript/gdevln03.c
  11733. +fsf/ghostscript/gdevmem.h
  11734. +fsf/ghostscript/gdevmem1.c
  11735. +fsf/ghostscript/gdevmem2.c
  11736. +fsf/ghostscript/gdevmem3.c
  11737. +fsf/ghostscript/gdevmswn.c
  11738. +fsf/ghostscript/gdevmswn.h
  11739. +fsf/ghostscript/gdevmsxf.c
  11740. +fsf/ghostscript/gdevn533.c
  11741. +fsf/ghostscript/gdevnp6.c
  11742. +fsf/ghostscript/gdevo182.c
  11743. +fsf/ghostscript/gdevpbm.c
  11744. +fsf/ghostscript/gdevpccm.c
  11745. +fsf/ghostscript/gdevpccm.h
  11746. +fsf/ghostscript/gdevpcfb.c
  11747. +fsf/ghostscript/gdevpcfb.h
  11748. +fsf/ghostscript/gdevpcl.c
  11749. +fsf/ghostscript/gdevpcl.h
  11750. +fsf/ghostscript/gdevpcx.c
  11751. +fsf/ghostscript/gdevpe.c
  11752. +fsf/ghostscript/gdevpipe.c
  11753. +fsf/ghostscript/gdevpjet.c
  11754. +fsf/ghostscript/gdevprn.c
  11755. +fsf/ghostscript/gdevprn.h
  11756. +fsf/ghostscript/gdevs3ga.c
  11757. +fsf/ghostscript/gdevsco.c
  11758. +fsf/ghostscript/gdevsnfb.c
  11759. +fsf/ghostscript/gdevsppr.c
  11760. +fsf/ghostscript/gdevsun.c
  11761. +fsf/ghostscript/gdevsvga.c
  11762. +fsf/ghostscript/gdevsvga.h
  11763. +fsf/ghostscript/gdevtiff.c
  11764. +fsf/ghostscript/gdevtiff.h
  11765. +fsf/ghostscript/gdevtknk.c
  11766. +fsf/ghostscript/gdevtrfx.c
  11767. +fsf/ghostscript/gdevwddb.c
  11768. +fsf/ghostscript/gdevwdib.c
  11769. +fsf/ghostscript/gdevwprn.c
  11770. +fsf/ghostscript/gdevx.c
  11771. +fsf/ghostscript/gdevx.h
  11772. +fsf/ghostscript/gdevxini.c
  11773. +fsf/ghostscript/gdevxxf.c
  11774. +fsf/ghostscript/genarch.c
  11775. +fsf/ghostscript/genconf.c
  11776. +fsf/ghostscript/ghost.h
  11777. +fsf/ghostscript/golfer.ps
  11778. +fsf/ghostscript/gp.h
  11779. +fsf/ghostscript/gp_amiga.c
  11780. +fsf/ghostscript/gp_dosfb.c
  11781. +fsf/ghostscript/gp_itbc.c
  11782. +fsf/ghostscript/gp_iwatc.c
  11783. +fsf/ghostscript/gp_msdos.c
  11784. +fsf/ghostscript/gp_mswin.c
  11785. +fsf/ghostscript/gp_mswin.h
  11786. +fsf/ghostscript/gp_mswtx.c
  11787. +fsf/ghostscript/gp_mswtx.h
  11788. +fsf/ghostscript/gp_nofb.c
  11789. +fsf/ghostscript/gp_sysv.c
  11790. +fsf/ghostscript/gp_unix.c
  11791. +fsf/ghostscript/gp_vms.c
  11792. +fsf/ghostscript/gpcheck.h
  11793. +fsf/ghostscript/gs.1
  11794. +fsf/ghostscript/gs.c
  11795. +fsf/ghostscript/gs.h
  11796. +fsf/ghostscript/gs.mak
  11797. +fsf/ghostscript/gs.tr
  11798. +fsf/ghostscript/gs_dbt_e.ps
  11799. +fsf/ghostscript/gs_dps1.ps
  11800. +fsf/ghostscript/gs_fonts.ps
  11801. +fsf/ghostscript/gs_init.ps
  11802. +fsf/ghostscript/gs_lev2.ps
  11803. +fsf/ghostscript/gs_statd.ps
  11804. +fsf/ghostscript/gs_sym_e.ps
  11805. +fsf/ghostscript/gs_type0.ps
  11806. +fsf/ghostscript/gsaddmod
  11807. +fsf/ghostscript/gsaddmod.bat
  11808. +fsf/ghostscript/gsbj
  11809. +fsf/ghostscript/gsbj.bat
  11810. +fsf/ghostscript/gsccode.h
  11811. +fsf/ghostscript/gschar.c
  11812. +fsf/ghostscript/gschar.h
  11813. +fsf/ghostscript/gschar0.c
  11814. +fsf/ghostscript/gscie.c
  11815. +fsf/ghostscript/gscie.h
  11816. +fsf/ghostscript/gscolor.c
  11817. +fsf/ghostscript/gscolor.h
  11818. +fsf/ghostscript/gscolor2.c
  11819. +fsf/ghostscript/gscolor2.h
  11820. +fsf/ghostscript/gsconfig.h
  11821. +fsf/ghostscript/gscoord.c
  11822. +fsf/ghostscript/gscoord.h
  11823. +fsf/ghostscript/gscrypt1.h
  11824. +fsf/ghostscript/gscspace.h
  11825. +fsf/ghostscript/gsdevice.c
  11826. +fsf/ghostscript/gsdj
  11827. +fsf/ghostscript/gsdj.bat
  11828. +fsf/ghostscript/gsdj500.bat
  11829. +fsf/ghostscript/gsdps1.c
  11830. +fsf/ghostscript/gserrors.h
  11831. +fsf/ghostscript/gsfile.c
  11832. +fsf/ghostscript/gsfont.c
  11833. +fsf/ghostscript/gsfont.h
  11834. +fsf/ghostscript/gsgraph.icx
  11835. +fsf/ghostscript/gsgraph.uue
  11836. +fsf/ghostscript/gsht.c
  11837. +fsf/ghostscript/gsimage.c
  11838. +fsf/ghostscript/gsimage.h
  11839. +fsf/ghostscript/gsimage1.c
  11840. +fsf/ghostscript/gsimage2.c
  11841. +fsf/ghostscript/gsimpath.c
  11842. +fsf/ghostscript/gsio.h
  11843. +fsf/ghostscript/gsline.c
  11844. +fsf/ghostscript/gslj
  11845. +fsf/ghostscript/gslj.bat
  11846. +fsf/ghostscript/gslp
  11847. +fsf/ghostscript/gslp.bat
  11848. +fsf/ghostscript/gslp.ps
  11849. +fsf/ghostscript/gsmain.c
  11850. +fsf/ghostscript/gsmatrix.c
  11851. +fsf/ghostscript/gsmatrix.h
  11852. +fsf/ghostscript/gsmisc.c
  11853. +fsf/ghostscript/gsnd
  11854. +fsf/ghostscript/gsnd.bat
  11855. +fsf/ghostscript/gsndt.bat
  11856. +fsf/ghostscript/gspaint.c
  11857. +fsf/ghostscript/gspaint.h
  11858. +fsf/ghostscript/gspath.c
  11859. +fsf/ghostscript/gspath.h
  11860. +fsf/ghostscript/gspath2.c
  11861. +fsf/ghostscript/gsprops.h
  11862. +fsf/ghostscript/gssetdev
  11863. +fsf/ghostscript/gssetdev.bat
  11864. +fsf/ghostscript/gssetmod
  11865. +fsf/ghostscript/gssetmod.bat
  11866. +fsf/ghostscript/gsstate.c
  11867. +fsf/ghostscript/gsstate.h
  11868. +fsf/ghostscript/gst.bat
  11869. +fsf/ghostscript/gstdev.c
  11870. +fsf/ghostscript/gstext.icx
  11871. +fsf/ghostscript/gstext.uue
  11872. +fsf/ghostscript/gstt.bat
  11873. +fsf/ghostscript/gstype1.c
  11874. +fsf/ghostscript/gstype1.h
  11875. +fsf/ghostscript/gstypes.h
  11876. +fsf/ghostscript/gsuid.h
  11877. +fsf/ghostscript/gsutil.c
  11878. +fsf/ghostscript/gsutil.h
  11879. +fsf/ghostscript/gsview.bat
  11880. +fsf/ghostscript/gsw.tr
  11881. +fsf/ghostscript/gswin.def
  11882. +fsf/ghostscript/gswin.rc
  11883. +fsf/ghostscript/gswin386.rc
  11884. +fsf/ghostscript/gsxfont.h
  11885. +fsf/ghostscript/gx.h
  11886. +fsf/ghostscript/gxarith.h
  11887. +fsf/ghostscript/gxbitmap.h
  11888. +fsf/ghostscript/gxcache.h
  11889. +fsf/ghostscript/gxccache.c
  11890. +fsf/ghostscript/gxccman.c
  11891. +fsf/ghostscript/gxcdir.h
  11892. +fsf/ghostscript/gxchar.h
  11893. +fsf/ghostscript/gxcht.c
  11894. +fsf/ghostscript/gxcldev.h
  11895. +fsf/ghostscript/gxclist.c
  11896. +fsf/ghostscript/gxclist.h
  11897. +fsf/ghostscript/gxclread.c
  11898. +fsf/ghostscript/gxcmap.c
  11899. +fsf/ghostscript/gxcolor.h
  11900. +fsf/ghostscript/gxcpath.c
  11901. +fsf/ghostscript/gxcpath.h
  11902. +fsf/ghostscript/gxdevice.h
  11903. +fsf/ghostscript/gxdevmem.h
  11904. +fsf/ghostscript/gxdither.c
  11905. +fsf/ghostscript/gxdraw.c
  11906. +fsf/ghostscript/gxfdir.h
  11907. +fsf/ghostscript/gxfill.c
  11908. +fsf/ghostscript/gxfixed.h
  11909. +fsf/ghostscript/gxfmap.h
  11910. +fsf/ghostscript/gxfont.h
  11911. +fsf/ghostscript/gxfrac.h
  11912. +fsf/ghostscript/gxhint1.c
  11913. +fsf/ghostscript/gxhint2.c
  11914. +fsf/ghostscript/gxht.c
  11915. +fsf/ghostscript/gximage.h
  11916. +fsf/ghostscript/gxlum.h
  11917. +fsf/ghostscript/gxmatrix.h
  11918. +fsf/ghostscript/gxop1.h
  11919. +fsf/ghostscript/gxpath.c
  11920. +fsf/ghostscript/gxpath.h
  11921. +fsf/ghostscript/gxpath2.c
  11922. +fsf/ghostscript/gxpcopy.c
  11923. +fsf/ghostscript/gxrefct.h
  11924. +fsf/ghostscript/gxstroke.c
  11925. +fsf/ghostscript/gxtype1.h
  11926. +fsf/ghostscript/gxxfont.h
  11927. +fsf/ghostscript/gzcolor.h
  11928. +fsf/ghostscript/gzdevice.h
  11929. +fsf/ghostscript/gzht.h
  11930. +fsf/ghostscript/gzline.h
  11931. +fsf/ghostscript/gzpath.h
  11932. +fsf/ghostscript/gzstate.h
  11933. +fsf/ghostscript/helpers.doc
  11934. +fsf/ghostscript/hershey.doc
  11935. +fsf/ghostscript/history.doc
  11936. +fsf/ghostscript/humor.doc
  11937. +fsf/ghostscript/ialloc.c
  11938. +fsf/ghostscript/ibnum.c
  11939. +fsf/ghostscript/iccfont.c
  11940. +fsf/ghostscript/idebug.c
  11941. +fsf/ghostscript/idict.c
  11942. +fsf/ghostscript/idparam.c
  11943. +fsf/ghostscript/iinit.c
  11944. +fsf/ghostscript/ilevel.h
  11945. +fsf/ghostscript/impath.ps
  11946. +fsf/ghostscript/iname.c
  11947. +fsf/ghostscript/iname.h
  11948. +fsf/ghostscript/interp.c
  11949. +fsf/ghostscript/iref.h
  11950. +fsf/ghostscript/isave.c
  11951. +fsf/ghostscript/iscan.c
  11952. +fsf/ghostscript/iscan.h
  11953. +fsf/ghostscript/iscan2.c
  11954. +fsf/ghostscript/istack.c
  11955. +fsf/ghostscript/istack.h
  11956. +fsf/ghostscript/iutil.c
  11957. +fsf/ghostscript/iutil.h
  11958. +fsf/ghostscript/iutilasm.asm
  11959. +fsf/ghostscript/ivmspace.h
  11960. +fsf/ghostscript/landscap.ps
  11961. +fsf/ghostscript/language.doc
  11962. +fsf/ghostscript/level1.ps
  11963. +fsf/ghostscript/lib.doc
  11964. +fsf/ghostscript/lines.ps
  11965. +fsf/ghostscript/lprsetup.sh
  11966. +fsf/ghostscript/main.h
  11967. +fsf/ghostscript/maint.mak
  11968. +fsf/ghostscript/make.doc
  11969. +fsf/ghostscript/malloc_.h
  11970. +fsf/ghostscript/manifests/bin
  11971. +fsf/ghostscript/manifests/src
  11972. +fsf/ghostscript/markpath.ps
  11973. +fsf/ghostscript/math_.h
  11974. +fsf/ghostscript/memory_.h
  11975. +fsf/ghostscript/mergeini.ps
  11976. +fsf/ghostscript/msc.mak
  11977. +fsf/ghostscript/mv.bat
  11978. +fsf/ghostscript/opdef.h
  11979. +fsf/ghostscript/oper.h
  11980. +fsf/ghostscript/ostack.h
  11981. +fsf/ghostscript/overlay.h
  11982. +fsf/ghostscript/packed.h
  11983. +fsf/ghostscript/pcharstr.ps
  11984. +fsf/ghostscript/pj-gs.sh
  11985. +fsf/ghostscript/ppath.ps
  11986. +fsf/ghostscript/prfont.ps
  11987. +fsf/ghostscript/ps2ascii
  11988. +fsf/ghostscript/ps2ascii.bat
  11989. +fsf/ghostscript/ps2ascii.ps
  11990. +fsf/ghostscript/ps2epsi
  11991. +fsf/ghostscript/ps2epsi.bat
  11992. +fsf/ghostscript/ps2epsi.doc
  11993. +fsf/ghostscript/ps2epsi.ps
  11994. +fsf/ghostscript/ps2image.ps
  11995. +fsf/ghostscript/psfiles.doc
  11996. +fsf/ghostscript/pstoppm.ps
  11997. +fsf/ghostscript/pv.sh
  11998. +fsf/ghostscript/quit.ps
  11999. +fsf/ghostscript/readme.doc
  12000. +fsf/ghostscript/rm.bat
  12001. +fsf/ghostscript/save.h
  12002. +fsf/ghostscript/save.ps
  12003. +fsf/ghostscript/sbits.c
  12004. +fsf/ghostscript/sbits.h
  12005. +fsf/ghostscript/scanchar.h
  12006. +fsf/ghostscript/scf.h
  12007. +fsf/ghostscript/scfd.c
  12008. +fsf/ghostscript/scfdgen.c
  12009. +fsf/ghostscript/scfdtab.c
  12010. +fsf/ghostscript/scfe.c
  12011. +fsf/ghostscript/scftab.c
  12012. +fsf/ghostscript/screen.ps
  12013. +fsf/ghostscript/sdct.h
  12014. +fsf/ghostscript/sdctd.c
  12015. +fsf/ghostscript/sdcte.c
  12016. +fsf/ghostscript/sfilter.c
  12017. +fsf/ghostscript/sfilter2.c
  12018. +fsf/ghostscript/shc.h
  12019. +fsf/ghostscript/showchar.ps
  12020. +fsf/ghostscript/showpage.ps
  12021. +fsf/ghostscript/slzwd.c
  12022. +fsf/ghostscript/slzwe.c
  12023. +fsf/ghostscript/snowflak.ps
  12024. +fsf/ghostscript/stat_.h
  12025. +fsf/ghostscript/state.h
  12026. +fsf/ghostscript/std.h
  12027. +fsf/ghostscript/stdio_.h
  12028. +fsf/ghostscript/store.h
  12029. +fsf/ghostscript/stream.c
  12030. +fsf/ghostscript/stream.h
  12031. +fsf/ghostscript/string_.h
  12032. +fsf/ghostscript/sysvlp.sh
  12033. +fsf/ghostscript/tar_cat
  12034. +fsf/ghostscript/tc.mak
  12035. +fsf/ghostscript/tccommon.mak
  12036. +fsf/ghostscript/tiger.ps
  12037. +fsf/ghostscript/time_.h
  12038. +fsf/ghostscript/traceop.ps
  12039. +fsf/ghostscript/turboc.cfg
  12040. +fsf/ghostscript/type1ops.ps
  12041. +fsf/ghostscript/uglyr.gsf
  12042. +fsf/ghostscript/unix-ansi.mak
  12043. +fsf/ghostscript/unix-cc.mak
  12044. +fsf/ghostscript/unix-gcc.mak
  12045. +fsf/ghostscript/unix-lpr.doc
  12046. +fsf/ghostscript/unix-lpr.sh
  12047. +fsf/ghostscript/unixhead.mak
  12048. +fsf/ghostscript/unixtail.mak
  12049. +fsf/ghostscript/unprot.ps
  12050. +fsf/ghostscript/use.doc
  12051. +fsf/ghostscript/vms-cc.mak
  12052. +fsf/ghostscript/vms-gcc.mak
  12053. +fsf/ghostscript/vmsmath.h
  12054. +fsf/ghostscript/watc.mak
  12055. +fsf/ghostscript/watcwin.mak
  12056. +fsf/ghostscript/waterfal.ps
  12057. +fsf/ghostscript/wccommon.mak
  12058. +fsf/ghostscript/windows_.h
  12059. +fsf/ghostscript/winmaps.ps
  12060. +fsf/ghostscript/wrfont.ps
  12061. +fsf/ghostscript/x_.h
  12062. +fsf/ghostscript/xfonts.doc
  12063. +fsf/ghostscript/zarith.c
  12064. +fsf/ghostscript/zarray.c
  12065. +fsf/ghostscript/zbseq.c
  12066. +fsf/ghostscript/zchar.c
  12067. +fsf/ghostscript/zchar2.c
  12068. +fsf/ghostscript/zcie.c
  12069. +fsf/ghostscript/zcolor.c
  12070. +fsf/ghostscript/zcolor2.c
  12071. +fsf/ghostscript/zcontext.c
  12072. +fsf/ghostscript/zcontrol.c
  12073. +fsf/ghostscript/zcspace2.c
  12074. +fsf/ghostscript/zdevice.c
  12075. +fsf/ghostscript/zdict.c
  12076. +fsf/ghostscript/zdosio.c
  12077. +fsf/ghostscript/zdps1.c
  12078. +fsf/ghostscript/zfile.c
  12079. +fsf/ghostscript/zfiledev.c
  12080. +fsf/ghostscript/zfileio.c
  12081. +fsf/ghostscript/zfilter.c
  12082. +fsf/ghostscript/zfilter2.c
  12083. +fsf/ghostscript/zfont.c
  12084. +fsf/ghostscript/zfont0.c
  12085. +fsf/ghostscript/zfont1.c
  12086. +fsf/ghostscript/zfont2.c
  12087. +fsf/ghostscript/zgeneric.c
  12088. +fsf/ghostscript/zgstate.c
  12089. +fsf/ghostscript/zht.c
  12090. +fsf/ghostscript/zht2.c
  12091. +fsf/ghostscript/zimage2.c
  12092. +fsf/ghostscript/zmath.c
  12093. +fsf/ghostscript/zmatrix.c
  12094. +fsf/ghostscript/zmisc.c
  12095. +fsf/ghostscript/zmisc2.c
  12096. +fsf/ghostscript/zpacked.c
  12097. +fsf/ghostscript/zpaint.c
  12098. +fsf/ghostscript/zpath.c
  12099. +fsf/ghostscript/zpath2.c
  12100. +fsf/ghostscript/zprops.c
  12101. +fsf/ghostscript/zrelbit.c
  12102. +fsf/ghostscript/zstack.c
  12103. +fsf/ghostscript/zstring.c
  12104. +fsf/ghostscript/ztype.c
  12105. +fsf/ghostscript/zupath.c
  12106. +fsf/ghostscript/zvmem.c
  12107. +fsf/ghostscript/zvmem2.c
  12108. diff -rup --new-file baseline/fsf/ghostscript/ps2ascii amiga/fsf/ghostscript/ps2ascii
  12109. --- baseline/fsf/ghostscript/ps2ascii    Tue Jun  1 06:42:38 1993
  12110. +++ amiga/fsf/ghostscript/ps2ascii    Sat Sep 28 00:00:00 1996
  12111. @@ -1,13 +1,4 @@
  12112. -#!/bin/sh -f
  12113. -# Extract ASCII text from a PostScript file.  Usage:
  12114. -#    ps2ascii [infile.ps [outfile.txt]]
  12115. -# If outfile is omitted, output goes to stdout.
  12116. -# If both infile and outfile are omitted, ps2ascii acts as a filter,
  12117. -# reading from stdin and writing on stdout.
  12118. -if ( test $# -eq 0 ) then
  12119. -    gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps - quit.ps
  12120. -elif ( test $# -eq 1 ) then
  12121. -    gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps $1 quit.ps
  12122. -else
  12123. -    gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE ps2ascii.ps $1 quit.ps >$2
  12124. -fi
  12125. +.key IN/A,OUT/A
  12126. +.bra {
  12127. +.ket }
  12128. +gs -q -dNODISPLAY -dNOBIND -dWRITESYSTEMDICT -dSIMPLE gs_2asc.ps {IN} quit.ps >{OUT}
  12129. diff -rup --new-file baseline/fsf/ghostscript/ps2epsi amiga/fsf/ghostscript/ps2epsi
  12130. --- baseline/fsf/ghostscript/ps2epsi    Fri May  7 11:39:56 1993
  12131. +++ amiga/fsf/ghostscript/ps2epsi    Sat Sep 28 00:00:00 1996
  12132. @@ -1,52 +1,12 @@
  12133. -#!/bin/sh
  12134. +.key IN/A,OUT/A
  12135. +.bra [
  12136. +.ket ]
  12137.  
  12138. -LOCALPATH=/usr/local/bin
  12139. -PATH=/bin:/usr/bin:/usr/ucb\:$LOCALPATH\
  12140. +gs -q -dNOPAUSE -dNODISPLAY ps2epsi.ps < [IN]
  12141.  
  12142. -export PATH outfile
  12143. +Echo "/InitDictCount countdictstack def gsave save mark newpath" >> [OUT]
  12144.  
  12145. -if [ $# -lt 1 -o $# -gt 2 ]; then
  12146. -    echo "Usage: pstoepsi file.ps [file.epsi]" 1>&2
  12147. -    exit 1
  12148. -fi
  12149. +type [OUT] >> [IN]
  12150.  
  12151. -infile=$1
  12152. -
  12153. -if [ $# -eq 1 ]
  12154. -then
  12155. -    case "${infile}" in
  12156. -      *.ps)        base=`basename ${infile} .ps` ;;
  12157. -      *.cps)    base=`basename ${infile} .cps` ;;
  12158. -      *.eps)    base=`basename ${infile} .eps` ;;
  12159. -      *.epsf)    base=`basename ${infile} .epsf` ;;
  12160. -      *)        base=`basename ${infile}` ;;
  12161. -    esac
  12162. -    outfile=${base}.epsi
  12163. -else
  12164. -    outfile=$2
  12165. -fi
  12166. -
  12167. -gs -q -dNOPAUSE -dNODISPLAY ps2epsi.ps < ${infile} 1>&2
  12168. -
  12169. -(
  12170. -cat << BEGINEPS
  12171. -/InitDictCount countdictstack def
  12172. -gsave
  12173. -save
  12174. -mark
  12175. -newpath
  12176. -/showpage {} def
  12177. -BEGINEPS
  12178. -
  12179. -cat ${infile}
  12180. -
  12181. -cat << ENDEPS
  12182. -countdictstack InitDictCount sub { end } repeat
  12183. -cleartomark
  12184. -restore
  12185. -grestore
  12186. -ENDEPS
  12187. -
  12188. -) >> ${outfile}
  12189. -
  12190. -exit 0
  12191. +Echo "countdictstack InitDictCount sub { end } repeat" >> [OUT]
  12192. +Echo "cleartomark restore grestore" >> [OUT]
  12193. diff -rup --new-file baseline/fsf/ghostscript/use.doc amiga/fsf/ghostscript/use.doc
  12194. --- baseline/fsf/ghostscript/use.doc    Sun Jul 18 08:52:50 1993
  12195. +++ amiga/fsf/ghostscript/use.doc    Sat Sep 28 00:00:00 1996
  12196. @@ -106,9 +106,9 @@ Unix
  12197.  
  12198.  Installing Ghostscript on a Unix system requires compiling it first.
  12199.  The name of the executable is gs.  The makefile installs all the
  12200. -files, except the fonts, in /usr/local or various subdirectories
  12201. +files, except the fonts, in /ade or various subdirectories
  12202.  thereof.  The fonts should be installed in
  12203. -/usr/local/lib/ghostscript/fonts.  Consult the makefile for more
  12204. +/ade/lib/ghostscript/fonts.  Consult the makefile for more
  12205.  details.
  12206.  
  12207.  ********
  12208.