This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Streams and STDIO internals quandry ...


A-Du-ReaNOGI@EsperNOGO.Com (Art Du Rea: NoGargbageIn:NoGarbageOut) wrote:

>I'm trying to implement a basic STDIO system for Motorola DSP Evaluation boards using an
>RS-232 com port on the EVM board talking to HyperTerminal on a Com port on a PC.  Motorola
>provides a version of GNU C tailored to their DSPs.  They do NOT provide any primitive
>send/receive functions for the STDIO system. 
>
>I have made a lot of progress ... all the code is written and I am in the middle of
>debugging it.  I am now in stdin, in particular the "fread" function.  From the Motorola
>source code, there doesn't appear to be any way for the "console terminal" to pass an
>"End-of-file" to the fread function if a terminator (Enter = Carriage Return) is reached
>before the provided buffer is filled.  This results in extra reads in my system.

I solved the problem ... I modified the Motorola provided "read.c" interface to accept an
IOEOF status word during the Status Check receive call and load it directly into the flag
word in the stdin stream/file header.  That's where fread.c looks for it.


All the best, and ENJOY!

Art Du Rea
Knoxville, Tennessee, USA

(Remove NOGI:NOGO for direct e-mail)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]