chiark / gitweb /
less: Bump revision after enabling pcre
[termux-packages] / packages / gtypist / src-gtypist.c.patch
1 diff -u -r ../gtypist-2.9.5/src/gtypist.c ./src/gtypist.c
2 --- ../gtypist-2.9.5/src/gtypist.c      2014-08-12 06:29:13.000000000 +0000
3 +++ ./src/gtypist.c     2017-07-07 08:34:41.950574988 +0000
4 @@ -21,6 +21,7 @@
5   */
6  
7  #include "config.h"
8 +#include "utf8.h"
9  #include <stdlib.h>
10  #include <unistd.h>
11  #include <stdio.h>
12 @@ -42,7 +43,7 @@
13  #include <assert.h>
14  #include <locale.h>
15  #include <wctype.h>
16 -#ifndef MINGW
17 +#if !defined(MINGW) && !defined(__ANDROID__)
18  #include <langinfo.h>
19  #endif
20  
21 @@ -62,6 +63,8 @@
22  char* locale_encoding; /* current locale's encoding */
23  int isUTF8Locale; /* does the current locale have a UTF-8 encoding? */
24  
25 +void check_script_file_with_current_encoding( FILE *script );
26 +
27  /* character to be display to represent "enter key" */
28  /* TODO: this requires beginner mode!
29  #define RETURN_CHARACTER 0x000023CE */
30 @@ -139,7 +142,7 @@
31  #define ADDCH_REV(X) wideaddch_rev(X)
32  
33  
34 -#ifdef MINGW
35 +#if defined(MINGW) || defined(__ANDROID__)
36  #define MIN( a, b ) ( ( a ) < ( b )? ( a ) : ( b ) )
37  #define MAX( a, b ) ( ( a ) > ( b )? ( a ) : ( b ) )
38  #endif
39 @@ -2010,7 +2013,7 @@
40    textdomain (PACKAGE);
41  #endif
42  
43 -#ifdef MINGW
44 +#if defined(MINGW) || defined(__ANDROID__)
45    locale_encoding = "UTF-8";
46  #else
47    locale_encoding = nl_langinfo(CODESET);