tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] How about the source code accepted as a inputstream


From: Hanzac Chen
Subject: Re: [Tinycc-devel] How about the source code accepted as a inputstream
Date: Mon, 31 Mar 2008 12:44:59 +0800


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.

--- grischka

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.


Attachment: tinycc-stdin-2.patch
Description: Binary data


reply via email to

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