From David.Pleydell at antilles.inra.fr  Mon Apr 29 15:31:47 2013
From: David.Pleydell at antilles.inra.fr (dpleydell)
Date: Mon, 29 Apr 2013 09:31:47 -0400
Subject: [Rd] Verbose output from R CMD check
In-Reply-To: <BB0B0758-BFC7-47B1-A509-537FBAEC1A23@gmail.com>
References: <51769FFE.2020604@antilles.inra.fr>
	<22AF9B56-93D2-44C3-9879-136AFC61C5A7@r-project.org>
	<5176BA38.1040407@antilles.inra.fr>
	<ADD5064D-988D-4F77-983F-032A6EFD6059@r-project.org>
	<51798B9D.9000406@antilles.inra.fr>
	<BB0B0758-BFC7-47B1-A509-537FBAEC1A23@gmail.com>
Message-ID: <517E7643.5060900@antilles.inra.fr>

>
>> Both the following lines return 0 hits
>> grep printf *.c|grep -v Rprintf|grep -v fprintf
>> grep puts *.c
>>
>> Is there some way to detect what has caused this warning about puts?
>> It's not a call to 'puts' or 'printf' because there are none.
> Longshot:
>
> grep '[^Rf]printf' *.c

Peter's longshot hit the bull's eye, this was the offending line

foobar.c:  if (*smoothOrStochastic==0) Rprintf("0\n"); else (printf("1\n"));

So I clearly need to brush up a little on regular expressions. The 
mistake is the scripting was that I used this

find . -maxdepth 1 -type f -name '*.c' -exec sed -i 's\printf\Rprintf\'{} \;
find . -maxdepth 1 -type f -name '*.c' -exec sed -i 's\fRprintf\fprintf\' {} \;

and not this

find . -maxdepth 1 -type f -name '*.c' -exec sed -i 's\printf\Rprintf\g'{} \;
find . -maxdepth 1 -type f -name '*.c' -exec sed -i 's\fRprintf\fprintf\g' {} \;

Many thanks Simon, Peter and Martin for your suggestions, R CMD check 
now runs clean :-)
David


-- 
David Pleydell,
INRA,
UMR-1351 CMAEE,
Domaine Duclos,
Prise D'eau,
97122 Petit Bourg,
Guadeloupe
dpleydell at antilles.inra.fr
pleydell at cirad.fr
Tel +33 5 90 25 54 42
Fax +33 5 90 94 03 96



[Rd] Verbose output from R CMD check
dpleydell