Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 296117
Collapse All | Expand All

(-)a/lib/et/com_err.h (+2 lines)
Lines 16-21 Link Here
16
#define COM_ERR_ATTR(x)
16
#define COM_ERR_ATTR(x)
17
#endif
17
#endif
18
18
19
#include <stddef.h>
19
#include <stdarg.h>
20
#include <stdarg.h>
20
21
21
typedef long errcode_t;
22
typedef long errcode_t;
Lines 49-54 extern void add_to_error_table(struct et_list *new_table); Link Here
49
50
50
/* Provided for Heimdall compatibility */
51
/* Provided for Heimdall compatibility */
51
extern const char *com_right(struct et_list *list, long code);
52
extern const char *com_right(struct et_list *list, long code);
53
extern const char *com_right_r(struct et_list *list, long code, char *str, size_t len);
52
extern void initialize_error_table_r(struct et_list **list,
54
extern void initialize_error_table_r(struct et_list **list,
53
				     const char **messages,
55
				     const char **messages,
54
				     int num_errors,
56
				     int num_errors,
(-)a/lib/et/com_right.c (-1 / +14 lines)
Lines 55-60 com_right(struct et_list *list, long code) Link Here
55
    return NULL;
55
    return NULL;
56
}
56
}
57
57
58
const char *
59
com_right_r(struct et_list *list, long code, char *str, size_t len)
60
{
61
    struct et_list *p;
62
    for (p = list; p; p = p->next) {
63
        if (code >= p->table->base && code < p->table->base + p->table->n_msgs) {
64
            strlcpy(str, p->table->msgs[code - p->table->base], len);
65
            return str;
66
        }
67
    }
68
    return NULL;
69
}
70
71
58
struct foobar {
72
struct foobar {
59
    struct et_list etl;
73
    struct et_list etl;
60
    struct error_table tab;
74
    struct error_table tab;
61
- 

Return to bug 296117