On Mon, Mar 31, 2008 at 11:13 AM, grischka wrote:
From: "Hanzac Chen":
> So, here is the patch, accept the standard input if use command line "-".
>
> It will add a fake filename ":stdin:" in the input files list and when
> opening ":stdin:", it will just set the file descriptor to be 0 as standard
> input.
>
> I just tested the Windows port of tcc, it works as expected.
>
Yes, almost ;)
$ tcc -run - 32 < examples\fib.c
should run fib(32), it thinks 32 is a file
$ tcc -E examples\fib.c
shows usage, should preprocess
$ tcc -X
shows usage, should show "invalid option"
Maybe it is easier to handle '-' like a file, not like
an option at all.
Yes, it is. I made some changes, to accept the '-' as a filename. But I need to avoid it is treated as a library file.