mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-29 19:55:49 +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.
|
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.
|
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 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
|
- new wsyserrorwithcode(int error, const char* fmt, ...), similar to
|
||||||
wsyserror(), but printing the message for the specified error code.
|
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);
|
void WMSetUDSearchList(WMUserDefaults *database, proplist_t list);
|
||||||
|
|
||||||
|
|
||||||
/****** Global Variables *******/
|
|
||||||
|
|
||||||
extern int WErrorCode;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,9 +29,6 @@
|
|||||||
|
|
||||||
extern char *_WINGS_progname;
|
extern char *_WINGS_progname;
|
||||||
|
|
||||||
int WErrorCode = 0;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXLINE 1024
|
#define MAXLINE 1024
|
||||||
|
|
||||||
@@ -49,17 +46,17 @@ wstrerror(int errnum)
|
|||||||
# ifndef __DECC
|
# ifndef __DECC
|
||||||
extern char *sys_errlist[];
|
extern char *sys_errlist[];
|
||||||
# endif
|
# endif
|
||||||
static char buf[] = "Unknown error number 12345678901234567890";
|
static char buf[] = "Unknown error 12345678901234567890";
|
||||||
|
|
||||||
if (errno < sys_nerr)
|
if (errno < sys_nerr)
|
||||||
return sys_errlist[errnum];
|
return sys_errlist[errnum];
|
||||||
|
|
||||||
sprintf (buf, "Unknown error number %d", errnum);
|
sprintf (buf, "Unknown error %d", errnum);
|
||||||
return buf;
|
return buf;
|
||||||
#else /* no strerror() and no sys_errlist[] */
|
#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;
|
return buf;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user