~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to ext/nkf/nkf-utf8/nkf.c

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 *
21
21
 * 3. This notice may not be removed or altered from any source distribution.
22
22
 */
23
 
#define NKF_VERSION "2.1.1"
24
 
#define NKF_RELEASE_DATE "2010-04-28"
 
23
#define NKF_VERSION "2.1.2"
 
24
#define NKF_RELEASE_DATE "2011-09-08"
25
25
#define COPY_RIGHT \
26
26
    "Copyright (C) 1987, FUJITSU LTD. (I.Ichikawa).\n" \
27
 
    "Copyright (C) 1996-2010, The nkf Project."
 
27
    "Copyright (C) 1996-2011, The nkf Project."
28
28
 
29
29
#include "config.h"
30
30
#include "nkf.h"
821
821
    buf->capa = length;
822
822
    buf->len = 0;
823
823
    return buf;
824
 
 
824
}
825
825
 
826
826
#if 0
827
827
static void
3878
3878
 
3879
3879
/* $B3:Ev$9$k%3!<%I$NM%@hEY$r>e$2$k$?$a$NL\0u(B */
3880
3880
nkf_char (*mime_priority_func[])(nkf_char c2, nkf_char c1, nkf_char c0) = {
3881
 
    e_iconv, s_iconv, 0, 0, 0, 0,
 
3881
    e_iconv, s_iconv, 0, 0, 0, 0, 0,
3882
3882
#if defined(UTF8_INPUT_ENABLE)
3883
3883
    w_iconv, w_iconv,
3884
3884
#endif
4259
4259
    nkf_char (*u)(nkf_char c ,FILE *f) = i_nungetc;
4260
4260
    int i = 0, j;
4261
4261
    nkf_char buf[12];
4262
 
    long c = -1;
 
4262
    nkf_char c = -1;
4263
4263
 
4264
4264
    buf[i] = (*g)(f);
4265
4265
    if (buf[i] == '&'){
4635
4635
 
4636
4636
#define MIMEOUT_BUF_LENGTH 74
4637
4637
static struct {
4638
 
    char buf[MIMEOUT_BUF_LENGTH+1];
 
4638
    unsigned char buf[MIMEOUT_BUF_LENGTH+1];
4639
4639
    int count;
4640
4640
} mimeout_state;
4641
4641
 
4947
4947
                    i = 0;
4948
4948
 
4949
4949
                    for (; i < mimeout_state.count - len; ++i) {
4950
 
                        if (!strncmp(mimeout_state.buf+i, str, len)) {
 
4950
                        if (!strncmp((char *)(mimeout_state.buf+i), str, len)) {
4951
4951
                            i += len - 2;
4952
4952
                            break;
4953
4953
                        }
5874
5874
 
5875
5875
/*
5876
5876
 * int options(unsigned char *cp)
5877
 
 * 
 
5877
 *
5878
5878
 * return values:
5879
5879
 *    0: success
5880
5880
 *   -1: ArgumentError