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:
authorCampbell Barton <ideasman42@gmail.com>2013-03-29 10:25:22 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-29 10:25:22 +0400
commit1777a69818610d4ed8a93f661a45219d97e7f6c5 (patch)
treebbfb0b35629e94ffd727f4a8b98fbf6cbebdaa36 /intern/utfconv
parentab41583bc2be591c0af921b243158e43a94505d7 (diff)
misc minor edits.
- pass string size to BLI_timestr() to avoid possible buffer overrun. - quiet warning for mingw. - include guards for windows utf conversion funcs. - fix for mistage in edge-angle-selection check. - some style cleanup.
Diffstat (limited to 'intern/utfconv')
-rw-r--r--intern/utfconv/utf_winfunc.c4
-rw-r--r--intern/utfconv/utf_winfunc.h13
-rw-r--r--intern/utfconv/utfconv.h5
3 files changed, 16 insertions, 6 deletions
diff --git a/intern/utfconv/utf_winfunc.c b/intern/utfconv/utf_winfunc.c
index 9f3e96b47fe..2ae261b44a8 100644
--- a/intern/utfconv/utf_winfunc.c
+++ b/intern/utfconv/utf_winfunc.c
@@ -34,7 +34,7 @@
#include <wchar.h>
-FILE * ufopen(const char * filename, const char * mode)
+FILE *ufopen(const char *filename, const char *mode)
{
FILE *f = NULL;
UTF16_ENCODE(filename);
@@ -120,7 +120,7 @@ int umkdir(const char *pathname)
return r ? 0 : -1;
}
-char * u_alloc_getenv(const char *varname)
+char *u_alloc_getenv(const char *varname)
{
char * r = 0;
wchar_t * str;
diff --git a/intern/utfconv/utf_winfunc.h b/intern/utfconv/utf_winfunc.h
index e23a5dd5797..8dd77275dcb 100644
--- a/intern/utfconv/utf_winfunc.h
+++ b/intern/utfconv/utf_winfunc.h
@@ -23,21 +23,26 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef __UTF_WINFUNC_H__
+#define __UTF_WINFUNC_H__
+
#ifndef WIN32
# error "This file can only compile on windows"
#endif
#include <stdio.h>
-FILE * ufopen(const char * filename, const char * mode);
+FILE *ufopen(const char * filename, const char * mode);
int uopen(const char *filename, int oflag, int pmode);
int uaccess(const char *filename, int mode);
-int urename(const char *oldname, const char *newname );
+int urename(const char *oldname, const char *newname);
-char * u_alloc_getenv(const char *varname);
+char *u_alloc_getenv(const char *varname);
void u_free_getenv(char *val);
-int uput_getenv(const char *varname, char * value, size_t buffsize);
+int uput_getenv(const char *varname, char *value, size_t buffsize);
int uputenv(const char *name, const char *value);
int umkdir(const char *pathname);
+
+#endif /* __UTF_WINFUNC_H__ */
diff --git a/intern/utfconv/utfconv.h b/intern/utfconv/utfconv.h
index 22710bfdb37..f00f4aeef27 100644
--- a/intern/utfconv/utfconv.h
+++ b/intern/utfconv/utfconv.h
@@ -23,6 +23,9 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#ifndef __UTFCONV_H__
+#define __UTFCONV_H__
+
#include <wchar.h>
#include <stdio.h>
#include <stdlib.h>
@@ -98,3 +101,5 @@ wchar_t *alloc_utf16_from_8(const char *in8, size_t add);
#ifdef __cplusplus
}
#endif
+
+#endif /* __UTFCONV_H__ */