> // DATA CALLBACK: Handle reading data from running command
> void HandleFD() {
> static char s[1024];
BTW, if you intend to make multiple concurrent instances of EditorWindow,
you should replace that static char s[] with just char s[].
I made it static cause I just didn't want it to keep going in and
out of scope on every line of data.
Also, you can improve the speed of how it loads the data by using
fread() instead of fgets(), so that it can load in blocks of text
at a time, instead of line-at-a-time, which is relatively slow.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.