diff options
author | Andreas Jaeger <aj@suse.de> | 2003-07-06 11:56:09 +0200 |
---|---|---|
committer | Andreas Jaeger <aj@gcc.gnu.org> | 2003-07-06 11:56:09 +0200 |
commit | 0c20a65f04004843874f9e22c460207285dfdec1 (patch) | |
tree | 4fb7a1aaa85c3c4aeda23d46346034b73d069df2 /gcc/mbchar.c | |
parent | 391cfc46896ec536a390f09b192b58c558e02b05 (diff) | |
download | gcc-0c20a65f04004843874f9e22c460207285dfdec1.zip gcc-0c20a65f04004843874f9e22c460207285dfdec1.tar.gz gcc-0c20a65f04004843874f9e22c460207285dfdec1.tar.bz2 |
jump.c: Convert prototypes to ISO C90.
* jump.c: Convert prototypes to ISO C90.
* langhooks-def.h: Likewise. Add extern to prototypes.
* langhooks.c: Likewise.
* langhooks.h: Likewise.
* lcm.c: Likewise.
* local-alloc.c: Likewise.
* loop-init.c: Likewise.
* loop-unroll.c: Likewise.
* loop-unswitch.c: Likewise.
* loop.c: Likewise.
* loop.h: Likewise. Add extern to prototypes.
* machmode.h: Likewise.
* main.c: Likewise.
* mbchar.c: Likewise.
* mbchar.h: Likewise.
* mkdeps.c: Likewise.
* mkdeps.h: Likewise.
* optabs.c: Likewise.
* optabs.h: Likewise.
* output.h: Likewise.
* gccspec.c: Likwise.
* postreload.c: Likewise.
* prefix.c: Likewise.
* prefix.h: Likewise.
* print-rtl.c: Likewise.
* print-tree.c: Likewise.
* profile.c: Likewise.
* read-rtl.c: Likewise.
* real.c: Likewise.
* real.h: Likewise.
* recog.c: Likewise.
* recog.h: Likewise.
* reg-stack.c: Likewise.
* regclass.c: Likewise.
* regmove.c: Likewise.
* regrename.c: Likewise.
* regs.h: Likewise.
* reload.c: Likewise.
* reload.h: Likewise.
* reload1.c: Likewise.
* reorg.c: Likewise.
* resource.c: Likewise.
* resource.h: Likewise.
* rtl-error.c: Likewise.
* rtl.c: Likewise.
* rtl.h: Likewise.
* rtlanal.c: Likewise.
From-SVN: r68998
Diffstat (limited to 'gcc/mbchar.c')
-rw-r--r-- | gcc/mbchar.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/gcc/mbchar.c b/gcc/mbchar.c index 2767235..81b8754 100644 --- a/gcc/mbchar.c +++ b/gcc/mbchar.c @@ -1,5 +1,5 @@ /* Multibyte Character Functions. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2003 Free Software Foundation, Inc. This file is part of GCC. @@ -41,7 +41,7 @@ typedef enum {ESCAPE, DOLLAR, BRACKET, AT, B, J, NUL, JIS_CHAR, OTHER, JIS_C_NUM} JIS_CHAR_TYPE; typedef enum {ASCII, A_ESC, A_ESC_DL, JIS, JIS_1, JIS_2, J_ESC, J_ESC_BR, - J2_ESC, J2_ESC_BR, INV, JIS_S_NUM} JIS_STATE; + J2_ESC, J2_ESC_BR, INV, JIS_S_NUM} JIS_STATE; typedef enum {COPYA, COPYJ, COPYJ2, MAKE_A, MAKE_J, NOOP, EMPTY, ERROR} JIS_ACTION; @@ -94,10 +94,7 @@ const char *literal_codeset = NULL; it treats locale names of the form "C-..." specially. */ int -local_mbtowc (pwc, s, n) - wchar_t *pwc; - const char *s; - size_t n; +local_mbtowc (wchar_t *pwc, const char *s, size_t n) { static JIS_STATE save_state = ASCII; JIS_STATE curr_state = save_state; @@ -153,7 +150,7 @@ local_mbtowc (pwc, s, n) char1 = *t; if (ISEUCJP (char1)) { - int char2 = t[1]; + int char2 = t[1]; if (n <= 1) return -1; @@ -182,7 +179,7 @@ local_mbtowc (pwc, s, n) JIS_CHAR_TYPE ch; const unsigned char *ptr; size_t i, curr_ch; - + if (s == NULL) { save_state = ASCII; @@ -227,7 +224,7 @@ local_mbtowc (pwc, s, n) action = JIS_action_table[curr_state][ch]; curr_state = JIS_state_table[curr_state][ch]; - + switch (action) { case NOOP: @@ -272,9 +269,9 @@ local_mbtowc (pwc, s, n) } /* More than n bytes needed. */ - return -1; + return -1; } - + #ifdef CROSS_COMPILE if (s == NULL) /* Not state-dependent. */ @@ -298,9 +295,7 @@ local_mbtowc (pwc, s, n) it treats locale names of the form "C-..." specially. */ int -local_mblen (s, n) - const char *s; - size_t n; +local_mblen (const char *s, size_t n) { return local_mbtowc (NULL, s, n); } @@ -311,7 +306,7 @@ local_mblen (s, n) except it treats locale names of the form "C-..." specially. */ int -local_mb_cur_max () +local_mb_cur_max (void) { if (literal_codeset == NULL || strlen (literal_codeset) <= 1) ; |