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:
Diffstat (limited to 'source/blender/blenlib/BLI_string.h')
-rw-r--r--source/blender/blenlib/BLI_string.h34
1 files changed, 23 insertions, 11 deletions
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h
index ccb10190816..36835e0c9ca 100644
--- a/source/blender/blenlib/BLI_string.h
+++ b/source/blender/blenlib/BLI_string.h
@@ -32,6 +32,10 @@
#ifndef BLI_STRING_H
#define BLI_STRING_H
+/** \file BLI_string.h
+ * \ingroup bli
+ */
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -57,6 +61,14 @@ char *BLI_strdup(const char *str);
char *BLI_strdupn(const char *str, int len);
/**
+ * Appends the two strings, and returns new mallocN'ed string
+ * @param str1 first string for copy
+ * @param str2 second string for append
+ * @retval Returns dst
+ */
+char *BLI_strdupcat(const char *str1, const char *str2);
+
+ /**
* Like strncpy but ensures dst is always
* '\0' terminated.
*
@@ -66,15 +78,7 @@ char *BLI_strdupn(const char *str, int len);
* the size of dst)
* @retval Returns dst
*/
-char *BLI_strdupcat(const char *str1, const char *str2);
-
- /**
- * Appends the two strings, and returns new mallocN'ed string
- * @param str1 first string for copy
- * @param str2 second string for append
- * @retval Returns dst
- */
-char *BLI_strncpy(char *dst, const char *src, int maxncpy);
+char *BLI_strncpy(char *dst, const char *src, const int maxncpy);
/* Makes a copy of the text within the "" that appear after some text 'blahblah'
* i.e. for string 'pose["apples"]' with prefix 'pose[', it should grab "apples"
@@ -102,13 +106,21 @@ char *BLI_replacestr(char *str, const char *oldText, const char *newText);
/*
* Replacement for snprintf
*/
-int BLI_snprintf(char *buffer, size_t count, const char *format, ...);
+int BLI_snprintf(char *buffer, size_t count, const char *format, ...)
+#ifdef __GNUC__
+__attribute__ ((format (printf, 3, 4)));
+#endif
+;
/*
* Print formatted string into a newly mallocN'd string
* and return it.
*/
-char *BLI_sprintfN(const char *format, ...);
+char *BLI_sprintfN(const char *format, ...)
+#ifdef __GNUC__
+__attribute__ ((format (printf, 1, 2)));
+#endif
+;
/**
* Compare two strings