*************************************************************************/
#include <sparse/general.h>
#include <math.h>
+#include <string.h>
#include <time.h>
#include <sparse/SparseMatrix.h>
#include <edgepaint/node_distinct_coloring.h>
ns1++;
}
iter1++;
- xsplines1 = strstr(xsplines1, " ");
+ xsplines1 = strchr(xsplines1, ' ');
if (!xsplines1) break;
xsplines1++;
if (ns1*dim >= len1){
ns2++;
}
iter2++;
- xsplines2 = strstr(xsplines2, " ");
+ xsplines2 = strchr(xsplines2, ' ');
if (!xsplines2) break;
xsplines2++;
if (ns2*dim >= len2){
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <sparse/color_palette.h>
#include <edgepaint/lab_gamut.h>
if (maxpoints <= 0) return;
cl = color_list;
- while ((cl=strstr(cl, ",")) != NULL){
+ while ((cl=strchr(cl, ',')) != NULL){
cl++; nc++;
}
lab = malloc(sizeof(color_lab)*MAX(nc,1));
if (sscanf(cl,"#%02X%02X%02X", &r, &g, &b) != 3) break;
rgb.r = r; rgb.g = g; rgb.b = b;
lab[nc++] = RGB2LAB(rgb);
- } while ((cl=strstr(cl, ",")) != NULL);
+ } while ((cl=strchr(cl, ',')) != NULL);
dists = malloc(sizeof(double)*MAX(1, nc));
dists[0] = 0;
gvcolor_t *color = &(job->obj->pencolor);
char *cp = NULL;
- if ((cp = strstr(name, ":"))) /* if its a color list, then use only first */
+ if ((cp = strchr(name, ':'))) /* if its a color list, then use only first */
*cp = '\0';
if (gvre) {
gvrender_resolve_color(job->render.features, name, color);
gvcolor_t *color = &(job->obj->fillcolor);
char *cp = NULL;
- if ((cp = strstr(name, ":"))) /* if its a color list, then use only first */
+ if ((cp = strchr(name, ':'))) /* if its a color list, then use only first */
*cp = '\0';
if (gvre) {
gvrender_resolve_color(job->render.features, name, color);
strex.flags = gdFTEX_RESOLUTION;
strex.hdpi = strex.vdpi = fontdpi;
- if (strstr(fontname, "/"))
+ if (strchr(fontname, '/'))
strex.flags |= gdFTEX_FONTPATHNAME;
else
strex.flags |= gdFTEX_FONTCONFIG;
strex.flags = gdFTEX_RETURNFONTPATHNAME | gdFTEX_RESOLUTION;
strex.hdpi = strex.vdpi = POINTS_PER_INCH;
- if (strstr(fontname, "/"))
+ if (strchr(fontname, '/'))
strex.flags |= gdFTEX_FONTPATHNAME;
else
strex.flags |= gdFTEX_FONTCONFIG;