[Rd] src/main/par.c (PR#14214)

2010-02-15 Thread A . R . Runnalls
At lines 1154-5 in par.c (at the latest svn revision 47460), in function
do_par():

if (new_spec  GRecording(call, dd))
GErecordGraphicOperation(op, originalArgs, dd);

if the call GErecordGraphicOperation gives rise to a garbage collection
(as it may), the return value of do_par will be trashed.

(Discovered during CXXR development.)

Andrew

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] src/main/platform.c (PR#14198)

2010-01-28 Thread A . R . Runnalls
At line 312 in src/main/platform.c (at the latest svn revision, 51039):

if (length(tl) = 1 || !isNull(STRING_ELT(tl, 0)))

should not '||' read ''?  Likewise four lines later.

Andrew

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] src/library/grid/src/grid.c (PR#14199)

2010-01-28 Thread A . R . Runnalls
At around line 2590, in function gridRect() in
src/library/grid/src/grid.c (at the latest svn revision, 50745), ought
not temp, www and hhh to be PROTECTed within this block?

Andrew

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Mac OS X 2.5.1 / reg-plot.R / tr (PR#10781)

2008-02-17 Thread A . R . Runnalls
In building R 2.6.2 from source for Mac OS X 2.5.1 (with
i686-apple-darwin9-gcc-4.0.1), 'make check' fails.  The failure is in
reg-plot.R, and occurs because Mac OS X's 'tr' command (invoked by Rdiff
to strip carriage returns) regards the dagger sign in reg-plot.ps as an
illegal byte sequence.

I'm surprised that this doesn't seem to have been reported before, but
it was already present at least in R 2.6.1

Incidentally, couldn't the handling of line endings now be left to
svn:eol-style?

Andrew Runnalls

-- 
Dr Andrew Runnalls,
Computing Laboratory,
University of Kent,
CANTERBURY CT2 7NF, UK

Tel: (0)1227 823821

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] do_gsub (PR#10540)

2008-01-02 Thread A . R . Runnalls
In character.c within R 2.6.1, the function do_gsub contains the following 
code:

1199if (STRING_ELT(pat, 0) == NA_STRING) {
1200PROTECT(ans = allocVector(STRSXP, n));
1201for(i = 0; i  n; i++)  SET_STRING_ELT(ans, i, NA_STRING);
1202UNPROTECT(1);
1203return ans;
1204}
1205
1206if (length(pat)  1 || length(rep)  1) error(R_MSG_IA);

Line 1206 checks that pat contains at least one element.  However, line 1199 
has already attempted to access the first element.  The check should surely 
come first.

Andrew Runnalls

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel