[BACK]Return to fio.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mail

Diff for /src/usr.bin/mail/fio.c between version 1.12 and 1.13

version 1.12, 1997/08/31 14:32:13 version 1.13, 1997/09/04 20:44:04
Line 109 
Line 109 
                         return;                          return;
                 }                  }
                 count = strlen(linebuf);                  count = strlen(linebuf);
                   /*
                    * Transforms lines ending in <CR><LF> to just <LF>.
                    * This allows mail to be able to read Eudora mailboxes
                    * that reside on a DOS partition.
                    */
                   if (count >= 2 && linebuf[count-1] == '\n' &&
                       linebuf[count - 2] == '\r')
                           linebuf[count - 2] = linebuf[--count];
   
                 (void)fwrite(linebuf, sizeof(*linebuf), count, otf);                  (void)fwrite(linebuf, sizeof(*linebuf), count, otf);
                 if (ferror(otf))                  if (ferror(otf))
                         err(1, "/tmp");                          err(1, "/tmp");
Line 178 
Line 187 
 /*  /*
  * Read up a line from the specified input into the line   * Read up a line from the specified input into the line
  * buffer.  Return the number of characters read.  Do not   * buffer.  Return the number of characters read.  Do not
  * include the newline at the end.   * include the newline (or carriage return) at the end.
  */   */
 int  int
 readline(ibuf, linebuf, linesize)  readline(ibuf, linebuf, linesize)
Line 194 
Line 203 
   
         n = strlen(linebuf);          n = strlen(linebuf);
         if (n > 0 && linebuf[n - 1] == '\n')          if (n > 0 && linebuf[n - 1] == '\n')
                   linebuf[--n] = '\0';
           if (n > 0 && linebuf[n - 1] == '\r')
                 linebuf[--n] = '\0';                  linebuf[--n] = '\0';
         return(n);          return(n);
 }  }

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13