Re: [OT]-ish: Can someone explain this?

2011-07-02 Thread Randy J. Ray
On 07/02/2011 10:04 AM, Andrew Suffield wrote: On Sat, Jul 02, 2011 at 05:32:38PM +0100, Dirk Koopman wrote: But how come I get output at a shell prompt, and not down a pipe (or a redirection either)? What special magic is occurring here? If: 1. isatty() is true on the underlying fd of the FI

Re: [OT]-ish: Can someone explain this?

2011-07-02 Thread Andrew Suffield
On Sat, Jul 02, 2011 at 05:32:38PM +0100, Dirk Koopman wrote: > But how come I get output at a shell prompt, and not down a pipe (or > a redirection either)? What special magic is occurring here? If: 1. isatty() is true on the underlying fd of the FILE* and: 2. The string contains \n then prin

Re: [OT]-ish: Can someone explain this?

2011-07-02 Thread Dominic.Thoreau
It might be because you've got that flush call commented out? Sent from my iPad On 2 Jul 2011, at 17:32, Dirk Koopman wrote: > Here is a bit of C code that is part of something much bigger. > > #include > #include > > #define GIT_VERSION "1.23-dev" > #define GIT_COUNT "73" > #define GIT_ID

[OT]-ish: Can someone explain this?

2011-07-02 Thread Dirk Koopman
Here is a bit of C code that is part of something much bigger. #include #include #define GIT_VERSION "1.23-dev" #define GIT_COUNT "73" #define GIT_ID "daa3ab8" #define VERSION "1.23" main() { printf("\nThingy version %s (%s-%s-%s) (built %s, %s)\n\n", VERSION, GIT_VERSION, GIT_COUNT, GIT_I