Skip to content
Snippets Groups Projects
Commit fcd89421 authored by rswindell's avatar rswindell
Browse files

Moved getfname from filedat.c to misc.c (for use in SCFG).

parent 6d8c85af
No related branches found
No related tags found
No related merge requests found
......@@ -546,21 +546,6 @@ char* DLLCALL padfname(char *filename, char *str)
return(str);
}
char* DLLCALL getfname(char* path)
{
char *fname;
fname=strrchr(path,'/');
if(fname==NULL)
fname=strrchr(path,'\\');
if(fname!=NULL)
fname++;
else
fname=path;
return(fname);
}
/****************************************************************************/
/* Turns FILE .EXT into FILE.EXT */
/****************************************************************************/
......
......@@ -38,6 +38,23 @@
#include "sbbs.h"
#include "crc32.h"
/****************************************************************************/
/* Return the filename portion of a full pathname */
/****************************************************************************/
char* DLLCALL getfname(char* path)
{
char *fname;
fname=strrchr(path,'/');
if(fname==NULL)
fname=strrchr(path,'\\');
if(fname!=NULL)
fname++;
else
fname=path;
return(fname);
}
/****************************************************************************/
/* Network open function. Opens all files DENYALL and retries LOOP_NOPEN */
/* number of times if the attempted file is already open or denying access */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment