]> sjero.net Git - wget/commitdiff
[svn] Do away with line separator.
authorhniksic <devnull@localhost>
Wed, 29 Nov 2000 16:19:46 +0000 (08:19 -0800)
committerhniksic <devnull@localhost>
Wed, 29 Nov 2000 16:19:46 +0000 (08:19 -0800)
src/ChangeLog
src/netrc.c

index 6ce845debf336e3ba6a94507f92254ac4741e206..324f0b7502f57c64260c44a852bb15604c98db5f 100644 (file)
@@ -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>
 
        * ftp.c (ftp_retrieve_list): Undo typo "fix" until resolution by
index 4177b7304ae08833697da223263d2b98a6d12023..ac4393ccb21b03556f329cde89ee0f7f2223dd22 100644 (file)
@@ -270,6 +270,13 @@ parse_netrc (const char *path)
   /* While there are lines in the file...  */
   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 ++;
 
       /* Parse the line.  */