]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - common.h
common: Update OpenBSD strlcpy and strlcat implementation
[xonotic/darkplaces.git] / common.h
index 169d989bd257a82c12b0eab8a7673e2565b29526..e359dd16ae683f59784400ef7de54dab6d8723fa 100644 (file)
--- a/common.h
+++ b/common.h
@@ -368,22 +368,22 @@ void InfoString_Print(char *buffer);
 
 #ifndef HAVE_STRLCAT
 /*!
- * Appends src to string dst of size siz (unlike strncat, siz is the
- * full size of dst, not space left).  At most siz-1 characters
- * will be copied.  Always NUL terminates (unless siz <= strlen(dst)).
- * Returns strlen(src) + MIN(siz, strlen(initial dst)).
- * If retval >= siz, truncation occurred.
+ * Appends src to string dst of size dsize (unlike strncat, dsize is the
+ * full size of dst, not space left).  At most dsize-1 characters
+ * will be copied.  Always NUL terminates (unless dsize <= strlen(dst)).
+ * Returns strlen(src) + MIN(dsize, strlen(initial dst)).
+ * If retval >= dsize, truncation occurred.
  */
-size_t strlcat(char *dst, const char *src, size_t siz);
+size_t strlcat(char *dst, const char *src, size_t dsize);
 #endif  // #ifndef HAVE_STRLCAT
 
 #ifndef HAVE_STRLCPY
 /*!
- * Copy src to string dst of size siz.  At most siz-1 characters
- * will be copied.  Always NUL terminates (unless siz == 0).
- * Returns strlen(src); if retval >= siz, truncation occurred.
+ * Copy string src to buffer dst of size dsize.  At most dsize-1
+ * chars will be copied.  Always NUL terminates (unless dsize == 0).
+ * Returns strlen(src); if retval >= dsize, truncation occurred.
  */
-size_t strlcpy(char *dst, const char *src, size_t siz);
+size_t strlcpy(char *dst, const char *src, size_t dsize);
 
 #endif  // #ifndef HAVE_STRLCPY