*** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1495 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -15,14 +15,8 @@
|
||||
string homedir = "";
|
||||
vector<char *> packagedirs;
|
||||
|
||||
char *path(char *s, bool copy)
|
||||
char *path(char *s)
|
||||
{
|
||||
if(copy)
|
||||
{
|
||||
static string tmp;
|
||||
s_strcpy(tmp, s);
|
||||
s = tmp;
|
||||
}
|
||||
for(char *t = s; (t = strpbrk(t, "/\\")); *t++ = PATHDIV);
|
||||
for(char *prevdir = NULL, *curdir = s;;)
|
||||
{
|
||||
@@ -44,6 +38,14 @@ char *path(char *s, bool copy)
|
||||
return s;
|
||||
}
|
||||
|
||||
char *path(const char *s, bool copy)
|
||||
{
|
||||
static string tmp;
|
||||
s_strcpy(tmp, s);
|
||||
path(tmp);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
const char *parentdir(const char *directory)
|
||||
{
|
||||
const char *p = strrchr(directory, '/');
|
||||
|
||||
Reference in New Issue
Block a user