ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

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

2019-08-09 16:50:49  阅读:306  来源: 互联网

标签:aix linux i18n


我在AIX上使用以下dspcat命令,可以转储使用gencat命令创建的消息目录:

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

我花了很长时间寻找关于如何在Linux上转储其中一个目录的提示,但这个命令似乎不可用.任何帮助,将不胜感激.

解决方法:

我找到了dspcat.c:http://www.smart.net/~rlhamil/的源代码.特别是在这个tarball中.我尝试编译它并且缺少一个变量:

$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

如果我有更多时间玩这个,但我相信如果你直接在代码中静态设置该变量,你可以自己编译.

标签:aix,linux,i18n
来源: https://codeday.me/bug/20190809/1631251.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有