kleiweg@let.rug.nl
2000-Dec-22 04:10 UTC
[Rd] (HP-UX) scan: last line gets duplicated (PR#790)
The last line gets duplicated when a file is read like this: a <- scan(file=filename, what="", sep="\n", strip.white=c(TRUE), quiet=TRUE) (This error does not occur on Linux, the only other platform I tested.) Version: platform = hppa2.0-hp-hpux10.20 arch = hppa2.0 os = hpux10.20 system = hppa2.0, hpux10.20 Actually, all binaries are PA-RISC1.1 status major = 1 minor = 2.0 year = 2000 month = 12 day = 15 language = R Search Path: .GlobalEnv, package:mva, package:ctest, Autoloads, package:base -- Peter Kleiweg http://www.let.rug.nl/~kleiweg/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
ripley@stats.ox.ac.uk
2000-Dec-22 07:34 UTC
[Rd] (HP-UX) scan: last line gets duplicated (PR#790)
This bug PR#672, also reported from your institution. It has only been reported from HP-UX, and only from your systems. Could someone there debug it, please? On Fri, 22 Dec 2000 kleiweg@let.rug.nl wrote:> > The last line gets duplicated when a file is read like this: > > a <- scan(file=filename, what="", sep="\n", > strip.white=c(TRUE), quiet=TRUE) > > (This error does not occur on Linux, the only other platform I > tested.) > > Version: > platform = hppa2.0-hp-hpux10.20 > arch = hppa2.0 > os = hpux10.20 > system = hppa2.0, hpux10.20 > > Actually, all binaries are PA-RISC1.1 > > status > major = 1 > minor = 2.0 > year = 2000 > month = 12 > day = 15 > language = R > > Search Path: > .GlobalEnv, package:mva, package:ctest, Autoloads, package:base > > -- > Peter Kleiweg > http://www.let.rug.nl/~kleiweg/ > > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > 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 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
kleiweg@let.rug.nl
2000-Dec-22 12:12 UTC
[Rd] (HP-UX) scan: last line gets duplicated (PR#790)
> On Fri, 22 Dec 2000 kleiweg@let.rug.nl wrote:> > The last line gets duplicated when a file is read like this: > > > > a <- scan(file=filename, what="", sep="\n", > > strip.white=c(TRUE), quiet=TRUE)> > Version: > > platform = hppa2.0-hp-hpux10.20> > major = 1 > > minor = 2.0 > > year = 2000 > > month = 12 > > day = 15Prof Brian D Ripley wrote:> This bug PR#672, also reported from your institution.That would be me. I reported this bug before, for R version 1.1.0> It has only been reported from HP-UX, and only from your > systems. Could someone there debug it, please?I would fix it, if I new how to. Perhaps you can suggest something from the warning messages I get. During compiling I get a lot of warning messages. These are for scan.c: cc -I. -I../../src/include -I../../src/include -I/opt_local/opt/readline/include I/opt_local/opt/tk/include --I/opt_local/opt/tcl/include I/opt_local/opt/jpeg6/include -I/opt_local/opt/png/include I/opt_local/opt/ncurses/include -I/opt_local/opt/zlib/include I/users1/kleiweg/R-1.2.0-source --DHAVE_CONFIG_H D_HPUX_SOURCE +DA1.1 +DS1.1 -Wp,-H16000 -I/opt_local/opt/readline/include I/opt_local/opt/tk/include --I/opt_local/opt/tcl/include I/opt_local/opt/jpeg6/include -I/opt_local/opt/png/include I/opt_local/opt/ncurses/include -I/opt_local/opt/zlib/include I/users1/kleiweg/R-1.2.0-source -L/opt_local/opt/readline/lib -L/opt_local/opt/tk/lib -L/opt_local/opt/tcl/lib -L/opt_local/opt/jpeg6/lib -L/opt_local/opt/png/lib -L/opt_local/opt/ncurses/lib -L/opt_local/opt/zlib/lib L/users1/kleiweg/R-1.2.0-source -Aa -c -scan.c -o scan.o cc: "scan.c", line 65: warning 604: Pointers are not assignment-compatible. cc: "scan.c", line 65: warning 563: Argument #1 is not the correct type. cc: "scan.c", line 72: warning 604: Pointers are not assignment-compatible. cc: "scan.c", line 72: warning 563: Argument #1 is not the correct type. cc: "scan.c", line 109: warning 604: Pointers are not assignment-compatible. cc: "scan.c", line 109: warning 563: Argument #1 is not the correct type. cc: "scan.c", line 300: warning 604: Pointers are not assignment-compatible. cc: "scan.c", line 300: warning 563: Argument #1 is not the correct type. cc: "scan.c", line 309: warning 604: Pointers are not assignment-compatible. cc: "scan.c", line 309: warning 563: Argument #1 is not the correct type. cc: "scan.c", line 336: warning 604: Pointers are not assignment-compatible. cc: "scan.c", line 336: warning 563: Argument #1 is not the correct type. cc: "scan.c", line 350: warning 604: Pointers are not assignment-compatible. cc: "scan.c", line 350: warning 563: Argument #1 is not the correct type. cc: "scan.c", line 449: warning 604: Pointers are not assignment-compatible. cc: "scan.c", line 449: warning 563: Argument #1 is not the correct type. cc: "scan.c", line 478: warning 604: Pointers are not assignment-compatible. cc: "scan.c", line 478: warning 563: Argument #1 is not the correct type. cc: "scan.c", line 858: warning 604: Pointers are not assignment-compatible. cc: "scan.c", line 858: warning 563: Argument #1 is not the correct type. cc: "scan.c", line 919: warning 604: Pointers are not assignment-compatible. cc: "scan.c", line 919: warning 563: Argument #1 is not the correct type. cc: "scan.c", line 957: warning 604: Pointers are not assignment-compatible. cc: "scan.c", line 957: warning 563: Argument #1 is not the correct type. I get these type of warnings when compiling other sources too: sock.c sys-std.c connections.c g_alab_her.c ../../../R/src/main/gram.y iosupport.c main.c plot3d.c saveload.c Other warnings I get are: cc: "loglin.c", line 236: warning 562: Redeclaration of "collap" with a different storage class specifier: "collap" will have internal linkage. cc: "loglin.c", line 315: warning 562: Redeclaration of "adjust" with a different storage class specifier: "adjust" will have internal linkage. cc: "dataentry.c", line 1309: warning 562: Redeclaration of "closewin" with a different storage class specifier: "closewin" will have internal linkage. cc: "dataentry.c", line 1553: warning 562: Redeclaration of "popupmenu" with a different storage class specifier: "popupmenu" will have internal linkage. cc: "dataentry.c", line 1653: warning 562: Redeclaration of "popdownmenu" with a different storage class specifier: "popdownmenu" will have internal linkage. cc: "fexact.c", line 315: warning 562: Redeclaration of "f2xact" with a different storage class specifier: "f2xact" will have internal linkage. cc: "fexact.c", line 842: warning 562: Redeclaration of "f3xact" with a different storage class specifier: "f3xact" will have internal linkage. cc: "fexact.c", line 1188: warning 562: Redeclaration of "f4xact" with a different storage class specifier: "f4xact" will have internal linkage. cc: "fexact.c", line 1413: warning 562: Redeclaration of "f5xact" with a different storage class specifier: "f5xact" will have internal linkage. cc: "fexact.c", line 1572: warning 562: Redeclaration of "f6xact" with a different storage class specifier: "f6xact" will have internal linkage. cc: "fexact.c", line 1623: warning 562: Redeclaration of "f7xact" with a different storage class specifier: "f7xact" will have internal linkage. cc: "fexact.c", line 1726: warning 562: Redeclaration of "f8xact" with a different storage class specifier: "f8xact" will have internal linkage. cc: "fexact.c", line 1770: warning 562: Redeclaration of "f9xact" with a different storage class specifier: "f9xact" will have internal linkage. cc: "fexact.c", line 1803: warning 562: Redeclaration of "f10act" with a different storage class specifier: "f10act" will have internal linkage. cc: "fexact.c", line 1871: warning 562: Redeclaration of "f11act" with a different storage class specifier: "f11act" will have internal linkage. cc: "fexact.c", line 1896: warning 562: Redeclaration of "prterr" with a different storage class specifier: "prterr" will have internal linkage. cc: "fexact.c", line 1921: warning 562: Redeclaration of "iwork" with a different storage class specifier: "iwork" will have internal linkage. -- Peter Kleiweg http://www.let.rug.nl/~kleiweg/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
ripley@stats.ox.ac.uk
2000-Dec-22 16:53 UTC
[Rd] (HP-UX) scan: last line gets duplicated (PR#790)
On Fri, 22 Dec 2000 kleiweg@let.rug.nl wrote:> > On Fri, 22 Dec 2000 kleiweg@let.rug.nl wrote: > > > > The last line gets duplicated when a file is read like this: > > > > > > a <- scan(file=filename, what="", sep="\n", > > > strip.white=c(TRUE), quiet=TRUE) > > > > Version: > > > platform = hppa2.0-hp-hpux10.20 > > > > major = 1 > > > minor = 2.0 > > > year = 2000 > > > month = 12 > > > day = 15 > > Prof Brian D Ripley wrote: > > > This bug PR#672, also reported from your institution. > > That would be me. I reported this bug before, for R version > 1.1.0It *is* in the BUGS list shipped with 1.2.0, so why send it in again with no references to the earlier one?> > It has only been reported from HP-UX, and only from your > > systems. Could someone there debug it, please? > > I would fix it, if I new how to. Perhaps you can suggest > something from the warning messages I get.No, but I do suggest you debug it. That is, build a debug version and run it under gdb, and find out why this happens. Is it just scan? Does read.table (which uses scan) do it? Does readLines (which does not)? Does it happen on all files? Only on those with CRLF or only LF line endings? Only on those with incomplete last lines? It might be a compiler bug, so perhaps you would like to try compiling with gcc.> During compiling I get a lot of warning messages. These are for > scan.c: > > cc -I. -I../../src/include -I../../src/include > -I/opt_local/opt/readline/include I/opt_local/opt/tk/include > --I/opt_local/opt/tcl/include I/opt_local/opt/jpeg6/include > -I/opt_local/opt/png/include I/opt_local/opt/ncurses/include > -I/opt_local/opt/zlib/include I/users1/kleiweg/R-1.2.0-source > --DHAVE_CONFIG_H D_HPUX_SOURCE +DA1.1 +DS1.1 -Wp,-H16000 > -I/opt_local/opt/readline/include I/opt_local/opt/tk/include > --I/opt_local/opt/tcl/include I/opt_local/opt/jpeg6/include > -I/opt_local/opt/png/include I/opt_local/opt/ncurses/include > -I/opt_local/opt/zlib/include I/users1/kleiweg/R-1.2.0-source > -L/opt_local/opt/readline/lib -L/opt_local/opt/tk/lib > -L/opt_local/opt/tcl/lib -L/opt_local/opt/jpeg6/lib > -L/opt_local/opt/png/lib -L/opt_local/opt/ncurses/lib > -L/opt_local/opt/zlib/lib L/users1/kleiweg/R-1.2.0-source -Aa -c > -scan.c -o scan.oThe next are the lines of signed/unsigned char warnings that occur with more informative messages on my platforms. You need to look up the numbers in your manual, as we do not have a manual for your compiler.> cc: "scan.c", line 65: warning 604: Pointers are not assignment-compatible. > cc: "scan.c", line 65: warning 563: Argument #1 is not the correct type. > cc: "scan.c", line 72: warning 604: Pointers are not assignment-compatible. > cc: "scan.c", line 72: warning 563: Argument #1 is not the correct type. > cc: "scan.c", line 109: warning 604: Pointers are not assignment-compatible. > cc: "scan.c", line 109: warning 563: Argument #1 is not the correct type. > cc: "scan.c", line 300: warning 604: Pointers are not assignment-compatible. > cc: "scan.c", line 300: warning 563: Argument #1 is not the correct type. > cc: "scan.c", line 309: warning 604: Pointers are not assignment-compatible. > cc: "scan.c", line 309: warning 563: Argument #1 is not the correct type. > cc: "scan.c", line 336: warning 604: Pointers are not assignment-compatible. > cc: "scan.c", line 336: warning 563: Argument #1 is not the correct type. > cc: "scan.c", line 350: warning 604: Pointers are not assignment-compatible. > cc: "scan.c", line 350: warning 563: Argument #1 is not the correct type. > cc: "scan.c", line 449: warning 604: Pointers are not assignment-compatible. > cc: "scan.c", line 449: warning 563: Argument #1 is not the correct type. > cc: "scan.c", line 478: warning 604: Pointers are not assignment-compatible. > cc: "scan.c", line 478: warning 563: Argument #1 is not the correct type. > cc: "scan.c", line 858: warning 604: Pointers are not assignment-compatible. > cc: "scan.c", line 858: warning 563: Argument #1 is not the correct type. > cc: "scan.c", line 919: warning 604: Pointers are not assignment-compatible. > cc: "scan.c", line 919: warning 563: Argument #1 is not the correct type. > cc: "scan.c", line 957: warning 604: Pointers are not assignment-compatible. > cc: "scan.c", line 957: warning 563: Argument #1 is not the correct type.-- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
kleiweg@let.rug.nl
2000-Dec-23 09:21 UTC
[Rd] (HP-UX) scan: last line gets duplicated (PR#790)
Peter Kleiweg skriver...> > > Prof Brian D Ripley wrote:> > > > This bug PR#672, also reported from your institution.The bug fix I mailed yesterday does fix the bug, but also introduces a new one: requested trimming of trailing white space doesn't happen anymore. Here is a correct patch: *** src/main/scan.c Sat Dec 2 19:42:25 2000 --- src/main/scan.c.new Sat Dec 23 10:02:34 2000 *************** *** 240,246 **** } donefill: if (strip) { ! while (isspace((int)*--bufp)) ; bufp++; } --- 240,246 ---- } donefill: if (strip) { ! while (--bufp >= buffer && isspace((int)*bufp)) ; bufp++; } -- Er liep twee kg -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Kleiweg skriver...> > > Prof Brian D Ripley wrote:> > > > This bug PR#672, also reported from your institution.The bug fix I mailed yesterday does fix the bug, but also introduces a new one: requested trimming of trailing white space doesn't happen anymore. Here is a correct patch: *** src/main/scan.c Sat Dec 2 19:42:25 2000 --- src/main/scan.c.new Sat Dec 23 10:02:34 2000 *************** *** 240,246 **** } donefill: if (strip) { ! while (isspace((int)*--bufp)) ; bufp++; } --- 240,246 ---- } donefill: if (strip) { ! while (--bufp >= buffer && isspace((int)*bufp)) ; bufp++; } -- Peter Kleiweg -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._