From cb9da0bf38c18e6406bbba4f5373fb41e4dac2f5 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 29 Feb 2012 15:07:32 -0500 Subject: Fix all identifiers with names beginning with underscore. These are reserved in C. We'd been erroneously using them to indicate internal use. Instead, we now use a trailing underscore whenever we'd been using a leading underscore. This is an automatic conversion. The script that produced was made by running the following script over the output of git ls-tree -r --name-only HEAD | grep '\.[ch]$' | \ xargs ctags --c-kinds=defglmpstuvx -o - | grep '^_' | \ cut -f 1 | sort| uniq (GNU ctags was required.) ===== #!/usr/bin/perl -w -n use strict; BEGIN { print "#!/usr/bin/perl -w -i -p\n\n"; } chomp; next if (/^__func__/ or /^_FILE_OFFSET_BITS/ or /^_FORTIFY_SOURCE/ or /^_GNU_SOURCE/ or /^_WIN32/ or /^_DARWIN_UNLIMITED/ or /^_FILE_OFFSET_BITS/ or /^_LARGEFILE64_SOURCE/ or /^_LFS64_LARGEFILE/ or /^__cdecl/ or /^__attribute__/ or /^__func__/ or /^_SYS_TREE_H_/); my $ident = $_; my $better = $ident; $better =~ s/^_//; if ($ident !~ /EVENT_LOG_/) { $better = "${better}_"; } print "s/(?