From 2c36c760e57965584bbbdfd0c2d8e2962e0c587a Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 25 Oct 2016 14:57:31 -0300 Subject: [PATCH] test --- src/komodo_utils.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 380be4687..2215338f7 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -922,6 +922,22 @@ long _stripwhite(char *buf,int accept) return(j); } +char *clonestr(char *str) +{ + char *clone; + if ( str == 0 || str[0] == 0 ) + { + printf("warning cloning nullstr.%p\n",str); +#ifdef __APPLE__ + while ( 1 ) sleep(1); +#endif + str = (char *)""; + } + clone = (char *)malloc(strlen(str)+16); + strcpy(clone,str); + return(clone); +} + char *parse_conf_line(char *line,char *field) { line += strlen(field);