summaryrefslogtreecommitdiff
path: root/ext/nkf/nkf-utf8/nkf.h
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-22 08:47:30 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-22 08:47:30 +0000
commit59c41661a7de1c4eab03023fa463792f7be0e944 (patch)
tree6490e3f58d50e3029fe468e30fb627b061ea4f1e /ext/nkf/nkf-utf8/nkf.h
parent86541e02c18e6ccdd0c0c632da06120a04a9ef11 (diff)
* 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
Diffstat (limited to 'ext/nkf/nkf-utf8/nkf.h')
-rw-r--r--ext/nkf/nkf-utf8/nkf.h29
1 files changed, 13 insertions, 16 deletions
diff --git a/ext/nkf/nkf-utf8/nkf.h b/ext/nkf/nkf-utf8/nkf.h
index dd479a0f87..9f0f1515a2 100644
--- a/ext/nkf/nkf-utf8/nkf.h
+++ b/ext/nkf/nkf-utf8/nkf.h
@@ -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