Skip to content
Snippets Groups Projects
Commit 267d1427 authored by rswindell's avatar rswindell
Browse files

optimized inkey() a little: no reason to convert ctrl-chars to uppercase, only

one check for ctrl-keys.
parent 9d940760
No related branches found
No related tags found
No related merge requests found
......@@ -72,16 +72,16 @@ char sbbs_t::inkey(long mode)
timeout=time(NULL);
/* Is this control key flagged as passthru? */
if(ch<' ' && cfg.ctrlkey_passthru&(1<<ch))
return(ch); /* do not handle here */
/* Is this a control key */
if(ch<' ') {
if(cfg.ctrlkey_passthru&(1<<ch)) /* flagged as passthru? */
return(ch); /* do not handle here */
return(handle_ctrlkey(ch,mode));
}
if(mode&K_UPPER)
ch=toupper(ch);
if(ch<' ')
return(handle_ctrlkey(ch,mode));
return(ch);
}
......@@ -318,4 +318,4 @@ char sbbs_t::handle_ctrlkey(char ch, long mode)
return(0);
}
return(ch);
}
\ No newline at end of file
}
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