summaryrefslogtreecommitdiff
path: root/xc/lib/PEX5/PEXlib.h
blob: b3e110555cb58c662fa76a379153b9ed620707de (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
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
#ifndef _PEXLIB_H_
#define _PEXLIB_H_

/* $XConsortium: PEXlib.h,v 1.11 94/04/01 18:46:54 rws Exp $ */

/******************************************************************************/
/*  Copyright 1987,1991 by Digital Equipment Corporation, Maynard, Mass.      */
/*                                                                            */
/*  (c) Copyright Hewlett-Packard Company, 1992,  Fort Collins, Colorado      */
/*                                                                            */
/*                            All Rights Reserved                             */
/*                                                                            */
/*  Permission to use, copy, modify, and distribute this software and its     */
/*  documentation for any purpose and without fee is hereby granted,          */
/*  provided that the above copyright notices appear in all copies and that   */
/*  both the copyright notices and this permission notice appear in           */
/*  supporting documentation, and that the names of Digital or                */
/*  Hewlett-Packard not be used in advertising or publicity pertaining to     */
/*  distribution of the software without specific, written prior permission.  */
/*                                                                            */
/*  DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING  */
/*  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL  */
/*  DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR   */
/*  ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,       */
/*  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,    */
/*  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS       */
/*  SOFTWARE.                                                                 */
/*                                                                            */
/*  HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS         */
/*  SOFTWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF        */
/*  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  Hewlett-Packard    */
/*  shall not be liable for errors contained herein or direct, indirect,      */
/*  special, incidental or consequential damages in connection with the       */
/*  furnishing, performance or use of this software.                          */
/*                                                                            */
/******************************************************************************/

#include <X11/Xlib.h>
#include <X11/PEX5/PEX.h>
#include <X11/Xfuncproto.h>

/*
 * floating point min and max values
 */
#define PEXMinFloatIeee_754_32  1.40129846432481707e-45
#define PEXMaxFloatIeee_754_32  3.40282346638528860e+38
#define PEXMinFloatIeee_754_64  4.94065645841246544e-324
#define PEXMaxFloatIeee_754_64  1.797693134862315708e+308

/*
 * constants for PEXInitiliaze - failure return values and error string length
 */
#define PEXBadExtension         1
#define PEXBadProtocolVersion   2
#define PEXBadFloatConversion   3
#define PEXBadLocalAlloc        4

#define PEXErrorStringLength    80


/*
 * type definitions
 */
typedef XID             PEXFont;
typedef XID             PEXLookupTable;
typedef XID             PEXNameSet;
typedef XID             PEXPickMeasure;
typedef XID             PEXPipelineContext;
typedef XID             PEXRenderer;
typedef XID             PEXSearchContext;
typedef XID             PEXStructure;
typedef XID             PEXWorkstation;

typedef unsigned long   PEXBitmask;
typedef unsigned short  PEXBitmaskShort;
typedef short           PEXColorType;
typedef unsigned char   PEXContourHint;
typedef unsigned short  PEXCoordType;
typedef short           PEXComposition;
typedef unsigned short  PEXCullMode;
typedef unsigned char   PEXDynamicType;
typedef short           PEXEnumTypeIndex;
typedef float           PEXMatrix[4][4];
typedef float           PEXMatrix3x3[3][3];
typedef unsigned long   PEXName;
typedef int             PEXOCRequestType;
typedef unsigned short  PEXShapeHint;
typedef unsigned char   PEXSwitch;
typedef unsigned short  PEXTableIndex;
typedef unsigned short  PEXTypeOrTableIndex;

#if NeedFunctionPrototypes
typedef void *PEXPointer;
#else
typedef char *PEXPointer;
#endif


/*
 * PEX extension information
 */
typedef struct {
    unsigned short      major_version;
    unsigned short      minor_version;
    unsigned long       release;
    unsigned long       subset_info;
    char                *vendor_name;
    int                 major_opcode;
    int                 first_event;
    int                 first_error;
} PEXExtensionInfo;

/*
 * enumerated type information
 */
typedef struct {
    PEXEnumTypeIndex    index;
    char                *descriptor;            /* null terminated string */
} PEXEnumTypeDesc;

/*
 * implementation dependent constants
 */
typedef union {
    unsigned long       integer;
    float               flt_point;
} PEXImpDepConstant;

/*
 * match rendering targets
 */
typedef struct {
    int                 depth;
    int                 type;
    Visual              *visual;
} PEXRenderingTarget;


/*
 * output primitive and attribute
 */

/* output command request types */
#define PEXOCRender             0
#define PEXOCStore              1
#define PEXOCRenderSingle       2
#define PEXOCStoreSingle        3

/* coordinates */
typedef struct {
    float               x;
    float               y;
    float               z;
} PEXCoord;

typedef struct {
    float               x;
    float               y;
} PEXCoord2D;

typedef struct {
    float               x;
    float               y;
    float               z;
    float               w;
} PEXCoord4D;

/* coordinate lists without data */
typedef struct {
    unsigned long       count;                  /* number of points */
    PEXCoord2D          *points;
} PEXListOfCoord2D;     /* Pointer to an array of 2D points */

typedef struct {
    unsigned long       count;                  /* number of points */
    PEXCoord            *points;
} PEXListOfCoord;       /* Pointer to an array of 3D points */

typedef struct {
    unsigned long       count;                  /* number of points */
    PEXCoord4D          *points;
} PEXListOfCoord4D;     /* Pointer to an array of 4D points */

typedef union {
    PEXCoord2D          *point_2d;
    PEXCoord            *point;
    PEXCoord4D          *point_4d;
} PEXArrayOfCoord;      /* Pointer to array of points */

/* colors */
typedef struct {
    float               red;
    float               green;
    float               blue;
} PEXColorRGB;

typedef struct {
    float               hue;
    float               saturation;
    float               value;
} PEXColorHSV;

typedef struct {
    float               hue;
    float               lightness;
    float               saturation;
} PEXColorHLS;

typedef struct {
    float               x;
    float               y;
    float               z;
} PEXColorCIE;

typedef struct {
    unsigned char       red;
    unsigned char       green;
    unsigned char       blue;
    unsigned char       reserved;
} PEXColorRGB8;

typedef struct {
    unsigned short      red;
    unsigned short      green;
    unsigned short      blue;
    unsigned short      reserved;
} PEXColorRGB16;

typedef struct {
    PEXTableIndex       index;
    unsigned short      reserved;
} PEXColorIndexed;

typedef union {
    PEXColorIndexed     indexed;
    PEXColorRGB         rgb;
    PEXColorHSV         hsv;
    PEXColorHLS         hls;
    PEXColorCIE         cie;
    PEXColorRGB8        rgb8;
    PEXColorRGB16       rgb16;
} PEXColor;

typedef union {
    PEXColorIndexed     *indexed;
    PEXColorRGB         *rgb;
    PEXColorHSV         *hsv;
    PEXColorHLS         *hls;
    PEXColorCIE         *cie;
    PEXColorRGB8        *rgb8;
    PEXColorRGB16       *rgb16;
} PEXArrayOfColor;

/* vectors */
typedef struct {
    float               x;
    float               y;
    float               z;
} PEXVector;

typedef struct {
    float               x;
    float               y;
} PEXVector2D;

/* facet data */
typedef struct {
    PEXColorIndexed     index;
    PEXVector           normal;
} PEXColorIndexedNormal;

typedef struct {
    PEXColorRGB         rgb;
    PEXVector           normal;
} PEXColorRGBNormal;

typedef struct {
    PEXColorCIE         cie;
    PEXVector           normal;
} PEXColorCIENormal;

typedef struct {
    PEXColorHSV         hsv;
    PEXVector           normal;
} PEXColorHSVNormal;

typedef struct {
    PEXColorHLS         hls;
    PEXVector           normal;
} PEXColorHLSNormal;

typedef struct {
    PEXColorRGB8        rgb8;
    PEXVector           normal;
} PEXColorRGB8Normal;

typedef struct {
    PEXColorRGB16       rgb16;
    PEXVector           normal;
} PEXColorRGB16Normal;

typedef union {
    PEXColorIndexed     index;
    PEXColorRGB         rgb;
    PEXColorHSV         hsv;
    PEXColorHLS         hls;
    PEXColorCIE         cie;
    PEXColorRGB8        rgb8;
    PEXColorRGB16       rgb16;
    PEXVector           normal;
    PEXColorIndexedNormal index_normal;
    PEXColorRGBNormal   rgb_normal;
    PEXColorHSVNormal   hsv_normal;
    PEXColorHLSNormal   hls_normal;
    PEXColorCIENormal   cie_normal;
    PEXColorRGB8Normal  rgb8_normal;
    PEXColorRGB16Normal rgb16_normal;
} PEXFacetData;

typedef union {
    PEXColorIndexed     *index;
    PEXColorRGB         *rgb;
    PEXColorHSV         *hsv;
    PEXColorHLS         *hls;
    PEXColorCIE         *cie;
    PEXColorRGB8        *rgb8;
    PEXColorRGB16       *rgb16;
    PEXVector           *normal;
    PEXColorIndexedNormal *index_normal;
    PEXColorRGBNormal   *rgb_normal;
    PEXColorCIENormal   *cie_normal;
    PEXColorHSVNormal   *hsv_normal;
    PEXColorHLSNormal   *hls_normal;
    PEXColorRGB8Normal  *rgb8_normal;
    PEXColorRGB16Normal *rgb16_normal;
} PEXArrayOfFacetData;

/* vertex data */
typedef struct {
    PEXCoord            point;
    PEXColorIndexed     index;
} PEXVertexIndexed;

typedef struct {
    PEXCoord            point;
    PEXColorRGB         rgb;
} PEXVertexRGB;

typedef struct {
    PEXCoord            point;
    PEXColorHSV         hsv;
} PEXVertexHSV;

typedef struct {
    PEXCoord            point;
    PEXColorHLS         hls;
} PEXVertexHLS;

typedef struct {
    PEXCoord            point;
    PEXColorCIE         cie;
} PEXVertexCIE;

typedef struct {
    PEXCoord            point;
    PEXColorRGB8        rgb8;
} PEXVertexRGB8;

typedef struct {
    PEXCoord            point;
    PEXColorRGB16       rgb16;
} PEXVertexRGB16;

typedef struct {
    PEXCoord            point;
    PEXVector           normal;
} PEXVertexNormal;

typedef struct {
    PEXCoord            point;
    unsigned int        edge;
} PEXVertexEdge;

typedef struct {
    PEXCoord            point;
    PEXColorIndexed     index;
    PEXVector           normal;
} PEXVertexIndexedNormal;

typedef struct {
    PEXCoord            point;
    PEXColorRGB         rgb;
    PEXVector           normal;
} PEXVertexRGBNormal;

typedef struct {
    PEXCoord            point;
    PEXColorHSV         hsv;
    PEXVector           normal;
} PEXVertexHSVNormal;

typedef struct {
    PEXCoord            point;
    PEXColorHLS         hls;
    PEXVector           normal;
} PEXVertexHLSNormal;

typedef struct {
    PEXCoord            point;
    PEXColorCIE         cie;
    PEXVector           normal;
} PEXVertexCIENormal;

typedef struct {
    PEXCoord            point;
    PEXColorRGB8        rgb8;
    PEXVector           normal;
} PEXVertexRGB8Normal;

typedef struct {
    PEXCoord            point;
    PEXColorRGB16       rgb16;
    PEXVector           normal;
} PEXVertexRGB16Normal;

typedef struct {
    PEXCoord            point;
    PEXColorIndexed     index;
    unsigned int        edge;
} PEXVertexIndexedEdge;

typedef struct {
    PEXCoord            point;
    PEXColorRGB         rgb;
    unsigned int        edge;
} PEXVertexRGBEdge;

typedef struct {
    PEXCoord            point;
    PEXColorHSV         hsv;
    unsigned int        edge;
} PEXVertexHSVEdge;

typedef struct {
    PEXCoord            point;
    PEXColorHLS         hls;
    unsigned int        edge;
} PEXVertexHLSEdge;

typedef struct {
    PEXCoord            point;
    PEXColorCIE         cie;
    unsigned int        edge;
} PEXVertexCIEEdge;

typedef struct {
    PEXCoord            point;
    PEXColorRGB8        rgb8;
    unsigned int        edge;
} PEXVertexRGB8Edge;

typedef struct {
    PEXCoord            point;
    PEXColorRGB16       rgb16;
    unsigned int        edge;
} PEXVertexRGB16Edge;

typedef struct {
    PEXCoord            point;
    PEXVector           normal;
    unsigned int        edge;
} PEXVertexNormalEdge;

typedef struct {
    PEXCoord            point;
    PEXColorIndexed     index;
    PEXVector           normal;
    unsigned int        edge;
} PEXVertexIndexedNormalEdge;

typedef struct {
    PEXCoord            point;
    PEXColorRGB         rgb;
    PEXVector           normal;
    unsigned int        edge;
} PEXVertexRGBNormalEdge;

typedef struct {
    PEXCoord            point;
    PEXColorHSV         hsv;
    PEXVector           normal;
    unsigned int        edge;
} PEXVertexHSVNormalEdge;

typedef struct {
    PEXCoord            point;
    PEXColorHLS         hls;
    PEXVector           normal;
    unsigned int        edge;
} PEXVertexHLSNormalEdge;

typedef struct {
    PEXCoord            point;
    PEXColorCIE         cie;
    PEXVector           normal;
    unsigned int        edge;
} PEXVertexCIENormalEdge;

typedef struct {
    PEXCoord            point;
    PEXColorRGB8        rgb8;
    PEXVector           normal;
    unsigned int        edge;
} PEXVertexRGB8NormalEdge;

typedef struct {
    PEXCoord            point;
    PEXColorRGB16       rgb16;
    PEXVector           normal;
    unsigned int        edge;
} PEXVertexRGB16NormalEdge;

typedef union {
    PEXCoord                    *no_data;
    PEXVertexIndexed            *index;
    PEXVertexRGB                *rgb;
    PEXVertexHSV                *hsv;
    PEXVertexHLS                *hls;
    PEXVertexCIE                *cie;
    PEXVertexRGB8               *rgb8;
    PEXVertexRGB16              *rgb16;
    PEXVertexNormal             *normal;
    PEXVertexEdge               *edge;
    PEXVertexIndexedNormal      *index_normal;
    PEXVertexRGBNormal          *rgb_normal;
    PEXVertexHSVNormal          *hsv_normal;
    PEXVertexHLSNormal          *hls_normal;
    PEXVertexCIENormal          *cie_normal;
    PEXVertexRGB8Normal         *rgb8_normal;
    PEXVertexRGB16Normal        *rgb16_normal;
    PEXVertexIndexedEdge        *index_edge;
    PEXVertexRGBEdge            *rgb_edge;
    PEXVertexHSVEdge            *hsv_edge;
    PEXVertexHLSEdge            *hls_edge;
    PEXVertexCIEEdge            *cie_edge;
    PEXVertexRGB8Edge           *rgb8_edge;
    PEXVertexRGB16Edge          *rgb16_edge;
    PEXVertexNormalEdge         *normal_edge;
    PEXVertexIndexedNormalEdge  *index_normal_edge;
    PEXVertexRGBNormalEdge      *rgb_normal_edge;
    PEXVertexHSVNormalEdge      *hsv_normal_edge;
    PEXVertexHLSNormalEdge      *hls_normal_edge;
    PEXVertexCIENormalEdge      *cie_normal_edge;
    PEXVertexRGB8NormalEdge     *rgb8_normal_edge;
    PEXVertexRGB16NormalEdge    *rgb16_normal_edge;
} PEXArrayOfVertex;

typedef struct {
    unsigned long       count;                  /* number of vertices */
    PEXArrayOfVertex    vertices;               /* pointer to vertices */
} PEXListOfVertex;

/* connectivity list for set of fill area sets */
typedef struct {
    unsigned short      count;                  /* number of shorts */
    unsigned short      *shorts;
} PEXListOfUShort;

typedef struct {
    unsigned short      count;                  /* number of lists */
    PEXListOfUShort     *lists;
} PEXConnectivityData;

/* encoded text */
typedef struct {
    unsigned short      character_set;
    unsigned char       character_set_width;
    unsigned char       encoding_state;
    unsigned short      reserved;
    unsigned short      length;
    char                *ch;
} PEXEncodedTextData;

typedef struct {
    unsigned short      count;                  /* number of encodings */
    PEXEncodedTextData  *encoded_text;
} PEXListOfEncodedText;

/* trimming curves */
typedef struct {
    unsigned short      count;                  /* number of floats */
    float               *floats;
} PEXListOfFloat;

typedef struct {
    PEXSwitch           visibility;
    unsigned char       reserved;
    unsigned short      order;
    PEXCoordType        rationality;
    PEXEnumTypeIndex    approx_method;
    float               tolerance;
    float               tmin, tmax;
    PEXListOfFloat      knots;
    unsigned short      count;                  /* number of control points */
    PEXArrayOfCoord     control_points;
} PEXTrimCurve;

typedef struct {
    unsigned short      count;                  /* number of curves */
    PEXTrimCurve        *curves;
} PEXListOfTrimCurve;

/* half spaces */
typedef struct {
    PEXCoord            point;
    PEXVector           vector;
} PEXHalfSpace;

typedef struct {
    PEXCoord2D          point;
    PEXVector2D         vector;
} PEXHalfSpace2D;

/* parametric surface characteristics */
typedef struct {
    unsigned short      placement_type;
    unsigned short      reserved;
    unsigned short      u_count;
    unsigned short      v_count;
} PEXPSCIsoparametricCurves;

typedef struct {
    PEXCoord            origin;
    PEXVector           direction;
    unsigned short      count;                  /* number of parameters */
    unsigned short      reserved;
    float               *parameters;
} PEXPSCLevelCurves;

typedef struct {
    unsigned short      length;
    char                *data;
} PEXPSCImpDepData;

typedef union {
    PEXPSCIsoparametricCurves iso_curves;
    PEXPSCLevelCurves       level_curves;
    PEXPSCImpDepData        imp_dep;
} PEXPSCData;


/*
 * pipeline context
 */
typedef struct {
    PEXColorType        type;
    unsigned short      reserved;
    PEXColor            value;
} PEXColorSpecifier;

typedef struct {
    unsigned short      vertical;
    unsigned short      horizontal;
} PEXTextAlignment;

typedef struct {
    PEXEnumTypeIndex    method;
    unsigned short      reserved;
    float               tolerance;
} PEXCurveApprox;

typedef struct {
    float               ambient;
    float               diffuse;
    float               specular;
    float               specular_conc;
    float               transmission;
    PEXColorSpecifier   specular_color;
} PEXReflectionAttributes;

typedef struct {
    PEXEnumTypeIndex    method;
    unsigned short      reserved;
    float               u_tolerance;
    float               v_tolerance;
} PEXSurfaceApprox;

typedef struct {
    unsigned short      count;                  /* number of half spaces */
    PEXHalfSpace        *half_spaces;
} PEXModelClipVolume;

typedef struct {
    unsigned short      count;                  /* number of lights */
    PEXTableIndex       *indices;
} PEXListOfLight;

typedef struct {
    short               type;
    PEXPSCData          psc;
} PEXPSCSpecifier;

typedef struct {
    PEXEnumTypeIndex    marker_type;
    float               marker_scale;
    PEXColorSpecifier   marker_color;
    PEXTableIndex       marker_bundle_index;
    PEXTableIndex       text_font;
    unsigned short      text_precision;
    float               char_expansion;
    float               char_spacing;
    PEXColorSpecifier   text_color;
    float               char_height;
    PEXVector2D         char_up_vector;
    unsigned short      text_path;
    PEXTextAlignment    text_alignment;
    float               atext_height;
    PEXVector2D         atext_up_vector;
    unsigned short      atext_path;
    PEXTextAlignment    atext_alignment;
    PEXEnumTypeIndex    atext_style;
    PEXTableIndex       text_bundle_index;
    PEXEnumTypeIndex    line_type;
    float               line_width;
    PEXColorSpecifier   line_color;
    PEXCurveApprox      curve_approx;
    PEXEnumTypeIndex    polyline_interp;
    PEXTableIndex       line_bundle_index;
    PEXEnumTypeIndex    interior_style;
    PEXTypeOrTableIndex interior_style_index;
    PEXColorSpecifier   surface_color;
    PEXReflectionAttributes   reflection_attr;
    PEXEnumTypeIndex    reflection_model;
    PEXEnumTypeIndex    surface_interp;
    PEXEnumTypeIndex    bf_interior_style;
    PEXTypeOrTableIndex bf_interior_style_index;
    PEXColorSpecifier   bf_surface_color;
    PEXReflectionAttributes   bf_reflection_attr;
    PEXEnumTypeIndex    bf_reflection_model;
    PEXEnumTypeIndex    bf_surface_interp;
    PEXSurfaceApprox    surface_approx;
    unsigned short      culling_mode;
    Bool                distinguish;
    PEXCoord2D          pattern_size;
    PEXCoord            pattern_ref_point;
    PEXVector           pattern_ref_vec1;
    PEXVector           pattern_ref_vec2;
    PEXTableIndex       interior_bundle_index;
    PEXSwitch           surface_edges;
    PEXEnumTypeIndex    surface_edge_type;
    float               surface_edge_width;
    PEXColorSpecifier   surface_edge_color;
    PEXTableIndex       edge_bundle_index;
    PEXMatrix           local_transform;
    PEXMatrix           global_transform;
    unsigned short      model_clip;
    PEXModelClipVolume  model_clip_volume;
    PEXTableIndex       view_index;
    PEXListOfLight      light_state;
    PEXTableIndex       depth_cue_index;
    PEXBitmask          asf_enables;
    PEXBitmask          asf_values;
    long                pick_id;
    unsigned long       hlhsr_id;
    PEXNameSet          name_set;
    PEXTableIndex       color_approx_index;
    PEXEnumTypeIndex    rendering_color_model;
    PEXPSCSpecifier     para_surf_char;
} PEXPCAttributes;

/* macros for setting bits in a PC attribute bitmask */

#define PEXSetPCAttributeMask(mask, attr) \
    mask[((attr)) >> 5] |= (unsigned long) 1 << ( ((attr)) & 0x1f)

#define PEXSetPCAttributeMaskAll(mask) \
    mask[0] = 0xffffffff;              \
    mask[1] = 0xffffffff;              \
    mask[2] = 0x0


/*
 * renderer
 */
typedef struct {
    short               xmin;
    short               ymin;
    short               xmax;
    short               ymax;
} PEXDeviceRect;

typedef struct {
    unsigned short      count;          /* number of device rectangles */
    PEXDeviceRect       *rectangles;
} PEXListOfClipRect;

typedef struct {
    PEXCoord            min;
    PEXCoord            max;
} PEXNPCSubVolume;

typedef struct {
    short               x;
    short               y;
    float               z;
} PEXDeviceCoord;

typedef struct {
    short               x;
    short               y;
} PEXDeviceCoord2D;

typedef struct {
    PEXDeviceCoord      min;
    PEXDeviceCoord      max;
    PEXSwitch           use_drawable;
    unsigned char       reserved[3];
} PEXViewport;

typedef struct {
    PEXStructure        structure;
    unsigned long       offset;
} PEXElementRef;

typedef struct {
    unsigned long       count;                  /* number of elements */
    PEXElementRef       *elements;
} PEXStructurePath;

typedef struct {
    PEXStructure        sid;
    unsigned long       offset;
    unsigned long       pick_id;
} PEXPickElementRef;

typedef struct {
    unsigned long       count;                  /* number of elements */
    PEXPickElementRef   *elements;
} PEXPickPath;

typedef struct {
    PEXPipelineContext  pipeline_context;
    PEXStructurePath    current_path;
    PEXLookupTable      marker_bundle;
    PEXLookupTable      text_bundle;
    PEXLookupTable      line_bundle;
    PEXLookupTable      interior_bundle;
    PEXLookupTable      edge_bundle;
    PEXLookupTable      view_table;
    PEXLookupTable      color_table;
    PEXLookupTable      depth_cue_table;
    PEXLookupTable      light_table;
    PEXLookupTable      color_approx_table;
    PEXLookupTable      pattern_table;
    PEXLookupTable      text_font_table;
    PEXNameSet          highlight_incl;
    PEXNameSet          highlight_excl;
    PEXNameSet          invisibility_incl;
    PEXNameSet          invisibility_excl;
    int                 renderer_state;
    PEXEnumTypeIndex    hlhsr_mode;
    PEXNPCSubVolume     npc_subvolume;
    PEXViewport         viewport;
    PEXListOfClipRect   clip_list;
    PEXNameSet          pick_incl;
    PEXNameSet          pick_excl;
    PEXStructurePath    pick_start_path;
    PEXColorSpecifier   background_color;
    Bool                clear_image;
    Bool                clear_z;
    int                 echo_mode;
} PEXRendererAttributes;

/* renderer picking */
typedef PEXNPCSubVolume PEXPDNPCHitVolume;

typedef struct {
    PEXDeviceCoord2D    position;
    float               distance;
} PEXPDDCHitBox;

typedef struct {
    unsigned short      length;                 /* number of bytes in record */
    char                *record;
} PEXPickDataRecord;

typedef union {
    PEXPDNPCHitVolume       volume;
    PEXPDDCHitBox           box;
    PEXPickDataRecord       data;
} PEXPickRecord;


/*
 * name set
 */
typedef struct {
    PEXNameSet          inclusion;
    PEXNameSet          exclusion;
} PEXNameSetPair;

typedef struct {
    unsigned short      count;                  /* number of pairs */
    PEXNameSetPair      *pairs;
} PEXListOfNameSetPair;


/*
 * font
 */
typedef struct {
    Atom                name;
    unsigned long       value;
} PEXFontProp;

typedef struct {
    unsigned long       first_glyph;
    unsigned long       last_glyph;
    unsigned long       default_glyph;
    Bool                all_exist;
    Bool                stroke;
    unsigned short      count;                  /* number of properties */
    PEXFontProp         *props;
} PEXFontInfo;
 
typedef struct {
    unsigned short      length;
    char                *ch;
} PEXStringData;

typedef struct {
    PEXCoord2D          lower_left;
    PEXCoord2D          upper_right;
    PEXCoord2D          concat_point;
} PEXTextExtent;


/*
 * look up table
 */
typedef struct {
    unsigned short      definable_entries;
    unsigned short      predefined_count;
    unsigned short      predefined_min;
    unsigned short      predefined_max;
} PEXTableInfo;

typedef struct {
    PEXEnumTypeIndex    type;
    PEXEnumTypeIndex    interp_method;
    PEXCurveApprox      curve_approx;
    float               width;
    PEXColorSpecifier   color;
} PEXLineBundleEntry;

typedef struct {
    PEXEnumTypeIndex    type;
    short               reserved;
    float               scale;
    PEXColorSpecifier   color;
} PEXMarkerBundleEntry;

typedef struct {
    PEXTableIndex       font_index;
    PEXEnumTypeIndex    precision;
    float               char_expansion;
    float               char_spacing;
    PEXColorSpecifier   color;
} PEXTextBundleEntry;

typedef struct {
    PEXEnumTypeIndex    style;
    PEXTypeOrTableIndex style_index;
    PEXEnumTypeIndex    reflection_model;
    PEXEnumTypeIndex    interp_method;
    PEXEnumTypeIndex    bf_style;
    PEXTypeOrTableIndex bf_style_index;
    PEXEnumTypeIndex    bf_reflection_model;
    PEXEnumTypeIndex    bf_interp_method;
    PEXSurfaceApprox    surface_approx;
    PEXColorSpecifier   color;
    PEXReflectionAttributes   reflection_attr;
    PEXColorSpecifier   bf_color;
    PEXReflectionAttributes   bf_reflection_attr;
} PEXInteriorBundleEntry;

typedef struct {
    PEXSwitch           edge_flag;
    unsigned char       reserved;
    PEXEnumTypeIndex    type;
    float               width;
    PEXColorSpecifier   color;
} PEXEdgeBundleEntry;

typedef struct {
    PEXColorType        color_type;
    unsigned short      row_count;
    unsigned short      col_count;
    PEXArrayOfColor     colors;  /* pointer to 2D array of colors */
} PEXPatternEntry;

typedef PEXColorSpecifier       PEXColorEntry;

typedef struct {
    unsigned short      count;          /* number of fonts */
    PEXFont             *fonts;
} PEXTextFontEntry;

typedef struct {
    PEXEnumTypeIndex    type;
    unsigned short      reserved;
    PEXVector           direction;
    PEXCoord            point;
    float               concentration;
    float               spread_angle;
    float               attenuation1;
    float               attenuation2;
    PEXColorSpecifier   color;
} PEXLightEntry;

typedef struct {
    PEXSwitch           mode;
    unsigned char       reserved[3];
    float               front_plane;
    float               back_plane;
    float               front_scaling;
    float               back_scaling;
    PEXColorSpecifier   color;
} PEXDepthCueEntry;

typedef struct {
    PEXEnumTypeIndex    type;
    PEXEnumTypeIndex    model;
    unsigned short      max1;
    unsigned short      max2;
    unsigned short      max3;
    PEXSwitch           dither;
    unsigned char       reserved;
    unsigned long       mult1;
    unsigned long       mult2;
    unsigned long       mult3;
    float               weight1;
    float               weight2;
    float               weight3;
    unsigned long       base_pixel;
} PEXColorApproxEntry;

typedef struct { 
    unsigned short      clip_flags;
    unsigned short      reserved;
    PEXNPCSubVolume     clip_limits;
    PEXMatrix           orientation;
    PEXMatrix           mapping;
} PEXViewEntry;


/*
 * structure
 */
typedef struct {
    unsigned long       element_count;
    unsigned long       size;
    Bool                has_refs;
    unsigned short      edit_mode;
    unsigned long       element_pointer;
} PEXStructureInfo;

typedef struct {
    unsigned short      type;
    unsigned short      length;
} PEXElementInfo;


/*
 * search context
 */
typedef struct {
    PEXCoord            position;
    float               distance;
    unsigned short      ceiling;
    Bool                model_clip_flag;
    PEXStructurePath    start_path;
    PEXListOfNameSetPair normal;
    PEXListOfNameSetPair inverted;
} PEXSCAttributes;


/*
 * PHIGS workstation
 */
typedef struct {
    PEXTableIndex       index;
    unsigned short      reserved;
    PEXViewEntry        view;
} PEXViewRep;

typedef struct {
    unsigned short      count;                  /* number of views */
    PEXTableIndex       *views;
} PEXListOfView;

typedef struct {
    PEXStructure        sid;
    float               priority;
} PEXPostedStructure;

typedef struct {
    unsigned long       count;                  /* number of posted structures*/
    PEXPostedStructure  *structures;
} PEXListOfPostedStructure;

typedef struct {
    short               drawable_update;
    int                 visual_state;
    int                 drawable_surface;
    int                 view_update;
    PEXListOfView       defined_views;
    int                 wks_update;
    PEXNPCSubVolume     req_npc_subvolume;
    PEXNPCSubVolume     cur_npc_subvolume;
    PEXViewport         req_workstation_viewport;
    PEXViewport         cur_workstation_viewport;
    int                 hlhsr_update;
    PEXEnumTypeIndex    req_hlhsr_mode;
    PEXEnumTypeIndex    cur_hlhsr_mode;
    Drawable            drawable;
    PEXLookupTable      marker_bundle;
    PEXLookupTable      text_bundle;
    PEXLookupTable      line_bundle;
    PEXLookupTable      interior_bundle;
    PEXLookupTable      edge_bundle;
    PEXLookupTable      color_table;
    PEXLookupTable      depth_cue_table;
    PEXLookupTable      light_table;
    PEXLookupTable      color_approx_table;
    PEXLookupTable      pattern_table;
    PEXLookupTable      text_font_table;
    PEXNameSet          highlight_incl;
    PEXNameSet          highlight_excl;
    PEXNameSet          invisibility_incl;
    PEXNameSet          invisibility_excl;
    PEXListOfPostedStructure posted_structures;
    unsigned long       count_priorities;
    int                 buffer_update;
    int                 req_buffer_mode;
    int                 cur_buffer_mode;
} PEXWorkstationAttributes;

/* macros for setting bits in a workstation attribute bitmask */

#define PEXSetPWAttributeMask(mask, attr) \
    mask[((attr)) >> 5] |= (unsigned long) 1 << ( ((attr)) & 0x1f)

#define PEXSetPWAttributeMaskAll(mask) \
    mask[0] = 0xffffffff;              \
    mask[1] = 0x00000003

typedef struct {
    unsigned char       view_rep;
    unsigned char       marker_bundle;
    unsigned char       text_bundle;
    unsigned char       line_bundle;
    unsigned char       interior_bundle;
    unsigned char       edge_bundle;
    unsigned char       color_table;
    unsigned char       pattern_table;
    unsigned char       wks_transform;
    unsigned char       highlight_filter;
    unsigned char       invisibility_filter;
    unsigned char       hlhsr_mode;
    unsigned char       structure_modify;
    unsigned char       post_structure;
    unsigned char       unpost_structure;
    unsigned char       delete_structure;
    unsigned char       reference_modify;
    unsigned char       buffer_modify;
    unsigned char       light_table;
    unsigned char       depth_cue_table;
    unsigned char       color_approx_table;
} PEXWorkstationDynamics;


/*
 * workstation picking
 */
typedef struct {
    unsigned short      status;
    PEXPickPath         pick_path;
} PEXPMAttributes;

typedef struct {
    unsigned short      status;
    PEXPickPath         path;
    int                 path_order;
    PEXNameSet          inclusion;
    PEXNameSet          exclusion;
    PEXPickRecord       pick_record;
    PEXEnumTypeIndex    prompt_echo_type;
    PEXViewport         echo_volume;
    int                 echo_switch;
} PEXPDAttributes;


/*
 * errors
 */
/* similar to XErrorEvent - use to access additional info in OC error */
typedef struct {
    int             type;
    Display         *display;      /* Display the event was read from */
    XID             resourceid;    /* resource id of renderer or structure */
    unsigned long   serial;        /* serial number of failed request */
    unsigned char   error_code;    /* error code of failed request */
    unsigned char   request_code;  /* Major op-code of failed request */
    unsigned char   minor_code;    /* Minor op-code of failed request */
    unsigned short  op_code;       /* op-code of failed output command */
    unsigned short  count;         /* number of output commands successfully */
                                   /* executed before error */
} PEXOCErrorEvent;


/*
 * events
 */
typedef struct {
    int             type;
    unsigned long   serial;     /* # of last request processed by server */
    Bool            send_event; /* true if this came from a SendEvent request */
    Display         *display;   /* Display the event was read from */
    PEXRenderer     renderer;
} PEXMaxHitsReachedEvent;


/*
 * encode and decode
 */
typedef struct {
    unsigned short oc_type;
    union {
        struct {
            unsigned long count;
            PEXName *names;
        } AddToNameSet;
        struct {
            int length;
            char *data;
        } ApplicationData;
        struct {
            PEXCoord point1;
            PEXCoord point2;
            PEXCoord point3;
            unsigned int col_count;
            unsigned int row_count;
            PEXTableIndex *color_indices;
        } CellArray;
        struct {
            PEXCoord2D point1;
            PEXCoord2D point2;
            unsigned int col_count;
            unsigned int row_count;
            PEXTableIndex *color_indices;
        } CellArray2D;
        struct {
            PEXCoord origin;
            PEXCoord offset;
            unsigned int count;
            PEXEncodedTextData *encoded_text;
        } EncodedAnnoText;
        struct {
            PEXCoord2D origin;
            PEXCoord2D offset;
            unsigned int count;
            PEXEncodedTextData *encoded_text;
        } EncodedAnnoText2D;
        struct {
            PEXCoord origin;
            PEXVector vector1;
            PEXVector vector2;
            unsigned int count;
            PEXEncodedTextData *encoded_text;
        } EncodedText;
        struct {
            PEXCoord2D origin;
            unsigned int count;
            PEXEncodedTextData *encoded_text;
        } EncodedText2D;
        struct {
            PEXStructure structure;
        } ExecuteStructure;
        struct {
            PEXCoord point1;
            PEXCoord point2;
            PEXCoord point3;
            unsigned int col_count;
            unsigned int row_count;
            int color_type;
            PEXArrayOfColor colors;
        } ExtendedCellArray;
        struct {
            int shape_hint;
            int ignore_edges;
            unsigned int count;
            PEXCoord *points;
        } FillArea;
        struct {
            int shape_hint;
            int ignore_edges;
            unsigned int count;
            PEXCoord2D *points;
        } FillArea2D;
        struct {
            int shape_hint;
            int ignore_edges;
            int contour_hint;
            unsigned int count;
            PEXListOfCoord *point_lists;
        } FillAreaSet;
        struct {
            int shape_hint;
            int ignore_edges;
            int contour_hint;
            unsigned int count;
            PEXListOfCoord2D *point_lists;
        } FillAreaSet2D;
        struct {
            int shape_hint;
            int ignore_edges;
            int contour_hint;
            unsigned int facet_attributes;
            unsigned int vertex_attributes;
            int color_type;
            unsigned int count;
            PEXFacetData facet_data;
            PEXListOfVertex *vertex_lists;
        } FillAreaSetWithData;
        struct {
            int shape_hint;
            int ignore_edges;
            unsigned int facet_attributes;
            unsigned int vertex_attributes;
            int color_type;
            PEXFacetData facet_data;
            unsigned int count;
            PEXArrayOfVertex vertices;
        } FillAreaWithData;
        struct {
            long gdp_id;
            unsigned int count;
            PEXCoord *points;
            unsigned long length;
            char *data;
        } GDP;
        struct {
            long gdp_id;
            unsigned int count;
            PEXCoord2D *points;
            unsigned long length;
            char *data;
        } GDP2D;
        struct {
            long id;
            int length;
            char *data;
        } GSE;
        struct {
            long label;
        } Label;
        struct {
            unsigned int count;
            PEXCoord *points;
        } Markers;
        struct {
            unsigned int count;
            PEXCoord2D *points;
        } Markers2D;
        struct {
            int rationality;
            int order;
            float *knots;
            unsigned int count;
            PEXArrayOfCoord points;
            double tmin;
            double tmax;
        } NURBCurve;
        struct {
            int rationality;
            int uorder;
            int vorder;
            float *uknots;
            float *vknots;
            unsigned int col_count;
            unsigned int row_count;
            PEXArrayOfCoord points;
            unsigned int curve_count;
            PEXListOfTrimCurve *trim_curves;
        } NURBSurface;
        struct {
            unsigned int count;
            PEXCoord *points;
        } Polyline;
        struct {
            unsigned int count;
            PEXCoord2D *points;
        } Polyline2D;
        struct {
            unsigned int vertex_attributes;
            int color_type;
            unsigned int count;
            PEXListOfVertex *vertex_lists;
        } PolylineSetWithData;
        struct {
            int shape_hint;
            unsigned int facet_attributes;
            unsigned int vertex_attributes;
            int color_type;
            PEXArrayOfFacetData facet_data;
            unsigned int col_count;
            unsigned int row_count;
            PEXArrayOfVertex vertices;
        } QuadrilateralMesh;
        struct {
            unsigned long count;
            PEXName *names;
        } RemoveFromNameSet;
        struct {
            int halignment;
            int valignment;
        } SetATextAlignment;
        struct {
            double height;
        } SetATextHeight;
        struct {
            int path;
        } SetATextPath;
        struct {
            int style;
        } SetATextStyle;
        struct {
            PEXVector2D vector;
        } SetATextUpVector;
        struct {
            int style;
        } SetBFInteriorStyle;
        struct {
            int index;
        } SetBFInteriorStyleIndex;
        struct {
            PEXReflectionAttributes attributes;
        } SetBFReflectionAttributes;
        struct {
            int model;
        } SetBFReflectionModel;
        struct {
            int color_type;
            PEXColor color;
        } SetBFSurfaceColor;
        struct {
            unsigned int index;
        } SetBFSurfaceColorIndex;
        struct {
            int method;
        } SetBFSurfaceInterpMethod;
        struct {
            double expansion;
        } SetCharExpansion;
        struct {
            double height;
        } SetCharHeight;
        struct {
            double spacing;
        } SetCharSpacing;
        struct {
            PEXVector2D vector;
        } SetCharUpVector;
        struct {
            unsigned int index;
        } SetColorApproxIndex;
        struct {
            int method;
            double tolerance;
        } SetCurveApprox;
        struct {
            unsigned int index;
        } SetDepthCueIndex;
        struct {
            unsigned int index;
        } SetEdgeBundleIndex;
        struct {
            int mode;
        } SetFacetCullingMode;
        struct {
            int flag;
        } SetFacetDistinguishFlag;
        struct {
            PEXMatrix transform;
        } SetGlobalTransform;
        struct {
            PEXMatrix3x3 transform;
        } SetGlobalTransform2D;
        struct {
            unsigned long hlhsr_id;
        } SetHLHSRID;
        struct {
            unsigned long attribute;
            int asf;
        } SetIndividualASF;
        struct {
            unsigned int index;
        } SetInteriorBundleIndex;
        struct {
            int style;
        } SetInteriorStyle;
        struct {
            int index;
        } SetInteriorStyleIndex;
        struct {
            unsigned int enable_count;
            PEXTableIndex *enable;
            unsigned int disable_count;
            PEXTableIndex *disable;
        } SetLightSourceState;
        struct {
            unsigned int index;
        } SetLineBundleIndex;
        struct {
            int color_type;
            PEXColor color;
        } SetLineColor;
        struct {
            unsigned int index;
        } SetLineColorIndex;
        struct {
            int line_type;
        } SetLineType;
        struct {
            double width;
        } SetLineWidth;
        struct {
            int composition;
            PEXMatrix transform;
        } SetLocalTransform;
        struct {
            int composition;
            PEXMatrix3x3 transform;
        } SetLocalTransform2D;
        struct {
            unsigned int index;
        } SetMarkerBundleIndex;
        struct {
            int color_type;
            PEXColor color;
        } SetMarkerColor;
        struct {
            unsigned int index;
        } SetMarkerColorIndex;
        struct {
            double scale;
        } SetMarkerScale;
        struct {
            int marker_type;
        } SetMarkerType;
        struct {
            int flag;
        } SetModelClipFlag;
        struct {
            int op;
            unsigned int count;
            PEXHalfSpace *half_spaces;
        } SetModelClipVolume;
        struct {
            int op;
            unsigned int count;
            PEXHalfSpace2D *half_spaces;
        } SetModelClipVolume2D;
        struct {
            int shape_hint;
            unsigned int facet_attributes;
            unsigned int vertex_attributes;
            unsigned int edge_attributes;
            int contour_hint;
            int contours_all_one;
            int color_type;
            unsigned int set_count;
            PEXArrayOfFacetData facet_data;
            unsigned int vertex_count;
            PEXArrayOfVertex vertices;
            unsigned int index_count;
            PEXSwitch *edge_flags;
            PEXConnectivityData *connectivity;
        } SetOfFillAreaSets;
        struct {
            int psc_type;
            PEXPSCData characteristics;
        } SetParaSurfCharacteristics;
        struct {
            PEXCoord ref_point;
            PEXVector vector1;
            PEXVector vector2;
        } SetPatternAttributes;
        struct {
            PEXCoord2D ref_point;
        } SetPatternAttributes2D;
        struct {
            double width;
            double height;
        } SetPatternSize;
        struct {
            unsigned long pick_id;
        } SetPickID;
        struct {
            int method;
        } SetPolylineInterpMethod;
        struct {
            PEXReflectionAttributes attributes;
        } SetReflectionAttributes;
        struct {
            int model;
        } SetReflectionModel;
        struct {
            int model;
        } SetRenderingColorModel;
        struct {
            int method;
            double utolerance;
            double vtolerance;
        } SetSurfaceApprox;
        struct {
            int color_type;
            PEXColor color;
        } SetSurfaceColor;
        struct {
            unsigned int index;
        } SetSurfaceColorIndex;
        struct {
            int color_type;
            PEXColor color;
        } SetSurfaceEdgeColor;
        struct {
            unsigned int index;
        } SetSurfaceEdgeColorIndex;
        struct {
            int flag;
        } SetSurfaceEdgeFlag;
        struct {
            int edge_type;
        } SetSurfaceEdgeType;
        struct {
            double width;
        } SetSurfaceEdgeWidth;
        struct {
            int method;
        } SetSurfaceInterpMethod;
        struct {
            int halignment;
            int valignment;
        } SetTextAlignment;
        struct {
            unsigned int index;
        } SetTextBundleIndex;
        struct {
            int color_type;
            PEXColor color;
        } SetTextColor;
        struct {
            unsigned int index;
        } SetTextColorIndex;
        struct {
            unsigned int index;
        } SetTextFontIndex;
        struct {
            int path;
        } SetTextPath;
        struct {
            int precision;
        } SetTextPrecision;
        struct {
            unsigned int index;
        } SetViewIndex;
        struct {
            unsigned int facet_attributes;
            unsigned int vertex_attributes;
            int color_type;
            PEXArrayOfFacetData facet_data;
            unsigned int count;
            PEXArrayOfVertex vertices;
        } TriangleStrip;
    } data;
} PEXOCData;


/*
 * encoded output commands
 */

/* macro for inquiring max length for PEXGetOCAddr */

#define PEXGetOCAddrMaxSize(_display) \
    ((_display)->bufmax - (_display)->buffer)   /* this macro returns the     */
                                                /* maximum allowable size (in */
                                                /* bytes) for PEXGetOCAddr    */
                                                /* individual implementations */
                                                /* can modify the value, but  */
                                                /* the minimum allowed is 1024*/


/*
 * constants for utilities
 */

/* constants for PEXRotate */
#define PEXXAxis                1
#define PEXYAxis                2
#define PEXZAxis                3

/* constants for utilities error return status */
#define PEXBadVector            1
#define PEXBadVectors           2
#define PEXBadLimits            3
#define PEXBadViewport          4
#define PEXBadPlanes            5
#define PEXBadPRP               6
#define PEXBadMatrix            7
#define PEXBadPrimitive         8
#define PEXBadDistance          9
#define PEXBadAxis              10
#define PEXBadHomoCoord         11
#define PEXBadSubVolume         12

_XFUNCPROTOBEGIN

/*
 * function declarations
 */

extern void PEXAccumulateState(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXRenderer 		/* renderer */,
    unsigned long 		/* count */,
    PEXElementRef *		/* elements */
#endif
);

extern void PEXAddToNameSet(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned long 		/* count */,
    PEXName *		/* names */
#endif
);

extern void PEXAnnotationText(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXCoord *		/* origin */,
    PEXCoord *		/* offset */,
    int 		/* length */,
    char *		/* string */
#endif
);

extern void PEXAnnotationText2D(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXCoord2D *		/* origin */,
    PEXCoord2D *		/* offset */,
    int 		/* length */,
    char *		/* string */
#endif
);

extern void PEXApplicationData(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* length */,
    char *		/* data */
#endif
);

extern void PEXBeginPickAll(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    PEXRenderer 		/* renderer */,
    long 		/* structure_id */,
    int 		/* method */,
    int 		/* send_event */,
    int 		/* max_hits */,
    int 		/* pick_device_type */,
    PEXPickRecord *		/* pick_record */
#endif
);

extern void PEXBeginPickOne(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    PEXRenderer 		/* renderer */,
    long 		/* structure_id */,
    int 		/* method */,
    int 		/* pick_device_type */,
    PEXPickRecord *		/* pick_record */
#endif
);

extern void PEXBeginRendering(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    PEXRenderer 		/* renderer */
#endif
);

extern void PEXBeginStructure(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXRenderer 		/* renderer */,
    long 		/* structure_id */
#endif
);

extern void PEXBuildTransform(
#if NeedFunctionPrototypes
    PEXCoord *		/* fixed_point */,
    PEXVector *		/* trans_vector */,
    double 		/* angle_x */,
    double 		/* angle_y */,
    double 		/* angle_z */,
    PEXVector *		/* scale_vector */,
    PEXMatrix 		/* matrix_return */
#endif
);

extern void PEXBuildTransform2D(
#if NeedFunctionPrototypes
    PEXCoord2D *		/* fixed_point */,
    PEXVector2D *		/* trans_vector */,
    double 		/* angle_z */,
    PEXVector2D *		/* scale_vector */,
    PEXMatrix3x3 		/* matrix_return */
#endif
);

extern void PEXCellArray(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXCoord *		/* point1 */,
    PEXCoord *		/* point2 */,
    PEXCoord *		/* point3 */,
    unsigned int 		/* col_count */,
    unsigned int 		/* row_count */,
    PEXTableIndex *		/* color_indices */
#endif
);

extern void PEXCellArray2D(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXCoord2D *		/* point1 */,
    PEXCoord2D *		/* point2 */,
    unsigned int 		/* col_count */,
    unsigned int 		/* row_count */,
    PEXTableIndex *		/* color_indices */
#endif
);

extern void PEXChangeNameSet(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXNameSet 		/* nameset */,
    int 		/* action */,
    unsigned long 		/* count */,
    PEXName *		/* names */
#endif
);

extern void PEXChangePickDevice(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    int 		/* pick_device_type */,
    unsigned long 		/* value_mask */,
    PEXPDAttributes *		/* values */
#endif
);

extern void PEXChangePipelineContext(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXPipelineContext 		/* context */,
    unsigned long *		/* value_mask */,
    PEXPCAttributes *		/* values */
#endif
);

extern void PEXChangeRenderer(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXRenderer 		/* renderer */,
    unsigned long 		/* value_mask */,
    PEXRendererAttributes *		/* values */
#endif
);

extern void PEXChangeSearchContext(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXSearchContext 		/* context */,
    unsigned long 		/* value_mask */,
    PEXSCAttributes *		/* values */
#endif
);

extern void PEXChangeStructureRefs(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* old_structure */,
    PEXStructure 		/* new_structure */
#endif
);

extern void PEXCopyBytesToOC(
#if NeedFunctionPrototypes
    Display *		/* display */,
    int 		/* length */,
    char *		/* data */
#endif
);

extern void PEXCopyElements(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* src_structure */,
    int 		/* src_whence1 */,
    long 		/* src_offset1 */,
    int 		/* src_whence2 */,
    long 		/* src_offset2 */,
    PEXStructure 		/* dst_structure */,
    int 		/* dst_whence */,
    long 		/* dst_offset */
#endif
);

extern void PEXCopyLookupTable(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXLookupTable 		/* src_table */,
    PEXLookupTable 		/* dst_table */
#endif
);

extern void PEXCopyNameSet(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXNameSet 		/* src_nameset */,
    PEXNameSet 		/* dst_nameset */
#endif
);

extern void PEXCopyPipelineContext(
#if NeedFunctionPrototypes
    Display *		/* display */,
    unsigned long *		/* value_mask */,
    PEXPipelineContext 		/* src_context */,
    PEXPipelineContext 		/* dst_context */
#endif
);

extern void PEXCopySearchContext(
#if NeedFunctionPrototypes
    Display *		/* display */,
    unsigned long 		/* value_mask */,
    PEXSearchContext 		/* src_context */,
    PEXSearchContext 		/* dst_context */
#endif
);

extern void PEXCopyStructure(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* src_structure */,
    PEXStructure 		/* dst_structure */
#endif
);

extern PEXLookupTable PEXCreateLookupTable(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    int 		/* table_type */
#endif
);

extern PEXNameSet PEXCreateNameSet(
#if NeedFunctionPrototypes
    Display *		/* display */
#endif
);

extern PEXPickMeasure PEXCreatePickMeasure(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    int 		/* pick_device_type */
#endif
);

extern PEXPipelineContext PEXCreatePipelineContext(
#if NeedFunctionPrototypes
    Display *		/* display */,
    unsigned long *		/* value_mask */,
    PEXPCAttributes *		/* values */
#endif
);

extern PEXRenderer PEXCreateRenderer(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    unsigned long 		/* value_mask */,
    PEXRendererAttributes *		/* values */
#endif
);

extern PEXSearchContext PEXCreateSearchContext(
#if NeedFunctionPrototypes
    Display *		/* display */,
    unsigned long 		/* value_mask */,
    PEXSCAttributes *		/* values */
#endif
);

extern PEXStructure PEXCreateStructure(
#if NeedFunctionPrototypes
    Display *		/* display */
#endif
);

extern PEXWorkstation PEXCreateWorkstation(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    PEXLookupTable 		/* line_bundle */,
    PEXLookupTable 		/* marker_bundle */,
    PEXLookupTable 		/* text_bundle */,
    PEXLookupTable 		/* interior_bundle */,
    PEXLookupTable 		/* edge_bundle */,
    PEXLookupTable 		/* color_table */,
    PEXLookupTable 		/* pattern_table */,
    PEXLookupTable 		/* font_table */,
    PEXLookupTable 		/* depth_cue_table */,
    PEXLookupTable 		/* light_table */,
    PEXLookupTable 		/* color_approx_table */,
    PEXNameSet 		/* highlight_incl */,
    PEXNameSet 		/* highlight_excl */,
    PEXNameSet 		/* invisibility_incl */,
    PEXNameSet 		/* invisibility_excl */,
    int 		/* buffer_mode */
#endif
);

extern PEXOCData *PEXDecodeOCs(
#if NeedFunctionPrototypes
    int 		/* float_format */,
    unsigned long 		/* oc_count */,
    unsigned long 		/* length */,
    char *		/* encoded_ocs */
#endif
);

extern void PEXDeleteBetweenLabels(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* structure */,
    long 		/* label1 */,
    long 		/* label2 */
#endif
);

extern void PEXDeleteElements(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* structure */,
    int 		/* whence1 */,
    long 		/* offset1 */,
    int 		/* whence2 */,
    long 		/* offset2 */
#endif
);

extern void PEXDeleteTableEntries(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXLookupTable 		/* table */,
    unsigned int 		/* start */,
    unsigned int 		/* count */
#endif
);

extern void PEXDeleteToLabel(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* structure */,
    int 		/* whence */,
    long 		/* offset */,
    long 		/* label */
#endif
);

extern void PEXDestroyStructures(
#if NeedFunctionPrototypes
    Display *		/* display */,
    unsigned long 		/* count */,
    PEXStructure *		/* structures */
#endif
);

extern Status PEXElementSearch(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* structure */,
    int 		/* whence */,
    long 		/* offset */,
    int 		/* direction */,
    unsigned long 		/* incl_count */,
    unsigned short *		/* incl_list */,
    unsigned long 		/* excl_count */,
    unsigned short *		/* excl_list */,
    unsigned long *		/* elem_offset_return */
#endif
);

extern char *PEXEncodeOCs(
#if NeedFunctionPrototypes
    int 		/* float_format */,
    unsigned long 		/* oc_count */,
    PEXOCData *		/* oc_data */,
    unsigned long *		/* length_return */
#endif
);

extern void PEXEncodedAnnoText(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXCoord *		/* origin */,
    PEXCoord *		/* offset */,
    unsigned int 		/* count */,
    PEXEncodedTextData *		/* encoded_text */
#endif
);

extern void PEXEncodedAnnoText2D(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXCoord2D *		/* origin */,
    PEXCoord2D *		/* offset */,
    unsigned int 		/* count */,
    PEXEncodedTextData *		/* encoded_text */
#endif
);

extern void PEXEncodedText(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXCoord *		/* origin */,
    PEXVector *		/* vector1 */,
    PEXVector *		/* vector2 */,
    unsigned int 		/* count */,
    PEXEncodedTextData *		/* encoded_text */
#endif
);

extern void PEXEncodedText2D(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXCoord2D *		/* origin */,
    unsigned int 		/* count */,
    PEXEncodedTextData *		/* encoded_text */
#endif
);

extern PEXPickPath *PEXEndPickAll(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXRenderer 		/* renderer */,
    int *		/* status_return */,
    int *		/* more_return */,
    unsigned long *		/* count_return */
#endif
);

extern PEXPickPath *PEXEndPickOne(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXRenderer 		/* renderer */,
    int *		/* status_return */,
    int *		/* undetectable_return */
#endif
);

extern void PEXEndRendering(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXRenderer 		/* renderer */,
    int 		/* flush */
#endif
);

extern void PEXEndStructure(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXRenderer 		/* renderer */
#endif
);

extern void PEXEscape(
#if NeedFunctionPrototypes
    Display *		/* display */,
    unsigned long 		/* escape_id */,
    int 		/* length */,
    char *		/* escape_data */
#endif
);

extern char *PEXEscapeWithReply(
#if NeedFunctionPrototypes
    Display *		/* display */,
    unsigned long 		/* escape_id */,
    int 		/* length */,
    char *		/* escape_data */,
    unsigned long *		/* reply_length_return */
#endif
);

extern void PEXExecuteDeferredActions(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */
#endif
);

extern void PEXExecuteStructure(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXStructure 		/* structure */
#endif
);

extern void PEXExtendedCellArray(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXCoord *		/* point1 */,
    PEXCoord *		/* point2 */,
    PEXCoord *		/* point3 */,
    unsigned int 		/* col_count */,
    unsigned int 		/* row_count */,
    int 		/* color_type */,
    PEXArrayOfColor 		/* colors */
#endif
);

extern Status PEXFetchElements(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* structure */,
    int 		/* whence1 */,
    long 		/* offset1 */,
    int 		/* whence2 */,
    long 		/* offset2 */,
    int 		/* float_format */,
    unsigned long *		/* count_return */,
    unsigned long *		/* length_return */,
    char **		/* ocs_return */
#endif
);

extern Status PEXFetchElementsAndSend(
#if NeedFunctionPrototypes
    Display *		/* src_display */,
    PEXStructure 		/* structure */,
    int 		/* whence1 */,
    long 		/* offset1 */,
    int 		/* whence2 */,
    long 		/* offset2 */,
    Display *		/* dst_display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */
#endif
);

extern void PEXFillArea(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* shape_hint */,
    int 		/* ignore_edges */,
    unsigned int 		/* count */,
    PEXCoord *		/* points */
#endif
);

extern void PEXFillArea2D(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* shape_hint */,
    int 		/* ignore_edges */,
    unsigned int 		/* count */,
    PEXCoord2D *		/* points */
#endif
);

extern void PEXFillAreaSet(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* shape_hint */,
    int 		/* ignore_edges */,
    int 		/* contour_hint */,
    unsigned int 		/* count */,
    PEXListOfCoord *		/* point_lists */
#endif
);

extern void PEXFillAreaSet2D(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* shape_hint */,
    int 		/* ignore_edges */,
    int 		/* contour_hint */,
    unsigned int 		/* count */,
    PEXListOfCoord2D *		/* point_lists */
#endif
);

extern void PEXFillAreaSetWithData(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* shape_hint */,
    int 		/* ignore_edges */,
    int 		/* contour_hint */,
    unsigned int 		/* facet_attributes */,
    unsigned int 		/* vertex_attributes */,
    int 		/* color_type */,
    unsigned int 		/* count */,
    PEXFacetData *		/* facet_data */,
    PEXListOfVertex *		/* vertex_lists */
#endif
);

extern void PEXFillAreaWithData(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* shape_hint */,
    int 		/* ignore_edges */,
    unsigned int 		/* facet_attributes */,
    unsigned int 		/* vertex_attributes */,
    int 		/* color_type */,
    PEXFacetData *		/* facet_data */,
    unsigned int 		/* count */,
    PEXArrayOfVertex 		/* vertices */
#endif
);

extern void PEXFinishOCs(
#if NeedFunctionPrototypes
    Display *		/* display */
#endif
);

extern void PEXFreeEnumInfo(
#if NeedFunctionPrototypes
    unsigned long 		/* count */,
    unsigned long *		/* info_count */,
    PEXEnumTypeDesc *		/* enum_info */
#endif
);

extern void PEXFreeFontInfo(
#if NeedFunctionPrototypes
    unsigned long 		/* count */,
    PEXFontInfo *		/* font_info */
#endif
);

extern void PEXFreeFontNames(
#if NeedFunctionPrototypes
    unsigned long 		/* count */,
    char **		/* font_names */
#endif
);

extern void PEXFreeLookupTable(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXLookupTable 		/* table */
#endif
);

extern void PEXFreeNameSet(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXNameSet 		/* nameset */
#endif
);

extern void PEXFreeOCData(
#if NeedFunctionPrototypes
    unsigned long 		/* count */,
    PEXOCData *		/* oc_data */
#endif
);

extern void PEXFreePCAttributes(
#if NeedFunctionPrototypes
    PEXPCAttributes *		/* values */
#endif
);

extern void PEXFreePDAttributes(
#if NeedFunctionPrototypes
    PEXPDAttributes *		/* values */
#endif
);

extern void PEXFreePMAttributes(
#if NeedFunctionPrototypes
    PEXPMAttributes *		/* values */
#endif
);

extern void PEXFreePickMeasure(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXPickMeasure 		/* pick_measure */
#endif
);

extern void PEXFreePickPaths(
#if NeedFunctionPrototypes
    unsigned long 		/* count */,
    PEXPickPath *		/* pick_paths */
#endif
);

extern void PEXFreePipelineContext(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXPipelineContext 		/* context */
#endif
);

extern void PEXFreeRenderer(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXRenderer 		/* renderer */
#endif
);

extern void PEXFreeRendererAttributes(
#if NeedFunctionPrototypes
    PEXRendererAttributes *		/* values */
#endif
);

extern void PEXFreeSCAttributes(
#if NeedFunctionPrototypes
    PEXSCAttributes *		/* values */
#endif
);

extern void PEXFreeSearchContext(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXSearchContext 		/* context */
#endif
);

extern void PEXFreeStructurePaths(
#if NeedFunctionPrototypes
    unsigned long 		/* count */,
    PEXStructurePath *		/* paths */
#endif
);

extern void PEXFreeTableEntries(
#if NeedFunctionPrototypes
    int 		/* table_type */,
    unsigned int 		/* count */,
    PEXPointer 		/* entries */
#endif
);

extern void PEXFreeWorkstation(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */
#endif
);

extern void PEXFreeWorkstationAttributes(
#if NeedFunctionPrototypes
    PEXWorkstationAttributes *		/* values */
#endif
);

extern void PEXGDP(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    long 		/* gdp_id */,
    unsigned int 		/* count */,
    PEXCoord *		/* points */,
    unsigned long 		/* length */,
    char *		/* data */
#endif
);

extern void PEXGDP2D(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    long 		/* gdp_id */,
    unsigned int 		/* count */,
    PEXCoord2D *		/* points */,
    unsigned long 		/* length */,
    char *		/* data */
#endif
);

extern void PEXGSE(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    long 		/* id */,
    int 		/* length */,
    char *		/* data */
#endif
);

extern int PEXGeoNormFillArea(
#if NeedFunctionPrototypes
    unsigned int 		/* facet_attributes */,
    unsigned int 		/* vertex_attributes */,
    int 		/* color_type */,
    PEXFacetData *		/* facet_data */,
    unsigned int 		/* count */,
    PEXArrayOfVertex 		/* vertices */
#endif
);

extern int PEXGeoNormFillAreaSet(
#if NeedFunctionPrototypes
    unsigned int 		/* facet_attributes */,
    unsigned int 		/* vertex_attributes */,
    int 		/* color_type */,
    unsigned int 		/* count */,
    PEXFacetData *		/* facet_data */,
    PEXListOfVertex *		/* vertex_lists */
#endif
);

extern int PEXGeoNormQuadrilateralMesh(
#if NeedFunctionPrototypes
    unsigned int 		/* facet_attributes */,
    unsigned int 		/* vertex_attributes */,
    int 		/* color_type */,
    PEXArrayOfFacetData 		/* facet_data */,
    unsigned int 		/* col_count */,
    unsigned int 		/* row_count */,
    PEXArrayOfVertex 		/* vertices */
#endif
);

extern int PEXGeoNormSetOfFillAreaSets(
#if NeedFunctionPrototypes
    unsigned int 		/* facet_attributes */,
    unsigned int 		/* vertex_attributes */,
    int 		/* color_type */,
    unsigned int 		/* set_count */,
    PEXArrayOfFacetData 		/* facet_data */,
    unsigned int 		/* vertex_count */,
    PEXArrayOfVertex 		/* vertices */,
    unsigned int 		/* index_count */,
    PEXConnectivityData *		/* connectivity */
#endif
);

extern int PEXGeoNormTriangleStrip(
#if NeedFunctionPrototypes
    unsigned int 		/* facet_attributes */,
    unsigned int 		/* vertex_attributes */,
    int 		/* color_type */,
    PEXArrayOfFacetData 		/* facet_data */,
    unsigned int 		/* count */,
    PEXArrayOfVertex 		/* vertices */
#endif
);

extern PEXStructurePath *PEXGetAncestors(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* structure */,
    int 		/* path_part */,
    unsigned long 		/* path_depth */,
    unsigned long *		/* count_return */
#endif
);

extern Status PEXGetDefinedIndices(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXLookupTable 		/* table */,
    unsigned long *		/* count_return */,
    PEXTableIndex **		/* indices_return */
#endif
);

extern PEXStructurePath *PEXGetDescendants(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* structure */,
    int 		/* path_part */,
    unsigned long 		/* path_depth */,
    unsigned long *		/* count_return */
#endif
);

extern Status PEXGetElementInfo(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* structure */,
    int 		/* whence1 */,
    long 		/* offset1 */,
    int 		/* whence2 */,
    long 		/* offset2 */,
    int 		/* float_format */,
    unsigned long *		/* count_return */,
    PEXElementInfo **		/* info_return */
#endif
);

extern Status PEXGetEnumTypeInfo(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    unsigned long 		/* count */,
    int *		/* enum_types */,
    unsigned long 		/* item_mask */,
    unsigned long **		/* info_count_return */,
    PEXEnumTypeDesc **		/* enum_info_return */
#endif
);

extern PEXExtensionInfo *PEXGetExtensionInfo(
#if NeedFunctionPrototypes
    Display *		/* display */
#endif
);

extern Status PEXGetImpDepConstants(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    unsigned long 		/* count */,
    unsigned short *		/* names */,
    PEXImpDepConstant **		/* constants_return */
#endif
);

extern Status PEXGetNameSet(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXNameSet 		/* nameset */,
    unsigned long *		/* count_return */,
    PEXName **		/* names_return */
#endif
);

extern char *PEXGetOCAddr(
#if NeedFunctionPrototypes
    Display *		/* display */,
    int 		/* length */
#endif
);

extern PEXPDAttributes *PEXGetPickDevice(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    int 		/* pick_device_type */,
    unsigned long 		/* value_mask */
#endif
);

extern PEXPMAttributes *PEXGetPickMeasure(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXPickMeasure 		/* pick_measure */,
    unsigned long 		/* value_mask */
#endif
);

extern PEXPCAttributes *PEXGetPipelineContext(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXPipelineContext 		/* context */,
    unsigned long *		/* value_mask */
#endif
);

extern Status PEXGetPredefinedEntries(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    int 		/* table_type */,
    unsigned int 		/* start */,
    unsigned int 		/* count */,
    PEXPointer *		/* entries_return */
#endif
);

extern int PEXGetProtocolFloatFormat(
#if NeedFunctionPrototypes
    Display *		/* display */
#endif
);

extern PEXRendererAttributes *PEXGetRendererAttributes(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXRenderer 		/* renderer */,
    unsigned long 		/* value_mask */
#endif
);

extern Status PEXGetRendererDynamics(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXRenderer 		/* renderer */,
    unsigned long *		/* tables_return */,
    unsigned long *		/* name_sets_return */,
    unsigned long *		/* attributes_return */
#endif
);

extern PEXSCAttributes *PEXGetSearchContext(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXSearchContext 		/* context */,
    unsigned long 		/* value_mask */
#endif
);

extern int PEXGetSizeOCs(
#if NeedFunctionPrototypes
    int 		/* float_format */,
    int 		/* oc_count */,
    PEXOCData *		/* oc_data */
#endif
);

extern Status PEXGetStructureInfo(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* structure */,
    int 		/* float_format */,
    unsigned long 		/* value_mask */,
    PEXStructureInfo *		/* info_return */
#endif
);

extern PEXStructure *PEXGetStructuresInNetwork(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* structure */,
    int 		/* which */,
    unsigned long *		/* count_return */
#endif
);

extern Status PEXGetTableEntries(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXLookupTable 		/* table */,
    unsigned int 		/* start */,
    unsigned int 		/* count */,
    int 		/* value_type */,
    int *		/* table_type_return */,
    PEXPointer *		/* entries_return */
#endif
);

extern PEXPointer PEXGetTableEntry(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXLookupTable 		/* table */,
    unsigned int 		/* index */,
    int 		/* value_type */,
    int *		/* status_return */,
    int *		/* table_type_return */
#endif
);

extern Status PEXGetTableInfo(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    int 		/* table_type */,
    PEXTableInfo *		/* info_return */
#endif
);

extern PEXWorkstationAttributes *PEXGetWorkstationAttributes(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    unsigned long *		/* value_mask */
#endif
);

extern Status PEXGetWorkstationDynamics(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    PEXWorkstationDynamics *		/* dynamics_return */
#endif
);

extern Status PEXGetWorkstationPostings(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* structure */,
    unsigned long *		/* count_return */,
    PEXWorkstation **		/* postings_return */
#endif
);

extern Status PEXGetWorkstationViewRep(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    unsigned int 		/* index */,
    int *		/* update_return */,
    PEXViewRep *		/* req_view_return */,
    PEXViewRep *		/* cur_view_return */
#endif
);

extern void PEXIdentityMatrix(
#if NeedFunctionPrototypes
    PEXMatrix 		/* transform_return */
#endif
);

extern void PEXIdentityMatrix2D(
#if NeedFunctionPrototypes
    PEXMatrix3x3 		/* transform_return */
#endif
);

extern int PEXInitialize(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXExtensionInfo **		/* info_return */,
    int 		/* length */,
    char *		/* error_string */
#endif
);

extern int PEXInvertMatrix(
#if NeedFunctionPrototypes
    PEXMatrix 		/* transform */,
    PEXMatrix 		/* transform_return */
#endif
);

extern int PEXInvertMatrix2D(
#if NeedFunctionPrototypes
    PEXMatrix3x3 		/* transform */,
    PEXMatrix3x3 		/* transform_return */
#endif
);

extern void PEXLabel(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    long 		/* label */
#endif
);

extern char **PEXListFonts(
#if NeedFunctionPrototypes
    Display *		/* display */,
    char *		/* pattern */,
    unsigned int 		/* max_names */,
    unsigned long *		/* count_return */
#endif
);

extern char **PEXListFontsWithInfo(
#if NeedFunctionPrototypes
    Display *		/* display */,
    char *		/* pattern */,
    unsigned int 		/* max_names */,
    unsigned long *		/* count_return */,
    PEXFontInfo **		/* info_return */
#endif
);

extern PEXFont PEXLoadFont(
#if NeedFunctionPrototypes
    Display *		/* display */,
    char *		/* font_name */
#endif
);

extern int PEXLookAtViewMatrix(
#if NeedFunctionPrototypes
    PEXCoord *		/* from */,
    PEXCoord *		/* to */,
    PEXVector *		/* up */,
    PEXMatrix 		/* matrix_return */
#endif
);

extern Status PEXMapDCToWC(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    unsigned long 		/* dc_count */,
    PEXDeviceCoord *		/* dc_points */,
    unsigned int *		/* view_index_return */,
    unsigned long *		/* wc_count_return */,
    PEXCoord **		/* wc_points_return */
#endif
);

extern Status PEXMapWCToDC(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    unsigned long 		/* wc_count */,
    PEXCoord *		/* wc_points */,
    unsigned int 		/* view_index */,
    unsigned long *		/* dc_count_return */,
    PEXDeviceCoord **		/* dc_points_return */
#endif
);

extern int PEXMapXCToNPC(
#if NeedFunctionPrototypes
    int 		/* point_count */,
    PEXDeviceCoord2D *		/* points */,
    unsigned int 		/* window_height */,
    double 		/* z_dc */,
    PEXDeviceCoord *		/* viewport */,
    PEXNPCSubVolume *		/* npc_sub_volume */,
    int 		/* view_count */,
    PEXViewEntry *		/* views */,
    int *		/* view_return */,
    int *		/* count_return */,
    PEXCoord *		/* points_return */
#endif
);

extern int PEXMapXCToNPC2D(
#if NeedFunctionPrototypes
    int 		/* point_count */,
    PEXDeviceCoord2D *		/* points */,
    unsigned int 		/* window_height */,
    PEXDeviceCoord2D *		/* viewport */,
    PEXNPCSubVolume *		/* npc_sub_volume */,
    int 		/* view_count */,
    PEXViewEntry *		/* views */,
    int *		/* view_return */,
    int *		/* count_return */,
    PEXCoord2D *		/* points_return */
#endif
);

extern void PEXMarkers(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* count */,
    PEXCoord *		/* points */
#endif
);

extern void PEXMarkers2D(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* count */,
    PEXCoord2D *		/* points */
#endif
);

extern Status PEXMatchRenderingTargets(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    int 		/* depth */,
    int 		/* type */,
    Visual *		/* visual */,
    unsigned long 		/* max_targets */,
    unsigned long *		/* count_return */,
    PEXRenderingTarget **		/* targets_return */
#endif
);

extern void PEXMatrixMult(
#if NeedFunctionPrototypes
    PEXMatrix 		/* matrix1 */,
    PEXMatrix 		/* matrix2 */,
    PEXMatrix 		/* matrix_return */
#endif
);

extern void PEXMatrixMult2D(
#if NeedFunctionPrototypes
    PEXMatrix3x3 		/* matrix1 */,
    PEXMatrix3x3 		/* matrix2 */,
    PEXMatrix3x3 		/* matrix_return */
#endif
);

extern int PEXNPCToXCTransform(
#if NeedFunctionPrototypes
    PEXNPCSubVolume *		/* npc_sub_volume */,
    PEXDeviceCoord *		/* viewport */,
    unsigned int 		/* window_height */,
    PEXMatrix 		/* transform_return */
#endif
);

extern int PEXNPCToXCTransform2D(
#if NeedFunctionPrototypes
    PEXNPCSubVolume *		/* npc_sub_volume */,
    PEXDeviceCoord2D *		/* viewport */,
    unsigned int 		/* window_height */,
    PEXMatrix3x3 		/* transform_return */
#endif
);

extern void PEXNURBCurve(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* rationality */,
    int 		/* order */,
    float *		/* knots */,
    unsigned int 		/* count */,
    PEXArrayOfCoord 		/* points */,
    double 		/* tmin */,
    double 		/* tmax */
#endif
);

extern void PEXNURBSurface(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* rationality */,
    int 		/* uorder */,
    int 		/* vorder */,
    float *		/* uknots */,
    float *		/* vknots */,
    unsigned int 		/* col_count */,
    unsigned int 		/* row_count */,
    PEXArrayOfCoord 		/* points */,
    unsigned int 		/* curve_count */,
    PEXListOfTrimCurve *		/* trim_curves */
#endif
);

extern void PEXNoop(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */
#endif
);

extern int PEXNormalizeVectors(
#if NeedFunctionPrototypes
    int 		/* count */,
    PEXVector *		/* vectors */,
    PEXVector *		/* vectors_return */
#endif
);

extern int PEXNormalizeVectors2D(
#if NeedFunctionPrototypes
    int 		/* count */,
    PEXVector2D *		/* vectors */,
    PEXVector2D *		/* vectors_return */
#endif
);

extern int PEXOrthoProjMatrix(
#if NeedFunctionPrototypes
    double 		/* height */,
    double 		/* aspect */,
    double 		/* near */,
    double 		/* far */,
    PEXMatrix 		/* matrix_return */
#endif
);

extern int PEXPerspProjMatrix(
#if NeedFunctionPrototypes
    double 		/* fovy */,
    double 		/* distance */,
    double 		/* aspect */,
    double 		/* near */,
    double 		/* far */,
    PEXMatrix 		/* matrix_return */
#endif
);

extern PEXPickPath *PEXPickAll(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    PEXRenderer 		/* renderer */,
    int 		/* method */,
    int 		/* max_hits */,
    int 		/* pick_device_type */,
    PEXPickRecord *		/* pick_record */,
    int *		/* status_return */,
    int *		/* more_return */,
    unsigned long *		/* count_return */
#endif
);

extern PEXPickPath *PEXPickOne(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    PEXRenderer 		/* renderer */,
    PEXStructure 		/* structure */,
    int 		/* method */,
    int 		/* pick_device_type */,
    PEXPickRecord *		/* pick_record */,
    int *		/* status_return */,
    int *		/* undetectable_return */
#endif
);

extern int PEXPolarViewMatrix(
#if NeedFunctionPrototypes
    PEXCoord *		/* from */,
    double 		/* distance */,
    double 		/* azimuth */,
    double 		/* altitude */,
    double 		/* twist */,
    PEXMatrix 		/* matrix_return */
#endif
);

extern void PEXPolyline(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* count */,
    PEXCoord *		/* points */
#endif
);

extern void PEXPolyline2D(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* count */,
    PEXCoord2D *		/* points */
#endif
);

extern void PEXPolylineSetWithData(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* vertex_attributes */,
    int 		/* color_type */,
    unsigned int 		/* count */,
    PEXListOfVertex *		/* vertex_lists */
#endif
);

extern void PEXPostStructure(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    PEXStructure 		/* structure */,
    double 		/* priority */
#endif
);

extern void PEXQuadrilateralMesh(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* shape_hint */,
    unsigned int 		/* facet_attributes */,
    unsigned int 		/* vertex_attributes */,
    int 		/* color_type */,
    PEXArrayOfFacetData 		/* facet_data */,
    unsigned int 		/* col_count */,
    unsigned int 		/* row_count */,
    PEXArrayOfVertex 		/* vertices */
#endif
);

extern PEXTextExtent *PEXQueryEncodedTextExtents(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    unsigned int 		/* font_table_index */,
    int 		/* path */,
    double 		/* expansion */,
    double 		/* spacing */,
    double 		/* height */,
    int 		/* halign */,
    int 		/* valign */,
    unsigned long 		/* count */,
    PEXListOfEncodedText *		/* encoded_text */
#endif
);

extern PEXFontInfo *PEXQueryFont(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXFont 		/* font */
#endif
);

extern PEXTextExtent *PEXQueryTextExtents(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    unsigned int 		/* font_table_index */,
    int 		/* path */,
    double 		/* expansion */,
    double 		/* spacing */,
    double 		/* height */,
    int 		/* halign */,
    int 		/* valign */,
    unsigned long 		/* count */,
    PEXStringData *		/* text */
#endif
);

extern void PEXRedrawAllStructures(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */
#endif
);

extern void PEXRedrawClipRegion(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    unsigned long 		/* count */,
    PEXDeviceRect *		/* clip_rectangles */
#endif
);

extern void PEXRemoveFromNameSet(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned long 		/* count */,
    PEXName *		/* names */
#endif
);

extern void PEXRenderElements(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXRenderer 		/* renderer */,
    PEXStructure 		/* structure */,
    int 		/* whence1 */,
    long 		/* offset1 */,
    int 		/* whence2 */,
    long 		/* offset2 */
#endif
);

extern void PEXRenderNetwork(
#if NeedFunctionPrototypes
    Display *		/* display */,
    Drawable 		/* drawable */,
    PEXRenderer 		/* renderer */,
    PEXStructure 		/* structure */
#endif
);

extern void PEXRestoreModelClipVolume(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */
#endif
);

extern int PEXRotate(
#if NeedFunctionPrototypes
    int 		/* axis */,
    double 		/* angle */,
    PEXMatrix 		/* matrix_return */
#endif
);

extern void PEXRotate2D(
#if NeedFunctionPrototypes
    double 		/* angle */,
    PEXMatrix3x3 		/* matrix_return */
#endif
);

extern int PEXRotateGeneral(
#if NeedFunctionPrototypes
    PEXCoord *		/* point1 */,
    PEXCoord *		/* point2 */,
    double 		/* angle */,
    PEXMatrix 		/* matrix_return */
#endif
);

extern void PEXScale(
#if NeedFunctionPrototypes
    PEXVector *		/* scale_vector */,
    PEXMatrix 		/* matrix_return */
#endif
);

extern void PEXScale2D(
#if NeedFunctionPrototypes
    PEXVector2D *		/* scale_vector */,
    PEXMatrix3x3 		/* matrix_return */
#endif
);

extern Status PEXSearchNetwork(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXSearchContext 		/* context */,
    PEXStructurePath **		/* path_return */
#endif
);

extern void PEXSendOCs(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* float_format */,
    unsigned long 		/* oc_count */,
    unsigned int 		/* length */,
    char *		/* encoded_ocs */
#endif
);

extern void PEXSetATextAlignment(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* halignment */,
    int 		/* valignment */
#endif
);

extern void PEXSetATextHeight(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    double 		/* height */
#endif
);

extern void PEXSetATextPath(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* path */
#endif
);

extern void PEXSetATextStyle(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* style */
#endif
);

extern void PEXSetATextUpVector(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXVector2D *		/* vector */
#endif
);

extern void PEXSetBFInteriorStyle(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* style */
#endif
);

extern void PEXSetBFInteriorStyleIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* index */
#endif
);

