*** 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:
Lee Salzman
2007-12-26 08:44:59 +00:00
parent f3f363ab0c
commit a46fa45901
25 changed files with 133 additions and 124 deletions
+9 -7
View File
@@ -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, '/');