argv ==> stdin (fast)
mouse at mcgill-vision.UUCP
mouse at mcgill-vision.UUCP
Sun Nov 23 10:29:42 AEST 1986
In article <2972 at rsch.WISC.EDU>, mcvoy at rsch.WISC.EDU (Lawrence W. McVoy) writes:
> So, I'm stuck. Does anyone have a cute way to feed a short byte stream
> to stdin backwards? Or a better solution? I'm not willing to do
> anything as kludgey as
[shell script hack]
This situation is made-to-order for one of my stdio extensions:
FILE *fopenstr(str,len,mode)
char *str;
int len;
char *mode;
which produces a stdio stream which reads from or writes into
(according as mode is "r" or "w") the given string. For BSD systems at
least, this is easy (I believe someone already posted pretty much what
is necessary). I don't know how easy it would be on a USG system.
There's also fopenfxn(), which makes stdio call a specified function
whenever it wants a character - with this you can build anything you
want.
der Mouse
USA: {ihnp4,decvax,akgua,utzoo,etc}!utcsri!mcgill-vision!mouse
think!mosart!mcgill-vision!mouse
Europe: mcvax!decvax!utcsri!mcgill-vision!mouse
ARPAnet: think!mosart!mcgill-vision!mouse at harvard.harvard.edu
[USA NSA food: terrorist, cryptography, DES, drugs, CIA, secret, decode]
More information about the Comp.unix.questions
mailing list