diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-10-31 10:36:24 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-10-31 10:36:24 +0200 |
commit | 1b25f0b6d89141c7df193d3d711ae41b75af075b (patch) | |
tree | 3cfa73c7ff5bfdc66943928832c2dab735c0e9dc /gen-stubs.bash | |
parent | a879880395be1f7a46724c3aafa0f450ec5a4e81 (diff) |
missing stubs
Diffstat (limited to 'gen-stubs.bash')
-rw-r--r-- | gen-stubs.bash | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gen-stubs.bash b/gen-stubs.bash index 0b9886b..be745ef 100644 --- a/gen-stubs.bash +++ b/gen-stubs.bash @@ -7,12 +7,12 @@ filter_classifiers() ret_type_for() { - filter_classifiers <<<"$1" | sed 's/^const[\t ]*//' | grep -Eo '^(struct|unsigned)? *[a-zA-Z_]+[\t \*]*' + filter_classifiers <<<"$1" | sed 's/^const[\t ]*//' | grep -Eo '^(struct|unsigned)? *[a-zA-Z0-9_]+[\t \*]*' } fun_name_for() { - filter_classifiers <<<"$1" | sed 's/struct//;s/const//;s/unsigned//;s/^[\t ]*//;s/[a-zA-Z_]\+[\t \*]*//' | grep -Eo '^[a-zA-Z_]+' + filter_classifiers <<<"$1" | sed 's/struct//;s/const//;s/unsigned//;s/^[\t ]*//;s/[a-zA-Z0-9_]\+[\t \*]*//' | grep -Eo '^[a-zA-Z0-9_]+' } should_error() @@ -38,7 +38,9 @@ return_for() snd_pcm_sync_id_t|snd_htimestamp_t) printf 'return (%s){0};' "$ret" ;; - 'unsigned char'|int|'unsigned int'|long|'unsigned long'|size_t|ssize_t|pid_t|snd_*) + uint8_t|uint16_t|uint32_t|uint64_t|\ + 'unsigned char'|int|'unsigned int'|long|'unsigned long'|\ + size_t|ssize_t|pid_t|snd_*) if should_error "$2"; then printf 'return -1;' else @@ -65,7 +67,7 @@ EOF match() { - blacklist | grep -Eh '^(static|__inline__|const|struct|unsigned| )*[a-zA-Z_]+[\t \*]*[a-zA-Z_]+\(.*\);' + blacklist | grep -Eh '^(static|__inline__|const|struct|unsigned| )*[a-zA-Z0-9_]+[\t \*]*[a-zA-Z0-9_]+\(.*\);' } preprocess() |