This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std io and '\n'..



its buffered.


you won't see it till the next newline.

you can use stderr, or fflush(stdout) to flush the buffer.

At 04:03 PM 2/22/2007, =?ISO-8859-9?Q?Serhan_G=FCrmeri=E7?= wrote:
Hello..

I'm using newlib for my small x86 based operating system. For now, i'm trying to implement standart io functions such as read, write, close etc.. When i test printf function, i saw that it gives only a part of my output string to my write function if i use '\n' char in the string.

for example:

printf("abc\ndef:%i",0);
after such a func..

libc sends four byte of the string.
[ write( stdoutfd, "abc\n", 4 ) ]

What is my fault..
Thanks..
Serhan


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