"Fossies" - the Fresh Open Source Software Archive

Member "unrar/pathfn.hpp" (4 May 2022, 2966 Bytes) of package /linux/misc/unrarsrc-6.1.7.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "pathfn.hpp" see the Fossies "Dox" file reference documentation.

    1 #ifndef _RAR_PATHFN_
    2 #define _RAR_PATHFN_
    3 
    4 wchar* PointToName(const wchar *Path);
    5 wchar* PointToLastChar(const wchar *Path);
    6 wchar* ConvertPath(const wchar *SrcPath,wchar *DestPath,size_t DestSize);
    7 void SetName(wchar *FullName,const wchar *Name,size_t MaxSize);
    8 void SetExt(wchar *Name,const wchar *NewExt,size_t MaxSize);
    9 void SetSFXExt(wchar *SFXName,size_t MaxSize);
   10 wchar *GetExt(const wchar *Name);
   11 bool CmpExt(const wchar *Name,const wchar *Ext);
   12 bool IsWildcard(const wchar *Str);
   13 bool IsPathDiv(int Ch);
   14 bool IsDriveDiv(int Ch);
   15 bool IsDriveLetter(const wchar *Path);
   16 int GetPathDisk(const wchar *Path);
   17 void AddEndSlash(wchar *Path,size_t MaxLength);
   18 void MakeName(const wchar *Path,const wchar *Name,wchar *Pathname,size_t MaxSize);
   19 void GetFilePath(const wchar *FullName,wchar *Path,size_t MaxLength);
   20 void RemoveNameFromPath(wchar *Path);
   21 #if defined(_WIN_ALL) && !defined(SFX_MODULE)
   22 bool GetAppDataPath(wchar *Path,size_t MaxSize,bool Create);
   23 void GetRarDataPath(wchar *Path,size_t MaxSize,bool Create);
   24 #endif
   25 #ifndef SFX_MODULE
   26 bool EnumConfigPaths(uint Number,wchar *Path,size_t MaxSize,bool Create);
   27 void GetConfigName(const wchar *Name,wchar *FullName,size_t MaxSize,bool CheckExist,bool Create);
   28 #endif
   29 wchar* GetVolNumPart(const wchar *ArcName);
   30 void NextVolumeName(wchar *ArcName,uint MaxLength,bool OldNumbering);
   31 bool IsNameUsable(const wchar *Name);
   32 void MakeNameUsable(char *Name,bool Extended);
   33 void MakeNameUsable(wchar *Name,bool Extended);
   34 
   35 void UnixSlashToDos(const char *SrcName,char *DestName,size_t MaxLength);
   36 void DosSlashToUnix(const char *SrcName,char *DestName,size_t MaxLength);
   37 void UnixSlashToDos(const wchar *SrcName,wchar *DestName,size_t MaxLength);
   38 void DosSlashToUnix(const wchar *SrcName,wchar *DestName,size_t MaxLength);
   39 
   40 inline void SlashToNative(const char *SrcName,char *DestName,size_t MaxLength)
   41 {
   42 #ifdef _WIN_ALL
   43   UnixSlashToDos(SrcName,DestName,MaxLength);
   44 #else
   45   DosSlashToUnix(SrcName,DestName,MaxLength);
   46 #endif
   47 }
   48 
   49 inline void SlashToNative(const wchar *SrcName,wchar *DestName,size_t MaxLength)
   50 {
   51 #ifdef _WIN_ALL
   52   UnixSlashToDos(SrcName,DestName,MaxLength);
   53 #else
   54   DosSlashToUnix(SrcName,DestName,MaxLength);
   55 #endif
   56 }
   57 
   58 void ConvertNameToFull(const wchar *Src,wchar *Dest,size_t MaxSize);
   59 bool IsFullPath(const wchar *Path);
   60 bool IsFullRootPath(const wchar *Path);
   61 void GetPathRoot(const wchar *Path,wchar *Root,size_t MaxSize);
   62 int ParseVersionFileName(wchar *Name,bool Truncate);
   63 wchar* VolNameToFirstName(const wchar *VolName,wchar *FirstName,size_t MaxSize,bool NewNumbering);
   64 wchar* GetWideName(const char *Name,const wchar *NameW,wchar *DestW,size_t DestSize);
   65 
   66 #ifndef SFX_MODULE
   67 void GenerateArchiveName(wchar *ArcName,size_t MaxSize,const wchar *GenerateMask,bool Archiving);
   68 #endif
   69 
   70 #ifdef _WIN_ALL
   71 bool GetWinLongPath(const wchar *Src,wchar *Dest,size_t MaxSize);
   72 void ConvertToPrecomposed(wchar *Name,size_t NameSize);
   73 void MakeNameCompatible(wchar *Name,size_t MaxSize);
   74 #endif
   75 
   76 
   77 #endif