"Fossies" - the Fresh Open Source Software Archive

Member "unrar/cmddata.hpp" (4 May 2022, 2077 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 "cmddata.hpp" see the Fossies "Dox" file reference documentation.

    1 #ifndef _RAR_CMDDATA_
    2 #define _RAR_CMDDATA_
    3 
    4 
    5 #define DefaultStoreList L"7z;ace;arj;bz2;cab;gz;jpeg;jpg;lha;lz;lzh;mp3;rar;taz;tgz;xz;z;zip;zipx"
    6 
    7 enum RAR_CMD_LIST_MODE {RCLM_AUTO,RCLM_REJECT_LISTS,RCLM_ACCEPT_LISTS};
    8 
    9 enum IS_PROCESS_FILE_FLAGS {IPFF_EXCLUDE_PARENT=1};
   10 
   11 class CommandData:public RAROptions
   12 {
   13   private:
   14     void ProcessSwitch(const wchar *Switch);
   15     void BadSwitch(const wchar *Switch);
   16     uint GetExclAttr(const wchar *Str,bool &Dir);
   17 #if !defined(SFX_MODULE)
   18     void SetTimeFilters(const wchar *Mod,bool Before,bool Age);
   19     void SetStoreTimeMode(const wchar *S);
   20 #endif
   21 
   22     bool FileLists;
   23     bool NoMoreSwitches;
   24     RAR_CMD_LIST_MODE ListMode;
   25     bool BareOutput;
   26   public:
   27     CommandData();
   28     void Init();
   29 
   30     void ParseCommandLine(bool Preprocess,int argc, char *argv[]);
   31     void ParseArg(wchar *ArgW);
   32     void ParseDone();
   33     void ParseEnvVar();
   34     void ReadConfig();
   35     void PreprocessArg(const wchar *Arg);
   36     void ProcessSwitchesString(const wchar *Str);
   37     void OutTitle();
   38     void OutHelp(RAR_EXIT ExitCode);
   39     bool IsSwitch(int Ch);
   40     bool ExclCheck(const wchar *CheckName,bool Dir,bool CheckFullPath,bool CheckInclList);
   41     static bool CheckArgs(StringList *Args,bool Dir,const wchar *CheckName,bool CheckFullPath,int MatchMode);
   42     bool ExclDirByAttr(uint FileAttr);
   43     bool TimeCheck(RarTime &ftm,RarTime &ftc,RarTime &fta);
   44     bool SizeCheck(int64 Size);
   45     bool AnyFiltersActive();
   46     int IsProcessFile(FileHeader &FileHead,bool *ExactMatch,int MatchType,
   47                       bool Flags,wchar *MatchedArg,uint MatchedArgSize);
   48     void ProcessCommand();
   49     void AddArcName(const wchar *Name);
   50     bool GetArcName(wchar *Name,int MaxSize);
   51     bool CheckWinSize();
   52 
   53     int GetRecoverySize(const wchar *CmdStr,const wchar *Value,int DefSize);
   54 
   55 #ifndef SFX_MODULE
   56     void ReportWrongSwitches(RARFORMAT Format);
   57 #endif
   58 
   59     wchar Command[NM+16];
   60 
   61     wchar ArcName[NM];
   62 
   63     StringList FileArgs;
   64     StringList ExclArgs;
   65     StringList InclArgs;
   66     StringList ArcNames;
   67     StringList StoreArgs;
   68 };
   69 
   70 #endif