Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37862262
en ru br
ALT Linux repositórios
5.0: 6b-alt9
4.1: 6b-alt8
4.0: 6b-alt8
3.0: 6b-alt5

Group :: Sistema/Bibliotecas
RPM: libjpeg

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: libjpeg-6b-alt-rdjpgcom-i18n.patch
Download


--- jpeg-6b.orig/rdjpgcom.c	1997-10-12 02:41:04 +0400
+++ jpeg-6b/rdjpgcom.c	2004-10-11 20:31:38 +0400
@@ -15,6 +15,7 @@
 #include "jinclude.h"		/* get auto-config symbols, <stdio.h> */
 
 #include <ctype.h>		/* to declare isupper(), tolower() */
+#include <locale.h>		/* for setlocale() */
 #ifdef USE_SETMODE
 #include <fcntl.h>		/* to declare setmode()'s parameter macros */
 /* If you have setmode() but not <io.h>, just delete this line: */
@@ -223,6 +224,7 @@ process_COM (void)
   unsigned int length;
   int ch;
   int lastch = 0;
+  const char *prev_locale;
 
   /* Get the marker parameter length count */
   length = read_2_bytes();
@@ -231,6 +233,8 @@ process_COM (void)
     ERREXIT("Erroneous JPEG marker length");
   length -= 2;
 
+  prev_locale = setlocale(LC_CTYPE, "");
+
   while (length > 0) {
     ch = read_1_byte();
     /* Emit the character in a readable form.
@@ -254,6 +258,9 @@ process_COM (void)
     length--;
   }
   printf("\n");
+
+  if (prev_locale)
+    setlocale(LC_CTYPE, "C");
 }
 
 
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009