summaryrefslogtreecommitdiff
path: root/storage/connect/xobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'storage/connect/xobject.cpp')
-rw-r--r--storage/connect/xobject.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/storage/connect/xobject.cpp b/storage/connect/xobject.cpp
index 817acb561fe..92bf039c07c 100644
--- a/storage/connect/xobject.cpp
+++ b/storage/connect/xobject.cpp
@@ -290,6 +290,34 @@ bool STRING::Set(char *s, uint n)
} // end of Set
/***********************************************************************/
+/* Append a char* to a STRING. */
+/***********************************************************************/
+bool STRING::Append(const char *s, uint ln)
+{
+ if (!s)
+ return false;
+
+ uint len = Length + ln + 1;
+
+ if (len > Size) {
+ char *p = Realloc(len);
+
+ if (!p)
+ return true;
+ else if (p != Strp) {
+ strcpy(p, Strp);
+ Strp = p;
+ } // endif p
+
+ } // endif n
+
+ strncpy(Strp + Length, s, ln);
+ Length = len - 1;
+ Strp[Length] = 0;
+ return false;
+} // end of Append
+
+/***********************************************************************/
/* Append a PSZ to a STRING. */
/***********************************************************************/
bool STRING::Append(PSZ s)