From: rhowarth AT sgb DOT co DOT uk (Howarth, Richard) Subject: RE: bash-shell output 4 Feb 1998 13:40:21 -0800 Message-ID: <199802041701.RAA06495.cygnus.gnu-win32@peanut.sgb.co.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="---- =_NextPart_000_01BD3192.3B62F850" To: gnu-win32 AT cygnus DOT com This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------ =_NextPart_000_01BD3192.3B62F850 Content-Type: text/plain fflush expects a file descriptor, so passing NULL is definately not going to work. Assuming you want to force the output from the printf statement, use fflush(stdout); > ---------- > From: Nils Goesche[SMTP:ngo AT wossolit DOT teles DOT de] > Sent: 05 February 1998 01:07 > To: gnu-win32 AT cygnus DOT com > Cc: ntemacs-users AT cs DOT washington DOT edu > Subject: bash-shell output > > Hi! > > The following program doesn't work properly when run from bash > (with `M-x shell' from within Emacs): > > #include > > int main() > { > int i; > > printf("Enter number: "); > /* fflush(NULL); */ > scanf("%d", &i); > printf("Got %d.\n", i); > return 0; > } > > You have to uncomment that fflush-line. But the usual shells > like command.com or 4nt don't need that line. This is somewhat > annoying. Can I at least force the shell somehow to flush > input/output buffers? Some other programs are just unusable > because of this behavior. > > -- > Nils Goesche > My obscure opinions are my very own. > > - > For help on using this list (especially unsubscribing), send a message > to > "gnu-win32-request AT cygnus DOT com" with one line of text: "help". > ------ =_NextPart_000_01BD3192.3B62F850 Content-Type: application/ms-tnef Content-Transfer-Encoding: base64 eJ8+IjkRAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy b3NvZnQgTWFpbC5Ob3RlADEIAQSAAQAWAAAAUkU6IGJhc2gtc2hlbGwgb3V0cHV0AKUHAQmAAQAh AAAAN0YzOUJCMjE2OTlERDExMUFENTMwMDYwOTcxNzU1OTgA+QYBIIADAA4AAADOBwIABAARABsA NQADAD8BAQWAAwAOAAAAzgcCAAQAEAA6AA0AAwA1AQENgAQAAgAAAAIAA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S9DTj1SRUNJUElF TlRTL0NOPVJJQ0hBUkRIAB4A+j8BAAAAEQAAAEhvd2FydGgsIFJpY2hhcmQAAAAAHgA5QAEAAAAJ AAAAUklDSEFSREgAAAAAQAAHMCBXhYWNMb0BQAAIMAAOQDmSMb0BHgA9AAEAAAAFAAAAUkU6IAAA AAAeAB0OAQAAABIAAABiYXNoLXNoZWxsIG91dHB1dAAAAAsAKQAAAAAACwAjAAAAAAADAAYQ9WKp awMABxBfAwAAAwAQEAAAAAADABEQAgAAAB4ACBABAAAAZQAAAEZGTFVTSEVYUEVDVFNBRklMRURF U0NSSVBUT1IsU09QQVNTSU5HTlVMTElTREVGSU5BVEVMWU5PVEdPSU5HVE9XT1JLQVNTVU1JTkdZ T1VXQU5UVE9GT1JDRVRIRU9VVFBVVEYAAAAADhE= ------ =_NextPart_000_01BD3192.3B62F850-- - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".