OSDN Git Service

* remove CR
authorNARUSE, Yui <naruse@users.sourceforge.jp>
Sun, 8 Oct 2006 12:02:34 +0000 (12:02 +0000)
committerNARUSE, Yui <naruse@users.sourceforge.jp>
Sun, 8 Oct 2006 12:02:34 +0000 (12:02 +0000)
* Continue conversion when nkf can't read a file in multiple files

nkf.c

diff --git a/nkf.c b/nkf.c
index 40d31f0..835e631 100644 (file)
--- a/nkf.c
+++ b/nkf.c
@@ -39,7 +39,7 @@
 **        E-Mail: furukawa@tcp-ip.or.jp
 **    \e$B$^$G8fO"Mm$r$*4j$$$7$^$9!#\e(B
 ***********************************************************************/
-/* $Id: nkf.c,v 1.110 2006/09/15 11:04:36 naruse Exp $ */
+/* $Id: nkf.c,v 1.111 2006/10/08 03:02:34 naruse Exp $ */
 #define NKF_VERSION "2.0.8"
 #define NKF_RELEASE_DATE "2006-09-15"
 #include "config.h"
@@ -581,8 +581,8 @@ struct input_code input_code_list[] = {
     {"Shift_JIS", 0, 0, 0, {0, 0, 0}, s_status, s_iconv, 0},
 #ifdef UTF8_INPUT_ENABLE
     {"UTF-8",     0, 0, 0, {0, 0, 0}, w_status, w_iconv, 0},
-    {"UTF-16",    0, 0, 0, {0, 0, 0},     NULL, w_iconv16, 0},\r
-    {"UTF-32",    0, 0, 0, {0, 0, 0},     NULL, w_iconv32, 0},\r
+    {"UTF-16",    0, 0, 0, {0, 0, 0},     NULL, w_iconv16, 0},
+    {"UTF-32",    0, 0, 0, {0, 0, 0},     NULL, w_iconv32, 0},
 #endif
     {0}
 };
@@ -863,6 +863,7 @@ int main(int argc, char **argv)
 #endif
           if ((fin = fopen((origfname = *argv++), "r")) == NULL) {
               perror(*--argv);
+               continue;\r
               return(-1);
           } else {
 #ifdef OVERWRITE
@@ -2233,10 +2234,10 @@ void code_status(nkf_char c)
     struct input_code *result = 0;
     struct input_code *p = input_code_list;
     while (p->name){
-        if (!p->status_func) {\r
-           ++p;\r
-           continue;\r
-       }\r
+        if (!p->status_func) {
+           ++p;
+           continue;
+       }
         if (!p->status_func)
            continue;
         (p->status_func)(p, c);