From: Roland Rosenfeld Subject: rgb.txt can not be located via FIG2DEV_RGBFILE environment variable. This allows one to run the test suite without the package being installed before. --- a/fig2dev/colors.c +++ b/fig2dev/colors.c @@ -110,10 +110,15 @@ read_colordb(void) char s[100], s1[100], *c1, *c2; unsigned short r,g,b; struct color_db *col; + char *rgbfile; - fp = fopen(RGB_FILE, "r"); + rgbfile = getenv("FIG2DEV_RGBFILE"); + if (rgbfile == NULL) { + rgbfile = RGB_FILE; + } + fp = fopen(rgbfile, "r"); if (fp == NULL) { - fprintf(stderr,"Couldn't open the RGB database file '%s'\n", RGB_FILE); + fprintf(stderr,"Couldn't open the RGB database file '%s'\n", rgbfile); return -1; } if ((Xcolors = (struct color_db*) malloc(maxcolors*sizeof(struct color_db)))