[Nkf-dev 29] Re: nkf 2.0.6 リリース

Back to archive index

Tadamasa Teranishi yw3t-****@asahi*****
2006年 3月 29日 (水) 23:20:13 JST


寺西です。

"NARUSE, Yui" wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> nkf 2.0.6 をリリースしました。

環境によってはコンパイルできません。

$ make
cc -O -Wall -c utf8tbl.c
cc -O -Wall -o nkf nkf.c utf8tbl.o
nkf.c: In function `nkf_each_char_to_hex':
nkf.c:3328: syntax error before `int'
nkf.c:3329: `shift' undeclared (first use in this function)
nkf.c:3329: (Each undeclared identifier is reported only once
nkf.c:3329: for each function it appears in.)
nkf.c: In function `encode_fallback_subchar':
nkf.c:3420: syntax error before `int'
nkf.c:3421: `shift' undeclared (first use in this function)
nkf.c: In function `e2w_conv':
nkf.c:3452: syntax error before `extern'
nkf.c:3455: `x0212_to_utf8_2bytes' undeclared (first use in this
function)
*** Error code 1

例えば、nkf.c(3328) のところは途中で変数の宣言があります。

void
nkf_each_char_to_hex(f, c)
    void (*f)PROTO((int c2,int c1));
    int c;
{
    const char *hex = "0123456789ABCDEF";
    c &= 0x00FFFFFF;
    int shift = 20;

C++ と違って C だとシンタックスエラーになります。


{
    const char *hex = "0123456789ABCDEF";
    int shift = 20;
    c &= 0x00FFFFFF;

でないといけません。
他のエラーのところも同様です。

Makafile の CFLAGS に -Wall が付いている等 cc が gcc を前提にして
いるのが問題でしょう。
-- 
=====================================================================
寺西 忠勝(TADAMASA TERANISHI)  yw3t-****@asahi*****
http://www.asahi-net.or.jp/~yw3t-trns/index.htm
Key fingerprint =  474E 4D93 8E97 11F6 662D  8A42 17F5 52F4 10E7 D14E




nkf-dev メーリングリストの案内
Back to archive index