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
|
/******************************************************************************
*
*
*
* Copyright (C) 1997-2001 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
*/
%{
/*
* includes
*/
#include <stdio.h>
#include <stdlib.h>
//#include <iostream.h>
#include <assert.h>
#include <ctype.h>
#include <stdarg.h>
#include <qfileinfo.h>
#include <qdir.h>
#include <qtextstream.h>
#include <qregexp.h>
#include <qstack.h>
#include "config.h"
#include "version.h"
#undef Config_getString
#undef Config_getInt
#undef Config_getList
#undef Config_getEnum
#undef Config_getBool
// use in-class definitions
#define Config_getString(val) getString(__FILE__,__LINE__,val)
#define Config_getInt(val) getInt(__FILE__,__LINE__,val)
#define Config_getList(val) getList(__FILE__,__LINE__,val)
#define Config_getEnum(val) getEnum(__FILE__,__LINE__,val)
#define Config_getBool(val) getBool(__FILE__,__LINE__,val)
void config_err(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
}
void config_warn(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
}
#define MAX_INCLUDE_DEPTH 10
#define YY_NEVER_INTERACTIVE 1
#define YY_NO_UNPUT
/* -----------------------------------------------------------------
*/
QCString ConfigOption::convertToComment(const QCString &s)
{
QCString result;
if (s.isEmpty()) return result;
else
{
result+="# ";
QCString tmp=s.stripWhiteSpace();
char *p=tmp.data();
char c;
while ((c=*p++))
{
if (c=='\n') result+="\n# ";
else result+=c;
}
result+='\n';
}
return result;
}
void ConfigOption::writeBoolValue(QTextStream &t,bool v)
{
if (v) t << "YES"; else t << "NO";
}
void ConfigOption::writeIntValue(QTextStream &t,int i)
{
t << i;
}
void ConfigOption::writeStringValue(QTextStream &t,QCString &s)
{
const char *p=s.data();
char c;
bool hasBlanks=FALSE;
if (p)
{
while ((c=*p++)!=0 && !hasBlanks) hasBlanks = (c==' ' || c=='\n' || c=='\t');
if (hasBlanks)
t << "\"" << s << "\"";
else
t << s;
}
}
void ConfigOption::writeStringList(QTextStream &t,QStrList &l)
{
const char *p = l.first();
bool first=TRUE;
while (p)
{
char c;
const char *s=p;
bool hasBlanks=FALSE;
while ((c=*p++)!=0 && !hasBlanks) hasBlanks = (c==' ' || c=='\n' || c=='\t');
if (!first) t << " ";
first=FALSE;
if (hasBlanks) t << "\"" << s << "\""; else t << s;
p = l.next();
if (p) t << " \\" << endl;
}
}
/* -----------------------------------------------------------------
*/
Config *Config::m_instance = 0;
void ConfigInt::convertStrToVal()
{
if (!m_valueString.isEmpty())
{
bool ok;
int val = m_valueString.toInt(&ok);
if (!ok || val<m_minVal || val>m_maxVal)
{
config_warn("Warning: argument `%s' for option %s is not a valid number in the range [%d..%d]!\n"
"Using the default: %d!\n",m_valueString.data(),m_name.data(),m_minVal,m_maxVal,m_value);
}
m_value=val;
}
}
void ConfigBool::convertStrToVal()
{
QCString val = m_valueString.stripWhiteSpace().lower();
if (!val.isEmpty())
{
if (val=="yes" || val=="true" || val=="1")
{
m_value=TRUE;
}
else if (val=="no" || val=="false" || val=="0")
{
m_value=FALSE;
}
else
{
config_warn("Warning: argument `%s' for option %s is not a valid boolean value\n"
"Using the default: %s!\n",m_valueString.data(),m_name.data(),m_value?"YES":"NO");
}
}
}
QCString &Config::getString(const char *fileName,int num,const char *name) const
{
ConfigOption *opt = m_dict->find(name);
if (opt==0)
{
config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
exit(1);
}
else if (opt->kind()!=ConfigOption::O_String)
{
config_err("%s<%d>: Internal error: Requested option %s not of string type!\n",fileName,num,name);
exit(1);
}
return *((ConfigString *)opt)->valueRef();
}
QStrList &Config::getList(const char *fileName,int num,const char *name) const
{
ConfigOption *opt = m_dict->find(name);
if (opt==0)
{
config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
exit(1);
}
else if (opt->kind()!=ConfigOption::O_List)
{
config_err("%d<%d>: Internal error: Requested option %s not of list type!\n",fileName,num,name);
exit(1);
}
return *((ConfigList *)opt)->valueRef();
}
QCString &Config::getEnum(const char *fileName,int num,const char *name) const
{
ConfigOption *opt = m_dict->find(name);
if (opt==0)
{
config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
exit(1);
}
else if (opt->kind()!=ConfigOption::O_Enum)
{
config_err("%s<%d>: Internal error: Requested option %s not of enum type!\n",fileName,num,name);
exit(1);
}
return *((ConfigEnum *)opt)->valueRef();
}
int &Config::getInt(const char *fileName,int num,const char *name) const
{
ConfigOption *opt = m_dict->find(name);
if (opt==0)
{
config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
exit(1);
}
else if (opt->kind()!=ConfigOption::O_Int)
{
config_err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name);
exit(1);
}
return *((ConfigInt *)opt)->valueRef();
}
bool &Config::getBool(const char *fileName,int num,const char *name) const
{
ConfigOption *opt = m_dict->find(name);
if (opt==0)
{
config_err("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name);
exit(1);
}
else if (opt->kind()!=ConfigOption::O_Bool)
{
config_err("%s<%d>: Internal error: Requested option %s not of integer type!\n",fileName,num,name);
exit(1);
}
return *((ConfigBool *)opt)->valueRef();
}
/* -----------------------------------------------------------------
*
* static variables
*/
struct ConfigFileState
{
int lineNr;
FILE *filePtr;
YY_BUFFER_STATE oldState;
YY_BUFFER_STATE newState;
QCString fileName;
};
static const char *inputString;
static int inputPosition;
static int yyLineNr;
static QCString yyFileName;
static QCString tmpString;
static QCString *s=0;
static bool *b=0;
static QStrList *l=0;
static int lastState;
static QCString elemStr;
static QCString includeName;
static QStrList includePathList;
static QStack<ConfigFileState> includeStack;
static int includeDepth;
static QCString tabSizeString;
static QCString maxInitLinesString;
static QCString colsInAlphaIndexString;
static QCString enumValuesPerLineString;
static QCString treeViewWidthString;
static QCString maxDotGraphWidthString;
static QCString maxDotGraphHeightString;
static Config *config;
/* -----------------------------------------------------------------
*/
#undef YY_INPUT
#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
static int yyread(char *buf,int max_size)
{
// no file included
if (includeStack.isEmpty())
{
int c=0;
while( c < max_size && inputString[inputPosition] )
{
*buf = inputString[inputPosition++] ;
c++; buf++;
}
return c;
}
else
{
//assert(includeStack.current()->newState==YY_CURRENT_BUFFER);
return fread(buf,1,max_size,includeStack.current()->filePtr);
}
}
static FILE *tryPath(const char *path,const char *fileName)
{
QCString absName=(QCString)path+"/"+fileName;
QFileInfo fi(absName);
if (fi.exists() && fi.isFile())
{
FILE *f=fopen(absName,"r");
if (!f) config_err("Error: could not open file %s for reading\n",absName.data());
return f;
}
return 0;
}
static void substEnvVarsInStrList(QStrList &sl);
static void substEnvVarsInString(QCString &s);
static FILE *findFile(const char *fileName)
{
substEnvVarsInStrList(includePathList);
char *s=includePathList.first();
while (s) // try each of the include paths
{
FILE *f = tryPath(s,fileName);
if (f) return f;
s=includePathList.next();
}
// try cwd if includePathList fails
return tryPath(".",fileName);
}
static void readIncludeFile(const char *incName)
{
if (includeDepth==MAX_INCLUDE_DEPTH) {
config_err("Error: maximum include depth (%d) reached, %s is not included. Aborting...\n",
MAX_INCLUDE_DEPTH,incName);
exit(1);
}
QCString inc = incName;
substEnvVarsInString(inc);
inc = inc.stripWhiteSpace();
uint incLen = inc.length();
if (inc.at(0)=='"' && inc.at(incLen-1)=='"') // strip quotes
{
inc=inc.mid(1,incLen-2);
}
FILE *f;
//printf("Searching for `%s'\n",incFileName.data());
if ((f=findFile(inc))) // see if the include file can be found
{
// For debugging
#if SHOW_INCLUDES
for (i=0;i<includeStack.count();i++) msg(" ");
msg("@INCLUDE = %s: parsing...\n",inc.data());
#endif
// store the state of the old file
ConfigFileState *fs=new ConfigFileState;
fs->oldState=YY_CURRENT_BUFFER;
fs->lineNr=yyLineNr;
fs->fileName=yyFileName;
fs->filePtr=f;
// push the state on the stack
includeStack.push(fs);
// set the scanner to the include file
yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE));
fs->newState=YY_CURRENT_BUFFER;
yyFileName=inc;
includeDepth++;
}
else
{
config_err("Error: @INCLUDE = %s: not found!\n",inc.data());
exit(1);
}
}
%}
%option noyywrap
%x Start
%x SkipComment
%x SkipInvalid
%x GetString
%x GetBool
%x GetStrList
%x GetQuotedString
%x GetEnvVar
%x Include
%%
<*>\0x0d
<Start,GetString,GetStrList,GetBool,SkipInvalid>"#" { BEGIN(SkipComment); }
<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" { QCString cmd=yytext;
cmd=cmd.left(cmd.length()-1).stripWhiteSpace();
ConfigOption *option = config->get(cmd);
if (option==0) // oops not known
{
config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n",
yytext,yyLineNr,yyFileName.data());
BEGIN(SkipInvalid);
}
else // known tag
{
switch(option->kind())
{
case ConfigOption::O_Info:
// shouldn't get here!
BEGIN(SkipInvalid);
break;
case ConfigOption::O_List:
l = ((ConfigList *)option)->valueRef();
l->clear();
elemStr="";
BEGIN(GetStrList);
break;
case ConfigOption::O_Enum:
s = ((ConfigEnum *)option)->valueRef();
s->resize(0);
BEGIN(GetString);
break;
case ConfigOption::O_String:
s = ((ConfigString *)option)->valueRef();
s->resize(0);
BEGIN(GetString);
break;
case ConfigOption::O_Int:
s = ((ConfigInt *)option)->valueStringRef();
s->resize(0);
BEGIN(GetString);
break;
case ConfigOption::O_Bool:
s = ((ConfigBool *)option)->valueStringRef();
s->resize(0);
BEGIN(GetString);
break;
}
}
}
<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"+=" { QCString cmd=yytext;
cmd=cmd.left(cmd.length()-2).stripWhiteSpace();
ConfigOption *option = config->get(cmd);
if (option==0) // oops not known
{
config_err("Warning: ignoring unsupported tag `%s' at line %d, file %s\n",
yytext,yyLineNr,yyFileName.data());
BEGIN(SkipInvalid);
}
else // known tag
{
switch(option->kind())
{
case ConfigOption::O_Info:
// shouldn't get here!
BEGIN(SkipInvalid);
break;
case ConfigOption::O_List:
l = ((ConfigList *)option)->valueRef();
elemStr="";
BEGIN(GetStrList);
break;
case ConfigOption::O_Enum:
case ConfigOption::O_String:
case ConfigOption::O_Int:
case ConfigOption::O_Bool:
config_err("Warning: operator += not supported for `%s'. Ignoring line at line %d, file %s\n",
yytext,yyLineNr,yyFileName.data());
BEGIN(SkipInvalid);
break;
}
}
}
<Start>"@INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); l=&includePathList; l->clear(); elemStr=""; }
/* include a config file */
<Start>"@INCLUDE"[ \t]*"=" { BEGIN(Include);}
<Include>([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") {
readIncludeFile(yytext);
BEGIN(Start);
}
<<EOF>> {
//printf("End of include file\n");
//printf("Include stack depth=%d\n",g_includeStack.count());
if (includeStack.isEmpty())
{
//printf("Terminating scanner!\n");
yyterminate();
}
else
{
ConfigFileState *fs=includeStack.pop();
fclose(fs->filePtr);
YY_BUFFER_STATE oldBuf = YY_CURRENT_BUFFER;
yy_switch_to_buffer( fs->oldState );
yy_delete_buffer( oldBuf );
yyLineNr=fs->lineNr;
yyFileName=fs->fileName;
delete fs; fs=0;
includeDepth--;
}
}
<Start>[a-z_A-Z0-9]+ { config_err("Warning: ignoring unknown tag `%s' at line %d, file %s\n",yytext,yyLineNr,yyFileName.data()); }
<GetString,GetBool,SkipInvalid>\n { yyLineNr++; BEGIN(Start); }
<GetStrList>\n {
yyLineNr++;
if (!elemStr.isEmpty())
{
//printf("elemStr1=`%s'\n",elemStr.data());
l->append(elemStr);
}
BEGIN(Start);
}
<GetStrList>[ \t]+ {
if (!elemStr.isEmpty())
{
//printf("elemStr2=`%s'\n",elemStr.data());
l->append(elemStr);
}
elemStr.resize(0);
}
<GetString>[^ \"\t\r\n]+ { (*s)+=yytext; }
<GetString,GetStrList,SkipInvalid>"\"" { lastState=YY_START;
BEGIN(GetQuotedString);
tmpString.resize(0);
}
<GetQuotedString>"\""|"\n" {
//printf("Quoted String = `%s'\n",tmpString.data());
if (lastState==GetString)
(*s)+=tmpString;
else
elemStr+=tmpString;
if (*yytext=='\n')
{
config_err("Warning: Missing end quote (\") on line %d, file %s\n",yyLineNr,yyFileName.data());
yyLineNr++;
}
BEGIN(lastState);
}
<GetQuotedString>"\\\"" {
tmpString+='"';
}
<GetQuotedString>. { tmpString+=*yytext; }
<GetBool>[a-zA-Z]+ {
QCString bs=yytext;
bs=bs.upper();
if (bs=="YES" || bs=="1")
*b=TRUE;
else if (bs=="NO" || bs=="0")
*b=FALSE;
else
{
*b=FALSE;
config_warn("Warning: Invalid value `%s' for "
"boolean tag in line %d, file %s; use YES or NO\n",
bs.data(),yyLineNr,yyFileName.data());
}
}
<GetStrList>[^ \#\"\t\r\n]+ {
elemStr+=yytext;
}
<SkipComment>\n { yyLineNr++; BEGIN(Start); }
<SkipComment>\\[ \r\t]*\n { yyLineNr++; BEGIN(Start); }
<*>\\[ \r\t]*\n { yyLineNr++; }
<*>.
<*>\n { yyLineNr++ ; }
%%
/*@ ----------------------------------------------------------------------------
*/
#if 0
static void writeBoolValue(QTextStream &t,bool v)
{
if (v) t << "YES"; else t << "NO";
}
static void writeIntValue(QTextStream &t,int i)
{
t << i;
}
static void writeStringValue(QTextStream &t,QCString &s)
{
const char *p=s.data();
char c;
bool hasBlanks=FALSE;
if (p)
{
while ((c=*p++)!=0 && !hasBlanks) hasBlanks = (c==' ' || c=='\n' || c=='\t');
if (hasBlanks)
t << "\"" << s << "\"";
else
t << s;
}
}
static void writeStringList(QTextStream &t,QStrList &l)
{
const char *p = l.first();
bool first=TRUE;
while (p)
{
char c;
const char *s=p;
bool hasBlanks=FALSE;
while ((c=*p++)!=0 && !hasBlanks) hasBlanks = (c==' ' || c=='\n' || c=='\t');
if (!first) t << " ";
first=FALSE;
if (hasBlanks) t << "\"" << s << "\""; else t << s;
p = l.next();
if (p) t << " \\" << endl;
}
}
#endif
void Config::writeTemplate(QFile *f,bool sl,bool upd)
{
QTextStream t(f);
t << "# Doxyfile " << versionString << endl << endl;
if (!sl)
{
t << "# This file describes the settings to be used by the documentation system\n";
t << "# doxygen (www.doxygen.org) for a project\n";
t << "#\n";
t << "# All text after a hash (#) is considered a comment and will be ignored\n";
t << "# The format is:\n";
t << "# TAG = value [value, ...]\n";
t << "# For lists items can also be appended using:\n";
t << "# TAG += value [value, ...]\n";
t << "# Values that contain spaces should be placed between quotes (\" \")\n";
}
ConfigOption *option = m_options->first();
while (option)
{
option->writeTemplate(t,sl,upd);
option = m_options->next();
}
}
void Config::convertStrToVal()
{
ConfigOption *option = m_options->first();
while (option)
{
option->convertStrToVal();
option = m_options->next();
}
}
static void substEnvVarsInString(QCString &s)
{
static QRegExp re("\\$\\([a-z_A-Z0-9]+\\)");
if (s.isEmpty()) return;
int p=0;
int i,l;
//printf("substEnvVarInString(%s) start\n",s.data());
while ((i=re.match(s,p,&l))!=-1)
{
//printf("Found environment var s.mid(%d,%d)=`%s'\n",i+2,l-3,s.mid(i+2,l-3).data());
QCString env=getenv(s.mid(i+2,l-3));
substEnvVarsInString(env); // recursively expand variables if needed.
s = s.left(i)+env+s.right(s.length()-i-l);
p=i+env.length(); // next time start at the end of the expanded string
}
//printf("substEnvVarInString(%s) end\n",s.data());
}
static void substEnvVarsInStrList(QStrList &sl)
{
char *s = sl.first();
while (s)
{
QCString result(s);
bool wasQuoted = (result.find(' ')!=-1) || (result.find('\t')!=-1);
substEnvVarsInString(result);
if (!wasQuoted) /* as a result of the expansion, a single string
may have expanded into a list, which we'll
add to sl. If the orginal string already
contained multiple elements no further
splitting is done to allow quoted items with spaces! */
{
int l=result.length();
int i,p=0;
// skip spaces
// search for a "word"
for (i=0;i<l;i++)
{
char c;
// skip until start of new word
while (i<l && ((c=result.at(i))==' ' || c=='\t')) i++;
p=i; // p marks the start index of the word
// skip until end of a word
while (i<l && ((c=result.at(i))!=' ' && c!='\t' && c!='"')) i++;
if (i<l) // not at the end of the string
{
if (c=='"') // word within quotes
{
p=i+1;
for (i++;i<l;i++)
{
c=result.at(i);
if (c=='"') // end quote
{
// replace the string in the list and go to the next item.
sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item.
sl.next(); // current item is now the old item
p=i+1;
break;
}
else if (c=='\\') // skip escaped stuff
{
i++;
}
}
}
else if (c==' ' || c=='\t') // separator
{
// replace the string in the list and go to the next item.
sl.insert(sl.at(),result.mid(p,i-p)); // insert new item before current item.
sl.next(); // current item is now the old item
p=i+1;
}
}
}
if (p!=l) // add the leftover as a string
{
// replace the string in the list and go to the next item.
sl.insert(sl.at(),result.right(l-p)); // insert new item before current item.
sl.next(); // current item is now the old item
}
// remove the old unexpanded string from the list
i=sl.at();
sl.remove(); // current item index changes if the last element is removed.
if (sl.at()==i) // not last item
s = sl.current();
else // just removed last item
s = 0;
}
else // just goto the next element in the list
{
s=sl.next();
}
}
}
void ConfigString::substEnvVars()
{
substEnvVarsInString(m_value);
}
void ConfigList::substEnvVars()
{
substEnvVarsInStrList(m_value);
}
void ConfigBool::substEnvVars()
{
substEnvVarsInString(m_valueString);
}
void ConfigInt::substEnvVars()
{
substEnvVarsInString(m_valueString);
}
void ConfigEnum::substEnvVars()
{
substEnvVarsInString(m_value);
}
void Config::substituteEnvironmentVars()
{
ConfigOption *option = m_options->first();
while (option)
{
option->substEnvVars();
option = m_options->next();
}
}
void Config::check()
{
//if (!projectName.isEmpty())
//{
// projectName[0]=toupper(projectName[0]);
//}
QCString &warnFormat = Config_getString("WARN_FORMAT");
if (warnFormat.isEmpty())
{
warnFormat="$file:$line $text";
}
else
{
if (warnFormat.find("$file")==-1)
{
config_err("Error: warning format does not contain a $file tag!\n");
exit(1);
}
if (warnFormat.find("$line")==-1)
{
config_err("Error: warning format does not contain a $line tag!\n");
exit(1);
}
if (warnFormat.find("$text")==-1)
{
config_err("Error: wanring format foes not contain a $text tag!\n");
exit(1);
}
}
QCString &manExtension = Config_getString("MAN_EXTENSION");
// set default man page extension if non is given by the user
if (manExtension.isEmpty())
{
manExtension=".3";
}
QCString &paperType = Config_getEnum("PAPER_TYPE");
paperType=paperType.lower().stripWhiteSpace();
if (paperType.isEmpty())
{
paperType = "a4wide";
}
if (paperType!="a4" && paperType!="a4wide" && paperType!="letter" &&
paperType!="legal" && paperType!="executive")
{
config_err("Error: Unknown page type specified");
}
QCString &outputLanguage=Config_getEnum("OUTPUT_LANGUAGE");
outputLanguage=outputLanguage.stripWhiteSpace();
if (outputLanguage.isEmpty())
{
outputLanguage = "English";
}
// expand the relative stripFromPath values
QStrList &stripFromPath = Config_getList("STRIP_FROM_PATH");
char *sfp = stripFromPath.first();
while (sfp)
{
QCString path = sfp;
if (path.at(0)!='/' && (path.length()<=2 || path.at(1)!=':'))
{
QFileInfo fi(path);
if (fi.exists() && fi.isDir())
{
int i = stripFromPath.at();
stripFromPath.remove();
if (stripFromPath.at()==i) // did not remove last item
stripFromPath.insert(i,fi.absFilePath()+"/");
else
stripFromPath.append(fi.absFilePath()+"/");
}
}
sfp = stripFromPath.next();
}
// Test to see if HTML header is valid
QCString &headerFile = Config_getString("HTML_HEADER");
if (!headerFile.isEmpty())
{
QFileInfo fi(headerFile);
if (!fi.exists())
{
config_err("Error: tag HTML_HEADER: header file `%s' "
"does not exist\n",headerFile.data());
exit(1);
}
}
// Test to see if HTML footer is valid
QCString &footerFile = Config_getString("HTML_FOOTER");
if (!footerFile.isEmpty())
{
QFileInfo fi(footerFile);
if (!fi.exists())
{
config_err("Error: tag HTML_FOOTER: footer file `%s' "
"does not exist\n",footerFile.data());
exit(1);
}
}
// Test to see if LaTeX header is valid
QCString &latexHeaderFile = Config_getString("LATEX_HEADER");
if (!latexHeaderFile.isEmpty())
{
QFileInfo fi(latexHeaderFile);
if (!fi.exists())
{
config_err("Error: tag LATEX_HEADER: header file `%s' "
"does not exist\n",latexHeaderFile.data());
exit(1);
}
}
// check include path
QStrList &includePath = Config_getList("INCLUDE_PATH");
char *s=includePath.first();
while (s)
{
QFileInfo fi(s);
if (!fi.exists()) config_err("Warning: tag INCLUDE_PATH: include path `%s' "
"does not exist\n",s);
s=includePath.next();
}
// check aliases
QStrList &aliasList = Config_getList("ALIASES");
s=aliasList.first();
while (s)
{
QRegExp re("[a-z_A-Z][a-z_A-Z0-9]*[ \t]*=");
QCString alias=s;
alias=alias.stripWhiteSpace();
if (alias.find(re)!=0)
{
config_err("Illegal alias format `%s'. Use \"name=value\"\n",alias.data());
}
s=aliasList.next();
}
// check dot path
QCString &dotPath = Config_getString("DOT_PATH");
if (!dotPath.isEmpty())
{
if (dotPath.find('\\')!=-1)
{
if (dotPath.at(dotPath.length()-1)!='\\')
{
dotPath+='\\';
}
}
else if (dotPath.find('/')!=-1)
{
if (dotPath.at(dotPath.length()-1)!='/')
{
dotPath+='/';
}
}
#if defined(_WIN32)
QFileInfo dp(dotPath+"dot.exe");
#else
QFileInfo dp(dotPath+"dot");
#endif
if (!dp.exists() || !dp.isFile())
{
config_err("Warning: the dot tool could not be found at %s\n",dotPath.data());
dotPath="";
}
else
{
dotPath=dp.dirPath(TRUE)+"/";
#if defined(_WIN32) // convert slashes
uint i=0,l=dotPath.length();
for (i=0;i<l;i++) if (dotPath.at(i)=='/') dotPath.at(i)='\\';
#endif
}
}
else // make sure the string is empty but not null!
{
dotPath="";
}
// check input
QStrList &inputSources=Config_getList("INPUT");
if (inputSources.count()==0)
{
config_err("Error: tag INPUT: no input files specified after the INPUT tag.\n");
exit(1);
}
else
{
s=inputSources.first();
while (s)
{
QFileInfo fi(s);
if (!fi.exists())
{
config_err("Error: tag INPUT: input source `%s' does not exist\n",s);
exit(1);
}
s=inputSources.next();
}
}
// add default pattern if needed
QStrList &filePatternList = Config_getList("FILE_PATTERNS");
if (filePatternList.isEmpty())
{
filePatternList.append("*");
}
// add default pattern if needed
QStrList &examplePatternList = Config_getList("EXAMPLE_PATTERNS");
if (examplePatternList.isEmpty())
{
examplePatternList.append("*");
}
// add default pattern if needed
//QStrList &imagePatternList = Config_getList("IMAGE_PATTERNS");
//if (imagePatternList.isEmpty())
//{
// imagePatternList.append("*");
//}
// more checks needed if and only if the search engine is enabled.
if (Config_getBool("SEARCHENGINE"))
{
// check cgi name
QCString &cgiName = Config_getString("CGI_NAME");
if (cgiName.isEmpty())
{
config_err("Error: tag CGI_NAME: no cgi script name after the CGI_NAME tag.\n");
exit(1);
}
// check cgi URL
QCString &cgiURL = Config_getString("CGI_URL");
if (cgiURL.isEmpty())
{
config_err("Error: tag CGI_URL: no URL to cgi directory specified.\n");
exit(1);
}
else if (cgiURL.left(7)!="http://" &&
cgiURL.left(8)!="https://"
)
{
config_err("Error: tag CGI_URL: URL to cgi directory is invalid (must "
"start with http:// or https://).\n");
exit(1);
}
// check documentation URL
QCString &docURL = Config_getString("DOC_URL");
if (docURL.isEmpty())
{
docURL = Config_getString("OUTPUT_DIRECTORY").copy().prepend("file://").append("html");
}
else if (docURL.left(7)!="http://" &&
docURL.left(8)!="https://" &&
docURL.left(7)!="file://"
)
{
config_err("Error: tag DOC_URL: URL to documentation is invalid or "
"not absolute.\n");
exit(1);
}
// check absolute documentation path
QCString &docAbsPath = Config_getString("DOC_ABSPATH");
if (docAbsPath.isEmpty())
{
docAbsPath = Config_getString("OUTPUT_DIRECTORY")+"/html";
}
else if (docAbsPath[0]!='/' && docAbsPath[1]!=':')
{
config_err("Error: tag DOC_ABSPATH: path is not absolute!\n");
exit(1);
}
// check path to doxysearch
QCString &binAbsPath = Config_getString("BIN_ABSPATH");
if (binAbsPath.isEmpty())
{
config_err("Error: tag BIN_ABSPATH: no absolute path to doxysearch "
"specified.\n");
exit(1);
}
else if (binAbsPath[0]!='/' && binAbsPath[1]!=':')
{
config_err("Error: tag BIN_ABSPATH: path is not absolute!\n");
exit(1);
}
// check perl path
bool found=FALSE;
QCString &perlPath = Config_getString("PERL_PATH");
if (perlPath.isEmpty())
{
QFileInfo fi;
fi.setFile("/usr/bin/perl");
if (fi.exists())
{
perlPath="/usr/bin/perl";
found=TRUE;
}
else
{
fi.setFile("/usr/local/bin/perl");
if (fi.exists())
{
perlPath="/usr/local/bin/perl";
found=TRUE;
}
}
}
if (!found)
{
QFileInfo fi(perlPath);
if (!fi.exists())
{
config_warn("Warning: tag PERL_PATH: perl interpreter not found at default or"
"user specified (%s) location\n",
perlPath.data());
}
}
}
#undef PUTENV
#if defined(_WIN32) && !defined(__GNUC__) && (__BORLANDC__ < 0x0550)
#define PUTENV _putenv
#else
#define PUTENV putenv
#endif
if (Config_getBool("HAVE_DOT")) PUTENV("DOTFONTPATH=.");
}
void Config::init()
{
ConfigOption *option = m_options->first();
while (option)
{
option->init();
option = m_options->next();
}
}
void Config::create()
{
if (m_initialized) return;
m_initialized = TRUE;
ConfigString *cs;
ConfigEnum *ce;
ConfigList *cl;
ConfigInt *ci;
ConfigBool *cb;
// option definitions
//-----------------------------------------------------------------------------------------------
addInfo("General","General configuration options");
//-----------------------------------------------------------------------------------------------
cs = addString(
"PROJECT_NAME",
"The PROJECT_NAME tag is a single word (or a sequence of words surrounded \n"
"by quotes) that should identify the project. "
);
cs = addString(
"PROJECT_NUMBER",
"The PROJECT_NUMBER tag can be used to enter a project or revision number. \n"
"This could be handy for archiving the generated documentation or \n"
"if some version control system is used.\n"
);
cs = addString(
"OUTPUT_DIRECTORY",
"The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) \n"
"base path where the generated documentation will be put. \n"
"If a relative path is entered, it will be relative to the location \n"
"where doxygen was started. If left blank the current directory will be used.\n"
);
cs->setWidgetType(ConfigString::Dir);
ce = addEnum(
"OUTPUT_LANGUAGE",
"The OUTPUT_LANGUAGE tag is used to specify the language in which all \n"
"documentation generated by doxygen is written. Doxygen will use this \n"
"information to generate all constant output in the proper language. \n"
"The default language is English, other supported languages are: \n"
"Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, \n"
"German, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, \n"
"Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.\n",
"English"
);
ce->addValue("Brazilian");
ce->addValue("Chinese");
ce->addValue("Croatian");
ce->addValue("Czech");
ce->addValue("Danish");
ce->addValue("Dutch");
ce->addValue("English");
ce->addValue("Finnish");
ce->addValue("French");
ce->addValue("German");
ce->addValue("Hungarian");
ce->addValue("Italian");
ce->addValue("Japanese");
ce->addValue("Korean");
ce->addValue("Norwegian");
ce->addValue("Polish");
ce->addValue("Portuguese");
ce->addValue("Romanian");
ce->addValue("Russian");
ce->addValue("Slovak");
ce->addValue("Slovene");
ce->addValue("Spanish");
ce->addValue("Swedish");
ce->addValue("Ukrainian");
cb = addBool(
"EXTRACT_ALL",
"If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in \n"
"documentation are documented, even if no documentation was available. \n"
"Private class members and static file members will be hidden unless \n"
"the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES \n",
FALSE
);
cb = addBool(
"EXTRACT_PRIVATE",
"If the EXTRACT_PRIVATE tag is set to YES all private members of a class \n"
"will be included in the documentation. \n",
FALSE
);
cb = addBool(
"EXTRACT_STATIC",
"If the EXTRACT_STATIC tag is set to YES all static members of a file \n"
"will be included in the documentation. \n",
FALSE
);
cb = addBool(
"HIDE_UNDOC_MEMBERS",
"If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all \n"
"undocumented members of documented classes, files or namespaces. \n"
"If set to NO (the default) these members will be included in the \n"
"various overviews, but no documentation section is generated. \n"
"This option has no effect if EXTRACT_ALL is enabled. \n",
FALSE
);
cb = addBool(
"HIDE_UNDOC_CLASSES",
"If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all \n"
"undocumented classes that are normally visible in the class hierarchy. \n"
"If set to NO (the default) these class will be included in the various \n"
"overviews. This option has no effect if EXTRACT_ALL is enabled. \n",
FALSE
);
cb = addBool(
"BRIEF_MEMBER_DESC",
"If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will \n"
"include brief member descriptions after the members that are listed in \n"
"the file and class documentation (similar to JavaDoc). \n"
"Set to NO to disable this. \n",
TRUE
);
cb = addBool(
"REPEAT_BRIEF",
"If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend \n"
"the brief description of a member or function before the detailed description. \n"
"Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the \n"
"brief descriptions will be completely suppressed. \n",
TRUE
);
cb = addBool(
"ALWAYS_DETAILED_SEC",
"If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then \n"
"Doxygen will generate a detailed section even if there is only a brief \n"
"description. \n",
FALSE
);
cb = addBool(
"FULL_PATH_NAMES",
"If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full \n"
"path before files name in the file list and in the header files. If set \n"
"to NO the shortest path that makes the file name unique will be used. \n",
FALSE
);
cl = addList(
"STRIP_FROM_PATH",
"If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag \n"
"can be used to strip a user defined part of the path. Stripping is \n"
"only done if one of the specified strings matches the left-hand part of \n"
"the path. It is allowed to use relative paths in the argument list.\n"
);
cl->addDependency("FULL_PATH_NAMES");
cb = addBool(
"INTERNAL_DOCS",
"The INTERNAL_DOCS tag determines if documentation \n"
"that is typed after a \\internal command is included. If the tag is set \n"
"to NO (the default) then the documentation will be excluded. \n"
"Set it to YES to include the internal documentation. \n",
FALSE
);
cb = addBool(
"CLASS_DIAGRAMS",
"If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will \n"
"generate a class diagram (in Html and LaTeX) for classes with base or \n"
"super classes. Setting the tag to NO turns the diagrams off. \n",
TRUE
);
cb = addBool(
"SOURCE_BROWSER",
"If the SOURCE_BROWSER tag is set to YES then a list of source files will \n"
"be generated. Documented entities will be cross-referenced with these sources. \n",
FALSE
);
cb = addBool(
"INLINE_SOURCES",
"Setting the INLINE_SOURCES tag to YES will include the body \n"
"of functions and classes directly in the documentation. \n",
FALSE
);
cb = addBool(
"STRIP_CODE_COMMENTS",
"Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct \n"
"doxygen to hide any special comment blocks from generated source code \n"
"fragments. Normal C and C++ comments will always remain visible. \n",
TRUE
);
cb = addBool(
"CASE_SENSE_NAMES",
"If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate \n"
"file names in lower case letters. If set to YES upper case letters are also \n"
"allowed. This is useful if you have classes or files whose names only differ \n"
"in case and if your file system supports case sensitive file names. Windows \n"
"users are adviced to set this option to NO.\n",
TRUE
);
cb = addBool(
"SHORT_NAMES",
"If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter \n"
"(but less readable) file names. This can be useful is your file systems \n"
"doesn't support long names like on DOS, Mac, or CD-ROM. \n",
FALSE
);
cb = addBool(
"HIDE_SCOPE_NAMES",
"If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen \n"
"will show members with their full class and namespace scopes in the \n"
"documentation. If set to YES the scope will be hidden. \n",
FALSE
);
cb = addBool(
"VERBATIM_HEADERS",
"If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen \n"
"will generate a verbatim copy of the header file for each class for \n"
"which an include is specified. Set to NO to disable this. \n",
TRUE
);
cb = addBool(
"SHOW_INCLUDE_FILES",
"If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen \n"
"will put list of the files that are included by a file in the documentation \n"
"of that file. \n",
TRUE
);
cb = addBool(
"JAVADOC_AUTOBRIEF",
"If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen \n"
"will interpret the first line (until the first dot) of a JavaDoc-style \n"
"comment as the brief description. If set to NO, the JavaDoc \n"
"comments will behave just like the Qt-style comments (thus requiring an \n"
"explict @brief command for a brief description. \n",
FALSE
);
cb = addBool(
"INHERIT_DOCS",
"If the INHERIT_DOCS tag is set to YES (the default) then an undocumented \n"
"member inherits the documentation from any documented member that it \n"
"reimplements. \n",
TRUE
);
cb = addBool(
"INLINE_INFO",
"If the INLINE_INFO tag is set to YES (the default) then a tag [inline] \n"
"is inserted in the documentation for inline members. \n",
TRUE
);
cb = addBool(
"SORT_MEMBER_DOCS",
"If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen \n"
"will sort the (detailed) documentation of file and class members \n"
"alphabetically by member name. If set to NO the members will appear in \n"
"declaration order. \n",
TRUE
);
cb = addBool(
"DISTRIBUTE_GROUP_DOC",
"If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC \n"
"tag is set to YES, then doxygen will reuse the documentation of the first \n"
"member in the group (if any) for the other members of the group. By default \n"
"all members of a group must be documented explicitly.\n",
FALSE
);
ci = addInt(
"TAB_SIZE",
"The TAB_SIZE tag can be used to set the number of spaces in a tab. \n"
"Doxygen uses this value to replace tabs by spaces in code fragments. \n",
1,16,8
);
cb = addBool(
"GENERATE_TODOLIST",
"The GENERATE_TODOLIST tag can be used to enable (YES) or \n"
"disable (NO) the todo list. This list is created by putting \\todo \n"
"commands in the documentation.\n",
TRUE
);
cb = addBool(
"GENERATE_TESTLIST",
"The GENERATE_TESTLIST tag can be used to enable (YES) or \n"
"disable (NO) the test list. This list is created by putting \\test \n"
"commands in the documentation.\n",
TRUE
);
cb = addBool(
"GENERATE_BUGLIST",
"The GENERATE_BUGLIST tag can be used to enable (YES) or \n"
"disable (NO) the bug list. This list is created by putting \\bug \n"
"commands in the documentation.\n",
TRUE
);
cl = addList(
"ALIASES",
"This tag can be used to specify a number of aliases that acts \n"
"as commands in the documentation. An alias has the form \"name=value\". \n"
"For example adding \"sideeffect=\\par Side Effects:\\n\" will allow you to \n"
"put the command \\sideeffect (or @sideeffect) in the documentation, which \n"
"will result in a user defined paragraph with heading \"Side Effects:\". \n"
"You can put \\n's in the value part of an alias to insert newlines. \n"
);
cl = addList(
"ENABLED_SECTIONS",
"The ENABLED_SECTIONS tag can be used to enable conditional \n"
"documentation sections, marked by \\if sectionname ... \\endif. \n"
);
ci = addInt(
"MAX_INITIALIZER_LINES",
"The MAX_INITIALIZER_LINES tag determines the maximum number of lines \n"
"the initial value of a variable or define consist of for it to appear in \n"
"the documentation. If the initializer consists of more lines than specified \n"
"here it will be hidden. Use a value of 0 to hide initializers completely. \n"
"The appearance of the initializer of individual variables and defines in the \n"
"documentation can be controlled using \\showinitializer or \\hideinitializer \n"
"command in the documentation regardless of this setting. \n",
0,10000,30
);
cb = addBool(
"OPTIMIZE_OUTPUT_FOR_C",
"Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources \n"
"only. Doxygen will then generate output that is more tailored for C. \n"
"For instance some of the names that are used will be different. The list \n"
"of all members will be omitted, etc. \n",
FALSE
);
cb = addBool(
"SHOW_USED_FILES",
"Set the SHOW_USED_FILES tag to NO to disable the list of files generated \n"
"at the bottom of the documentation of classes and structs. If set to YES the \n"
"list will mention the files that were used to generate the documentation. \n",
TRUE
);
//-----------------------------------------------------------------------------------------------
addInfo( "Messages","configuration options related to warning and progress messages");
//-----------------------------------------------------------------------------------------------
cb = addBool(
"QUIET",
"The QUIET tag can be used to turn on/off the messages that are generated \n"
"by doxygen. Possible values are YES and NO. If left blank NO is used. \n",
FALSE
);
cb = addBool(
"WARNINGS",
"The WARNINGS tag can be used to turn on/off the warning messages that are \n"
"generated by doxygen. Possible values are YES and NO. If left blank \n"
"NO is used. \n",
TRUE
);
cb = addBool(
"WARN_IF_UNDOCUMENTED",
"If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings \n"
"for undocumented members. If EXTRACT_ALL is set to YES then this flag will \n"
"automatically be disabled. \n",
TRUE
);
cs = addString(
"WARN_FORMAT",
"The WARN_FORMAT tag determines the format of the warning messages that \n"
"doxygen can produce. The string should contain the $file, $line, and $text \n"
"tags, which will be replaced by the file and line number from which the \n"
"warning originated and the warning text. \n"
);
cs->setDefaultValue("$file:$line: $text");
cs = addString(
"WARN_LOGFILE",
"The WARN_LOGFILE tag can be used to specify a file to which warning \n"
"and error messages should be written. If left blank the output is written \n"
"to stderr. \n"
);
//-----------------------------------------------------------------------------------------------
addInfo( "Input","configuration options related to the input files");
//-----------------------------------------------------------------------------------------------
cl = addList(
"INPUT",
"The INPUT tag can be used to specify the files and/or directories that contain \n"
"documented source files. You may enter file names like \"myfile.cpp\" or \n"
"directories like \"/usr/src/myproject\". Separate the files or directories \n"
"with spaces. \n"
);
cl->setWidgetType(ConfigList::FileAndDir);
cl = addList(
"FILE_PATTERNS",
"If the value of the INPUT tag contains directories, you can use the \n"
"FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \n"
"and *.h) to filter out the source-files in the directories. If left \n"
"blank all files are included. \n"
);
cb = addBool(
"RECURSIVE",
"The RECURSIVE tag can be used to turn specify whether or not subdirectories \n"
"should be searched for input files as well. Possible values are YES and NO. \n"
"If left blank NO is used. \n",
FALSE
);
cl = addList(
"EXCLUDE",
"The EXCLUDE tag can be used to specify files and/or directories that should \n"
"excluded from the INPUT source files. This way you can easily exclude a \n"
"subdirectory from a directory tree whose root is specified with the INPUT tag. \n"
);
cl->setWidgetType(ConfigList::FileAndDir);
cl = addList(
"EXCLUDE_PATTERNS",
"If the value of the INPUT tag contains directories, you can use the \n"
"EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude \n"
"certain files from those directories. \n"
);
cl = addList(
"EXAMPLE_PATH",
"The EXAMPLE_PATH tag can be used to specify one or more files or \n"
"directories that contain example code fragments that are included (see \n"
"the \\include command). \n"
);
cl->setWidgetType(ConfigList::Dir);
cl = addList(
"EXAMPLE_PATTERNS",
"If the value of the EXAMPLE_PATH tag contains directories, you can use the \n"
"EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \n"
"and *.h) to filter out the source-files in the directories. If left \n"
"blank all files are included. \n"
);
cl = addList(
"IMAGE_PATH",
"The IMAGE_PATH tag can be used to specify one or more files or \n"
"directories that contain image that are included in the documentation (see \n"
"the \\image command). \n"
);
cl->setWidgetType(ConfigList::Dir);
cs = addString(
"INPUT_FILTER",
"The INPUT_FILTER tag can be used to specify a program that doxygen should \n"
"invoke to filter for each input file. Doxygen will invoke the filter program \n"
"by executing (via popen()) the command <filter> <input-file>, where <filter> \n"
"is the value of the INPUT_FILTER tag, and <input-file> is the name of an \n"
"input file. Doxygen will then use the output that the filter program writes \n"
"to standard output. \n"
);
cl->setWidgetType(ConfigList::File);
cb = addBool(
"FILTER_SOURCE_FILES",
"If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using \n"
"INPUT_FILTER) will be used to filter the input files when producing source \n"
"files to browse. \n",
FALSE
);
//-----------------------------------------------------------------------------------------------
addInfo( "Index","configuration options related to the alphabetical class index");
//-----------------------------------------------------------------------------------------------
cb = addBool(
"ALPHABETICAL_INDEX",
"If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index \n"
"of all compounds will be generated. Enable this if the project \n"
"contains a lot of classes, structs, unions or interfaces. \n",
FALSE
);
ci = addInt(
"COLS_IN_ALPHA_INDEX",
"If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then \n"
"the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns \n"
"in which this list will be split (can be a number in the range [1..20]) \n",
1,20,5
);
cl = addList(
"IGNORE_PREFIX",
"In case all classes in a project start with a common prefix, all \n"
"classes will be put under the same header in the alphabetical index. \n"
"The IGNORE_PREFIX tag can be used to specify one or more prefixes that \n"
"should be ignored while generating the index headers. \n"
);
//-----------------------------------------------------------------------------------------------
addInfo( "HTML","configuration options related to the HTML output");
//-----------------------------------------------------------------------------------------------
cb = addBool(
"GENERATE_HTML",
"If the GENERATE_HTML tag is set to YES (the default) Doxygen will \n"
"generate HTML output. \n",
TRUE
);
cs = addString(
"HTML_OUTPUT",
"The HTML_OUTPUT tag is used to specify where the HTML docs will be put. \n"
"If a relative path is entered the value of OUTPUT_DIRECTORY will be \n"
"put in front of it. If left blank `html' will be used as the default path. \n"
);
cs->setDefaultValue("html");
cs->setWidgetType(ConfigString::Dir);
cs->addDependency("GENERATE_HTML");
cs = addString(
"HTML_HEADER",
"The HTML_HEADER tag can be used to specify a personal HTML header for \n"
"each generated HTML page. If it is left blank doxygen will generate a \n"
"standard header.\n"
);
cs->setWidgetType(ConfigString::File);
cs->addDependency("GENERATE_HTML");
cs = addString(
"HTML_FOOTER",
"The HTML_FOOTER tag can be used to specify a personal HTML footer for \n"
"each generated HTML page. If it is left blank doxygen will generate a \n"
"standard footer.\n"
);
cs->setWidgetType(ConfigString::File);
cs->addDependency("GENERATE_HTML");
cs = addString(
"HTML_STYLESHEET",
"The HTML_STYLESHEET tag can be used to specify a user defined cascading \n"
"style sheet that is used by each HTML page. It can be used to \n"
"fine-tune the look of the HTML output. If the tag is left blank doxygen \n"
"will generate a default style sheet \n"
);
cs->setWidgetType(ConfigString::File);
cs->addDependency("GENERATE_HTML");
cb = addBool(
"HTML_ALIGN_MEMBERS",
"If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, \n"
"files or namespaces will be aligned in HTML using tables. If set to \n"
"NO a bullet list will be used. \n",
TRUE
);
cb->addDependency("GENERATE_HTML");
cb = addBool(
"GENERATE_HTMLHELP",
"If the GENERATE_HTMLHELP tag is set to YES, additional index files \n"
"will be generated that can be used as input for tools like the \n"
"Microsoft HTML help workshop to generate a compressed HTML help file (.chm) \n"
"of the generated HTML documentation. \n",
FALSE
);
cb->addDependency("GENERATE_HTML");
cb = addBool(
"GENERATE_CHI",
"If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag \n"
"controls if a separate .chi index file is generated (YES) or that \n"
"it should be included in the master .chm file (NO).\n",
FALSE
);
cb->addDependency("GENERATE_HTML");
cb = addBool(
"BINARY_TOC",
"If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag \n"
"controls whether a binary table of contents is generated (YES) or a \n"
"normal table of contents (NO) in the .chm file.\n",
FALSE
);
cb->addDependency("GENERATE_HTML");
cb = addBool(
"TOC_EXPAND",
"The TOC_EXPAND flag can be set to YES to add extra items for group members \n"
"to the contents of the Html help documentation and to the tree view. \n",
FALSE
);
cb->addDependency("GENERATE_HTML");
cb = addBool(
"DISABLE_INDEX",
"The DISABLE_INDEX tag can be used to turn on/off the condensed index at \n"
"top of each HTML page. The value NO (the default) enables the index and \n"
"the value YES disables it. \n",
FALSE
);
cb->addDependency("GENERATE_HTML");
ci = addInt(
"ENUM_VALUES_PER_LINE",
"This tag can be used to set the number of enum values (range [1..20]) \n"
"that doxygen will group on one line in the generated HTML documentation. \n",
1,20,4
);
ci->addDependency("GENERATE_HTML");
cb = addBool(
"GENERATE_TREEVIEW",
"If the GENERATE_TREEVIEW tag is set to YES, a side panel will be\n"
"generated containing a tree-like index structure (just like the one that \n"
"is generated for HTML Help). For this to work a browser that supports \n"
"JavaScript and frames is required (for instance Netscape 4.0+ \n"
"or Internet explorer 4.0+). ",
FALSE
);
cb->addDependency("GENERATE_HTML");
ci = addInt(
"TREEVIEW_WIDTH",
"If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be \n"
"used to set the initial width (in pixels) of the frame in which the tree \n"
"is shown. \n",
0,1500,250
);
ci->addDependency("GENERATE_HTML");
//-----------------------------------------------------------------------------------------------
addInfo( "LaTeX","configuration options related to the LaTeX output");
//-----------------------------------------------------------------------------------------------
cb = addBool(
"GENERATE_LATEX",
"If the GENERATE_LATEX tag is set to YES (the default) Doxygen will \n"
"generate Latex output. \n",
TRUE
);
cs = addString(
"LATEX_OUTPUT",
"The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. \n"
"If a relative path is entered the value of OUTPUT_DIRECTORY will be \n"
"put in front of it. If left blank `latex' will be used as the default path. \n"
);
cs->setDefaultValue("latex");
cs->setWidgetType(ConfigString::Dir);
cs->addDependency("GENERATE_LATEX");
cb = addBool(
"COMPACT_LATEX",
"If the COMPACT_LATEX tag is set to YES Doxygen generates more compact \n"
"LaTeX documents. This may be useful for small projects and may help to \n"
"save some trees in general. \n",
FALSE
);
cb->addDependency("GENERATE_LATEX");
ce = addEnum(
"PAPER_TYPE",
"The PAPER_TYPE tag can be used to set the paper type that is used \n"
"by the printer. Possible values are: a4, a4wide, letter, legal and \n"
"executive. If left blank a4wide will be used. \n",
"a4wide"
);
ce->addValue("a4");
ce->addValue("a4wide");
ce->addValue("letter");
ce->addValue("legal");
ce->addValue("executive");
ce->addDependency("GENERATE_LATEX");
cl = addList(
"EXTRA_PACKAGES",
"The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX \n"
"packages that should be included in the LaTeX output. \n"
);
cl->addDependency("GENERATE_LATEX");
cs = addString(
"LATEX_HEADER",
"The LATEX_HEADER tag can be used to specify a personal LaTeX header for \n"
"the generated latex document. The header should contain everything until \n"
"the first chapter. If it is left blank doxygen will generate a \n"
"standard header. Notice: only use this tag if you know what you are doing! \n"
);
cs->setWidgetType(ConfigString::File);
cs->addDependency("GENERATE_LATEX");
cb = addBool(
"PDF_HYPERLINKS",
"If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated \n"
"is prepared for conversion to pdf (using ps2pdf). The pdf file will \n"
"contain links (just like the HTML output) instead of page references \n"
"This makes the output suitable for online browsing using a pdf viewer. \n",
FALSE
);
cb->addDependency("GENERATE_LATEX");
cb = addBool(
"USE_PDFLATEX",
"If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of \n"
"plain latex in the generated Makefile. Set this option to YES to get a \n"
"higher quality PDF documentation. \n",
FALSE
);
cb->addDependency("GENERATE_LATEX");
cb = addBool(
"LATEX_BATCHMODE",
"If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\\\batchmode. \n"
"command to the generated LaTeX files. This will instruct LaTeX to keep \n"
"running if errors occur, instead of asking the user for help. \n"
"This option is also used when generating formulas in HTML. \n",
FALSE
);
cb->addDependency("GENERATE_LATEX");
//-----------------------------------------------------------------------------------------------
addInfo( "RTF","configuration options related to the RTF output");
//-----------------------------------------------------------------------------------------------
cb = addBool(
"GENERATE_RTF",
"If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output \n"
"The RTF output is optimised for Word 97 and may not look very pretty with \n"
"other RTF readers or editors.\n",
FALSE
);
cs = addString(
"RTF_OUTPUT",
"The RTF_OUTPUT tag is used to specify where the RTF docs will be put. \n"
"If a relative path is entered the value of OUTPUT_DIRECTORY will be \n"
"put in front of it. If left blank `rtf' will be used as the default path. \n"
);
cs->setDefaultValue("rtf");
cs->setWidgetType(ConfigString::Dir);
cs->addDependency("GENERATE_RTF");
cb = addBool(
"COMPACT_RTF",
"If the COMPACT_RTF tag is set to YES Doxygen generates more compact \n"
"RTF documents. This may be useful for small projects and may help to \n"
"save some trees in general. \n",
FALSE
);
cb->addDependency("GENERATE_RTF");
cb = addBool(
"RTF_HYPERLINKS",
"If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated \n"
"will contain hyperlink fields. The RTF file will \n"
"contain links (just like the HTML output) instead of page references. \n"
"This makes the output suitable for online browsing using WORD or other \n"
"programs which support those fields. \n"
"Note: wordpad (write) and others do not support links. \n",
FALSE
);
cb->addDependency("GENERATE_RTF");
cs = addString(
"RTF_STYLESHEET_FILE",
"Load stylesheet definitions from file. Syntax is similar to doxygen's \n"
"config file, i.e. a series of assigments. You only have to provide \n"
"replacements, missing definitions are set to their default value. \n"
);
cs->setWidgetType(ConfigString::File);
cs->addDependency("GENERATE_RTF");
cs = addString(
"RTF_EXTENSIONS_FILE",
"Set optional variables used in the generation of an rtf document. \n"
"Syntax is similar to doxygen's config file.\n"
);
cs->setWidgetType(ConfigString::File);
cs->addDependency("GENERATE_RTF");
//-----------------------------------------------------------------------------------------------
addInfo( "Man","configuration options related to the man page output");
//-----------------------------------------------------------------------------------------------
cb = addBool(
"GENERATE_MAN",
"If the GENERATE_MAN tag is set to YES (the default) Doxygen will \n"
"generate man pages \n",
FALSE
);
cs = addString(
"MAN_OUTPUT",
"The MAN_OUTPUT tag is used to specify where the man pages will be put. \n"
"If a relative path is entered the value of OUTPUT_DIRECTORY will be \n"
"put in front of it. If left blank `man' will be used as the default path. \n"
);
cs->setDefaultValue("man");
cs->setWidgetType(ConfigString::Dir);
cs->addDependency("GENERATE_MAN");
cs = addString(
"MAN_EXTENSION",
"The MAN_EXTENSION tag determines the extension that is added to \n"
"the generated man pages (default is the subroutine's section .3) \n"
);
cs->setDefaultValue(".3");
cs->addDependency("GENERATE_MAN");
cb = addBool(
"MAN_LINKS",
"If the MAN_LINKS tag is set to YES and Doxygen generates man output,\n"
"then it will generate one additional man file for each entity\n"
"documented in the real man page(s). These additional files\n"
"only source the real man page, but without them the man command\n"
"would be unable to find the correct page. The default is NO.\n",
FALSE
);
cb->addDependency("GENERATE_MAN");
//-----------------------------------------------------------------------------------------------
addInfo( "XML","configuration options related to the XML output");
//-----------------------------------------------------------------------------------------------
cb = addBool(
"GENERATE_XML",
"If the GENERATE_XML tag is set to YES Doxygen will \n"
"generate an XML file that captures the structure of \n"
"the code including all documentation. Note that this \n"
"feature is still experimental and incomplete at the \n"
"moment. \n",
FALSE
);
//-----------------------------------------------------------------------------------------------
addInfo( "Preprocessor","Configuration options related to the preprocessor ");
//-----------------------------------------------------------------------------------------------
cb = addBool(
"ENABLE_PREPROCESSING",
"If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will \n"
"evaluate all C-preprocessor directives found in the sources and include \n"
"files. \n",
TRUE
);
cb = addBool(
"MACRO_EXPANSION",
"If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro \n"
"names in the source code. If set to NO (the default) only conditional \n"
"compilation will be performed. Macro expansion can be done in a controlled \n"
"way by setting EXPAND_ONLY_PREDEF to YES. \n",
FALSE
);
cb->addDependency("ENABLE_PREPROCESSING");
cb = addBool(
"EXPAND_ONLY_PREDEF",
"If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES \n"
"then the macro expansion is limited to the macros specified with the \n"
"PREDEFINED and EXPAND_AS_PREDEFINED tags. \n",
FALSE
);
cb->addDependency("ENABLE_PREPROCESSING");
cb = addBool(
"SEARCH_INCLUDES",
"If the SEARCH_INCLUDES tag is set to YES (the default) the includes files \n"
"in the INCLUDE_PATH (see below) will be search if a #include is found. \n",
TRUE
);
cb->addDependency("ENABLE_PREPROCESSING");
cl = addList(
"INCLUDE_PATH",
"The INCLUDE_PATH tag can be used to specify one or more directories that \n"
"contain include files that are not input files but should be processed by \n"
"the preprocessor. \n"
);
cl->setWidgetType(ConfigList::Dir);
cl->addDependency("ENABLE_PREPROCESSING");
cl = addList(
"INCLUDE_FILE_PATTERNS",
"You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard \n"
"patterns (like *.h and *.hpp) to filter out the header-files in the \n"
"directories. If left blank, the patterns specified with FILE_PATTERNS will \n"
"be used. \n"
);
cl->addDependency("ENABLE_PREPROCESSING");
cl = addList(
"PREDEFINED",
"The PREDEFINED tag can be used to specify one or more macro names that \n"
"are defined before the preprocessor is started (similar to the -D option of \n"
"gcc). The argument of the tag is a list of macros of the form: name \n"
"or name=definition (no spaces). If the definition and the = are \n"
"omitted =1 is assumed. \n"
);
cl->addDependency("ENABLE_PREPROCESSING");
cl = addList(
"EXPAND_AS_DEFINED",
"If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then \n"
"this tag can be used to specify a list of macro names that should be expanded. \n"
"The macro definition that is found in the sources will be used. \n"
"Use the PREDEFINED tag if you want to use a different macro definition. \n"
);
cl->addDependency("ENABLE_PREPROCESSING");
cb = addBool(
"SKIP_FUNCTION_MACROS",
"If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then \n"
"doxygen's preprocessor will remove all function-like macros that are alone \n"
"on a line and do not end with a semicolon. Such function macros are typically \n"
"used for boiler-plate code, and will confuse the parser if not removed. \n",
TRUE
);
cb->addDependency("ENABLE_PREPROCESSING");
//-----------------------------------------------------------------------------------------------
addInfo( "External","Configuration::addtions related to external references ");
//-----------------------------------------------------------------------------------------------
cl = addList(
"TAGFILES",
"The TAGFILES tag can be used to specify one or more tagfiles. \n"
);
cl->setWidgetType(ConfigList::File);
cs = addString(
"GENERATE_TAGFILE",
"When a file name is specified after GENERATE_TAGFILE, doxygen will create \n"
"a tag file that is based on the input files it reads. \n"
);
cs->setWidgetType(ConfigString::File);
cb = addBool(
"ALLEXTERNALS",
"If the ALLEXTERNALS tag is set to YES all external classes will be listed \n"
"in the class index. If set to NO only the inherited external classes \n"
"will be listed. \n",
FALSE
);
cs = addString(
"PERL_PATH",
"The PERL_PATH should be the absolute path and name of the perl script \n"
"interpreter (i.e. the result of `which perl'). \n"
);
cs->setDefaultValue("/usr/bin/perl");
cs->setWidgetType(ConfigString::Dir);
//-----------------------------------------------------------------------------------------------
addInfo( "Dot","Configuration options related to the dot tool ");
//-----------------------------------------------------------------------------------------------
cb = addBool(
"HAVE_DOT",
"If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is \n"
"available from the path. This tool is part of Graphviz, a graph visualization \n"
"toolkit from AT&T and Lucent Bell Labs. The other options in this section \n"
"have no effect if this option is set to NO (the default) \n",
FALSE
);
cb = addBool(
"CLASS_GRAPH",
"If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen \n"
"will generate a graph for each documented class showing the direct and \n"
"indirect inheritance relations. Setting this tag to YES will force the \n"
"the CLASS_DIAGRAMS tag to NO.\n",
TRUE
);
cb->addDependency("HAVE_DOT");
cb = addBool(
"COLLABORATION_GRAPH",
"If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen \n"
"will generate a graph for each documented class showing the direct and \n"
"indirect implementation dependencies (inheritance, containment, and \n"
"class references variables) of the class with other documented classes. \n",
TRUE
);
cb->addDependency("HAVE_DOT");
cb = addBool(
"TEMPLATE_RELATIONS",
"If set to YES, the inheritance and collaboration graphs will show the \n"
"relations between templates and their instances. \n",
TRUE
);
cb->addDependency("HAVE_DOT");
cb = addBool(
"INCLUDE_GRAPH",
"If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT \n"
"tags are set to YES then doxygen will generate a graph for each documented \n"
"file showing the direct and indirect include dependencies of the file with \n"
"other documented files. \n",
TRUE
);
cb->addDependency("HAVE_DOT");
cb = addBool(
"INCLUDED_BY_GRAPH",
"If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and \n"
"HAVE_DOT tags are set to YES then doxygen will generate a graph for each \n"
"documented header file showing the documented files that directly or \n"
"indirectly include this file. \n",
TRUE
);
cb->addDependency("HAVE_DOT");
cb = addBool(
"GRAPHICAL_HIERARCHY",
"If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen \n"
"will graphical hierarchy of all classes instead of a textual one. \n",
TRUE
);
cb->addDependency("HAVE_DOT");
cs = addString(
"DOT_PATH",
"The tag DOT_PATH can be used to specify the path where the dot tool can be \n"
"found. If left blank, it is assumed the dot tool can be found on the path. \n"
);
cs->setWidgetType(ConfigString::Dir);
cs->addDependency("HAVE_DOT");
cl = addList(
"DOTFILE_DIRS",
"The DOTFILE_DIRS tag can be used to specify one or more directories that \n"
"contain dot files that are included in the documentation (see the \n"
"\\dotfile command). \n"
);
cl->setWidgetType(ConfigList::Dir);
cl->addDependency("HAVE_DOT");
ci = addInt(
"MAX_DOT_GRAPH_WIDTH",
"The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width \n"
"(in pixels) of the graphs generated by dot. If a graph becomes larger than \n"
"this value, doxygen will try to truncate the graph, so that it fits within \n"
"the specified constraint. Beware that most browsers cannot cope with very \n"
"large images. \n",
100,30000, 1024
);
ci->addDependency("HAVE_DOT");
ci = addInt(
"MAX_DOT_GRAPH_HEIGHT",
"The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height \n"
"(in pixels) of the graphs generated by dot. If a graph becomes larger than \n"
"this value, doxygen will try to truncate the graph, so that it fits within \n"
"the specified constraint. Beware that most browsers cannot cope with very \n"
"large images. \n",
100,30000,1024
);
ci->addDependency("HAVE_DOT");
cb = addBool(
"GENERATE_LEGEND",
"If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will \n"
"generate a legend page explaining the meaning of the various boxes and \n"
"arrows in the dot generated graphs. \n",
TRUE
);
cb->addDependency("HAVE_DOT");
cb = addBool(
"DOT_CLEANUP",
"If the DOT_CLEANUP tag is set to YES (the default) Doxygen will \n"
"remove the intermedate dot files that are used to generate \n"
"the various graphs. \n",
TRUE
);
cb->addDependency("HAVE_DOT");
//-----------------------------------------------------------------------------------------------
addInfo( "Search","Configuration::addtions related to the search engine ");
//-----------------------------------------------------------------------------------------------
cb = addBool(
"SEARCHENGINE",
"The SEARCHENGINE tag specifies whether or not a search engine should be \n"
"used. If set to NO the values of all tags below this one will be ignored. \n",
FALSE
);
cs = addString(
"CGI_NAME",
"The CGI_NAME tag should be the name of the CGI script that \n"
"starts the search engine (doxysearch) with the correct parameters. \n"
"A script with this name will be generated by doxygen. \n"
);
cs->setDefaultValue("search.cgi");
cs->addDependency("SEARCHENGINE");
cs = addString(
"CGI_URL",
"The CGI_URL tag should be the absolute URL to the directory where the \n"
"cgi binaries are located. See the documentation of your http daemon for \n"
"details. \n"
);
cs->addDependency("SEARCHENGINE");
cs = addString(
"DOC_URL",
"The DOC_URL tag should be the absolute URL to the directory where the \n"
"documentation is located. If left blank the absolute path to the \n"
"documentation, with file:// prepended to it, will be used. \n"
);
cs->addDependency("SEARCHENGINE");
cs = addString(
"DOC_ABSPATH",
"The DOC_ABSPATH tag should be the absolute path to the directory where the \n"
"documentation is located. If left blank the directory on the local machine \n"
"will be used. \n"
);
cs->setWidgetType(ConfigString::Dir);
cs->addDependency("SEARCHENGINE");
cs = addString(
"BIN_ABSPATH",
"The BIN_ABSPATH tag must point to the directory where the doxysearch binary \n"
"is installed. \n"
);
cs->setDefaultValue("/usr/local/bin/");
cs->setWidgetType(ConfigString::Dir);
cs->addDependency("SEARCHENGINE");
cl = addList(
"EXT_DOC_PATHS",
"The EXT_DOC_PATHS tag can be used to specify one or more paths to \n"
"documentation generated for other projects. This allows doxysearch to search \n"
"the documentation for these projects as well. \n"
);
cl->setWidgetType(ConfigList::Dir);
cl->addDependency("SEARCHENGINE");
// The IMAGE_PATTERNS tag is now officially obsolete.
}
static QCString configFileToString(const char *name)
{
if (name==0 || name[0]==0) return 0;
QFile f;
bool fileOpened=FALSE;
if (name[0]=='-' && name[1]==0) // read from stdin
{
fileOpened=f.open(IO_ReadOnly,stdin);
if (fileOpened)
{
const int bSize=4096;
QCString contents(bSize);
int totalSize=0;
int size;
while ((size=f.readBlock(contents.data()+totalSize,bSize))==bSize)
{
totalSize+=bSize;
contents.resize(totalSize+bSize);
}
totalSize+=size+2;
contents.resize(totalSize);
contents.at(totalSize-2)='\n'; // to help the scanner
contents.at(totalSize-1)='\0';
return contents;
}
}
else // read from file
{
QFileInfo fi(name);
if (!fi.exists() || !fi.isFile())
{
config_err("Error: file `%s' not found\n",name);
return "";
}
f.setName(name);
fileOpened=f.open(IO_ReadOnly);
if (fileOpened)
{
int fsize=f.size();
QCString contents(fsize+2);
f.readBlock(contents.data(),fsize);
if (fsize==0 || contents[fsize-1]=='\n')
contents[fsize]='\0';
else
contents[fsize]='\n'; // to help the scanner
contents[fsize+1]='\0';
f.close();
return contents;
}
}
if (!fileOpened)
{
config_err("Error: cannot open file `%s' for reading\n",name);
}
return "";
}
bool Config::parse(const char *fn)
{
QCString contents = configFileToString(fn);
config = Config::instance();
inputString = contents.data();
inputPosition = 0;
yyLineNr = 1;
yyFileName=fn;
includeStack.setAutoDelete(TRUE);
includeStack.clear();
includeDepth = 0;
configYYrestart( configYYin );
BEGIN( Start );
configYYlex();
inputString = 0;
return TRUE;
}
//extern "C" { // some bogus code to keep the compiler happy
// int configYYwrap() { return 1 ; }
//}
|