Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/clui/tinput.c

    r68b5dd11 ra2bdcf87  
    457457}
    458458
    459 static void tinput_set_str(tinput_t *ti, const char *str)
     459static void tinput_set_str(tinput_t *ti, char *str)
    460460{
    461461        str_to_wstr(ti->buffer, INPUT_MAX_SIZE, str);
     
    853853}
    854854
    855 /** Read in one line of input with initial text provided.
     855/** Read in one line of input.
    856856 *
    857  * @param ti   Text input
    858  * @param istr Initial string
    859  * @param dstr Place to save pointer to new string
     857 * @param ti   Text input.
     858 * @param dstr Place to save pointer to new string.
    860859 *
    861860 * @return EOK on success
     
    864863 *
    865864 */
    866 int tinput_read_i(tinput_t *ti, const char *istr, char **dstr)
     865int tinput_read(tinput_t *ti, char **dstr)
    867866{
    868867        console_flush(ti->console);
     
    870869                return EIO;
    871870       
    872         tinput_set_str(ti, istr);
    873 
     871        ti->pos = 0;
    874872        ti->sel_start = 0;
     873        ti->nc = 0;
     874        ti->buffer[0] = '\0';
    875875        ti->done = false;
    876876        ti->exit_clui = false;
     
    916916}
    917917
    918 /** Read in one line of input.
    919  *
    920  * @param ti   Text input
    921  * @param dstr Place to save pointer to new string.
    922  *
    923  * @return EOK on success
    924  * @return ENOENT if user requested abort
    925  * @return EIO if communication with console failed
    926  *
    927  */
    928 int tinput_read(tinput_t *ti, char **dstr)
    929 {
    930         return tinput_read_i(ti, "", dstr);
    931 }
    932 
    933918static void tinput_key_ctrl(tinput_t *ti, kbd_event_t *ev)
    934919{
Note: See TracChangeset for help on using the changeset viewer.