Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 499532
Collapse All | Expand All

(-)doxygen-1.8.6.org/configure (-10 / +7 lines)
Lines 564-575 Link Here
564
  python_dirs="$bin_dirs /usr/bin /usr/local/bin /bin /sbin"
564
  python_dirs="$bin_dirs /usr/bin /usr/local/bin /bin /sbin"
565
  python_prog=NO
565
  python_prog=NO
566
  python_found=NO
566
  python_found=NO
567
  for i in $python_names; do
567
  for binary in $python_names; do
568
    for j in $python_dirs; do
568
    for path in $python_dirs; do
569
      if test -x "$j/$i"; then
569
      if test -x "$path/$binary"; then
570
        python_found=YES
570
        python_found=YES
571
        if test `$j/$i -c "import sys; print sys.version_info[0]"` = 2; then
571
        python_version_major=`$path/$binary -c "import sys; print(sys.version_info[0])"`
572
          python_prog="$j/$i"
572
        if test -n "$python_version_major"; then
573
          python_prog="$path/$binary"
573
          break 2
574
          break 2
574
        fi
575
        fi
575
      fi
576
      fi
Lines 579-589 Link Here
579
fi
580
fi
580
581
581
if test "$f_python" = NO; then
582
if test "$f_python" = NO; then
582
  if test "$python_found" = YES; then
583
  echo "not found!";
583
    echo "version should be python 2."
584
  else
585
    echo "not found!";
586
  fi
587
  echo
584
  echo
588
  exit 2
585
  exit 2
589
fi
586
fi
(-)doxygen-1.8.6.org/doc/language.doc (-1 / +1 lines)
Lines 24-30 Link Here
24
configuration option \ref cfg_output_language "OUTPUT_LANGUAGE" in the 
24
configuration option \ref cfg_output_language "OUTPUT_LANGUAGE" in the 
25
configuration file (with default name and known as Doxyfile).
25
configuration file (with default name and known as Doxyfile).
26
26
27
Currently (version 1.8.5), 40 languages
27
Currently (version 1.8.6), 40 languages
28
are supported (sorted alphabetically):
28
are supported (sorted alphabetically):
29
Afrikaans, Arabic, Armenian, Brazilian Portuguese, Catalan, Chinese,
29
Afrikaans, Arabic, Armenian, Brazilian Portuguese, Catalan, Chinese,
30
Chinese Traditional, Croatian, Czech, Danish, Dutch, English,
30
Chinese Traditional, Croatian, Czech, Danish, Dutch, English,
(-)doxygen-1.8.6.org/doc/translator.py (-42 / +46 lines)
Lines 68-73 Link Here
68
68
69
from __future__ import generators
69
from __future__ import generators
70
import codecs
70
import codecs
71
import functools
72
import locale
71
import os
73
import os
72
import re
74
import re
73
import sys
75
import sys
Lines 237-243 Link Here
237
239
238
        # Open the file for reading and extracting tokens until the eof.
240
        # Open the file for reading and extracting tokens until the eof.
239
        # Initialize the finite automaton.
241
        # Initialize the finite automaton.
240
        f = open(self.fname)
242
        f = codecs.open(self.fname, 'r', 'utf-8')
241
        lineNo = 0
243
        lineNo = 0
242
        line = ''         # init -- see the pos initialization below
244
        line = ''         # init -- see the pos initialization below
243
        linelen = 0       # init
245
        linelen = 0       # init
Lines 276-282 Link Here
276
                    # If it is an unknown item, it can still be recognized
278
                    # If it is an unknown item, it can still be recognized
277
                    # here. Keywords and separators are the example.
279
                    # here. Keywords and separators are the example.
278
                    if tokenId == 'unknown':
280
                    if tokenId == 'unknown':
279
                        if tokenDic.has_key(tokenStr):
281
                        if tokenStr in tokenDic:
280
                            tokenId = tokenDic[tokenStr]
282
                            tokenId = tokenDic[tokenStr]
281
                        elif tokenStr.isdigit():
283
                        elif tokenStr.isdigit():
282
                            tokenId = 'num'
284
                            tokenId = 'num'
Lines 329-335 Link Here
329
                    tokenStr = c
331
                    tokenStr = c
330
                    tokenLineNo = lineNo
332
                    tokenLineNo = lineNo
331
                    status = 8
333
                    status = 8
332
                elif tokenDic.has_key(c):  # known one-char token
334
                elif c in tokenDic:      # known one-char token
333
                    tokenId = tokenDic[c]
335
                    tokenId = tokenDic[c]
334
                    tokenStr = c
336
                    tokenStr = c
335
                    tokenLineNo = lineNo
337
                    tokenLineNo = lineNo
Lines 424-430 Link Here
424
                if c.isspace():
426
                if c.isspace():
425
                    pos += 1
427
                    pos += 1
426
                    status = 0           # tokenId may be determined later
428
                    status = 0           # tokenId may be determined later
427
                elif tokenDic.has_key(c):  # separator, don't move pos
429
                elif c in tokenDic:      # separator, don't move pos
428
                    status = 0
430
                    status = 0
429
                else:
431
                else:
430
                    tokenStr += c        # collect
432
                    tokenStr += c        # collect
Lines 457-463 Link Here
457
459
458
            # Always assume that the previous tokens were processed. Get
460
            # Always assume that the previous tokens were processed. Get
459
            # the next one.
461
            # the next one.
460
            tokenId, tokenStr, tokenLineNo = tokenIterator.next()
462
            tokenId, tokenStr, tokenLineNo = next(tokenIterator)
461
463
462
            # Process the token and never return back.
464
            # Process the token and never return back.
463
            if status == 0:    # waiting for the 'class' keyword.
465
            if status == 0:    # waiting for the 'class' keyword.
Lines 588-594 Link Here
588
        while status != 777:
590
        while status != 777:
589
591
590
            # Get the next token.
592
            # Get the next token.
591
            tokenId, tokenStr, tokenLineNo = tokenIterator.next()
593
            tokenId, tokenStr, tokenLineNo = next(tokenIterator)
592
594
593
            if status == 0:      # waiting for 'public:'
595
            if status == 0:      # waiting for 'public:'
594
                if tokenId == 'public':
596
                if tokenId == 'public':
Lines 616-622 Link Here
616
                    prototype += ' ' + tokenStr
618
                    prototype += ' ' + tokenStr
617
                    uniPrototype = tokenStr  # start collecting the unified prototype
619
                    uniPrototype = tokenStr  # start collecting the unified prototype
618
                    status = 4
620
                    status = 4
619
		elif tokenId == 'tilde':
