mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/nkf/nkf-utf8/nkf.c: follow nkf 1.65
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a09556f064
commit
1ff4571913
2 changed files with 21 additions and 7 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Sat Mar 5 16:50:00 2005 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/nkf/nkf-utf8/nkf.c: follow nkf 1.65
|
||||||
|
|
||||||
Sat Mar 5 16:29:26 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
Sat Mar 5 16:29:26 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
* ext/tk/lib/multi-tk.rb: freeze callback-entry objects
|
* ext/tk/lib/multi-tk.rb: freeze callback-entry objects
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
#define NKF_VERSION "2.0.4"
|
#define NKF_VERSION "2.0.4"
|
||||||
#define NKF_RELEASE_DATE "2005-03-04"
|
#define NKF_RELEASE_DATE "2005-03-05"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
static char *CopyRight =
|
static char *CopyRight =
|
||||||
|
@ -743,6 +743,9 @@ main(argc, argv)
|
||||||
} else {
|
} else {
|
||||||
int nfiles = argc;
|
int nfiles = argc;
|
||||||
while (argc--) {
|
while (argc--) {
|
||||||
|
is_inputcode_mixed = FALSE;
|
||||||
|
is_inputcode_set = FALSE;
|
||||||
|
input_codename = "";
|
||||||
if ((fin = fopen((origfname = *argv++), "r")) == NULL) {
|
if ((fin = fopen((origfname = *argv++), "r")) == NULL) {
|
||||||
perror(*--argv);
|
perror(*--argv);
|
||||||
return(-1);
|
return(-1);
|
||||||
|
@ -1884,6 +1887,7 @@ kanji_convert(f)
|
||||||
{
|
{
|
||||||
int c1,
|
int c1,
|
||||||
c2, c3;
|
c2, c3;
|
||||||
|
int is_8bit = FALSE;
|
||||||
|
|
||||||
module_connection();
|
module_connection();
|
||||||
c2 = 0;
|
c2 = 0;
|
||||||
|
@ -1948,6 +1952,7 @@ kanji_convert(f)
|
||||||
/* 8 bit code */
|
/* 8 bit code */
|
||||||
if (!estab_f && !iso8859_f) {
|
if (!estab_f && !iso8859_f) {
|
||||||
/* not established yet */
|
/* not established yet */
|
||||||
|
if (!is_8bit) is_8bit = TRUE;
|
||||||
c2 = c1;
|
c2 = c1;
|
||||||
NEXT;
|
NEXT;
|
||||||
} else { /* estab_f==TRUE */
|
} else { /* estab_f==TRUE */
|
||||||
|
@ -2198,12 +2203,17 @@ kanji_convert(f)
|
||||||
/* epilogue */
|
/* epilogue */
|
||||||
(*iconv)(EOF, 0, 0);
|
(*iconv)(EOF, 0, 0);
|
||||||
if (!is_inputcode_set)
|
if (!is_inputcode_set)
|
||||||
set_input_codename(
|
{
|
||||||
iconv == e_iconv ? "EUC-JP" :
|
if (is_8bit) {
|
||||||
iconv == s_iconv ? "Shift_JIS" :
|
struct input_code *p = input_code_list;
|
||||||
iconv == w_iconv ? "UTF-8" :
|
struct input_code *result = p;
|
||||||
iconv == w_iconv16 ? "UTF-16" :
|
while (p->name){
|
||||||
"ASCII");
|
if (p->score < result->score) result = p;
|
||||||
|
++p;
|
||||||
|
}
|
||||||
|
set_input_codename(result->name);
|
||||||
|
}
|
||||||
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue