Changeset 5a6cc679 in mainline for uspace/lib/clui
- Timestamp:
- 2018-01-31T02:21:24Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a0a9cc2
- Parents:
- 132ab5d1
- Location:
- uspace/lib/clui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/clui/nchoice.c
r132ab5d1 r5a6cc679 43 43 * 44 44 */ 45 int nchoice_create(nchoice_t **rchoice)45 errno_t nchoice_create(nchoice_t **rchoice) 46 46 { 47 47 nchoice_t *choice = NULL; 48 int rc;48 errno_t rc; 49 49 50 50 choice = calloc(1, sizeof(nchoice_t)); … … 82 82 83 83 /** Set numerica choice prompt text */ 84 int nchoice_set_prompt(nchoice_t *choice, const char *prompt)84 errno_t nchoice_set_prompt(nchoice_t *choice, const char *prompt) 85 85 { 86 86 char *pstr; … … 96 96 97 97 /** Add option to numerical choice */ 98 int nchoice_add(nchoice_t *choice, const char *opttext, void *arg,98 errno_t nchoice_add(nchoice_t *choice, const char *opttext, void *arg, 99 99 nchoice_flag_t flags) 100 100 { … … 127 127 128 128 /** Get numerical choice from user */ 129 int nchoice_get(nchoice_t *choice, void **rarg)129 errno_t nchoice_get(nchoice_t *choice, void **rarg) 130 130 { 131 131 int i; 132 int rc;132 errno_t rc; 133 133 int ret; 134 134 char *str; -
uspace/lib/clui/nchoice.h
r132ab5d1 r5a6cc679 65 65 } nchoice_t; 66 66 67 extern int nchoice_create(nchoice_t **);67 extern errno_t nchoice_create(nchoice_t **); 68 68 extern void nchoice_destroy(nchoice_t *); 69 extern int nchoice_set_prompt(nchoice_t *, const char *);70 extern int nchoice_add(nchoice_t *, const char *, void *, nchoice_flag_t);71 extern int nchoice_get(nchoice_t *, void **);69 extern errno_t nchoice_set_prompt(nchoice_t *, const char *); 70 extern errno_t nchoice_add(nchoice_t *, const char *, void *, nchoice_flag_t); 71 extern errno_t nchoice_get(nchoice_t *, void **); 72 72 73 73 #endif -
uspace/lib/clui/tinput.c
r132ab5d1 r5a6cc679 185 185 } 186 186 187 static int tinput_display(tinput_t *ti)187 static errno_t tinput_display(tinput_t *ti) 188 188 { 189 189 sysarg_t col0, row0; … … 542 542 { 543 543 char *str; 544 int rc = clipboard_get_str(&str);544 errno_t rc = clipboard_get_str(&str); 545 545 546 546 if ((rc != EOK) || (str == NULL)) { … … 667 667 size_t cnum; 668 668 size_t i; 669 int rc;669 errno_t rc; 670 670 671 671 if (ti->compl_ops == NULL) … … 782 782 * @return EOK on success, ENOMEM if out of memory. 783 783 */ 784 int tinput_set_prompt(tinput_t *ti, const char *prompt)784 errno_t tinput_set_prompt(tinput_t *ti, const char *prompt) 785 785 { 786 786 if (ti->prompt != NULL) … … 863 863 * 864 864 */ 865 int tinput_read_i(tinput_t *ti, const char *istr, char **dstr)865 errno_t tinput_read_i(tinput_t *ti, const char *istr, char **dstr) 866 866 { 867 867 console_flush(ti->console); … … 925 925 * 926 926 */ 927 int tinput_read(tinput_t *ti, char **dstr)927 errno_t tinput_read(tinput_t *ti, char **dstr) 928 928 { 929 929 return tinput_read_i(ti, "", dstr); -
uspace/lib/clui/tinput.h
r132ab5d1 r5a6cc679 63 63 * @return EOK on success, error code on failure. 64 64 */ 65 typedef int (*tinput_compl_init_fn)(wchar_t *text, size_t pos, size_t *cstart,65 typedef errno_t (*tinput_compl_init_fn)(wchar_t *text, size_t pos, size_t *cstart, 66 66 void **state); 67 67 … … 78 78 * @return EOK on success, error code on failure. 79 79 */ 80 typedef int (*tinput_compl_get_next_fn)(void *state, char **compl);80 typedef errno_t (*tinput_compl_get_next_fn)(void *state, char **compl); 81 81 82 82 … … 155 155 156 156 extern tinput_t *tinput_new(void); 157 extern int tinput_set_prompt(tinput_t *, const char *);157 extern errno_t tinput_set_prompt(tinput_t *, const char *); 158 158 extern void tinput_set_compl_ops(tinput_t *, tinput_compl_ops_t *); 159 159 extern void tinput_destroy(tinput_t *); 160 extern int tinput_read(tinput_t *, char **);161 extern int tinput_read_i(tinput_t *, const char *, char **);160 extern errno_t tinput_read(tinput_t *, char **); 161 extern errno_t tinput_read_i(tinput_t *, const char *, char **); 162 162 163 163 #endif
Note:
See TracChangeset
for help on using the changeset viewer.