summaryrefslogtreecommitdiff
path: root/gs/src/vms.mak
blob: 965da58b4aa809886fb545145e6ddc071563b46c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
$ ! Copyright (C) 1997, 1998 Aladdin Enterprises.
$ ! All rights reserved.
$ !
$ ! This file is part of Aladdin Ghostscript.
$ !
$ ! Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
$ ! or distributor accepts any responsibility for the consequences of using it,
$ ! or for whether it serves any particular purpose or works at all, unless he
$ ! or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
$ ! License (the "License") for full details.
$ !
$ ! Every copy of Aladdin Ghostscript must include a copy of the License,
$ ! normally in a plain ASCII text file named PUBLIC.  The License grants you
$ ! the right to copy, modify and redistribute Aladdin Ghostscript, but only
$ ! under certain conditions described in the License.  Among other things, the
$ ! License requires that the copyright notice and this notice be preserved on
$ ! all copies.
$ !
$ !
$ ! VMS "makefile" for Ghostscript.
$ !
$ WSO = "WRITE SYS$OUTPUT"
$ ON ERROR THEN GOTO DONE
$ ON CONTROL_Y THEN GOTO DONE
$ !
$ ! Version numbers.
$ ! MINOR0 is different from MINOR only if MINOR is a single digit.
$ !
$ GS_VERSION_MAJOR = "5"
$ GS_VERSION_MINOR = "12"
$ GS_VERSION_MINOR0 = "12"
$ ! Revision date: year x 10000 + month x 100 + day.
$ GS_REVISIONDATE  = "19980414"
$ ! Derived values
$ GS_VERSION       = GS_VERSION_MAJOR + GS_VERSION_MINOR0
$ GS_DOT_VERSION   = GS_VERSION_MAJOR + "." + GS_VERSION_MINOR
$ GS_REVISION      = GS_VERSION
$ JSRCDIR = "[.jpeg-6a]"
$ JVERSION = 6
$!!! PSRCDIR = "[.libpng-0_89c]"
$!!! PVERSION = 89
$ PSRCDIR = "[.libpng-0_96]"
$ PVERSION = 96
$ ZSRCDIR = "[.zlib-1_0_4]"
$
$ !
$ ! Check input parameters
$ !
$ IF P1 .NES. "" .AND. P1 .NES. "DEBUG" .AND. P1 .NES. "LINK" .AND. -
   P1 .NES. "BUILD" .AND. F$EXTRACT(0,5,P1) .NES. "FROM=" THEN -
   GS_LIB_DEFAULT = P1
$ IF P2 .NES. "" .AND. P2 .NES. "DEBUG" .AND. P2 .NES. "LINK" .AND. -
   P2 .NES. "BUILD" .AND. F$EXTRACT(0,5,P2) .NES. "FROM=" THEN -
   GS_LIB_DEFAULT = P2
$ !
$ IF P1 .NES. "DEBUG" .AND. P2 .NES. "DEBUG" THEN GOTO NODEBUG
$ CC_QUAL = CC_QUAL + "/NOOPT/DEBUG"
$ IF CC_DEF .NES. "" THEN CC_DEF= CC_DEF + ","
$ CC_DEF= CC_DEF + "DEBUG"
$ L_QUAL  = (L_QUAL-"/NOTRACEBACK") + "/DEBUG"
$ !
$ NODEBUG:
$ IF CC_DEF .NES. "" THEN CC_QUAL= CC_QUAL + "/DEFINE=(" + CC_DEF + ")"
$ If P1 .EQS. "LINK" .OR. P2 .EQS. "LINK" THEN GOTO LINK_ONLY
$ If P1 .EQS. "BUILD" .OR. P2 .EQS. "BUILD" THEN GOTO BUILD_EXES
$ FROM = ""
$ IF F$EXTRACT(0,5,P1) .EQS. "FROM=" THEN FROM = F$EXTRACT(5,F$LENGTH(P1)-5,P1)
$ IF F$EXTRACT(0,5,P2) .EQS. "FROM=" THEN FROM = F$EXTRACT(5,F$LENGTH(P2)-5,P2)
$ INSREP = "INSERT"
$ IF FROM .NES. "" THEN INSREP = "REPLACE"
$ !
$ !
$ ! Compile and link genarch.c and then run it to create the arch.h header file
$ !
$ WSO "''CC_COMMAND'''CC_QUAL'/NOLIST/OBJECT=GENARCH.OBJ GENARCH.C"
$ 'CC_COMMAND''CC_QUAL'/NOLIST/OBJECT=GENARCH.OBJ GENARCH.C
$ LINK/NOMAP/EXE=GENARCH.EXE GENARCH.OBJ,RTL.OPT/OPT
$ GENARCH = "$" + F$ENVIRONMENT("DEFAULT") + "GENARCH.EXE"
$ GENARCH ARCH.H
$ DELETE GENARCH.EXE.*,GENARCH.OBJ.*
$ PURGE ARCH.H
$ !
$ !
$ ! Compile and link echogs.c; define ECHOGS as a command
$ !
$ WSO "''CC_COMMAND'''CC_QUAL'/NOLIST/OBJECT=ECHOGS.OBJ ECHOGS.C"
$ 'CC_COMMAND''CC_QUAL'/NOLIST/OBJECT=ECHOGS.OBJ ECHOGS.C
$ LINK/NOMAP/EXE=ECHOGS.EXE ECHOGS.OBJ,RTL.OPT/OPT
$ ECHOGS = "$" + F$ENVIRONMENT("DEFAULT") + "ECHOGS.EXE"
$ DELETE ECHOGS.OBJ;*
$ PURGE ECHOGS.EXE
$ !
$ !
$ ! Compile and link genconf.c; define GENCONF as a command
$ !
$ WSO "''CC_COMMAND'''CC_QUAL/NOLIST/OBJECT=GENCONF.OBJ GENCONF.C"
$ 'CC_COMMAND''CC_QUAL'/NOLIST/OBJECT=GENCONF.OBJ GENCONF.C
$ LINK/NOMAP/EXE=GENCONF.EXE GENCONF.OBJ,RTL.OPT/OPT
$ GENCONF = "$" + F$ENVIRONMENT("DEFAULT") + "GENCONF.EXE"
$ DELETE GENCONF.OBJ;*
$ PURGE GENCONF.EXE
$ !
$ !
$ ! Create GSSETDEV.COM, GSSETMOD.COM, and GSADDMOD.COM.
$ ! (These aren't distributed with the fileset because the .COM suffix
$ ! causes certain development tools to treat them incorrectly.)
$ !
$ !
$ OPEN/WRITE SETDEV GSSETDEV.COM
$   WRITE SETDEV "$ echogs -w 'p1'.dev - -dev 'p1' -obj 'p2 'p3 'p4 'p5 'p6 'p7 'p8"
$ CLOSE SETDEV
$ !
$ OPEN/WRITE SETMOD GSSETMOD.COM
$   WRITE SETMOD "$ if p2 .nes. """""
$   WRITE SETMOD "$ then"
$   WRITE SETMOD "$   echogs -w 'p1'.dev - 'p2 'p3 'p4 'p5 'p6 'p7 'p8"
$   WRITE SETMOD "$ else"
$   WRITE SETMOD "$   echogs -w 'p1'.dev"
$   WRITE SETMOD "$ endif"
$ CLOSE SETMOD
$ !
$ OPEN/WRITE ADDMOD GSADDMOD.COM
$   WRITE ADDMOD "$ if (p2 .nes. """") then echogs -a 'p1'.dev - 'p2 'p3 'p4 'p5 'p6 'p7 'p8"
$ CLOSE ADDMOD
$ !
$ !
$ ! Define SETDEV, SETMOD, ADDMOD as commands to execute GSSETDEV.COM,
$ ! GSSETMOD.COM and GSADDMOD.COM respectively.  Those three command
$ ! procedures make use of ECHOGS.EXE and the ECHOGS verb.
$ !
$ SETDEV = "@GSSETDEV.COM"
$ SETMOD = "@GSSETMOD.COM"
$ ADDMOD = "@GSADDMOD.COM"
$ !
$ !
$ ! Build GCONFIG_.H
$ !
$ ECHOGS -w gconfig_.h #define HAVE_SYS_TIME_H
$ !
$ ! Build GCONFIGV.H
$ !
$ ECHOGS -w gconfigv.h #define USE_ASM 0
$ ECHOGS -a gconfigv.h #define USE_FPU 1
$ ECHOGS -a gconfigv.h #define EXTEND_NAMES 0
$ !
$ ! Now generate *.dev files
$ !
$ DEV_LIST_NAMES = "FEATURE_DEVS DEVICE_DEVS DEVICE_DEVS1 DEVICE_DEVS2 DEVICE_DEVS3 DEVICE_DEVS4 DEVICE_DEVS5 DEVICE_DEVS6 DEVICE_DEVS7 DEVICE_DEVS8 DEVICE_DEVS9 DEVICE_DEVS10 DEVICE_DEVS11 DEVICE_DEVS12 DEVICE_DEVS13 DEVICE_DEVS14 DEVICE_DEVS15"
$ NDEV_MOD = 0
$ DEV_MODULES = " "
$ I = 0
$ ON WARNING THEN GOTO NO_ACTION
$ DEVS_OUTER:
$   DEV_LIST = F$ELEMENT(I," ",DEV_LIST_NAMES)
$   IF DEV_LIST .EQS. " " THEN GOTO DEVS_DONE
$   I = I+1
$   IF F$TYPE('DEV_LIST') .EQS. "" THEN GOTO DEVS_OUTER
$   IF F$EDIT('DEV_LIST',"COLLAPSE") .EQS. "" THEN GOTO DEVS_OUTER
$   J = 0
$   DEVS_INNER:
$     ACTION = F$ELEMENT(J," ",'DEV_LIST')
$     IF ACTION .EQS. " " THEN GOTO DEVS_OUTER
$     J = J+1
$     ! Replace "." with "_"
$     IF F$LOCATE(".",ACTION) .NE. F$LENGTH(ACTION) THEN -
$       ACTION = F$ELEMENT(0,".",ACTION) + "_" + F$ELEMENT(1,".",ACTION)
$     GOSUB 'ACTION'
$   GOTO DEVS_INNER
$ !
$ DEVS_DONE:
$ ON WARNING THEN CONTINUE
$ !
$ !
$ ! And now build gconfig.h and gconfigf.h
$ !
$ GOSUB GCONFIG_H
$ GOSUB GCONFIGF_H
$ !
$ DEV_MODULES = F$EDIT(DEV_MODULES,"TRIM")
$ DEV_MODULES'NDEV_MOD' = F$EDIT(DEV_MODULES,"COMPRESS")
$ IF F$LENGTH(DEV_MODULES'NDEV_MOD') .EQ. 0 THEN NDEV_MOD = NDEV_MOD - 1
$ !
$ ! Create an empty object library if compilation is started from the beginning.
$ !
$ IF FROM .EQS. "" THEN LIBRARY/CREATE GS.OLB
$ !
$ ! Now compile device modules found in the DEV_MODULES symbols
$ !
$ DEFDIR = F$PARSE(F$ENVIRONMENT("DEFAULT"),,,"DIRECTORY","SYNTAX_ONLY")
$ OPEN/WRITE OPT_FILE GS.OPT
$ OPT_LINE = "GS.OLB/LIBRARY/INCLUDE=("
$ COMMA = ""
$ !
$ I = 0
$ IDEV = 0
$ OUTER_DEV_LOOP:
$ DEV_MODULES = F$EDIT(DEV_MODULES'IDEV',"TRIM")
$ COMPILE_LOOP:
$   MODULE = F$ELEMENT(I," ",DEV_MODULES)
$   IF MODULE .EQS. " " THEN GOTO END_COMPILE
$   I = I + 1
$   NAME = F$PARSE(MODULE,,,"NAME","SYNTAX_ONLY")
$   IF NAME .EQS. FROM THEN FROM= ""
$   IF FROM .NES. "" THEN GOTO MOD_COMPILED
$   DIR  = F$PARSE(MODULE,,,"DIRECTORY","SYNTAX_ONLY") - DEFDIR
$   IF DIR .NES. ""
$   THEN
$     COPY 'MODULE'.C []
$     INC = "/INCLUDE=(''DEFDIR',''DIR')"
$   ELSE
$     INC = ""
$   ENDIF
$   WSO "''CC_COMMAND'''CC_QUAL'''INC'/NOLIST/OBJECT=''NAME'.OBJ ''MODULE'.C"
$   'CC_COMMAND''CC_QUAL''INC'/NOLIST/OBJECT='NAME'.OBJ 'NAME'.C
$   LIBRARY/'INSREP' GS.OLB 'NAME'.OBJ
$   DELETE 'NAME'.OBJ.*
$   IF DIR .NES. "" THEN DELETE 'NAME'.C;
$ MOD_COMPILED:
$   IF F$LENGTH(OPT_LINE) .GE. 70
$   THEN
$     OPT_LINE = OPT_LINE + COMMA + "-"
$     WRITE OPT_FILE OPT_LINE
$     OPT_LINE = NAME
$   ELSE
$     OPT_LINE = OPT_LINE + COMMA + NAME
$   ENDIF
$   COMMA = ","
$ GOTO COMPILE_LOOP
$ !
$ END_COMPILE:
$ I = 0
$ IDEV = IDEV + 1
$ IF IDEV .LE. NDEV_MOD THEN GOTO OUTER_DEV_LOOP
$ !
$ OPT_LINE = OPT_LINE + ")"
$ WRITE OPT_FILE OPT_LINE
$ IF F$SEARCH("SYS$SHARE:DECW$XMLIBSHR12.EXE") .NES. ""
$ THEN
$   WRITE OPT_FILE "SYS$SHARE:DECW$XMLIBSHR12.EXE/SHARE"
$   WRITE OPT_FILE "SYS$SHARE:DECW$XTLIBSHRR5.EXE/SHARE"
$   WRITE OPT_FILE "SYS$SHARE:DECW$XLIBSHR.EXE/SHARE"
$ ELSE
$   WRITE OPT_FILE "SYS$SHARE:DECW$XMLIBSHR.EXE/SHARE"
$   WRITE OPT_FILE "SYS$SHARE:DECW$XTSHR.EXE/SHARE"
$   WRITE OPT_FILE "SYS$SHARE:DECW$XLIBSHR.EXE/SHARE"
$ ENDIF
$ WRITE OPT_FILE "Ident=""gs ''GS_DOT_VERSION'"""
$ CLOSE OPT_FILE
$ !
$ !
$ ! Is the DECwindows environment about?  Must be installed in order to
$ ! build the executable program gs.exe.
$ !
$ IF F$SEARCH("SYS$SHARE:DECW$XLIBSHR.EXE") .NES. "" THEN GOTO CHECK2
$ WSO "DECwindows user environment not installed;"
$ WSO "unable to build executable programs."
$ GOTO DONE
$ !
$ CHECK2:
$ IF F$TRNLNM("DECW$INCLUDE") .NES. "" THEN GOTO BUILD_EXES
$ WSO "You must invoke @DECW$STARTUP before using this"
$ WSO "command procedure to build the executable programs."
$ GOTO DONE
$ !
$ ! Build the executables
$ !
$ BUILD_EXES:
$ !
$ DEFINE X11 DECW$INCLUDE
$ !
$ LINK_ONLY:
$ WSO "''CC_COMMAND'''CC_QUAL'/NOLIST/OBJECT=GCONFIG.OBJ GCONF.C"
$ 'CC_COMMAND''CC_QUAL/NOLIST/OBJECT=GCONFIG.OBJ GCONF.C
$ !
$ WSO "''CC_COMMAND'''CC_QUAL'/NOLIST/OBJECT=ICONFIG.OBJ ICONF.C"
$ 'CC_COMMAND''CC_QUAL/NOLIST/OBJECT=ICONFIG.OBJ ICONF.C
$ !
$ WSO "''CC_COMMAND'''CC_QUAL'/NOLIST/OBJECT=ICCINIT0.OBJ ICCINIT0.C"
$ 'CC_COMMAND''CC_QUAL/NOLIST/OBJECT=ICCINIT0.OBJ ICCINIT0.C
$ !
$ WSO "''CC_COMMAND'''CC_QUAL'/NOLIST/OBJECT=GSCDEFS.OBJ GSCDEF.C"
$ 'CC_COMMAND''CC_QUAL/NOLIST/OBJECT=GSCDEFS.OBJ GSCDEF.C
$ !
$ WSO "''CC_COMMAND'''CC_QUAL'/NOLIST/OBJECT=GS.OBJ GS.C"
$ 'CC_COMMAND''CC_QUAL/NOLIST/OBJECT=GS.OBJ GS.C
$ !
$ WSO "Linking ... "
$ WSO "LINK''L_QUAL'/NOMAP/EXE=GS.EXE GS,GCONFIG,ICONFIG,ICCINIT0,GSCDEFS,GS.OPT/OPT"
$ LINK'L_QUAL/NOMAP/EXE=GS.EXE GS,GCONFIG,ICONFIG,ICCINIT0,GSCDEFS,GS.OPT/OPT
$ !
$ IF P1 .EQS. "LINK" THEN GOTO AFTER_DEL
$ DELETE GS.OBJ.*,GCONFIG.OBJ.*,ICONFIG.OBJ.*,ICCINIT0.OBJ.*,GSCDEFS.OBJ.*
$ !
$ GOTO DONE
$ !
$ !
$ DEVS_TR:
$ ! quote the dashes so that they are not interpreted as continuation
$ ! marks when the following DCL symbol is not defined!
$   ECHOGS -w devs.tr "-" -include vms_.dev
$   ECHOGS -a devs.tr "-" 'FEATURE_DEVS'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS1'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS2'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS3'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS4'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS5'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS6'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS7'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS8'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS9'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS10'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS11'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS12'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS13'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS14'
$   ECHOGS -a devs.tr "-" 'DEVICE_DEVS15'
$   RETURN
$ !
$ GCONFIG_H:
$   GOSUB DEVS_TR
$   GOSUB VMS_DEV
$   GOSUB LIBCORE_DEV
$   GENCONF "devs.tr" libcore.dev -h gconfig.h
$   ECHOGS -a gconfig.h "#define GS_LIB_DEFAULT ""''GS_LIB_DEFAULT'"""
$   ECHOGS -a gconfig.h "#define SEARCH_HERE_FIRST ''SEARCH_HERE_FIRST'"
$   ECHOGS -a gconfig.h "#define GS_DOCDIR ""''GS_DOCDIR'"""
$   ECHOGS -a gconfig.h "#define GS_INIT ""''GS_INIT'"""
$   ECHOGS -a gconfig.h "#define GS_REVISION ''GS_REVISION'"
$   ECHOGS -a gconfig.h "#define GS_REVISIONDATE ''GS_REVISIONDATE'"
$   RETURN
$ !
$ BBOX_DEV:
$   SETMOD bbox "gdevbbox.obj"
$   ADD_DEV_MODULES = "gdevbbox.obj"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! The render/RGB device is only here as an example, but we can configure
$! it as a real device for testing.
$ RRGB_DEV:
$   SETDEV rrgb "gdevrrgb.obj"
$   ADD_DEV_MODULES = "gdevrrgb.obj gdevprn.obj"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ LIBS_DEV:
$   LIB1s = "gsalloc.obj gsbitops.obj gsbittab.obj"
$   LIB2s = "gschar.obj gscolor.obj gscoord.obj gsdevice.obj gsdevmem.obj"
$   LIB3s = "gsdparam.obj gsfont.obj gsht.obj gshtscr.obj"
$   LIB4s = "gsimage.obj gsimpath.obj gsinit.obj gsiodev.obj"
$   LIB5s = "gsline.obj gsmatrix.obj gsmemory.obj gsmisc.obj"
$   LIB6s = "gspaint.obj gsparam.obj gspath.obj gsstate.obj gsutil.obj"
$   LIBs  = "''LIB1s' ''LIB2s' ''LIB3s' ''LIB4s' ''LIB5s' ''LIB6s'"
$   echogs -w libs.dev 'LIB1s'
$   echogs -a libs.dev 'LIB2s'
$   echogs -a libs.dev 'LIB3s'
$   echogs -a libs.dev 'LIB4s'
$   echogs -a libs.dev 'LIB5s'
$   echogs -a libs.dev 'LIB6s'
$   ADDMOD libs -init gscolor
$   ADD_DEV_MODULES = "''LIBs'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ LIBX_DEV:
$   LIB1x = "gxacpath.obj gxbcache.obj"
$   LIB2x = "gxccache.obj gxccman.obj gxcht.obj gxcmap.obj gxcpath.obj"
$   LIB3x = "gxdcconv.obj gxdcolor.obj gxdither.obj gxfill.obj gxht.obj"
$   LIB4x = "gximage.obj gximage0.obj gximage1.obj gximage2.obj"
$   LIB5x = "gxpaint.obj gxpath.obj gxpath2.obj gxpcopy.obj"
$   LIB6x = "gxpdash.obj gxpflat.obj gxsample.obj gxstroke.obj"
$   LIBx  = "''LIB1x' ''LIB2x' ''LIB3x' ''LIB4x' ''LIB5x' ''LIB6x'"
$   echogs -w libx.dev 'LIB1x'
$   echogs -a libx.dev 'LIB2x'
$   echogs -a libx.dev 'LIB3x'
$   echogs -a libx.dev 'LIB4x'
$   echogs -a libx.dev 'LIB5x'
$   echogs -a libx.dev 'LIB6x'
$   addmod libx -init gximage1 gximage2
$   ADD_DEV_MODULES = "''LIBx'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ LIBD_DEV:
$   LIB1d = "gdevabuf.obj gdevddrw.obj gdevdflt.obj gdevnfwd.obj"
$   LIB2d = "gdevmem.obj gdevm1.obj gdevm2.obj gdevm4.obj gdevm8.obj"
$   LIB3d = "gdevm16.obj gdevm24.obj gdevm32.obj gdevmpla.obj"
$   LIBd  = "''LIB1d' ''LIB2d' ''LIB3d'"
$   echogs -w libd.dev 'LIB1d'
$   echogs -a libd.dev 'LIB2d'
$   echogs -a libd.dev 'LIB3d'
$   ADD_DEV_MODULES = "''LIBd'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ LIBCORE_DEV:
$   GOSUB LIBS_DEV
$   GOSUB LIBX_DEV
$   GOSUB LIBD_DEV
$   GOSUB ISCALE_DEV
$   GOSUB ROPLIB_DEV
$   SETMOD libcore
$   ADDMOD libcore -dev nullpage
$   ADDMOD libcore -include libs libx libd iscale roplib
$   RETURN
$ !
$! ---------------- File streams ---------------- #
$ SFILE_DEV:
$   sfile_="sfx''FILE_IMPLEMENTATION'.obj stream.obj"
$   SETMOD sfile "''sfile_'"
$   ADD_DEV_MODULES = "''sfile_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ CFE_DEV:
$   IF F$TYPE(cfe_) .NES. "" THEN RETURN
$   cfe_ = "scfe.obj scfetab.obj shc.obj"
$   SETMOD cfe 'cfe_'
$   ADD_DEV_MODULES = "''cfe_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ CFD_DEV:
$   IF F$TYPE(cfd_) .NES. "" THEN RETURN
$   cfd_ = "scfd.obj scfdtab.obj"
$   SETMOD cfd 'cfd_'
$   ADD_DEV_MODULES = "''cfd_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- DCT (JPEG) filters ---------------- #
$! These are used by Level 2, and by the JPEG-writing driver.
$! Encoding (compression)
$ SDCTE_DEV: 
$   IF F$TYPE(sdcte_) .NES. "" THEN RETURN
$   sdcte_ = "sdctc.obj sjpegc.obj sdcte.obj sjpege.obj"
$   GOSUB JPEGE_DEV
$   SETMOD sdcte 'sdcte_'
$   ADDMOD sdcte -include jpege
$   ADD_DEV_MODULES = "''sdcte_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! Decoding (decompression)
$ SDCTD_DEV:
$   IF F$TYPE(sdctd_) .NES. "" THEN RETURN
$   sdctd_="sdctc.obj sjpegc.obj sdctd.obj sjpegd.obj"
$   GOSUB JPEGD_DEV
$   SETMOD sdctd 'sdctd_'
$   ADDMOD sdctd -include jpegd
$   ADD_DEV_MODULES = "''sdctd_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- LZW filters ---------------- #
$! These are used by Level 2 in general.
$ LZWE_DEV:
$   IF F$TYPE(lzwe_) .NES. "" THEN RETURN
$   lzwe_ = "slzwce.obj slzwc.obj"
$   SETMOD lzwe 'lzwe_'
$   ADD_DEV_MODULES = "''lzwe_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ SLZWE_DEV:
$   COPY LZWE.DEV SLZWE.DEV
$   RETURN
$ !
$ LZWD_DEV:
$   IF F$TYPE(lzwd_) .NES. "" THEN RETURN
$   lzwd_ = "slzwd.obj slzwc.obj"
$   SETMOD lzwd 'lzwd_'
$   ADD_DEV_MODULES = "''lzwd_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ SLZWD_DEV:
$   COPY LZWD.DEV SLZWD.DEV
$   RETURN
$ !
$ PCXD_DEV:
$   pcxd_ = "spcxd.obj"
$   SETMOD pcxd 'pcxd_'
$   ADD_DEV_MODULES = "''pcxd_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ PDIFF_DEV:
$   pdiff_  = "spdiff.obj"
$   SETMOD pdiff 'pdiff_'
$   ADD_DEV_MODULES = "''pdiff_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ PNGP_DEV:
$   pngp_ = "spngp.obj"
$   SETMOD pngp 'pngp_'
$   ADD_DEV_MODULES = "''pngp_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ RLE_DEV:
$   IF F$TYPE(rle_) .NES. "" THEN RETURN
$   rle_ = "srle.obj"
$   SETMOD rle 'rle_'
$   ADD_DEV_MODULES = "''rle_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ RLD_DEV:
$   IF F$TYPE(rld_) .NES. "" THEN RETURN
$   rld_ = "srld.obj"
$   SETMOD rld 'rld_'
$   ADD_DEV_MODULES = "''rld_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ SZLIBE_DEV:
$   IF F$TYPE(szlibe_) .NES. "" THEN RETURN
$   szlibe_ = "szlibc.obj szlibe.obj"
$   GOSUB ZLIBE_DEV
$   SETMOD szlibe 'szlibe_'
$   ADDMOD szlibe -include zlibe
$   ADD_DEV_MODULES = "''szlibe_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ SZLIBD_DEV:
$   IF F$TYPE(szlibd_) .NES. "" THEN RETURN
$   szlibd_ = "szlibc.obj szlibd.obj"
$   GOSUB ZLIBD_DEV
$   SETMOD szlibd 'szlibd_'
$   ADDMOD szlibd -include zlibd
$   ADD_DEV_MODULES = "''szlibd_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! Command list package.  Currently the higher-level facilities are required,
$! but eventually they will be optional.
$ CLIST_DEV:
$   IF F$TYPE(CLIST_DONE) .NES. "" THEN RETURN
$   GOSUB CLBASE_DEV
$   GOSUB CLPATH_DEV
$   SETMOD clist -include clbase clpath
$   CLIST_DONE = 1
$   RETURN
$ !
$! Base command list facility
$ CLBASE_DEV:
$   IF F$TYPE(clbase_) .NES. "" THEN RETURN
$   clbase1_ = "gxclist.obj gxclbits.obj gxclpage.obj"
$   clbase2_ = "gxclread.obj gxclrect.obj stream.obj"
$   clbase_ = "''clbase1_' ''clbase2_'"
$   GOSUB CL'BAND_LIST_STORAGE'_DEV
$   GOSUB CFE_DEV
$   GOSUB CFD_DEV
$   GOSUB RLE_DEV
$   GOSUB RLD_DEV
$   SETMOD clbase 'clbase1_'
$   ADDMOD clbase -obj 'clbase2_'
$   ADDMOD clbase -include cl'BAND_LIST_STORAGE' cfe cfd rle rld
$   ADD_DEV_MODULES = "''clbase_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! Higher-level command list facilities.
$ CLPATH_DEV:
$   IF F$TYPE(clpath_) .NES. "" THEN RETURN
$   clpath_ = "gxclimag.obj gxclpath.obj"
$   GOSUB PSL2CS_DEV
$   SETMOD clpath 'clpath_'
$   ADDMOD clpath -include psl2cs
$   ADDMOD clpath -init climag clpath
$   ADD_DEV_MODULES = "''clpath_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ CLFILE_DEV:
$   IF F$TYPE(clfile_) .NES. "" THEN RETURN
$   clfile_ = "gxclfile.obj"
$   SETMOD clfile 'clfile_'
$   ADD_DEV_MODULES = "''clfile_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ CLMEMORY_DEV:
$   IF F$TYPE(clmemory_) .NES. "" THEN RETURN
$   clmemory_ = "gxclmem.obj gxcl'BAND_LIST_COMPRESSOR'.obj"
$   GOSUB S'BAND_LIST_COMPRESSOR'E_DEV
$   GOSUB S'BAND_LIST_COMPRESSOR'D_DEV
$   SETMOD clmemory 'clmemory_'
$   ADDMOD clmemory -include S'BAND_LIST_COMPRESSOR'E S'BAND_LIST_COMPRESSOR'D
$   ADDMOD clmemory init cl_'BAND_LIST_COMPRESSOR'
$   ADD_DEV_MODULES = "''clmemory_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ VECTOR_DEV:
$   IF F$TYPE(vector_) .NES. "" THEN RETURN
$   vector_ = "gdevvec.obj"
$   GOSUB BBOX_DEV
$   GOSUB SFILE_DEV
$   SETMOD vector "''vector_'"
$   ADDMOD vector -include bbox sfile
$   ADD_DEV_MODULES = "''vector_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ ISCALE_DEV:
$   iscale_ = "siscale.obj"
$   SETMOD iscale 'iscale_'
$   ADD_DEV_MODULES = "''iscale_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ ROPLIB_DEV:
$   roplib_ = "gdevmrop.obj gsrop.obj gsroptab.obj"
$   SETMOD roplib 'roplib_'
$   ADDMOD roplib -init roplib
$   ADD_DEV_MODULES = "''roplib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! -------- Composite (PostScript Type 0) font support -------- #
$ CMAPLIB_DEV:
$   cmaplib_="gsfcmap.obj"
$   SETMOD cmaplib "''cmaplib_'"
$   ADD_DEV_MODULES = "''cmaplib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ PSF0LIB_DEV:
$   psf0lib_ = "gschar0.obj gsfont0.obj"
$   GOSUB CMAPLIB_DEV
$   SETMOD psf0lib 'psf0lib_'
$   ADDMOD psf0lib -include cmaplib
$   ADD_DEV_MODULES = "''psf0lib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- Pattern color ---------------- #
$ PATLIB_DEV:
$   patlib_ = "gspcolor.obj gxclip2.obj gxpcmap.obj"
$   GOSUB CMYKLIB_DEV
$   GOSUB PSL2CS_DEV
$   SETMOD patlib -include cmyklib psl2cs
$   ADDMOD patlib -obj 'patlib_'
$   ADD_DEV_MODULES = "''patlib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- PostScript Type 1 (and Type 4) fonts ---------------- #
$ TYPE1LIB_INI:
$   IF F$TYPE(type1lib_) .NES. "" THEN RETURN
$   type1lib_= "gxtype1.obj gxhint1.obj gxhint2.obj gxhint3.obj"
$   ADD_DEV_MODULES = "''type1lib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$!  Type 1 charstrings
$ PSF1LIB_DEV:
$   IF F$TYPE(psf1lib_) .NES. "" THEN RETURN
$   GOSUB TYPE1LIB_INI
$   psf1lib_ = "gstype1.obj"
$   SETMOD psf1lib 'psf1lib_'
$   ADDMOD psf1lib 'type1lib_'
$   ADDMOD psf1lib -init gstype1
$   ADD_DEV_MODULES = "''psf1lib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! Type 2 charstrings
$ PSF2LIB_DEV:
$   IF F$TYPE(psf2lib_) .NES. "" THEN RETURN
$   GOSUB TYPE1LIB_INI
$   psf2lib_ = "gstype2.obj"
$   SETMOD psf2lib 'psf2lib_'
$   ADDMOD psf2lib 'type1lib_'
$   ADDMOD psf2lib -init gstype2
$   ADD_DEV_MODULES = "''psf2lib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- TrueType and PostScript Type 42 fonts ---------------- #
$ TTFLIB_DEV:
$   IF F$TYPE(ttflib_) .NES. "" THEN RETURN
$   ttflib_ = "gstype42.obj"
$   SETMOD ttflib 'ttflib_'
$   ADD_DEV_MODULES = "''ttflib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ CMYKLIB_DEV:
$   IF F$TYPE(cmyklib_) .NES. "" THEN RETURN
$   cmyklib_ = "gscolor1.obj gsht1.obj"
$   SETMOD cmyklib 'cmyklib_'
$   ADDMOD cmyklib -init gscolor1
$   ADD_DEV_MODULES = "''cmyklib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ COLIMLIB_DEV:
$   IF F$TYPE(colimlib_) .NES. "" THEN RETURN
$   colimlib_ = "gximage3.obj"
$   SETMOD colimlib 'colimlib_'
$   ADDMOD colimlib -init gximage3
$   ADD_DEV_MODULES = "''colimlib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ HSBLIB_DEV:
$   hsblib_ = "gshsb.obj"
$   SETMOD hsblib 'hsblib_'
$   ADD_DEV_MODULES = "''hsblib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ PATH1LIB_DEV:
$   path1lib_ = "gspath1.obj"
$   SETMOD path1lib 'path1lib_'
$   ADD_DEV_MODULES = "''path1lib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ PSL2CS_DEV:
$   IF F$TYPE(psl2cs_) .NES. "" THEN RETURN
$   psl2cs_ = "gscolor2.obj"
$   SETMOD psl2cs 'psl2cs_'
$   ADD_DEV_MODULES = "''psl2cs_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ PSL2LIB_DEV:
$   IF F$TYPE(psl2lib_) .NES. "" THEN RETURN
$   psl2lib_ = "gximage4.obj gximage5.obj"
$   GOSUB COLIMLIB_DEV
$   GOSUB PSL2CS_DEV
$   SETMOD psl2lib 'psl2lib_'
$   ADDMOD psl2lib -init gximage4 gximage5
$   ADDMOD psl2lib -include colimlib psl2cs
$   ADD_DEV_MODULES = "''psl2lib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- Display Postscript / Level 2 support ---------------- #
$ DPS2LIB_DEV:
$   IF F$TYPE(dps2lib_) .NES. "" THEN RETURN
$   dps2lib_ = "gsdps1.obj"
$   SETMOD dps2lib 'dps2lib_'
$   ADD_DEV_MODULES = "''dps2lib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- Display Postscript extensions ---------------- #
$ DPSLIB_DEV:
$   IF F$TYPE(dpslib_) .NES. "" THEN RETURN
$   dpslib_ = "gsdps.obj"
$   SETMOD dpslib 'dpslib_'
$   ADD_DEV_MODULES = "''dpslib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- CIE color ---------------- #
$ CIELIB_DEV:
$   IF F$TYPE(cielib_) .NES. "" THEN RETURN
$   cielib_ = "gscie.obj gxctable.obj"
$   SETMOD cielib 'cielib_'
$   ADD_DEV_MODULES = "''cielib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- Separation colors ---------------- #
$ SEPRLIB_DEV:
$   seprlib_ = "gscsepr.obj"
$   SETMOD seprlib 'seprlib_'
$   ADD_DEV_MODULES = "''seprlib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- Functions ---------------- #
$! Generic support, and FunctionType 0.
$ FUNCLIB_DEV:
$   IF F$TYPE(funclib_) .NES. "" THEN RETURN
$   funclib_ = "gsdsrc.obj gsfunc.obj gsfunc0.obj"
$   SETMOD funclib "''funclib_'"
$   ADD_DEV_MODULES = "''funclib_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ ISUPPORT_DEV:
$   IF F$TYPE(isupport1_) .NES. "" THEN RETURN
$   isupport1_ = "ialloc.obj igc.obj igcref.obj igcstr.obj"
$   isupport2_ = "ilocate.obj iname.obj isave.obj"
$   isupport_  = "''isupport1_' ''isupport2_'"
$   SETMOD isupport 'isupport1_'
$   ADDMOD isupport -obj 'isupport2_'
$   ADDMOD isupport -init igcref
$   ADD_DEV_MODULES = "''isupport_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ PSBASE_DEV:
$   IF F$TYPE(INT_CONFIG) .NES. "" THEN RETURN
$   INT1  = "idebug.obj idict.obj idparam.obj"
$   INT2  = "iinit.obj interp.obj iparam.obj ireclaim.obj"
$   INT3  = "iscan.obj iscannum.obj istack.obj iutil.obj"
$   INT4  = "scantab.obj sfilter1.obj sstring.obj stream.obj"
$   Z1    = "zarith.obj zarray.obj zcontrol.obj zdict.obj"
$   Z1OPS = "zarith zarray zcontrol zdict"
$   Z2    = "zfile.obj zfileio.obj zfilter.obj zfname.obj zfproc.obj"
$   Z2OPS = "zfile zfileio zfilter zfproc"
$   Z3    = "zgeneric.obj ziodev.obj zmath.obj zmisc.obj zpacked.obj"
$   Z3OPS = "zgeneric ziodev zmath zmisc zpacked"
$   Z4    = "zrelbit.obj zstack.obj zstring.obj zsysvm.obj"
$   Z4OPS = "zrelbit zstack zstring zsysvm"
$   Z5    = "ztoken.obj ztype.obj zvmem.obj"
$   Z5OPS = "ztoken ztype zvmem"
$   Z6    = "zchar.obj zcolor.obj zdevice.obj zfont.obj zfont2.obj"
$   Z6OPS = "zchar zcolor zdevice zfont zfont2"
$   Z7    = "zgstate.obj zht.obj zimage.obj zmatrix.obj zpaint.obj zpath.obj"
$   Z7OPS = "zgstate zht zimage zmatrix zpaint zpath"
$   INT_OBJS = "imainarg.obj gsargs.obj imain.obj ''INT1' ''INT2' ''INT3' ''INT4'"
$   Z_OBJS   = "''Z1' ''Z2' ''Z3' ''Z4' ''Z5' ''Z6' ''Z7'"
$   INT_CONFIG = "gconfig.obj gscdefs.obj iconfig.obj iccinit0.obj"
$   GOSUB ISUPPORT_DEV
$   GOSUB RLD_DEV
$   GOSUB RLE_DEV
$   GOSUB SFILE_DEV
$   SETMOD psbase imainarg.obj gsargs.obj imain.obj
$   ADDMOD psbase -obj 'INT_CONFIG'
$   ADDMOD psbase -obj 'INT1'
$   ADDMOD psbase -obj 'INT2'
$   ADDMOD psbase -obj 'INT3'
$   ADDMOD psbase -obj 'INT4'
$   ADDMOD psbase -obj 'Z1'
$   ADDMOD psbase -oper 'Z1OPS'
$   ADDMOD psbase -obj 'Z2'
$   ADDMOD psbase -oper 'Z2OPS'
$   ADDMOD psbase -obj 'Z3'
$   ADDMOD psbase -oper 'Z3OPS'
$   ADDMOD psbase -obj 'Z4'
$   ADDMOD psbase -oper 'Z4OPS'
$   ADDMOD psbase -obj 'Z5'
$   ADDMOD psbase -oper 'Z5OPS'
$   ADDMOD psbase -obj 'Z6'
$   ADDMOD psbase -oper 'Z6OPS'
$   ADDMOD psbase -obj 'Z7'
$   ADDMOD psbase -oper 'Z7OPS'
$   ADDMOD psbase -iodev stdin stdout stderr lineedit statementedit
$   ADDMOD psbase -include isupport rld rle sfile
$   ADD_DEV_MODULES = "''INT_OBJS'"
$   GOSUB ADD_DEV_MOD
$   ADD_DEV_MODULES = "''Z_OBJS'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ LEVEL1_DEV:
$   GOSUB PSBASE_DEV
$   GOSUB BCP_DEV
$   GOSUB HSB_DEV
$   GOSUB PATH1_DEV
$   GOSUB TYPE1_DEV
$   SETMOD level1 -include psbase bcp hsb path1 type1
$   ADDMOD level1 -emulator """PostScript""" """PostScriptLevel1"""
$   RETURN
$ !
$ COLOR_DEV:
$   IF F$TYPE(COLOR_DONE) .NES. "" THEN RETURN
$   GOSUB CMYKLIB_DEV
$   GOSUB COLIMLIB_DEV
$   GOSUB CMYKREAD_DEV
$   SETMOD color -include cmyklib colimlib cmykread
$   COLOR_DONE = 1
$   RETURN
$ !
$ CMYKREAD_DEV:
$   IF F$TYPE(cmykread_) .NES. "" THEN RETURN
$   cmykread_ = "zcolor1.obj zht1.obj"
$   SETMOD cmykread 'cmykread_'
$   ADDMOD cmykread -oper zcolor1 zht1
$   ADD_DEV_MODULES = "''cmykread_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ HSB_DEV:
$   hsb_ = "zhsb.obj"
$   GOSUB HSBLIB_DEV
$   SETMOD hsb 'hsb_'
$   ADDMOD hsb -include hsblib
$   ADDMOD hsb -oper zhsb
$   ADD_DEV_MODULES = "''hsb_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ PATH1_DEV:
$   path1_ = "zpath1.obj"
$   GOSUB PATH1LIB_DEV
$   SETMOD path1 'path1_'
$   ADDMOD path1 -include path1lib
$   ADDMOD path1 -oper zpath1
$   ADD_DEV_MODULES = "''path1_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ BCP_DEV:
$   bcp_ = "sbcp.obj zfbcp.obj"
$   SETMOD bcp 'bcp_'
$   ADDMOD bcp -oper zfbcp
$   ADD_DEV_MODULES = "''bcp_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ DISKFONT_DEV:
$   SETMOD diskfont -ps gs_diskf
$   RETURN
$ !
$ DOUBLE_DEV:
$   IF F$TYPE(double_) .NES. "" THEN RETURN
$   double_ = "zdouble.obj"
$   SETMOD double 'double_'
$   ADDMOD double -oper zdouble
$   ADD_DEV_MODULES = "''double_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ EPSF_DEV:
$   SETMOD epsf -ps gs_epsf
$   RETURN
$ !
$! ---------------- PostScript Type 1 (and Type 4) fonts ---------------- #
$ TYPE1_DEV:
$   IF F$TYPE(TYPE1_DONE) .NES. "" THEN RETURN
$   GOSUB PSF1LIB_DEV
$   GOSUB PSF1READ_DEV
$   SETMOD type1 -include psf1lib psf1read
$   TYPE1_DONE = 1
$   RETURN
$ !
$ PSF1READ_DEV:
$   IF F$TYPE(psf1read_) .NES. "" THEN RETURN
$   psf1read_ = "seexec.obj zchar1.obj zcharout.obj zfont1.obj zmisc1.obj"
$   SETMOD psf1read 'psf1read_'
$   ADDMOD psf1read -oper zchar1 zfont1 zmisc1
$   ADDMOD psf1read -ps gs_type1
$   ADD_DEV_MODULES = "''psf1read_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ------------- Compact Font Format and Type 2 charstrings ------------- #
$ CFF_DEV:
$   GOSUB PSL2INT_DEV
$   SETMOD cff -ps gs_cff
$   RETURN
$!
$ TYPE2_DEV:
$   GOSUB TYPE1_DEV
$   GOSUB PSF2LIB_DEV
$   SETMOD type2 -include psf2lib
$   RETURN
$!
$! ---------------- TrueType and PostScript Type 42 fonts ---------------- #
$! Native TrueType support
$ TTFONT_DEV:
$   GOSUB TYPE42_DEV
$   SETMOD ttfont -include type42
$   ADDMOD ttfont -ps gs_mro_e gs_wan_e gs_ttf
$   RETURN
$ !
$! Type 42 (embedded TrueType) support
$ TYPE42_DEV:
$   IF F$TYPE(type42read_) .NES. "" THEN RETURN
$   type42read_ = "zchar42.obj zcharout.obj zfont42.obj"
$   GOSUB TTFLIB_DEV
$   SETMOD type42 'type42read_'
$   ADDMOD type42 -include ttflib
$   ADDMOD type42 -oper zchar42 zfont42
$   ADDMOD type42 -ps gs_typ42
$   ADD_DEV_MODULES = "''type42read_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ GCONFIGF_H:
$   SETMOD ccfonts_ -font "''ccfonts1'"
$   ADDMOD ccfonts_ -font "''ccfonts2'"
$   ADDMOD ccfonts_ -font "''ccfonts3'"
$   ADDMOD ccfonts_ -font "''ccfonts4'"
$   ADDMOD ccfonts_ -font "''ccfonts5'"
$   ADDMOD ccfonts_ -font "''ccfonts6'"
$   ADDMOD ccfonts_ -font "''ccfonts7'"
$   ADDMOD ccfonts_ -font "''ccfonts8'"
$   ADDMOD ccfonts_ -font "''ccfonts9'"
$   ADDMOD ccfonts_ -font "''ccfonts10'"
$   ADDMOD ccfonts_ -font "''ccfonts11'"
$   ADDMOD ccfonts_ -font "''ccfonts12'"
$   ADDMOD ccfonts_ -font "''ccfonts13'"
$   ADDMOD ccfonts_ -font "''ccfonts14'"
$   ADDMOD ccfonts_ -font "''ccfonts15'"
$   GENCONF ccfonts_.dev -n gs -f gconfigf.h
$   RETURN
$ !

