From: Alan W. I. <ir...@be...> - 2002-07-25 20:38:08
|
Later I will discuss the xwin.c split I have done, but first I should deal with two errors in my last message to the list. First OOPS (which shows my C inexperience). If we keep static void GetVisual (PLStream *pls); static void AllocBGFG (PLStream *pls); in both xwin_common.c (note new name which I have decided I like better than xwin_helper.c) and tkwin_common.c, then there is no name clash and everybody is happy. Second OOPS: my jed editor dropped the backwards quotes from my bash command line when I cut and pasted. Here are the actual bash commands. for i in `nm -p drivers/tkd_drv.so | fgrep " U "| awk '{print $2}'`; do nm -p drivers/xwind_drv.so | fgrep $i | fgrep " T "; done That had no output. for i in `nm -p libpltcld.so | fgrep " U "| awk '{print $2}'`; do nm -p drivers/xwind_drv.so | fgrep $i | fgrep " T "; done That had an output of: 000030f0 T PLColor_from_TkColor_Changed 00001804 T plD_open_tkwin 00002cb0 T pltkwin_setBGFG Now for the big news. I split xwin.c into xwin.c and xwin_common.c, put xwin_common.c into libpltcl (no name change yet), and removing the special driver treatment of xwin that I had before. All these changes seem to work well on Linux --enable-dyndrivers. For example, repeating Joao's bash command: for i in nm -p libpltcld.so | fgrep " U "| awk '{print $2}'; do nm -p drivers/xwind_drv.so | fgrep $i | fgrep " T "; done now has no result. Note I am still using the old linking model of a long chain of library dependencies so that libplplot pulls in everything else. But that only works on Linux so I intend to change this along the lines I mentioned. Note there are 7 functions in xwin_common.c which are two more than the 5 I found via visual inspection. But the additions are not very long so I think it is a good solution. Also, there was some trouble with plplot_ccmap, but I resolved that (probably in a clumsy way) by defining it statically in plxwd.h, and dropping the extern from plframe, and dropping the definition from xwin.c. So far I have done only extremely superficial testing of x01c -dev tk and wish in plplot/tmp, but they work fine so I urge everybody else to give this a try. If everybody is happy with this splitting, the next step is to do exactly the same to tkwin.c. Alan email: ir...@be... phone: 250-727-2902 FAX: 250-721-7715 snail-mail: Dr. Alan W. Irwin Department of Physics and Astronomy, University of Victoria, P.O. Box 3055, Victoria, British Columbia, Canada, V8W 3P6 __________________________ Linux-powered astrophysics __________________________ |