summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Allombert <ballombe@debian.org>2009-01-09 00:50:21 +0100
committerChristoph Brill <egore911@egore911.de>2009-01-09 00:50:21 +0100
commit888d8b3cecbf24cda29597323d3bcddb76141c46 (patch)
treea04bd4923310204e5090019b3820c03afc257e79
parentf7a54147f9e946c316c0bf97c09ca298bb93a5e1 (diff)
[PATCH] 201_rdjpgcom_locale.dpatch
Make rdjpegcom locale aware.
-rw-r--r--rdjpgcom.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/rdjpgcom.c b/rdjpgcom.c
index ffe6fc6..9b611dd 100644
--- a/rdjpgcom.c
+++ b/rdjpgcom.c
@@ -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");
}