apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apr/file_io/os2 readwrite.c
Date Thu, 23 Aug 2001 04:02:19 GMT
On Thu, Aug 23, 2001 at 02:01:47AM -0000, bjh@apache.org wrote:
> bjh         01/08/22 19:01:47
>   Modified:    file_io/os2 readwrite.c
>   Log:
>   OS/2: change apr_file_gets() to leave the trailing \n on the string, matching
>   the output of the unix version. While I think it's dumb behaviour (I get sick
>   of removing it again in application code) at least it's consistently dumb :)

You have to leave it on ... when you go to read in the last line of a file,
the presence/absence of the '\n' will indicate whether the last line was
terminated with \n or not.

It may be dumb for many uses, but trimming it loses information...


Greg Stein, http://www.lyra.org/

View raw message