From:
<br...@ph...> - 2004-08-13 06:55:44
|
Daniel J Sebald wrote: > Well, breaking up the routine into modules is alright. But I don't > agree that a df_readline() and a df_readbinary() is a good idea. That > would require a global variable travelling across datafile.c to > plot2d.c, etc. That cannot possibly be the case, given the fact that your current code manages without such a global, or any other indication of what's going on. So it must obviously be able to figure out whether normal or binary file reading is being called for. At the worst, you would 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 two */ |