Fredrik Fornwall
8 years ago
4 changed files with 69 additions and 30 deletions
@ -1,30 +0,0 @@ |
|||||
diff -u -r ../gtypist-2.9.4/src/gtypist.c ./src/gtypist.c
|
|
||||
--- ../gtypist-2.9.4/src/gtypist.c 2013-08-18 16:36:14.000000000 +0200
|
|
||||
+++ ./src/gtypist.c 2014-03-01 01:30:43.000000000 +0100
|
|
||||
@@ -41,7 +41,7 @@
|
|
||||
#include <assert.h> |
|
||||
#include <locale.h> |
|
||||
#include <wctype.h> |
|
||||
-#ifndef MINGW
|
|
||||
+#if !defined(MINGW) && !defined(__ANDROID__)
|
|
||||
#include <langinfo.h> |
|
||||
#endif |
|
||||
|
|
||||
@@ -138,7 +138,7 @@
|
|
||||
#define ADDCH_REV(X) wideaddch_rev(X) |
|
||||
|
|
||||
|
|
||||
-#ifdef MINGW
|
|
||||
+#if defined(MINGW) || defined(__ANDROID__)
|
|
||||
#define MIN( a, b ) ( ( a ) < ( b )? ( a ) : ( b ) ) |
|
||||
#define MAX( a, b ) ( ( a ) > ( b )? ( a ) : ( b ) ) |
|
||||
#endif |
|
||||
@@ -1999,7 +1999,7 @@
|
|
||||
textdomain (PACKAGE); |
|
||||
#endif |
|
||||
|
|
||||
-#ifdef MINGW
|
|
||||
+#if defined(MINGW) || defined(__ANDROID__)
|
|
||||
locale_encoding = "UTF-8"; |
|
||||
#else |
|
||||
locale_encoding = nl_langinfo(CODESET); |
|
@ -0,0 +1,11 @@ |
|||||
|
diff -u -r ../gtypist-2.9.5/src/cursmenu.c ./src/cursmenu.c
|
||||
|
--- ../gtypist-2.9.5/src/cursmenu.c 2013-08-18 14:36:14.000000000 +0000
|
||||
|
+++ ./src/cursmenu.c 2017-07-07 08:35:39.553927999 +0000
|
||||
|
@@ -20,6 +20,7 @@
|
||||
|
#include "config.h" |
||||
|
#include "cursmenu.h" |
||||
|
#include "script.h" |
||||
|
+#include "utf8.h"
|
||||
|
|
||||
|
#ifdef HAVE_PDCURSES |
||||
|
#include <curses.h> |
@ -0,0 +1,47 @@ |
|||||
|
diff -u -r ../gtypist-2.9.5/src/gtypist.c ./src/gtypist.c
|
||||
|
--- ../gtypist-2.9.5/src/gtypist.c 2014-08-12 06:29:13.000000000 +0000
|
||||
|
+++ ./src/gtypist.c 2017-07-07 08:34:41.950574988 +0000
|
||||
|
@@ -21,6 +21,7 @@
|
||||
|
*/ |
||||
|
|
||||
|
#include "config.h" |
||||
|
+#include "utf8.h"
|
||||
|
#include <stdlib.h> |
||||
|
#include <unistd.h> |
||||
|
#include <stdio.h> |
||||
|
@@ -42,7 +43,7 @@
|
||||
|
#include <assert.h> |
||||
|
#include <locale.h> |
||||
|
#include <wctype.h> |
||||
|
-#ifndef MINGW
|
||||
|
+#if !defined(MINGW) && !defined(__ANDROID__)
|
||||
|
#include <langinfo.h> |
||||
|
#endif |
||||
|
|
||||
|
@@ -62,6 +63,8 @@
|
||||
|
char* locale_encoding; /* current locale's encoding */ |
||||
|
int isUTF8Locale; /* does the current locale have a UTF-8 encoding? */ |
||||
|
|
||||
|
+void check_script_file_with_current_encoding( FILE *script );
|
||||
|
+
|
||||
|
/* character to be display to represent "enter key" */ |
||||
|
/* TODO: this requires beginner mode! |
||||
|
#define RETURN_CHARACTER 0x000023CE */ |
||||
|
@@ -139,7 +142,7 @@
|
||||
|
#define ADDCH_REV(X) wideaddch_rev(X) |
||||
|
|
||||
|
|
||||
|
-#ifdef MINGW
|
||||
|
+#if defined(MINGW) || defined(__ANDROID__)
|
||||
|
#define MIN( a, b ) ( ( a ) < ( b )? ( a ) : ( b ) ) |
||||
|
#define MAX( a, b ) ( ( a ) > ( b )? ( a ) : ( b ) ) |
||||
|
#endif |
||||
|
@@ -2010,7 +2013,7 @@
|
||||
|
textdomain (PACKAGE); |
||||
|
#endif |
||||
|
|
||||
|
-#ifdef MINGW
|
||||
|
+#if defined(MINGW) || defined(__ANDROID__)
|
||||
|
locale_encoding = "UTF-8"; |
||||
|
#else |
||||
|
locale_encoding = nl_langinfo(CODESET); |
@ -0,0 +1,11 @@ |
|||||
|
diff -u -r ../gtypist-2.9.5/src/utf8.c ./src/utf8.c
|
||||
|
--- ../gtypist-2.9.5/src/utf8.c 2013-08-18 14:36:14.000000000 +0000
|
||||
|
+++ ./src/utf8.c 2017-07-07 08:32:20.764160765 +0000
|
||||
|
@@ -19,6 +19,7 @@
|
||||
|
|
||||
|
#include "config.h" |
||||
|
#include "utf8.h" |
||||
|
+#include "error.h"
|
||||
|
|
||||
|
#ifdef HAVE_PDCURSES |
||||
|
#include <curses.h> |
Loading…
Reference in new issue