summaryrefslogtreecommitdiff
path: root/bin/ksh/emacs-gen.sh
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2012-04-30 03:51:30 +0000
committerDamien Miller <djm@cvs.openbsd.org>2012-04-30 03:51:30 +0000
commit78edfc98bb1e94a9fe45e34dddb3df5fbce902ee (patch)
tree2145a4e18b32ca96075af79329bb0297406381bc /bin/ksh/emacs-gen.sh
parentb8dfd6d443fe0eb19bd5b597571bc54cfe18f7b3 (diff)
generalise ksh keybinding system - bindings are no longer limited in
length and need not start with ESC or ^X; patch from marco@ feedback mpi@
Diffstat (limited to 'bin/ksh/emacs-gen.sh')
-rw-r--r--bin/ksh/emacs-gen.sh44
1 files changed, 0 insertions, 44 deletions
diff --git a/bin/ksh/emacs-gen.sh b/bin/ksh/emacs-gen.sh
deleted file mode 100644
index 34429d01b36..00000000000
--- a/bin/ksh/emacs-gen.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-# $OpenBSD: emacs-gen.sh,v 1.2 2004/12/18 20:55:52 millert Exp $
-
-case $# in
-1) file=$1;;
-*)
- echo "$0: Usage: $0 path-to-emacs.c" 1>&2
- exit 1
-esac;
-
-if [ ! -r "$file" ] ;then
- echo "$0: can't read $file" 1>&2
- exit 1
-fi
-
-cat << E_O_F || exit 1
-/*
- * NOTE: THIS FILE WAS GENERATED AUTOMATICALLY FROM $file
- *
- * DO NOT BOTHER EDITING THIS FILE
- */
-E_O_F
-
-# Pass 1: print out lines before @START-FUNC-TAB@
-# and generate defines and function declarations,
-sed -e '1,/@START-FUNC-TAB@/d' -e '/@END-FUNC-TAB@/,$d' < $file |
- awk 'BEGIN { nfunc = 0; }
- /^[ ]*#/ {
- print $0;
- next;
- }
- {
- fname = $2;
- c = substr(fname, length(fname), 1);
- if (c == ",")
- fname = substr(fname, 1, length(fname) - 1);
- if (fname != "0") {
- printf "#define XFUNC_%s %d\n", substr(fname, 3, length(fname) - 2), nfunc;
- printf "static int %s (int c);\n", fname;
- nfunc++;
- }
- }' || exit 1
-
-exit 0