621
                elif tokenId == 'tilde':
620
                    status = 4
622
                    status = 4
621
                else:
623
                else:
622
                    self.__unexpectedToken(status, tokenId, tokenLineNo)
624
                    self.__unexpectedToken(status, tokenId, tokenLineNo)
Lines 670-676 Link Here
670
672
671
            elif status == 9:    # after semicolon, produce the dic item
673
            elif status == 9:    # after semicolon, produce the dic item
672
                if tokenId == 'semic':
674
                if tokenId == 'semic':
673
                    assert(not resultDic.has_key(uniPrototype))
675
                    assert(uniPrototype not in resultDic)
674
                    resultDic[uniPrototype] = prototype
676
                    resultDic[uniPrototype] = prototype
675
                    status = 2
677
                    status = 2
676
                else:
678
                else:
Lines 752-758 Link Here
752
754
753
        # Eat the rest of the source to cause closing the file.
755
        # Eat the rest of the source to cause closing the file.
754
        while tokenId != 'eof':
756
        while tokenId != 'eof':
755
            tokenId, tokenStr, tokenLineNo = tokenIterator.next()
757
            tokenId, tokenStr, tokenLineNo = next(tokenIterator)
756
758
757
        # Return the resulting dictionary with 'uniPrototype -> prototype'.
759
        # Return the resulting dictionary with 'uniPrototype -> prototype'.
758
        return resultDic
760
        return resultDic
Lines 800-806 Link Here
800
        while status != 777:
802
        while status != 777:
801
803
802
            # Get the next token.
804
            # Get the next token.
803
            tokenId, tokenStr, tokenLineNo = tokenIterator.next()
805
            tokenId, tokenStr, tokenLineNo = next(tokenIterator)
804
806
805
            if status == 0:      # waiting for 'public:'
807
            if status == 0:      # waiting for 'public:'
806
                if tokenId == 'public':
808
                if tokenId == 'public':
Lines 912-918 Link Here
912
                            sys.stderr.write(msg)
914
                            sys.stderr.write(msg)
913
                            assert False
915
                            assert False
914
916
915
                        assert(not self.prototypeDic.has_key(uniPrototype))
917
                        assert(uniPrototype not in self.prototypeDic)
916
                        # Insert new dictionary item.
918
                        # Insert new dictionary item.
917
                        self.prototypeDic[uniPrototype] = prototype
919
                        self.prototypeDic[uniPrototype] = prototype
918
                        status = 2      # body consumed
920
                        status = 2      # body consumed
Lines 1056-1067 Link Here
1056
                # For the required methods, update the dictionary of methods
1058
                # For the required methods, update the dictionary of methods
1057
                # implemented by the adapter.
1059
                # implemented by the adapter.
1058
                for protoUni in self.prototypeDic:
1060
                for protoUni in self.prototypeDic:
1059
                    if reqDic.has_key(protoUni):
1061
                    if protoUni in reqDic:
1060
                        # This required method will be marked as implemented
1062
                        # This required method will be marked as implemented
1061
                        # by this adapter class. This implementation assumes
1063
                        # by this adapter class. This implementation assumes
1062
                        # that newer adapters do not reimplement any required
1064
                        # that newer adapters do not reimplement any required
1063
                        # methods already implemented by older adapters.
1065
                        # methods already implemented by older adapters.
1064
                        assert(not adaptDic.has_key(protoUni))
1066
                        assert(protoUni not in adaptDic)
1065
                        adaptDic[protoUni] = (version, self.classId)
1067
                        adaptDic[protoUni] = (version, self.classId)
1066
1068
1067
                # Clear the dictionary object and the information related
1069
                # Clear the dictionary object and the information related
Lines 1094-1100 Link Here
1094
        # Eat the rest of the source to cause closing the file.
1096
        # Eat the rest of the source to cause closing the file.
1095
        while True:
1097
        while True:
1096
            try:
1098
            try:
1097
                t = tokenIterator.next()
1099
                t = next(tokenIterator)
1098
            except StopIteration:
1100
            except StopIteration:
1099
                break
1101
                break
1100
1102
Lines 1106-1112 Link Here
1106
        # Build the list of obsolete methods.
1108
        # Build the list of obsolete methods.
1107
        self.obsoleteMethods = []
1109
        self.obsoleteMethods = []
1108
        for p in myDic:
1110
        for p in myDic:
1109
            if not reqDic.has_key(p):
1111
            if p not in reqDic:
1110
                self.obsoleteMethods.append(p)
1112
                self.obsoleteMethods.append(p)
1111
1113
1112
        # Build the list of missing methods and the list of implemented
1114
        # Build the list of missing methods and the list of implemented
Lines 1114-1120 Link Here
1114
        self.missingMethods = []
1116
        self.missingMethods = []
1115
        self.implementedMethods = []
1117
        self.implementedMethods = []
1116
        for p in reqDic:
1118
        for p in reqDic:
1117
            if myDic.has_key(p):
1119
            if p in myDic:
1118
                self.implementedMethods.append(p)
1120
                self.implementedMethods.append(p)
1119
            else:
1121
            else:
1120
                self.missingMethods.append(p)
1122
                self.missingMethods.append(p)
Lines 1133-1139 Link Here
1133
                adaptMinVersion = '9.9.99'
1135
                adaptMinVersion = '9.9.99'
1134
                adaptMinClass = 'TranslatorAdapter_9_9_99'
1136
                adaptMinClass = 'TranslatorAdapter_9_9_99'
1135
                for uniProto in self.missingMethods:
1137
                for uniProto in self.missingMethods:
1136
                    if adaptDic.has_key(uniProto):
1138
                    if uniProto in adaptDic:
1137
                        version, cls = adaptDic[uniProto]
1139
                        version, cls = adaptDic[uniProto]
1138
                        if version < adaptMinVersion:
1140
                        if version < adaptMinVersion:
1139
                            adaptMinVersion = version
1141
                            adaptMinVersion = version
Lines 1386-1392 Link Here
1386
        self.langLst = []
1388
        self.langLst = []
1387
        for obj in self.__translDic.values():
1389
        for obj in self.__translDic.values():
1388
            self.langLst.append((obj.langReadable, obj))
1390
            self.langLst.append((obj.langReadable, obj))
1389
        self.langLst.sort(lambda a, b: cmp(a[0], b[0]))
1391
        def _sort_by_first_item_in_tuple(t1, t2):
1392
            return locale.strcoll(t1[0], t2[0])
1393
        self.langLst.sort(key=functools.cmp_to_key(_sort_by_first_item_in_tuple))
