Changeset 77a194c in mainline for uspace/lib/clui/tinput.c
- Timestamp:
- 2015-11-04T18:55:46Z (10 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/clui/tinput.c
r5265eea4 r77a194c 457 457 } 458 458 459 static void tinput_set_str(tinput_t *ti, c har *str)459 static void tinput_set_str(tinput_t *ti, const char *str) 460 460 { 461 461 str_to_wstr(ti->buffer, INPUT_MAX_SIZE, str); … … 853 853 } 854 854 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 859 860 * 860 861 * @return EOK on success … … 863 864 * 864 865 */ 865 int tinput_read (tinput_t *ti, char **dstr)866 int tinput_read_i(tinput_t *ti, const char *istr, char **dstr) 866 867 { 867 868 console_flush(ti->console); … … 869 870 return EIO; 870 871 871 ti->pos = 0; 872 tinput_set_str(ti, istr); 873 872 874 ti->sel_start = 0; 873 ti->nc = 0;874 ti->buffer[0] = '\0';875 875 ti->done = false; 876 876 ti->exit_clui = false; … … 916 916 } 917 917 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 918 933 static void tinput_key_ctrl(tinput_t *ti, kbd_event_t *ev) 919 934 {
Note:
See TracChangeset
for help on using the changeset viewer.