Linux에 dspcat와 유사한 유틸리티가 있습니까?

Linux에 dspcat와 유사한 유틸리티가 있습니까?

나는 다음을 사용합니다dspcat열라는 명령AIX다음을 사용하여 생성된 메시지 카탈로그를 덤프할 수 있습니다.gencat주문하다:

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

Linux에서 이러한 디렉토리 중 하나를 덤프하는 방법에 대한 팁을 찾기 위해 좋은 시간을 보냈지만 해당 명령을 사용할 수 없는 것 같습니다. 어떤 도움이라도 대단히 감사하겠습니다.

답변1

소스 코드를 찾았습니다 dspcat.c.http://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

시간이 더 있으면 이것을 시도해 볼 수 있지만 코드에서 직접 변수를 정적으로 설정하면 직접 컴파일할 수 있을 것이라고 생각합니다.

관련 정보