|
|
1.1 root 1: #include "copyright.h"
2:
3: /* $Header: XErrHndlr.c,v 11.9 87/09/11 08:02:57 toddb Exp $ */
4: /* Copyright Massachusetts Institute of Technology 1986 */
5:
6: #include "Xlibint.h"
7:
8: extern int _XDefaultError();
9: /*
10: * XErrorHandler - This procedure sets the X non-fatal error handler
11: * (_XErrorFunction) to be the specified routine. If NULL is passed in
12: * the original error handler is restored.
13: */
14:
15: XSetErrorHandler(handler)
16: register int (*handler)();
17: {
18: if (handler != NULL) {
19: _XErrorFunction = handler;
20: }
21: else {
22: _XErrorFunction = _XDefaultError;
23: }
24: }
25:
26: /*
27: * XIOErrorHandler - This procedure sets the X fatal I/O error handler
28: * (_XIOErrorFunction) to be the specified routine. If NULL is passed in
29: * the original error handler is restored.
30: */
31:
32: extern int _XIOError();
33: XSetIOErrorHandler(handler)
34: register int (*handler)();
35: {
36: if (handler != NULL) {
37: _XIOErrorFunction = handler;
38: }
39: else {
40: _XIOErrorFunction = _XIOError;
41: }
42: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.