$! ======================== PostScript Level 2 ======================== #
$ LEVEL2_DEV:
$   GOSUB CIDFONT_DEV
$   GOSUB CIE_DEV
$   GOSUB CMAPREAD_DEV
$   GOSUB COMPFONT_DEV
$   GOSUB DCT_DEV
$   GOSUB DEVCTRL_DEV
$   GOSUB DPSAND2_DEV
$   GOSUB FILTER_DEV
$   GOSUB LEVEL1_DEV
$   GOSUB PATTERN_DEV
$   GOSUB PSL2LIB_DEV
$   GOSUB PSL2READ_DEV
$   GOSUB SEPR_DEV
$   GOSUB TYPE42_DEV
$   GOSUB XFILTER_DEV
$   SETMOD level2 -include cidfont cie cmapread compfont
$   SETMOD level2 -include dct devctrl dpsand2 filter
$   ADDMOD level2 -include level1 pattern psl2lib psl2read
$   ADDMOD level2 -include sepr type42 xfilter
$   ADDMOD level2 -emulator """PostScript""" """PostScriptLevel2"""
$   RETURN
$ !
$! Define basic Level 2 language support.
$! This is the minimum required for CMap and CIDFont support.
$ PSL2INT_DEV:
$   IF F$TYPE(psl2int_) .NES. "" THEN RETURN
$   psl2int_="iutil2.obj zmisc2.obj zusparam.obj"
$   GOSUB DPS2INT_DEV
$   SETMOD psl2int "''psl2int_'"
$   ADDMOD psl2int -include dps2int
$   ADDMOD psl2int -oper zmisc2 zusparam
$   ADDMOD psl2int -ps gs_lev2 gs_res
$   ADD_DEV_MODULES = "''psl2int_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$!
$! Define full Level 2 support.
$ PSL2READ_DEV:
$   IF F$TYPE(psl2read_) .NES. "" THEN RETURN
$   psl2read_  = "zcolor2.obj zcsindex.obj zht2.obj zimage2.obj"
$   GOSUB PSL2INT_DEV
$   GOSUB DPS2READ_DEV
$   SETMOD psl2read 'psl2read_'
$   ADDMOD psl2read -include psl2int dps2read
$   ADDMOD psl2read -oper zcolor2_l2 zcsindex_l2
$   ADDMOD psl2read -oper zht2_l2 zimage2_l2
$   ADD_DEV_MODULES = "''psl2read_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ DEVCTRL_DEV:
$   devctrl_ = "zdevice2.obj ziodev2.obj zmedia2.obj zdevcal.obj"
$   SETMOD devctrl 'devctrl_'
$   ADDMOD devctrl -oper zdevice2_l2 ziodev2_l2 zmedia2_l2
$   ADDMOD devctrl -iodev null ram calendar
$   ADDMOD devctrl -ps gs_setpd
$   ADD_DEV_MODULES = "''devctrl_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ FDECODE_DEV:
$   IF F$TYPE(fdecode_) .NES. "" THEN RETURN
$   fdecode_ = "scantab.obj sfilter2.obj zfdecode.obj"
$   GOSUB CFD_DEV
$   GOSUB LZWD_DEV
$   GOSUB PDIFF_DEV
$   GOSUB PNGP_DEV
$   GOSUB RLD_DEV
$   SETMOD fdecode 'fdecode_'
$   ADDMOD fdecode -include cfd lzwd pdiff pngp rld
$   ADDMOD fdecode -oper zfdecode
$   ADD_DEV_MODULES = "''fdecode_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ FILTER_DEV:
$   filter_  = "zfilter2.obj"
$   GOSUB FDECODE_DEV
$   GOSUB CFE_DEV
$   GOSUB LZWE_DEV
$   GOSUB RLE_DEV
$   SETMOD filter -include fdecode
$   ADDMOD filter -obj 'filter_'
$   ADDMOD filter -include cfe lzwe rle
$   ADDMOD filter -oper zfilter2
$   ADD_DEV_MODULES = "''filter_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ XFILTER_DEV:
$   xfilter_ = "sbhc.obj sbwbs.obj shcgen.obj smtf.obj zfilterx.obj"
$   GOSUB PCXD_DEV
$   GOSUB PNGP_DEV
$   SETMOD xfilter 'xfilter_'
$   ADDMOD xfilter -include pcxd
$   ADDMOD xfilter -oper zfilterx
$   ADD_DEV_MODULES = "''xfilter_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ BTOKEN_DEV:
$   btoken_ = "iscanbin.obj zbseq.obj"
$   SETMOD btoken 'btoken_'
$   ADDMOD btoken -oper zbseq_l2
$   ADDMOD btoken -ps gs_btokn
$   ADD_DEV_MODULES = "''btoken_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ UPATH_DEV:
$   upath_ = "zupath.obj ibnum.obj"
$   SETMOD upath 'upath_'
$   ADDMOD upath -oper zupath_l2
$   ADD_DEV_MODULES = "''upath_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! -------- Additions common to Display PostScript and Level 2 -------- #
$ DPSAND2_DEV:
$   GOSUB BTOKEN_DEV
$   GOSUB COLOR_DEV
$   GOSUB UPATH_DEV
$   GOSUB DPS2LIB_DEV
$   GOSUB DPS2READ_DEV
$   SETMOD dpsand2 -include btoken color upath dps2lib dps2read
$   RETURN
$ !
$! Note that zvmem2 includes both Level 1 and Level 2 operators.
$ DPS2INT_DEV:
$   IF F$TYPE(dps2int_) .NES. "" THEN RETURN
$   dps2int_="zvmem2.obj zdps1.obj"
$   SETMOD dps2int "''dps2int_'"
$   ADDMOD dps2int -oper zvmem2 zdps1_l2
$   ADDMOD dps2int -ps gs_dps1
$   ADD_DEV_MODULES = "''dps2int_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$!
$ DPS2READ_DEV:
$   IF F$TYPE(dps2read_) .NES. "" THEN RETURN
$   dps2read_ = "ibnum.obj zchar2.obj"
$   GOSUB DPS2INT_DEV
$   SETMOD dps2read 'dps2read_'
$   ADDMOD dps2read -include dps2int
$   ADDMOD dps2read -oper ireclaim_l2 zchar2_l2
$   ADDMOD dps2read -ps gs_dps2
$   ADD_DEV_MODULES = "''dps2read_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- Display PostScript ---------------- #
$ DPS_DEV:
$   dps_ = "zdps.obj icontext.obj zcontext.obj"
$   GOSUB DPSLIB_DEV
$   GOSUB LEVEL2_DEV
$   SETMOD dps -include dpslib level2
$   ADDMOD dps -obj 'dps_'
$   ADDMOD dps -oper zcontext zdps
$   ADDMOD dps -ps gs_dps
$   ADD_DEV_MODULES = "''dps_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- NeXT Display PostScript ---------------- #
$!**************** NOT READY FOR USE YET ****************#
$!
$! DPSNEXT_DEV:
$!   dpsnext_ = "zdpnext.obj"
$!   GOSUB DPS_DEV
$!   SETMOD dpsnext -include dps
$!   ADDMOD dpsnext -obj "''dpsnext_'"
$!   ADDMOD dpsnext -oper zdpnext
$!   ADDMOD dpsnext -ps gs_dpnxt
$!   ADD_DEV_MODULES = "''dpsnext_'"
$!   GOSUB ADD_DEV_MOD
$!   RETURN
$ !
$ COMPFONT_DEV:
$   GOSUB PSF0LIB_DEV
$   GOSUB PSF0READ_DEV
$   SETMOD compfont -include psf0lib psf0read
$   RETURN
$ !
$ PSF0READ_DEV:
$   psf0read_ = "zchar2.obj zfcmap.obj zfont0.obj"
$   SETMOD psf0read 'psf0read_'
$   ADDMOD psf0read -oper zfont0 zchar2 zfcmap
$   ADD_DEV_MODULES = "''psf0read_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- CMap support ---------------- #
$ CMAPREAD_DEV:
$   IF F$TYPE(cmapread_) .NES. "" THEN RETURN
$   cmapread_="zfcmap.obj"
$   GOSUB CMAPLIB_DEV
$   GOSUB PSL2INT_DEV
$   SETMOD cmapread "''cmapread_'"
$   ADDMOD cmapread -include cmaplib psl2int
$   ADDMOD cmapread -oper zfcmap
$   ADDMOD cmapread -ps gs_cmap
$   ADD_DEV_MODULES = "''cmapread_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$!
$ CIDFONT_DEV:
$   IF F$TYPE(cidread_) .NES. "" THEN RETURN
$   cidread_ = "zcid.obj"
$   GOSUB PSF1READ_DEV
$   GOSUB PSL2INT_DEV
$   GOSUB TYPE42_DEV
$   SETMOD cidfont 'cidread_'
$   ADDMOD cidfont -include psf1read psl2int type42
$   ADDMOD cidfont -ps -gs_cidfn
$   ADDMOD cidfont -oper zcid
$   ADD_DEV_MODULES = "''cidread_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ CIE_DEV:
$   IF F$TYPE(cieread_) .NES. "" THEN RETURN
$   cieread_ = "zcie.obj zcrd.obj"
$   GOSUB CIELIB_DEV
$   SETMOD cie 'cieread_'
$   ADDMOD cie -oper zcie_l2 zcrd_l2
$   ADDMOD cie -include cielib
$   ADD_DEV_MODULES = "''cieread_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ PATTERN_DEV:
$   GOSUB PATLIB_DEV
$   GOSUB PATREAD_DEV
$   SETMOD pattern -include patlib patread
$   RETURN
$ !
$ PATREAD_DEV:
$   patread_ = "zpcolor.obj"
$   SETMOD patread 'patread_'
$   ADDMOD patread -oper zpcolor_l2
$   ADD_DEV_MODULES = "''patread_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ SEPR_DEV:
$   seprread_ = "zcssepr.obj"
$   GOSUB SEPRLIB_DEV
$   SETMOD sepr 'seprread_'
$   ADDMOD sepr -oper zcssepr_l2
$   ADDMOD sepr -include seprlib
$   ADD_DEV_MODULES = "''seprread_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- Functions ---------------- #
$! Generic support, and FunctionType 0.
$ FUNC_DEV:
$   IF F$TYPE(funcread_) .NES. "" THEN RETURN
$   funcread_ = "zfunc.obj zfunc0.obj"
$   GOSUB FUNCLIB_DEV
$   SETMOD func 'funcread_'
$   ADDMOD func -oper zfunc zfunc0
$   ADDMOD func -include funclib
$   ADD_DEV_MODULES = "''funcread_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- DCT filters ---------------- #
$ DCT_DEV:
$   IF F$TYPE(dctc__) .NES. "" THEN RETURN
$   dctc_="zfdctc.obj"
$   GOSUB DCTE_DEV
$   GOSUB DCTD_DEV
$   SETMOD dct -include dcte dctd
$   ADD_DEV_MODULES = "''dctc_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! Encoding (compression)
$ DCTE_DEV:
$   IF F$TYPE(dcte_) .NES. "" THEN RETURN
$   dcte_ = "''dctc_' zfdcte.obj"
$   GOSUB SDCTE_DEV
$   SETMOD dcte -include sdcte
$   ADDMOD dcte -obj 'dcte_'
$   ADDMOD dcte -oper zfdcte
$   ADD_DEV_MODULES = "''dcte_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! Decoding (decompression)
$ DCTD_DEV:
$   IF F$TYPE(dctd_) .NES. "" THEN RETURN
$   dctd_ = "''dctc_' zfdctd.obj"
$   GOSUB SDCTD_DEV
$   SETMOD dctd -include sdctd
$   ADDMOD dctd -obj 'dctd_'
$   ADDMOD dctd -oper zfdctd
$   ADD_DEV_MODULES = "''dctd_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ---------------- zlib/Flate filters ---------------- #
$ FZLIB_DEV:
$   GOSUB SZLIBE_DEV
$   GOSUB SZLIBD_DEV
$   SETMOD fzlib -include szlibe szlibd
$   ADDMOD fzlib -obj zfzlib.obj
$   ADDMOD fzlib -oper zfzlib
$   ADD_DEV_MODULES = "zfzlib.obj"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ================================ PDF ================================ #
$ PDFMIN_DEV:
$   GOSUB PSBASE_DEV
$   GOSUB COLOR_DEV
$   GOSUB DPS2LIB_DEV
$   GOSUB DPS2READ_DEV
$   GOSUB FDECODE_DEV
$   GOSUB TYPE1_DEV
$   GOSUB PDFFONTS_DEV
$   GOSUB PSL2LIB_DEV
$   GOSUB PSL2READ_DEV
$   GOSUB PDFREAD_DEV
$   SETMOD pdfmin -include psbase color dps2lib dps2read
$   ADDMOD pdfmin -include fdecode type1
$   ADDMOD pdfmin -include pdffonts psl2lib psl2read pdfread
$   ADDMOD pdfmin -emulator """PDF"""
$   RETURN
$ !
$ PDF_DEV:
$   GOSUB PDFMIN_DEV
$   GOSUB CFF_DEV
$   GOSUB CIDFONT_DEV
$   GOSUB CIE_DEV
$   GOSUB COMPFONT_DEV
$   GOSUB CMAPREAD_DEV
$   GOSUB DCTD_DEV
$   GOSUB FUNC_DEV
$   GOSUB TTFONT_DEV
$   GOSUB TYPE2_DEV
$   SETMOD pdf -include pdfmin cff cidfont cie cmapread
$   ADDMOD pdf -include compfont dctd func ttfont type2
$   RETURN
$ !
$! Reader only
$ PDFFONTS_DEV:
$   SETMOD pdffonts -ps gs_mex_e gs_mro_e gs_pdf_e gs_wan_e
$   RETURN
$ !
$ PDFREAD_DEV:
$   GOSUB FZLIB_DEV
$   SETMOD pdfread -include fzlib
$   ADDMOD pdfread -ps gs_pdf gs_l2img
$   ADDMOD pdfread -ps pdf_base pdf_draw pdf_font pdf_main pdf_sec
$   ADDMOD pdfread -ps pdf_2ps
$   RETURN
$ !
$ JPEGC_DEV:
$   IF F$TYPE(jpegc_) .NES. "" THEN RETURN
$   jpegc_ = "jcomapi.obj jutils.obj sjpegerr.obj jmemmgr.obj"
$   COPY GSJCONF.H JCONFIG.H
$   COPY GSJMOREC.H JMORECFG.H
$   COPY 'JSRCDIR'JMORECFG.H []JMCORIG.H
$   COPY 'JSRCDIR'JERROR.H   []JERROR.H
$   COPY 'JSRCDIR'JINCLUDE.H []JINCLUDE.H
$   COPY 'JSRCDIR'JPEGLIB.H  []JPEGLIB.H
$   COPY 'JSRCDIR'JVERSION.H []JVERSION.H
$   SETMOD JPEGC 'jpegc_'
$   ADD_DEV_MODULES = "''JSRCDIR'jcomapi.obj ''JSRCDIR'jutils.obj " +-
     "sjpegerr.obj ''JSRCDIR'jmemmgr.obj"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ JPEGE_DEV:
