Changeset 77a194c in mainline for uspace/lib/clui/tinput.c


Ignore:
Timestamp:
2015-11-04T18:55:46Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
44183b98
Parents:
5265eea4 (diff), bfcde8d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge new disk partitioning architecture.

File:
1 edited

Legend:

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

    r5265eea4 r77a194c  
    457457}
    458458
    459 static void tinput_set_str(tinput_t *ti, char *str)
     459static void tinput_set_str(tinput_t *ti, const char *str)
    460460{
    461461        str_to_wstr(ti->buffer, INPUT_MAX_SIZE, str);
     
    853853}
    854854
    855 /** Read in one line of input.
    856  *
    857  * @param ti   Text input.
    858  * @param dstr Place to save pointer to new string.
     855/** Read in one line of input with initial text provided.
     856 *
     857 * @param ti   Text input
     858 * @param istr Initial string
     859 * @param dstr Place to save pointer to new string
    859860 *
    860861 * @return EOK on success
     
    863864 *
    864865 */
    865 int tinput_read(tinput_t *ti, char **dstr)
     866int tinput_read_i(tinput_t *ti, const char *istr, char **dstr)
    866867{
    867868        console_flush(ti->console);
     
    869870                return EIO;
    870871       
    871         ti->pos = 0;
     872        tinput_set_str(ti, istr);
     873
    872874        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 */
     928int tinput_read(tinput_t *ti, char **dstr)
     929{
     930        return tinput_read_i(ti, "", dstr);
     931}
     932
    918933static void tinput_key_ctrl(tinput_t *ti, kbd_event_t *ev)
    919934{
Note: See TracChangeset for help on using the changeset viewer.