Changes in uspace/srv/net/structures/char_map.h [aadf01e:21580dd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/structures/char_map.h
raadf01e r21580dd 40 40 /** Invalid assigned value used also if an entry does not exist. 41 41 */ 42 #define CHAR_MAP_NULL ( -1)42 #define CHAR_MAP_NULL ( -1 ) 43 43 44 44 /** Type definition of the character string to integer map. … … 59 59 /** Actually mapped character. 60 60 */ 61 char 61 char c; 62 62 /** Stored integral value. 63 63 */ 64 int 64 int value; 65 65 /** Next character array size. 66 66 */ 67 int 67 int size; 68 68 /** First free position in the next character array. 69 69 */ 70 int 70 int next; 71 71 /** Next character array. 72 72 */ 73 char_map_ref * 73 char_map_ref * items; 74 74 /** Consistency check magic value. 75 75 */ 76 int 76 int magic; 77 77 }; 78 78 … … 89 89 * @returns Other error codes as defined for the char_map_add_item() function. 90 90 */ 91 int char_map_add(char_map_ref map, const char * identifier, size_t length, const int value);91 int char_map_add( char_map_ref map, const char * identifier, size_t length, const int value ); 92 92 93 93 /** Clears and destroys the map. 94 94 * @param[in,out] map The character string to integer map. 95 95 */ 96 void char_map_destroy(char_map_ref map);96 void char_map_destroy( char_map_ref map ); 97 97 98 98 /** Excludes the value assigned to the key from the map. … … 104 104 * @returns CHAR_MAP_NULL if the key is not assigned a value. 105 105 */ 106 int char_map_exclude(char_map_ref map, const char * identifier, size_t length);106 int char_map_exclude( char_map_ref map, const char * identifier, size_t length ); 107 107 108 108 /** Returns the value assigned to the key from the map. … … 113 113 * @returns CHAR_MAP_NULL if the key is not assigned a value. 114 114 */ 115 int char_map_find(const char_map_ref map, const char * identifier, size_t length);115 int char_map_find( const char_map_ref map, const char * identifier, size_t length ); 116 116 117 117 /** Initializes the map. … … 121 121 * @returns ENOMEM if there is not enough memory left. 122 122 */ 123 int char_map_initialize(char_map_ref map);123 int char_map_initialize( char_map_ref map ); 124 124 125 125 /** Adds or updates the value with the key to the map. … … 135 135 * @returns Other error codes as defined for the char_map_add_item() function. 136 136 */ 137 int char_map_update(char_map_ref map, const char * identifier, size_t length, const int value);137 int char_map_update( char_map_ref map, const char * identifier, size_t length, const int value ); 138 138 139 139 #endif
Note:
See TracChangeset
for help on using the changeset viewer.