summaryrefslogtreecommitdiff
path: root/support/dktools/dk3const.h
blob: 6ac065cd440c6f093f56f95ebde415252a0de9a2 (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

/**	@file	dk3const.h	Constants for the dk3 libraries.
*/

#ifndef DK3_CONST_H_INCLUDED
/** Avoid multiple inclusion. */
#define DK3_CONST_H_INCLUDED 1

#include <dk3conf.h>

/**	@defgroup	apptypes	Application types.
*/
/**@{*/
enum {
/**	Application type: Not (yet) specified.

No application type was specified.
*/
DK3_APP_TYPE_UNKNOWN	=	0,

/**	Application type: Command line application.

Diagnostics go to a log file and to standard error output.
The log file is deleted by dk3app_close() unless keeping the
log file is required by the preference /log/file/keep.
*/
DK3_APP_TYPE_COMMAND,

/**	Application type: GUI application.

Diagnostics go to a log file.
The log file is deleted by dk3app_close() unless keeping the
log file is required by the preference /log/file/keep.
*/
DK3_APP_TYPE_GUI,

/**	Application type: Daemon.

Diagnostics go to a log file.
The same log file is used again and again, messages
are appended. The log file is not deleted automatically.
*/
DK3_APP_TYPE_DAEMON,

/**	Application type: Silent application.

No diagnostic messages are produced.
*/
DK3_APP_TYPE_SILENT
};
/**@}*/



/**	@defgroup	fileenc	Encodings for text files.
	These encodings can be used when writing texts to file.
	For multi-byte characters we have to decide whether to write
	MSB first or LSB first.
*/
/**@{*/
enum {
/**	Plain ascii text.
*/
DK3_FILE_ENCODING_ASCII			=	0,

/**	UTF-8 encoding.
*/
DK3_FILE_ENCODING_UTF8,

/**	UTF-16 encoding, MSB comes first.
*/
DK3_FILE_ENCODING_UTF16_MSB_FIRST,

/**	UTF-16 encoding, LSB comes first.
 */
DK3_FILE_ENCODING_UTF16_LSB_FIRST,

/**	32-bit UNICODE used directly, MSB comes first.
 */
DK3_FILE_ENCODING_UNICODE_MSB_FIRST,

/**	32-bit UNICODE used directly, LSB comes first.
 */
DK3_FILE_ENCODING_UNICODE_LSB_FIRST
};
/**@}*/



/**	@defgroup	stringenc	Encodings for text.
	These encoding are used when keeping text in memory.
*/
/**@{*/
enum {
/**	Plain ascii text.
*/
DK3_ENCODING_PLAIN	=	DK3_FILE_ENCODING_ASCII,

/**	UTF-8 encoding.
*/
DK3_ENCODING_UTF8	=	DK3_FILE_ENCODING_UTF8,

/**	UTF-16 encoding, MSB comes first.
*/
DK3_ENCODING_UTF16	=	DK3_FILE_ENCODING_UTF16_MSB_FIRST,

/**	32-bit UNICODE used directly, MSB comes first.
 */
DK3_ENCODING_UNICODE	=	DK3_FILE_ENCODING_UNICODE_MSB_FIRST
};
/**@}*/




/**	@defgroup	filetypes	File types
	These file types are returned in the ft component of the
	dk3_stat_t type.
*/
/**@{*/
enum {

/**	Regular file.
*/
DK3_FT_REGULAR			=	1,

/**	Directory.
*/
DK3_FT_DIRECTORY,

/**	FIFO.
*/
DK3_FT_FIFO,

/**	Character special device.
*/
DK3_FT_SPECIAL_CHAR,

/**	Block special device.
*/
DK3_FT_SPECIAL_BLOCK,

/**	Socket.
*/
DK3_FT_SOCKET,

/* Next there are some exotic file types. */

/**	Door.
*/
DK3_FT_DOOR,

/**	Event port.
*/
DK3_FT_EVENT_PORT,

/**	Xenix special file.
*/
DK3_FT_XENIX_SPECIAL,

/**	Xenix semaphore.
*/
DK3_FT_XENIX_SEMAPHORE,

/**	Xenix shared data.
*/
DK3_FT_XENIX_SHARED_DATA,

/**	Multiplexed character device.
 */
DK3_FT_MUX_CHAR,

/**	Multiplexed block device.
 */
DK3_FT_MUX_BLOCK,

/**	VxFS compressed file.
 */
DK3_FT_VXFS_COMPRESSED,

/**	Network special file.
 */
DK3_FT_NETWORK_SPECIAL,

/**	Whiteout (not used for inode).
 */
DK3_FT_WHITEOUT,

/**	ACL shadow inode.
 */
DK3_FT_ACL_SHADOW,

/**	Symlink with non-existing target.
*/
DK3_FT_BAD_SYMLINK,

/**	Maximum found so far. Applications must use int i[DK3_FT_MAX+1]
	to store information about all the file types.
 */
DK3_FT_MAX			=	DK3_FT_BAD_SYMLINK,

/**	Symbolic link (this flag is or-combined with one of the values below).
*/
DK3_FT_SYMLINK			=	256,

};
/**@}*/



/**	@defgroup	filepermissions	File permissions.
*/
/**@{*/
enum {
/**	Read permission for owner.
*/
DK3_FPERM_U_READ		=	0400,

/**	Write permission for owner.
*/
DK3_FPERM_U_WRITE		=	0200,

/**	Execute permission for owner.
*/
DK3_FPERM_U_EXEC		=	0100,

/**	Read permission for group.
*/
DK3_FPERM_G_READ		=	0040,

/**	Write permission for group.
*/
DK3_FPERM_G_WRITE		=	0020,

/**	Execute permission for group.
*/
DK3_FPERM_G_EXEC		=	0010,

/**	Read permission for others.
*/
DK3_FPERM_O_READ		=	0004,

/**	Write permission for others.
*/
DK3_FPERM_O_WRITE		=	0002,

/**	Execute permission for others.
*/
DK3_FPERM_O_EXEC		=	0001,

/**	Set user ID on execution.
*/
DK3_FPERM_SUID			=	04000,

/**	Set group ID on execution.
*/
DK3_FPERM_SGID			=	02000,

/**	VTX: Save swapped text segment even after use.
*/
DK3_FPERM_VTX			=	01000,

/**	Directory create mode: Only for user.
*/
DK3_FPERM_CREATE_PRIVATE	=	0700,

/**	File create mode: Only for user.
*/
DK3_FPERM_CREATE_FILE_PRIVATE	=	0600,

/**	Directory create mode: Full permissions for owner and group.
*/
DK3_FPERM_CREATE_GROUP		=	0770,

/**	File create mode: Full permissions for owner and group.
*/
DK3_FPERM_CREATE_FILE_GROUP	=	0660
};
/**@}*/



/**	@defgroup	streamuseflags	Flags how to use a stream.
	A stream can be opened for reading, writing or both.
*/
/**@{*/
enum {
/**	Allowed to read from stream.
*/
DK3_STREAM_FLAG_READ	=	1,

/**	Allowed to write to stream.
*/
DK3_STREAM_FLAG_WRITE
};
/**@}*/



/**	@defgroup	streamapicommands	Stream API commands.
	These commands are used in the dk3stream.c module for
	communication between the exported functions and the low-level
	function dealing with the stream destination.
*/
/**@{*/
enum {
/**	Read into input buffer.
*/
DK3_STREAM_API_READ		=	1,

/**	Write output buffer.
*/
DK3_STREAM_API_WRITE,

/**	Flush output buffer.
*/
DK3_STREAM_API_FLUSH,

/**	Check whether we have reached the end of data.
*/
DK3_STREAM_API_AT_END,

/**	Close the low-level data.
*/
DK3_STREAM_API_CLOSE,

/**	Check whether a zero read result indicates end of data.
*/
DK3_STREAM_API_ZERO_IS_END,

/**	Check for error.
*/
DK3_STREAM_API_ERROR
};
/**@}*/



/**	@defgroup	loglevels	Log levels.
	These levels are used to describe the importance of log messages.
	Log messages are written to a log file, command line applications
	also write to standard error output (stderr).
	For both log destinations there is a required level, only messages
	on that level or higher priorized (lower numeric value) are written
	to that destination.
*/
/**@{*/
enum {
/** This message priority never occurs. */
DK3_LL_NONE	=	0,

/** Panic message. */
DK3_LL_PANIC,

/** Fatal error message. */
DK3_LL_FATAL,

/** Error message. */
DK3_LL_ERROR,

/** Warning message. */
DK3_LL_WARNING,

/** Informational message. */
DK3_LL_INFO,

/** Progress message. */
DK3_LL_PROGRESS,

/** Debug message. */
DK3_LL_DEBUG,

/** Message can be ignored. */
DK3_LL_IGNORE
};
/**@}*/



/**	Preferences priorities.
*/
enum {
/**	Mask to retrieve scope value.
*/
DK3_PREF_SCOPE			=	0x0007,

/**	Scope: Host.
*/
DK3_PREF_SCOPE_HOST		=	0x0001,

/**	Scope: Application.
*/
DK3_PREF_SCOPE_APPLICATION	=	0x0002,

/**	Scope: User name.
*/
DK3_PREF_SCOPE_USER		=	0x0004,

/**	Mask to retrieve source.
*/
DK3_PREF_SOURCE			=	0x0018,

/**	Source: System configuration settings.
*/
DK3_PREF_SOURCE_SYSTEM		=	0x0000,

/**	Source: Users general configuration settings.
*/
DK3_PREF_SOURCE_USER		=	0x0008,

/**	Source:	Command line arguments.
*/
DK3_PREF_SOURCE_COMMANDLINE	=	0x0010,
};



/**	@defgroup	errorcodes	Error codes. */
/**@{*/
enum {
/**	No error occured.
*/
DK3_ERROR_NONE				=	0,

/**	System error, see errno.
*/
DK3_ERROR_SYSTEM,

/**	Aborted by user (cancel button).
*/
DK3_ERROR_ABORTED,

/**	Mathematical error (division by zero).
*/
DK3_ERROR_MATH_DIVZERO,

/**	Mathematical error (result out of range).
*/
DK3_ERROR_MATH_OVERFLOW,

/**	Mathematical error (at least one argument out of range).
*/
DK3_ERROR_MATH_OUT_OF_RANGE,

/**	Not enough memory.
*/
DK3_ERROR_MEMORY,

/**	Invalid arguments passed to function.
*/
DK3_ERROR_INVALID_ARGS,

/**	Incomplete configuration.
*/
DK3_ERROR_INCOMPLETE_CONFIGURATION,

/**	Stream not opened for writing.
*/
DK3_ERROR_NOT_OPENED_FOR_WRITING,

/**	Stream not opened for reading.
*/
DK3_ERROR_NOT_OPENED_FOR_READING,

/**	An error occured during a write operation.
*/
DK3_ERROR_DURING_WRITE,

/**	An error occured during a read operation.
*/
DK3_ERROR_DURING_READ,

/**	No supported (library was not available during build time).
*/
DK3_ERROR_NOT_SUPPORTED,

/**	Entry not found.
*/
DK3_ERROR_NOT_FOUND,

/**	Conversion of binary data to text failed.
*/
DK3_ERROR_CONVERSION_FAILED,

/**	Data too large.
*/
DK3_ERROR_TOO_LARGE,

/**	Data unusable, probably damaged.
*/
DK3_ERROR_DATA_DAMAGED,

/**	Syntax error in input file.
*/
DK3_ERROR_SYNTAX,

/**	Network protocol is not supported.
*/
DK3_ERROR_PROTOCOL_NOT_SUPPORTED,

/**	Network address family is not supported.
*/
DK3_ERROR_ADDRESS_FAMILY_NOT_SUPPORTED,

/**	Insufficient permissions.
*/
DK3_ERROR_INSUFFICIENT_PERMISSIONS,

/**	Illegal network protocol family.
*/
DK3_ERROR_ILLEGAL_PROTOCOL_FAMILY,

/**	Process table overflow.
*/
DK3_ERROR_PROCESS_TABLE_OVERFLOW,

/**	Limit reached for number of open filedescriptors.
*/
DK3_ERROR_TOO_MANY_OPEN_FILES,

/**	Error in I/O operation.
*/
DK3_ERROR_IO,

/**	Signal was received.
*/
DK3_ERROR_INTERRUPTED,

/**	IP address not found for host.
*/
DK3_ERROR_HOST_NOT_FOUND,

/**	Local address already in use.
*/
DK3_ERROR_ADDR_IN_USE,

/**	Out of resources.
*/
DK3_ERROR_RESOURCES,

/**	Previous connection request in processing.
*/
DK3_ERROR_IN_PROGRESS,

/**	Connection refused, no-one listening on the port.
*/
DK3_ERROR_CONNECTION_REFUSED,

/**	Socket is already connected.
*/
DK3_ERROR_ALREADY_CONNECTED,

/**	Network is unreachable.
*/
DK3_ERROR_NETWORK_UNREACHABLE,

/**	Operation timed out.
*/
DK3_ERROR_TIMEOUT,

/**	Failed to retrieve or set socket options.
*/
DK3_ERROR_SOCKET_OPTIONS,

/**	Failed to bind local address.
*/
DK3_ERROR_BIND_FAILED,

/**	The socket is already bound to an address.
*/
DK3_ERROR_ALREADY_BOUND,

/**	Operation would block.
*/
DK3_ERROR_WOULD_BLOCK,

/**	Connection reset by peer.
*/
DK3_ERROR_CONNECTION_RESET,

/**	Peer address is required to send over connectionless socket.
*/
DK3_ERROR_ADDRESS_REQUIRED,

/**	Writing to a pipe no-one is reading.
*/
DK3_ERROR_PIPE,

/**	End of input found.
*/
DK3_ERROR_END_OF_INPUT,

/**	Socket not connected.
*/
DK3_ERROR_SOCKET_NOT_CONNECTED,

/**	Listen operation failed on socket.
*/
DK3_ERROR_LISTEN_FAILED,

/**	Failed to accept incoming connection request.
*/
DK3_ERROR_ACCEPT_FAILED,

/**	Connection attempt aborted.
*/
DK3_ERROR_CONNECTION_ABORTED,

/**	Error in network protocol.
*/
DK3_ERROR_NETWORK_PROTOCOL,

/**	Message was not sent completely.
*/
DK3_ERROR_MESSAGE_NOT_SENT_COMPLETELY,

/**	Network subsystem or Winsock not ready.
*/
DK3_ERROR_NETWORK_SUBSYSTEM_NOT_READY,

/**	The address is not available!
*/
DK3_ERROR_ADDRESS_NOT_AVAILABLE,

/**	Host (temporarily) unreachable!
*/
DK3_ERROR_HOST_UNREACHABLE,

/**	Stale NFS file handle.
*/
DK3_ERROR_STALE_NFS_FILE_HANDLE,

/**	No select function available.
*/
DK3_ERROR_NO_SELECT,

/**	Iteration failed (no result after maximum number of passes).
*/
DK3_ERROR_ITERATION
};
/**@}*/



/**	Installation directories.
	Order must correspond to order of directories in the dk3inst.c module.
*/
enum {

/**	Installation prefix (/usr/local).
*/
DK3_INST_PREFIX		=	0,

/**	System configuration directory (/usr/local/etc).
*/
DK3_INST_SYSCONF	=	1,

/**	Data root directory (/usr/local/share).
*/
DK3_INST_DATAROOT	=	2,

/**	Local state directory (/usr/local/var).
*/
DK3_INST_LOCALSTATE	=	3,

/**	bin directory (/usr/local/bin).
*/
DK3_INST_BIN		=	4,

/**	sbin directory (/usr/local/sbin).
*/
DK3_INST_SBIN		=	5,

/**	lib directory (/usr/local/lib).
*/
DK3_INST_LIB		=	6,

/**	include directory (/usr/local/include).
*/
DK3_INST_INCLUDE	=	7,

/**	man directory (/usr/local/share/man).
*/
DK3_INST_MAN		=	8,

/**	Installation prefix again (/usr/local).
*/
DK3_INST_PREFIX2	=	9,

/**	libexec directory (/usr/local/libexec).
*/
DK3_INST_LIBEXEC	=	10
};



/**	@defgroup	mdtypes	Message digest types.
	Order here must match order in dk3chks -> dk3_checksum_type_names.
*/
/**@{*/
enum {
/**	RSA Security, Inc. MD5 message digest.
*/
DK3_MD_TYPE_MD5		=	1,

/**	SHA-1 message digest.
*/
DK3_MD_TYPE_SHA_1,

/**	SHA-224 message digest.
*/
DK3_MD_TYPE_SHA_224,

/**	SHA-256 message digest.
*/
DK3_MD_TYPE_SHA_256,

/**	SHA-384 message digest.
*/
DK3_MD_TYPE_SHA_384,

/**	SHA-512 message digest.
*/
DK3_MD_TYPE_SHA_512,

/**	RIPEMD-160 message digest.
*/
DK3_MD_TYPE_RIPEMD_160,

/**	Maximum number for digest type.
*/
DK3_MD_TYPE_MAX	=	DK3_MD_TYPE_RIPEMD_160
};
/**@}*/



/**	@defgroup	dataencoding	Data encoding.
	Order here must match order in dk3enc -> dk3_data_encoding_names.
*/
/**@{*/
enum {
/**	Hexadecimal encoding.
*/
DK3_DATA_ENCODING_HEX			=	0,

/**	ASCII-85 encoding.
*/
DK3_DATA_ENCODING_ASCII85,

/**	Reverse ASCII-85 encoding.
*/
DK3_DATA_ENCODING_REVERSE_ASCII85,

/**	Maximum number for encoding.
*/
DK3_DATA_ENCODING_MAX		=	DK3_DATA_ENCODING_REVERSE_ASCII85
};
/**@}*/



/**	Signal handling types.
	Different signal handling mechanisms are available for different
	operating systems.
*/
enum {
/**	No signal handling available.
*/
DK3_SIGNAL_HANDLING_TYPE_NONE		=	0,

/**	Use signal() function.
*/
DK3_SIGNAL_HANDLING_TYPE_SIGNAL,

/**	Use sigset() function.
*/
DK3_SIGNAL_HANDLING_TYPE_SIGSET,

/**	Use sigaction() function.
*/
DK3_SIGNAL_HANDLING_TYPE_SIGACTION
};


/**	@defgroup	rndtypes	Random number generator types.
	Depending on the OS and the installed libraries there are different
	PRNGs available.
*/
/**@{*/
enum {
/**	PRNG type: OpenSSL.
*/
DK3_PRNG_OPENSSL	=	1,

/**	PRNG type: initstate()/setstate().
*/
DK3_PRNG_STATE		=	2,

/**	PRNG type: nrand48().
*/
DK3_PRNG_RAND48		=	4,

/**	PRNG type: rand().
*/
DK3_PRNG_SIMPLE		=	8,

/**	Mask to enable all PRNG types.
*/
DK3_PRNG_ALL		=
(DK3_PRNG_OPENSSL + DK3_PRNG_STATE + DK3_PRNG_RAND48 + DK3_PRNG_SIMPLE)
};
/**@}*/



/**	Application commands.
*/
enum {
/**	Show help.
*/
DK3_APP_CMD_HELP		=	1,

/**	Show version.
*/
DK3_APP_CMD_VERSION		=	2,

/**	Show license conditions.
*/
DK3_APP_CMD_LICENSE		=	4
};


/**	@defgroup	outputfiltercelltypes	Output filter cell types.
*/
/**@{*/
enum {
/**	Output filter cell type: Binary to hex encoding.
*/
DK3_OF_CELL_TYPE_HEX		=	0,

/**	Output filter cell type: Binary to ASCII85 encoding.
*/
DK3_OF_CELL_TYPE_A85,

/**	Output filter cell type: Run-length compression.
*/
DK3_OF_CELL_TYPE_RUN_LENGTH,

/**	Output filter cell type: Flate compression.
*/
DK3_OF_CELL_TYPE_FLATE
};
/**@}*/



/**	Sizes for flate buffers. */
enum {
/**	Input buffer size for flate compression.
*/
DK3_OF_FLATE_IN_BUFFER_SIZE	=	1024,

/**	Output buffer size for flate compression
	(in theory 1057 would suffice).
*/
DK3_OF_FLATE_OUT_BUFFER_SIZE	=	1536
};



/**	@defgroup	databasetypes	Database types. */
/**@{*/
enum {
/**	Database type: Not yet set.
*/
DK3_DB_TYPE_UNKNOWN	=	-1,
/**	Database type: In-memory database, synchronize on
	explicit request and on close only.
*/
DK3_DB_TYPE_MEMORY	=	0,

/**	Database type: Berkeley DB.
*/
DK3_DB_TYPE_BDB		=	1,

/**	Database type: NDBM.
*/
DK3_DB_TYPE_NDBM	=	2
};
/**@}*/



/**	Database type for SQL databases. */
enum {
/**	SQL database type: Not type configured yet.
*/
DK3_SQLDB_TYPE_UNKNOWN	=	-1,

/**	SQL database type: Not type configured yet.
*/
DK3_SQLDB_TYPE_MYSQL	=	0
};



/**	@defgroup	databaseaccess	Access types for databases. */
/**@{*/
enum {
/**	Database access: Read only.
*/
DK3_DB_ACCESS_READ	=	1,

/**	Database access: Write entries.
*/
DK3_DB_ACCESS_WRITE	=	2
};
/**@}*/



/**	Text and object alignments.
*/
enum {
/**	Align: Horizontally and vertically centered.
*/
DK3_ALIGN_CENTER		=	0,

/**	Align: Horizontally centered.
*/
DK3_ALIGN_CENTER_HORIZONTAL	=	0,

/**	Align: Left.
*/
DK3_ALIGN_LEFT			=	1,

/**	Align: Right.
*/
DK3_ALIGN_RIGHT			=	2,

/**	Align: Mask to retrieve horizontal alignment.
*/
DK3_ALIGN_HORIZONTAL		=	3,

/**	Align: Vertically centered.
*/
DK3_ALIGN_CENTER_VERTICAL	=	0,

/**	Align: Top.
*/
DK3_ALIGN_TOP			=	4,

/**	Align: Bottom.
*/
DK3_ALIGN_BOTTOM		=	8,

/**	Align: Mask to retrieve vertical alignment.
*/
DK3_ALIGN_VERTICAL		=	12
};



/**	@defgroup	retrieveguialignment Retrieve GUI alignment.
*/
/**@{*/
/**	Retrieve horizontal alignment from horizontal/vertical combination.
*/
#define	DK3_ALIGN_GET_HORIZONTAL(x)	((x) & DK3_ALIGN_HORIZONTAL)

/**	Retrieve vertical alignment from horizontal/vertical combination.
*/
#define	DK3_ALIGN_GET_VERTICAL(x)	((x) & DK3_ALIGN_VERTICAL)
/**@}*/



/**	@defgroup	colorspaces	Color spaces for bitmaps.
*/
/**@{*/
enum {
/**	Color space: Not defined yet.
*/
DK3_COLOR_SPACE_UNKNOWN		=	0,

/**	Color space: Grey.
*/
DK3_COLOR_SPACE_GRAY,

/**	Color space: Grey with alpha channel.
*/
DK3_COLOR_SPACE_GRAY_ALPHA,

/**	Color space: RGB.
*/
DK3_COLOR_SPACE_RGB,

/**	Color space: RGB with alpha channel.
*/
DK3_COLOR_SPACE_RGBA,

/**	Color space: CMYK.
*/
DK3_COLOR_SPACE_CMYK,

/**	Color space: Y Cb Cr
*/
DK3_COLOR_SPACE_YCbCr,

/**	Color space: Y Cb Cr K (inverted CMYK?)
*/
DK3_COLOR_SPACE_YCCK,

/**	Color space: Hue, saturation, brightness.
*/
DK3_COLOR_SPACE_HSB,
};
/**@}*/



/**	@defgroup	linecap	Line cap styles. */
/**@{*/
enum {
/**	Line cap: Butted.
*/
DK3_LINECAP_BUTT	=	0,

/**	Line cap: Rounded.
*/
DK3_LINECAP_ROUND,

/**	Line cap: Half linewidt added.
*/
DK3_LINECAP_SQUARE
};
/**@}*/



/**	Line join styles.  */
enum {
/**	Line join: Mitered.
*/
DK3_LINEJOIN_MITER		=	0,

/**	Line join: Rounded corner.
*/
DK3_LINEJOIN_ROUND,

/**	Line join: Cut corner.
*/
DK3_LINEJOIN_BEVEL
};



/**	@defgroup	bifimagetypes	BIF image types.
*/
/**@{*/
enum {
/**	Image type: Unknown.
*/
DK3_BIF_IMAGE_TYPE_UNKNOWN	=	-1,

/**	Image type: PNG.
*/
DK3_BIF_IMAGE_TYPE_PNG		=	0,

/**	Image type: JPEG.
*/
DK3_BIF_IMAGE_TYPE_JPEG		=	1,

/**	Image type: TIFF.
*/
DK3_BIF_IMAGE_TYPE_TIFF		=	4
};
/**@}*/



/**	@defgroup	bifanalysis	Analysis types for bitmap images.
*/
/**@{*/
enum {
/**	Bitmap image analysis: Number of bits necessary.
*/
DK3_BIF_ANALYSIS_BITS		=	1,

/**	Bitmap image analysis: Color really used.
*/
DK3_BIF_ANALYSIS_COLOR		=	2,

/**	Bitmap image analysis: Alpha channel really used.
*/
DK3_BIF_ANALYSIS_ALPHA		=	4,

/**	Bitmap image analysis: Complete analysis
*/
DK3_BIF_ANALYSIS_ALL		=	7,

/**	Bitmap image analysis: Analysis to prepare PS output.
*/
DK3_BIF_ANALYSIS_FOR_PS		=	3,
};
/**@}*/



/**	@defgroup	dkbmmodes	Run modes for dkbm and wxdkbm.
*/
/**@{*/
enum {
/**	Bitmap to PS/PDF conversion: Create standalone image.

	Alpha channel: The image is mixed against a background color
	defined in the source file or on the command line or mixed against
	white if there is no background chunk.

	Frames: If the input contains multiple frames only the first
	frame is used.

	An optional resolution chunk from the source file is used
	to scale the image, otherwise each pixel is sized to 1 PS/PDF point.
	No automatic rotation.

	A showpage instruction is written to PS output, not to EPS
	output.
*/
DK3_BMEPS_MODE_IMAGE		=	0,

/**	Bitmap to PS/PDF conversion: Create object to embed in a document.

	Alpha channel for EPS output: The image is mixed against
	a background specified in the file or on the command line or against
	a white background.

	Alpha channel for PDF output: The alpha channel is transferred
	to the output so the object can be placed over other objects.

	Frames: If the input file contains multiple frames only the first
	frame is used.

	Each pixel is sized to 1 PS/PDF point. No automatic rotation.
	Scaling and rotating is up to the application processing
	the document in which the object is embedded.

	No showpage instruction is written to PS output.
*/
DK3_BMEPS_MODE_OBJECT		=	1,

/**	Bitmap to PS/PDF conversion: Create print job or standalone PDF file.

	Alpha channel: The image is mixed against a background color
	defined in the source file or on command line or mixed against
	white if there is no background chunk.

	Frames: If the input contains multiple frames all frames are
	used, the output contains multiple pages.

	The image is placed in a given area to fill it optimally.
	Automatic rotation may occur to best fit the area.

	For PS output a showpage instruction is written at the end
	of each page.
*/
DK3_BMEPS_MODE_DOCUMENT		=	2,

/**	Bitmap to PS/PDF conversion: Create object to embed in a document
	in a given area.

	Alpha channel for EPS output: The image is mixed against
	a background specified in the file or on the command line or against
	a white background.

	Alpha channel for PDF output: The alpha channel is transferred
	to the output so the object can be placed over other objects.

	Frames: If the input contains multiple frames only the first
	frame is used.

	The image is placed in a given area with a specified rotation
	mode. Rotation depends on a DK3_IMAGE_ORIGIN_xxx value,
	see @ref imageorigin.

	No showpage instruction is written to PS output.
*/
DK3_BMEPS_MODE_PLACED_OBJECT	=	3
};
/**@}*/



/**	@defgroup	bmepsdrivers	Output drivers for dkbm/wxdkbm.
*/
/**@{*/
enum {
/**	Bitmap to PS/PDF conversion: Output driver to create PS.
*/
DK3_BMEPS_DRIVER_PS		=	0,

/**	Bitmap to PS/PDF conversion: Output driver to create EPS.
*/
DK3_BMEPS_DRIVER_EPS,

/**	Bitmap to PS/PDF conversion: Output driver to create PDF.
*/
DK3_BMEPS_DRIVER_PDF,

/**	Bitmap to PS/PDF conversion: Output driver to create a bounding box.
*/
DK3_BMEPS_DRIVER_BB,

/**	Bitmap to PS/PDF conversion: Output driver for print using wxWidgets.
*/
DK3_BMEPS_DRIVER_WXPRINT
};
/**@}*/



/**	@defgroup	bmepssizehandling	Size handling in bmeps.
*/
/**@{*/
enum {
/**	Bmeps size handling:	1 pixel corresponds to 1 PS point.
*/
DK3_BMEPS_SIZE_1_1		=	0,

/**	Bmeps size handling:	Use resolution chunk from input file.
*/
DK3_BMEPS_SIZE_CHUNK,

/**	Bmeps size handling:	DPI size specified.
*/
DK3_BMEPS_SIZE_SPECIFIED,

/**	Bmeps size handling:	Paper size specified.
*/
DK3_BMEPS_SIZE_PAPER
};
/**@}*/



/**	@defgroup	imageorigin	Rotation instructions for images.
	In XFig and transfig images are rotated depending on the
	position of the first image rectangle point click and
	the flipped flag.
*/
/**@{*/
enum {
/**	Image placement: First click in left top point, not flipped.
*/
DK3_IMAGE_ORIGIN_LEFT_TOP		=	0,

/**	Image placement: First click in left bottom point, not flipped.
*/
DK3_IMAGE_ORIGIN_LEFT_BOTTOM,

/**	Image placement: First click in right top point, not flipped.
*/
DK3_IMAGE_ORIGIN_RIGHT_TOP,

/**	Image placement: First click in right bottom point, not flipped.
*/
DK3_IMAGE_ORIGIN_RIGHT_BOTTOM,

/**	Image placement: First click in left top point, flipped.
*/
DK3_IMAGE_ORIGIN_LEFT_TOP_FLIPPED,

/**	Image placement: First click in left bottom point, flipped.
*/
DK3_IMAGE_ORIGIN_LEFT_BOTTOM_FLIPPED,

/**	Image placement: First click in right top point, flipped.
*/
DK3_IMAGE_ORIGIN_RIGHT_TOP_FLIPPED,

/**	Image placement: First click in right bottom point, flipped.
*/
DK3_IMAGE_ORIGIN_RIGHT_BOTTOM_FLIPPED
};
/**@}*/



/**	@defgroup	flatepredictors	Predictors for flate compression.
*/
/**@{*/
enum {
/**	Compression predictor: None.
*/
DK3_COMPRESSION_PREDICTOR_NONE		=	0,

/**	Compression predictor: TIFF.
*/
DK3_COMPRESSION_PREDICTOR_TIFF,

/**	Compression predictor: PNG sub (value left).
*/
DK3_COMPRESSION_PREDICTOR_PNG_SUB,

/**	Compression predictor: PNG up (value above).
*/
DK3_COMPRESSION_PREDICTOR_PNG_UP,

/**	Compression predictor: PNG average.
*/
DK3_COMPRESSION_PREDICTOR_PNG_AVERAGE,

/**	Compression predictor: PNG paeth.
*/
DK3_COMPRESSION_PREDICTOR_PNG_PAETH
};
/**@}*/



/**	Run state.
*/
enum {
/**	Run state: No autorun required.
*/
DK3_WX_AUTOSTART_NORMAL		=	0,

/**	Run state: Waiting for autorun start.
*/
DK3_WX_AUTOSTART_START,

/**	Run state: Running.
*/
DK3_WX_AUTOSTART_RUNNING,

/**	Run state: Finished, application can exit.
*/
DK3_WX_AUTOSTART_FINISHED,

/**	Run state: Application allowed to exit and notified about that.
*/
DK3_WX_AUTOSTART_WAIT_FOR_EXIT
};



/**	OpenSSL PRNG seeding.
*/
enum {
/**	Number of bytes required to seed OpenSSL PRNG.
*/
DK3_SEED_OPENSSL_BYTES	=	1024
};



/**	Paper size configuration file.
*/
enum {
/**	Configuration line size for paper formats.
*/
DK3_PAPER_CONFIG_LINE_SIZE	=	256
};



/**	@defgroup	pdfxobjecttype	XObject types for PDF creation.
*/
/**@{*/
enum {
/**	XObject represents an image.
*/
DK3_PDF_XO_TYPE_IMAGE	=	1,

/**	XObject represents an alpha mask.
*/
DK3_PDF_XO_TYPE_ALPHA
};
/**@}*/



/**	@defgroup	shutdownvalues	Values for socket shutdown.
*/
/**@{*/
enum {
/**	Shutdown socket for read access.
*/
DK3_TCPIP_SHUTDOWN_READ		=	0,

/**	Shutdown socket for write access.
*/
DK3_TCPIP_SHUTDOWN_WRITE,

/**	Shutdown socket for both read and write access.
*/
DK3_TCPIP_SHUTDOWN_RW
};
/**@}*/



#if 0
/**	Socket states.
*/
enum {
/**	Socket state: Initialized.
*/
DK3_SOCKET_STATE_INITIALIZED	=	1
};
#endif



/**	SNMP versions.
*/
enum {
/**	SNMP version not (yet) known.
*/
DK3_SNMP_VERSION_UNKNOWN	=	0,

/**	SNMP version: 1.
*/
DK3_SNMP_VERSION_1,

/**	SNMP version: 2c.
*/
DK3_SNMP_VERSION_2C,

/**	SNMP version: 2p.
*/
DK3_SNMP_VERSION_2P,

/**	SNMP version: 3.
*/
DK3_SNMP_VERSION_3
};



/**	Font features.
*/
enum {
/**	Roman font.
*/
DK3_FONT_ROMAN			=	0,

/**	Sans-serif font.
*/
DK3_FONT_SANS_SERIF		=	1,

/**	Typewriter font.
*/
DK3_FONT_TYPEWRITER		=	2,

/**	Mask to retrieve font category.
*/
DK3_FONT_FAMILY			=	3,

/**	Bold font.
*/
DK3_FONT_BOLD			=	4,

/**	Italic font (in german: kursiv).
*/
DK3_FONT_ITALIC			=	8,

/**	Oblique font (in german: schraeggestellt).
*/
DK3_FONT_OBLIQUE		=	16,

/**	Mask value to check if text is either bold or oblique.
*/
DK3_FONT_ITOB			=	24
};



/**	PS fonts.
	We use the same font order as the Fig file standard.
*/
enum {
/**	PS font: Default font (Times Roman).
*/
DK3_FONT_PS_DEFAULT					=	-1,

/**	PS font: Times Roman.
*/
DK3_FONT_PS_TIMES_ROMAN					=	0,

/**	PS font: Times Roman Italic.
*/
DK3_FONT_PS_TIMES_ITALIC,

/**	PS font: Times Roman Bold.
*/
DK3_FONT_PS_TIMES_BOLD,

/**	PS font: Times Roman Bold Italic.
*/
DK3_FONT_PS_TIMES_BOLD_ITALIC,

/**	PS font: Avantgarde Book.
*/
DK3_FONT_PS_AVANTGARDE_BOOK,

/**	PS font: Avantgarde Book Oblique.
*/
DK3_FONT_PS_AVANTGARDE_BOOK_OBLIQUE,

/**	PS font: Avantgarde Demi.
*/
DK3_FONT_PS_AVANTGARDE_DEMI,

/**	PS font: Avantgarde Demi Oblique.
*/
DK3_FONT_PS_AVANTGARDE_DEMI_OBLIQUE,

/**	PS font: Bookman Light.
*/
DK3_FONT_PS_BOOKMAN_LIGHT,

/**	PS font: Bookman Light Italic.
*/
DK3_FONT_PS_BOOKMAN_LIGHT_ITALIC,

/**	PS font: Bookman Demi.
*/
DK3_FONT_PS_BOOKMAN_DEMI,

/**	PS font: Bookman Demi Italic.
*/
DK3_FONT_PS_BOOKMAN_DEMI_ITALIC,

/**	PS font: Courier.
*/
DK3_FONT_PS_COURIER,

/**	PS font: Courier Oblique.
*/
DK3_FONT_PS_COURIER_OBLIQUE,

/**	PS font: Courier Bold.
*/
DK3_FONT_PS_COURIER_BOLD,

/**	PS font: Courier Bold Oblique.
*/
DK3_FONT_PS_COURIER_BOLD_OBLIQUE,

/**	PS font: Helvetica.
*/
DK3_FONT_PS_HELVETICA,
	
/**	PS font: Helvetica Oblique.
*/
DK3_FONT_PS_HELVETICA_OBLIQUE,

/**	PS font: Helvetica Bold.
*/
DK3_FONT_PS_HELVETICA_BOLD,

/**	PS font: Helvetica Bold Oblique.
*/
DK3_FONT_PS_HELVETICA_BOLD_OBLIQUE,

/**	PS font: Helvetica Narrow.
*/
DK3_FONT_PS_HELVETICA_NARROW,

/**	PS font: Helvetica Narrow Oblique.
*/
DK3_FONT_PS_HELVETICA_NARROW_OBLIQUE,

/**	PS font: Helvetica Narrow Bold.
*/
DK3_FONT_PS_HELVETICA_NARROW_BOLD,

/**	PS font: Helvetica Narrow Bold Oblique.
*/
DK3_FONT_PS_HELVETICA_NARROW_BOLD_OBLIQUE,

/**	PS font: New Century Schoolbook Roman.
*/
DK3_FONT_PS_NEW_CENTURY_SCHOOLBOOK_ROMAN,

/**	PS font: New Century Schoolbook Italic.
*/
DK3_FONT_PS_NEW_CENTURY_SCHOOLBOOK_ITALIC,

/**	PS font: New Century Schoolbook Bold.
*/
DK3_FONT_PS_NEW_CENTURY_SCHOOLBOOK_BOLD,

/**	PS font: New Century Schoolbook Bold Italic.
*/
DK3_FONT_PS_NEW_CENTURY_SCHOOLBOOK_BOLD_ITALIC,

/**	PS font: Palatino Roman.
*/
DK3_FONT_PS_PALATINO_ROMAN,

/**	PS font: Palatino Roman Italic.
*/
DK3_FONT_PS_PALATINO_ITALIC,

/**	PS font: Palatino Roman Bold.
*/
DK3_FONT_PS_PALATINO_BOLD,

/**	PS font: Palatino Roman Bold Italic.
*/
DK3_FONT_PS_PALATINO_BOLD_ITALIC,

/**	PS font: Symbol.
*/
DK3_FONT_PS_SYMBOL,

/**	PS font: Zapf Chancery.
*/
DK3_FONT_PS_ZAPF_CHANCERY_MEDIUM_ITALIC,

/**	PS font: Zapf Dingbats.
*/
DK3_FONT_PS_ZAPF_DINGBATS
};



/**	@defgroup	printertypes	Printer types.
*/
/**@{*/
enum {
/**	Printer type: Unspecified/unknown.
*/
DK3_PRINTER_TYPE_NONE		=	0,

/**	Printer type: Windows system printer.
*/
DK3_PRINTER_TYPE_WINDOWS,

/**	Printer type: Raw socket.
*/
DK3_PRINTER_TYPE_SOCKET,

/**	Printer type: LPD.
*/
DK3_PRINTER_TYPE_LPD,

/**	Printer type: LPRng.
*/
DK3_PRINTER_TYPE_LPRNG
};
/**@}*/



/*	Not an enum:
	The dkChar data type has different size, can be 8, 16 or
	32 bit long. So our constants can not be type int, and thus
	not enum.
*/
/**	@defgroup	characters	Characters. */
/**@{*/
#if DK3_CHAR_SIZE > 1
#if DK3_CHAR_SIZE > 2
/* +++ 32 bit +++ */
/**	String finalizer.
*/
#define	DK3_CHAR_0	0UL

/**	Byte order marker (BOM)
*/
#define	DK3_CHAR_BOM	0x0000FEFFUL

/**	Backslash.
*/
#define	DK3_CHAR_BS	0x0000005CUL

/**	Slash.
*/
#define	DK3_CHAR_SLASH	0x0000002FUL

/**	Minus.
*/
#define	DK3_CHAR_MINUS	0x0000002DUL

#if DK3_HAVE_BACKSLASH
/**	File name separator.
*/
#define	DK3_CHAR_SEP	0x0000005CUL
/**	Not a file name separator.
*/
#define	DK3_CHAR_NOSEP	0x0000002FUL
#else
/**	File name separator.
*/
#define	DK3_CHAR_SEP	0x0000002FUL
/**	Not a file name separator.
*/
#define	DK3_CHAR_NOSEP	0x0000005CUL
#endif
/**	Newline.
*/
#define	DK3_CHAR_NL	0x0000000AUL
/**	Dot.
*/
#define	DK3_CHAR_DOT	0x0000002EUL
/* --- 32 bit --- */
#else
/* +++ 16 bit +++ */
/**	String finalizer.
*/
#define	DK3_CHAR_0	0U

/**	Byte order marker (BOM).
*/
#define DK3_CHAR_BOM	0xFEFFU

/**	Backslash.
*/
#define	DK3_CHAR_BS	0x005CU

/**	Slash.
*/
#define	DK3_CHAR_SLASH	0x002FU

/**	Minus.
*/
#define	DK3_CHAR_MINUS	0x002DU

#if DK3_HAVE_BACKSLASH
/**	File name separator.
*/
#define	DK3_CHAR_SEP	0x005CU
/**	Not a file name separator.
*/
#define	DK3_CHAR_NOSEP	0x002FU
#else
/**	File name separator.
*/
#define	DK3_CHAR_SEP	0x002FU
/**	Not a file name separator.
*/
#define	DK3_CHAR_NOSEP	0x005CU
#endif
/**	Newline.
*/
#define	DK3_CHAR_NL	0x000AU
/**	Dot.
*/
#define	DK3_CHAR_DOT	0x002EU
/* --- 16 bit --- */
#endif
#else
/* +++ 8 bit +++ */
/**	String finalizer.
*/
#define	DK3_CHAR_0	'\0'

/**	Backslash.
*/
#define	DK3_CHAR_BS	'\\'

/**	Slash.
*/
#define	DK3_CHAR_SLASH	'/'

/**	Minus
*/
#define	DK3_CHAR_MINUS	'-'

#if DK3_HAVE_BACKSLASH
/**	File name separator.
*/
#define	DK3_CHAR_SEP	'\\'
/**	Not a file name separator.
*/
#define	DK3_CHAR_NOSEP	'/'
#else
/**	File name separator.
*/
#define	DK3_CHAR_SEP	'/'
/**	Not a file name separator.
*/
#define	DK3_CHAR_NOSEP	'\\'
#endif
/**	Newline.
*/
#define	DK3_CHAR_NL	'\n'
/**	Dot.
*/
#define	DK3_CHAR_DOT	'.'
/* --- 8 bit --- */
#endif

/**@}*/



#ifndef DK3_MAX_PATH
#if DK3_ON_WINDOWS
#ifdef _MAX_PATH
#define	DK3_MAX_PATH	_MAX_PATH
#else
/**	Maximum file name (path) length.
*/
#define	DK3_MAX_PATH	1024
#endif
#else
#ifdef MAX_PATH_LEN
/**	Maximum file name (path) length.
*/
#define	DK3_MAX_PATH	MAX_PATH_LEN
#else
/**	Maximum file name (path) length.
*/
#define	DK3_MAX_PATH	1024
#endif
#endif
#endif



/*	Not an enum:
	As we might have multiple dk3_stat_t in use at same time
	we used the smallest possible data type -- unsigned char -- for
	this information.
*/
/** @defgroup	statadditional Additional information from stat
The dk3sf_stat() function internally uses both stat() and lstat() to
retrieve information.
*/
/**@{*/
/**	The link owner is not the same user as the link targets owner.
*/
#define	DK3_STAT_AI_USER_DIFFERS	0x01

/**	The link owner group is not the same as the link targets owner group.
*/
#define	DK3_STAT_AI_GROUP_DIFFERS	0x02

/**	Link and link target are on different file systems.
*/
#define	DK3_STAT_AI_FAR_LINK		0x04
/**@}*/



/*	Not an enum:
	As we might have multiple outut streams in use at same
	time we used the smallest possible data type.
*/
/**	@defgroup	outputfiltertypes	Output filter flags.
*/
/**@{*/
/**	Flag: Use cr/nl sequence.
*/
#define	DK3_OF_FLAG_CRNL	0x01

/**	Flag: Add finalizer to end of output.
*/
#define	DK3_OF_FLAG_FINALIZE	0x02
/**@}*/



/*	Not an enum:
	As there are a lot of probable error conditions we
	use an unsigned long here for the bits.
*/
/**	@defgroup	snmpprintererrors	SNMP reported printer errors.
	Note: The unsigned long value is filled beginning from the LSB
	when reading the SNMP response beginning from the MSB of the
	first byte.
*/
/**@{*/

/**	Printer error condition: Paper low.
*/
#define	DK3_SNMP_PRINTER_ERROR_LOW_PAPER	0x00000001UL

/**	Printer error condition: No paper available.
*/
#define	DK3_SNMP_PRINTER_ERROR_NO_PAPER		0x00000002UL

/**	Printer error condition: Toner low.
*/
#define DK3_SNMP_PRINTER_ERROR_LOW_TONER	0x00000004UL

/**	Printer error condition: Toner empty.
*/
#define DK3_SNMP_PRINTER_ERROR_NO_TONER		0x00000008UL

/**	Printer error condition: Door is open
*/
#define DK3_SNMP_PRINTER_ERROR_DOOR_OPEN	0x00000010UL

/**	Printer error condition: Paper jam.
*/
#define DK3_SNMP_PRINTER_ERROR_JAMMED		0x00000020UL

/**	Printer error condition: Printer offline for whatever reason.
*/
#define DK3_SNMP_PRINTER_ERROR_OFFLINE		0x00000040UL

/**	Printer error condition: Service needed.
*/
#define DK3_SNMP_PRINTER_ERROR_SERVICE_NEEDED	0x00000080UL

/**	Printer error condition: Input tray is missing.
*/
#define DK3_SNMP_PRINTER_ERROR_INPUT_TRAY	0x00000100UL

/**	Printer error condition: Output tray is missing.
*/
#define DK3_SNMP_PRINTER_ERROR_OUTPUT_TRAY	0x00000200UL

/**	Printer error condition: Marker supply is missing.
*/
#define DK3_SNMP_PRINTER_ERROR_MARKER_SUPPLY	0x00000400UL

/**	Printer error condition: Output tray nearly full.
*/
#define DK3_SNMP_PRINTER_ERROR_OUTPUT_NEAR	0x00000800UL

/**	Printer error condition: Output tray full.
*/
#define DK3_SNMP_PRINTER_ERROR_OUTPUT_FULL	0x00001000UL

/**	Printer error condition: Input tray is empty.
*/
#define DK3_SNMP_PRINTER_ERROR_INPUT_EMPTY	0x00002000UL

/**	Printer error condition: Overdue preventive maintenance.
*/
#define DK3_SNMP_PRINTER_ERROR_MAINTENANCE	0x00004000UL
/**@}*/



/*	Not an enum:
	As the font encoding information is stored for each
	Unicode to LaTeX character conversion we used the smallest
	possible data type.
*/
/**	@defgroup	fontenc	LaTeX font encodings.
*/
/**@{*/

/**	No specific requirements.
*/
#define	DK3_FONT_ENCODING_NONE		((dk3_font_encoding_t)0x00)

/**	OT1 required.
*/
#define DK3_FONT_ENCODING_OT1		((dk3_font_encoding_t)0x01)

/**	Do not use OT1.
*/
#define DK3_FONT_ENCODING_NOT_OT1	((dk3_font_encoding_t)0x02)

/**	T1 required.
*/
#define DK3_FONT_ENCODING_T1		((dk3_font_encoding_t)0x04)

/**	Do not use T1.
*/
#define DK3_FONT_ENCODING_NOT_T1	((dk3_font_encoding_t)0x08)

/**	T4 required.
*/
#define DK3_FONT_ENCODING_T4		((dk3_font_encoding_t)0x10)

/**	Do not use T4.
*/
#define DK3_FONT_ENCODING_NOT_T4	((dk3_font_encoding_t)0x20)

/**	T5 required.
*/
#define DK3_FONT_ENCODING_T5		((dk3_font_encoding_t)0x40)

/**	Do not use T5.
*/
#define DK3_FONT_ENCODING_NOT_T5	((dk3_font_encoding_t)0x80)
/**@}*/


/**	@defgroup	tspres	Results from processing one character or line.
*/
/**@{*/
enum {
			/**	Text processed successfully.
			*/
  DK3_TSP_RES_OK	=	0,

			/**	There was an error, but we should attempt
				to continue.
			*/
  DK3_TSP_RES_ERROR ,

			/**	There was a fatal error, stop processing.
			*/
  DK3_TSP_RES_FATAL
};
/**@}*/




#endif