Hi,
The attached archive contains:
- spawn.[ch] - spawning functions and tests, not Geany-dependent
- Makefile - to compile the spawning tests under *nix/win~1
- emit.c - a useful program to spawn
- spawn.rsp - as in "./spawn < spawn.rsp"
- respawn.diff - patch for Makefile.am, build.c and tools.c
I can patch search.c as well, if we agree on "grep --exclude-dir"
for the non-recursive searches instead of finding and passing the
file names manually, as explained in the "Improving FiF" thread. If
we don't, or start some endless discussion, feel free to replace
the current mess with a smaller one.
tools.c should probably use spawn_sync(..., gchar *stdout, gchar
*stderr, gint *exit_status), but I haven't written one yet.
If the spawned program emits mixed stdout and stderr messages fast,
like emit.c, they will be grouped, depending on the size of your pipe
buffers. Doesn't seem a problem in practice - the tons of messages
from making Geany with -Wall -WExtra are OK, and running ./autogen.sh
is fine too.
Note that there is no conversion to UNICODE under win~1. Using the
"ANSI" functions is OK AFAICT, make/grep/gcc are all "ANSI" programs,
and the only thing an ansi -> unicode -> ansi conversion does is to
produce errors such as "Create process failed, unable to encode byte
at offset xyz" (win~1 FiF with non-UFT-8 fails regularily).
--
E-gards: Jimmy