/*
* $Id$
* $Log$
+ * Revision 1.11 2000/07/18 12:20:39 priikone
+ * Added ^U functionality, clears input line (patch form cras).
+ *
* Revision 1.10 2000/07/18 06:53:15 priikone
* Allow partial command strings in comparison.
*
/* Static function prototypes */
static int silc_client_bad_keys(unsigned char key);
+static void silc_client_clear_input(SilcClient client);
static void silc_client_process_message(SilcClient client);
static char *silc_client_parse_command(unsigned char *buffer);
/* Enter, Return. User pressed enter we are ready to
process the message. */
silc_client_process_message(client);
- silc_screen_input_reset(client->screen);
break;
case CTRL('l'):
/* Refresh screen, Ctrl^l */
case KEY_DL:
case CTRL('u'):
/* Delete line */
+ silc_client_clear_input(client);
break;
default:
/*
}
}
+/* Clears input buffer */
+
+static void silc_client_clear_input(SilcClient client)
+{
+ silc_buffer_clear(client->input_buffer);
+ silc_buffer_pull_tail(client->input_buffer,
+ SILC_BUFFER_END(client->input_buffer));
+ silc_screen_input_reset(client->screen);
+}
+
/* Processes messages user has typed on the screen. This either sends
a packet out to network or if command were written executes it. */
out:
/* Clear the input buffer */
- silc_buffer_clear(client->input_buffer);
- silc_buffer_pull_tail(client->input_buffer,
- SILC_BUFFER_END(client->input_buffer));
+ silc_client_clear_input(client);
}
/* Returns the command fetched from user typed command line */