delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/04/09/22:13:00

From: drs AT cs DOT wisc DOT edu (DRS)
Subject: Bash line-feed problem
9 Apr 1997 22:13:00 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <334C236B.585.cygnus.gnu-win32@cs.wisc.edu>
Reply-To: drs AT cs DOT wisc DOT edu
Mime-Version: 1.0
X-Mailer: Mozilla 3.01Gold (Win95; I)
Original-To: gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

The bash port generates a line-feed sometimes when it starts up a
program. I know this has been mentioned before, but has anyone 
solved this problem? It makes even very simple progams such
as the following fail:

#include <iostream.h>
main()
{
	char buf[80] = "";

	cout << "Enter a line:";
	cin.getline(buf, 80, '\n');
	cout << "You wrote: " << buf << endl;

	return 0;
}

This works right under csh and command.com, but fails under 
gnu-win32 bash. 

Anyone have a bash binary that doesn't output this unwanted line-feed?

Thanks very much for your help,
Dave
-
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".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019