Linuxにdspcatに似たユーティリティがありますか?

Linuxにdspcatに似たユーティリティがありますか?

私は以下を使用しますdspcat開くコマンドAIX以下を使用して生成されたメッセージカタログをダンプできます。gencat注文する:

dspcat –g  /u/is/bin/I18N/l/lib/libca/libcalifornia.117.cat >> /tmp/message.smc

Linuxでこれらのディレクトリの1つをダンプする方法についてのヒントを見つけるのに良い時間を費やしましたが、そのコマンドは利用できないようです。どんな助けでも大変感謝します。

ベストアンサー1

ソースコードが見つかりましたdspcat.chttp://www.smart.net/~rlhamil/。特にこれに関してアーカイブ。コンパイルしようとしましたが、変数がありません。

$ make
cc -O -DSOLARIS    dspcat.c   -o dspcat
dspcat.c: In function ‘format_msg’:
dspcat.c:11:23: error: ‘NL_TEXTMAX’ undeclared (first use in this function)
    static char result[NL_TEXTMAX*2+1];
                       ^
dspcat.c:11:23: note: each undeclared identifier is reported only once for each function it appears in
dspcat.c: In function ‘print_file’:
dspcat.c:240:23: error: ‘NL_SETMAX’ undeclared (first use in this function)
    int setlo=1, sethi=NL_SETMAX, msglo=1, msghi=NL_MSGMAX, x, y;
                       ^
dspcat.c:240:49: error: ‘NL_MSGMAX’ undeclared (first use in this function)
    int setlo=1, sethi=NL_SETMAX, msglo=1, msghi=NL_MSGMAX, x, y;
                                                 ^
dspcat.c: In function ‘main’:
dspcat.c:338:30: error: ‘NL_MSGMAX’ undeclared (first use in this function)
       if (msg_nr<1 || msg_nr>NL_MSGMAX) {
                              ^
dspcat.c:353:32: error: ‘NL_SETMAX’ undeclared (first use in this function)
       if (msg_set<1 || msg_set>NL_SETMAX) {
                                ^
make: *** [dspcat] Error 1

私のシステムに変数がNL_SETMAX定義されていないようです。私はこのヘッダファイルを見つけて、bits/xopen_lim.hここにこの変数があったので、気まぐれにヘッダファイルリストに追加しました。

$ make
cc -O -DSOLARIS    dspcat.c   -o dspcat
dspcat.c: In function ‘format_msg’:
dspcat.c:11:33: warning: integer overflow in expression [-Woverflow]
    static char result[NL_TEXTMAX*2+1];
                                 ^
dspcat.c:11:16: error: size of array ‘result’ is negative
    static char result[NL_TEXTMAX*2+1];
                ^
dspcat.c:11:16: error: storage size of ‘result’ isn’t constant
dspcat.c:15:29: warning: integer overflow in expression [-Woverflow]
    for (x=0; x < (NL_TEXTMAX*2) && *s != '\0'; s++)
                             ^
make: *** [dspcat] Error 1

時間があればこれを試してみることができますが、コード内で変数を直接静的に設定すると、直接コンパイルできると思います。

おすすめ記事