ack/util/ncgg/cvtkeywords

25 lines
313 B
Plaintext
Raw Normal View History

#!/bin/sh
1994-06-24 11:31:16 +00:00
: '$Id$'
grep '^#' $3 >tokendefs
$1 -s $2 > $4 <<'!Funky!Stuff!'
1985-01-08 09:59:28 +00:00
g/^#/d
1,$s/\([^ ]*\)[ ][ ]*\(.*\)/ sy_p=lookup("\1",symkeyw,newsymbol);sy_p->sy_value.syv_keywno=\2;/
1i
#include "lookup.h"
.
.r tokendefs
a
void enterkeyw(void) {
1985-01-08 09:59:28 +00:00
register symbol *sy_p;
.
$a
}
.
1,$p
1985-01-08 09:59:28 +00:00
!Funky!Stuff!
rm tokendefs
2016-07-26 21:35:30 +00:00