Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ab96610
)
Simplified script even more for HP-UX.
author
Wayne Davison
<wayned@samba.org>
Fri, 9 Nov 2007 19:14:51 +0000
(19:14 +0000)
committer
Wayne Davison
<wayned@samba.org>
Fri, 9 Nov 2007 19:14:51 +0000
(19:14 +0000)
mkproto.pl
patch
|
blob
|
blame
|
history
diff --git
a/mkproto.pl
b/mkproto.pl
index
e8f0e83
..
b989a5f
100644
(file)
--- a/
mkproto.pl
+++ b/
mkproto.pl
@@
-1,21
+1,20
@@
# generate prototypes for rsync
# generate prototypes for rsync
-use strict;
-
my
$old_protos = '';
+$old_protos = '';
if (open(IN, 'proto.h')) {
$old_protos = join('', <IN>);
close IN;
}
if (open(IN, 'proto.h')) {
$old_protos = join('', <IN>);
close IN;
}
-
my
%FN_MAP = (
+%FN_MAP = (
BOOL => 'BOOL ',
CHAR => 'char ',
INTEGER => 'int ',
STRING => 'char *',
);
BOOL => 'BOOL ',
CHAR => 'char ',
INTEGER => 'int ',
STRING => 'char *',
);
-
my
$inheader = 0;
-
my
$protos = qq|/* This file is automatically generated with "make proto". DO NOT EDIT */\n\n|;
+$inheader = 0;
+$protos = qq|/* This file is automatically generated with "make proto". DO NOT EDIT */\n\n|;
while (<>) {
if ($inheader) {
while (<>) {
if ($inheader) {
@@
-24,16
+23,12
@@
while (<>) {
s/$/;/;
}
$protos .= $_;
s/$/;/;
}
$protos .= $_;
- }
-
- if (/^FN_(LOCAL|GLOBAL)_([^(]+)\(([^,()]+)/) {
- my $ret = $FN_MAP{$2};
- my $func = $3;
- my $arg = $1 eq 'LOCAL' ? 'int ' : 'void';
+ } elsif (/^FN_(LOCAL|GLOBAL)_([^(]+)\(([^,()]+)/) {
+ $ret = $FN_MAP{$2};
+ $func = $3;
+ $arg = $1 eq 'LOCAL' ? 'int ' : 'void';
$protos .= "$ret$func($arg);\n";
$protos .= "$ret$func($arg);\n";
- } elsif (/^static|^extern/ || /[;]/) {
- ;
- } elsif (!/^[A-Za-z][A-Za-z0-9_]* /) {
+ } elsif (/^static|^extern/ || /[;]/ || !/^[A-Za-z][A-Za-z0-9_]* /) {
;
} elsif (/[(].*[)][ \t]*$/) {
s/$/;/;
;
} elsif (/[(].*[)][ \t]*$/) {
s/$/;/;