5 if (prototypes == "") prototypes = "prototypes"
9 /^[a-z]/ && $3 !~ /.*NOTIMPLEMENTED.*/ {
13 printf "if %s O_%s.c\n",CC,nam
14 printf "then :\nelse exit 1\nfi\n"
15 printf "rm -f O_%s.c\n",nam
18 $1 = substr($1,1,index($1,"\t")-1);
20 printf "cat > O_%s.c << '--EOF--'\n",$1
21 print "#include \"nopt.h\""
22 printf "void O_%s(",$1
23 prototype = "_PROTOTYPE(void O_" $1 ", ("
24 nparms = split($2,parms,":");
25 for(p=1;p<nparms;p++) {
29 split(parms[p+1],a," ")
34 prototype = prototype parms[1]
35 printf "\t%s",parms[1]
38 prototype = prototype "void"
40 for(p=1;p<nparms;p++) {
41 split(parms[p+1],a," ")
42 prototype = prototype " " a[1]
45 prototype = prototype ", " a[2] a[3] a[4]
46 printf "\t%s%s%s",a[2],a[3],a[4]
49 print prototype "));" >> prototypes
64 printf "if %s O_%s.c\n",CC,nam
65 printf "then :\nelse exit 1\nfi\n"
66 printf "rm -f O_%s.c\n",nam