extern void PEXSetBFReflectionAttributes(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXReflectionAttributes *		/* attributes */
#endif
);

extern void PEXSetBFReflectionModel(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* model */
#endif
);

extern void PEXSetBFSurfaceColor(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* color_type */,
    PEXColor *		/* color */
#endif
);

extern void PEXSetBFSurfaceColorIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetBFSurfaceInterpMethod(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* method */
#endif
);

extern void PEXSetCharExpansion(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    double 		/* expansion */
#endif
);

extern void PEXSetCharHeight(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    double 		/* height */
#endif
);

extern void PEXSetCharSpacing(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    double 		/* spacing */
#endif
);

extern void PEXSetCharUpVector(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXVector2D *		/* vector */
#endif
);

extern void PEXSetColorApproxIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetCurveApprox(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* method */,
    double 		/* tolerance */
#endif
);

extern void PEXSetDepthCueIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetEchoColor(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXRenderer 		/* renderer */,
    int 		/* color_type */,
    PEXColor *		/* color */
#endif
);

extern void PEXSetEdgeBundleIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetEditingMode(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* structure */,
    int 		/* mode */
#endif
);

extern void PEXSetElementPtr(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* structure */,
    int 		/* whence */,
    long 		/* offset */
#endif
);

extern void PEXSetElementPtrAtLabel(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXStructure 		/* structure */,
    long 		/* label */,
    long 		/* offset */
#endif
);

extern void PEXSetFacetCullingMode(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* mode */
#endif
);

extern void PEXSetFacetDistinguishFlag(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* flag */
#endif
);

extern void PEXSetGlobalTransform(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXMatrix 		/* transform */
#endif
);

extern void PEXSetGlobalTransform2D(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXMatrix3x3 		/* transform */
#endif
);

extern void PEXSetHLHSRID(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned long 		/* hlhsr_id */
#endif
);

extern void PEXSetIndividualASF(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned long 		/* attribute */,
    int 		/* asf */
#endif
);

extern void PEXSetInteriorBundleIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetInteriorStyle(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* style */
#endif
);

extern void PEXSetInteriorStyleIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* index */
#endif
);

extern void PEXSetLightSourceState(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* enable_count */,
    PEXTableIndex *		/* enable */,
    unsigned int 		/* disable_count */,
    PEXTableIndex *		/* disable */
#endif
);

extern void PEXSetLineBundleIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetLineColor(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* color_type */,
    PEXColor *		/* color */
#endif
);

extern void PEXSetLineColorIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetLineType(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* line_type */
#endif
);

extern void PEXSetLineWidth(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    double 		/* width */
#endif
);

extern void PEXSetLocalTransform(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* composition */,
    PEXMatrix 		/* transform */
#endif
);

extern void PEXSetLocalTransform2D(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* composition */,
    PEXMatrix3x3 		/* transform */
#endif
);

extern void PEXSetMarkerBundleIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetMarkerColor(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* color_type */,
    PEXColor *		/* color */
#endif
);

extern void PEXSetMarkerColorIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetMarkerScale(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    double 		/* scale */
#endif
);

extern void PEXSetMarkerType(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* marker_type */
#endif
);

extern void PEXSetModelClipFlag(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* flag */
#endif
);

extern void PEXSetModelClipVolume(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* op */,
    unsigned int 		/* count */,
    PEXHalfSpace *		/* half_spaces */
#endif
);

extern void PEXSetModelClipVolume2D(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* op */,
    unsigned int 		/* count */,
    PEXHalfSpace2D *		/* half_spaces */
#endif
);

extern void PEXSetOfFillAreaSets(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* shape_hint */,
    unsigned int 		/* facet_attributes */,
    unsigned int 		/* vertex_attributes */,
    unsigned int 		/* edge_attributes */,
    int 		/* contour_hint */,
    int 		/* contours_all_one */,
    int 		/* color_type */,
    unsigned int 		/* set_count */,
    PEXArrayOfFacetData 		/* facet_data */,
    unsigned int 		/* vertex_count */,
    PEXArrayOfVertex 		/* vertices */,
    unsigned int 		/* index_count */,
    PEXSwitch *		/* edge_flags */,
    PEXConnectivityData *		/* connectivity */
#endif
);

