diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2017-04-04 01:39:56 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2017-04-04 02:42:26 +0000 |
commit | a12c6a014b43040b684f65d5879fa003b2131736 (patch) | |
tree | 2ed039e8dafc4479f07350ac1d2d5a73b676bf91 /mpers.awk | |
parent | c446d22fc64c06fdd595b80c834bee9c350a9a0e (diff) | |
download | strace-a12c6a014b43040b684f65d5879fa003b2131736.tar.gz |
mpers.awk: prepare for adding support of multidimensional arrays
* mpers.awk (what_is) <case "structure_type", case "union_type">:
Move formatting of array upper_bound ...
<case "array_type">: ... here.
Diffstat (limited to 'mpers.awk')
-rw-r--r-- | mpers.awk | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -104,7 +104,7 @@ function what_is(what_idx, type_idx, special, item, \ if ("" == to_return) to_return = 0 returned_size = to_return * returned_size - return leave(what_idx, to_return) + return leave(what_idx, "[" to_return "]") break case "structure_type": print "struct {" @@ -125,11 +125,7 @@ function what_is(what_idx, type_idx, special, item, \ prev_location = location returned = what_is(item) prev_returned_size = returned_size - printf("%s", array[item]["name"]) - if ("" != returned) { - printf("[%s]", returned) - } - print ";" + printf("%s%s;\n", array[item]["name"], returned) } } returned_size = array_get(what_idx, "byte_size") @@ -146,11 +142,7 @@ function what_is(what_idx, type_idx, special, item, \ if ("parent" in array[item] && \ array_get(item, "parent") == what_idx) { returned = what_is(item) - printf("%s", array[item]["name"]) - if ("" != returned) { - printf("[%s]", returned) - } - print ";" + printf("%s%s;\n", array[item]["name"], returned) } } printf("} ") |