forked from enlightenment/efl
Evas filters: Use strtok instead of strtok_r for mingw
The Windows build (mingw) does not know about strtok_r. So, let's use the non-safe variant strtok instead. Currently, this function is called from the main thread only, so this should be fine :) In the future it would be nice to not use strtok anymore, but strtok_r everywhere, and add it to evil. Considering the release coming soon, I'm not going to change something like that now.
This commit is contained in:
parent
ec18feddd7
commit
6067c88b56
|
@ -2184,7 +2184,7 @@ _instr2cmd_curve(Evas_Filter_Context *ctx, Evas_Filter_Program *pgm,
|
|||
const char *src, *dst, *points_str, *interpolation, *channel_name;
|
||||
DATA8 values[256] = {0}, points[512];
|
||||
int cmdid, point_count = 0;
|
||||
char *token, *copy = NULL, *saveptr = NULL;
|
||||
char *token, *copy = NULL;
|
||||
Buffer *in, *out;
|
||||
Eina_Bool parse_ok = EINA_FALSE;
|
||||
|
||||
|
@ -2216,7 +2216,7 @@ _instr2cmd_curve(Evas_Filter_Context *ctx, Evas_Filter_Program *pgm,
|
|||
|
||||
if (!points_str) goto interpolated;
|
||||
copy = strdup(points_str);
|
||||
token = strtok_r(copy, "-", &saveptr);
|
||||
token = strtok(copy, "-");
|
||||
if (!token) goto interpolated;
|
||||
|
||||
while (token)
|
||||
|
@ -2228,7 +2228,7 @@ _instr2cmd_curve(Evas_Filter_Context *ctx, Evas_Filter_Program *pgm,
|
|||
points[point_count * 2 + 0] = x;
|
||||
points[point_count * 2 + 1] = y;
|
||||
point_count++;
|
||||
token = strtok_r(NULL, "-", &saveptr);
|
||||
token = strtok(NULL, "-");
|
||||
}
|
||||
|
||||
parse_ok = evas_filter_interpolate(values, points, point_count, mode);
|
||||
|
|
Loading…
Reference in New Issue