From: Daniel J S. <dan...@ie...> - 2004-08-13 13:19:49
|
Hans-Bernhard Br=F6ker wrote: > Daniel J Sebald wrote: > >> Well, breaking up the routine into modules is alright. But I don't=20 >> agree that a df_readline() and a df_readbinary() is a good idea. =20 >> That would require a global variable travelling across datafile.c to=20 >> plot2d.c, etc. > > > That cannot possibly be the case, given the fact that your current=20 > code manages without such a global, or any other indication of what's=20 > going on. So it must obviously be able to figure out whether normal=20 > or binary file reading is being called for. At the worst, you would=20 > need three routines: > > df_readbinary() > df_readascii() /* holds the bulk of what is now df_readline() */ > df_readline() /* very short, just branches into one of the above=20 > two */=20 That is what I'm proposing. Dan |