mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-07 14:24:14 +01:00
removed WErrorCode
This commit is contained in:
@@ -34,8 +34,6 @@ changes since wmaker 0.61.1:
|
||||
2. if new_size is 0, call wfree(old), and return NULL.
|
||||
3. if both old is a valid pointer and new_size>0, call realloc.
|
||||
- added wstrerror(int errnum) to return the string associated with errnum.
|
||||
- added a global var WErrorCode which can hold various error codes
|
||||
(similar to errno or RErrorCode).
|
||||
- new wsyserrorwithcode(int error, const char* fmt, ...), similar to
|
||||
wsyserror(), but printing the message for the specified error code.
|
||||
|
||||
|
||||
@@ -361,11 +361,6 @@ proplist_t WMGetUDSearchList(WMUserDefaults *database);
|
||||
void WMSetUDSearchList(WMUserDefaults *database, proplist_t list);
|
||||
|
||||
|
||||
/****** Global Variables *******/
|
||||
|
||||
extern int WErrorCode;
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -29,9 +29,6 @@
|
||||
|
||||
extern char *_WINGS_progname;
|
||||
|
||||
int WErrorCode = 0;
|
||||
|
||||
|
||||
|
||||
#define MAXLINE 1024
|
||||
|
||||
@@ -49,17 +46,17 @@ wstrerror(int errnum)
|
||||
# ifndef __DECC
|
||||
extern char *sys_errlist[];
|
||||
# endif
|
||||
static char buf[] = "Unknown error number 12345678901234567890";
|
||||
static char buf[] = "Unknown error 12345678901234567890";
|
||||
|
||||
if (errno < sys_nerr)
|
||||
return sys_errlist[errnum];
|
||||
|
||||
sprintf (buf, "Unknown error number %d", errnum);
|
||||
sprintf (buf, "Unknown error %d", errnum);
|
||||
return buf;
|
||||
#else /* no strerror() and no sys_errlist[] */
|
||||
static char buf[] = "Error number 12345678901234567890";
|
||||
static char buf[] = "Error 12345678901234567890";
|
||||
|
||||
sprintf(buf, "Error number %d", errnum);
|
||||
sprintf(buf, "Error %d", errnum);
|
||||
return buf;
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user