[276] in linux-announce channel archive
Xaw3d for X11R6 and X11R5, updates and bugfixes
daemon@ATHENA.MIT.EDU (Lars Wirzenius)
Mon Mar 6 19:51:15 1995
Date: Mon, 6 Mar 1995 17:54:28 +0200
From: Lars Wirzenius <wirzeniu@cc.helsinki.fi>
To: linux-activists@niksula.hut.fi, linux-announce@vger.rutgers.edu
X-Mn-Key: announce
From: dimitri@ee.ubc.ca (Dimitrios P. Bouras)
Newsgroups: comp.os.linux.announce
Subject: Xaw3d for X11R6 and X11R5, updates and bugfixes
Organization: University of BC, Dept. of Electrical Engineering
Summary: Enhancements and fixes for Xaw3d-0.6B, and bug fixes for Xaw3d-1.0
Keywords: Xaw3d, X11R5, X11R6, X11
Approved: linux-announce@news.ornl.gov (Lars Wirzenius)
Followup-to: comp.os.linux.x
Hello all :)
About two days ago, I received a report from Jan Jaap van der Heijden
(JANJAAP@top.tn.utwente.nl) in the Netherlands, about a problem with the
StripChart widget in Xaw3d-1.0. As it turned out, the problem had been
there for quite some time now... actually, since Xaw3d-0.6B. A fix was
developed and inserted.
Also around the end of last week, following a suggestion from
E. v. Pappenheim (edi@edefix.han.de) in Germany, I have inserted the
new enhanced Scrollbar widget from Xaw3d-1.0, to the X11R5 Xaw3d, namely
Xaw3d-0.6B, resulting to Xaw3d-0.6C. The patch also includes the same
kind of code clean-ups performed on the stock Xaw3d-1.0 source.
The results of all the above activity have been uploaded to sunsite,
and although are presently residing in /pub/Linux/Incoming, they should be
moved to /pub/Linux/libs/X quite soon. The "results" are the following:
Xaw3d-0.6C-src.tar.gz - Xaw3d-0.6C source; basically the Xaw3d-0.6B
sources, with the fancy Scrollbar widget from
Xaw3d-1.0, plus code cleanups and fixes. Complete
with jump_* files for rebuilding under Linux.
Xaw3d-0.6C-bin.tar.gz - The compiled binaries for Xaw3d-0.6C, i.e.,
libXaw3d.a, libXaw3d.sa and libXaw3d.so.3.1.1,
for XFree86-2.1+ under Linux.
Xaw3d-1.0-bin.tar.gz - Four binary versions of the patched Xaw3d-1.0
for XFree86.3.1+; a shared object library
(libXaw3d.so.6.0) and a stub lib for it
(libXaw3d.sa), a static version compiled with
the -O2 option (libXaw3d.a) and an additional
static version compiled with the -g compiler
option to aid debugging (libXaw3d-g.a)
Xaw3d-1.0-src.tar.gz - Complete sources and jump_* files for re-
building Xaw3d-1.0 under Libux and XFree86.3.1+,
or any other platform
Both sets of tar file have accompanying .lsm entries. Note that the binaries
were compiled using gcc 2.6.2 and libc-4.6.27, though I expect no problems
when used with libc-4.5.26. However, if someone encounters any problem
arising from the libc version, I'll be happy to provide binaries compiled
with libc-4.5.26.
For those wanting to avoid rebuilding everything (or even FTP'ing the
sources again) an incremental patch is provided for Xaw3d-1.0, at the end
of this message. Also note, that there has been a small fix in XawI18n.h
which caused a small compilation-time error. This header file must replace
the old one if you've installed the Xaw3d header files in your X11R6 include
sub-directory. Otherwise when rebuilding the lib you'll be using the old
header file. The above can be accomplished by re-installing the header files
with 'make headers'.
That about "wraps it up", I guess. Many thanks are due both to
E. v. Pappenheim and Jan Jaap van der Heijden for their helpful feedback.
Dimitri
--
+----------------------------------------------------------------------------+
| Dimitrios P. Bouras Tel.: (604) 822-5084 (lab) CICSR/CS 388 |
| c/o Dept. of Electrical Eng. 822-4985 ( " ) McLEOD 458 |
| 2356 Main Mall, UBC |
| Vancouver, B.C. V6T 1Z4 FAX: 822-5949 c/o Dimitri |
| CANADA E-mail: dimitri@ee.ubc.ca |
+----------------------------------------------------------------------------+
==============================================================================
The Xaw3d-1.0 Incremental Patch follows:
==============================================================================
*** ../Xaw3d.old/StripChart.c Mon Feb 6 14:20:56 1995
--- StripChart.c Tue Feb 28 22:15:19 1995
***************
*** 233,251 ****
XEvent *event;
Region region;
{
-
- StripChartWidget w = (StripChartWidget)gw;
StripChartWidgetClass swclass = (StripChartWidgetClass) XtClass (gw);
- Dimension s = w->threeD.shadow_width;
(*swclass->threeD_class.shadowdraw) (gw, event, region, FALSE);
if (event->type == GraphicsExpose)
(void) repaint_window (gw, (Dimension) event->xgraphicsexpose.x,
! event->xgraphicsexpose.width - 2 * s);
else
(void) repaint_window (gw, (Dimension) event->xexpose.x,
! event->xexpose.width - 2 * s);
}
/* ARGSUSED */
--- 233,248 ----
XEvent *event;
Region region;
{
StripChartWidgetClass swclass = (StripChartWidgetClass) XtClass (gw);
(*swclass->threeD_class.shadowdraw) (gw, event, region, FALSE);
if (event->type == GraphicsExpose)
(void) repaint_window (gw, (Dimension) event->xgraphicsexpose.x,
! event->xgraphicsexpose.width);
else
(void) repaint_window (gw, (Dimension) event->xexpose.x,
! event->xexpose.width);
}
/* ARGSUSED */
***************
*** 285,291 ****
if (w->strip_chart.max_value > w->strip_chart.scale) {
XClearWindow(XtDisplay ((Widget) w), XtWindow ((Widget) w));
w->strip_chart.interval =
! repaint_window((Widget)w, 0, w->core.width - 2 * s);
(*swclass->threeD_class.shadowdraw) ((Widget) w,
(XEvent *)0, (Region)0,
FALSE);
--- 282,288 ----
if (w->strip_chart.max_value > w->strip_chart.scale) {
XClearWindow(XtDisplay ((Widget) w), XtWindow ((Widget) w));
w->strip_chart.interval =
! repaint_window((Widget)w, 0, w->core.width);
(*swclass->threeD_class.shadowdraw) ((Widget) w,
(XEvent *)0, (Region)0,
FALSE);
***************
*** 340,345 ****
--- 337,343 ----
register int next = w->strip_chart.interval;
int scale = w->strip_chart.scale;
int scalewidth = 0;
+ int margin = w->core.width - s;
/* Compute the minimum scale required to graph the data, but don't go
lower than min_scale. */
***************
*** 352,358 ****
w->strip_chart.scale = scale;
left = 0;
width = next; /* check this */
! scalewidth = w->core.width - 2 * s;
Resize(gw);
--- 350,356 ----
w->strip_chart.scale = scale;
left = 0;
width = next; /* check this */
! scalewidth = w->core.width - 2 * s - 1;
Resize(gw);
***************
*** 367,376 ****
Display *dpy = XtDisplay(gw);
Window win = XtWindow(gw);
! width += left - 1;
! if (!scalewidth) scalewidth = width;
! if (next < (++width - s)) width = next + s;
/* Draw data point lines. */
for (i = left; i < width; i++) {
--- 365,382 ----
Display *dpy = XtDisplay(gw);
Window win = XtWindow(gw);
! if (left < s) left = 0;
! else left -= s;
! if (left >= margin) left = margin - 1;
!
! width += (left - 1);
!
! if (!scalewidth) {
! scalewidth = w->core.width - 2 * s - 1;
! if (width < scalewidth) scalewidth = width;
! }
! if (next < ++width) width = next;
/* Draw data point lines. */
for (i = left; i < width; i++) {
***************
*** 384,396 ****
}
/* Draw graph reference lines */
! for (i = 1; i < w->strip_chart.scale; i++) {
! j = i * ((w->core.height - 2 * s) / w->strip_chart.scale);
XDrawLine(dpy, win, w->strip_chart.hiGC,
left + s, j + s, scalewidth + s, j + s);
}
}
! return( next);
}
/* Function Name: MoveChart
--- 390,402 ----
}
/* Draw graph reference lines */
! if (left <= scalewidth) for (i = 1; i < w->strip_chart.scale; i++) {
! j = i * ((w->core.height - 2 * s) / w->strip_chart.scale);
XDrawLine(dpy, win, w->strip_chart.hiGC,
left + s, j + s, scalewidth + s, j + s);
}
}
! return(next);
}
/* Function Name: MoveChart
***************
*** 409,414 ****
--- 415,421 ----
double old_max;
int left, i, j;
register int next = w->strip_chart.interval;
+ int margin = w->core.width - s;
if (!XtIsRealized((Widget) w)) return;
***************
*** 439,445 ****
if ( ((int) old_max) != ( (int) w->strip_chart.max_value) ) {
XClearWindow(XtDisplay(w), XtWindow(w));
! repaint_window((Widget)w, 0, w->core.width - 2 * s);
return;
}
--- 446,452 ----
if ( ((int) old_max) != ( (int) w->strip_chart.max_value) ) {
XClearWindow(XtDisplay(w), XtWindow(w));
! repaint_window((Widget)w, 0, w->core.width);
return;
}
***************
*** 455,466 ****
FALSE);
/* Draw graph reference lines */
! left = j;
! for (i = 1; i < w->strip_chart.scale; i++) {
! j = i * ((w->core.height - 2 * s) / w->strip_chart.scale);
! XDrawLine(XtDisplay((Widget) w), XtWindow( (Widget) w),
! w->strip_chart.hiGC,
! left, j + s, ((int)w->core.width - s), j + s);
}
return;
}
--- 462,474 ----
FALSE);
/* Draw graph reference lines */
! if ((left = j) < margin) {
! for (i = 1; i < w->strip_chart.scale; i++) {
! j = i * ((w->core.height - 2 * s) / w->strip_chart.scale);
! XDrawLine(XtDisplay((Widget) w), XtWindow( (Widget) w),
! w->strip_chart.hiGC,
! left, j + s, margin - 1, j + s);
! }
}
return;
}
***************
*** 512,518 ****
* Returns: none.
*/
! #define HEIGHT ( (unsigned int) w->core.height )
static void
Resize(gw)
--- 520,526 ----
* Returns: none.
*/
! #define HEIGHT ( (double)w->core.height - 2.0 * (double)s )
static void
Resize(gw)
***************
*** 539,549 ****
for (i = 1; i < w->strip_chart.scale; i++) {
points[i - 1].x = 0;
! points[i - 1].y = ( short)(((double)w->core.height - 2.0 * (double) s) / (double) w->strip_chart.scale );
}
/* this kind of incremental approach creates a problem with the way the */
/* scale bars appear on the graph for larger values .ie. the spread of */
! /* lines are uniform, but appears incorrect */
points[0].y += (short)s;
}
--- 547,557 ----
for (i = 1; i < w->strip_chart.scale; i++) {
points[i - 1].x = 0;
! points[i - 1].y = (short)(HEIGHT / (double) w->strip_chart.scale);
}
/* this kind of incremental approach creates a problem with the way the */
/* scale bars appear on the graph for larger values .ie. the spread of */
! /* lines is uniform, but appears incorrect */
points[0].y += (short)s;
}
*** ../Xaw3d.old/XawI18n.c Thu Jan 5 08:38:38 1995
--- XawI18n.c Tue Feb 28 14:06:42 1995
***************
*** 68,74 ****
--- 68,76 ----
{
wchar_t wc;
char str[2];
+ #ifndef USE_XMBTOWC
int mbtowc();
+ #endif
str[0] = c;
str[1] = '\0';
*** ../Xaw3d.old/XawI18n.h Thu Jan 5 06:51:20 1995
--- XawI18n.h Tue Feb 28 14:09:58 1995
***************
*** 61,66 ****
--- 61,67 ----
#define wcscpy(d,s) _Xwcscpy(d,s)
#define wcsncpy(d,s,l) _Xwcsncpy(d,s,l)
#ifdef USE_XMBTOWC
+ int _Xmbtowc();
#define mbtowc(wc,s,l) _Xmbtowc(wc,s,l)
#endif
#endif
--
Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov
PLEASE remember Keywords: and a short description of the software.