]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/Include/string.h
Add Socket Libraries.
[mirror_edk2.git] / StdLib / Include / string.h
index 992ca0ba18a5d17cc3dcac7f026e1c62eb8ee438..517b9e6e98a6474e9fe12d1581973db585cd6738 100644 (file)
@@ -324,15 +324,31 @@ int     strerror_r(int, char *, size_t);
 int     strcasecmp(const char *s1, const char *s2);\r
 void   *memccpy   (void *, const void *, int, size_t);\r
 int     strncasecmp(const char *s1, const char *s2, size_t n);\r
+size_t  strlcpy(char *destination, const char *source, size_t size);\r
+size_t  strlcat(char *destination, const char *source, size_t size);\r
 \r
-// bcopy is same as memcpy but it is a void function, being used in socket lib\r
-#define bcopy(a,b,c) ( memcpy((void *)a, (void *)b, (size_t)c))\r
+// bcopy is is a void function with the src/dest arguments reversed, being used in socket lib\r
+#define bcopy(a,b,c) ( memcpy((void *)b, (const void *)a, (size_t)c))\r
 \r
 // bcmp is same as memcmp, returns 0 for successful compare, non-zero otherwise\r
 #define bcmp(a,b,c) ( memcmp((void *)a, (void *)b, (size_t)c))\r
 \r
-//strsep is the same as strtok, the only difference is for strsep the 1st parameter is a char**\r
-#define strsep(a,b) (strtok(*a,b))\r
+/*\r
+ * Get next token from string *stringp, where tokens are possibly-empty\r
+ * strings separated by characters from delim.\r
+ *\r
+ * Writes NULs into the string at *stringp to end tokens.\r
+ * delim need not remain constant from call to call.\r
+ * On return, *stringp points past the last NUL written (if there might\r
+ * be further tokens), or is NULL (if there are definitely no more tokens).\r
+ *\r
+ * If *stringp is NULL, strsep returns NULL.\r
+ */\r
+char *\r
+strsep(\r
+  register char **stringp,\r
+  register const char *delim\r
+  );\r
 \r
 __END_DECLS\r
 \r