Linux에 dspcat과 같은 유틸리티가 있습니까?


9

AIX 에서 다음 dspcat명령을 사용하며 명령으로 작성된 메시지 카탈로그를 덤프 할 수 있습니다 .gencat

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

Linux에서 이러한 카탈로그 중 하나를 덤프하는 방법에 대한 힌트를 찾기 위해 좋은 시간을 보냈지만이 명령을 사용할 수없는 것 같습니다. 도움을 주시면 감사하겠습니다.


나는 거기에서도 많이 보지 못한다. 시겠습니까 strings명령은 당신이 필요로하는 것을 얻기에 충분? 약간의 사후 처리가 있습니까?
— Sean Perry

문자열이 인코딩되었을 가능성이 있습니다 ... shiftjis 문자열이 문자열 카탈로그 파일에서 제대로 빠져 나올지 확실하지 않습니다 ... 테스트를 시도 할 수 있습니다.
— ojblass

내용이 가치가 있다면 형식을 리버스 엔지니어링하기가 어렵지 않을 것입니다.
— Sean Perry

답변:


3

나는 소스 코드 발견 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

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


이렇게 고마워요 +50
— ojblass
당사 사이트를 사용함과 동시에 당사의 쿠키 정책과 개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.