Annotation of researchv9/X11/src/X.V11R1/demos/wm/errHndlr.c, revision 1.1

1.1     ! root        1: /* $Header: errHndlr.c,v 1.1 87/09/11 08:23:29 toddb Exp $ */
        !             2: #include <stdio.h>
        !             3: #include <X11/Xlib.h>
        !             4: 
        !             5: int errorStatus = False;
        !             6: 
        !             7: int ErrorHandler (dpy, event)
        !             8:     Display *dpy;
        !             9:     XErrorEvent *event;
        !            10: {
        !            11: #ifdef debug
        !            12:     char *buffer[BUFSIZ];
        !            13:     XGetErrorText(dpy, event->error_code, buffer, BUFSIZ);
        !            14:     (void) fprintf(stderr, "X Error: %s\n", buffer);
        !            15:     (void) fprintf(stderr, "  Request Major code: %d\n", event->request_code);
        !            16:     (void) fprintf(stderr, "  Request Minor code: %d\n", event->minor_code);
        !            17:     (void) fprintf(stderr, "  ResourceId 0x%x\n", event->resourceid);
        !            18:     (void) fprintf(stderr, "  Error Serial #%d\n", event->serial);
        !            19:     (void) fprintf(stderr, "  Current Serial #%d\n", dpy->request);
        !            20: #endif
        !            21:     errorStatus = True;
        !            22:     return 0;
        !            23: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.