Lines Matching refs:size

111 document, the term @dfn{allocated size} is always used to refer to the
117 @cindex allocation size of string
118 @cindex size of string
123 string than fit in its allocated size. When writing code that extends
178 @code{wmemcpy}) and invariably take an argument which specifies the size
185 size argument. Parameters to the @samp{wmem} functions must be of type
193 size argument to be passed. (Some of these functions accept a specified
208 known size.
244 the length of the string stored there, not its allocated size. You can
245 get the allocated size of the array that holds a string using
314 If the array @var{s} of size @var{maxlen} contains a null byte,
321 long as @var{maxlen} does not exceed the size of @var{s}'s array.
380 …pefun {void *} memcpy (void *restrict @var{to}, const void *restrict @var{from}, size_t @var{size})
383 The @code{memcpy} function copies @var{size} bytes from the object
401 …_t *} wmemcpy (wchar_t *restrict @var{wto}, const wchar_t *restrict @var{wfrom}, size_t @var{size})
404 The @code{wmemcpy} function copies @var{size} wide characters from the object
415 size_t size)
417 return (wchar_t *) memcpy (wto, wfrom, size * sizeof (wchar_t));
426 …efun {void *} mempcpy (void *restrict @var{to}, const void *restrict @var{from}, size_t @var{size})
430 function. It copies @var{size} bytes from the object beginning at
434 I.e., the value is @code{((void *) ((char *) @var{to} + @var{size}))}.
453 …t *} wmempcpy (wchar_t *restrict @var{wto}, const wchar_t *restrict @var{wfrom}, size_t @var{size})
457 function. It copies @var{size} wide characters from the object
461 beginning at @var{wto}. I.e., the value is @code{@var{wto} + @var{size}}.
472 size_t size)
474 return (wchar_t *) mempcpy (wto, wfrom, size * sizeof (wchar_t));
481 @deftypefun {void *} memmove (void *@var{to}, const void *@var{from}, size_t @var{size})
484 @code{memmove} copies the @var{size} bytes at @var{from} into the
485 @var{size} bytes at @var{to}, even if those two blocks of space
493 @deftypefun {wchar_t *} wmemmove (wchar_t *@var{wto}, const wchar_t *@var{wfrom}, size_t @var{size})
496 @code{wmemmove} copies the @var{size} wide characters at @var{wfrom}
497 into the @var{size} wide characters at @var{wto}, even if those two
509 size_t size)
511 return (wchar_t *) mempcpy (wto, wfrom, size * sizeof (wchar_t));
520 … memccpy (void *restrict @var{to}, const void *restrict @var{from}, int @var{c}, size_t @var{size})
523 This function copies no more than @var{size} bytes from @var{from} to
527 @var{size} bytes of @var{from}.
530 @deftypefun {void *} memset (void *@var{block}, int @var{c}, size_t @var{size})
534 @code{unsigned char}) into each of the first @var{size} bytes of the
538 @deftypefun {wchar_t *} wmemset (wchar_t *@var{block}, wchar_t @var{wc}, size_t @var{size})
542 @var{size} wide characters of the object beginning at @var{block}. It
649 @deftypefun void bcopy (const void *@var{from}, void *@var{to}, size_t @var{size})
657 @deftypefun void bzero (void *@var{block}, size_t @var{size})
731 since how can one otherwise ensure the allocated size of the buffer is
823 /* @r{Resize memory to the optimal size.} */
862 …efun {char *} strncpy (char *restrict @var{to}, const char *restrict @var{from}, size_t @var{size})
866 @var{size} bytes into @var{to}.
868 If @var{from} does not contain a null byte in its first @var{size}
869 bytes, @code{strncpy} copies just the first @var{size} bytes. In this
873 @var{size}. In this case @code{strncpy} copies all of @var{from},
874 followed by enough null bytes to add up to @var{size} bytes in all.
880 all @var{size} bytes of the destination, even when @var{size} is much
885 …_t *} wcsncpy (wchar_t *restrict @var{wto}, const wchar_t *restrict @var{wfrom}, size_t @var{size})
889 @var{size} wide characters into @var{wto}.
892 @var{size} wide characters, then @code{wcsncpy} copies just the first
893 @var{size} wide characters. In this case no null terminator is
897 @var{size}. In this case @code{wcsncpy} copies all of @var{wfrom},
898 followed by enough null wide characters to add up to @var{size} wide
909 @deftypefun {char *} strndup (const char *@var{s}, size_t @var{size})
913 @var{size} bytes into the newly allocated string.
915 If the length of @var{s} is more than @var{size}, then @code{strndup}
916 copies just the first @var{size} bytes and adds a closing null byte.
928 @deftypefn {Macro} {char *} strndupa (const char *@var{s}, size_t @var{size})
946 …efun {char *} stpncpy (char *restrict @var{to}, const char *restrict @var{from}, size_t @var{size})
950 @var{size} bytes into @var{to}.
952 If the length of @var{from} is more than @var{size}, then @code{stpncpy}
953 copies just the first @var{size} bytes and returns a pointer to the
957 If the length of @var{from} is less than @var{size}, then @code{stpncpy}
959 to @var{size} bytes in all. This behavior is rarely useful, but it
974 …_t *} wcpncpy (wchar_t *restrict @var{wto}, const wchar_t *restrict @var{wfrom}, size_t @var{size})
980 If the length of @var{wfrom} is more than @var{size}, then
981 @code{wcpncpy} copies just the first @var{size} wide characters and
986 If the length of @var{wfrom} is less than @var{size}, then @code{wcpncpy}
988 to @var{size} wide characters in all. This behavior is rarely useful, but it
1004 …efun {char *} strncat (char *restrict @var{to}, const char *restrict @var{from}, size_t @var{size})
1007 This function is like @code{strcat} except that not more than @var{size}
1011 allocated size of @var{to} must be at least @code{@var{size} + 1} bytes
1019 strncat (char *to, const char *from, size_t size)
1022 memcpy (to + len, from, strnlen (from, size));
1023 to[len + strnlen (from, size)] = '\0';
1038 …_t *} wcsncat (wchar_t *restrict @var{wto}, const wchar_t *restrict @var{wfrom}, size_t @var{size})
1041 This function is like @code{wcscat} except that not more than @var{size}
1045 size of @var{to} must be at least @code{wcsnlen (@var{wfrom},
1046 @var{size}) + 1} wide characters longer than its initial length.
1054 size_t size)
1057 memcpy (wto + len, wfrom, wcsnlen (wfrom, size) * sizeof (wchar_t));
1058 wto[len + wcsnlen (wfrom, size)] = L'\0';
1093 strings to fit arbitrary size limits. @xref{Semantics, , Writing
1126 @deftypefun int memcmp (const void *@var{a1}, const void *@var{a2}, size_t @var{size})
1129 The function @code{memcmp} compares the @var{size} bytes of memory
1130 beginning at @var{a1} against the @var{size} bytes of memory beginning
1139 @deftypefun int wmemcmp (const wchar_t *@var{a1}, const wchar_t *@var{a2}, size_t @var{size})
1142 The function @code{wmemcmp} compares the @var{size} wide characters
1143 beginning at @var{a1} against the @var{size} wide characters beginning
1167 than their allocated size. The contents of these ``holes'' are
1263 @deftypefun int strncmp (const char *@var{s1}, const char *@var{s2}, size_t @var{size})
1267 @var{size} bytes are compared. In other words, if the two
1268 strings are the same in their first @var{size} bytes, the
1272 @deftypefun int wcsncmp (const wchar_t *@var{ws1}, const wchar_t *@var{ws2}, size_t @var{size})
1276 @var{size} wide characters are compared. In other words, if the two
1277 strings are the same in their first @var{size} wide characters, the
1407 @deftypefun int bcmp (const void *@var{a1}, const void *@var{a2}, size_t @var{size})
1505 …ypefun size_t strxfrm (char *restrict @var{to}, const char *restrict @var{from}, size_t @var{size})
1512 to @var{size} bytes (including a terminating null byte) are
1519 value is not affected by the value of @var{size}, but if it is greater
1520 or equal than @var{size}, it means that the transformed string did not
1528 If @var{size} is zero, no bytes are stored in @var{to}. In this
1531 what size the allocated array should be. It does not matter what
1532 @var{to} is if @var{size} is zero; @var{to} may even be a null pointer.
1535 …typefun size_t wcsxfrm (wchar_t *restrict @var{wto}, const wchar_t *@var{wfrom}, size_t @var{size})
1541 @var{wto}. Up to @var{size} wide characters (including a terminating null
1548 string. This value is not affected by the value of @var{size}, but if
1549 it is greater or equal than @var{size}, it means that the transformed
1558 If @var{size} is zero, no wide characters are stored in @var{to}. In this
1561 useful for determining what size the allocated array should be (remember
1563 @var{wto} is if @var{size} is zero; @var{wto} may even be a null pointer.
1694 @deftypefun {void *} memchr (const void *@var{block}, int @var{c}, size_t @var{size})
1698 to an @code{unsigned char}) in the initial @var{size} bytes of the
1703 @deftypefun {wchar_t *} wmemchr (const wchar_t *@var{block}, wchar_t @var{wc}, size_t @var{size})
1707 in the initial @var{size} wide characters of the object beginning at
1717 parameters. But this means that the @var{size} parameter is not really
1723 that the @var{size} parameter is missing. The function will look beyond
1742 @deftypefun {void *} memrchr (const void *@var{block}, int @var{c}, size_t @var{size})
1746 backwards from the end of the block defined by @var{block} and @var{size}
2645 type @code{char *}, and a size, of type @code{size_t}, both of which can
2647 functions accept either a pointer and a size argument, or pointers to