oops - add missing piece of previous delta
This commit is contained in:
parent
71f5e3f7b6
commit
dcd9adc5cb
1 changed files with 37 additions and 1 deletions
|
@ -661,7 +661,43 @@ print_strings (const char *filename, FILE *stream, file_ptr address,
|
||||||
if (c == EOF)
|
if (c == EOF)
|
||||||
break;
|
break;
|
||||||
if (! STRING_ISGRAPHIC (c))
|
if (! STRING_ISGRAPHIC (c))
|
||||||
break;
|
{
|
||||||
|
if (encoding_bytes > 1)
|
||||||
|
{
|
||||||
|
/* In case of multibyte encodings rewind using magic buffer. */
|
||||||
|
if (magiccount == 0)
|
||||||
|
{
|
||||||
|
/* If no magic buffer exists: use memory of c. */
|
||||||
|
switch (encoding)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
case 'b':
|
||||||
|
c = c & 0xff;
|
||||||
|
magiccount += 1;
|
||||||
|
break;
|
||||||
|
case 'l':
|
||||||
|
case 'L':
|
||||||
|
c = c >> 8;
|
||||||
|
magiccount += (encoding_bytes -1);
|
||||||
|
break;
|
||||||
|
case 'B':
|
||||||
|
c = (( c & 0xff0000) >> 16) | ( c & 0xff00)
|
||||||
|
| (( c & 0xff) << 16);
|
||||||
|
magiccount += 3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
magic = (char *) &c;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* If magic buffer exists: rewind. */
|
||||||
|
magic = magic - (encoding_bytes -1);
|
||||||
|
}
|
||||||
|
address = address - (encoding_bytes -1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
putchar (c);
|
putchar (c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue