git.asbjorn.biz
/
swftools.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
added pagerange support
[swftools.git]
/
installer
/
utils.c
1
char* concatPaths(const char*base, const char*add)
2
{
3
int l1 = strlen(base);
4
int l2 = strlen(add);
5
int pos = 0;
6
char*n = 0;
7
while(l1 && base[l1-1] == '\\')
8
l1--;
9
while(pos < l2 && add[pos] == '\\')
10
pos++;
11
12
n = (char*)malloc(l1 + (l2-pos) + 2);
13
memcpy(n,base,l1);
14
n[l1]='\\';
15
strcpy(&n[l1+1],&add[pos]);
16
return n;
17
}
18