Skip to content
Snippets Groups Projects
Commit 35937a74 authored by rswindell's avatar rswindell
Browse files

Added definition for Delete key (0x7f)

parent 4c5c52e0
No related branches found
No related tags found
No related merge requests found
......@@ -44,6 +44,7 @@
#define BEL 0x07 /* Bell/beep ^G */
#define FF 0x0c /* Form feed ^L */
#define ESC 0x1b /* Escape ^[ */
#define DEL 0x7f /* Delete ^BS */
#define BS '\b' /* Back space ^H */
#define TAB '\t' /* Horizontal tabulation ^I */
#define LF '\n' /* Line feed ^J */
......
......@@ -84,7 +84,7 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode)
if(mode&K_AUTODEL && str1[0] && !(mode&K_NOECHO)) {
ch=getkey(mode|K_GETSTR);
attr(atr);
if(isprint(ch) || ch==0x7f) {
if(isprint(ch) || ch==DEL) {
for(i=0;i<l;i++)
bputs("\b \b");
i=l=0; }
......@@ -363,7 +363,7 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode)
attr(LIGHTGRAY);
console|=CON_UPARROW;
return(l);
case 127: /* Ctrl-BkSpc (DEL) Delete current char */
case DEL: /* Ctrl-BkSpc (DEL) Delete current char */
if(i==l) { /* Backspace if end of line */
if(i) {
i--;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment