You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
612 B
33 lines
612 B
9 years ago
|
#ifndef __STRLIST_H
|
||
|
#define __STRLIST_H
|
||
|
|
||
|
/**
|
||
|
* @file
|
||
|
* @Header file for strlist functions.
|
||
|
*/
|
||
|
|
||
|
|
||
9 years ago
|
/**
|
||
|
*Key/String pair, used for string tables,
|
||
|
*to display message element names and so on...
|
||
|
*/
|
||
8 years ago
|
struct cw_strlist_elem {
|
||
|
/** ID, an integer value */
|
||
9 years ago
|
int id;
|
||
8 years ago
|
/** a pointer to the string */
|
||
9 years ago
|
const char *str;
|
||
|
};
|
||
|
|
||
8 years ago
|
typedef struct cw_strlist_elem* cw_strlist_t;
|
||
|
|
||
|
|
||
9 years ago
|
/** Stopper, indicates the last element in a strlist */
|
||
9 years ago
|
#define CW_STR_STOP 0xffffffff
|
||
|
|
||
|
|
||
8 years ago
|
extern const char *cw_strlist_get_str(struct cw_strlist_elem *s, int id);
|
||
|
extern int cw_strlist_get_id(struct cw_strlist_elem *s, const char *str);
|
||
9 years ago
|
|
||
|
#endif
|
||
|
|