[patch-readline] history file reading

Bob Rossi bob_rossi@cox.net
Tue Mar 21 16:42:00 GMT 2006


On Tue, Mar 21, 2006 at 04:30:11PM +0100, Andreas Schwab wrote:
> Daniel Jacobowitz <drow@false.org> writes:
> 
> >> +	if ( line_end - 1 >= line_start && *( line_end - 1 ) =='\r' )
> >> +	  *( line_end - 1 )  = '\0';
> >
> > And you don't need the spaces inside the parentheses, but do usually
> > need spaces around operators:
> >
> > 	if (line_end - 1 >= line_start && *(line_end - 1) == '\r')
> > 	  *(line_end - 1)  = '\0';
> 
> line_end[-1] whould be much better readable, IMHO.

Can you even index into an array with a negitive number?

Bob Rossi



More information about the Gdb-patches mailing list