From 562a595ef44299595db053a78dbf16fa637d6bdb Mon Sep 17 00:00:00 2001 From: rofl0r Date: Tue, 14 Sep 2010 22:14:13 +0200 Subject: [PATCH] another improvement --- htooc.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htooc.pl b/htooc.pl index f2d3b85..a885bdf 100755 --- a/htooc.pl +++ b/htooc.pl @@ -21,7 +21,10 @@ sub converttype { $type =~ s/short/Short/; $type =~ s/size_t/SizeT/; $type =~ s/ssize_t/SSizeT/; - $type =~ s/ptrdiff_t/SSizeT/; + $type =~ s/ptrdiff_t/SSizeT/; + $type =~ s/bool/Bool/; + $type =~ s/ubyte/Octet/; + $type =~ s/Char\*/CString/; return $type; } @@ -122,6 +125,7 @@ while(<>){ $counter++; } $args_braced .= ")"; + $args_braced = "" if($args_braced eq "(Void)"); } print("$funcname: extern$externname func$args_braced $return\n"); } elsif (/^\s*const\s+(\w+\**)\s+(\w+)\s*=\s*.+?;/) { -- 2.11.4.GIT