Changes in uspace/lib/c/include/adt/generic_char_map.h [736a330:aaa3f33a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/adt/generic_char_map.h
r736a330 raaa3f33a 55 55 \ 56 56 typedef struct name name##_t; \ 57 typedef name##_t *name##_ref; \58 57 \ 59 58 struct name { \ … … 63 62 }; \ 64 63 \ 65 int name##_add(name##_ ref, const char *, const size_t, type *); \66 int name##_count(name##_ ref); \67 void name##_destroy(name##_ ref); \68 void name##_exclude(name##_ ref, const char *, const size_t); \69 type *name##_find(name##_ ref, const char *, const size_t); \70 int name##_initialize(name##_ ref); \71 int name##_is_valid(name##_ ref);64 int name##_add(name##_t *, const char *, const size_t, type *); \ 65 int name##_count(name##_t *); \ 66 void name##_destroy(name##_t *); \ 67 void name##_exclude(name##_t *, const char *, const size_t); \ 68 type *name##_find(name##_t *, const char *, const size_t); \ 69 int name##_initialize(name##_t *); \ 70 int name##_is_valid(name##_t *); 72 71 73 72 /** Character string to generic type map implementation. … … 81 80 GENERIC_FIELD_IMPLEMENT(name##_items, type) \ 82 81 \ 83 int name##_add(name##_ refmap, const char *name, const size_t length, \82 int name##_add(name##_t *map, const char *name, const size_t length, \ 84 83 type *value) \ 85 84 { \ … … 99 98 } \ 100 99 \ 101 int name##_count(name##_ refmap) \100 int name##_count(name##_t *map) \ 102 101 { \ 103 102 return name##_is_valid(map) ? \ … … 105 104 } \ 106 105 \ 107 void name##_destroy(name##_ refmap) \106 void name##_destroy(name##_t *map) \ 108 107 { \ 109 108 if (name##_is_valid(map)) { \ … … 113 112 } \ 114 113 \ 115 void name##_exclude(name##_ refmap, const char *name, \114 void name##_exclude(name##_t *map, const char *name, \ 116 115 const size_t length) \ 117 116 { \ … … 125 124 } \ 126 125 \ 127 type *name##_find(name##_ refmap, const char *name, \126 type *name##_find(name##_t *map, const char *name, \ 128 127 const size_t length) \ 129 128 { \ … … 138 137 } \ 139 138 \ 140 int name##_initialize(name##_ refmap) \139 int name##_initialize(name##_t *map) \ 141 140 { \ 142 141 int rc; \ … … 155 154 } \ 156 155 \ 157 int name##_is_valid(name##_ refmap) \156 int name##_is_valid(name##_t *map) \ 158 157 { \ 159 158 return map && (map->magic == GENERIC_CHAR_MAP_MAGIC_VALUE); \
Note:
See TracChangeset
for help on using the changeset viewer.