N
name
Well, I've reached a milestone: Here I have an adequately functional
application I can't use without some preliminary stuff. If I'm going to
assign dynamic memory, I need to know the file length, or undergo some sort
of guess routine. And other things as well. It's now immediately evident
that some non-portable code must be written to make this useful.
What to do?
At the moment, I'm inclined to wrap the 'wrap' code (heh...) in a shell
script which can supply all the parameters handily. Such a script can be
written for any operating system, of course, and that would leave the code
portable in its own right. Another approach would be to do the same with a
GUI routine (I like GTK+), and put all the non-portable code in at that level.
The last choice would be to lard the code with system calls to supply the
added functionality, or so I think.
I guess the point is to keep the portable code separate and intact. It's
easy to provide all the necessary arguments at command line for the script
to address, and that way, the app itself could be used manually if the
required information were at hand. Also, any added functionality to the
code itself could be handled the same way, as CL arguments, and the wrapper
script modified accordingly.
I guess my question here is: What *do* you guys do about this, and given
options, what order of preference thereof is most common?
Thanks for reading!
application I can't use without some preliminary stuff. If I'm going to
assign dynamic memory, I need to know the file length, or undergo some sort
of guess routine. And other things as well. It's now immediately evident
that some non-portable code must be written to make this useful.
What to do?
At the moment, I'm inclined to wrap the 'wrap' code (heh...) in a shell
script which can supply all the parameters handily. Such a script can be
written for any operating system, of course, and that would leave the code
portable in its own right. Another approach would be to do the same with a
GUI routine (I like GTK+), and put all the non-portable code in at that level.
The last choice would be to lard the code with system calls to supply the
added functionality, or so I think.
I guess the point is to keep the portable code separate and intact. It's
easy to provide all the necessary arguments at command line for the script
to address, and that way, the app itself could be used manually if the
required information were at hand. Also, any added functionality to the
code itself could be handled the same way, as CL arguments, and the wrapper
script modified accordingly.
I guess my question here is: What *do* you guys do about this, and given
options, what order of preference thereof is most common?
Thanks for reading!