diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-23 16:26:40 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-23 16:26:40 +0000 |
commit | 3c822ab714a0ba9a04f9fe04ec6bf32dec77087d (patch) | |
tree | d957e54fe07ea133f323e7350f3edb30c2fbd677 | |
parent | aca90a638214fdc937cb8a15caf9e7bed409886d (diff) |
kill complete_function. Not used anymore.
-rw-r--r-- | usr.bin/mg/def.h | 3 | ||||
-rw-r--r-- | usr.bin/mg/keymap.c | 59 |
2 files changed, 2 insertions, 60 deletions
diff --git a/usr.bin/mg/def.h b/usr.bin/mg/def.h index ee05600f31d..7c76b8067a0 100644 --- a/usr.bin/mg/def.h +++ b/usr.bin/mg/def.h @@ -1,4 +1,4 @@ -/* $OpenBSD: def.h,v 1.12 2001/05/23 15:39:35 art Exp $ */ +/* $OpenBSD: def.h,v 1.13 2001/05/23 16:26:39 art Exp $ */ /* * This file is the general header file for all parts @@ -407,7 +407,6 @@ int d_makename __P((LINE *, char *)); LIST *make_file_list __P((char *)); /* keymap.c X */ -int complete_function __P((char *, int)); LIST *complete_function_list __P((char *, int)); /* kbd.c X */ diff --git a/usr.bin/mg/keymap.c b/usr.bin/mg/keymap.c index 186182d9b32..ac5837f831a 100644 --- a/usr.bin/mg/keymap.c +++ b/usr.bin/mg/keymap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: keymap.c,v 1.6 2001/05/23 16:14:00 art Exp $ */ +/* $OpenBSD: keymap.c,v 1.7 2001/05/23 16:26:39 art Exp $ */ /* * Keyboard maps. This is character set dependent. The terminal specific @@ -902,63 +902,6 @@ name_function(fname) } /* - * complete function name - */ -int -complete_function(fname, c) - char *fname; - int c; -{ - int i, j, k, l, oj; - - i = name_fent(fname, TRUE); - for (j = 0; (l = fname[j]) && functnames[i].n_name[j] == l; j++) { - } - if (fname[j] != '\0') { - if (++i >= NFUNCT) - /* no match */ - return -2; - for (j = 0; (l = fname[j]) && functnames[i].n_name[j] == l; - j++); - if (fname[j] != '\0') - /* no match */ - return -2; - } - if (c == CCHR('M') && functnames[i].n_name[j] == '\0') - return -1; - /* find last match */ - for (k = i + 1; k < NFUNCT; k++) { - for (l = 0; functnames[k].n_name[l] == fname[l]; l++); - if (l < j) - break; - } - k--; - oj = j; - - if (k > i) { - /* multiple matches */ - while ((l = functnames[i].n_name[j]) == - functnames[k].n_name[j]) { - fname[j++] = l; - if (l == '-' && c == ' ') - break; - } - if (j == oj) - /* ambiguous */ - return -3; - } else { - /* single match */ - while ((l = functnames[i].n_name[j])) { - fname[j++] = l; - if (l == '-' && c == ' ') - break; - } - } - fname[j] = '\0'; - return j - oj; -} - -/* * list possible function name completions. */ LIST * |