aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_strings_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_strings_lib.h')
-rw-r--r--src/include/gnunet_strings_lib.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/include/gnunet_strings_lib.h b/src/include/gnunet_strings_lib.h
index 1fe04da6b..cf56b2cce 100644
--- a/src/include/gnunet_strings_lib.h
+++ b/src/include/gnunet_strings_lib.h
@@ -123,8 +123,8 @@ GNUNET_STRINGS_conv (const char *input, size_t len,
123 * @return the converted string (0-terminated) 123 * @return the converted string (0-terminated)
124 */ 124 */
125char * 125char *
126GNUNET_STRINGS_to_utf8 (const char *input, 126GNUNET_STRINGS_to_utf8 (const char *input,
127 size_t len, 127 size_t len,
128 const char *charset); 128 const char *charset);
129 129
130 130
@@ -137,8 +137,8 @@ GNUNET_STRINGS_to_utf8 (const char *input,
137 * string is returned. 137 * string is returned.
138 */ 138 */
139char * 139char *
140GNUNET_STRINGS_from_utf8 (const char *input, 140GNUNET_STRINGS_from_utf8 (const char *input,
141 size_t len, 141 size_t len,
142 const char *charset); 142 const char *charset);
143 143
144 144
@@ -150,7 +150,7 @@ GNUNET_STRINGS_from_utf8 (const char *input,
150 * @param output output buffer 150 * @param output output buffer
151 */ 151 */
152void 152void
153GNUNET_STRINGS_utf8_tolower (const char* input, 153GNUNET_STRINGS_utf8_tolower (const char* input,
154 char** output); 154 char** output);
155 155
156 156
@@ -198,9 +198,9 @@ GNUNET_STRINGS_filename_expand (const char *fil);
198 * (or number of bytes that would have been written) 198 * (or number of bytes that would have been written)
199 */ 199 */
200size_t 200size_t
201GNUNET_STRINGS_buffer_fill (char *buffer, 201GNUNET_STRINGS_buffer_fill (char *buffer,
202 size_t size, 202 size_t size,
203 unsigned int count, 203 unsigned int count,
204 ...); 204 ...);
205 205
206 206
@@ -237,7 +237,7 @@ GNUNET_STRINGS_absolute_time_to_string (struct GNUNET_TIME_Absolute t);
237/** 237/**
238 * Give relative time in human-readable fancy format. 238 * Give relative time in human-readable fancy format.
239 * This is one of the very few calls in the entire API that is 239 * This is one of the very few calls in the entire API that is
240 * NOT reentrant! 240 * NOT reentrant!
241 * 241 *
242 * @param delta time in milli seconds 242 * @param delta time in milli seconds
243 * @param do_round are we allowed to round a bit? 243 * @param do_round are we allowed to round a bit?
@@ -279,9 +279,9 @@ GNUNET_STRINGS_get_short_name (const char *filename);
279 * @return pointer to the next byte in 'out' or NULL on error. 279 * @return pointer to the next byte in 'out' or NULL on error.
280 */ 280 */
281char * 281char *
282GNUNET_STRINGS_data_to_string (const void *data, 282GNUNET_STRINGS_data_to_string (const void *data,
283 size_t size, 283 size_t size,
284 char *out, 284 char *out,
285 size_t out_size); 285 size_t out_size);
286 286
287 287
@@ -296,9 +296,9 @@ GNUNET_STRINGS_data_to_string (const void *data,
296 * @return GNUNET_OK on success, GNUNET_SYSERR if result has the wrong encoding 296 * @return GNUNET_OK on success, GNUNET_SYSERR if result has the wrong encoding
297 */ 297 */
298int 298int
299GNUNET_STRINGS_string_to_data (const char *enc, 299GNUNET_STRINGS_string_to_data (const char *enc,
300 size_t enclen, 300 size_t enclen,
301 void *out, 301 void *out,
302 size_t out_size); 302 size_t out_size);
303 303
304 304
@@ -319,7 +319,7 @@ GNUNET_STRINGS_string_to_data (const char *enc,
319 * (if they weren't NULL). 319 * (if they weren't NULL).
320 */ 320 */
321int 321int
322GNUNET_STRINGS_parse_uri (const char *path, 322GNUNET_STRINGS_parse_uri (const char *path,
323 char **scheme_part, 323 char **scheme_part,
324 const char **path_part); 324 const char **path_part);
325 325
@@ -339,9 +339,9 @@ GNUNET_STRINGS_parse_uri (const char *path,
339 * @return GNUNET_YES if 'filename' is absolute, GNUNET_NO otherwise. 339 * @return GNUNET_YES if 'filename' is absolute, GNUNET_NO otherwise.
340 */ 340 */
341int 341int
342GNUNET_STRINGS_path_is_absolute (const char *filename, 342GNUNET_STRINGS_path_is_absolute (const char *filename,
343 int can_be_uri, 343 int can_be_uri,
344 int *r_is_uri, 344 int *r_is_uri,
345 char **r_uri_scheme); 345 char **r_uri_scheme);
346 346
347 347
@@ -367,7 +367,7 @@ enum GNUNET_STRINGS_FilenameCheck
367 367
368 /** 368 /**
369 * Check that the path is an absolute path. 369 * Check that the path is an absolute path.
370 */ 370 */
371 GNUNET_STRINGS_CHECK_IS_ABSOLUTE = 0x00000008 371 GNUNET_STRINGS_CHECK_IS_ABSOLUTE = 0x00000008
372}; 372};
373 373
@@ -375,7 +375,7 @@ enum GNUNET_STRINGS_FilenameCheck
375/** 375/**
376 * Perform checks on 'filename'. FIXME: some duplication with 376 * Perform checks on 'filename'. FIXME: some duplication with
377 * "GNUNET_DISK_"-APIs. We should unify those. 377 * "GNUNET_DISK_"-APIs. We should unify those.
378 * 378 *
379 * @param filename file to check 379 * @param filename file to check
380 * @param checks checks to perform 380 * @param checks checks to perform
381 * @return GNUNET_YES if all checks pass, GNUNET_NO if at least one of them 381 * @return GNUNET_YES if all checks pass, GNUNET_NO if at least one of them
@@ -389,7 +389,7 @@ GNUNET_STRINGS_check_filename (const char *filename,
389/** 389/**
390 * Tries to convert 'zt_addr' string to an IPv6 address. 390 * Tries to convert 'zt_addr' string to an IPv6 address.
391 * The string is expected to have the format "[ABCD::01]:80". 391 * The string is expected to have the format "[ABCD::01]:80".
392 * 392 *
393 * @param zt_addr 0-terminated string. May be mangled by the function. 393 * @param zt_addr 0-terminated string. May be mangled by the function.
394 * @param addrlen length of zt_addr (not counting 0-terminator). 394 * @param addrlen length of zt_addr (not counting 0-terminator).
395 * @param r_buf a buffer to fill. Initially gets filled with zeroes, 395 * @param r_buf a buffer to fill. Initially gets filled with zeroes,
@@ -398,7 +398,7 @@ GNUNET_STRINGS_check_filename (const char *filename,
398 * case the contents of r_buf are undefined. 398 * case the contents of r_buf are undefined.
399 */ 399 */
400int 400int
401GNUNET_STRINGS_to_address_ipv6 (const char *zt_addr, 401GNUNET_STRINGS_to_address_ipv6 (const char *zt_addr,
402 uint16_t addrlen, 402 uint16_t addrlen,
403 struct sockaddr_in6 *r_buf); 403 struct sockaddr_in6 *r_buf);
404 404
@@ -406,7 +406,7 @@ GNUNET_STRINGS_to_address_ipv6 (const char *zt_addr,
406/** 406/**
407 * Tries to convert 'zt_addr' string to an IPv4 address. 407 * Tries to convert 'zt_addr' string to an IPv4 address.
408 * The string is expected to have the format "1.2.3.4:80". 408 * The string is expected to have the format "1.2.3.4:80".
409 * 409 *
410 * @param zt_addr 0-terminated string. May be mangled by the function. 410 * @param zt_addr 0-terminated string. May be mangled by the function.
411 * @param addrlen length of zt_addr (not counting 0-terminator). 411 * @param addrlen length of zt_addr (not counting 0-terminator).
412 * @param r_buf a buffer to fill. 412 * @param r_buf a buffer to fill.
@@ -414,7 +414,7 @@ GNUNET_STRINGS_to_address_ipv6 (const char *zt_addr,
414 * the contents of r_buf are undefined. 414 * the contents of r_buf are undefined.
415 */ 415 */
416int 416int
417GNUNET_STRINGS_to_address_ipv4 (const char *zt_addr, 417GNUNET_STRINGS_to_address_ipv4 (const char *zt_addr,
418 uint16_t addrlen, 418 uint16_t addrlen,
419 struct sockaddr_in *r_buf); 419 struct sockaddr_in *r_buf);
420 420
@@ -422,7 +422,7 @@ GNUNET_STRINGS_to_address_ipv4 (const char *zt_addr,
422/** 422/**
423 * Tries to convert 'addr' string to an IP (v4 or v6) address. 423 * Tries to convert 'addr' string to an IP (v4 or v6) address.
424 * Will automatically decide whether to treat 'addr' as v4 or v6 address. 424 * Will automatically decide whether to treat 'addr' as v4 or v6 address.
425 * 425 *
426 * @param addr a string, may not be 0-terminated. 426 * @param addr a string, may not be 0-terminated.
427 * @param addrlen number of bytes in addr (if addr is 0-terminated, 427 * @param addrlen number of bytes in addr (if addr is 0-terminated,
428 * 0-terminator should not be counted towards addrlen). 428 * 0-terminator should not be counted towards addrlen).
@@ -451,8 +451,8 @@ GNUNET_STRINGS_to_address_ip (const char *addr,
451 * @return GNUNET_OK on success, GNUNET_SYSERR on failure 451 * @return GNUNET_OK on success, GNUNET_SYSERR on failure
452 */ 452 */
453int 453int
454GNUNET_STRINGS_get_utf8_args (int argc, 454GNUNET_STRINGS_get_utf8_args (int argc,
455 char *const *argv, 455 char *const *argv,
456 int *u8argc, 456 int *u8argc,
457 char *const **u8argv); 457 char *const **u8argv);
458 458