1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/nkf/nkf-utf8: Merge b0a6577a521d1bba5e19853f95d5c4b9be1072b5.

Support JIS X 0213 and some bugfixes.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-11-22 08:47:30 +00:00
parent 86541e02c1
commit 59c41661a7
5 changed files with 6476 additions and 126 deletions

View file

@ -1,3 +1,8 @@
Thu Nov 22 17:45:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
* ext/nkf/nkf-utf8: Merge b0a6577a521d1bba5e19853f95d5c4b9be1072b5.
Support JIS X 0213 and some bugfixes.
Thu Nov 22 17:39:37 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
* tool/gen_dummy_probes.rb: don't change #include, #if and #endif
@ -136,7 +141,7 @@ Tue Nov 20 21:12:37 2012 NARUSE, Yui <naruse@ruby-lang.org>
Tue Nov 20 21:22:44 2012 Masaki Suketa <masaki.suketa@nifty.ne.jp>
* test/win32ole/test_win32ole_type.rb (test_implemented_ole_types):
* test/win32ole/test_win32ole_type.rb (test_implemented_ole_types):
IShellDispatch6 bundled in Windows 8. Thanks to phasis68 (Heesob
Park). [ruby-core:49580][Bug #7403]
@ -440,7 +445,7 @@ Sun Nov 18 09:31:47 2012 Tadayoshi Funaba <tadf@dotrb.org>
* rational.c (read_num): ditto.
Sun Nov 18 02:50:12 2012 Luis Lavena <luislavena@gmail.com>
* win32/file.c (replace_to_long_name): correct logic around wildcard
characters detection and ensure wide-chars are used as pattern.
[ruby-core:49451] [Bug #7374]

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,12 @@
/*
*
*
* nkf.h - Header file for nkf
*
* $Id$
*
* $Id: nkf.h,v 1.6 2008/11/07 02:43:43 naruse Exp $
*/
#ifndef NKF_H
#define NKF_H
/* Wrapper of configurations */
@ -17,21 +18,9 @@
#endif
#if DEFAULT_NEWLINE == 0x0D0A
#define PUT_NEWLINE(func) do {\
func(0x0D);\
func(0x0A);\
} while (0)
#define OCONV_NEWLINE(func) do {\
func(0, 0x0D);\
func(0, 0x0A);\
} while (0)
#elif DEFAULT_NEWLINE == 0x0D
#define PUT_NEWLINE(func) func(0x0D)
#define OCONV_NEWLINE(func) func(0, 0x0D)
#else
#define DEFAULT_NEWLINE 0x0A
#define PUT_NEWLINE(func) func(0x0A)
#define OCONV_NEWLINE(func) func(0, 0x0A)
#endif
#ifdef HELP_OUTPUT_STDERR
#define HELP_OUTPUT stderr
@ -94,7 +83,7 @@ void setbinmode(FILE *fp)
#define setbinmode(fp) setmode(fileno(fp), O_BINARY)
#endif
#else /* UNIX */
#define setbinmode(fp)
#define setbinmode(fp) (void)(fp)
#endif
#ifdef _IOFBF /* SysV and MSDOS, Windows */
@ -185,6 +174,14 @@ void setbinmode(FILE *fp)
#define FALSE 0
#define TRUE 1
#ifndef ARG_UNUSED
#if defined(__GNUC__)
# define ARG_UNUSED __attribute__ ((unused))
#else
# define ARG_UNUSED
#endif
#endif
#ifdef WIN32DLL
#include "nkf32.h"
#endif

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
/*
* utf8tbl.h - Header file for Convertion Table
*
* $Id$
* $Id: utf8tbl.h,v 1.3 2008/01/23 09:10:25 naruse Exp $
*/
#ifndef _UTF8TBL_H_
@ -14,7 +14,17 @@ extern const unsigned short euc_to_utf8_1byte[];
extern const unsigned short *const euc_to_utf8_2bytes[];
extern const unsigned short *const euc_to_utf8_2bytes_ms[];
extern const unsigned short *const euc_to_utf8_2bytes_mac[];
extern const unsigned short *const euc_to_utf8_2bytes_x0213[];
extern const unsigned short *const x0212_to_utf8_2bytes[];
extern const unsigned short *const x0212_to_utf8_2bytes_x0213[];
#define sizeof_x0213_combining_chars 5
#define sizeof_x0213_combining_table 25
#define sizeof_x0213_1_surrogate_table 26
#define sizeof_x0213_2_surrogate_table 277
extern const unsigned short x0213_combining_chars[sizeof_x0213_combining_chars];
extern const unsigned short x0213_combining_table[sizeof_x0213_combining_table][3];
extern const unsigned short x0213_1_surrogate_table[sizeof_x0213_1_surrogate_table][3];
extern const unsigned short x0213_2_surrogate_table[sizeof_x0213_2_surrogate_table][3];
#endif /* UTF8_OUTPUT_ENABLE */
#ifdef UTF8_INPUT_ENABLE
@ -26,10 +36,12 @@ extern const unsigned short *const utf8_to_euc_2bytes[];
extern const unsigned short *const utf8_to_euc_2bytes_ms[];
extern const unsigned short *const utf8_to_euc_2bytes_932[];
extern const unsigned short *const utf8_to_euc_2bytes_mac[];
extern const unsigned short *const utf8_to_euc_2bytes_x0213[];
extern const unsigned short *const *const utf8_to_euc_3bytes[];
extern const unsigned short *const *const utf8_to_euc_3bytes_ms[];
extern const unsigned short *const *const utf8_to_euc_3bytes_932[];
extern const unsigned short *const *const utf8_to_euc_3bytes_mac[];
extern const unsigned short *const *const utf8_to_euc_3bytes_x0213[];
#endif /* UTF8_INPUT_ENABLE */
#ifdef UNICODE_NORMALIZATION