This function can only fail due to exhausting memory, not due to the lab_gamut
file failing to be opened. As per the previous commit, this file is no longer
relevant as the gamut information is in the source itself.
- ortho's eqEndSeg incorrectly modifies its arguments #2047
- Autotools enables -Wtrampolines and -Wlogical-op for Clang #2066
+- node_distinct_coloring failure due to out-of-memory now reported correctly
+ instead of referring to a failure to open lab_gamut
## [2.47.3] - 2021-06-19
scheme = COLOR_LAB;
qt = lab_gamut_quadtree(lightness, max_qtree_level);
if (!qt){
- fprintf(stderr," can not open file \"lab_gamut\"\n");
- *flag = ERROR_BAD_LAB_GAMUT_FILE;
+ fprintf(stderr, "out of memory\n");
+ *flag = -1;
return;
}
} else if (strcmp(color_scheme, "rgb") == 0){
#define NODE_DISTINCT_COLORING_H
enum {COLOR_RGB, COLOR_GRAY, COLOR_LAB};
-enum {ERROR_BAD_LAB_GAMUT_FILE = -10, ERROR_BAD_COLOR_SCHEME = -9};
+enum {ERROR_BAD_COLOR_SCHEME = -9};
void node_distinct_coloring(char *color_scheme, char *lightness, int weightedQ, SparseMatrix A, real accuracy, int iter_max, int seed, int *cdim, real **colors, real *color_diff, real *color_diff_sum, int *flag);
#endif