While making regression testing for the wsock related api, I discovered that on windows, fluid doesn't provide a output windows for the execute command functionality.
So for the testing , I added locally a simple multiplatform class that I used (and that you can grab)in the famous fldiff app from mike to provide a uniform, simple, yet efficient way to track process or file output content to unix AND win32 apps. This class mainly encapsulates the popen(), pclose() unix api but internally substitute the popen api with CreateProcess in win32 to provide full functionality. The use of this class is as simple as this: CPtProcess proc; .. FILE *myfile = myproc.popen(mycommand, optional_mode_default_read); .. // handles the output from my file in your app as you wish // or simply uses something like : while (myproc.get_line(myline,sizeof myline)) do_my_parsing_stuff(); .. proc.close(); Another nice and simple feature is: you can handle as simply the output of a textfile by simply replacing the use of the popen() method by fopen() method ... no other code needs to be changed, so its a uniform way to handle files and process output just indifferently, which was very useful in fldiff where both cases can happen dynamically. Finally, the code is VERY light (<200 lines of code body and headers) So my question here is would you agree/appreciate to see this API in fltk 1.3 lib ? If yes, It would need little cosmetics for naming it, what would you suggest ? Thanks, Fabien _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
