ack/util/ncgg/cvtkeywords
David Given 05ddefad65 Adopt a copy of Minix 2's ed; this allows the ACK's antiquated ed scripts to
run with a minimum of tweaking. Rewriting them for modern ed looks really hard.

Fixes: #84
2018-06-02 18:02:51 +02:00

25 lines
304 B
Bash
Executable file

#!/bin/sh
: '$Id$'
grep '^#' $3 >tokendefs
$1 -s $2 > $4 <<'!Funky!Stuff!'
g/^#/d
1,$s/\([^ ]*\)[ ][ ]*\(.*\)/ sy_p=lookup("\1",symkeyw,newsymbol);sy_p->sy_value.syv_keywno=\2;/
1i
#include "lookup.h"
.
.r tokendefs
a
enterkeyw() {
register symbol *sy_p;
.
$a
}
.
1,$p
!Funky!Stuff!
rm tokendefs