From: Alan W. I. <ir...@be...> - 2003-03-03 17:03:41
|
Here is a list of functions in our API that have been officially deprecated (in comments and documentation) since 2000 (and probably for even longer). 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 ==> pleop plcol ==> plcol0 plpage ==> plbop "Do <emphasis>not</emphasis> use this" plhls ==> plHLS_RGB followed by plscol0 plrgb ==> plscol0 plrgb1 ==> 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 simple as possible for our users, I would prefer to remove them from the API and documentation. There has certainly been enough notice given! The second group of three are actually coded rather than #defined, and are a more serious matter because they completely break are cmap0 paradigm. They use the cmap0 colour index of PL_RGB_COLOR=128 to store the colour. This is likely to cause heap corruption since by default we have only 16 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 something else. I do not know who put in the "Do NOT use this" comment in the code, but I completely agree with them. Note, plhls calls plHLS_RGB, then plrgb 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 Astronomy, 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 __________________________ |