|
From: Daniel J S. <dan...@ie...> - 2005-07-13 22:03:40
|
Ethan Merritt wrote: > On Wednesday 13 July 2005 02:25 pm, Daniel J Sebald wrote: > >>After that, I'd propose making the BINARY_DATA_FILE permanent too. >>It would unify the code flow for ASCII, binary, 2D, 3D. >>I can put together a patch for that down the road. > > > I am opposed to removing the EXPERIMENTAL warnings on that one. > The binary data file code is still very messy, and having it set off > by conditional flags is the only way anyone will ever be able to find > pieces for cleanup. What I am proposing is pulling out the mess. I think what I have done (when the new binary data file is active) is just what you propose. You suggested a while back that ASCII and binary be kept as separate functions. I did that, yet retained the same "flow"... similar function calls; in fact, in the new setup the 2D/3D portions of the code don't even know what type of data file the data has come from. That wasn't the case in the old code; limiting in 2D from what I recall. In that patch, I've left all the old code for binary exactly as it was so that when BINARY_DATA_FILE is deactivated the code is just as it always was. That means one would not only remove the BINARY_DATA_FILE flags, but all the extraneous old code. Also, the "bin_hook.c" will get tossed. That was only for the purpose of including or excluding the binary code that is compiled into a special test program. The old routines could be dedicated to that program and not used in gnuplot anymore. > > Which reminds me... I did some small amount of such cleanup recently. > You might have a look and see how much of the special-casing of the > BINARY code is not necessary. > > What I really hope to see is gradual cleanup and consolidation of > the binary and ascii code, to the point that there are hardly any > special BINARY_DATA_FILE pieces remaining. At that point removing > the warning and the conditional coding would make sense. I believe the new code is active by default in the CVS version and people have been using it for a year or more. Once people are comfortable with the idea of discarding the old bits, it is easy cleanup. #ifdef BINARY_DATA_FILE <keep this portion> #else <all this code gets tossed along with the ifdef's> #endif Dan |