Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: gallatin@isds.duke.edu (Andrew Gallatin)
Subject: Re: "X" implementation on OSF-1 won't allow program to compile - help!
Date: 9 Feb 1994 19:22:02 GMT	[thread overview]
Message-ID: <2jbd4q$omn@news.duke.edu> (raw)
In-Reply-To: CKxG0M.8zo@news.cis.umn.edu

In article <CKxG0M.8zo@news.cis.umn.edu>,
Chris Deibel  <chris@zeus.trad.umn.edu> 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;


  reply	other threads:[~1994-02-09 19:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-02-08 22:24 "X" implementation on OSF-1 won't allow program to compile - help! Chris Deibel
1994-02-09 19:22 ` Andrew Gallatin [this message]
1994-02-09 22:16   ` Dave Hill WhatGE
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox