Make the standard create_file request handle serial ports too, and
[wine.git] / dlls / dxerr9 / errors.awk
blobf983367df06d6d38ed3fe968335d364561781813
1 BEGIN {
2 print "/* Machine generated. Do not edit. */"
3 print ""
4 lines = 0
6 {
7 split($0, array, FS)
9 if (NF > 0 && length(array[1]) > 0) {
10 lines++
12 # save the first word is the names array
13 names[lines] = array[1]
15 # create the WCHAR version of the name
16 printf "static const WCHAR name%dW[] = { ", lines
17 i = 1
18 len = length(array[1]) + 1
19 while (i < len) {
20 printf "'%s',", substr(array[1],i,1)
21 i++
23 print "0 };"
25 # create the CHAR version of the description
26 printf "static const CHAR description%dA[] = \"", lines
27 word = 2
28 while (word < (NF + 1)) {
29 printf "%s", array[word]
30 if (word < NF )
31 printf " "
32 word++
34 print "\";"
36 # create the WCHAR version of the description
37 printf "static const WCHAR description%dW[] = { ", lines
38 word = 2
39 while (word < (NF + 1)) {
40 i = 1
41 len = length(array[word]) + 1
42 while (i < len) {
43 printf "'%s',", substr(array[word],i,1)
44 i++
46 if (word < NF )
47 printf "' ',"
48 word++
50 print "0 };"
53 END {
54 print ""
55 print "static const error_info info[] = {"
57 i = 1
58 while ( i <= lines) {
59 printf " { %s, \"%s\", name%dW, description%dA, description%dW },\n",
60 names[i], names[i], i, i,i
61 i++
64 print "};"