[Rd] problem with va_list type (alpha) (PR#421)

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
08 Feb 2000 11:34:28 +0100


albrecht.gebhardt@uni-klu.ac.at writes:

> I'm not sure if I understood what was intended by "!arg" (see below),
> but with this patch I at least was able to compile. (and R runs now,
> but I guess only because I didn't came across this code section)
> 
> 
> --- ./src/main/printutils.c.va_list.patch	Mon Feb  7 15:08:14 2000
> +++ ./src/main/printutils.c	Mon Feb  7 15:52:54 2000
> @@ -421,7 +421,7 @@
>      else {
>  	char buf[BUFSIZE], *p = buf, *vmax = vmaxget(); 
>  	int slen, res;
> -	if(!arg) {
> +	if(&arg!=NULL) {
>              /* just a string, so length is known */
>  	    if((slen = strlen(format)) >= BUFSIZE)
>  		p = R_alloc(slen+1, sizeof(char));

Not going to work, "if (0)" will (i.e. always take else branch).

And please check for similar reports before filing a new one, we
discussed this at some length earlier today!

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._