$   IF F$TYPE(jpege6) .NES. "" THEN RETURN
$   jpege5 = "jcapi.obj"
$   jpege6 = "jcapimin.obj jcapistd.obj jcinit.obj"
$   jpege_1 = "jccoefct.obj jccolor.obj jcdctmgr.obj"
$   jpege_2 = "jchuff.obj jcmainct.obj jcmarker.obj jcmaster.obj"
$   jpege_3 = "jcparam.obj jcprepct.obj jcsample.obj jfdctint.obj"
$   GOSUB JPEGC_DEV
$   IF JVERSION .EQ. 5 THEN SETMOD jpege 'jpege5'
$   IF JVERSION .EQ. 6 THEN SETMOD jpege 'jpege6'
$   ADDMOD jpege -include jpegc
$   ADDMOD jpege -obj 'jpege_1'
$   ADDMOD jpege -obj 'jpege_2'
$   ADDMOD jpege -obj 'jpege_3'
$   IF JVERSION .EQ. 5 THEN ADD_DEV_MODULES = "''JSRCDIR'jcapi.obj"
$   IF JVERSION .EQ. 6 THEN ADD_DEV_MODULES = "''JSRCDIR'jcapimin.obj " +-
     "''JSRCDIR'jcapistd.obj ''JSRCDIR'jcinit.obj"
$   GOSUB ADD_DEV_MOD
$   ADD_DEV_MODULES = "''JSRCDIR'jccoefct.obj ''JSRCDIR'jccolor.obj " +-
     "''JSRCDIR'jcdctmgr.obj"
$   GOSUB ADD_DEV_MOD
$   ADD_DEV_MODULES = "''JSRCDIR'jchuff.obj ''JSRCDIR'jcmainct.obj " +-
     "''JSRCDIR'jcmarker.obj ''JSRCDIR'jcmaster.obj"
$   GOSUB ADD_DEV_MOD
$   ADD_DEV_MODULES = "''JSRCDIR'jcparam.obj ''JSRCDIR'jcprepct.obj " +-
     "''JSRCDIR'jcsample.obj ''JSRCDIR'jfdctint.obj"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ JPEGD_DEV:
$   IF F$TYPE(jpegd6) .NES. "" THEN RETURN
$   jpegd5 = "jdapi.obj"
$   jpegd6 = "jdapimin.obj jdapistd.obj jdinput.obj jdphuff.obj"
$   jpegd_1 = "jdcoefct.obj jdcolor.obj"
$   jpegd_2 = "jddctmgr.obj jdhuff.obj jdmainct.obj jdmarker.obj"
$   jpegd_3 = "jdmaster.obj jdpostct.obj jdsample.obj jidctint.obj"
$   GOSUB JPEGC_DEV
$   IF JVERSION .EQ. 5 THEN SETMOD jpegd 'jpegd5'
$   IF JVERSION .EQ. 6 THEN SETMOD jpegd 'jpegd6'
$   ADDMOD jpegd -include jpegc
$   ADDMOD jpegd -obj 'jpegd_1'
$   ADDMOD jpegd -obj 'jpegd_2'
$   ADDMOD jpegd -obj 'jpegd_3'
$   IF JVERSION .EQ. 5 THEN ADD_DEV_MODULES = "''JSRCDIR'jdapi.obj"
$   IF JVERSION .EQ. 6 THEN ADD_DEV_MODULES = "''JSRCDIR'jdapimin.obj " +-
     "''JSRCDIR'jdapistd.obj ''JSRCDIR'jdinput.obj ''JSRCDIR'jdphuff.obj"
