#!/usr/bin/perl # This script finds extraneous "extern" variables in the *.c files. # Run it from inside the main rsync directory. use strict; my @files = glob('*.c'); foreach my $fn (@files) { open(IN, '<', $fn) or die; undef $/; $_ = ; $/ = "\n"; close IN; my @externs = /^extern .*?([^[\s(*;&.]+)(?:\[.*?\])?;/mg; foreach my $find (@externs) { my @matches = /(?