~ubuntu-branches/ubuntu/vivid/chasen/vivid

« back to all changes in this revision

Viewing changes to lib/katuyou.c

  • Committer: Bazaar Package Importer
  • Author(s): NOKUBI Takatsugu
  • Date: 2004-07-12 17:04:30 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040712170430-qd9g2og0261n6h8j
Tags: 2.3.3-5
Fixed non-ISO C++ compliant code, closes: #258568.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * katuyou.c - conjugation
3
 
 *
4
 
 * Copyright (C) 2000, 2001, 
5
 
 *                            Nara Institute of Science and Technology
6
 
 *                           
 
2
 * Copyright (c) 2003 Nara Institute of Science and Technology
7
3
 * All rights reserved.
8
4
 *
9
5
 * Redistribution and use in source and binary forms, with or without
10
6
 * modification, are permitted provided that the following conditions
11
7
 * are met:
 
8
 *
12
9
 * 1. Redistributions of source code must retain the above copyright
13
 
 *    notice, this list of conditions and the following disclaimer.
 
10
 *   notice, this list of conditions and the following disclaimer.
14
11
 * 2. Redistributions in binary form must reproduce the above copyright
15
12
 *    notice, this list of conditions and the following disclaimer in the
16
13
 *    documentation and/or other materials provided with the distribution.
17
 
 * 3. All advertising materials mentioning features or use of this software
18
 
 *    must display the following acknowledgement:
19
 
 *      This product includes software developed by Nara Institute of 
20
 
 *      Science and Technology.
21
 
 * 4. The name Nara Institute of Science and Technology may not be used to
22
 
 *    endorse or promote products derived from this software without specific
23
 
 *    prior written permission.
24
 
 *    
 
14
 * 3. The name Nara Institute of Science and Technology may not be used to
 
15
 *    endorse or promote products derived from this software without
 
16
 *    specific prior written permission.
25
17
 *
26
18
 * THIS SOFTWARE IS PROVIDED BY Nara Institute of Science and Technology 
27
19
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
33
25
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
34
26
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
35
27
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
 
28
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
29
 *
37
 
 * 1990/12/17/Mon       Yutaka MYOKI(Nagao Lab., KUEE)
38
 
 * $Id: katuyou.c,v 1.8.4.1 2002/02/05 13:42:07 akira-k Exp $
 
30
 * $Id: katuyou.c,v 1.14 2003/07/08 17:08:49 kazuma-t Exp $
39
31
 */
40
32
 
41
33
#include "chadic.h"
 
34
#include "literal.h"
42
35
 
43
36
ktype_t Cha_type[TYPE_NUM];
44
37
kform_t Cha_form[TYPE_NUM][FORM_NUM];
61
54
        cell1 = cha_car(cha_cdr(cell1));
62
55
 
63
56
        /* base form string */
64
 
        if (strmatch3(Cha_type[i].name, JSTR_BASE_FORM_STR,
65
 
                      ESTR_BASE_FORM_STR1, ESTR_BASE_FORM_STR2)) {
 
57
        if (cha_litmatch(Cha_type[i].name, 2,
 
58
                         STR_BASE_FORM_STR1, STR_BASE_FORM_STR2)) {
66
59
            Cha_base_form_str = cha_strdup(cha_s_atom(cell1));
67
60
            i--;
68
61
            continue;
77
70
            if (!Cha_type[i].basic &&
78
71
                (Cha_base_form_str
79
72
                 ? !strcmp(Cha_form[i][j].name, Cha_base_form_str)
80
 
                 : strmatch3(Cha_form[i][j].name, JSTR_BASE_FORM,
81
 
                             ESTR_BASE_FORM1, ESTR_BASE_FORM2)))
 
73
                 : cha_litmatch(Cha_form[i][j].name, 2,
 
74
                                STR_BASE_FORM1, STR_BASE_FORM2)))
82
75
                Cha_type[i].basic = j;
83
76
            /*
84
77
             * gobi 
90
83
            else {
91
84
                Cha_form[i][j].gobi = cha_strdup(s);
92
85
                Cha_form[i][j].gobi_len = strlen(s);
93
 
#ifdef SJIS
94
 
                sjis2euc(Cha_form[i][j].gobi);
95
 
#endif
96
86
            }
97
87
            /*
98
88
             * ygobi 
103
93
                Cha_form[i][j].ygobi = "";
104
94
            else {
105
95
                Cha_form[i][j].ygobi = cha_strdup(s);
106
 
#ifdef SJIS
107
 
                sjis2euc(Cha_form[i][j].ygobi);
108
 
#endif
109
96
            }
110
97
            /*
111
98
             * pgobi 
116
103
                Cha_form[i][j].pgobi = "";
117
104
            else {
118
105
                Cha_form[i][j].pgobi = cha_strdup(s);
119
 
#ifdef SJIS
120
 
                sjis2euc(Cha_form[i][j].pgobi);
121
 
#endif
122
106
            }
123
107
        }
124
108
        if (!Cha_type[i].basic)