From 20c366b27ea25e6c576f7ed1343fb88a7453e267 Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Sun, 28 Mar 2010 17:21:39 +0000 Subject: [PATCH] Comment logic of strxcpy() --- goldlib/gall/gstrall.h | 2 ++ goldlib/gall/gstrutil.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/goldlib/gall/gstrall.h b/goldlib/gall/gstrall.h index 68b918c..1675e38 100644 --- a/goldlib/gall/gstrall.h +++ b/goldlib/gall/gstrall.h @@ -92,6 +92,8 @@ char* StripQuotes(char* str); // Safe versions of strcpy, strcat, sequencial strcat... TCHAR *strxcpy(TCHAR *d, const TCHAR *s, size_t n); +// strxcpy: copy not more n-1 bytes of "s" into "d", insert '\0' into end of string. +// return d char* strxcat(char *dest, const char *src, size_t max); char* strxmerge(char *dest, size_t max, ...); diff --git a/goldlib/gall/gstrutil.cpp b/goldlib/gall/gstrutil.cpp index ad7abe2..c9bb1c0 100644 --- a/goldlib/gall/gstrutil.cpp +++ b/goldlib/gall/gstrutil.cpp @@ -612,7 +612,8 @@ const char* strrword(const char* str, const char *separator) { // ------------------------------------------------------------------ - +// copy not more n-1 bytes of "s" into "d", insert '\0' into end of string. +// return d TCHAR *strxcpy(TCHAR *d, const TCHAR *s, size_t n) { #if defined(_tcsncpy_s)