$   GOSUB ADD_DEV_MOD
$   ADD_DEV_MODULES = "''JSRCDIR'jdcoefct.obj ''JSRCDIR'jdcolor.obj"
$   GOSUB ADD_DEV_MOD
$   ADD_DEV_MODULES = "''JSRCDIR'jddctmgr.obj ''JSRCDIR'jdhuff.obj " +-
     "''JSRCDIR'jdmainct.obj ''JSRCDIR'jdmarker.obj"
$   GOSUB ADD_DEV_MOD
$   ADD_DEV_MODULES = "''JSRCDIR'jdmaster.obj ''JSRCDIR'jdpostct.obj " +-
     "''JSRCDIR'jdsample.obj ''JSRCDIR'jidctint.obj"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ LIBPNG_DEV:
$   IF F$TYPE(png_) .NES. "" THEN RETURN
$   png_1 = "png.obj pngmem.obj pngerror.obj"
$   png_2 = "pngtrans.obj pngwrite.obj pngwtran.obj pngwutil.obj"
$   png_  = "gdevpng.obj gdevpccm.obj gdevprn.obj"
$   COPY 'PSRCDIR'PNG.H     []PNG.H
$   COPY 'PSRCDIR'PNGCONF.H []PNGCONF.H
$   GOSUB ZLIBE_DEV
$   IF PVERSION .EQ. 88 THEN SETMOD libpng "pngio.obj"
$   IF PVERSION .EQ. 89 THEN SETMOD libpng "pngwio.obj"
$   IF PVERSION .GE. 90
$     THEN
$       GOSUB CRC32_DEV
$       SETMOD libpng "pngwio.obj" -include crc32
$     ENDIF
$   ADDMOD libpng -obj 'png_1'
$   ADDMOD libpng -obj 'png_2'
$   ADDMOD libpng -include zlibe
$   ADD_DEV_MODULES = "''PSRCDIR'png.obj ''PSRCDIR'pngmem.obj "
$   IF PVERSION .EQ. 88 THEN ADD_DEV_MODULES = ADD_DEV_MODULES +-
     "''PSRCDIR'pngio.obj ''PSRCDIR'pngerror.obj"
$   IF PVERSION .GT. 89 THEN ADD_DEV_MODULES = ADD_DEV_MODULES +-
     "''PSRCDIR'pngwio.obj ''PSRCDIR'pngerror.obj"
$   GOSUB ADD_DEV_MOD
$   ADD_DEV_MODULES = "''PSRCDIR'pngtrans.obj ''PSRCDIR'pngwrite.obj " +-
     "''PSRCDIR'pngwtran.obj ''PSRCDIR'pngwutil.obj"
$   GOSUB ADD_DEV_MOD
$   ADD_DEV_MODULES = "''png_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! Code common to compression and decompression.
$ ZLIBC_DEV:
$   COPY 'ZSRCDIR'ZCONF.H   []ZCONF.H
$   COPY 'ZSRCDIR'ZLIB.H    []ZLIB.H
$   COPY 'ZSRCDIR'ZUTIL.H   []ZUTIL.H
$   COPY 'ZSRCDIR'DEFLATE.H []DEFLATE.H
$   zlibc_ = "zutil.obj"
$   SETMOD zlibc 'zlibc_'
$   ADD_DEV_MODULES = "''ZSRCDIR'zutil.obj"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! Encoding (compression) code.
$ ZLIBE_DEV:
$   IF F$TYPE(zlibe_) .NES. "" THEN RETURN
$   zlibe_ = "adler32.obj deflate.obj trees.obj"
$   GOSUB ZLIBC_DEV
$   SETMOD zlibe 'zlibe_'
$   ADDMOD zlibe -include zlibc
$   ADD_DEV_MODULES = "''ZSRCDIR'adler32.obj ''ZSRCDIR'deflate.obj " +-
     "''ZSRCDIR'trees.obj"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! The zlib filters per se don't need crc32, but libpng versions starting
$! with 0.90 do.
$ CRC32_DEV:
$   SETMOD crc32 "crc32.obj"
$   ADD_DEV_MODULES = "''ZSRCDIR'crc32.obj"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! Decoding (decompression) code.
$ ZLIBD_DEV:
$   IF F$TYPE(zlibd_) .NES. "" THEN RETURN
$   zlibd1_ = "infblock.obj infcodes.obj inffast.obj"
$   zlibd2_ = "inflate.obj inftrees.obj infutil.obj"
$   zlibd_  = "''zlibd1_' ''zlibd2_'"
$   GOSUB ZLIBC_DEV
$   SETMOD zlibd 'zlibd1_'
$   ADDMOD zlibd -obj 'zlibd2_'
$   ADDMOD zlibe -include zlibc
$   ADD_DEV_MODULES =-
     "''ZSRCDIR'infblock.obj ''ZSRCDIR'infcodes.obj ''ZSRCDIR'inffast.obj " +-
     "''ZSRCDIR'inflate.obj ''ZSRCDIR'inftrees.obj ''ZSRCDIR'infutil.obj"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ X11DEV_INIT:
$   x11_  = "gdevx.obj gdevxini.obj gdevxxf.obj gdevemap.obj"
$   x11alt_ = "''x11_' gdevxalt.obj"
$   XLIBS = "Xt Xext X11"
$   ADD_DEV_MODULES = "''x11alt_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ X11_DEV:
$   IF F$TYPE(x11_) .EQS. "" THEN GOSUB X11DEV_INIT
$   SETDEV x11 'x11_'
$   ADDMOD x11 -lib 'XLIBS'
$   RETURN
$ !
$ X11ALPHA_DEV:
$   IF F$TYPE(x11_) .EQS. "" THEN GOSUB X11DEV_INIT
$   SETDEV x11alpha 'x11alt_'
$   ADDMOD x11alpha -lib 'XLIBS'
$   RETURN
$ !
$ X11CMYK_DEV:
$   IF F$TYPE(x11_) .EQS. "" THEN GOSUB X11DEV_INIT
$   SETDEV x11cmyk 'x11alt_'
$   ADDMOD x11cmyk -lib 'XLIBS'
$   RETURN
$ !
$ X11GRAY2_DEV:
$   IF F$TYPE(x11_) .EQS. "" THEN GOSUB X11DEV_INIT
$   SETDEV x11gray2 'x11alt_'
$   ADDMOD x11gray2 -lib 'XLIBS'
$   RETURN
$ !
$ X11MONO_DEV:
$   IF F$TYPE(x11_) .EQS. "" THEN GOSUB X11DEV_INIT
$   SETDEV x11mono 'x11alt_'
$   ADDMOD x11mono -lib 'XLIBS'
$   RETURN
$ !
$ LN03_INIT:
$   ln03_ = "gdevln03.obj gdevprn.obj"
$   ADD_DEV_MODULES = "''ln03_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ SXLCRT_DEV:
$   IF F$TYPE(ln03_) .EQS. "" THEN GOSUB LN03_INIT
$   SETDEV sxlcrt 'ln03_'
$   RETURN
$ !
$ BJDEV_INIT:
$   bj10e_ = "gdevbj10.obj gdevprn.obj"
$   GOSUB CLIST_DEV
$   ADD_DEV_MODULES = "''bj10e_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ BJ10E_DEV:
$   IF F$TYPE(bj10e_) .EQS. "" THEN GOSUB BJDEV_INIT
$   SETDEV bj10e 'bj10e_'
$   RETURN
$ !
$ BJ200_DEV:
$   IF F$TYPE(bj10e_) .EQS. "" THEN GOSUB BJDEV_INIT
$   SETDEV bj200 'bj10e_'
$   RETURN
$ !
$ HPMONO_INIT:
$   HPPCL     = "gdevprn.obj gdevpcl.obj"
$   HPMONO    = "gdevdjet.obj ''HPPCL'"
$   GOSUB CLIST_DEV
$   ADD_DEV_MODULES = "''HPMONO'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ DESKJET_DEV:
$   IF F$TYPE(HPMONO) .EQS. "" THEN GOSUB HPMONO_INIT
$   SETDEV deskjet 'HPMONO'
$   RETURN
$ !
$ DJET500_DEV:
$   IF F$TYPE(HPMONO) .EQS. "" THEN GOSUB HPMONO_INIT
$   SETDEV djet500 'HPMONO'
$   RETURN
$ !
$ LASERJET_DEV:
$   IF F$TYPE(HPMONO) .EQS. "" THEN GOSUB HPMONO_INIT
$   SETDEV laserjet 'HPMONO'
$   RETURN
$ !
$ LJETPLUS_DEV:
$   IF F$TYPE(HPMONO) .EQS. "" THEN GOSUB HPMONO_INIT
$   SETDEV ljetplus 'HPMONO'
$   RETURN
$ !
$ LJET2P_DEV:
$   IF F$TYPE(HPMONO) .EQS. "" THEN GOSUB HPMONO_INIT
$   SETDEV ljet2p 'HPMONO'
$   RETURN
$ !
$ LJET3_DEV:
$   IF F$TYPE(HPMONO) .EQS. "" THEN GOSUB HPMONO_INIT
$   SETDEV ljet3 'HPMONO'
$   RETURN
$ !
$ LJET4_DEV:
$   IF F$TYPE(HPMONO) .EQS. "" THEN GOSUB HPMONO_INIT
$   SETDEV ljet4 'HPMONO'
$   RETURN
$ !
$ LP2563_DEV:
$   IF F$TYPE(HPMONO) .EQS. "" THEN GOSUB HPMONO_INIT
$   SETDEV lp2563 'HPMONO'
$   RETURN
$ !
$ OCE9050_DEV:
$   IF F$TYPE(HPMONO) .EQS. "" THEN GOSUB HPMONO_INIT
$   SETDEV oce9050 'HPMONO'
$   RETURN
$ !
$ LJ5INIT_INIT:
$   HPPCL     = "gdevprn.obj gdevpcl.obj"
$   ljet5_    = "gdevlj56.obj ''HPPCL'"
$   GOSUB CLIST_DEV
$   ADD_DEV_MODULES = "''ljet5_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ LJ5MONO_DEV:
$   IF F$TYPE(ljet5_) .EQS. "" THEN GOSUB LJ5INIT_INIT
$   SETDEV lj5mono 'ljet5_'
$   RETURN
$ !
$ LJ5GRAY_DEV:
$   IF F$TYPE(ljet5_) .EQS. "" THEN GOSUB LJ5INIT_INIT
$   SETDEV lj5gray 'ljet5_'
$   RETURN
$ !
$ HPDEV_INIT:
$   HPPCL     = "gdevprn.obj gdevpcl.obj"
$   cdeskjet_ = "gdevcdj.obj ''HPPCL'"
$   GOSUB CLIST_DEV
$   ADD_DEV_MODULES = "''cdeskjet_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ CDESKJET_DEV:
$   IF F$TYPE(cdeskjet_) .EQS. "" THEN GOSUB HPDEV_INIT
$   SETDEV cdeskjet 'cdeskjet_'
$   RETURN
$ !
$ CDJCOLOR_DEV:
$   IF F$TYPE(cdeskjet_) .EQS. "" THEN GOSUB HPDEV_INIT
$   SETDEV cdjcolor 'cdeskjet_'
$   RETURN
$ !
$ CDJMONO_DEV:
$   IF F$TYPE(cdeskjet_) .EQS. "" THEN GOSUB HPDEV_INIT
$   SETDEV cdjmono 'cdeskjet_'
$   RETURN
$ !
$ CDJ550_DEV:
$   IF F$TYPE(cdeskjet_) .EQS. "" THEN GOSUB HPDEV_INIT
$   SETDEV cdj550 'cdeskjet_'
$   RETURN
$ !
$ DECLJ250_DEV:
$   IF F$TYPE(cdeskjet_) .EQS. "" THEN GOSUB HPDEV_INIT
$   SETDEV declj250 'cdeskjet_'
$   RETURN
$ !
$ DNJ650C_DEV:
$   IF F$TYPE(cdeskjet_) .EQS. "" THEN GOSUB HPDEV_INIT
$   SETDEV dnj650c 'cdeskjet_'
$   RETURN
$ !
$ LJ4DITH_DEV:
$   IF F$TYPE(cdeskjet_) .EQS. "" THEN GOSUB HPDEV_INIT
$   SETDEV lj4dith 'cdeskjet_'
$   RETURN
$ !
$ PJ_DEV:
$   IF F$TYPE(cdeskjet_) .EQS. "" THEN GOSUB HPDEV_INIT
$   SETDEV pj 'cdeskjet_'
$   RETURN
$ !
$ PJXL_DEV:
$   IF F$TYPE(cdeskjet_) .EQS. "" THEN GOSUB HPDEV_INIT
$   SETDEV pjxl 'cdeskjet_'
$   RETURN
$ !
$ PJXL300_DEV:
$   IF F$TYPE(cdeskjet_) .EQS. "" THEN GOSUB HPDEV_INIT
$   SETDEV pjxl300 'cdeskjet_'
$   RETURN
$ !
$ BJC600_DEV:
$   IF F$TYPE(cdeskjet_) .EQS. "" THEN GOSUB HPDEV_INIT
$   SETDEV bjc600 'cdeskjet_'
$   RETURN
$ !
$ BJC800_DEV:
$   IF F$TYPE(cdeskjet_) .EQS. "" THEN GOSUB HPDEV_INIT
$   SETDEV bjc800 'cdeskjet_'
$   RETURN
$ !
$ ESCP_DEV:
$   IF F$TYPE(cdeskjet_) .EQS. "" THEN GOSUB HPDEV_INIT
$   SETDEV escp 'cdeskjet_'
$   RETURN
$ !
$! --------------- Ugly/Update -> Unified Printer Driver ---------------- ###
$ UNIPRINT_DEV:
$   IF F$TYPE(uniprint_) .NES. "" THEN RETURN
$   uniprint_ = "gdevupd.obj"
$   SETDEV uniprint 'uniprint_'
$   ADD_DEV_MODULES = "''uniprint_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ LN03_DEV:
$   IF F$TYPE(ln03_) .EQS. "" THEN GOSUB LN03_INIT
$   SETDEV ln03 'ln03'
$   RETURN
$ !
$ LA50_DEV:
$   IF F$TYPE(ln03_) .EQS. "" THEN GOSUB LN03_INIT
$   SETDEV la50 'ln03'
$   RETURN
$ !
$ LA70_DEV:
$   IF F$TYPE(ln03_) .EQS. "" THEN GOSUB LN03_INIT
$   SETDEV la70 'ln03'
$   RETURN
$ !
$ LA75_DEV:
$   IF F$TYPE(ln03_) .EQS. "" THEN GOSUB LN03_INIT
$   SETDEV la75 'ln03'
$   RETURN
$ !
$ LA75PLUS_DEV:
$   IF F$TYPE(ln03_) .EQS. "" THEN GOSUB LN03_INIT
$   SETDEV la75plus 'ln03'
$   RETURN
$ !
$ LA70T_DEV:
$   la70t_ = "gdevla7t.obj"
$   SETDEV la70t 'la70t_'
$   ADD_DEV_MODULES = "''la70t_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ TEK4696_DEV:
$   tek4696_ = "gdevtknk.obj gdevprn.obj"
$   SETDEV tek4696 'tek4696_'
$   ADD_DEV_MODULES = "''tek4696_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ DFAX_INIT:
$   dfax_ = "gdevdfax.obj gdevtfax.obj"
$   ADD_DEV_MODULES = "''dfax_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ DFAXLOW_DEV:
$   IF F$TYPE(dfax_) .EQS. "" THEN GOSUB DFAX_INIT
$   SETDEV dfaxlow "''dfax_'"
$   ADDMOD  dfaxlow -include cfe
$   RETURN
$ !
$ DFAXHIGH_DEV:
$   IF F$TYPE(dfax_) .EQS. "" THEN GOSUB DFAX_INIT
$   SETDEV dfaxhigh "''dfax_'"
$   ADDMOD  dfaxhigh -include cfe
$   RETURN
$ !
$! PostScript and EPS writers
$ PSWRITE_INI:
$   IF F$TYPE(pswrite_) .NES. "" THEN RETURN
$   pswrite1_ = "gdevps.obj gdevpsdf.obj gdevpstr.obj"
$   pswrite2_ = "scantab.obj sfilter2.obj"
$   pswrite_  = "''pswrite1_' ''pswrite2_'"
$   ADD_DEV_MODULES = "''pswrite_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ EPSWRITE_DEV:
$   GOSUB PSWRITE_INI
$   GOSUB VECTOR_DEV
$   SETDEV epswrite "''pswrite1_'"
$   ADDMOD epswrite "''pswrite2_'"
$   ADDMOD epswrite -include vector
$   RETURN
$ !
$ PSWRITE_DEV:
$   GOSUB PSWRITE_INI
$   GOSUB VECTOR_DEV
$   SETDEV pswrite "''pswrite1_'"
$   ADDMOD pswrite "''pswrite2_'"
$   ADDMOD pswrite -include vector
$   RETURN
$ !
$! PDF writer
$ PDFWRITE_DEV:
$   pdfwrite1_ = "gdevpdf.obj gdevpdfd.obj gdevpdfi.obj gdevpdfm.obj"
$   pdfwrite2_ = "gdevpdfp.obj gdevpdft.obj gdevpsdf.obj gdevpstr.obj"
$   pdfwrite3_ = "gsflip.obj scantab.obj sfilter2.obj sstring.obj"
$   pdfwrite_  = "''pdfwrite1_' ''pdfwrite2_' ''pdfwrite3_'"
$   GOSUB CMYKLIB_DEV
$   GOSUB CFE_DEV
$   GOSUB DCTE_DEV
$   GOSUB LZWE_DEV
$   GOSUB RLE_DEV
$   GOSUB VECTOR_DEV
$   SETDEV pdfwrite 'pdfwrite1_'
$   ADDMOD pdfwrite 'pdfwrite2_'
$   ADDMOD pdfwrite 'pdfwrite3_'
$   ADDMOD pdfwrite -ps gs_pdfwr
$   ADDMOD pdfwrite -include cmyklib cfe dcte lzwe rle vector
$   ADD_DEV_MODULES = "''pdfwrite_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ PXLDEV_INIT:
$   pxl_ = "gdevpx.obj"
$   GOSUB VECTOR_DEV
$   ADD_DEV_MODULES = "''pxl_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ PXLMONO_DEV:
$   IF F$TYPE(pxl_) .EQS. "" THEN GOSUB PXLDEV_INIT
$   SETDEV pxlmono "''pxl_'"
$   ADDMOD pxlmono -include vector
$   RETURN
$ !
$ PXLCOLOR_DEV:
$   IF F$TYPE(pxl_) .EQS. "" THEN GOSUB PXLDEV_INIT
$   SETDEV pxlcolor "''pxl_'"
$   ADDMOD pxlcolor -include vector
$   RETURN
$ !
$ BITDEV_INIT:
$   bit_ = "gdevbit.obj gdevprn.obj"
$   GOSUB CLIST_DEV
$   ADD_DEV_MODULES = "''bit_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ BIT_DEV:
$   IF F$TYPE(bit_) .EQS. "" THEN GOSUB BITDEV_INIT
$   SETDEV bit 'bit_'
$   RETURN
$ !
$ BITRGB_DEV:
$   IF F$TYPE(bit_) .EQS. "" THEN GOSUB BITDEV_INIT
$   SETDEV bitrgb 'bit_'
$   RETURN
$ !
$ BITCMYK_DEV:
$   IF F$TYPE(bit_) .EQS. "" THEN GOSUB BITDEV_INIT
$   SETDEV bitcmyk 'bit_'
$   RETURN
$ !
$ BMPDEV_INIT:
$   bmp_ = "gdevbmp.obj gdevpccm.obj gdevprn.obj"
$   ADD_DEV_MODULES = "''bmp_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ BMPMONO_DEV:
$   IF F$TYPE(bmp_) .EQS. "" THEN GOSUB BMPDEV_INIT
$   SETDEV bmpmono 'bmp_'
$   RETURN
$ !
$ BMP16_DEV:
$   IF F$TYPE(bmp_) .EQS. "" THEN GOSUB BMPDEV_INIT
$   SETDEV bmp16 'bmp_'
$   RETURN
$ !
$ BMP256_DEV:
$   IF F$TYPE(bmp_) .EQS. "" THEN GOSUB BMPDEV_INIT
$   SETDEV bmp256 'bmp_'
$   RETURN
$ !
$ BMP16M_DEV:
$   IF F$TYPE(bmp_) .EQS. "" THEN GOSUB BMPDEV_INIT
$   SETDEV bmp16m 'bmp_'
$   RETURN
$ !
$ CGMDEV_INIT:
$   cgm_ = "gdevcgm.obj gdevcgml.obj"
$   ADD_DEV_MODULES = "''cgm_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ CGMMONO_DEV:
$   IF F$TYPE(cgm_) .EQS. "" THEN GOSUB CGMDEV_INIT
$   SETDEV cgmmono 'cgm_'
$   RETURN
$ !
$ CGM8_DEV:
$   IF F$TYPE(cgm_) .EQS. "" THEN GOSUB CGMDEV_INIT
$   SETDEV cgm8 'cgm_'
$   RETURN
$ !
$ CGM24_DEV:
$   IF F$TYPE(cgm_) .EQS. "" THEN GOSUB CGMDEV_INIT
$   SETDEV cgm24 'cgm_'
$   RETURN
$ !
$!### ------------------------- JPEG file format ------------------------- ###
$ JPEG_INI:
$   IF F$TYPE(jpeg_) .NES. "" THEN RETURN
$   jpeg_="gdevjpeg.obj"
$   ADD_DEV_MODULES = "''jpeg_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! RGB output
$ JPEG_DEV: 
$   GOSUB JPEG_INI
$   GOSUB SDCTE_DEV
$   SETDEV jpeg "''jpeg_'"
$   ADDMOD jpeg -include sdcte
$   RETURN
$ !
$! Gray output
$ JPEGGRAY_DEV:
$   GOSUB JPEG_INI
$   GOSUB SDCTE_DEV
$   SETDEV jpeggray "''jpeg_'"
$   ADDMOD jpeggray -include sdcte
$   RETURN
$ !
$ PCXDEV_INIT:
$   pcx_ = "gdevpcx.obj gdevpccm.obj gdevprn.obj"
$   GOSUB CLIST_DEV
$   ADD_DEV_MODULES = "''pcx_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ PCXMONO_DEV:
$   IF F$TYPE(pcx_) .EQS. "" THEN GOSUB PCXDEV_INIT
$   SETDEV pcxmono 'pcx_'
$   RETURN
$ !
$ PCXGRAY_DEV:
$   IF F$TYPE(pcx_) .EQS. "" THEN GOSUB PCXDEV_INIT
$   SETDEV pcxgray 'pcx_'
$   RETURN
$ !
$ PCX16_DEV:
$   IF F$TYPE(pcx_) .EQS. "" THEN GOSUB PCXDEV_INIT
$   SETDEV pcx16 'pcx_'
$   RETURN
$ !
$ PCX256_DEV:
$   IF F$TYPE(pcx_) .EQS. "" THEN GOSUB PCXDEV_INIT
$   SETDEV pcx256 'pcx_'
$   RETURN
$ !
$ PCX24B_DEV:
$   IF F$TYPE(pcx_) .EQS. "" THEN GOSUB PCXDEV_INIT
$   SETDEV pcx24b 'pcx_'
$   RETURN
$ !
$ PCXCMYK_DEV:
$   IF F$TYPE(pcx_) .EQS. "" THEN GOSUB PCXDEV_INIT
$   SETDEV pcxcmyk 'pcx_'
$   RETURN
$ !
$! The 2-up PCX device is also here only as an example, and for testing.
$ PCX2UP_DEV:
$   GOSUB PCX256_DEV
$   SETDEV pcx2up "gdevp2up.obj"
$   ADDMOD pcx2up -include pcx256
$   ADD_DEV_MODULES = "gdev2up.obj gdevprn.obj"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$! ### ------------------- Portable Bitmap file formats ------------------- ###
$ PBMDEV_INIT:
$   pxm_ = "gdevpbm.obj gdevprn.obj"
$   GOSUB CLIST_DEV
$   ADD_DEV_MODULES = "''pxm_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ PBM_DEV:
$   IF F$TYPE(pxm_) .EQS. "" THEN GOSUB PBMDEV_INIT
$   SETDEV pbm 'pxm_'
$   RETURN
$ !
$ PBMRAW_DEV:
$   IF F$TYPE(pxm_) .EQS. "" THEN GOSUB PBMDEV_INIT
$   SETDEV pbmraw 'pxm_'
$   RETURN
$ !
$ PGM_DEV:
$   IF F$TYPE(pxm_) .EQS. "" THEN GOSUB PBMDEV_INIT
$   SETDEV pgm 'pxm_'
$   RETURN
$ !
$ PGMRAW_DEV:
$   IF F$TYPE(pxm_) .EQS. "" THEN GOSUB PBMDEV_INIT
$   SETDEV pgmraw 'pxm_'
$   RETURN
$ !
$ PGNM_DEV:
$   IF F$TYPE(pxm_) .EQS. "" THEN GOSUB PBMDEV_INIT
$   SETDEV pgnm 'pxm_'
$   RETURN
$ !
$ PGNMRAW_DEV:
$   IF F$TYPE(pxm_) .EQS. "" THEN GOSUB PBMDEV_INIT
$   SETDEV pgnmraw 'pxm_'
$   RETURN
$ !
$ PPM_DEV:
$   IF F$TYPE(pxm_) .EQS. "" THEN GOSUB PBMDEV_INIT
$   SETDEV ppm 'pxm_'
$   RETURN
$ !
$ PPMRAW_DEV:
$   IF F$TYPE(pxm_) .EQS. "" THEN GOSUB PBMDEV_INIT
$   SETDEV ppmraw 'pxm_'
$   RETURN
$ !
$ PNM_DEV:
$   IF F$TYPE(pxm_) .EQS. "" THEN GOSUB PBMDEV_INIT
$   SETDEV pnm 'pxm_'
$   RETURN
$ !
$ PNMRAW_DEV:
$   IF F$TYPE(pxm_) .EQS. "" THEN GOSUB PBMDEV_INIT
$   SETDEV pnmraw 'pxm_'
$   RETURN
$ !
$ PNGMONO_DEV:
$   IF F$TYPE(png_) .EQS. "" THEN GOSUB LIBPNG_DEV
$   SETDEV pngmono 'png_'
$   ADDMOD pngmono  -include libpng
$   RETURN
$ !
$ PNGGRAY_DEV:
$   IF F$TYPE(png_) .EQS. "" THEN GOSUB LIBPNG_DEV
$   SETDEV pnggray 'png_'
$   ADDMOD pnggray  -include libpng
$   RETURN
$ !
$ PNG16_DEV:
$   IF F$TYPE(png_) .EQS. "" THEN GOSUB LIBPNG_DEV
$   SETDEV png16 'png_'
$   ADDMOD png16  -include libpng
$   RETURN
$ !
$ PNG256_DEV:
$   IF F$TYPE(png_) .EQS. "" THEN GOSUB LIBPNG_DEV
$   SETDEV png256 'png_'
$   ADDMOD png256  -include libpng
$   RETURN
$ !
$ PNG16M_DEV:
$   IF F$TYPE(png_) .EQS. "" THEN GOSUB LIBPNG_DEV
$   SETDEV png16m 'png_'
$   ADDMOD png16m  -include libpng
$   RETURN
$ !
$ PSMONO_DEV:
$   ps_ = "gdevpsim.obj gdevprn.obj"
$   GOSUB CLIST_DEV
$   SETDEV psmono 'ps_'
$   ADD_DEV_MODULES = "''ps_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ PSGRAY_DEV:
$   ps_ = "gdevpsim.obj gdevprn.obj"
$   GOSUB CLIST_DEV
$   SETDEV psgray 'ps_'
$   ADD_DEV_MODULES = "''ps_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ TFAX_DEV:
$   tfax_ = "gdevtfax.obj gdevprn.obj"
$   GOSUB CLIST_DEV
$   GOSUB CFE_DEV
$   GOSUB LZWE_DEV
$   GOSUB RLE_DEV
$   GOSUB TIFFS_DEV
$   SETMOD tfax 'tfax_'
$   ADDMOD tfax -include cfe lzwe rle tiffs
$   ADD_DEV_MODULES = "''tfax_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ FAXG3_DEV:
$   IF F$TYPE(tfax_) .EQS. "" THEN GOSUB TFAX_DEV
$   SETDEV faxg3 -include tfax
$   RETURN
$ !
$ FAXG32D_DEV:
$   IF F$TYPE(tfax_) .EQS. "" THEN GOSUB TFAX_DEV
$   SETDEV faxg32d -include tfax
$   RETURN
$ !
$ FAXG4_DEV:
$   IF F$TYPE(tfax_) .EQS. "" THEN GOSUB TFAX_DEV
$   SETDEV faxg4 -include tfax
$   RETURN
$ !
$ TIFFS_DEV:
$   IF F$TYPE(tiffs_) .NES. "" THEN RETURN
$   tiffs_ = "gdevtifs.obj gdevprn.obj"
$   GOSUB CLIST_DEV
$   SETMOD tiffs 'tiffs_'
$   ADD_DEV_MODULES = "''tiffs_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ TIFFCRLE_DEV:
$   IF F$TYPE(tfax_) .EQS. "" THEN GOSUB TFAX_DEV
$   SETDEV tiffcrle -include tfax
$   RETURN
$ !
$ TIFFG3_DEV:
$   IF F$TYPE(tfax_) .EQS. "" THEN GOSUB TFAX_DEV
$   SETDEV tiffg3 -include tfax
$   RETURN
$ !
$ TIFFG32D_DEV:
$   IF F$TYPE(tfax_) .EQS. "" THEN GOSUB TFAX_DEV
$   SETDEV tiffg32d -include tfax
$   RETURN
$ !
$ TIFFG4_DEV:
$   IF F$TYPE(tfax_) .EQS. "" THEN GOSUB TFAX_DEV
$   SETDEV tiffg4 -include tfax
$   RETURN
$ !
$ TIFFLZW_DEV:
$   IF F$TYPE(tfax_) .EQS. "" THEN GOSUB TFAX_DEV
$   SETDEV tifflzw -include tfax
$   RETURN
$ !
$ TIFFPACK_DEV:
$   IF F$TYPE(tfax_) .EQS. "" THEN GOSUB TFAX_DEV
$   SETDEV tiffpack -include tfax
$   RETURN
$ !
$ TIFF12NC_DEV:
$   tiff12nc_ = "gdevtfnx.obj gdevtifs.obj gdevprn.obj"
$   GOSUB CLIST_DEV
$   SETDEV tiff12nc 'tiff12nc_'
$   ADD_DEV_MODULES = "''tiff12nc_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ TIFF24NC_DEV:
$   tiff24nc_ = "gdevtfnx.obj gdevtifs.obj gdevprn.obj"
$   GOSUB CLIST_DEV
$   SETDEV tiff24nc 'tiff24nc_'
$   ADD_DEV_MODULES = "''tiff24nc_'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ VMS_DEV:
$   vms__ = "gp_nofb.obj gp_vms.obj"
$   SETMOD vms_ 'vms__'
$   ADD_DEV_MODULES = "''vms__'"
$   GOSUB ADD_DEV_MOD
$   RETURN
$ !
$ ADD_DEV_MOD:
$   II = 0
$   ADD_MORE:
$     DEV_NOW = F$EDIT(F$ELEMENT(II," ",ADD_DEV_MODULES),"UPCASE") - ".OBJ"
$     IF DEV_NOW .EQS. " " THEN RETURN
$     II = II + 1
$     ! add delimiters to avoid mistaken identities
$     ! (e.g., a search for "x11" finding "x11alpha")
$     IF F$LOCATE(" "+DEV_NOW+" ",DEV_MODULES) .NE. F$LENGTH(DEV_MODULES) THEN -
        GOTO ADD_MORE
$     NDEVL = 0
$  CHECK_LOOP:
$     IF F$Type(DEV_MODULES'NDEVL') .EQS. "" THEN GOTO ADD_THIS
$     IF F$LOCATE(" "+DEV_NOW+" ",DEV_MODULES'NDEVL') .NE. -
        F$LENGTH(DEV_MODULES'NDEVL') THEN GOTO ADD_MORE
$     NDEVL = NDEVL + 1
$     IF NDEVL .LE. NDEV_MOD THEN GOTO CHECK_LOOP
$  ADD_THIS:
$     DEV_MODULES = DEV_MODULES + DEV_NOW + " "
$     IF F$Length(DEV_MODULES) .GT. 512
$      THEN
$       DEV_MODULES = F$EDIT(DEV_MODULES,"TRIM")
$       DEV_MODULES = F$EDIT(DEV_MODULES,"COMPRESS")
$       DEV_MODULES'NDEV_MOD' = DEV_MODULES + " "
$       NDEV_MOD = NDEV_MOD + 1
$       DEV_MODULES = " "
$      ENDIF
$     GOTO ADD_MORE
$ !
$ DONE:
$ !
$ IF P1 .EQS. "DEBUG" .OR. P2 .EQS. "DEBUG" THEN GOTO AFTER_DEL
$ DELETE *.DEV;*
$ IF F$SEARCH("DEVS.TR")       .NES. "" THEN DELETE DEVS.TR;*
$ IF F$SEARCH("ECHOGS.EXE")    .NES. "" THEN DELETE ECHOGS.EXE;*
$ IF F$SEARCH("GENCONF.EXE")   .NES. "" THEN DELETE GENCONF.EXE;*
$ IF F$SEARCH("GSSETDEV.COM")  .NES. "" THEN DELETE GSSETDEV.COM;*,-
   GSSETMOD.COM;*,GSADDMOD.COM;*
$ IF F$SEARCH("JCONFIG.H")     .NES. "" THEN DELETE JCONFIG.H;*,JMORECFG.H;*,-
   JMCORIG.H;*,JERROR.H;*,JINCLUDE.H;*,JPEGLIB.H;*,JVERSION.H;*
$ IF F$SEARCH("PNG.H")         .NES. "" THEN DELETE PNG.H;*,PNGCONF.H;*
$ IF F$SEARCH("ZCONF.H")       .NES. "" THEN DELETE ZCONF.H;*,ZLIB.H;*,-
   ZUTIL.H;*,DEFLATE.H;*
$AFTER_DEL:
$ IF F$LOGICAL("OPT_FILE")     .NES. "" THEN CLOSE OPT_FILE
$ IF F$LOGICAL("X11")          .NES. "" THEN DEASSIGN X11
$ !
$ ! ALL DONE
$ EXIT
$ !
$ NO_ACTION:
$ !
$ WSO "No such device routine: ''ACTION'"
$ GOTO DONE