extern void PEXSetParaSurfCharacteristics(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* psc_type */,
    PEXPSCData *		/* characteristics */
#endif
);

extern void PEXSetPatternAttributes(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXCoord *		/* ref_point */,
    PEXVector *		/* vector1 */,
    PEXVector *		/* vector2 */
#endif
);

extern void PEXSetPatternAttributes2D(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXCoord2D *		/* ref_point */
#endif
);

extern void PEXSetPatternSize(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    double 		/* width */,
    double 		/* height */
#endif
);

extern void PEXSetPickID(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned long 		/* pick_id */
#endif
);

extern void PEXSetPolylineInterpMethod(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* method */
#endif
);

extern void PEXSetReflectionAttributes(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXReflectionAttributes *		/* attributes */
#endif
);

extern void PEXSetReflectionModel(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* model */
#endif
);

extern void PEXSetRenderingColorModel(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* model */
#endif
);

extern void PEXSetSurfaceApprox(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* method */,
    double 		/* utolerance */,
    double 		/* vtolerance */
#endif
);

extern void PEXSetSurfaceColor(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* color_type */,
    PEXColor *		/* color */
#endif
);

extern void PEXSetSurfaceColorIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetSurfaceEdgeColor(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* color_type */,
    PEXColor *		/* color */
#endif
);

extern void PEXSetSurfaceEdgeColorIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetSurfaceEdgeFlag(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* flag */
#endif
);

extern void PEXSetSurfaceEdgeType(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* edge_type */
#endif
);

extern void PEXSetSurfaceEdgeWidth(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    double 		/* width */
#endif
);

extern void PEXSetSurfaceInterpMethod(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* method */
#endif
);

extern void PEXSetTableEntries(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXLookupTable 		/* table */,
    unsigned int 		/* start */,
    unsigned int 		/* count */,
    int 		/* table_type */,
    PEXPointer 		/* entries */
#endif
);

extern void PEXSetTextAlignment(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* halignment */,
    int 		/* valignment */
#endif
);

extern void PEXSetTextBundleIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetTextColor(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* color_type */,
    PEXColor *		/* color */
#endif
);

extern void PEXSetTextColorIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetTextFontIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetTextPath(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* path */
#endif
);

extern void PEXSetTextPrecision(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* precision */
#endif
);

extern void PEXSetViewIndex(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* index */
#endif
);

extern void PEXSetWorkstationBufferMode(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    int 		/* buffer_mode */
#endif
);

extern void PEXSetWorkstationDisplayUpdateMode(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    int 		/* update_mode */
#endif
);

extern void PEXSetWorkstationHLHSRMode(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    int 		/* hlhsr_mode */
#endif
);

