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]
Other format: [Raw text]

Re: simple c 's printf problem in mandrake8.0




eric <fsshl@centurytel.net> wrote:
>   both are not work on bash but work on csh on my mandrake 8.0, I also
> webmail them (mandrakesoft) on tech support, but they said it in not in
> the scope they want to support.

I did not follow the thread up until now, so I may be off base here.

Do your prompts in csh and in bash have "\r" at their beginning?
If they do, then your little program works well, but your shell
erases it (I think it is the default behavior of zsh).
Do the following experiment:
   csh% printf "test" ; sleep 1
 or
   bash$ printf "test" ; sleep 1

Does "test" appear on your screen for one second and then goes away?

  Michael

Stephano Mariani wrote:
>
> Here is what I mean:
>
> #include <stdio.h>
>
> int main(int argc,char*const*argv)
> {
>   printf("Hello World"); /* No linefeed */
>   fflush(stdout); /* Likewise for any other stream(s) you use */
>   _exit(0);
> }
>



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