1 #ifndef _RAR_CONSIO_ 2 #define _RAR_CONSIO_ 3 4 #if !defined(SILENT) && !defined(SFX_MODULE) 5 enum {SOUND_OK,SOUND_ALARM,SOUND_ERROR,SOUND_QUESTION}; 6 #endif 7 8 enum PASSWORD_TYPE {PASSWORD_GLOBAL,PASSWORD_FILE,PASSWORD_ARCHIVE}; 9 10 void InitConsoleOptions(MESSAGE_TYPE MsgStream,bool Sound); 11 12 #ifndef SILENT 13 void mprintf(const char *fmt,...); 14 void eprintf(const char *fmt,...); 15 void Alarm(); 16 void GetPasswordText(wchar *Str,uint MaxLength); 17 bool GetPassword(PASSWORD_TYPE Type,const char *FileName,const wchar *FileNameW,wchar *Password,uint MaxLength); 18 int Ask(const char *AskStr); 19 #endif 20 21 void OutComment(char *Comment,size_t Size); 22 23 #ifdef SILENT 24 #ifdef __GNUC__ 25 #define mprintf(args...) 26 #define eprintf(args...) 27 #else mprintf(const char * fmt,...)28 inline void mprintf(const char *fmt,...) {} eprintf(const char * fmt,...)29 inline void eprintf(const char *fmt,...) {} 30 #endif Alarm()31 inline void Alarm() {} GetPasswordText(wchar * Str,uint MaxLength)32 inline void GetPasswordText(wchar *Str,uint MaxLength) {} GetPassword(PASSWORD_TYPE Type,const char * FileName,const wchar * FileNameW,wchar * Password,uint MaxLength)33 inline bool GetPassword(PASSWORD_TYPE Type,const char *FileName,const wchar *FileNameW,wchar *Password,uint MaxLength) {return(false);} Ask(const char * AskStr)34 inline int Ask(const char *AskStr) {return(0);} 35 #endif 36 37 #endif 38