From: Joao C. <jc...@fe...> - 2003-03-03 19:46:52
|
On Monday 03 March 2003 17:02, Alan W. Irwin wrote: > Here is a list of functions in our API that have been officially deprec= ated > (in comments and documentation) since 2000 (and probably for even longe= r). > I searched for these using "deprecated" or "Do <emphasis>not</emphasis>= use > this" in api.xml. > Alternatives that can be used instead are put on the right. > > "deprecated" > plclr =3D=3D> pleop > plcol =3D=3D> plcol0 > plpage =3D=3D> plbop > > "Do <emphasis>not</emphasis> use this" > plhls =3D=3D> plHLS_RGB followed by plscol0 > plrgb =3D=3D> plscol0 > plrgb1 =3D=3D> plscol0 > > The first 3 are implemented with #defines. I guess there is no harm in > continuing to keep them, but in the interests of keeping things as simp= le > as possible for our users, I would prefer to remove them from the API a= nd > documentation. There has certainly been enough notice given! I agree on removing them from the docs, but not from plplot.h. As you say, there is no harm, and not being documented new users won't us= e=20 them. But I think that plotsh3d() and MinMax2dGrid() could be removed, because = they=20 had such an ephemeral life. I don't know for how long the other defines h= ave=20 been there. To safely remove them all, after one or two more releases, I would do the= =20 following: #define plclr=09plclr_replace_me_with_pleop and users will get a linker error: undefined reference to `plclr_replace_me_with_pleop' But I'm sure that most of you won't agree on this. > The second group of three are actually coded rather than #defined, In that case I would replace the code with something like plexit("plrgb: = as I=20 could be doing Bad Things to your program, I was (ex)terminated") and wai= t=20 one or two more releases to remove them all. But again not everybody likes this kind of jokes when they are working. Joao > and are > a more serious matter because they completely break are cmap0 paradigm.= =20 > They use the cmap0 colour index of PL_RGB_COLOR=3D128 to store the colo= ur.=20 > This is likely to cause heap corruption since by default we have only 1= 6 > cmap0 colours. Even when we have allocated enough colours for this to > work, these functions pound away on the 128th colour, regardless, which > will certainly confuse users wanting to use that colour index for somet= hing > else. I do not know who put in the "Do NOT use this" comment in the co= de, > but I completely agree with them. Note, plhls calls plHLS_RGB, then pl= rgb > so has the same problems as plrgb (and plrgb1). > > I think it is definitely long past time to remove the second three (and > possibly the first three) from the API. > > Comments, please? > > Alan > __________________________ > Alan W. Irwin > email: ir...@be... > phone: 250-727-2902 > > Astronomical research affiliation with Department of Physics and Astron= omy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the Canadian Centre for Climate Modelling= and > Analysis (www.cccma.bc.ec.gc.ca) and the PLplot scientific plotting > software package (plplot.org). > > __________________________ > > Linux-powered Science > __________________________ > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Plplot-devel mailing list > Plp...@li... > https://lists.sourceforge.net/lists/listinfo/plplot-devel |