[Rd] (HP-UX) scan: last line gets duplicated (PR#790)

Peter Kleiweg kleiweg@let.rug.nl
Sat, 23 Dec 2000 10:30:32 +0100 (CET)


Peter Kleiweg skriver...

> > > Prof Brian D Ripley wrote:

> > > > This bug PR#672, also reported from your institution.

The bug fix I mailed yesterday does fix the bug, but also
introduces a new one: requested trimming of trailing white space
doesn't happen anymore. Here is a correct patch:


*** src/main/scan.c	Sat Dec  2 19:42:25 2000
--- src/main/scan.c.new	Sat Dec 23 10:02:34 2000
***************
*** 240,246 ****
      }
   donefill:
      if (strip) {
! 	while (isspace((int)*--bufp))
  	    ;
  	bufp++;
      }
--- 240,246 ----
      }
   donefill:
      if (strip) {
! 	while (--bufp >= buffer && isspace((int)*bufp))
  	    ;
  	bufp++;
      }


-- 
Peter Kleiweg

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._