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.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/include/gnunet_strings_lib.h b/src/include/gnunet_strings_lib.h
index f43567611..db657f54e 100644
--- a/src/include/gnunet_strings_lib.h
+++ b/src/include/gnunet_strings_lib.h
@@ -541,6 +541,25 @@ GNUNET_STRINGS_get_utf8_args (int argc,
541 char *const **u8argv); 541 char *const **u8argv);
542 542
543 543
544/**
545 * Like strlcpy but portable. The given string @a src is copied in full length
546 * (until its null byte). The destination buffer is guaranteed to be
547 * null-terminated.
548 *
549 * to a destination buffer
550 * and ensures that the destination string is null-terminated.
551 *
552 * @param dst destination of the copy
553 * @param src source of the copy, must be null-terminated
554 * @param n the length of the string to copy, including its terminating null
555 * byte
556 * @return the length of the string that was copied, excluding the terminating
557 * null byte
558 */
559size_t
560GNUNET_strlcpy(char *dst, const char *src, size_t n);
561
562
544/* ***************** IPv4/IPv6 parsing ****************** */ 563/* ***************** IPv4/IPv6 parsing ****************** */
545 564
546struct GNUNET_STRINGS_PortPolicy 565struct GNUNET_STRINGS_PortPolicy
@@ -641,7 +660,6 @@ struct GNUNET_STRINGS_IPv6NetworkPolicy *
641GNUNET_STRINGS_parse_ipv6_policy (const char *routeListX); 660GNUNET_STRINGS_parse_ipv6_policy (const char *routeListX);
642 661
643 662
644
645#if 0 /* keep Emacsens' auto-indent happy */ 663#if 0 /* keep Emacsens' auto-indent happy */
646{ 664{
647#endif 665#endif