forked from old/legacy-imlib2
parent
6c7da57569
commit
0bcb0033ed
|
@ -108,7 +108,7 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity,
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
int pc, c, i, j, k, w, h, ncolors, cpp, comment, transp,
|
int pc, c, i, j, k, w, h, ncolors, cpp, comment, transp,
|
||||||
quote, context, len, done, r, g, b;
|
quote, context, len, done, r, g, b, backslash;
|
||||||
char *line, s[256], tok[128], col[256];
|
char *line, s[256], tok[128], col[256];
|
||||||
int lsz = 256;
|
int lsz = 256;
|
||||||
struct _cmap {
|
struct _cmap {
|
||||||
|
@ -163,6 +163,7 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity,
|
||||||
pixels = 0;
|
pixels = 0;
|
||||||
count = 0;
|
count = 0;
|
||||||
line = malloc(lsz);
|
line = malloc(lsz);
|
||||||
|
backslash = 0;
|
||||||
memset(lookup, 0, sizeof(lookup));
|
memset(lookup, 0, sizeof(lookup));
|
||||||
while (!done)
|
while (!done)
|
||||||
{
|
{
|
||||||
|
@ -645,7 +646,18 @@ load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity,
|
||||||
c = 32;
|
c = 32;
|
||||||
else if (c > 127)
|
else if (c > 127)
|
||||||
c = 127;
|
c = 127;
|
||||||
line[i++] = c;
|
if ( c=='\\' ) {
|
||||||
|
if ( ++backslash<2 ) {
|
||||||
|
line[i++] = c;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
backslash = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
backslash = 0;
|
||||||
|
line[i++] = c;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (i >= lsz)
|
if (i >= lsz)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue