R-alpha: R-0.16.1alpha -- colors() and postscript() problem

George White (gwhite@cabot.bio.dfo.ca)
Mon, 10 Feb 97 15:59:43 AST


Message-Id: <199702101953.UAA20120@hypatia.math.ethz.ch>
From: George White <gwhite@cabot.bio.dfo.ca>
Subject: R-alpha: R-0.16.1alpha -- colors() and postscript() problem
To: r-testers@stat.math.ethz.ch
Date: Mon, 10 Feb 97 15:59:43 AST

$ uname -a
IRIX caligo 5.3 11091812 IP22 mips
$ date
Mon Feb 10 15:10:46 AST 1997
$ R

R : Copyright 1997, Robert Gentleman and Ross Ihaka
Version 0.16.1  (Released: February 11, 1997)    # this system is so fast
						 # that programs compile before
                                                 # they have been released!!
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type "license()" for details.

# the R graphics window opens OK

> colors()
Error: Object ".Colors" not found
> plot(0:5)
# the above plot works

> postscript()
Error: invalid foreground/background color (postscript)
>


In devPS.c, the prototype to ValidColor is:
int ValidColor(unsigned int);

but some other routines use:
int ValidColor(int);

Using dbx, I find:
$ dbx $RHOME/bin/R.binary
dbx version 3.19 Nov  3 1994 19:59:46
Executable /disk6/gwhite/src/R-0.16.1alpha/bin/R.binary
(dbx) stop in ValidColor
Process     0: [3] stop in ValidColor
(dbx) run
Process 11202 (R.binary) started

R : Copyright 1997, Robert Gentleman and Ross Ihaka
Version 0.16.1  (Released: February 11, 1997)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type "license()" for details.

> postscript()
[3] Process 11202 (R.binary) stopped at [ValidColor:748 ,0x425a40]
Source (of colors.c) not available for Process 11202
 (dbx) file /disk6/gwhite/src/R-0.16.1alpha/src/main/colors.c
 (dbx) list 740
  740          {"yellowgreen",         "#9ACD32",      0},
  741          {NULL,                  NULL,           0}
  742  };
  743
  744          /* Hex Digit to Integer Conversion */
  745
  746  int ValidColor(unsigned int col)
  747  {
* 748          return ((col & 255) == 0);
  749  }

(dbx) print col
0
(dbx) print fg
0
(dbx) print bg
-1
(dbx) where
>  0 ValidColor(0xffffffff, 0xe, 0xfb52904, 0xfb52904) ["colors.c":748, 0x425a40
]
   1 PSDeviceDriver(0x7fffabec, 0x2, 0x1040e950, 0x6) ["devPS.c":422, 0x4946a0]
   2 SetDevice(0x104073c8, 0x7fffabec, 0x2, 0x1040e950) ["gdevice.c":100, 0x4889
30]
   3 do_device(0x101367bc, 0x10024860, 0x10188cec, 0x10188c24) ["plot.c":89, 0x4
5acbc]
   4 do_internal(0x10136820, 0x1001ef14, 0x10188cec, 0x10188c24) ["names.c":693,
 0x44ca5c]
   5 eval(0x10136820, 0x10188c24, 0xfb52904, 0xfb52904) ["eval.c":136, 0x4391c4]
   6 do_begin(0x10136834, 0x1001eb68, 0x10136848, 0x10188c24) ["eval.c":539, 0x4
3ab44]
   7 eval(0x10136834, 0x10188c24, 0xfb52904, 0xfb52904) ["eval.c":136, 0x4391c4]
   8 applyClosure(0x10188b5c, 0x101368d4, 0x1001e2a8, 0x10025454) ["eval.c":238,
 0x4397a8]
   9 eval(0x10188b5c, 0x10025454, 0xfb52904, 0xfb52904) ["eval.c":156, 0x4393e4]
   10 R_Repl(0x10025454, 0x0, 0x0, 0xfb52904) ["main.c":192, 0x442abc]
   11 mainloop(0xffffffff, 0xe, 0xfb52904, 0xfb52904) ["main.c":364, 0x4430bc]
   12 main(0x0, 0x7fffaf1c, 0xfb52904, 0xfb52904) ["system.c":266, 0x48ddc0]
   13 __start() ["crt1text.s":133, 0x41116c]

--
  George N. White III                | Internet: <aa056@chebucto.ns.ca>
  Department of Fisheries and Oceans | DFO email: GWhite@BIOnet.BIO.DFO.ca
  Ocean Sciences Division            | Time Zone: Atlantic (AST4ADT)
  Bedford Institute of Oceanography  | phone: (08:00-16:00)
  P.O. Box 1006                      |     902.426.8509 (office)
  Dartmouth, Nova Scotia             |     902.426.9388 (FAX)
  CANADA               B2Y 4A2       |     902.426.3793 (emergencies)

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-