Fix LOCALE support
Submitted by: Mikhail Teterin <mi@kot.ne.mediaone.net> PR: ports/16063
This commit is contained in:
parent
c4b9a18200
commit
1b8d869ff1
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=27976
4 changed files with 76 additions and 0 deletions
20
graphics/jpeg-mmx/files/patch-ad
Normal file
20
graphics/jpeg-mmx/files/patch-ad
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- djpeg.c.orig Sat Oct 11 18:29:07 1997
|
||||
+++ djpeg.c Mon Apr 24 16:04:13 2000
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
||||
#include "jversion.h" /* for version message */
|
||||
|
||||
+#include <locale.h> /* to declare setlocal() */
|
||||
#include <ctype.h> /* to declare isprint() */
|
||||
|
||||
#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
|
||||
@@ -385,6 +386,9 @@
|
||||
cinfo->unread_marker - JPEG_APP0, (long) length);
|
||||
}
|
||||
|
||||
+ if (traceit) {
|
||||
+ setlocale(LC_ALL, "");
|
||||
+ }
|
||||
while (--length >= 0) {
|
||||
ch = jpeg_getc(cinfo);
|
||||
if (traceit) {
|
18
graphics/jpeg-mmx/files/patch-ae
Normal file
18
graphics/jpeg-mmx/files/patch-ae
Normal file
|
@ -0,0 +1,18 @@
|
|||
--- rdjpgcom.c.orig Sat Oct 11 18:41:04 1997
|
||||
+++ rdjpgcom.c Mon Apr 24 16:04:13 2000
|
||||
@@ -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> /* to declare setlocale() */
|
||||
#include <ctype.h> /* to declare isupper(), tolower() */
|
||||
#ifdef USE_SETMODE
|
||||
#include <fcntl.h> /* to declare setmode()'s parameter macros */
|
||||
@@ -231,6 +232,7 @@
|
||||
ERREXIT("Erroneous JPEG marker length");
|
||||
length -= 2;
|
||||
|
||||
+ setlocale(LC_ALL, "");
|
||||
while (length > 0) {
|
||||
ch = read_1_byte();
|
||||
/* Emit the character in a readable form.
|
20
graphics/jpeg/files/patch-ad
Normal file
20
graphics/jpeg/files/patch-ad
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- djpeg.c.orig Sat Oct 11 18:29:07 1997
|
||||
+++ djpeg.c Mon Apr 24 16:04:13 2000
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */
|
||||
#include "jversion.h" /* for version message */
|
||||
|
||||
+#include <locale.h> /* to declare setlocal() */
|
||||
#include <ctype.h> /* to declare isprint() */
|
||||
|
||||
#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
|
||||
@@ -385,6 +386,9 @@
|
||||
cinfo->unread_marker - JPEG_APP0, (long) length);
|
||||
}
|
||||
|
||||
+ if (traceit) {
|
||||
+ setlocale(LC_ALL, "");
|
||||
+ }
|
||||
while (--length >= 0) {
|
||||
ch = jpeg_getc(cinfo);
|
||||
if (traceit) {
|
18
graphics/jpeg/files/patch-ae
Normal file
18
graphics/jpeg/files/patch-ae
Normal file
|
@ -0,0 +1,18 @@
|
|||
--- rdjpgcom.c.orig Sat Oct 11 18:41:04 1997
|
||||
+++ rdjpgcom.c Mon Apr 24 16:04:13 2000
|
||||
@@ -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> /* to declare setlocale() */
|
||||
#include <ctype.h> /* to declare isupper(), tolower() */
|
||||
#ifdef USE_SETMODE
|
||||
#include <fcntl.h> /* to declare setmode()'s parameter macros */
|
||||
@@ -231,6 +232,7 @@
|
||||
ERREXIT("Erroneous JPEG marker length");
|
||||
length -= 2;
|
||||
|
||||
+ setlocale(LC_ALL, "");
|
||||
while (length > 0) {
|
||||
ch = read_1_byte();
|
||||
/* Emit the character in a readable form.
|
Loading…
Reference in a new issue