(void) sprintf(buf, "Xaw SmeBSB Object: %s \"%s\"%s.", "Left Bitmap of entry ", XtName(w), " is not one bit deep."); XtAppError(XtWidgetToApplicationContext(w), buf);
char *err1 = "Xaw SmeBSB Object: Left Bitmap of entry "; char *err2 = " is not one bit deep."; len = strlen(err1) + strlen(err2) + strlen(XtName(w)) + 2 + 1; pbuf = XtStackAlloc(len, buf); if (pbuf == NULL) return; sprintf(pbuf, "%s\"%s\"%s", err1, XtName(w), err2); XtAppError(XtWidgetToApplicationContext(w), pbuf); XtStackFree(pbuf, buf);
GetBitmapInfo(w, is_left)Widget w;Boolean is_left;{    SmeBSBObject entry = (SmeBSBObject) w;        unsigned int depth, bw;    Window root;    int x, y;    unsigned int width, height;    char buf[BUFSIZ];        if (is_left) {	if (entry->sme_bsb.left_bitmap != None) {	    if (!XGetGeometry(XtDisplayOfObject(w), 			      entry->sme_bsb.left_bitmap, &root, 			      &x, &y, &width, &height, &bw, &depth)) {		(void) sprintf(buf, "Xaw SmeBSB Object: %s %s \"%s\".", "Could not",			"get Left Bitmap geometry information for menu entry ",			XtName(w));		XtAppError(XtWidgetToApplicationContext(w), buf);	    }	    if (depth != 1) {		(void) sprintf(buf, "Xaw SmeBSB Object: %s \"%s\"%s.", 			"Left Bitmap of entry ", 			XtName(w), " is not one bit deep.");		XtAppError(XtWidgetToApplicationContext(w), buf);	    }	    entry->sme_bsb.left_bitmap_width = (Dimension) width; 	    entry->sme_bsb.left_bitmap_height = (Dimension) height;	}    }    else if (entry->sme_bsb.right_bitmap != None) {	if (!XGetGeometry(XtDisplayOfObject(w),			  entry->sme_bsb.right_bitmap, &root,			  &x, &y, &width, &height, &bw, &depth)) {	    (void) sprintf(buf, "Xaw SmeBSB Object: %s %s \"%s\".", "Could not",		    "get Right Bitmap geometry information for menu entry ",		    XtName(w));	    XtAppError(XtWidgetToApplicationContext(w), buf);	}	if (depth != 1) {	    (void) sprintf(buf, "Xaw SmeBSB Object: %s \"%s\"%s.", 		    "Right Bitmap of entry ", XtName(w),		    " is not one bit deep.");	    XtAppError(XtWidgetToApplicationContext(w), buf);	}	entry->sme_bsb.right_bitmap_width = (Dimension) width; 	entry->sme_bsb.right_bitmap_height = (Dimension) height;    }}      