Browse Source

hxtool: emit Texinfo headings as @subsection

Remove the colon, and add it in qemu-options-wrapper.h instead.
The introduction of @subsection also found a case where the table
was not closed and reopened around a heading, so fix it.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo Bonzini 8 years ago
parent
commit
43f187a50c
3 changed files with 29 additions and 15 deletions
  1. 1 1
      qemu-options-wrapper.h
  2. 19 12
      qemu-options.hx
  3. 9 2
      scripts/hxtool

+ 1 - 1
qemu-options-wrapper.h

@@ -14,7 +14,7 @@
 
 
 #define ARCHHEADING(text, arch_mask) \
 #define ARCHHEADING(text, arch_mask) \
     if ((arch_mask) & arch_type)    \
     if ((arch_mask) & arch_type)    \
-        puts(stringify(text));
+        puts(stringify(text) ":");
 
 
 #define DEFHEADING(text) ARCHHEADING(text, QEMU_ARCH_ALL)
 #define DEFHEADING(text) ARCHHEADING(text, QEMU_ARCH_ALL)
 
 

+ 19 - 12
qemu-options.hx

@@ -6,7 +6,7 @@ HXCOMM construct option structures, enums and help message for specified
 HXCOMM architectures.
 HXCOMM architectures.
 HXCOMM HXCOMM can be used for comments, discarded from both texi and C
 HXCOMM HXCOMM can be used for comments, discarded from both texi and C
 
 
-DEFHEADING(Standard options:)
+DEFHEADING(Standard options)
 STEXI
 STEXI
 @table @option
 @table @option
 ETEXI
 ETEXI
@@ -468,7 +468,7 @@ STEXI
 ETEXI
 ETEXI
 DEFHEADING()
 DEFHEADING()
 
 
-DEFHEADING(Block device options:)
+DEFHEADING(Block device options)
 STEXI
 STEXI
 @table @option
 @table @option
 ETEXI
 ETEXI
@@ -856,7 +856,7 @@ STEXI
 ETEXI
 ETEXI
 DEFHEADING()
 DEFHEADING()
 
 
-DEFHEADING(USB options:)
+DEFHEADING(USB options)
 STEXI
 STEXI
 @table @option
 @table @option
 ETEXI
 ETEXI
@@ -920,7 +920,7 @@ STEXI
 ETEXI
 ETEXI
 DEFHEADING()
 DEFHEADING()
 
 
-DEFHEADING(Display options:)
+DEFHEADING(Display options)
 STEXI
 STEXI
 @table @option
 @table @option
 ETEXI
 ETEXI
@@ -1449,7 +1449,7 @@ STEXI
 ETEXI
 ETEXI
 ARCHHEADING(, QEMU_ARCH_I386)
 ARCHHEADING(, QEMU_ARCH_I386)
 
 
-ARCHHEADING(i386 target only:, QEMU_ARCH_I386)
+ARCHHEADING(i386 target only, QEMU_ARCH_I386)
 STEXI
 STEXI
 @table @option
 @table @option
 ETEXI
 ETEXI
@@ -1565,7 +1565,7 @@ STEXI
 ETEXI
 ETEXI
 DEFHEADING()
 DEFHEADING()
 
 
-DEFHEADING(Network options:)
+DEFHEADING(Network options)
 STEXI
 STEXI
 @table @option
 @table @option
 ETEXI
 ETEXI
@@ -2146,7 +2146,7 @@ STEXI
 ETEXI
 ETEXI
 DEFHEADING()
 DEFHEADING()
 
 
-DEFHEADING(Character device options:)
+DEFHEADING(Character device options)
 STEXI
 STEXI
 
 
 The general form of a character device option is:
 The general form of a character device option is:
@@ -2481,7 +2481,7 @@ STEXI
 ETEXI
 ETEXI
 DEFHEADING()
 DEFHEADING()
 
 
-DEFHEADING(Device URL Syntax:)
+DEFHEADING(Device URL Syntax)
 STEXI
 STEXI
 
 
 In addition to using normal file images for the emulated storage devices,
 In addition to using normal file images for the emulated storage devices,
@@ -2711,7 +2711,7 @@ STEXI
 @end table
 @end table
 ETEXI
 ETEXI
 
 
-DEFHEADING(Bluetooth(R) options:)
+DEFHEADING(Bluetooth(R) options)
 STEXI
 STEXI
 @table @option
 @table @option
 ETEXI
 ETEXI
@@ -2787,7 +2787,7 @@ ETEXI
 DEFHEADING()
 DEFHEADING()
 
 
 #ifdef CONFIG_TPM
 #ifdef CONFIG_TPM
-DEFHEADING(TPM device options:)
+DEFHEADING(TPM device options)
 
 
 DEF("tpmdev", HAS_ARG, QEMU_OPTION_tpmdev, \
 DEF("tpmdev", HAS_ARG, QEMU_OPTION_tpmdev, \
     "-tpmdev passthrough,id=id[,path=path][,cancel-path=path]\n"
     "-tpmdev passthrough,id=id[,path=path][,cancel-path=path]\n"
@@ -2861,7 +2861,7 @@ DEFHEADING()
 
 
 #endif
 #endif
 
 
-DEFHEADING(Linux/Multiboot boot specific:)
+DEFHEADING(Linux/Multiboot boot specific)
 STEXI
 STEXI
 
 
 When using these options, you can use a given Linux or Multiboot
 When using these options, you can use a given Linux or Multiboot
@@ -2917,7 +2917,7 @@ STEXI
 ETEXI
 ETEXI
 DEFHEADING()
 DEFHEADING()
 
 
-DEFHEADING(Debug/Expert options:)
+DEFHEADING(Debug/Expert options)
 STEXI
 STEXI
 @table @option
 @table @option
 ETEXI
 ETEXI
@@ -3775,7 +3775,14 @@ Dump json-encoded vmstate information for current machine type to file
 in @var{file}
 in @var{file}
 ETEXI
 ETEXI
 
 
+STEXI
+@end table
+ETEXI
+DEFHEADING()
 DEFHEADING(Generic object creation)
 DEFHEADING(Generic object creation)
+STEXI
+@table @option
+ETEXI
 
 
 DEF("object", HAS_ARG, QEMU_OPTION_object,
 DEF("object", HAS_ARG, QEMU_OPTION_object,
     "-object TYPENAME[,PROP1=VALUE1,...]\n"
     "-object TYPENAME[,PROP1=VALUE1,...]\n"

+ 9 - 2
scripts/hxtool

@@ -16,6 +16,13 @@ hxtoh()
     done
     done
 }
 }
 
 
+print_texi_heading()
+{
+    if test "$*" != ""; then
+        printf "@subsection %s\n" "$*"
+    fi
+}
+
 hxtotexi()
 hxtotexi()
 {
 {
     flag=0
     flag=0
@@ -45,10 +52,10 @@ hxtotexi()
             fi
             fi
             ;;
             ;;
             DEFHEADING*)
             DEFHEADING*)
-            printf '%s\n' "$(expr "$str" : "DEFHEADING(\(.*\))")"
+            print_texi_heading "$(expr "$str" : "DEFHEADING(\(.*\))")"
             ;;
             ;;
             ARCHHEADING*)
             ARCHHEADING*)
-            printf '%s\n' "$(expr "$str" : "ARCHHEADING(\(.*\),.*)")"
+            print_texi_heading "$(expr "$str" : "ARCHHEADING(\(.*\),.*)")"
             ;;
             ;;
             *)
             *)
             test $flag -eq 1 && printf '%s\n' "$str"
             test $flag -eq 1 && printf '%s\n' "$str"