ofp-print: Avoid double space before "actions" for catch-all flows.
[openvswitch] / ovsdb / ovsdb-doc.in
index 3c825d2a494c3db49e2f1ab09966061a6ecbf09e..17eca52e76b07a3084d31c1c9d169f6c6bd9d737 100755 (executable)
@@ -52,6 +52,8 @@ def inlineXmlToNroff(node, font):
             s = r'\fB'
             if node.hasAttribute('column'):
                 s += node.attributes['column'].nodeValue
+                if node.hasAttribute('key'):
+                    s += ':' + node.attributes['key'].nodeValue
             elif node.hasAttribute('table'):
                 s += node.attributes['table'].nodeValue
             elif node.hasAttribute('group'):
@@ -86,7 +88,7 @@ def blockXmlToNroff(nodes, para='.PP'):
                         and liNode.tagName == 'li'):
                         i += 1
                         if node.tagName == 'ul':
-                            s += ".IP \\bu\n"
+                            s += ".IP \\(bu\n"
                         else:
                             s += ".IP %d. .25in\n" % i
                         s += blockXmlToNroff(liNode.childNodes, ".IP")
@@ -136,6 +138,8 @@ def typeAndConstraintsToNroff(column):
     constraints = column.type.constraintsToEnglish(escapeNroffLiteral)
     if constraints:
         type += ", " + constraints
+    if column.unique:
+        type += " (must be unique within table)"
     return type
 
 def columnToNroff(columnName, column, node):
@@ -237,7 +241,8 @@ def docsToNroff(schemaFile, xmlFile, erFile, title=None):
 .de TQ
 .  br
 .  ns
-.  TP "\\$1"
+.  TP
+\\$1
 ..
 .de ST
 .  PP
@@ -286,6 +291,7 @@ Table       Purpose
 
     if erFile:
         s += """
+.if !'\*[.T]'ascii' \{
 .sp 1
 .SH "TABLE RELATIONSHIPS"
 .PP
@@ -303,7 +309,7 @@ represent strong references; thin lines represent weak references.
         for line in erStream:
             s += line + '\n'
         erStream.close()
-        s += ".RE\n"
+        s += ".RE\\}\n"
 
     for node in tableNodes:
         s += tableToNroff(schema, node) + "\n"