diff --git a/mozilla/include/xp_file.h b/mozilla/include/xp_file.h index 3f9297c3720..41cd30632b3 100644 --- a/mozilla/include/xp_file.h +++ b/mozilla/include/xp_file.h @@ -391,11 +391,6 @@ extern int XP_FileRename(const char * from, XP_FileType fromtype, extern int XP_FileRemove(const char * name, XP_FileType type); -extern int XP_MakeDirectory(const char* name, XP_FileType type); - -/* XP_MakeDirectoryR recursively creates all the directories needed */ -extern int XP_MakeDirectoryR(const char* name, XP_FileType type); - extern int XP_RemoveDirectory(const char *name, XP_FileType type); extern int XP_RemoveDirectoryRecursive(const char *name, XP_FileType type); diff --git a/mozilla/lib/xp/xp_file.c b/mozilla/lib/xp/xp_file.c index 78b2c151cfc..58f98bfae3e 100644 --- a/mozilla/lib/xp/xp_file.c +++ b/mozilla/lib/xp/xp_file.c @@ -42,6 +42,11 @@ XP_BEGIN_PROTOS +/* XP_MakeDirectoryR recursively creates all the directories needed */ +static int XP_MakeDirectory(const char* name, XP_FileType type); + +static int XP_MakeDirectoryR(const char* name, XP_FileType type); + #if defined (XP_MAC) || defined(XP_UNIX) /* Now that Mac is using stdio, we can share some of this. Yay. @@ -200,6 +205,7 @@ XP_File XP_FileOpen( const char* name, XP_FileType type, return result; } +#if 0 extern XP_Bool XP_FileNameContainsBadChars (const char *name) { #ifdef XP_MAC @@ -214,7 +220,7 @@ extern XP_Bool XP_FileNameContainsBadChars (const char *name) return TRUE; return FALSE; } - +#endif #endif /* XP_MAC || XP_UNIX */ #ifdef XP_UNIX @@ -289,7 +295,7 @@ int XP_FileRemove(const char * name, XP_FileType type) return result; } - +#if 0 int XP_FileRename(const char * from, XP_FileType fromtype, const char * to, XP_FileType totype) { @@ -306,10 +312,10 @@ int XP_FileRename(const char * from, XP_FileType fromtype, XP_FREE(toName); return res; } - +#endif /* Create a new directory */ - +static int XP_MakeDirectory(const char* name, XP_FileType type) { int result; @@ -382,6 +388,7 @@ int XP_MakeDirectory(const char* name, XP_FileType type) return result; } +#if 0 int XP_RemoveDirectory (const char *name, XP_FileType type) { char *tmp = WH_FileName(name, type); @@ -392,7 +399,6 @@ int XP_RemoveDirectory (const char *name, XP_FileType type) return ret; } -#if 0 /* ** This function deletes a directory and everything under it. ** Deleting directories with "non-file" files, such as links, @@ -460,7 +466,7 @@ int XP_RemoveDirectoryRecursive(const char *name, XP_FileType type) return ret; } #endif - +#if 0 int XP_FileTruncate(const char* name, XP_FileType type, int32 length) { char* filename = WH_FileName(name, type); @@ -470,7 +476,7 @@ int XP_FileTruncate(const char* name, XP_FileType type, int32 length) XP_FREE(filename); return result; } - +#endif /* Writes to a file @@ -1219,7 +1225,7 @@ xp_FileName (const char *name, XP_FileType type, char* buf, char* configBuf) return (char *) name; } -char * xp_FilePlatformName(const char * name, char* path) +static char * xp_FilePlatformName(const char * name, char* path) { if ((name == NULL) || (XP_STRLEN(name) > 1000)) return NULL; @@ -1227,6 +1233,7 @@ char * xp_FilePlatformName(const char * name, char* path) return path; } +#if 0 char * XP_PlatformFileToURL (const char *name) { char *prefix = "file://"; @@ -1239,15 +1246,18 @@ char * XP_PlatformFileToURL (const char *name) return retVal; } + char *XP_PlatformPartialPathToXPPartialPath(const char *platformPath) { /* using the unix XP_PlatformFileToURL, there is no escaping! */ return XP_STRDUP(platformPath); } +#endif #define CACHE_SUBDIRS +#if 0 char* XP_TempDirName(void) { @@ -1255,6 +1265,7 @@ XP_TempDirName(void) if (!tmp || !*tmp) tmp = "/tmp"; return XP_STRDUP(tmp); } +#endif static char * xp_TempName (XP_FileType type, const char * prefix, char* buf, char* buf2, unsigned int *count) @@ -1516,6 +1527,7 @@ XP_GetNewsRCFiles(void) #endif +#if 0 XP_Dir XP_OpenDir(const char * name, XP_FileType type) { XP_Dir dir = NULL; @@ -1537,7 +1549,7 @@ XP_Dir XP_OpenDir(const char * name, XP_FileType type) } return dir; } - +#endif #endif /* XP_UNIX */ #if defined(XP_UNIX) || defined(XP_WIN) || defined(XP_OS2) @@ -1545,6 +1557,7 @@ XP_Dir XP_OpenDir(const char * name, XP_FileType type) /* * Make all the directories specified in the path */ +static int XP_MakeDirectoryR(const char* name, XP_FileType type) { char separator; @@ -1627,6 +1640,7 @@ int XP_MakeDirectoryR(const char* name, XP_FileType type) spool.c has been retired. This routine has been adopted by lib/libmisc/dirprefs.c. This is only used for windows platform for now. jefft 7-24-97 */ +#if 0 XP_Bool XP_FileIsFullPath(const char * name) { #ifdef XP_WIN @@ -1642,7 +1656,7 @@ XP_Bool XP_FileIsFullPath(const char * name) return FALSE; #endif } - +#endif /******************************************************************************/ /* Thread-safe entry points: */