Changes in uspace/lib/clui/nchoice.c [68b5dd11:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/clui/nchoice.c
r68b5dd11 rb7fd2a0 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 int ret; 133 134 char *str; 134 135 unsigned long c; … … 151 152 152 153 if (def_i > 0) { 153 r c= asprintf(&istr, "%d", def_i);154 if (r c< 0)154 ret = asprintf(&istr, "%d", def_i); 155 if (ret < 0) 155 156 return ENOMEM; 156 157 } else {
Note:
See TracChangeset
for help on using the changeset viewer.