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

Diff for /src/usr.bin/patch/inp.c between version 1.33 and 1.34

version 1.33, 2005/11/14 19:54:10 version 1.34, 2006/03/11 19:41:30
Line 136 
Line 136 
 {  {
         int             ifd, statfailed;          int             ifd, statfailed;
         char            *p, *s, lbuf[MAXLINELEN];          char            *p, *s, lbuf[MAXLINELEN];
         LINENUM         iline;  
         struct stat     filestat;          struct stat     filestat;
         off_t           i;          off_t           i;
         ptrdiff_t       sz;          ptrdiff_t       sz;
         size_t          lines_allocated;          size_t          iline, lines_allocated;
   
 #ifdef DEBUGGING  #ifdef DEBUGGING
         if (debug & 8)          if (debug & 8)
Line 339 
Line 338 
 plan_b(const char *filename)  plan_b(const char *filename)
 {  {
         FILE    *ifp;          FILE    *ifp;
         int     i = 0, j, maxlen = 1;          size_t  i = 0, j, maxlen = 1;
         char    *p;          char    *p;
         bool    found_revision = (revision == NULL);          bool    found_revision = (revision == NULL);
   
Line 439 
Line 438 
                 else {                  else {
                         tiline[whichbuf] = baseline;                          tiline[whichbuf] = baseline;
   
                         lseek(tifd, (off_t) (baseline / lines_per_buf *                          if (lseek(tifd, (off_t) (baseline / lines_per_buf *
                             BUFFERSIZE), SEEK_SET);                              BUFFERSIZE), SEEK_SET) < 0)
                                   pfatal("cannot seek in the temporary input file");
   
                         if (read(tifd, tibuf[whichbuf], BUFFERSIZE) < 0)                          if (read(tifd, tibuf[whichbuf], BUFFERSIZE) < 0)
                                 pfatal("error reading tmp file %s", TMPINNAME);                                  pfatal("error reading tmp file %s", TMPINNAME);
Line 456 
Line 456 
 rev_in_string(const char *string)  rev_in_string(const char *string)
 {  {
         const char      *s;          const char      *s;
         int             patlen;          size_t          patlen;
   
         if (revision == NULL)          if (revision == NULL)
                 return true;                  return true;

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34