1 # generate prototypes for rsync
4 if (open(IN
, 'proto.h')) {
5 $old_protos = join('', <IN
>);
17 $protos = qq|/* This file is automatically generated with "make proto". DO NOT EDIT */\n\n|;
26 } elsif (/^FN_(LOCAL|GLOBAL)_([^(]+)\(([^,()]+)/) {
29 $arg = $1 eq 'LOCAL' ?
'int module_id' : 'void';
30 $protos .= "$ret$func($arg);\n";
31 } elsif (/^static|^extern/ || /[;]/ || !/^[A-Za-z][A-Za-z0-9_]* /) {
33 } elsif (/[(].*[)][ \t]*$/) {
42 if ($old_protos ne $protos) {
43 open(OUT
, '>proto.h') or die $!;
48 open(OUT
, '>proto.h-tstamp') and close OUT
;