diff options
Diffstat (limited to 'gsmsp/gsm/src/lib/id_list.c')
-rw-r--r-- | gsmsp/gsm/src/lib/id_list.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gsmsp/gsm/src/lib/id_list.c b/gsmsp/gsm/src/lib/id_list.c new file mode 100644 index 0000000..571c3a0 --- /dev/null +++ b/gsmsp/gsm/src/lib/id_list.c @@ -0,0 +1,18 @@ +#include "common.h" +#include "id_list.h" + +const char * +id_list_get(struct _id_list *id_list, int id) +{ + struct _id_list *idptr = id_list; + + while (idptr->string != NULL) + { + if (idptr->id == id) + return idptr->string; + idptr++; + } + + return "UNKNOWN"; +} + |