1390
1394
1391
        # Create the list with readable language names. If the language has
1395
        # Create the list with readable language names. If the language has
1392
        # also the English-based version, modify the item by appending
1396
        # also the English-based version, modify the item by appending
Lines 1400-1406 Link Here
1400
            # of the English-based object. If the object exists, modify the
1404
            # of the English-based object. If the object exists, modify the
1401
            # name for the readable list of supported languages.
1405
            # name for the readable list of supported languages.
1402
            classIdEn = obj.classId + 'En'
1406
            classIdEn = obj.classId + 'En'
1403
            if self.__translDic.has_key(classIdEn):
1407
            if classIdEn in self.__translDic:
1404
                name += ' (+En)'
1408
                name += ' (+En)'
1405
1409
1406
            # Append the result name of the language, possibly with note.
1410
            # Append the result name of the language, possibly with note.
Lines 1424-1430 Link Here
1424
        for name, obj in self.langLst:
1428
        for name, obj in self.langLst:
1425
            if obj.status == 'En':
1429
            if obj.status == 'En':
1426
                classId = obj.classId[:-2]
1430
                classId = obj.classId[:-2]
1427
                if self.__translDic.has_key(classId):
1431
                if classId in self.__translDic:
1428
                    self.numLang -= 1    # the couple will be counted as one
1432
                    self.numLang -= 1    # the couple will be counted as one
1429
1433
1430
        # Extract the version of Doxygen.
1434
        # Extract the version of Doxygen.
Lines 1472-1482 Link Here
1472
        probably used should be checked first and the resulting reduced
1476
        probably used should be checked first and the resulting reduced
1473
        dictionary should be used for checking the next files (speed up).
1477
        dictionary should be used for checking the next files (speed up).
1474
        """
1478
        """
1475
        lst_in = dic.keys()   # identifiers to be searched for
1479
        lst_in = list(dic.keys())   # identifiers to be searched for
1476
1480
1477
        # Read content of the file as one string.
1481
        # Read content of the file as one string.
1478
        assert os.path.isfile(fname)
1482
        assert os.path.isfile(fname)
1479
        f = open(fname)
1483
        f = codecs.open(fname, 'r', 'utf-8')
1480
        cont = f.read()
1484
        cont = f.read()
1481
        f.close()
1485
        f.close()
1482
1486
Lines 1553-1559 Link Here
1553
        output = os.path.join(self.doc_path, self.translatorReportFileName)
1557
        output = os.path.join(self.doc_path, self.translatorReportFileName)
1554
1558
1555
        # Open the textual report file for the output.
1559
        # Open the textual report file for the output.
1556
        f = open(output, 'w')
1560
        f = codecs.open(output, 'w', 'utf-8')
1557
1561
1558
        # Output the information about the version.
1562
        # Output the information about the version.
1559
        f.write('(' + self.doxVersion + ')\n\n')
1563
        f.write('(' + self.doxVersion + ')\n\n')
Lines 1581-1587 Link Here
1581
        # The e-mail addresses of the maintainers will be collected to
1585
        # The e-mail addresses of the maintainers will be collected to
1582
        # the auxiliary file in the order of translator classes listed
1586
        # the auxiliary file in the order of translator classes listed
1583
        # in the translator report.
1587
        # in the translator report.
1584
        fmail = open('mailto.txt', 'w')
1588
        fmail = codecs.open('mailto.txt', 'w', 'utf-8')
1585
1589
1586
        # Write the list of "up-to-date" translator classes.
1590
        # Write the list of "up-to-date" translator classes.
1587
        if self.upToDateIdLst:
1591
        if self.upToDateIdLst:
Lines 1670-1676 Link Here
1670
                        to_remove[adaptClassId] = True
1674
                        to_remove[adaptClassId] = True
1671
1675
1672
                if to_remove:
1676
                if to_remove:
1673
                    lst = to_remove.keys()
1677
                    lst = list(to_remove.keys())
1674
                    lst.sort()
1678
                    lst.sort()
1675
                    plural = len(lst) > 1
1679
                    plural = len(lst) > 1
1676
                    note = 'Note: The adapter class'
1680
                    note = 'Note: The adapter class'
Lines 1716-1722 Link Here
1716
                f.write('\n' + '=' * 70 + '\n')
1720
                f.write('\n' + '=' * 70 + '\n')
1717
                f.write(fill(s) + '\n\n')
1721
                f.write(fill(s) + '\n\n')
1718
1722
1719
                keys = dic.keys()
1723
                keys = list(dic.keys())
1720
                keys.sort()
1724
                keys.sort()
1721
                for key in keys:
1725
                for key in keys:
1722
                    f.write('  ' + dic[key] + '\n')
1726
                    f.write('  ' + dic[key] + '\n')
Lines 1726-1732 Link Here
1726
        f.write('\n' + '=' * 70)
1730
        f.write('\n' + '=' * 70)
1727
        f.write('\nDetails for translators (classes sorted alphabetically):\n')
1731
        f.write('\nDetails for translators (classes sorted alphabetically):\n')
1728
1732
1729
        cls = self.__translDic.keys()
1733
        cls = list(self.__translDic.keys())
1730
        cls.sort()
1734
        cls.sort()
1731
1735
1732
        for c in cls:
1736
        for c in cls:
Lines 1779-1785 Link Here
1779
                    inside = False
1783
                    inside = False
1780
                else:
1784
                else:
1781
                    # If it is the first maintainer, create the empty list.
1785
                    # If it is the first maintainer, create the empty list.
1782
                    if not self.__maintainersDic.has_key(classId):
1786
                    if classId not in self.__maintainersDic:
1783
                        self.__maintainersDic[classId] = []
1787
                        self.__maintainersDic[classId] = []
1784
1788
1785
                    # Split the information about the maintainer and append
1789
                    # Split the information about the maintainer and append
Lines 1914-1920 Link Here
1914
                # The marked adresses (they start with the mark '[unreachable]',
1918
                # The marked adresses (they start with the mark '[unreachable]',
1915
                # '[resigned]', whatever '[xxx]') will not be displayed at all.
1919
                # '[resigned]', whatever '[xxx]') will not be displayed at all.
1916
                # Only the mark will be used instead.
1920
                # Only the mark will be used instead.
1917
                rexMark = re.compile(ur'(?P<mark>\[.*?\])')
1921
                rexMark = re.compile(u'(?P<mark>\\[.*?\])')
1918
                le = []
1922
                le = []
1919
                for maintainer in self.__maintainersDic[obj.classId]:
1923
                for maintainer in self.__maintainersDic[obj.classId]:
1920
                    address = maintainer[1]
