Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
4da09a65
Commit
4da09a65
authored
Nov 09, 2007
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified script even more for HP-UX.
parent
ab966109
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
mkproto.pl
mkproto.pl
+9
-14
No files found.
mkproto.pl
View file @
4da09a65
# generate prototypes for rsync
use
strict
;
my
$old_protos
=
''
;
$old_protos
=
''
;
if
(
open
(
IN
,
'proto.h'
))
{
$old_protos
=
join
(
''
,
<
IN
>
);
close
IN
;
}
my
%
FN_MAP
=
(
%
FN_MAP
=
(
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
)
{
...
...
@@ -24,16 +23,12 @@ while (<>) {
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"
;
}
elsif
(
/^static|^extern/
||
/[;]/
)
{
;
}
elsif
(
!
/^[A-Za-z][A-Za-z0-9_]* /
)
{
}
elsif
(
/^static|^extern/
||
/[;]/
||
!
/^[A-Za-z][A-Za-z0-9_]* /
)
{
;
}
elsif
(
/[(].*[)][ \t]*$/
)
{
s/$/;/
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment