Changeset 5a6cc679 in mainline for uspace/lib/clui


Ignore:
Timestamp:
2018-01-31T02:21:24Z (8 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a0a9cc2
Parents:
132ab5d1
Message:

Merge commit '50f19b7ee8e94570b5c63896736c4eb49cfa18db' into forwardport

Not all ints are converted to errno_t in xhci tree yet, however it compiles and works :)

Location:
uspace/lib/clui
Files:
4 edited

Legend:

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

    r132ab5d1 r5a6cc679  
    4343 *
    4444 */
    45 int nchoice_create(nchoice_t **rchoice)
     45errno_t nchoice_create(nchoice_t **rchoice)
    4646{
    4747        nchoice_t *choice = NULL;
    48         int rc;
     48        errno_t rc;
    4949
    5050        choice = calloc(1, sizeof(nchoice_t));
     
    8282
    8383/** Set numerica choice prompt text */
    84 int nchoice_set_prompt(nchoice_t *choice, const char *prompt)
     84errno_t nchoice_set_prompt(nchoice_t *choice, const char *prompt)
    8585{
    8686        char *pstr;
     
    9696
    9797/** Add option to numerical choice */
    98 int nchoice_add(nchoice_t *choice, const char *opttext, void *arg,
     98errno_t nchoice_add(nchoice_t *choice, const char *opttext, void *arg,
    9999    nchoice_flag_t flags)
    100100{
     
    127127
    128128/** Get numerical choice from user */
    129 int nchoice_get(nchoice_t *choice, void **rarg)
     129errno_t nchoice_get(nchoice_t *choice, void **rarg)
    130130{
    131131        int i;
    132         int rc;
     132        errno_t rc;
    133133        int ret;
    134134        char *str;
  • uspace/lib/clui/nchoice.h

    r132ab5d1 r5a6cc679  
    6565} nchoice_t;
    6666
    67 extern int nchoice_create(nchoice_t **);
     67extern errno_t nchoice_create(nchoice_t **);
    6868extern 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 **);
     69extern errno_t nchoice_set_prompt(nchoice_t *, const char *);
     70extern errno_t nchoice_add(nchoice_t *, const char *, void *, nchoice_flag_t);
     71extern errno_t nchoice_get(nchoice_t *, void **);
    7272
    7373#endif
  • uspace/lib/clui/tinput.c

    r132ab5d1 r5a6cc679  
    185185}
    186186
    187 static int tinput_display(tinput_t *ti)
     187static errno_t tinput_display(tinput_t *ti)
    188188{
    189189        sysarg_t col0, row0;
     
    542542{
    543543        char *str;
    544         int rc = clipboard_get_str(&str);
     544        errno_t rc = clipboard_get_str(&str);
    545545       
    546546        if ((rc != EOK) || (str == NULL)) {
     
    667667        size_t cnum;
    668668        size_t i;
    669         int rc;
     669        errno_t rc;
    670670
    671671        if (ti->compl_ops == NULL)
     
    782782 * @return              EOK on success, ENOMEM if out of memory.
    783783 */
    784 int tinput_set_prompt(tinput_t *ti, const char *prompt)
     784errno_t tinput_set_prompt(tinput_t *ti, const char *prompt)
    785785{
    786786        if (ti->prompt != NULL)
     
    863863 *
    864864 */
    865 int tinput_read_i(tinput_t *ti, const char *istr, char **dstr)
     865errno_t tinput_read_i(tinput_t *ti, const char *istr, char **dstr)
    866866{
    867867        console_flush(ti->console);
     
    925925 *
    926926 */
    927 int tinput_read(tinput_t *ti, char **dstr)
     927errno_t tinput_read(tinput_t *ti, char **dstr)
    928928{
    929929        return tinput_read_i(ti, "", dstr);
  • uspace/lib/clui/tinput.h

    r132ab5d1 r5a6cc679  
    6363 * @return              EOK on success, error code on failure.
    6464 */
    65 typedef int (*tinput_compl_init_fn)(wchar_t *text, size_t pos, size_t *cstart,
     65typedef errno_t (*tinput_compl_init_fn)(wchar_t *text, size_t pos, size_t *cstart,
    6666    void **state);
    6767
     
    7878 * @return              EOK on success, error code on failure.
    7979 */
    80 typedef int (*tinput_compl_get_next_fn)(void *state, char **compl);
     80typedef errno_t (*tinput_compl_get_next_fn)(void *state, char **compl);
    8181
    8282
     
    155155
    156156extern tinput_t *tinput_new(void);
    157 extern int tinput_set_prompt(tinput_t *, const char *);
     157extern errno_t tinput_set_prompt(tinput_t *, const char *);
    158158extern void tinput_set_compl_ops(tinput_t *, tinput_compl_ops_t *);
    159159extern void tinput_destroy(tinput_t *);
    160 extern int tinput_read(tinput_t *, char **);
    161 extern int tinput_read_i(tinput_t *, const char *, char **);
     160extern errno_t tinput_read(tinput_t *, char **);
     161extern errno_t tinput_read_i(tinput_t *, const char *, char **);
    162162
    163163#endif
Note: See TracChangeset for help on using the changeset viewer.