public
/
Ack-5.5.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Pristine Ack-5.5
[Ack-5.5.git]
/
util
/
grind
/
make.ops
1
awk '
2
BEGIN { n = 0 }
3
{ print "#define " $1 " " n; n++
4
if ($3 !~ /0/) print "extern int " $3 "();" ;
5
}
6
' < $1 > ops.h
7
8
cat > ops.c <<'EOF'
9
#include "operator.h"
10
#include "ops.h"
11
12
t_operator operators[] = {
13
EOF
14
awk ' { print "{ " $2 ", " $3 "}, /* " $1 " */" }' < $1 >> ops.c
15
cat >> ops.c <<'EOF'
16
{ 0, 0 }
17
};
18
EOF