From: Matthias Kramm Date: Sat, 7 Feb 2009 22:44:01 +0000 (+0100) Subject: export path_seperator X-Git-Tag: release-0-9-0~137 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=53bc7f90f1b258112e8f804a1894e29810c2a4e4 export path_seperator --- diff --git a/lib/os.c b/lib/os.c index 8ba360a..383473e 100755 --- a/lib/os.c +++ b/lib/os.c @@ -47,11 +47,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #endif #if defined(CYGWIN) -static char seperator = '/'; +char path_seperator = '/'; #elif defined(WIN32) -static char seperator = '\\'; +char path_seperator = '\\'; #else -static char seperator = '/'; +char path_seperator = '/'; #endif #ifdef WIN32 @@ -146,14 +146,14 @@ char* concatPaths(const char*base, const char*add) int l2 = strlen(add); int pos = 0; char*n = 0; - while(l1 && base[l1-1] == seperator) + while(l1 && base[l1-1] == path_seperator) l1--; - while(pos < l2 && add[pos] == seperator) + while(pos < l2 && add[pos] == path_seperator) pos++; n = (char*)malloc(l1 + (l2-pos) + 2); memcpy(n,base,l1); - n[l1]=seperator; + n[l1]=path_seperator; strcpy(&n[l1+1],&add[pos]); return n; } diff --git a/lib/os.h b/lib/os.h index 7aadc2f..8452f7d 100755 --- a/lib/os.h +++ b/lib/os.h @@ -29,6 +29,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ extern "C" { #endif +extern char*path_seperator; + #ifdef WIN32 char* getRegistryEntry(char*path); int setRegistryEntry(char*key,char*value);