mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
Sys_PathType has been unnecessary for a while so nuke it
This commit is contained in:
parent
74d8c3e379
commit
2a399cc4b4
3 changed files with 3 additions and 30 deletions
|
@ -42,12 +42,6 @@ extern struct cvar_s *developer;
|
||||||
|
|
||||||
extern const char sys_char_map[256];
|
extern const char sys_char_map[256];
|
||||||
|
|
||||||
enum e_pathtype {
|
|
||||||
PATHTYPE_ABSOLUTE,
|
|
||||||
PATHTYPE_RELATIVE_ABOVE,
|
|
||||||
PATHTYPE_RELATIVE_BELOW
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct date_s {
|
typedef struct date_s {
|
||||||
int sec;
|
int sec;
|
||||||
int min;
|
int min;
|
||||||
|
@ -60,7 +54,6 @@ typedef struct date_s {
|
||||||
|
|
||||||
int Sys_FileTime (const char *path);
|
int Sys_FileTime (const char *path);
|
||||||
void Sys_mkdir (const char *path);
|
void Sys_mkdir (const char *path);
|
||||||
enum e_pathtype Sys_PathType (const char *path);
|
|
||||||
|
|
||||||
typedef void (*sys_printf_t) (const char *fmt, va_list args);
|
typedef void (*sys_printf_t) (const char *fmt, va_list args);
|
||||||
|
|
||||||
|
|
|
@ -749,7 +749,7 @@ GIB_Event_Register_f (void)
|
||||||
|
|
||||||
/* File access */
|
/* File access */
|
||||||
|
|
||||||
int (*GIB_File_Transform_Path) (dstring_t * path) = NULL;
|
static int (*GIB_File_Transform_Path) (dstring_t * path) = NULL;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
GIB_File_Transform_Path_Null (dstring_t * path)
|
GIB_File_Transform_Path_Null (dstring_t * path)
|
||||||
|
@ -769,10 +769,9 @@ GIB_File_Transform_Path_Secure (dstring_t * path)
|
||||||
|
|
||||||
for (s = strchr (path->str, '\\'); s; s = strchr (s, '\\'))
|
for (s = strchr (path->str, '\\'); s; s = strchr (s, '\\'))
|
||||||
*s = '/';
|
*s = '/';
|
||||||
if (Sys_PathType (path->str) != PATHTYPE_RELATIVE_BELOW)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
dstring_insertstr (path, 0, "/");
|
if (path->str[0] != '/')
|
||||||
|
dstring_insertstr (path, 0, "/");
|
||||||
dstring_insertstr (path, 0, qfs_gamedir->dir.def);
|
dstring_insertstr (path, 0, qfs_gamedir->dir.def);
|
||||||
dstring_insertstr (path, 0, "/");
|
dstring_insertstr (path, 0, "/");
|
||||||
dstring_insertstr (path, 0, qfs_userpath);
|
dstring_insertstr (path, 0, qfs_userpath);
|
||||||
|
|
|
@ -183,25 +183,6 @@ Sys_FileTime (const char *path)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum e_pathtype
|
|
||||||
Sys_PathType (const char *path)
|
|
||||||
{
|
|
||||||
enum e_pathtype type;
|
|
||||||
char *comp = QFS_CompressPath (path);
|
|
||||||
if (comp[0] == '/'
|
|
||||||
#ifdef WIN32
|
|
||||||
|| (comp[0] && comp[1] == ':')
|
|
||||||
#endif /* WIN32 */
|
|
||||||
)
|
|
||||||
type = PATHTYPE_ABSOLUTE;
|
|
||||||
else if (comp[0] == '.' && comp[1] == '.')
|
|
||||||
type = PATHTYPE_RELATIVE_ABOVE;
|
|
||||||
else
|
|
||||||
type = PATHTYPE_RELATIVE_BELOW;
|
|
||||||
free (comp);
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Sys_SetPrintf
|
Sys_SetPrintf
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue