~ubuntu-branches/ubuntu/quantal/unrar-nonfree/quantal

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef _RAR_CONSIO_
#define _RAR_CONSIO_

#if !defined(SILENT) && !defined(SFX_MODULE)
enum {SOUND_OK,SOUND_ALARM,SOUND_ERROR,SOUND_QUESTION};
#endif

enum PASSWORD_TYPE {PASSWORD_GLOBAL,PASSWORD_FILE,PASSWORD_ARCHIVE};

void InitConsoleOptions(MESSAGE_TYPE MsgStream,bool Sound);

#ifndef SILENT
void mprintf(const char *fmt,...);
void eprintf(const char *fmt,...);
void Alarm();
void GetPasswordText(char *Str,int MaxLength);
bool GetPassword(PASSWORD_TYPE Type,const char *FileName,char *Password,int MaxLength);
int Ask(const char *AskStr);
#endif

void OutComment(char *Comment,size_t Size);

#ifdef SILENT
#ifdef __GNUC__
  #define mprintf(args...)
  #define eprintf(args...)
#else
  #ifdef _MSC_VER
    inline void mprintf(const char *fmt,...) {}
  #else
    inline void mprintf(const char *fmt,const char *a=NULL,const char *b=NULL) {}
  #endif
  inline void eprintf(const char *fmt,const char *a=NULL,const char *b=NULL) {}
  inline void mprintf(const char *fmt,int b) {}
  inline void eprintf(const char *fmt,int b) {}
  inline void mprintf(const char *fmt,const char *a,int b) {}
  inline void eprintf(const char *fmt,const char *a,int b) {}
#endif
inline void Alarm() {}
inline void GetPasswordText(char *Str,int MaxLength) {}
inline unsigned int GetKey() {return(0);}
inline bool GetPassword(PASSWORD_TYPE Type,const char *FileName,char *Password,int MaxLength) {return(false);}
inline int Ask(const char *AskStr) {return(0);}
#endif

#endif