diff options
author | 2011-03-14 21:20:00 +0000 | |
---|---|---|
committer | 2011-03-14 21:20:00 +0000 | |
commit | f81d47d80399001c07c29492ac65faac4459097c (patch) | |
tree | 958eb42759ad01a15ec76705d5631d1dcf6e4ff1 | |
parent | unify a chunk (diff) | |
download | wireguard-openbsd-f81d47d80399001c07c29492ac65faac4459097c.tar.xz wireguard-openbsd-f81d47d80399001c07c29492ac65faac4459097c.zip |
remove unused SILLY game of life.
no binary change.
sure @deraadt
-rw-r--r-- | bin/ksh/config.h | 5 | ||||
-rw-r--r-- | bin/ksh/emacs.c | 59 |
2 files changed, 2 insertions, 62 deletions
diff --git a/bin/ksh/config.h b/bin/ksh/config.h index 3da1235dc76..c40923f33f2 100644 --- a/bin/ksh/config.h +++ b/bin/ksh/config.h @@ -1,4 +1,4 @@ -/* $OpenBSD: config.h,v 1.13 2004/12/18 22:42:26 millert Exp $ */ +/* $OpenBSD: config.h,v 1.14 2011/03/14 21:20:00 okan Exp $ */ /* config.h. NOT generated automatically. */ @@ -32,9 +32,6 @@ /* Specify default $ENV? */ /* #undef DEFAULT_ENV */ -/* Include game-of-life? */ -/* #undef SILLY */ - /* The number of bytes in a int. */ #define SIZEOF_INT 4 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) { |