Mercurial > hg > early-roguelike
diff srogue/wizard.c @ 119:458df24e973d
srogue: use functions from mdport.c.
Shell escape, passwd entries, terminal settings, and most signal
handling is now done with the more portable md_* functions.
author | John "Elwin" Edwards |
---|---|
date | Wed, 30 Apr 2014 14:46:30 -0700 |
parents | 3aa87373c908 |
children | 94a0d9dd5ce1 |
line wrap: on
line diff
--- a/srogue/wizard.c Sun Apr 27 08:29:14 2014 -0700 +++ b/srogue/wizard.c Wed Apr 30 14:46:30 2014 -0700 @@ -15,14 +15,10 @@ */ #include <stdlib.h> -#include <termios.h> #include <ctype.h> #include "rogue.h" -#include <pwd.h> #include "rogue.ext" -extern struct termios terminal; - /* * whatis: * What a certain object is @@ -359,9 +355,9 @@ mpos = 0; sp = buf; while ((c = getchar()) != '\n' && c != '\r' && c != ESCAPE) - if (c == terminal.c_cc[VKILL]) + if (c == md_killchar()) sp = buf; - else if (c == terminal.c_cc[VERASE] && sp > buf) + else if (c == md_erasechar() && sp > buf) sp--; else *sp++ = c;