Changes in uspace/lib/c/generic/adt/measured_strings.c [278b97b1:4eca056] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/adt/measured_strings.c
r278b97b1 r4eca056 58 58 * @returns NULL if there is not enough memory left. 59 59 */ 60 measured_string_ ref60 measured_string_t * 61 61 measured_string_create_bulk(const char *string, size_t length) 62 62 { 63 measured_string_ refnew;63 measured_string_t *new; 64 64 65 65 if (length == 0) { … … 67 67 length++; 68 68 } 69 new = (measured_string_ ref) malloc(sizeof(measured_string_t) +69 new = (measured_string_t *) malloc(sizeof(measured_string_t) + 70 70 (sizeof(char) * (length + 1))); 71 71 if (!new) … … 88 88 * @returns NULL if there is not enough memory left. 89 89 */ 90 measured_string_ ref measured_string_copy(measured_string_refsource)91 { 92 measured_string_ refnew;90 measured_string_t *measured_string_copy(measured_string_t *source) 91 { 92 measured_string_t *new; 93 93 94 94 if (!source) 95 95 return NULL; 96 96 97 new = (measured_string_ ref) malloc(sizeof(measured_string_t));97 new = (measured_string_t *) malloc(sizeof(measured_string_t)); 98 98 if (new) { 99 99 new->value = (char *) malloc(source->length + 1); … … 131 131 */ 132 132 int 133 measured_strings_receive(measured_string_ ref*strings, char **data,133 measured_strings_receive(measured_string_t **strings, char **data, 134 134 size_t count) 135 135 { … … 166 166 (*data)[lengths[count] - 1] = '\0'; 167 167 168 *strings = (measured_string_ ref) malloc(sizeof(measured_string_t) *168 *strings = (measured_string_t *) malloc(sizeof(measured_string_t) * 169 169 count); 170 170 if (!*strings) { … … 212 212 * @returns NULL if there is not enough memory left. 213 213 */ 214 static size_t *prepare_lengths(const measured_string_ refstrings, size_t count)214 static size_t *prepare_lengths(const measured_string_t *strings, size_t count) 215 215 { 216 216 size_t *lengths; … … 248 248 * async_data_read_finalize() function. 249 249 */ 250 int measured_strings_reply(const measured_string_ refstrings, size_t count)250 int measured_strings_reply(const measured_string_t *strings, size_t count) 251 251 { 252 252 size_t *lengths; … … 311 311 */ 312 312 int 313 measured_strings_return(int phone, measured_string_ ref*strings, char **data,313 measured_strings_return(int phone, measured_string_t **strings, char **data, 314 314 size_t count) 315 315 { … … 339 339 } 340 340 341 *strings = (measured_string_ ref) malloc(sizeof(measured_string_t) *341 *strings = (measured_string_t *) malloc(sizeof(measured_string_t) * 342 342 count); 343 343 if (!*strings) { … … 385 385 */ 386 386 int 387 measured_strings_send(int phone, const measured_string_ refstrings,387 measured_strings_send(int phone, const measured_string_t *strings, 388 388 size_t count) 389 389 {
Note:
See TracChangeset
for help on using the changeset viewer.