1924
                    address = maintainer[1]
Lines 1940-1960 Link Here
1940
        htmlTable = htmlTableTpl % (''.join(trlst))
1944
        htmlTable = htmlTableTpl % (''.join(trlst))
1941
1945
1942
        # Define templates for LaTeX table parts of the documentation.
1946
        # Define templates for LaTeX table parts of the documentation.
1943
        latexTableTpl = ur'''
1947
        latexTableTpl = u'''
1944
            \latexonly
1948
            \\latexonly
1945
            \footnotesize
1949
            \\footnotesize
1946
            \begin{longtable}{|l|l|l|l|}
1950
            \\begin{longtable}{|l|l|l|l|}
1947
              \hline
1951
              \\hline
1948
              {\bf Language} & {\bf Maintainer} & {\bf Contact address} & {\bf Status} \\
1952
              {\\bf Language} & {\\bf Maintainer} & {\\bf Contact address} & {\\bf Status} \\\\
1949
              \hline
1953
              \\hline
1950
            %s
1954
            %s
1951
              \hline
1955
              \\hline
1952
            \end{longtable}
1956
            \\end{longtable}
1953
            \normalsize
1957
            \\normalsize
1954
            \endlatexonly
1958
            \\endlatexonly
1955
            '''
1959
            '''
1956
        latexTableTpl = dedent(latexTableTpl)
1960
        latexTableTpl = dedent(latexTableTpl)
1957
        latexLineTpl = u'\n' + r'  %s & %s & {\tt\tiny %s} & %s \\'
1961
        latexLineTpl = u'\n' + '  %s & %s & {\\tt\\tiny %s} & %s \\\\'
1958
1962
1959
        # Loop through transl objects in the order of sorted readable names
1963
        # Loop through transl objects in the order of sorted readable names
1960
        # and add generate the content of the LaTeX table.
1964
        # and add generate the content of the LaTeX table.
Lines 1965-1971 Link Here
1965
            # in the table is placed explicitly above the first
1969
            # in the table is placed explicitly above the first
1966
            # maintainer. Prepare the arguments for the LaTeX row template.
1970
            # maintainer. Prepare the arguments for the LaTeX row template.
1967
            maintainers = []
1971
            maintainers = []
1968
            if self.__maintainersDic.has_key(obj.classId):
1972
            if obj.classId in self.__maintainersDic:
1969
                maintainers = self.__maintainersDic[obj.classId]
1973
                maintainers = self.__maintainersDic[obj.classId]
1970
1974
1971
            lang = obj.langReadable
1975
            lang = obj.langReadable
(-)doxygen-1.8.6.org/src/configgen.py (-155 / +156 lines)
Lines 12-17 Link Here
12
# Documents produced by Doxygen are derivative works derived from the
12
# Documents produced by Doxygen are derivative works derived from the
13
# input used in their production; they are not affected by this license.
13
# input used in their production; they are not affected by this license.
14
#
14
#
15
16
from __future__ import print_function
17
15
import xml.dom.minidom
18
import xml.dom.minidom
16
import sys
19
import sys
17
import re
20
import re
Lines 112-118 Link Here
112
		if (n.nodeName == "value"):
115
		if (n.nodeName == "value"):
113
			if n.nodeType == Node.ELEMENT_NODE:
116
			if n.nodeType == Node.ELEMENT_NODE:
114
				name = n.getAttribute('name')
117
				name = n.getAttribute('name')
115
				print "  %s->addValue(\"%s\");" % (var, name)
118
				print("  %s->addValue(\"%s\");" % (var, name))
116
119
117
120
118
def parseHeader(node,objName):
121
def parseHeader(node,objName):
Lines 123-137 Link Here
123
				if (n.getAttribute('doxyfile') != "0"):
126
				if (n.getAttribute('doxyfile') != "0"):
124
					doc += parseDocs(n)
127
					doc += parseDocs(n)
125
	docC = transformDocs(doc)
128
	docC = transformDocs(doc)
126
	print "  %s->setHeader(" % (objName)
129
	print("  %s->setHeader(" % (objName))
127
	rng = len(docC)
130
	rng = len(docC)
128
	for i in range(rng):
131
	for i in range(rng):
129
		line = docC[i]
132
		line = docC[i]
130
		if i != rng - 1:  # since we go from 0 to rng-1
133
		if i != rng - 1:  # since we go from 0 to rng-1
131
			print "              \"%s\\n\"" % (line)
134
			print("              \"%s\\n\"" % (line))
132
		else:
135
		else:
133
			print "              \"%s\"" % (line)
136
			print("              \"%s\"" % (line))
134
	print "             );"
137
	print("             );")
135
138
136
139
137
def prepCDocs(node):
140
def prepCDocs(node):
Lines 225-232 Link Here
225
	setting = node.getAttribute('setting')
228
	setting = node.getAttribute('setting')
226
	docC = prepCDocs(node);
229
	docC = prepCDocs(node);
227
	if len(setting) > 0:
230
	if len(setting) > 0:
228
		print "#if %s" % (setting)
231
		print("#if %s" % (setting))
229
	print "  //----"
232
	print("  //----")
230
	if type == 'bool':
233
	if type == 'bool':
231
		if len(adefval) > 0:
234
		if len(adefval) > 0:
232
			enabled = adefval
235
			enabled = adefval
Lines 234-339 Link Here
234
			enabled = "TRUE"
237
			enabled = "TRUE"
235
		else:
238
		else:
236
			enabled = "FALSE"
239
			enabled = "FALSE"
237
		print "  cb = cfg->addBool("
240
		print("  cb = cfg->addBool(")
238
		print "             \"%s\"," % (name)
241
		print("             \"%s\"," % (name))
239
		rng = len(docC)
242
		rng = len(docC)
240
		for i in range(rng):
243
		for i in range(rng):
241
			line = docC[i]
244
			line = docC[i]
242
			if i != rng - 1:  # since we go from 0 to rng-1
245
			if i != rng - 1:  # since we go from 0 to rng-1
243
				print "              \"%s\\n\"" % (line)
246
				print("              \"%s\\n\"" % (line))
244
			else:
247
			else:
245
				print "              \"%s\"," % (line)
248
				print("              \"%s\"," % (line))
246
		print "              %s" % (enabled)
249
		print("              %s" % (enabled))
247
		print "             );"
250
		print("             );")
248
		if depends != '':
251
		if depends != '':
249
			print "  cb->addDependency(\"%s\");" % (depends)
252
			print("  cb->addDependency(\"%s\");" % (depends))
250
	elif type == 'string':
253
	elif type == 'string':
251
		print "  cs = cfg->addString("
254
		print("  cs = cfg->addString(")
252
		print "              \"%s\"," % (name)
255
		print("              \"%s\"," % (name))
253
		rng = len(docC)
256
		rng = len(docC)
254
		for i in range(rng):
257
		for i in range(rng):
255
			line = docC[i]
258
			line = docC[i]
256
			if i != rng - 1:  # since we go from 0 to rng-1
259
			if i != rng - 1:  # since we go from 0 to rng-1
257
				print "              \"%s\\n\"" % (line)
260
				print("              \"%s\\n\"" % (line))
258
			else:
261
			else:
259
				print "              \"%s\"" % (line)
262
				print("              \"%s\"" % (line))
260
		print "             );"
263
		print("             );")
261
		if defval != '':
264
		if defval != '':
262
			print "  cs->setDefaultValue(\"%s\");" % (defval)
265
			print("  cs->setDefaultValue(\"%s\");" % (defval))
263
		if format == 'file':
266
		if format == 'file':
264
			print "  cs->setWidgetType(ConfigString::File);"
267
			print("  cs->setWidgetType(ConfigString::File);")
265
		elif format == 'dir':
268
		elif format == 'dir':
266
			print "  cs->setWidgetType(ConfigString::Dir);"
269
			print("  cs->setWidgetType(ConfigString::Dir);")
267
		if depends != '':
270
		if depends != '':
268
			print "  cs->addDependency(\"%s\");" % (depends)
271
			print("  cs->addDependency(\"%s\");" % (depends))
269
	elif type == 'enum':
272
	elif type == 'enum':
270
		print "  ce = cfg->addEnum("
273
		print("  ce = cfg->addEnum(")
271
		print "              \"%s\"," % (name)
274
		print("              \"%s\"," % (name))
272
		rng = len(docC)
275
		rng = len(docC)
273
		for i in range(rng):
276
		for i in range(rng):
274
			line = docC[i]
277
			line = docC[i]
275
			if i != rng - 1:  # since we go from 0 to rng-1
278
			if i != rng - 1:  # since we go from 0 to rng-1
276
				print "              \"%s\\n\"" % (line)
279
				print("              \"%s\\n\"" % (line))
277
			else:
280
			else:
278
				print "              \"%s\"," % (line)
281
				print("              \"%s\"," % (line))
279
		print "              \"%s\"" % (defval)
282
		print("              \"%s\"" % (defval))
280
		print "             );"
283
		print("             );")
281
		addValues("ce", node)
284
		addValues("ce", node)
282
		if depends != '':
285
		if depends != '':
283
			print "  ce->addDependency(\"%s\");" % (depends)
286
			print("  ce->addDependency(\"%s\");" % (depends))
284
	elif type == 'int':
287
	elif type == 'int':
285
		minval = node.getAttribute('minval')
288
		minval = node.getAttribute('minval')
286
		maxval = node.getAttribute('maxval')
289
		maxval = node.getAttribute('maxval')
287
		print "  ci = cfg->addInt("
290
		print("  ci = cfg->addInt(")
288
		print "              \"%s\"," % (name)
291
		print("              \"%s\"," % (name))
289
		rng = len(docC)
292
		rng = len(docC)
290
		for i in range(rng):
293
		for i in range(rng):
291
			line = docC[i]
294
			line = docC[i]
292
			if i != rng - 1:  # since we go from 0 to rng-1
295
			if i != rng - 1:  # since we go from 0 to rng-1
293
				print "              \"%s\\n\"" % (line)
296
				print("              \"%s\\n\"" % (line))
294
			else:
297
			else:
295
				print "              \"%s\"," % (line)
298
				print("              \"%s\"," % (line))
296
		print "              %s,%s,%s" % (minval, maxval, defval)
299
		print("              %s,%s,%s" % (minval, maxval, defval))
297
		print "             );"
300
		print("             );")
298
		if depends != '':
301
		if depends != '':
299
			print "  ci->addDependency(\"%s\");" % (depends)
302
			print("  ci->addDependency(\"%s\");" % (depends))
300
	elif type == 'list':
303
	elif type == 'list':
301
		print "  cl = cfg->addList("
304
		print("  cl = cfg->addList(")
302
		print "              \"%s\"," % (name)
305
		print("              \"%s\"," % (name))
303
		rng = len(docC)
306
		rng = len(docC)
304
		for i in range(rng):
307
		for i in range(rng):
305
			line = docC[i]
308
			line = docC[i]
306
			if i != rng - 1:  # since we go from 0 to rng-1
309
			if i != rng - 1:  # since we go from 0 to rng-1
307
				print "              \"%s\\n\"" % (line)
310
				print("              \"%s\\n\"" % (line))
308
			else:
311
			else:
309
				print "              \"%s\"" % (line)
312
				print("              \"%s\"" % (line))
310
		print "             );"
313
		print("             );")
311
		addValues("cl", node)
314
		addValues("cl", node)
312
		if depends != '':
315
		if depends != '':
313
			print "  cl->addDependency(\"%s\");" % (depends)
316
			print("  cl->addDependency(\"%s\");" % (depends))
314
		if format == 'file':
317
		if format == 'file':
315
			print "  cl->setWidgetType(ConfigList::File);"
318
			print("  cl->setWidgetType(ConfigList::File);")
316
		elif format == 'dir':
319
		elif format == 'dir':
317
			print "  cl->setWidgetType(ConfigList::Dir);"
320
			print("  cl->setWidgetType(ConfigList::Dir);")
318
		elif format == 'filedir':
321
		elif format == 'filedir':
319
			print "  cl->setWidgetType(ConfigList::FileAndDir);"
322
			print("  cl->setWidgetType(ConfigList::FileAndDir);")
320
	elif type == 'obsolete':
323
	elif type == 'obsolete':
321
		print "  cfg->addObsolete(\"%s\");" % (name)
324
		print("  cfg->addObsolete(\"%s\");" % (name))
322
	if len(setting) > 0:
325
	if len(setting) > 0:
323
		print "#else"
326
		print("#else")
324
		print "  cfg->addDisabled(\"%s\");" % (name)
327
		print("  cfg->addDisabled(\"%s\");" % (name))
325
		print "#endif"
328
		print("#endif")
326
329
327
330
328
def parseGroups(node):
331
def parseGroups(node):
329
	name = node.getAttribute('name')
332
	name = node.getAttribute('name')
330
	doc = node.getAttribute('docs')
333
	doc = node.getAttribute('docs')
