Eu encontrei o código-fonte para dspcat.c
: link . Especificamente neste tarball . Eu tentei compilá-lo e estava faltando uma variável:
$ 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
A variável NL_SETMAX
não parece estar definida no meu sistema. Eu localizei esse arquivo de cabeçalho, bits/xopen_lim.h
que tinha essa variável, então adicionei isso à lista de cabeçalhos por capricho.
$ 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 != '$ 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
'; s++)
^
make: *** [dspcat] Error 1
Se eu tiver mais tempo, vou brincar com isso, mas acredito que, se você definir essa variável estaticamente dentro do código diretamente, talvez seja possível compilar isso sozinho.