diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2020-06-05 00:54:01 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-02-03 21:56:10 +0100 |
commit | bb46328fb4c38de5168b2aa498403e55e1550e24 (patch) | |
tree | bd39f15a00c803e6975db739324524703df69eda /dcop/dcopidlng/kalyptus | |
parent | 2ad5c999a7f05c73e11ca0e8c2ff4f07f9dbe03c (diff) | |
download | tdelibs-bb46328fb4c38de5168b2aa498403e55e1550e24.tar.gz tdelibs-bb46328fb4c38de5168b2aa498403e55e1550e24.zip |
dcopidlng fixes:
+ includes may use quotation marks
+ argument types can contain multiple words
+ avoid use long, short, int or char type as the argument name
+ avoid use type as the argument name if the const qualifier is used
+ use long notation of int types
+ the arguments can be nameless
+ return types can have qualifiers
+ do not warn on inherit of the DCOPObject and TQObject classes
+ the documentation comment does not have to end on a separate line
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 49614d38c9b298488b2cba15bbee48db8d7ec316)
Diffstat (limited to 'dcop/dcopidlng/kalyptus')
-rw-r--r-- | dcop/dcopidlng/kalyptus | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/dcop/dcopidlng/kalyptus b/dcop/dcopidlng/kalyptus index e970812b2..22bfb6f53 100644 --- a/dcop/dcopidlng/kalyptus +++ b/dcop/dcopidlng/kalyptus @@ -439,7 +439,7 @@ LOOP: || $p =~ /^\s*KDOM_/ ); - push @includes_list, $1 if $p =~ /^#include\s+<?(.*?)>?\s*$/; + push @includes_list, $1 if $p =~ /^#include\s+[<"]?(.*?)[>"]?\s*$/; # remove all preprocessor macros if( $p =~ /^\s*#\s*(\w+)/ ) { @@ -1521,16 +1521,22 @@ sub makeParamList($$$) # Separate arg type from arg name, if the latter is specified if ( $arg =~ /(.*)\s+([\w_]+)\s*$/ || $arg =~ /(.*)\(\s*\*\s([\w_]+)\)\s*\((.*)\)\s*$/ ) { - if ( defined $3 ) { # function pointer - $argType = $1."(*)($3)"; - $argName = $2; + if ( $1 eq "const" || $2 eq "long" || $2 eq "short" || $2 eq "int" || $2 eq "char" ) { + # const qualifier or long notation of numeric type + # without argument name + $argType = "$1 $2"; } else { $argType = $1; $argName = $2; } - } else { # unnamed arg - or enum value + if ( defined $3 ) { + # function pointer + $argType .= "(*)($3)"; + } + } else { + # unnamed arg - or enum value $argType = $arg if (!$isEnum); - $argName = $arg if ($isEnum); + $argName = $arg if ($isEnum); } $argId++; |