bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pipe-filter: nice work


From: Reuben Thomas
Subject: pipe-filter: nice work
Date: Sat, 23 Jul 2011 20:05:44 +0100

I just used pipe-filter-ii to reimplement GNU Zile's shell-command (as
in Emacs). It's a bit more complicated in structure than the original
with all the callbacks, and it's pretty much the same length, but it
gives me confidence a) because the code is from gnulib and b) because
the original code used temporary files. The only inelegance is having
to code up a struct type to pass around the privdata argument even for
something as simple as passing data in and reading it out again.

Also, bar a couple of trivial brain-o's which I got wrong initially
(first, I forgot to repeat the command in the argument list; secondly,
I forgot to return NULL rather than merely "0" when there was no more
data to write), it worked first time, which is more than can be said
for the original code.

-- 
http://rrt.sc3d.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]