Changeset 79360 in vbox for trunk/src/VBox/Main/glue
- Timestamp:
- Jun 26, 2019 1:49:48 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131592
- Location:
- trunk/src/VBox/Main/glue
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/glue/constants-python.xsl
r60463 r79360 25 25 encoding="utf-8" 26 26 indent="no"/> 27 28 <xsl:param name="g_sErrHFile"/> 27 29 28 30 <xsl:template match="/"> … … 69 71 self.__fIsSym = fIsSym 70 72 71 __dValues = {</xsl:text> 73 # iprt/err.h + VBox/err.h constants: 74 __dVBoxStatuses = {</xsl:text> 75 <xsl:value-of select="document($g_sErrHFile)"/> 72 76 77 <xsl:text disable-output-escaping="yes"><![CDATA[ 78 } 79 80 __dValues = {]]></xsl:text> 73 81 <xsl:for-each select="//enum"> 74 82 <xsl:text> … … 83 91 },</xsl:text> 84 92 </xsl:for-each> 85 <!-- hack alert: force new output element to avoid large reallocations.-->93 <!-- VBox status codes: --> 86 94 <xsl:text disable-output-escaping="yes"><![CDATA[ 95 # iprt/err.h + VBox/err.h constants: 96 'VBoxStatus': __dVBoxStatuses, 87 97 } 88 98 … … 104 114 } 105 115 106 __dValuesFlat = {]]></xsl:text>116 __dValuesFlat = dict({]]></xsl:text> 107 117 <xsl:for-each select="//enum"> 108 118 <xsl:variable name="ename"> … … 124 134 <xsl:value-of select="@value"/><xsl:text>,</xsl:text> 125 135 </xsl:for-each> 136 126 137 <!-- hack alert: force new output element to avoid large reallocations. --> 127 138 <xsl:text> 128 } 139 }, **__dVBoxStatuses) 129 140 130 141 __dValuesFlatSym = {</xsl:text> -
trunk/src/VBox/Main/glue/vbox-err-consts.sed
r79338 r79360 1 1 # $Id$ 2 2 ## @file 3 # IPRT - SED script for converting */err.h .3 # IPRT - SED script for converting */err.h to a python dictionary. 4 4 # 5 5 … … 25 25 # 26 26 27 # Header and footer text: 28 1i <text> 29 $a </text> 30 27 31 # Handle text inside the markers. 28 32 /SED-START/,/SED-END/{ … … 31 35 /^[[:space:]]*#[[:space:]]*define/b defines 32 36 33 # if (/**) goto description34 /\/\*\*/b description35 36 37 } 37 38 38 39 # Everything else is deleted! 40 :delete 39 41 d 40 42 b end … … 44 46 # Convert the defines 45 47 :defines 46 s/^[[:space:]]*#[[:space:]]*define[[:space:]]*\([[:alnum:]_]*\)[[:space:]]*\(.*\)[[:space:]]*$/ "\1",\n \1 }, /47 b end48 48 49 ## 50 # Convert descriptive comments. /** desc */ 51 :description 49 /^[[:space:]]*#[[:space:]]*define[[:space:]]*\([[:alnum:]_]*\)[[:space:](]*\([-+]*[[:space:]]*[[:digit:]][[:digit:]]*\)[[:space:])]*$/b define_okay 50 b delete 51 :define_okay 52 s/^[[:space:]]*#[[:space:]]*define[[:space:]]*\([[:alnum:]_]*\)[[:space:](]*\([-+]*[[:space:]]*[[:digit:]][[:digit:]]*\)[[:space:])]*$/ '\1': \2,/ 52 53 53 # Read all the lines belonging to the comment into the buffer.54 :look-for-end-of-comment55 /\*\//bend-of-comment56 N57 blook-for-end-of-comment58 :end-of-comment59 60 # anything with @{ and @} is skipped61 /@[\{\}]/d62 63 # Fix double spaces64 s/[[:space:]][[:space:]]/ /g65 66 # Fix \# sequences (doxygen needs them, we don't).67 s/\\#/#/g68 69 # insert punctuation.70 s/\([^.[:space:]]\)[[:space:]]*\*\//\1. \*\//71 72 # convert /** short. more73 s/[[:space:]]*\/\*\*[[:space:]]*/ { NULL, \"/74 s/ { NULL, \"\([^.!?"]*[.!?][.!?]*\)/ { \"\1\",\n \"\1/75 76 # terminate the string77 s/[[:space:]]*\*\//\"\,/78 79 # translate empty lines into new-lines (only one, please).80 s/[[:space:]]*[[:space:]]\*[[:space:]][[:space:]]*\*[[:space:]][[:space:]]*/\\n/g81 82 # remove asterics.83 s/[[:space:]]*[[:space:]]\*[[:space:]][[:space:]]*/ /g84 54 b end 85 55
Note:
See TracChangeset
for help on using the changeset viewer.