Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-11-11 18:03:26 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-11-11 18:03:26 +0300
commit3bb5fc9c7d10f7dec32f8d2a772fce69be468b15 (patch)
tree2acf79b72d49e35ac174cf8d122edcd8d15b1511 /source/blender/blenlib/BLI_dynstr.h
parentade1495f0e6951bda3ae9852414d86e7c1fd624e (diff)
* RNA: utility function to retrieve strings. It will use a fixed
size buffer if it's big enough, and otherwise allocate memory. * Added BLI_dynstr_appendf() to construct strings easily in printf style, this should make it easier to construct menu strings for example.
Diffstat (limited to 'source/blender/blenlib/BLI_dynstr.h')
-rw-r--r--source/blender/blenlib/BLI_dynstr.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_dynstr.h b/source/blender/blenlib/BLI_dynstr.h
index e5b94aecb4f..453e15a0f3b 100644
--- a/source/blender/blenlib/BLI_dynstr.h
+++ b/source/blender/blenlib/BLI_dynstr.h
@@ -56,7 +56,15 @@ DynStr* BLI_dynstr_new (void);
* @param ds The DynStr to append to.
* @param cstr The c-string to append.
*/
-void BLI_dynstr_append (DynStr *ds, char *cstr);
+void BLI_dynstr_append (DynStr *ds, const char *cstr);
+
+ /**
+ * Append a c-string to a DynStr, but with formatting like printf.
+ *
+ * @param ds The DynStr to append to.
+ * @param format The printf format string to use.
+ */
+void BLI_dynstr_appendf (DynStr *ds, const char *format, ...);
/**
* Find the length of a DynStr.
@@ -69,7 +77,7 @@ int BLI_dynstr_get_len (DynStr *ds);
/**
* Get a DynStr's contents as a c-string.
* <i> The returned c-string should be free'd
- * using BLI_freeN. </i>
+ * using MEM_freeN. </i>
*
* @param ds The DynStr of interest.
* @return The contents of @a ds as a c-string.