[Rd] Problem with WARNING...headers with CRLF line endings

cstrato cstrato at aon.at
Tue Sep 14 20:26:46 CEST 2010


Dear Dirk,

Thank you for this suggestion, however I have no idea where this code 
could be used.

As I have said, this file is created automatically during the 
compilation by the compiler, and I have no idea at which point "R CMD 
check" does check for CRLF line endings, and how to interfere with this 
step. Do you have any ideas?

Best regards
Christian


On 9/13/10 11:31 PM, Dirk Eddelbuettel wrote:
>
> On 13 September 2010 at 23:07, cstrato wrote:
> | Dear all,
> |
> | When running R CMD check on Windows XP to test my package I get the
> | following warning message:
> |
> | "* checking line endings in C/C++/Fortran sources/headers ... WARNING
> | Found the following sources/headers with CR or CRLF line endings:
> |    src/xpsDict.h"
> |
> | The problem is that this file is created by the compiler AUTOMATICALLY
> | during the compilation process, and since the file is created by VC++ on
> | WinXP, it will always have CRLF line endings.
> |
> | Thus my question is:
> | - Is it really necessary to issues this warning message?
> | - If yes, could it be suppressed on Windows XP, since there it should
> | obviously be no problem.
> |
> | One more issue:
> | While I have always received this warning on my WinXP installation, for
> | some lucky reason the warning did until now not appear on the
> | Bioconductor Windows server, see BioC 2.6 with R-2.11.1:
> | http://bioconductor.org/checkResults/2.6/bioc-LATEST/xps/liverpool-checksrc.html
> |
> | However, for some reason on BioC 2.7 running R-2.12.0 this warning does
> | appear, see:
> | http://bioconductor.org/checkResults/2.7/bioc-LATEST/xps/liverpool-checksrc.html
> | For this reason I would  appreciate if there would be a possibility to
> | suppress this warning message.
>
> I once had the warning to in project and just added another filtering step
> using this
>
>
> ## simple 0d 0a ->  0a converter to suppress a warning on Windows
>
> filename<- commandArgs(trailingOnly=TRUE)[1]
> if (!file.exists(filename)) q()
>
> con<- file(filename, "rb")
> bin<- readBin(con, raw(), 100000)
> bin<- bin[ which(bin != "0d") ]
> close(con)
>
> Sys.sleep(1)
>
> con<- file(filename, "wb")
> writeBin(bin, con)
> close(con)
>
>
> Maybe you can use something like this and have the generated file transformed.
>
> Dirk
>



More information about the R-devel mailing list