"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/unicodeio.c" between
bison-3.8.1.tar.xz and bison-3.8.2.tar.xz

About: Bison is a general-purpose parser generator.

unicodeio.c  (bison-3.8.1.tar.xz):unicodeio.c  (bison-3.8.2.tar.xz)
skipping to change at line 195 skipping to change at line 195
conditions (STREAM is an open stream and not wide-character oriented) conditions (STREAM is an open stream and not wide-character oriented)
when fwrite() returns a value != buflen it also sets STREAM's error when fwrite() returns a value != buflen it also sets STREAM's error
indicator. */ indicator. */
fwrite (buf, 1, buflen, stream); fwrite (buf, 1, buflen, stream);
return 0; return 0;
} }
/* Simple failure callback that displays an error and exits. */ /* Simple failure callback that displays an error and exits. */
static long static long
exit_failure_callback (unsigned int code, const char *msg, exit_failure_callback (unsigned int code, const char *msg,
void *callback_arg _GL_UNUSED) _GL_UNUSED void *callback_arg)
{ {
if (msg == NULL) if (msg == NULL)
error (1, 0, _("cannot convert U+%04X to local character set"), code); error (1, 0, _("cannot convert U+%04X to local character set"), code);
else else
error (1, 0, _("cannot convert U+%04X to local character set: %s"), code, error (1, 0, _("cannot convert U+%04X to local character set: %s"), code,
gettext (msg)); gettext (msg));
return -1; return -1;
} }
/* Simple failure callback that displays a fallback representation in plain /* Simple failure callback that displays a fallback representation in plain
ASCII, using the same notation as ISO C99 strings. */ ASCII, using the same notation as ISO C99 strings. */
static long static long
fallback_failure_callback (unsigned int code, fallback_failure_callback (unsigned int code,
const char *msg _GL_UNUSED, _GL_UNUSED const char *msg,
void *callback_arg) void *callback_arg)
{ {
FILE *stream = (FILE *) callback_arg; FILE *stream = (FILE *) callback_arg;
if (code < 0x10000) if (code < 0x10000)
fprintf (stream, "\\u%04X", code); fprintf (stream, "\\u%04X", code);
else else
fprintf (stream, "\\U%08X", code); fprintf (stream, "\\U%08X", code);
return -1; return -1;
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)