ack/modules/src/read_em/m_C_mnem_na
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

18 lines
240 B
Bash
Executable file

#!/bin/sh
export ED=$1
EM_TABLE=$2
ARGTYPE=$3
list=`$ARGTYPE w $EM_TABLE`
echo "switch(p->em_opcode) {"
for i in $list
do
cat << EOF
case op_$i:
C_${i}_narg();
break;
EOF
done
cat << EOF
default: EM_error = "Illegal mnemonic";
}
EOF