extern void PEXSetWorkstationViewPriority(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    unsigned int 		/* index1 */,
    unsigned int 		/* index2 */,
    int 		/* priority */
#endif
);

extern void PEXSetWorkstationViewRep(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    unsigned int 		/* view_index */,
    PEXViewEntry *		/* values */
#endif
);

extern void PEXSetWorkstationViewport(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    PEXViewport *		/* viewport */
#endif
);

extern void PEXSetWorkstationWindow(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    PEXNPCSubVolume *		/* workstation_window */
#endif
);

extern Status PEXStartOCs(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    int 		/* float_format */,
    int 		/* oc_count */,
    int 		/* word_count */
#endif
);

extern void PEXText(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXCoord *		/* origin */,
    PEXVector *		/* vector1 */,
    PEXVector *		/* vector2 */,
    int 		/* length */,
    char *		/* string */
#endif
);

extern void PEXText2D(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    PEXCoord2D *		/* origin */,
    int 		/* length */,
    char *		/* string */
#endif
);

extern int PEXTransformPoints(
#if NeedFunctionPrototypes
    PEXMatrix 		/* transform */,
    int 		/* count */,
    PEXCoord *		/* points */,
    PEXCoord *		/* points_return */
#endif
);

extern int PEXTransformPoints2D(
#if NeedFunctionPrototypes
    PEXMatrix3x3 		/* transform */,
    int 		/* count */,
    PEXCoord2D *		/* points */,
    PEXCoord2D *		/* points_return */
#endif
);

extern void PEXTransformPoints2DH(
#if NeedFunctionPrototypes
    PEXMatrix3x3 		/* transform */,
    int 		/* count */,
    PEXCoord *		/* points */,
    PEXCoord *		/* points_return */
#endif
);

extern void PEXTransformPoints4D(
#if NeedFunctionPrototypes
    PEXMatrix 		/* transform */,
    int 		/* count */,
    PEXCoord4D *		/* points */,
    PEXCoord4D *		/* points_return */
#endif
);

extern void PEXTransformVectors(
#if NeedFunctionPrototypes
    PEXMatrix 		/* transform */,
    int 		/* count */,
    PEXVector *		/* vectors */,
    PEXVector *		/* vectors_return */
#endif
);

extern void PEXTransformVectors2D(
#if NeedFunctionPrototypes
    PEXMatrix3x3 		/* transform */,
    int 		/* count */,
    PEXVector2D *		/* vectors */,
    PEXVector2D *		/* vectors_return */
#endif
);

extern void PEXTranslate(
#if NeedFunctionPrototypes
    PEXVector *		/* trans_vector */,
    PEXMatrix 		/* matrix_return */
#endif
);

extern void PEXTranslate2D(
#if NeedFunctionPrototypes
    PEXVector2D *		/* trans_vector */,
    PEXMatrix3x3 		/* matrix_return */
#endif
);

extern void PEXTriangleStrip(
#if NeedFunctionPrototypes
    Display *		/* display */,
    XID 		/* resource_id */,
    PEXOCRequestType 		/* req_type */,
    unsigned int 		/* facet_attributes */,
    unsigned int 		/* vertex_attributes */,
    int 		/* color_type */,
    PEXArrayOfFacetData 		/* facet_data */,
    unsigned int 		/* count */,
    PEXArrayOfVertex 		/* vertices */
#endif
);

extern void PEXUnloadFont(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXFont 		/* font */
#endif
);

extern void PEXUnpostAllStructures(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */
#endif
);

extern void PEXUnpostStructure(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */,
    PEXStructure 		/* structure */
#endif
);

extern void PEXUpdatePickMeasure(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXPickMeasure 		/* pick_measure */,
    int 		/* pick_device_type */,
    PEXPickRecord *		/* pick_record */
#endif
);

extern void PEXUpdateWorkstation(
#if NeedFunctionPrototypes
    Display *		/* display */,
    PEXWorkstation 		/* workstation */
#endif
);

extern int PEXViewMappingMatrix(
#if NeedFunctionPrototypes
    PEXCoord2D *		/* frame */,
    PEXNPCSubVolume *		/* viewport */,
    int 		/* perspective */,
    PEXCoord *		/* prp */,
    double 		/* view_plane */,
    double 		/* back_plane */,
    double 		/* front_plane */,
    PEXMatrix 		/* matrix_return */
#endif
);

extern int PEXViewMappingMatrix2D(
#if NeedFunctionPrototypes
    PEXCoord2D *		/* frame */,
    PEXCoord2D *		/* viewport */,
    PEXMatrix3x3 		/* matrix_return */
#endif
);

extern int PEXViewOrientationMatrix(
#if NeedFunctionPrototypes
    PEXCoord *		/* vrp */,
    PEXVector *		/* vpn */,
    PEXVector *		/* vup */,
    PEXMatrix 		/* matrix_return */
#endif
);

extern int PEXViewOrientationMatrix2D(
#if NeedFunctionPrototypes
    PEXCoord2D *		/* vrp */,
    PEXVector2D *		/* vup */,
    PEXMatrix3x3 		/* matrix_return */
#endif
);

extern int PEXXCToNPCTransform(
#if NeedFunctionPrototypes
    PEXNPCSubVolume *		/* npc_sub_volume */,
    PEXDeviceCoord *		/* viewport */,
    unsigned int 		/* window_height */,
    PEXMatrix 		/* transform_return */
#endif
);

extern int PEXXCToNPCTransform2D(
#if NeedFunctionPrototypes
    PEXNPCSubVolume *		/* npc_sub_volume */,
    PEXDeviceCoord2D *		/* viewport */,
    unsigned int 		/* window_height */,
    PEXMatrix3x3 		/* transform_return */
#endif
);

extern unsigned long PEXCountOCs(
#if NeedFunctionPrototypes
    int 		/* float_format */,
    unsigned long 		/* length */,
    char *		/* encoded_ocs */
#endif
);

_XFUNCPROTOEND

#endif /* _PEXLIB_H_ */