Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.1:Staging:E
transfig
fig2dev-3.2.6a-RGBFILE.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fig2dev-3.2.6a-RGBFILE.patch of Package transfig
From: Roland Rosenfeld <roland@debian.org> Subject: rgb.txt can not be located via FIG2DEV_RGBFILE environment variable. This allows to run the test suite without the package being installed before. --- a/fig2dev/colors.c +++ b/fig2dev/colors.c @@ -27,6 +27,7 @@ #include "pi.h" #include "fig2dev.h" +#include <stdlib.h> struct color_db { char *name; @@ -108,10 +109,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)))
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor