From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,7bf36bb4f8b854fd X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-02-09 11:22:02 PST Path: gmd.de!xlink.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl!concert!news.duke.edu!gallatin From: gallatin@isds.duke.edu (Andrew Gallatin) Newsgroups: comp.unix.osf.osf1 Subject: Re: "X" implementation on OSF-1 won't allow program to compile - help! Date: 9 Feb 1994 19:22:02 GMT Organization: Duke University, Durham, N.C. Message-ID: <2jbd4q$omn@news.duke.edu> References: NNTP-Posting-Host: serov.isds.duke.edu Cc: In article , Chris Deibel wrote: >Hello there! >I have a set of programs that I am trying to port to OSF-1 from ULTRIX. >I am no "X" wizzard. One of the calls for this program is: > > XSetLineAttributes (widget->display, > widget->gc, > etc->zoom, > widget->gc->values.line_style, > widget->gc->values.cap_style, > widget->gc->values.join_style); > >The error I get is that values is undefined. This may be an old-X thing, >since >my documentation doesn't say this should work. Any good ideas on how to >fix this thing would be appreciated. Thankyou. Sometimes I really hate DEC... They have left out part of the _XGC struct from their Xlib.h include file, supposedly to enforce cleaner programming. I made the changes below (see the context diff) by adding some lines from the MIT X11R5 distribution's Xlib.h, and this seemed to fix the problem for me. You also need to define XLIB_ILLEGAL_ACCESS to make this patch visible. However, since it wasn't in the original include file, the changes may be somewhat 'dangerous', and I certainly don't guarantee they will work for you... -Drew ############################################################################## # Andrew Gallatin, System Administrator # # Institute of Statistics and Decision Sciences # # Box 90251, Duke University, Durham, NC 27708-0251 # # email: gallatin@isds.duke.edu # ############################################################################## (note the /renoir/usr/include/X11/Xlib.h is the file that works..) <2:14pm>kahlo/gallatin:~>diff -c /usr/include/X11/Xlib.h /renoir/usr/include/X11/Xlib.h *** /usr/include/X11/Xlib.h Fri Feb 5 09:36:46 1993 --- /renoir/usr/include/X11/Xlib.h Thu Jan 13 17:38:53 1994 *************** *** 224,229 **** --- 224,236 ---- XExtData *ext_data; /* hook for extension to hang data */ GContext gid; /* protocol ID for graphics context */ /* there is more to this structure, but it is private to Xlib */ + /* added stuff below this line to get Xgobi to compile */ + /* I think DEC is being far to anal... *sigh* ajg, 1/13/94 */ + Bool rects; /* boolean: TRUE if clipmask is list of rectangles */ + Bool dashes; /* boolean: TRUE if dash-list is really a list */ + unsigned long dirty;/* cache dirty bits */ + XGCValues values; /* shadow structure of values */ + } #endif *GC;