Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!DINO.SQUIBB.COM!BRUC From: BRUC@DINO.SQUIBB.COM ("Bob Bruccoleri 683-6165", 609) Newsgroups: comp.sys.sgi Subject: GNU Emacs, Xdefaults, and version 3.3.1 of Irix Message-ID: Date: 12 Jan 91 05:14:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 125 I have discovered the problem which caused GNU Emacs 18.55 to fail to read the .Xdefaults file under Irix 3.3.1. GNU Emacs uses XGetDefault to get defaults from the Resource Manager. Under Irix 3.2.1 which was presumably using X11R3, it worked fine. Under Irix 3.3.1 which is presumably using the X11R4 version, all the calls were returning NULL. I fetched the X11R4 distribution, and lo and behold, the order of the last two arguments is different than either the documentation or the prototype in /usr/include/X11/Xlib.h indicate. I fixed my problem by simply reversing the order of the last two arguments in the all calls to XGetDefault in the two x11*.c source files. The problem with the prototypes in Xlib.h is corrected in the first fix file for X11R4. There does not appear to be any correction to the documentation. At the end of this message, I've enclosed pieces of the relevant files. It certainly is handy to be able to examine the source code for X. +-----------------------------------------+----------------------------+ | Robert E. Bruccoleri, Ph.D. | Macromolecular Modeling | | Hat 1: Research Leader | Bristol-Myers Squibb | | Hat 2: Interim Internet Network Manager | Pharmaceutical Research | | Hat 3: Whatever is Necessary | Institute | | bruc@dino.squibb.com | P.O. Box 4000 | | (609) 683-6165 | Princeton, NJ 08543 USA | +-----------------------------------------+----------------------------+ --------------------Piece of XGetDflt.c--------------------------------- /* * $XConsortium: XGetDflt.c,v 1.19 89/12/11 19:09:21 rws Exp $ */ /*********************************************************** Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, Massachusetts. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of Digital or MIT not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ #if NeedFunctionPrototypes char *XGetDefault( Display *dpy, /* display for defaults.... */ register const char *name, /* name of option program wants */ char const *prog) /* name of program for option */ #else char *XGetDefault(dpy, prog, name) Display *dpy; /* display for defaults.... */ register char *name; /* name of option program wants */ char *prog; /* name of program for option */ #endif { /* to get, for example, "font" */ ------------------------Piece of Xlib.h--------------------------------- extern char *XGetDefault( #if NeedFunctionPrototypes Display* /* display */, const char* /* program */, const char* /* option */ #endif ); -------------------------Irix 3.3.1 Man Page ---------------------------- XGetDefault(3X11) X Version 11 (Release 4) XGetDefault(3X11) NAME XGetDefault, XResourceManagerString - get X program defaults SYNTAX char *XGetDefault(display, program, option) Display *display; char *program; char *option; char *XResourceManagerString(display) Display *display; ARGUMENTS display Specifies the connection to the X server. option Specifies the option name. program Specifies the program name for the Xlib defaults (usually argv[0] of the main program). DESCRIPTION The XGetDefault function returns the value NULL if the option name specified in this argument does not exist for the program. The strings returned by XGetDefault are owned by Xlib and should not be modified or freed by the client. The XResourceManagerString returns the RESOURCE_MANAGER property from the server's root window of screen zero, which was returned when the connection was opened using XOpenDisplay. Note that the property value must be in a format that is acceptable to XrmGetStringDatabase. SEE ALSO XOpenDisplay(3X11), XrmGetSearchList(3X11), XrmMergeDatabases(3X11) Xlib - C Language X Interface