Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: mouse@lightning.mcrcim.mcgill.EDU Newsgroups: comp.windows.x Subject: Re: UNIX/X-windows questions Message-ID: <9102011231.AA00297@lightning.McRCIM.McGill.EDU> Date: 1 Feb 91 12:31:11 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 17 >> dp = getenv(DISPLAY); >> display = XOpenDisplay(dp); > No, use XOpenDisplay(NULL). Well, XOpenDisplay((char *)NULL), unless you want to ignore sites using pre-ANSI C compilers, or that don't have prototyped X include files. (Or, of course, XOpenDisplay((char *)0)....) > That will do the job of the getenv for you. It should also do the analogous thing on systems without getenv(), which keep the default display name somewhere else. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu