mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Do away with line separator.
This commit is contained in:
parent
7e900c50bf
commit
518fe8d06d
@ -1,3 +1,7 @@
|
|||||||
|
2000-11-29 John Summerfield <summer@OS2.ami.com.au>
|
||||||
|
|
||||||
|
* netrc.c (parse_netrc): Get rid of line ending.
|
||||||
|
|
||||||
2000-11-25 Hrvoje Niksic <hniksic@arsdigita.com>
|
2000-11-25 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||||
|
|
||||||
* ftp.c (ftp_retrieve_list): Undo typo "fix" until resolution by
|
* ftp.c (ftp_retrieve_list): Undo typo "fix" until resolution by
|
||||||
|
@ -270,6 +270,13 @@ parse_netrc (const char *path)
|
|||||||
/* While there are lines in the file... */
|
/* While there are lines in the file... */
|
||||||
while ((line = read_whole_line (fp)))
|
while ((line = read_whole_line (fp)))
|
||||||
{
|
{
|
||||||
|
/* Do away with line separators. */
|
||||||
|
int len = strlen (line);
|
||||||
|
if (len && line[len - 1] == '\n')
|
||||||
|
line[--len] = '\0';
|
||||||
|
if (len && line[len - 1] == '\r')
|
||||||
|
line[--len] = '\0';
|
||||||
|
|
||||||
ln ++;
|
ln ++;
|
||||||
|
|
||||||
/* Parse the line. */
|
/* Parse the line. */
|
||||||
|
Loading…
Reference in New Issue
Block a user