376 name = node.getAttribute(
'id')
377 type = node.getAttribute(
'type')
378 format = node.getAttribute(
'format')
379 defval = node.getAttribute(
'defval')
380 adefval = node.getAttribute(
'altdefval')
381 depends = node.getAttribute(
'depends')
382 setting = node.getAttribute(
'setting')
384 if (type !=
'obsolete'):
385 for n
in node.childNodes:
386 if (n.nodeName ==
"docs"):
387 if (n.getAttribute(
'documentation') !=
"0"):
388 if n.nodeType == Node.ELEMENT_NODE:
391 print(
" \\anchor cfg_%s" % (name.lower()))
394 print(
"<dt>\\c %s <dd>" % (name))
396 print(
" \\anchor cfg_%s" % (name.lower()))
397 print(
"<dt>\\c %s <dd>" % (name))
398 print(
" \\addindex %s" % (name))
403 print(
"Possible values are: ")
408 print(
"%s and " % (val))
412 print(
"%s, " % (val))
416 print(
"The default value is: <code>%s</code>." % (defval))
418 elif (type ==
'int'):
419 minval = node.getAttribute(
'minval')
420 maxval = node.getAttribute(
'maxval')
423 print(
"%s: %s%s%s, %s: %s%s%s, %s: %s%s%s." % (
424 " Minimum value",
"<code>", minval,
"</code>",
425 "maximum value",
"<code>", maxval,
"</code>",
426 "default value",
"<code>", defval,
"</code>"))
428 elif (type ==
'bool'):
431 if (node.hasAttribute(
'altdefval')):
432 print(
"The default value is: system dependent.")
434 print(
"The default value is: <code>%s</code>." % (
435 "YES" if (defval ==
"1")
else "NO"))
437 elif (type ==
'list'):
438 if format ==
'string':
444 print(
"%s and " % (val))
448 print(
"%s, " % (val))
450 elif (type ==
'string'):
454 print(
"The default directory is: <code>%s</code>." % (
456 elif format ==
'file':
457 abspath = node.getAttribute(
'abspath')
461 print(
"The default file is: <code>%s</code>." % (
464 print(
"%s: %s%s%s." % (
465 "The default file (with absolute path) is",
466 "<code>",defval,
"</code>"))
470 print(
"The file has to be specified with full path.")
471 elif format ==
'image':
472 abspath = node.getAttribute(
'abspath')
476 print(
"The default image is: <code>%s</code>." % (
479 print(
"%s: %s%s%s." % (
480 "The default image (with absolute path) is",
481 "<code>",defval,
"</code>"))
485 print(
"The image has to be specified with full path.")
489 print(
"The default value is: <code>%s</code>." % (
493 if (node.hasAttribute(
'depends')):
494 depends = node.getAttribute(
'depends')
496 print(
"%s \\ref cfg_%s \"%s\" is set to \\c YES." % (
497 "This tag requires that the tag", depends.lower(), depends.upper()))
def parseOptionDoc(node, first)