diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-01-09 00:10:42 +0100 |
---|---|---|
committer | Christoph Brill <egore911@egore911.de> | 2009-01-09 00:10:42 +0100 |
commit | aca7f01e52d8acc9b07343f51d3b5d7ba1bb807a (patch) | |
tree | c1afc7a28d1cecb2dcd3196fb2efff770b56677f | |
parent | b4a0d19b985df291bf5f0fff1c6e6d657e2091b9 (diff) |
[PATCH] 50_all_jpeg-Debian-rdjpgcom_locale.patch
Make rdjpegcom locale aware.
-rw-r--r-- | rdjpgcom.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -14,6 +14,7 @@ #define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */ #include "jinclude.h" /* get auto-config symbols, <stdio.h> */ +#include <locale.h> /*ballombe@debian.org: use locale for isprint*/ #include <ctype.h> /* to declare isupper(), tolower() */ #ifdef USE_SETMODE #include <fcntl.h> /* to declare setmode()'s parameter macros */ @@ -223,7 +224,10 @@ process_COM (void) unsigned int length; int ch; int lastch = 0; - +/* ballombe@debian.org Thu, 15 Nov 2001 20:04:47 +0100*/ +/* Set locale properly for isprint*/ + setlocale(LC_CTYPE,""); + /* Get the marker parameter length count */ length = read_2_bytes(); /* Length includes itself, so must be at least 2 */ @@ -254,6 +258,8 @@ process_COM (void) length--; } printf("\n"); +/*ballombe@debian.org: revert to C locale*/ + setlocale(LC_CTYPE,"C"); } |