From: H C P. <hc...@me...> - 2001-11-22 17:04:14
|
Hi plplot people: I think I found a bug in plplot which causes the xwin driver to die when called from Fortran on Solaris 8. The bug is in this bit of xwin.c /* Window title */ if (plsc->plwindow){ /* jc: allow -plwindow to specify wm decoration name*/ sprintf(header, "%s", plsc->plwindow); } else sprintf(header, "%s", plsc->program); /* jc: else program name*/ Now, when called from fortran, plsc->program is NULL at this point. In Xfree86 on my Linux box, this just causes the window to have (null) as a title, but on Slowaris, it causes a segfault. Yuk. One fix is as follows: /* Window title */ if (plsc->plwindow){ /* jc: allow -plwindow to specify wm decoration name*/ sprintf(header, "%s", plsc->plwindow); } else if( plsc->program){ sprintf(header, "%s", plsc->program); /* jc: else program name*/ } else sprintf(header,"%s","Plplot"); Enjoy! Hugh P.S. I am wondering if this is the cause of some of the X weirdness on Solaris reported by others..... ============S=u=p=p=o=r=t===D=e=b=i=a=n===http://www.debian.org============ Dr. Hugh C. Pumphrey | Tel. 0131-650-6026,Fax:0131-650-5780 Institute for Meteorology | Replace 0131 with +44-131 if outside UK The University of Edinburgh | Email hc...@me... EDINBURGH EH9 3JZ, Scotland | URL: http://www.met.ed.ac.uk/~hcp ============S=u=p=p=o=r=t==g=9=5==http://g95.sourceforge.net/============== |