m5@megamax (06/12/86)
I haven't been able to duplicate the alleged problems with I/O redirection
under Megamax C. Specifically, the following program seems to work:
main(argc, argv)
int argc;
char *argv[];
{
char string[64];
scanf("%s", string);
printf("%s\n", string);
}
I've tried this as a TTP application from the desktop and from microcsh. It
seems to work with microcsh pipes as well.
Note that `argc' and `argv' MUST be declared. If not, the compiler/linker
will use a dummy version of an internal routine called `argcv'. The dummy
version doesn't do anything. This is documented on page 1-7 of the Megamax
manual.
If anybody has a short program that demonstrates failure of I/O redirection
I'd be happy to look at it.
Mike McNally
Hanger About
Megamax Inc.
...convex!ctvax!m5
m5@megamax (06/12/86)
Will somebody please send me a short example program for which I/O redirection fails? I can't duplicate the problem. One thing to check is that `argc' and `argv' are properly declared as arguments to `main'. If not, then in order to save space, the compiler will not reference the library routine which interprets I/O redirection arguments. Mike McNally A person sort of associated with Megamax ...convex!ctvax!megamax!m5