*** empty log message ***
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@548 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -12,6 +12,16 @@ char *path(char *s)
|
||||
return s;
|
||||
};
|
||||
|
||||
char *parentdir(char *directory)
|
||||
{
|
||||
char *p = strrchr(directory, '/');
|
||||
if(!p) p = directory;
|
||||
size_t len = p-directory+1;
|
||||
char *parent = new char[len];
|
||||
s_strncpy(parent, directory, len);
|
||||
return parent;
|
||||
};
|
||||
|
||||
char *loadfile(char *fn, int *size)
|
||||
{
|
||||
FILE *f = fopen(fn, "rb");
|
||||
|
||||
Reference in New Issue
Block a user