1
#ifndef _RAR_ERRHANDLER_
2
#define _RAR_ERRHANDLER_
4
#if (defined(GUI) || !defined(_WIN_32)) && !defined(SFX_MODULE) && !defined(_WIN_CE) || defined(RARDLL)
5
#define ALLOW_EXCEPTIONS
10
#define rarmalloc malloc
11
#define rarcalloc calloc
12
#define rarrealloc realloc
14
#define rarstrdup strdup
18
enum { SUCCESS,WARNING,FATAL_ERROR,CRC_ERROR,LOCK_ERROR,WRITE_ERROR,
19
OPEN_ERROR,USER_ERROR,MEMORY_ERROR,CREATE_ERROR,USER_BREAK=255};
24
void ErrMsg(const char *ArcName,const char *fmt,...);
35
void OpenError(const char *FileName);
36
void CloseError(const char *FileName);
37
void ReadError(const char *FileName);
38
bool AskRepeatRead(const char *FileName);
39
void WriteError(const char *ArcName,const char *FileName);
40
void WriteErrorFAT(const char *FileName);
41
bool AskRepeatWrite(const char *FileName);
42
void SeekError(const char *FileName);
43
void MemoryErrorMsg();
44
void OpenErrorMsg(const char *FileName);
45
void OpenErrorMsg(const char *ArcName,const char *FileName);
46
void CreateErrorMsg(const char *FileName);
47
void CreateErrorMsg(const char *ArcName,const char *FileName);
48
void ReadErrorMsg(const char *ArcName,const char *FileName);
49
void WriteErrorMsg(const char *ArcName,const char *FileName);
50
void Exit(int ExitCode);
51
void SetErrorCode(int Code);
52
int GetErrorCode() {return(ExitCode);}
53
int GetErrorCount() {return(ErrCount);}
54
void SetSignalHandlers(bool Enable);
56
void SetSilent(bool Mode) {Silent=Mode;};
57
void SetShutdown(bool Mode) {DoShutdown=Mode;};