diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-03-14 20:18:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-03-14 20:18:36 +0300 |
commit | e3c746659e378d5e739f97a9256cbfe1fdec6fee (patch) | |
tree | e8cd2bfd88ab1b24c8fcd6508e5536c76f77c918 /source/creator/creator.c | |
parent | 128ecc7e822cdc989175a348edcc20f6858d6805 (diff) |
strip quites off buildinfo at startup (was doing this for splash screen and python api)
Diffstat (limited to 'source/creator/creator.c')
-rw-r--r-- | source/creator/creator.c | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index 9e910b7cad2..91b4ed09b40 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -107,11 +107,11 @@ // from buildinfo.c #ifdef BUILD_DATE -extern const char * build_date; -extern const char * build_time; -extern const char * build_rev; -extern const char * build_platform; -extern const char * build_type; +extern char build_date[]; +extern char build_time[]; +extern char build_rev[]; +extern char build_platform[]; +extern char build_type[]; #endif /* Local Function prototypes */ @@ -161,6 +161,18 @@ static void blender_esc(int sig) } } +/* buildinfo can have quotes */ +static void strip_quotes(char *str) +{ + if(str[0] == '"') { + int len= strlen(str) - 1; + memmove(str, str+1, len); + if(str[len-1] == '"') { + str[len-1]= '\0'; + } + } +} + static int print_version(int argc, char **argv, void *data) { #ifdef BUILD_DATE @@ -936,7 +948,15 @@ int main(int argc, char **argv) if(blender_path_env) BLI_strncpy(blender_path, blender_path_env, sizeof(blender_path)); } - + +#ifdef BUILD_DATE + strip_quotes(build_date); + strip_quotes(build_time); + strip_quotes(build_rev); + strip_quotes(build_platform); + strip_quotes(build_type); +#endif + RNA_init(); RE_engines_init(); |