diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-03-19 23:27:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-19 23:27:29 (GMT) |
commit | 59343e893185ef59f9fd93fd715a33ea4e125d7e (patch) | |
tree | 84e72ffacccff3b2f8357d40a6b9b217a0c488ac /bin/trace | |
parent | 0704abae0cb5747cfbc168c41d4f40176944dccd (diff) | |
download | hdf5-59343e893185ef59f9fd93fd715a33ea4e125d7e.zip hdf5-59343e893185ef59f9fd93fd715a33ea4e125d7e.tar.gz hdf5-59343e893185ef59f9fd93fd715a33ea4e125d7e.tar.bz2 |
Bring bin/ changes from develop (#2595)
Diffstat (limited to 'bin/trace')
-rwxr-xr-x | bin/trace | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -203,7 +203,9 @@ sub argstring ($$$) { # Normalize the data type by removing redundant white space, # certain type qualifiers, and indirection. - $atype =~ s/^\bconst\b//; + $atype =~ s/^\bconst\b//; # Leading const + $atype =~ s/\s*const\s*//; # const after type, possibly in the middle of '*'s + $atype =~ s/^\bstatic\b//; $atype =~ s/\bH5_ATTR_UNUSED\b//g; $atype =~ s/\bH5_ATTR_DEPRECATED_USED\b//g; $atype =~ s/\bH5_ATTR_NDEBUG_UNUSED\b//g; @@ -325,9 +327,9 @@ sub rewrite_func ($$$$$) { # Wrap lines that will be longer than the limit if ($len_if_added > $max_trace_macro_line_len) { - # Wrap line, with indention + # Wrap line, with indentation $trace .= ",\n "; - $len = 13; # Set to 13, for indention + $len = 13; # Set to 13, for indentation # Indent an extra space to account for extra digit in 'H5TRACE' macro if (scalar(@arg_str) >= 10) { @@ -378,14 +380,16 @@ my $total_api = 0; for $file (@ARGV) { # Ignore some files that do not need tracing macros unless ($file eq "H5FDmulti.c" or $file eq "src/H5FDmulti.c" or $file eq "H5FDstdio.c" or $file eq "src/H5FDstdio.c") { - + # Snarf up the entire file open SOURCE, $file or die "$file: $!\n"; $Source = join "", <SOURCE>; close SOURCE; - # Make modifications + # Make a copy of the original data my $original = $Source; + + # Make modifications my $napi = $Source =~ s/\n([A-Za-z]\w*(\s+[A-Za-z]\w*)*\s*\**)\n #type (H5[A-Z]{0,2}[^_A-Z0-9]\w*) #name \s*\((.*?)\)\s* #args |