+ }
+
+ else if ((ch == 23) && (pos > 0)) { /* Ctrl-W deletes a word */
+ while ((pos > 0) && !isspace(string[pos])) {
+ --pos;
+ scr_putc(8); scr_putc(32); scr_putc(8);
+ }
+ while ((pos > 0) && !isspace(string[pos-1])) {
+ --pos;
+ scr_putc(8); scr_putc(32); scr_putc(8);
+ }
+ }
+
+ else if (ch == 10) { /* return */
+ string[pos] = 0;
+ scr_printf("\n");
+ async_ka_end();
+ return(pos);
+ }
+
+ else if (isprint(ch)) { /* payload characters */
+ scr_putc((noshow ? '*' : ch));
+ string[pos] = ch;
+ ++pos;
+ }