8 while ((getline < file
) > 0)
15 else if ($
2 ==
"LIBBASE")
19 else if ($
2 ==
"LIBBASETYPEPTR")
25 else if ($
2 ==
"NT_TYPE")
27 if( $
3 ==
"NT_RESOURCE" )
32 else if( $
3 ==
"NT_DEVICE" )
45 verbose_pattern = libbase
"[ \\t]*,[ \\t]*[0-9]+[ \\t]*,[ \\t]*"basename
;
49 BASENAME=
toupper(basename
);
51 print "#ifndef CLIB_"BASENAME
"_PROTOS_H"
52 print "#define CLIB_"BASENAME
"_PROTOS_H"
55 print " Copyright © 1995-2003, The AROS Development Team. All rights reserved."
56 print " *** Automatically generated by genclib.awk. Do not edit ***"
58 print " Desc: Prototypes for "basename libext
59 print " Lang: english"
62 print "#ifndef AROS_LIBCALL_H"
63 print "# include <aros/libcall.h>"
74 while ((getline < file
) > 0)
76 if ($
1==
"##begin" && $
2 ==
"clib")
78 else if ($
1==
"##end" && $
2 ==
"clib")
80 else if ($
1==
"##begin" && $
2 ==
"insert_fct")
82 else if ($
1==
"##end" && $
2 ==
"insert_fct")
92 if($
1 ==
"PRE") {sub(/^PRE
/ , ""); insert_pre = $
0;}
93 if($
1 ==
"POST"){sub(/^POST
/, ""); insert_post = $
0;}
94 if($
1 ==
"FCT") {insert_fct
[nifct
++] = $
2;}
102 print "/* Prototypes */"
104 /AROS_LH
[0-9]/ { isprivate=
0; }
105 /AROS_NTLH
[0-9]/ { isprivate=
0; }
106 /AROS_PLH
[0-9]/ { isprivate=
1; }
107 /AROS_
(NT
)?LH
(A
|(QUAD
)?
[0-9])/ {
110 isarg=
match(line
,/AROS_LHA
/);
111 gsub(/AROS_
(NT
)?LH
/,"AROS_LP",line
);
112 gsub(/^
[ \t]+/,"",line
);
119 for (i =
0; (i
< nifct
&& doInsertFct ==
0); i
++)
121 if(call ~ insert_fct
[i
]) doInsertFct =
1;
130 /LIBBASE
[ \t]*,[ \t]*[0-9]+/ || $
0 ~ verbose_pattern
{
132 gsub(/LIBBASETYPEPTR
/,libbtp
,line
);
133 gsub(/LIBBASE
/,libbase
,line
);
134 gsub(/BASENAME
/,basename
,line
);
135 gsub(/[ \t]*[)][ \t]*$
/,"",line
);
136 gsub(/^
[ \t]+/,"",line
);
137 na=
split(line
,a
,",");
140 if (lvo
> firstlvo
&& !isprivate
)
142 if(doInsertFct
) print insert_pre
145 for (t=
0; t
<narg
; t
++)
149 if(doInsertFct
) print insert_post
155 print "#endif /* CLIB_"BASENAME
"_PROTOS_H */"