diff options
author | Okan Demirmen <okan@cvs.openbsd.org> | 2011-03-14 21:20:02 +0000 |
---|---|---|
committer | Okan Demirmen <okan@cvs.openbsd.org> | 2011-03-14 21:20:02 +0000 |
commit | 7992919188df84d991ef0d59525fbf29f796b136 (patch) | |
tree | 749ae6f8ef32a3cdb14cc172e84c5ca3eb2946f5 /bin/ksh/emacs.c | |
parent | e50ecc45208b8a66601438ecfd754db3a264f906 (diff) |
remove unused SILLY game of life.
no binary change.
sure @deraadt
Diffstat (limited to 'bin/ksh/emacs.c')
-rw-r--r-- | bin/ksh/emacs.c | 59 |
1 files changed, 1 insertions, 58 deletions
diff --git a/bin/ksh/emacs.c b/bin/ksh/emacs.c index 0bfda96f0ab..9cafa81ad16 100644 --- a/bin/ksh/emacs.c +++ b/bin/ksh/emacs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: emacs.c,v 1.42 2009/06/02 06:47:47 halex Exp $ */ +/* $OpenBSD: emacs.c,v 1.43 2011/03/14 21:20:01 okan Exp $ */ /* * Emacs-like command line editing and history @@ -205,11 +205,7 @@ static const struct x_ftab x_ftab[] = { { x_fold_upper, "upcase-word", XF_ARG }, { x_set_arg, "set-arg", XF_NOBIND }, { x_comment, "comment", 0 }, -#ifdef SILLY - { x_game_of_life, "play-game-of-life", 0 }, -#else { 0, 0, 0 }, -#endif #ifdef DEBUG { x_debug_info, "debug-info", 0 }, #else @@ -1534,63 +1530,10 @@ x_noop(int c) return KSTD; } -#ifdef SILLY -static int -x_game_of_life(int c) -{ - char newbuf [256+1]; - char *ip, *op; - int i, len; - - i = xep - xbuf; - *xep = 0; - len = x_size_str(xbuf); - xcp = xbp = xbuf; - memmove(newbuf+1, xbuf, i); - newbuf[0] = 'A'; - newbuf[i] = 'A'; - for (ip = newbuf+1, op = xbuf; --i >= 0; ip++, op++) { - /* Empty space */ - if (*ip < '@' || *ip == '_' || *ip == 0x7F) { - /* Two adults, make whoopee */ - if (ip[-1] < '_' && ip[1] < '_') { - /* Make kid look like parents. */ - *op = '`' + ((ip[-1] + ip[1])/2)%32; - if (*op == 0x7F) /* Birth defect */ - *op = '`'; - } - else - *op = ' '; /* nothing happens */ - continue; - } - /* Child */ - if (*ip > '`') { - /* All alone, dies */ - if (ip[-1] == ' ' && ip[1] == ' ') - *op = ' '; - else /* Gets older */ - *op = *ip-'`'+'@'; - continue; - } - /* Adult */ - /* Overcrowded, dies */ - if (ip[-1] >= '@' && ip[1] >= '@') { - *op = ' '; - continue; - } - *op = *ip; - } - *op = 0; - x_redraw(len); - return KSTD; -} -#endif - /* * File/command name completion routines */ - static int x_comp_comm(int c) { |