Magellan Linux

Annotation of /trunk/libjpeg/patches/libjpeg-6b-rdjpgcom-locale.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 144 - (hide annotations) (download)
Tue May 8 20:06:05 2007 UTC (17 years, 1 month ago) by niro
File size: 993 byte(s)
-import

1 niro 144 # DP: Make rdjpegcom locale aware.
2    
3     --- jpeg-6b/rdjpgcom.c Sun Oct 12 00:41:04 1997
4     +++ libjpeg6b-6b/rdjpgcom.c Wed Feb 26 01:04:42 2003
5     @@ -14,6 +14,7 @@
6     #define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */
7     #include "jinclude.h" /* get auto-config symbols, <stdio.h> */
8    
9     +#include <locale.h> /*ballombe@debian.org: use locale for isprint*/
10     #include <ctype.h> /* to declare isupper(), tolower() */
11     #ifdef USE_SETMODE
12     #include <fcntl.h> /* to declare setmode()'s parameter macros */
13     @@ -223,7 +224,10 @@
14     unsigned int length;
15     int ch;
16     int lastch = 0;
17     -
18     +/* ballombe@debian.org Thu, 15 Nov 2001 20:04:47 +0100*/
19     +/* Set locale properly for isprint*/
20     + setlocale(LC_CTYPE,"");
21     +
22     /* Get the marker parameter length count */
23     length = read_2_bytes();
24     /* Length includes itself, so must be at least 2 */
25     @@ -254,6 +258,8 @@
26     length--;
27     }
28     printf("\n");
29     +/*ballombe@debian.org: revert to C locale*/
30     + setlocale(LC_CTYPE,"C");
31     }
32    
33