331
	print "%s%s" % ("  //-----------------------------------------",
334
	print("%s%s" % ("  //-----------------------------------------",
332
					"----------------------------------")
335
					"----------------------------------"))
333
	print "  cfg->addInfo(\"%s\",\"%s\");" % (name, doc)
336
	print("  cfg->addInfo(\"%s\",\"%s\");" % (name, doc))
334
	print "%s%s" % ("  //-----------------------------------------",
337
	print("%s%s" % ("  //-----------------------------------------",
335
					"----------------------------------")
338
					"----------------------------------"))
336
	print
339
	print()
337
	for n in node.childNodes:
340
	for n in node.childNodes:
338
		if n.nodeType == Node.ELEMENT_NODE:
341
		if n.nodeType == Node.ELEMENT_NODE:
339
			parseOption(n)
342
			parseOption(n)
Lines 345-360 Link Here
345
			name = n.getAttribute('id')
348
			name = n.getAttribute('id')
346
			docC = prepCDocs(n);
349
			docC = prepCDocs(n);
347
			if type != 'obsolete':
350
			if type != 'obsolete':
348
				print "  doc->add("
351
				print("  doc->add(")
349
				print "              \"%s\"," % (name)
352
				print("              \"%s\"," % (name))
350
				rng = len(docC)
353
				rng = len(docC)
351
				for i in range(rng):
354
				for i in range(rng):
352
					line = docC[i]
355
					line = docC[i]
353
					if i != rng - 1:  # since we go from 0 to rng-1
356
					if i != rng - 1:  # since we go from 0 to rng-1
354
						print "              \"%s\\n\"" % (line)
357
						print("              \"%s\\n\"" % (line))
355
					else:
358
					else:
356
						print "              \"%s\"" % (line)
359
						print("              \"%s\"" % (line))
357
				print "          );"
360
				print("          );")
358
361
359
def parseOptionDoc(node, first):
362
def parseOptionDoc(node, first):
360
	# Handling part for documentation
363
	# Handling part for documentation
Lines 373-424 Link Here
373
					if n.nodeType == Node.ELEMENT_NODE:
376
					if n.nodeType == Node.ELEMENT_NODE:
374
						doc += parseDocs(n)
377
						doc += parseDocs(n)
375
		if (first):
378
		if (first):
376
			print " \\anchor cfg_%s" % (name.lower())
379
			print(" \\anchor cfg_%s" % (name.lower()))
377
			print "<dl>"
380
			print("<dl>")
378
			print ""
381
			print("")
379
			print "<dt>\\c %s <dd>" % (name)
382
			print("<dt>\\c %s <dd>" % (name))
380
		else:
383
		else:
381
			print " \\anchor cfg_%s" % (name.lower())
384
			print(" \\anchor cfg_%s" % (name.lower()))
382
			print "<dt>\\c %s <dd>" % (name)
385
			print("<dt>\\c %s <dd>" % (name))
383
		print " \\addindex %s" % (name)
386
		print(" \\addindex %s" % (name))
384
		print doc
387
		print(doc)
385
		if (type == 'enum'):
388
		if (type == 'enum'):
386
			values = collectValues(node)
389
			values = collectValues(node)
387
			print ""
390
			print("")
388
			print "Possible values are: "
391
			print("Possible values are: ")
389
			rng = len(values)
392
			rng = len(values)
390
			for i in range(rng):
393
			for i in range(rng):
391
				val = values[i]
394
				val = values[i]
392
				if i == rng - 2:
395
				if i == rng - 2:
393
					print "%s and " % (val)
396
					print("%s and " % (val))
394
				elif i == rng - 1:
397
				elif i == rng - 1:
395
					print "%s." % (val)
398
					print("%s." % (val))
396
				else:
399
				else:
397
					print "%s, " % (val)
400
					print("%s, " % (val))
398
			if (defval != ""):
401
			if (defval != ""):
399
				print ""
402
				print("")
400
				print ""
403
				print("")
401
				print "The default value is: <code>%s</code>." % (defval)
404
				print("The default value is: <code>%s</code>." % (defval))
402
			print ""
405
			print("")
403
		elif (type == 'int'):
406
		elif (type == 'int'):
404
			minval = node.getAttribute('minval')
407
			minval = node.getAttribute('minval')
405
			maxval = node.getAttribute('maxval')
408
			maxval = node.getAttribute('maxval')
406
			print ""
409
			print("")
407
			print ""
410
			print("")
408
			print "%s: %s%s%s, %s: %s%s%s, %s: %s%s%s." % (
411
			print("%s: %s%s%s, %s: %s%s%s, %s: %s%s%s." % (
409
					 " Minimum value", "<code>", minval, "</code>", 
412
					 " Minimum value", "<code>", minval, "</code>", 
410
					 "maximum value", "<code>", maxval, "</code>",
413
					 "maximum value", "<code>", maxval, "</code>",
411
					 "default value", "<code>", defval, "</code>")
414
					 "default value", "<code>", defval, "</code>"))
412
			print ""
415
			print("")
413
		elif (type == 'bool'):
416
		elif (type == 'bool'):
414
			print ""
417
			print("")
415
			print ""
418
			print("")
416
			if (node.hasAttribute('altdefval')):
419
			if (node.hasAttribute('altdefval')):
417
				print "The default value is: system dependent."
420
				print("The default value is: system dependent.")
418
			else:
421
			else:
419
				print "The default value is: <code>%s</code>." % (
422
				print("The default value is: <code>%s</code>." % (
420
					"YES" if (defval == "1") else "NO")
423
					"YES" if (defval == "1") else "NO"))
421
			print ""
424
			print("")
422
		elif (type == 'list'):
425
		elif (type == 'list'):
423
			if format == 'string':
426
			if format == 'string':
424
				values = collectValues(node)
427
				values = collectValues(node)
Lines 426-487 Link Here
426
				for i in range(rng):
429
				for i in range(rng):
427
					val = values[i]
430
					val = values[i]
428
					if i == rng - 2:
431
					if i == rng - 2:
429
						print "%s and " % (val)
432
						print("%s and " % (val))
430
					elif i == rng - 1:
433
					elif i == rng - 1:
431
						print "%s." % (val)
434
						print("%s." % (val))
432
					else:
435
					else:
433
						print "%s, " % (val)
436
						print("%s, " % (val))
434
			print ""
437
			print("")
435
		elif (type == 'string'):
438
		elif (type == 'string'):
436
			if format == 'dir':
439
			if format == 'dir':
437
				if defval != '':
440
				if defval != '':
438
					print ""
441
					print("")
439
					print "The default directory is: <code>%s</code>." % (
442
					print("The default directory is: <code>%s</code>." % (
440
						defval)
443
						defval))
441
			elif format == 'file':
444
			elif format == 'file':
442
				abspath = node.getAttribute('abspath')
445
				abspath = node.getAttribute('abspath')
443
				if defval != '':
446
				if defval != '':
444
					print ""
447
					print("")
445
					if abspath != '1':
448
					if abspath != '1':
446
						print "The default file is: <code>%s</code>." % (
449
						print("The default file is: <code>%s</code>." % (
447
							defval)
450
							defval))
448
					else:
451
					else:
449
						print "%s: %s%s%s." % (
452
						print("%s: %s%s%s." % (
450
							"The default file (with absolute path) is",
453
							"The default file (with absolute path) is",
451
							"<code>",defval,"</code>")
454
							"<code>",defval,"</code>"))
452
				else:
455
				else:
453
					if abspath == '1':
456
					if abspath == '1':
454
						print ""
457
						print("")
455
						print "The file has to be specified with full path."
458
						print("The file has to be specified with full path.")
456
			else: # format == 'string':
459
			else: # format == 'string':
457
				if defval != '':
460
				if defval != '':
458
					print ""
461
					print("")
459
					print "The default value is: <code>%s</code>." % (
462
					print("The default value is: <code>%s</code>." % (
460
						defval)
463
						defval))
461
			print ""
464
			print("")
462
		# depends handling
465
		# depends handling
463
		if (node.hasAttribute('depends')):
466
		if (node.hasAttribute('depends')):
464
			depends = node.getAttribute('depends')
467
			depends = node.getAttribute('depends')
465
			print ""
468
			print("")
466
			print "%s \\ref cfg_%s \"%s\" is set to \\c YES." % (
469
			print("%s \\ref cfg_%s \"%s\" is set to \\c YES." % (
467
				"This tag requires that the tag", depends.lower(), depends.upper())
470
				"This tag requires that the tag", depends.lower(), depends.upper()))
468
		return False
471
		return False
469
472
470
473
471
def parseGroupsDoc(node):
474
def parseGroupsDoc(node):
472
	name = node.getAttribute('name')
475
	name = node.getAttribute('name')
473
	doc = node.getAttribute('docs')
476
	doc = node.getAttribute('docs')
474
	print "\section config_%s %s" % (name.lower(), doc)
477
	print("\section config_%s %s" % (name.lower(), doc))
475
	# Start of list has been moved to the first option for better
478
	# Start of list has been moved to the first option for better
476
	# anchor placement
479
	# anchor placement
477
	#  print "<dl>"
480
	#  print("<dl>")
478
	#  print ""
481
	#  print("")
479
	first = True
482
	first = True
480
	for n in node.childNodes:
483
	for n in node.childNodes:
481
		if n.nodeType == Node.ELEMENT_NODE:
484
		if n.nodeType == Node.ELEMENT_NODE:
482
			first = parseOptionDoc(n, first)
485
			first = parseOptionDoc(n, first)
483
	if (not first):
486
	if (not first):
484
		print "</dl>"
487
		print("</dl>")
485
488
486
489
487
def parseGroupsList(node, commandsList):
490
def parseGroupsList(node, commandsList):
Lines 512-518 Link Here
512
			if (n.nodeName == "docs"):
515
			if (n.nodeName == "docs"):
513
				if (n.getAttribute('documentation') != "0"):
516
				if (n.getAttribute('documentation') != "0"):
514
					doc += parseDocs(n)
517
					doc += parseDocs(n)
515
	print doc
518
	print(doc)
516
519
517
520
518
def parseFooterDoc(node):
521
def parseFooterDoc(node):
Lines 522-528 Link Here
522
			if (n.nodeName == "docs"):
525
			if (n.nodeName == "docs"):
523
				if (n.getAttribute('documentation') != "0"):
526
				if (n.getAttribute('documentation') != "0"):
524
					doc += parseDocs(n)
527
					doc += parseDocs(n)
525
	print doc
528
	print(doc)
526
529
527
530
528
def main():
531
def main():
Lines 531-546 Link Here
531
	try:
534
	try:
532
		doc = xml.dom.minidom.parse(sys.argv[2])
535
		doc = xml.dom.minidom.parse(sys.argv[2])
533
	except Exception as inst:
536
	except Exception as inst:
534
		print >> sys.stderr
537
		print("\n%s\n" % inst, file=sys.stderr)
535
		print >> sys.stderr, inst
536
		print >> sys.stderr
537
		sys.exit(1)
538
		sys.exit(1)
538
	elem = doc.documentElement
539
	elem = doc.documentElement
539
	if (sys.argv[1] == "-doc"):
540
	if (sys.argv[1] == "-doc"):
540
		print "/* WARNING: This file is generated!"
541
		print("/* WARNING: This file is generated!")
541
		print " * Do not edit this file, but edit config.xml instead and run"
542
		print(" * Do not edit this file, but edit config.xml instead and run")
542
		print " * python configgen.py -doc config.xml to regenerate this file!"
543
		print(" * python configgen.py -doc config.xml to regenerate this file!")
543
		print " */"
544
		print(" */")
544
		# process header
545
		# process header
545
		for n in elem.childNodes:
546
		for n in elem.childNodes:
546
			if n.nodeType == Node.ELEMENT_NODE:
547
			if n.nodeType == Node.ELEMENT_NODE:
Lines 552-561 Link Here
552
			if n.nodeType == Node.ELEMENT_NODE:
553
			if n.nodeType == Node.ELEMENT_NODE:
553
				if (n.nodeName == "group"):
554
				if (n.nodeName == "group"):
554
					commandsList = parseGroupsList(n, commandsList)
555
					commandsList = parseGroupsList(n, commandsList)
555
		print "\\secreflist"
556
		print("\\secreflist")
556
		for x in sorted(commandsList):
557
		for x in sorted(commandsList):
557
			print "\\refitem cfg_%s %s" % (x.lower(), x)
558
			print("\\refitem cfg_%s %s" % (x.lower(), x))
558
		print "\\endsecreflist"
559
		print("\\endsecreflist")
559
		# process groups and options
560
		# process groups and options
560
		for n in elem.childNodes:
561
		for n in elem.childNodes:
561
			if n.nodeType == Node.ELEMENT_NODE:
562
			if n.nodeType == Node.ELEMENT_NODE:
Lines 567-590 Link Here
567
				if (n.nodeName == "footer"):
568
				if (n.nodeName == "footer"):
568
					parseFooterDoc(n)
569
					parseFooterDoc(n)
569
	elif (sys.argv[1] == "-cpp"):
570
	elif (sys.argv[1] == "-cpp"):
570
		print "/* WARNING: This file is generated!"
571
		print("/* WARNING: This file is generated!")
571
		print " * Do not edit this file, but edit config.xml instead and run"
572
		print(" * Do not edit this file, but edit config.xml instead and run")
572
		print " * python configgen.py -cpp config.xml to regenerate this file!"
573
		print(" * python configgen.py -cpp config.xml to regenerate this file!")
573
		print " */"
574
		print(" */")
574
		print ""
575
		print("")
575
		print "#include \"configoptions.h\""
576
		print("#include \"configoptions.h\"")
576
		print "#include \"config.h\""
577
		print("#include \"config.h\"")
577
		print "#include \"portable.h\""
578
		print("#include \"portable.h\"")
578
		print "#include \"settings.h\""
579
		print("#include \"settings.h\"")
579
		print ""
580
		print("")
580
		print "void addConfigOptions(Config *cfg)"
581
		print("void addConfigOptions(Config *cfg)")
581
		print "{"
582
		print("{")
582
		print "  ConfigString *cs;"
583
		print("  ConfigString *cs;")
583
		print "  ConfigEnum   *ce;"
584
		print("  ConfigEnum   *ce;")
584
		print "  ConfigList   *cl;"
585
		print("  ConfigList   *cl;")
585
		print "  ConfigInt    *ci;"
586
		print("  ConfigInt    *ci;")
586
		print "  ConfigBool   *cb;"
587
		print("  ConfigBool   *cb;")
587
		print ""
588
		print("")
588
		# process header
589
		# process header
589
		for n in elem.childNodes:
590
		for n in elem.childNodes:
590
			if n.nodeType == Node.ELEMENT_NODE:
591
			if n.nodeType == Node.ELEMENT_NODE:
Lines 594-610 Link Here
594
			if n.nodeType == Node.ELEMENT_NODE:
595
			if n.nodeType == Node.ELEMENT_NODE:
595
				if (n.nodeName == "group"):
596
				if (n.nodeName == "group"):
596
					parseGroups(n)
597
					parseGroups(n)
597
		print "}"
598
		print("}")
598
	elif (sys.argv[1] == "-wiz"):
599
	elif (sys.argv[1] == "-wiz"):
599
		print "/* WARNING: This file is generated!"
600
		print("/* WARNING: This file is generated!")
600
		print " * Do not edit this file, but edit config.xml instead and run"
601
		print(" * Do not edit this file, but edit config.xml instead and run")
601
		print " * python configgen.py -wiz config.xml to regenerate this file!"
602
		print(" * python configgen.py -wiz config.xml to regenerate this file!")
602
		print " */"
603
		print(" */")
603
		print "#include \"configdoc.h\""
604
		print("#include \"configdoc.h\"")
604
		print "#include \"docintf.h\""
605
		print("#include \"docintf.h\"")
605
		print ""
606
		print("")
606
		print "void addConfigDocs(DocIntf *doc)"
607
		print("void addConfigDocs(DocIntf *doc)")
607
		print "{"
608
		print("{")
608
		for n in elem.childNodes:
609
		for n in elem.childNodes:
609
			if n.nodeType == Node.ELEMENT_NODE:
610
			if n.nodeType == Node.ELEMENT_NODE:
610
				if (n.nodeName == "header"):
611
				if (n.nodeName == "header"):
Lines 613-619 Link Here
613
			if n.nodeType == Node.ELEMENT_NODE:
614
			if n.nodeType == Node.ELEMENT_NODE:
614
				if (n.nodeName == "group"):
615
				if (n.nodeName == "group"):
615
					parseGroupCDocs(n)
616
					parseGroupCDocs(n)
616
		print "}"
617
		print("}")
617
618
618
if __name__ == '__main__':
619
if __name__ == '__main__':
619
	main()
620
	main()
(-)doxygen-1.8.6.org/src/lang_cfg.py (-3 / +3 lines)
Lines 2-8 Link Here
2
2
3
if (len(sys.argv) > 0):
3
if (len(sys.argv) > 0):
4
    if (sys.argv[1] == "ENONLY"):
4
    if (sys.argv[1] == "ENONLY"):
5
        print "#define ENGLISH_ONLY"
5
        print("#define ENGLISH_ONLY")
6
    else:
6
    else:
7
        for x in xrange(1, len(sys.argv)):
7
        for x in range(1, len(sys.argv)):
8
            print "#define LANG_%s"%(sys.argv[x])
8
            print("#define LANG_%s"%(sys.argv[x]))
(-)doxygen-1.8.6.org/src/languages.py (-6 / +6 lines)
Lines 15-21 Link Here
15
# generating file is lang_cfg.py
15
# generating file is lang_cfg.py
16
# the rules file has to output lang_cfg.h
16
# the rules file has to output lang_cfg.h
17
#
17
#
18
print """\
18
print("""\
19
<?xml version="1.0" encoding="utf-8"?>
19
<?xml version="1.0" encoding="utf-8"?>
20
<VisualStudioToolFile
20
<VisualStudioToolFile
21
        Name="languages"
21
        Name="languages"
Lines 52-58 Link Here
52
                                               />
52
                                               />
53
                                       </Values>
53
                                       </Values>
54
                               </EnumProperty>
54
                               </EnumProperty>
55
"""
55
""")
56
#
56
#
57
# generate loop, English is mandatory (so cannot be chosen)
57
# generate loop, English is mandatory (so cannot be chosen)
58
#
58
#
Lines 76-82 Link Here
76
        l1 = l.replace("-","")
76
        l1 = l.replace("-","")
77
        # capatalize first letter
77
        # capatalize first letter
78
        l = l.title()
78
        l = l.title()
79
        print """\
79
        print("""\
80
                                   <EnumProperty
80
                                   <EnumProperty
81
                                           Name="%s"
81
                                           Name="%s"
82
                                           DisplayName="Use %s"
82
                                           DisplayName="Use %s"
Lines 96-106 Link Here
96
                                                   />
96
                                                   />
97
                                           </Values>
97
                                           </Values>
98
                                   </EnumProperty>
98
                                   </EnumProperty>
99
        """ % (l1, l, l, l, f[1], l)
99
        """ % (l1, l, l, l, f[1], l))
100
100
101
print """\
101
print("""\
102
                        </Properties>
102
                        </Properties>
103
                </CustomBuildRule>
103
                </CustomBuildRule>
104
        </Rules>
104
        </Rules>
105
</VisualStudioToolFile>
105
</VisualStudioToolFile>
106
"""
106
""")

Return to bug 499532