Linux 上有没有像 dspcat 这样的实用程序?

ojb*_*ass 9 linux aix i18n

dspcatAIX上使用以下命令,并且可以转储使用该gencat命令创建的消息目录:

dspcat –g  /u/is/bin/I18N/l/lib/libca/libcalifornia.117.cat >> /tmp/message.smc
Run Code Online (Sandbox Code Playgroud)

我花了很多时间寻找有关如何在 Linux 上转储这些目录之一的提示,但此命令似乎不可用。任何帮助,将不胜感激。

slm*_*slm 3

我找到了源代码dspcat.chttp://www.smart.net/~rlhamil/。具体在这个tarball中。我尝试编译它,但缺少一个变量:

\n\n
$ make\ncc -O -DSOLARIS    dspcat.c   -o dspcat\ndspcat.c: In function \xe2\x80\x98format_msg\xe2\x80\x99:\ndspcat.c:11:23: error: \xe2\x80\x98NL_TEXTMAX\xe2\x80\x99 undeclared (first use in this function)\n    static char result[NL_TEXTMAX*2+1];\n                       ^\ndspcat.c:11:23: note: each undeclared identifier is reported only once for each function it appears in\ndspcat.c: In function \xe2\x80\x98print_file\xe2\x80\x99:\ndspcat.c:240:23: error: \xe2\x80\x98NL_SETMAX\xe2\x80\x99 undeclared (first use in this function)\n    int setlo=1, sethi=NL_SETMAX, msglo=1, msghi=NL_MSGMAX, x, y;\n                       ^\ndspcat.c:240:49: error: \xe2\x80\x98NL_MSGMAX\xe2\x80\x99 undeclared (first use in this function)\n    int setlo=1, sethi=NL_SETMAX, msglo=1, msghi=NL_MSGMAX, x, y;\n                                                 ^\ndspcat.c: In function \xe2\x80\x98main\xe2\x80\x99:\ndspcat.c:338:30: error: \xe2\x80\x98NL_MSGMAX\xe2\x80\x99 undeclared (first use in this function)\n       if (msg_nr<1 || msg_nr>NL_MSGMAX) {\n                              ^\ndspcat.c:353:32: error: \xe2\x80\x98NL_SETMAX\xe2\x80\x99 undeclared (first use in this function)\n       if (msg_set<1 || msg_set>NL_SETMAX) {\n                                ^\nmake: *** [dspcat] Error 1\n
Run Code Online (Sandbox Code Playgroud)\n\n

该变量NL_SETMAX似乎没有在我的系统上定义。我确实找到了这个头文件,bits/xopen_lim.h它确实有这个变量,所以我一时兴起将其添加到头文件列表中。

\n\n
$ make\ncc -O -DSOLARIS    dspcat.c   -o dspcat\ndspcat.c: In function \xe2\x80\x98format_msg\xe2\x80\x99:\ndspcat.c:11:33: warning: integer overflow in expression [-Woverflow]\n    static char result[NL_TEXTMAX*2+1];\n                                 ^\ndspcat.c:11:16: error: size of array \xe2\x80\x98result\xe2\x80\x99 is negative\n    static char result[NL_TEXTMAX*2+1];\n                ^\ndspcat.c:11:16: error: storage size of \xe2\x80\x98result\xe2\x80\x99 isn\xe2\x80\x99t constant\ndspcat.c:15:29: warning: integer overflow in expression [-Woverflow]\n    for (x=0; x < (NL_TEXTMAX*2) && *s != \'\\0\'; s++)\n                             ^\nmake: *** [dspcat] Error 1\n
Run Code Online (Sandbox Code Playgroud)\n\n

如果我有更多时间,我会尝试这个,但我相信如果您直接在代码中静态设置该变量,您可能可以自己编译它。

\n