]>
git.saurik.com Git - apple/xnu.git/blob - bsd/miscfs/devfs/reproto.sh
e994e0c2b1f7ca9987a50f3d6b66ff44b69950cf
3 # This used to be a shell script, but had to become more sophisticated
4 # to allow for KNF function definitions. So rewrote in perl, but wrapped
7 exec /usr
/bin
/perl
<< *EOF
*
8 open
(PROTO
, ">devfs_proto.h") || die
"Cannot open devfs_proto.h\n";
10 print PROTO
"/* THIS FILE HAS BEEN PRODUCED AUTOMATICALLY */\n";
12 while (\
$file = <*.c
>) {
13 if(open
(F
, \
$file) == 0) {
14 warn
"Cannot open \$file.\n";
23 } elsif
(\
$collecting) {
25 \
$text[\
$idx - 1] .
= ';';
26 for (\
$i = 0; \
$i < \
$idx; \
$i++) {
27 print PROTO
"\$text[\$i]";
28 print PROTO \
$i == 0?
"\t": "\n";
33 \
$text[\
$idx++] = \
$_;
39 print PROTO
"/* THIS FILE PRODUCED AUTOMATICALLY */\n" .
40 "/* DO NOT EDIT (see reproto.sh) */\n";