Re: Rdefines.h

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: Rdefines.h
From: Prof Brian Ripley (ripley@stats.ox.ac.uk)
Date: Sun 07 Nov 1999 - 21:52:37 EST


Message-ID: <Pine.GSO.4.05.9911071143380.5037-100000@toucan.stats>

On Wed, 27 Oct 1999, Berwin Turlach wrote:

> may I request the following two changes to Rdefines.h (R 0.65.1)?
>
> 1.) Change line 106 from
> #define Free(p) R_chk_free( (void *)(p) )
> to
> #define Free(p) R_chk_free( (void *)(p) ) , p=NULL
>
> 2.) Add after line 79:
> #define PROBLEM {char R_problem_buf[R_PROBLEM_BUFSIZE];sprintf(R_problem_buf,
>
> a new line 80:
> #define PROBLEM {char R_problem_buf[R_PROBLEM_BUFSIZE];sprintf(R_problem_buf,
> #define MESSAGE {char R_problem_buf[R_PROBLEM_BUFSIZE];sprintf(R_problem_buf,
>
> The rationale behind both changes is to become more compatible with
> S.h from S-PLUS.

Following discussions with Berwin I have adopted these (with a few extra
parentheses) for the R-devel version, although (Warning!) we discovered
that Free in S-PLUS 5.1 does not NULL the pointer, although S-PLUS 3.x
and 4.x do. So truly portable code should not rely on this.

The exact nature of S.h is under re-consideration, as there are
considerable differences between S versions. My inclination is to use the
best of S3 and S4 and provide definitions of the new macros that can be
used in S3 too, but undoubtedly back-compatibility will rear its head.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:09 EST