Centralize catgets() calls through MsgCat

CDE has relied upon catgets() implementations following a relaxed
interpretation of the XPG internationalization standard that ignored
-1, the standard error value returned by catopen, as the catalog
argument. However, this same behavior causes segmentation faults with
the musl C library.

This patch:

- Centralizes (with the exception of ToolTalk) all calls to catopen(),
  catgets(), and catclose() through MsgCat within the DtSvc library.
- Prevents calls to catgets() and catclose() that rely upon
  undefined behavior.
- Eliminates a number of bespoke catgets() wrappers, including multiple
  redundant caching implementations designed to work around a design
  peculiarity in HP/UX.
- Eases building CDE without XPG internationalization support by providing
  the appropriate macros.
This commit is contained in:
Lev Kujawski
2021-01-30 20:05:13 -07:00
committed by Jon Trulson
parent 8278e0eae3
commit 7010b2c11b
241 changed files with 3153 additions and 3493 deletions

View File

@@ -10,7 +10,7 @@
#
INCLUDES = -I. -I$(DTSEARCHSRC) -I$(DTSEARCHSRC)/raima
DEFINES = -DMAIN_PROGRAM
DEFINES = -DMAIN_PROGRAM -DNO_XLIB
#ifdef AlphaArchitecture
EXTRA_DEFINES = -DBYTE_SWAP -D_XOPEN_SOURCE -D_OSF_SOURCE
@@ -36,41 +36,43 @@ SYS_LIBRARIES = -lc -lm
PROGRAMS = $(PROGRAM1) $(PROGRAM2) $(PROGRAM3) $(PROGRAM4) $(PROGRAM5) \
$(PROGRAM6) $(PROGRAM7) $(PROGRAM9) $(PROGRAM10)
EXTRA_OBJS = MsgCat.o
PROGRAM1 = dtsrcreate
SRCS1 = dtsrcreate.c
OBJS1 = dtsrcreate.o
OBJS1 = dtsrcreate.o $(EXTRA_OBJS)
PROGRAM2 = dtsrdbrec
SRCS2 = dtsrdbrec.c
OBJS2 = dtsrdbrec.o
OBJS2 = dtsrdbrec.o $(EXTRA_OBJS)
PROGRAM3 = dtsrhan
SRCS3 = dtsrhan.c
OBJS3 = dtsrhan.o
OBJS3 = dtsrhan.o $(EXTRA_OBJS)
PROGRAM4 = dtsrload
SRCS4 = dtsrload.c
OBJS4 = dtsrload.o
OBJS4 = dtsrload.o $(EXTRA_OBJS)
PROGRAM5 = dtsrindex
SRCS5 = dtsrindex.c
OBJS5 = dtsrindex.o
OBJS5 = dtsrindex.o $(EXTRA_OBJS)
PROGRAM6 = dtsrdelete
SRCS6 = tomita.c
OBJS6 = tomita.o
OBJS6 = tomita.o $(EXTRA_OBJS)
PROGRAM7 = dtsrclean
SRCS7 = dtsrclean.c
OBJS7 = dtsrclean.o
OBJS7 = dtsrclean.o $(EXTRA_OBJS)
PROGRAM9 = huffcode
SRCS9 = huffcode.c
OBJS9 = huffcode.o
OBJS9 = huffcode.o $(EXTRA_OBJS)
PROGRAM10 = dtsrkdump
SRCS10 = dtsrkdump.c
OBJS10 = dtsrkdump.o
OBJS10 = dtsrkdump.o $(EXTRA_OBJS)
ComplexProgramTarget_1($(PROGRAM1),$(LOCAL_LIBRARIES), /* */)
ComplexProgramTarget_2($(PROGRAM2),$(LOCAL_LIBRARIES), /* */)
@@ -81,3 +83,5 @@ ComplexProgramTarget_6($(PROGRAM6),$(LOCAL_LIBRARIES), /* */)
ComplexProgramTarget_7($(PROGRAM7),$(LOCAL_LIBRARIES) $(BYTE_SWAP_LIB), /* */)
ComplexProgramTarget_9($(PROGRAM9),$(LOCAL_LIBRARIES), /* */)
ComplexProgramTarget_10($(PROGRAM10),$(LOCAL_LIBRARIES), /* */)
LinkSourceFile(MsgCat.c,$(DTSVCSRC)/DtUtil2)

View File

@@ -196,7 +196,7 @@ static void signal_shutdown (int sig)
/* Prints usage statement to stderr. */
static void print_usage (void)
{
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 1,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 1,
"\nUSAGE: %s [options] <dbname> <newpath>\n"
" Compresses unused d99 space and validates d00-d99 links.\n"
" -p<N> Progress dots printed every <N> records (default %lu).\n"
@@ -250,12 +250,12 @@ static void print_progress (char *label)
}
TERMINATE_LINE ();
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 2,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 2,
"%s: %s Compression %d%% (about %lu KB) in %ld:%02ld min:sec.\n") ,
aa_argv0, label, compression, bytes_in / 1000L,
seconds / 60UL, seconds % 60UL);
if (*label == 'F')
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 3,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 3,
"%s: Counted %ld WORDS in %s.d99.\n") ,
aa_argv0, (long)reccount, arg_dbname);
return;
@@ -275,21 +275,21 @@ static void end_of_job (int exitcode, int show_flags)
{
TERMINATE_LINE ();
if (exitcode >= 100) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 66,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 66,
"%s Aborting after interrupt signal %d.\n"),
PROGNAME"66", exitcode - 100);
}
if (validation_mode && corruption_count == 0L)
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 4,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 4,
"%s: No corrupted links detected.\n") ,
aa_argv0);
if (corruption_count > 0L) {
if (max_corruption > 0L && corruption_count >= max_corruption)
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 193,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 193,
"%s Aborting at %ld corrupted links.\n"),
PROGNAME"193", corruption_count);
else
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 194,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 194,
"%s Detected%s %ld corrupted/incomplete link(s).\n"),
PROGNAME"194",
(validation_mode) ? " and corrected" : "",
@@ -301,7 +301,7 @@ static void end_of_job (int exitcode, int show_flags)
if (show_flags & SHOW_USAGE)
print_usage ();
if (show_flags & SHOW_EXITCODE)
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 5,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 5,
"%s: Exit code = %d.\n") , aa_argv0, exitcode);
DtSearchExit (exitcode);
} /* end_of_job() */
@@ -342,7 +342,7 @@ static void user_args_processor (int argc, char **argv)
goto UNKNOWN_ARG;
case 'm':
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 301,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 301,
"%s The -m argument is no longer necessary.\n"),
PROGNAME"301");
break;
@@ -356,7 +356,7 @@ static void user_args_processor (int argc, char **argv)
else {
INVALID_ARG:
fprintf (aa_stderr,
catgets(dtsearch_catd, MS_dtsrclean, 177,
CATGETS(dtsearch_catd, MS_dtsrclean, 177,
"%s Invalid %.2s argument.\n"),
PROGNAME"177", argptr);
oops = TRUE;
@@ -368,7 +368,7 @@ static void user_args_processor (int argc, char **argv)
if (argptr[2] != '\0') {
if ((frecids = fopen (argptr + 2, "w")) == NULL) {
fprintf (aa_stderr,
catgets(dtsearch_catd, MS_dtsrclean, 802,
CATGETS(dtsearch_catd, MS_dtsrclean, 802,
"%s Unable to open '%s' to output"
" unreferenced d00 records:\n %s\n"),
PROGNAME"802", argptr, strerror(errno));
@@ -395,7 +395,7 @@ static void user_args_processor (int argc, char **argv)
UNKNOWN_ARG:
default:
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 159,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 159,
"%s Unknown argument: '%s'.\n"),
PROGNAME"159", argptr);
oops = TRUE;
@@ -409,15 +409,15 @@ static void user_args_processor (int argc, char **argv)
*/
if (argc != 2) {
if (argc <= 0)
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 210,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 210,
"%s Missing required dbname argument.\n"),
PROGNAME"210");
if (argc <= 1)
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 211,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 211,
"%s Missing required newpath argument.\n"),
PROGNAME"211");
if (argc > 2)
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 212,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 212,
"%s Too many arguments.\n"),
PROGNAME"212");
oops = TRUE;
@@ -428,7 +428,7 @@ static void user_args_processor (int argc, char **argv)
/* DBNAME */
arg_dbname = argv[0];
if (strlen (arg_dbname) > 8) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 229,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 229,
"%s Invalid database name '%s'.\n"),
PROGNAME"229", arg_dbname);
end_of_job (2, SHOW_USAGE);
@@ -464,7 +464,7 @@ static void validation_error (DB_ADDR dbaorig)
slot = ((slot + 1) * recslots - dba_offset)
| (OR_D00 << 24);
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 6,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 6,
" DBA = %d:%ld (x%02x:%06lx), orig addr val = x%08lx\n"
" Word='%c%s' offset=%ld addrs=%ld free=%d\n") ,
OR_D00, slot, OR_D00, slot, dbaorig,
@@ -490,14 +490,14 @@ static void open_all_files
struct stat fstatbuf;
if ((*fp = fopen (fname, mode)) == NULL) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 439,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 439,
"%s Can't open %s: %s\n"),
PROGNAME"439", fname, strerror (errno));
*oops = TRUE;
return;
}
if (fstat (fileno (*fp), &fstatbuf) == -1) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 440,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 440,
"%s Can't access status of %s: %s\n"),
PROGNAME"440", fname, strerror (errno));
*oops = TRUE;
@@ -505,7 +505,7 @@ static void open_all_files
}
if (size)
if ((*size = fstatbuf.st_size) <= 0L) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 499,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 499,
"%s %s is empty.\n"),
PROGNAME"499", fname);
*oops = TRUE;
@@ -524,7 +524,7 @@ static void copy_old_d2x_to_new
char readbuf[1024 + 32];
int i, j;
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 7,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 7,
"%s: Copying from old d2x files to %s...\n") ,
aa_argv0, fname_new);
for (;;) { /* loop ends when eof set on input stream */
@@ -532,14 +532,14 @@ static void copy_old_d2x_to_new
i = fread (readbuf, 1, sizeof (readbuf), fp_old);
/* byte swap not required on pure copy operation */
if (errno) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 517,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 517,
"%s Read error on %s: %s.\n"),
PROGNAME"517", fname_old, strerror (errno));
end_of_job (3, SHOW_EXITCODE);
}
j = fwrite (readbuf, 1, i, fp_new);
if (i != j) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 489,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 489,
"%s Write error on %s: %s.\n"),
PROGNAME"489", fname_new, strerror (errno));
end_of_job (3, SHOW_EXITCODE);
@@ -705,7 +705,7 @@ static void copy_new_d99 (long keyfield)
ret = fread (word_addrs, sizeof(DB_ADDR), (size_t)num_reads, fp_d99_old);
if (errno || -1 == ret) {
TERMINATE_LINE ();
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 657,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 657,
"%s Read error on %s: %s.\n"),
PROGNAME"657", fname_d99_old, strerror (errno));
end_of_job (4, SHOW_PROGRESS + SHOW_EXITCODE);
@@ -779,7 +779,7 @@ static void copy_new_d99 (long keyfield)
if (dbaorig == -1L) {
TERMINATE_LINE ();
fprintf (aa_stderr,
catgets(dtsearch_catd, MS_dtsrclean, 111,
CATGETS(dtsearch_catd, MS_dtsrclean, 111,
"*** %s DBA in d99 = -1. "
"Probable overrun into expansion\n"
" area due to incorrect count values "
@@ -806,7 +806,7 @@ static void copy_new_d99 (long keyfield)
if (dba >= total_num_addrs) {
TERMINATE_LINE ();
fprintf (aa_stderr,
catgets(dtsearch_catd, MS_dtsrclean, 222,
CATGETS(dtsearch_catd, MS_dtsrclean, 222,
"*** %s DBA in d99 not in d00,"
" slot > max num docs.\n"),
PROGNAME"222");
@@ -833,7 +833,7 @@ static void copy_new_d99 (long keyfield)
*bvptr |= (is_odd_nibble) ? 0x04 : 0x40;
TERMINATE_LINE ();
fprintf (aa_stderr,
catgets(dtsearch_catd, MS_dtsrclean, 333,
CATGETS(dtsearch_catd, MS_dtsrclean, 333,
"*** %s DBA in d99 does not exist in d00.\n"),
PROGNAME"333");
validation_error (dbaorig);
@@ -921,7 +921,7 @@ static void copy_new_d99 (long keyfield)
if (num_writes != num_reads) {
WRITE_ERROR:
fprintf (aa_stderr,
catgets(dtsearch_catd, MS_dtsrclean, 665,
CATGETS(dtsearch_catd, MS_dtsrclean, 665,
"%s Write error on %s: %s.\n"),
PROGNAME"665", fname_d99_new, strerror(errno));
end_of_job (4, SHOW_PROGRESS + SHOW_EXITCODE);
@@ -1001,13 +1001,13 @@ int main (int argc, char *argv[])
aa_argv0 = argv[0];
setlocale (LC_ALL, "");
dtsearch_catd = catopen (FNAME_DTSRCAT, 0);
dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0);
time (&starttime);
strftime (dbfpath, sizeof (dbfpath), /* just use any ol' buffer */
catgets (dtsearch_catd, MS_misc, 22, "%A, %b %d %Y, %I:%M %p"),
CATGETS(dtsearch_catd, MS_misc, 22, "%A, %b %d %Y, %I:%M %p"),
localtime (&starttime));
printf ( catgets(dtsearch_catd, MS_dtsrclean, 11,
printf ( CATGETS(dtsearch_catd, MS_dtsrclean, 11,
"%s Version %s. Run %s.\n") ,
aa_argv0, AUSAPI_VERSION, dbfpath);
@@ -1037,11 +1037,11 @@ int main (int argc, char *argv[])
if ((ptr = getenv ("DBFPATH")) != NULL) {
if (*ptr == 0)
fprintf (aa_stderr,
catgets(dtsearch_catd, MS_dtsrclean, 12,
CATGETS(dtsearch_catd, MS_dtsrclean, 12,
"%s: Ignoring empty DBFPATH environment variable.\n") ,
aa_argv0);
else {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 13,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 13,
"%s: Using DBFPATH = '%s'.\n") ,
aa_argv0, ptr);
snprintf(full_dbname_old, sizeof(full_dbname_old), "%s", ptr);
@@ -1068,7 +1068,7 @@ int main (int argc, char *argv[])
*ptr = '\0';
}
if (strcmp (full_dbname_old, full_dbname_new) == 0) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 393,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 393,
"%s Old and new directories are identical: '%s'.\n"),
PROGNAME"393", full_dbname_old);
end_of_job (2, SHOW_USAGE);
@@ -1079,10 +1079,10 @@ int main (int argc, char *argv[])
*/
strcat (full_dbname_old, arg_dbname);
strcat (full_dbname_new, arg_dbname);
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 14,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 14,
"%s: Old files: '%s.d2x, .d99'.\n") ,
aa_argv0, full_dbname_old);
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 15,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 15,
"%s: New files: '%s.d2x, .d99'.\n") ,
aa_argv0, full_dbname_new);
@@ -1126,16 +1126,16 @@ int main (int argc, char *argv[])
oops = TRUE;
}
if (oops) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 24,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 24,
"%s: One or more new files already exist.\n") ,
aa_argv0);
if (overlay_no) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 463,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 463,
"%s Command line argument disallows file overlay.\n"),
PROGNAME"463");
end_of_job (2, SHOW_EXITCODE);
}
fputs (catgets(dtsearch_catd, MS_dtsrclean, 45,
fputs (CATGETS(dtsearch_catd, MS_dtsrclean, 45,
" Is it ok to overlay files in new directory? [y/n] "),
aa_stderr);
@@ -1203,7 +1203,7 @@ int main (int argc, char *argv[])
* all holes were filled with good records.
*/
total_num_addrs = (dbrec.or_maxdba - (dba & 0xffffff) + 1) / recslots + 1;
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 25,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 25,
"%s: curr reccnt=%ld, mxdba=%ld, sl/rec=%ld, tot#adr=%ld.\n") ,
aa_argv0, (long)dbrec.or_reccount, (long)dbrec.or_maxdba,
(long)dbrec.or_recslots, (long)total_num_addrs);
@@ -1216,7 +1216,7 @@ int main (int argc, char *argv[])
*/
max_bitvec = (total_num_addrs >> 1) + 2;
if ((bit_vector = malloc ((size_t)max_bitvec + 64)) == NULL) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 465,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 465,
"%s WARNING: Can't allocate memory for bit vector.\n"
" 'Validate' mode switched off.\n"),
PROGNAME"465");
@@ -1233,7 +1233,7 @@ int main (int argc, char *argv[])
* records.
*/
x = dbrec.or_reccount / 50 + 1; /* x = recs per dot */
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 26,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 26,
"%s: Reading d00 file. Each dot appx %ld database documents...\n"),
aa_argv0, (long)x);
reccount = 0;
@@ -1260,7 +1260,7 @@ int main (int argc, char *argv[])
dba1 = (dba + dba_offset) / recslots; /* ="rec number", base 1 */
if (dba1 >= total_num_addrs) {
TERMINATE_LINE ();
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 561,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 561,
"%s DBA '%d:%ld' (rec #%ld) in d00 exceeds "
"total num addrs %ld;\n"
" Bit vector overflow because maxdba %ld"
@@ -1286,12 +1286,12 @@ int main (int argc, char *argv[])
/* confirm that RECCOUNT record holds the correct number */
if (dbrec.or_reccount == reccount) {
fprintf (aa_stderr,
catgets(dtsearch_catd, MS_dtsrclean, 27,
CATGETS(dtsearch_catd, MS_dtsrclean, 27,
"%s: Confirmed %ld DOCUMENTS in %s.d00.\n") ,
aa_argv0, (long)dbrec.or_reccount, arg_dbname);
}
else {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 28,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 28,
"%s: %ld DOCUMENTS actually in %s.d00 not ="
" %ld count stored there.\n"
" Count will be corrected in new d00 file.\n") ,
@@ -1310,7 +1310,7 @@ EXIT_INIT_VALIDATION:;
dot_count = DOTS_PER_MSG; /* force initial msg after first
* blk of recs */
TERMINATE_LINE ();
fprintf (aa_stderr, catgets(dtsearch_catd, MS_dtsrclean, 29,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_dtsrclean, 29,
"%s: Compressing into %s. Each dot appx %lu words...\n") ,
aa_argv0, arg_newpath, (unsigned long)recs_per_dot);
@@ -1362,7 +1362,7 @@ EXIT_INIT_VALIDATION:;
CRSET (PROGNAME "734", &dba, 0);
CRREAD (PROGNAME "735", OR_OBJKEY, readbuf, 0);
fprintf (aa_stderr,
catgets(dtsearch_catd, MS_dtsrclean, 444,
CATGETS(dtsearch_catd, MS_dtsrclean, 444,
"*** %s d00 record '%s' is not referenced in d99.\n"
" DBA = %d:%ld (x%02x:%06lx).\n") ,
PROGNAME"444", readbuf, OR_D00,

View File

@@ -169,7 +169,7 @@ static void confirm_ok_to_overwrite (char *fname)
return;
fclose (fptr);
printf ( catgets(dtsearch_catd, MS_initausd, 12,
printf ( CATGETS(dtsearch_catd, MS_initausd, 12,
"\nFile '%s' already exists.\n"
"Is it ok to overwrite it and other database files? [y,n] ") ,
newpath);
@@ -198,7 +198,7 @@ static int change_max_wordsize (char *new_size)
/* error if min and max specifications incompatible */
if (minwordsz > maxwordsz) {
printf (catgets (dtsearch_catd, MS_initausd, 5,
printf (CATGETS(dtsearch_catd, MS_initausd, 5,
PROGNAME" Minimum word size %d greater "
"than maximum word size %d.\n"),
minwordsz, maxwordsz);
@@ -218,13 +218,13 @@ static int change_max_wordsize (char *new_size)
}
if (maxwordsz != users_newsize)
printf (catgets (dtsearch_catd, MS_initausd, 8,
printf (CATGETS(dtsearch_catd, MS_initausd, 8,
PROGNAME " Adjusted maximum word size to %d.\n"),
maxwordsz);
/* Give user a final warning about large word sizes */
if (maxwordsz > STANDARD_MAXWORD && language != DtSrLaDEU && !quiet_mode)
printf ("%s", catgets (dtsearch_catd, MS_initausd, 10,
printf ("%s", CATGETS(dtsearch_catd, MS_initausd, 10,
PROGNAME" Specifying large maximum word sizes may "
"significantly\n increase storage requirements.\n"));
return TRUE;
@@ -247,7 +247,7 @@ static int change_min_wordsize (char *new_size)
/* error if min and max specifications incompatible */
if (minwordsz > maxwordsz) {
printf (catgets (dtsearch_catd, MS_initausd, 5,
printf (CATGETS(dtsearch_catd, MS_initausd, 5,
PROGNAME " Minimum word size %d greater than "
"maximum word size %d.\n"),
minwordsz, maxwordsz);
@@ -256,13 +256,13 @@ static int change_min_wordsize (char *new_size)
if (!quiet_mode) {
if (minwordsz != old_minwordsz)
printf (catgets (dtsearch_catd, MS_initausd, 6,
printf (CATGETS(dtsearch_catd, MS_initausd, 6,
PROGNAME " Adjusted minimum word size to %d.\n"),
minwordsz);
/* give user a warning about short word sizes */
if (minwordsz < DEFAULT_MINWORD)
printf ("%s", catgets (dtsearch_catd, MS_initausd, 9,
printf ("%s", CATGETS(dtsearch_catd, MS_initausd, 9,
PROGNAME " Specifying small minimum word sizes"
" may require extensive\n"
" editing of stopword file to prevent significantly\n"
@@ -281,7 +281,7 @@ static void print_usage (void)
{
int i;
printf (catgets (dtsearch_catd, MS_initausd,
printf (CATGETS(dtsearch_catd, MS_initausd,
3,
"\nUSAGE: %s [-options] dbname\n"
" Creates and initializes DtSearch/AusText database files.\n"
@@ -355,7 +355,7 @@ static void user_args_processor (int argc, char **argv)
else {
BAD_ARG:
print_usage();
printf (catgets (dtsearch_catd, MS_misc, 9,
printf (CATGETS(dtsearch_catd, MS_misc, 9,
"%sInvalid command line argument '%s'.\a\n"),
"\n"PROGNAME" ", ptr);
DtSearchExit (2);
@@ -418,7 +418,7 @@ BAD_ARG:
if (language < 0)
goto BAD_ARG;
if (!quiet_mode && language > DtSrLaLAST)
printf ( catgets(dtsearch_catd, MS_initausd, 13,
printf ( CATGETS(dtsearch_catd, MS_initausd, 13,
"%s Warning! you have specified "
"an unsupported, custom language.\n"
" You will have to provide your own "
@@ -429,7 +429,7 @@ BAD_ARG:
break;
default:
printf (catgets (dtsearch_catd, MS_misc, 10,
printf (CATGETS(dtsearch_catd, MS_misc, 10,
"%sIgnored unknown command line argument '%s'.\n"),
PROGNAME " ", ptr);
break;
@@ -443,7 +443,7 @@ BAD_ARG:
*/
if (argc <= 0) {
print_usage();
printf (catgets (dtsearch_catd, MS_misc, 18,
printf (CATGETS(dtsearch_catd, MS_misc, 18,
"%sDatabase name not specified.\n\a"), "\n"PROGNAME" ");
DtSearchExit(2);
}
@@ -468,7 +468,7 @@ BAD_ARG:
if (i < 1 || i > 8) {
BAD_DBNAME:
print_usage();
printf (catgets (dtsearch_catd, MS_misc, 11,
printf (CATGETS(dtsearch_catd, MS_misc, 11,
"%sInvalid database name '%s'.\a\n"),
"\n"PROGNAME"346 ", ptr);
DtSearchExit(2);
@@ -482,7 +482,7 @@ BAD_DBNAME:
/* Ensure semantic processing specified only for english language */
if (fzkeysz != 0 && language != DtSrLaENG && language != DtSrLaENG2) {
print_usage();
printf ( catgets(dtsearch_catd, MS_initausd, 14,
printf ( CATGETS(dtsearch_catd, MS_initausd, 14,
"\n%s semantic processing is only available "
"for English language databases.\n\a") ,
PROGNAME"340");
@@ -525,7 +525,7 @@ static void remove_d9x_file (char *extension)
if (remove (newpath) != 0) {
/* 'file not found' is not an error */
if (errno != ENOENT) {
printf (catgets (dtsearch_catd, MS_initausd, 244,
printf (CATGETS(dtsearch_catd, MS_initausd, 244,
PROGNAME "244 Unable to remove '%s': %s\n"),
newpath, strerror (errno));
DtSearchExit (5);
@@ -562,14 +562,14 @@ static void create_new_dbd (FILE *f)
confirm_ok_to_overwrite (newpath);
if (chmod (newpath, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP)) {
if (errno != ENOENT) {
printf (catgets (dtsearch_catd, MS_initausd, 214, nocopy_msg),
printf (CATGETS(dtsearch_catd, MS_initausd, 214, nocopy_msg),
PROGNAME"515", modelpath, newpath, strerror(errno));
DtSearchExit (15);
}
}
if ((g = fopen (newpath, "w+b")) == NULL) {
printf (catgets (dtsearch_catd, MS_initausd, 214, nocopy_msg),
printf (CATGETS(dtsearch_catd, MS_initausd, 214, nocopy_msg),
PROGNAME"509", modelpath, newpath, strerror(errno));
DtSearchExit (4);
}
@@ -577,7 +577,7 @@ static void create_new_dbd (FILE *f)
while ((i = fgetc (f)) != EOF)
fputc (i, g);
if (errno) {
printf (catgets (dtsearch_catd, MS_initausd, 214, nocopy_msg),
printf (CATGETS(dtsearch_catd, MS_initausd, 214, nocopy_msg),
PROGNAME"531", modelpath, newpath, strerror(errno));
DtSearchExit (13);
}
@@ -622,14 +622,14 @@ int main (int argc, char *argv[])
struct or_lwordrec lwordrec;
setlocale (LC_ALL, "");
dtsearch_catd = catopen (FNAME_DTSRCAT, 0);
dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0);
aa_argv0 = argv[0];
max_ormisc_size = sizeof (miscrec.or_misc);
maxwidth_sword = sizeof (swordrec.or_swordkey) - 1;
maxwidth_lword = sizeof (lwordrec.or_lwordkey) - 1;
printf (catgets (dtsearch_catd, MS_misc, 4,
printf (CATGETS(dtsearch_catd, MS_misc, 4,
"%s Version %s.\n"),
aa_argv0,
DtSrVERSION
@@ -655,7 +655,7 @@ int main (int argc, char *argv[])
}
else {
print_usage();
printf (catgets (dtsearch_catd, MS_initausd, 213,
printf (CATGETS(dtsearch_catd, MS_initausd, 213,
default_unable_to_open_msg),
"\n"PROGNAME"302", modelpath, strerror(errno));
DtSearchExit (4);
@@ -676,7 +676,7 @@ int main (int argc, char *argv[])
}
else if (errno != ENOENT) {
print_usage();
printf (catgets (dtsearch_catd, MS_initausd, 213,
printf (CATGETS(dtsearch_catd, MS_initausd, 213,
default_unable_to_open_msg),
"\n"PROGNAME"655", FNAME_MODEL, strerror(errno));
DtSearchExit (4);
@@ -700,7 +700,7 @@ int main (int argc, char *argv[])
if (debug_mode)
puts (PROGNAME"682 Never found it!");
print_usage();
printf (catgets (dtsearch_catd, MS_initausd, 213,
printf (CATGETS(dtsearch_catd, MS_initausd, 213,
default_unable_to_open_msg),
"\n"PROGNAME"686", FNAME_MODEL,
"Not found in either current or target directories. Use -d option\a");
@@ -715,7 +715,7 @@ DBD_OKAY:
printf ("040*** d_open newpath = '%s'.\n", newpath);
d_open (newpath, "o");
if (db_status != S_OKAY) {
printf (catgets (dtsearch_catd, MS_initausd, 230,
printf (CATGETS(dtsearch_catd, MS_initausd, 230,
PROGNAME "230 Could not open database '%s'.\n"), newpath);
puts (vista_msg (PROGNAME "231"));
DtSearchExit (3);
@@ -727,7 +727,7 @@ DBD_OKAY:
printf ("042*** d_initialize.\n");
d_initialize (0);
if (db_status != S_OKAY) {
printf (catgets (dtsearch_catd, MS_initausd, 239,
printf (CATGETS(dtsearch_catd, MS_initausd, 239,
PROGNAME "239 Could not initialize database '%s'.\n"), newpath);
puts (vista_msg (PROGNAME "240"));
DtSearchExit (3);
@@ -763,7 +763,7 @@ DBD_OKAY:
if (i < 0) {
/* Add in difference to INCREASE abstrsz */
dbrec.or_abstrsz -= i;
printf (catgets (dtsearch_catd, MS_misc, 433,
printf (CATGETS(dtsearch_catd, MS_misc, 433,
"%1$sAdjusted maximum abstract size upward to %2$hd.\n"),
PROGNAME "433 ", dbrec.or_abstrsz);
}
@@ -800,7 +800,7 @@ DBD_OKAY:
printf ("060*** fillnew dbrec.\n");
d_fillnew (OR_DBREC, &dbrec, 0);
if (db_status != S_OKAY) {
printf ("%s", catgets (dtsearch_catd, MS_initausd, 509,
printf ("%s", CATGETS(dtsearch_catd, MS_initausd, 509,
PROGNAME "509 Could not initialize database header record.\n"));
puts (vista_msg (PROGNAME "510"));
DtSearchExit (3);
@@ -816,7 +816,7 @@ DBD_OKAY:
remove_d9x_file (".d99");
*newextp = 0; /* no extension suffixes for next msgs */
printf (catgets (dtsearch_catd, MS_initausd, 24,
printf (CATGETS(dtsearch_catd, MS_initausd, 24,
PROGNAME " Successfully initialized database '%s'.\n"), newpath);
return 0;

View File

@@ -101,25 +101,25 @@ void print_dbrec (char *dbname, struct or_dbrec * dbrec)
char *cptr;
int blobs_are_possible = FALSE;
printf (catgets (dtsearch_catd, MS_dbrec, 1,
printf (CATGETS(dtsearch_catd, MS_dbrec, 1,
"---------- System Values for Database '%s' ----------\n"),
dbname);
printf (catgets (dtsearch_catd, MS_dbrec, 2,
printf (CATGETS(dtsearch_catd, MS_dbrec, 2,
"Schema version number (version) is '%s'.\n"),
dbrec->or_version);
printf (catgets (dtsearch_catd, MS_dbrec, 3,
printf (CATGETS(dtsearch_catd, MS_dbrec, 3,
"Maximum object key size (sizeof(objkey)) is %ld bytes.\n"),
DtSrMAX_DB_KEYSIZE);
if (ORD_USEHUGEKEYS & dbrec->or_dbflags)
printf ("%s", catgets (dtsearch_catd, MS_dbrec, 4,
printf ("%s", CATGETS(dtsearch_catd, MS_dbrec, 4,
"Optional 'Huge' keys enabled.\n"));
printf (catgets (dtsearch_catd, MS_dbrec, 12,
printf (CATGETS(dtsearch_catd, MS_dbrec, 12,
"Maximum length of an abstract string (abstrsz) is %d.\n"),
dbrec->or_abstrsz);
if (dbrec->or_abstrsz == 0)
puts (catgets (dtsearch_catd, MS_dbrec, 14,
puts (CATGETS(dtsearch_catd, MS_dbrec, 14,
" (Abstracts are not used in this database)."));
else {
/*
@@ -127,88 +127,88 @@ void print_dbrec (char *dbname, struct or_dbrec * dbrec)
* actually are
*/
if (dbrec->or_hufid != 0L)
printf (catgets (dtsearch_catd, MS_dbrec, 20,
printf (CATGETS(dtsearch_catd, MS_dbrec, 20,
"Abstracts are %scompressed.\n"),
(ORC_COMPABSTR & dbrec->or_compflags) ? "" : "not ");
}
printf (catgets (dtsearch_catd, MS_dbrec, 22,
printf (CATGETS(dtsearch_catd, MS_dbrec, 22,
"Parsing language is number %d, %s.\n"),
dbrec->or_language, language_name(dbrec->or_language));
printf (catgets (dtsearch_catd, MS_dbrec, 24,
printf (CATGETS(dtsearch_catd, MS_dbrec, 24,
"Minimum word length (minwordsz) is %d.\n"),
dbrec->or_minwordsz);
printf (catgets (dtsearch_catd, MS_dbrec, 26,
printf (CATGETS(dtsearch_catd, MS_dbrec, 26,
"Maximum word length (maxwordsz) is %d.\n"),
dbrec->or_maxwordsz);
printf (catgets (dtsearch_catd, MS_dbrec, 30,
printf (CATGETS(dtsearch_catd, MS_dbrec, 30,
"Number of .d00 slots per object (recslots) is %d.\n"),
dbrec->or_recslots);
printf (catgets (dtsearch_catd, MS_dbrec, 36,
printf (CATGETS(dtsearch_catd, MS_dbrec, 36,
" (Maximum number of database objects is %ld).\n"),
0xffffffL / (long) dbrec->or_recslots);
printf (catgets (dtsearch_catd, MS_dbrec, 40,
printf (CATGETS(dtsearch_catd, MS_dbrec, 40,
"Huffman compression table id (hufid) is %ld.\n"),
dbrec->or_hufid);
if (dbrec->or_hufid == 0L)
puts (catgets (dtsearch_catd, MS_dbrec, 42,
puts (CATGETS(dtsearch_catd, MS_dbrec, 42,
" (Compression is disabled in this database)."));
if (dbrec->or_hufid == -1L)
puts (catgets (dtsearch_catd, MS_dbrec, 44,
puts (CATGETS(dtsearch_catd, MS_dbrec, 44,
" (Specific compression table is not yet determined)."));
blobs_are_possible = FALSE;
switch (dbrec->or_dbaccess) {
case ORA_VARIES:
puts (catgets (dtsearch_catd, MS_dbrec, 50,
puts (CATGETS(dtsearch_catd, MS_dbrec, 50,
"Engine accessibility to data may vary from object to object."));
blobs_are_possible = TRUE;
break;
case ORA_NOTAVAIL:
puts (catgets (dtsearch_catd, MS_dbrec, 54,
puts (CATGETS(dtsearch_catd, MS_dbrec, 54,
"Data objects are not directly accessible from the engine."));
break;
case ORA_BLOB:
puts (catgets (dtsearch_catd, MS_dbrec, 56,
puts (CATGETS(dtsearch_catd, MS_dbrec, 56,
"Data objects are stored internally as blobs."));
blobs_are_possible = TRUE;
break;
case ORA_REFBLOB:
puts (catgets (dtsearch_catd, MS_dbrec, 60,
puts (CATGETS(dtsearch_catd, MS_dbrec, 60,
"Only server file references to objects are stored in the blobs."));
break;
case ORA_CREFBLOB:
puts (catgets (dtsearch_catd, MS_dbrec, 64,
puts (CATGETS(dtsearch_catd, MS_dbrec, 64,
"Only client file references to objects are stored in the blobs."));
break;
case ORA_REFKEY:
puts (catgets (dtsearch_catd, MS_dbrec, 68,
puts (CATGETS(dtsearch_catd, MS_dbrec, 68,
"Object keys are server file references to the objects."));
break;
case ORA_CREFKEY:
puts (catgets (dtsearch_catd, MS_dbrec, 72,
puts (CATGETS(dtsearch_catd, MS_dbrec, 72,
"Object keys are client file references to the objects."));
break;
case ORA_REFHUGEKEY:
puts (catgets (dtsearch_catd, MS_dbrec, 74,
puts (CATGETS(dtsearch_catd, MS_dbrec, 74,
"Server file references to objects are "
"stored in the 'huge' keys."));
break;
case ORA_REFABSTR:
puts (catgets (dtsearch_catd, MS_dbrec, 80,
puts (CATGETS(dtsearch_catd, MS_dbrec, 80,
"Server file references to objects are stored in the abstracts."));
break;
case ORA_CREFABSTR:
puts (catgets (dtsearch_catd, MS_dbrec, 86,
puts (CATGETS(dtsearch_catd, MS_dbrec, 86,
"Client file references to objects are stored in the abstracts."));
break;
default:
printf (catgets (dtsearch_catd, MS_dbrec, 90,
printf (CATGETS(dtsearch_catd, MS_dbrec, 90,
"Error: meaning of or_dbaccess value (%hd) is unknown.\n"),
dbrec->or_dbaccess);
blobs_are_possible = TRUE;
@@ -221,59 +221,59 @@ void print_dbrec (char *dbname, struct or_dbrec * dbrec)
* actually are
*/
if (dbrec->or_hufid != 0L)
printf (catgets (dtsearch_catd, MS_dbrec, 100,
printf (CATGETS(dtsearch_catd, MS_dbrec, 100,
"Repository blobs are %scompressed.\n"),
(ORC_COMPBLOB & dbrec->or_compflags) ? "" : "not ");
}
else
puts (catgets (dtsearch_catd, MS_dbrec, 110,
puts (CATGETS(dtsearch_catd, MS_dbrec, 110,
"Repository blobs are not used in this database."));
printf (catgets (dtsearch_catd, MS_dbrec, 120,
printf (CATGETS(dtsearch_catd, MS_dbrec, 120,
"Database switches (dbflags) are 0x%lx:\n"),
dbrec->or_dbflags);
printf (catgets (dtsearch_catd, MS_dbrec, 130,
printf (CATGETS(dtsearch_catd, MS_dbrec, 130,
" Inverted index %s words exactly as parsed.\n"),
(ORD_XWORDS & dbrec->or_dbflags) ?
catgets (dtsearch_catd, MS_dbrec, 124, "INCLUDES") :
catgets (dtsearch_catd, MS_dbrec, 125, "EXCLUDES"));
CATGETS(dtsearch_catd, MS_dbrec, 124, "INCLUDES") :
CATGETS(dtsearch_catd, MS_dbrec, 125, "EXCLUDES"));
printf (catgets (dtsearch_catd, MS_dbrec, 140,
printf (CATGETS(dtsearch_catd, MS_dbrec, 140,
" Inverted index %s word stems.\n"),
(ORD_XSTEMS & dbrec->or_dbflags) ?
catgets (dtsearch_catd, MS_dbrec, 124, "INCLUDES") :
catgets (dtsearch_catd, MS_dbrec, 125, "EXCLUDES"));
CATGETS(dtsearch_catd, MS_dbrec, 124, "INCLUDES") :
CATGETS(dtsearch_catd, MS_dbrec, 125, "EXCLUDES"));
printf (catgets (dtsearch_catd, MS_dbrec, 160,
printf (CATGETS(dtsearch_catd, MS_dbrec, 160,
" Use of optional 'huge' keys is %s.\n"),
(ORD_USEHUGEKEYS & dbrec->or_dbflags) ?
catgets (dtsearch_catd, MS_dbrec, 126, "ENABLED") :
catgets (dtsearch_catd, MS_dbrec, 127, "DISABLED"));
CATGETS(dtsearch_catd, MS_dbrec, 126, "ENABLED") :
CATGETS(dtsearch_catd, MS_dbrec, 127, "DISABLED"));
printf (catgets (dtsearch_catd, MS_dbrec, 162,
printf (CATGETS(dtsearch_catd, MS_dbrec, 162,
" Mark-for-deletion is %s.\n"),
(ORD_NOMARKDEL & dbrec->or_dbflags) ?
catgets (dtsearch_catd, MS_dbrec, 127, "DISABLED") :
catgets (dtsearch_catd, MS_dbrec, 126, "ENABLED"));
CATGETS(dtsearch_catd, MS_dbrec, 127, "DISABLED") :
CATGETS(dtsearch_catd, MS_dbrec, 126, "ENABLED"));
printf (catgets (dtsearch_catd, MS_dbrec, 164,
printf (CATGETS(dtsearch_catd, MS_dbrec, 164,
" Appendable user notes are %s.\n"),
(ORD_NONOTES & dbrec->or_dbflags) ?
catgets (dtsearch_catd, MS_dbrec, 127, "DISABLED") :
catgets (dtsearch_catd, MS_dbrec, 126, "ENABLED"));
CATGETS(dtsearch_catd, MS_dbrec, 127, "DISABLED") :
CATGETS(dtsearch_catd, MS_dbrec, 126, "ENABLED"));
printf (catgets (dtsearch_catd, MS_dbrec, 170,
printf (CATGETS(dtsearch_catd, MS_dbrec, 170,
" Text characters are %s wide.\n"),
(ORD_WIDECHAR & dbrec->or_dbflags) ?
catgets (dtsearch_catd, MS_dbrec, 172, "MULTIPLE bytes") :
catgets (dtsearch_catd, MS_dbrec, 174, "a SINGLE byte"));
CATGETS(dtsearch_catd, MS_dbrec, 172, "MULTIPLE bytes") :
CATGETS(dtsearch_catd, MS_dbrec, 174, "a SINGLE byte"));
printf (catgets (dtsearch_catd, MS_dbrec, 200,
printf (CATGETS(dtsearch_catd, MS_dbrec, 200,
"Current number of database objects (reccount) is %ld.\n"),
dbrec->or_reccount);
printf (catgets (dtsearch_catd, MS_dbrec, 210,
printf (CATGETS(dtsearch_catd, MS_dbrec, 210,
"Last currently used slot number (maxdba) is %ld.\n"),
dbrec->or_maxdba);
@@ -301,21 +301,21 @@ int main (int argc, char *argv[])
aa_argv0 = argv[0];
setlocale (LC_ALL, "");
dtsearch_catd = catopen (FNAME_DTSRCAT, 0);
austools_catd = catopen (FNAME_AUSCAT, 0);
dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0);
austools_catd = CATOPEN(FNAME_AUSCAT, 0);
time (&now);
strftime (renamebuf, sizeof (renamebuf),
catgets (dtsearch_catd, MS_misc, 22, "%A, %b %d %Y, %I:%M %p"),
CATGETS(dtsearch_catd, MS_misc, 22, "%A, %b %d %Y, %I:%M %p"),
localtime (&now));
printf (catgets (dtsearch_catd, MS_misc, 23,
printf (CATGETS(dtsearch_catd, MS_misc, 23,
"%s: Version %s. Run %s.\n"),
aa_argv0,
DtSrVERSION,
renamebuf);
if (argc < 2) {
printf (catgets (dtsearch_catd, MS_dbrec, 310,
printf (CATGETS(dtsearch_catd, MS_dbrec, 310,
"USAGE: %s <dbname>\n"), aa_argv0);
return 2;
}
@@ -323,21 +323,21 @@ int main (int argc, char *argv[])
db_oflag = O_RDONLY; /* db files may be read-only */
d_open (argv[1], "o");
if (db_status != S_OKAY) {
printf (catgets (dtsearch_catd, MS_dbrec, 330,
printf (CATGETS(dtsearch_catd, MS_dbrec, 330,
"Could not open '%s' database.\n%s\n"),
argv[1], vista_msg(PROGNAME"293"));
return 3;
}
d_recfrst (OR_DBREC, 0);
if (db_status != S_OKAY) {
printf (catgets (dtsearch_catd, MS_dbrec, 340,
printf (CATGETS(dtsearch_catd, MS_dbrec, 340,
"No dbrec record in database '%s'.\n"),
argv[1]);
return 4;
}
d_recread (&dbrec, 0);
if (db_status != S_OKAY) {
printf (catgets (dtsearch_catd, MS_dbrec, 350,
printf (CATGETS(dtsearch_catd, MS_dbrec, 350,
"Can't read dbrec record in database '%s'.\n%s\n"),
argv[1], vista_msg(PROGNAME"306"));
return 5;

View File

@@ -337,10 +337,10 @@ void open_outfile (void)
if (!outmode_specified)
if ((temp = fopen (outfile, "r")) != NULL) {
fclose (temp);
printf ( catgets(dtsearch_catd, MS_chandel, 3,
printf ( CATGETS(dtsearch_catd, MS_chandel, 3,
"Output file '%s' already exists.\n") ,
outfile);
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 4,
printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 4,
"Append, overwrite, or quit? [a,o,q] ") );
i = tolower (getchar ());
@@ -355,7 +355,7 @@ void open_outfile (void)
outstream = stdout;
else {
if ((outstream = fopen (outfile, outmode)) == NULL) {
printf ( catgets(dtsearch_catd, MS_chandel, 7,
printf ( CATGETS(dtsearch_catd, MS_chandel, 7,
"Unable to open output file '%s'.\n") , outfile);
exit (FILE_ERROR);
}
@@ -572,7 +572,7 @@ void process_profile (void)
/*-- open file --*/
if ((prof = fopen (profile, "r")) == NULL) {
printf ( catgets(dtsearch_catd, MS_chandel, 11,
printf ( CATGETS(dtsearch_catd, MS_chandel, 11,
"\nError - unable to open profile file '%s'.\n") , profile);
exit (FILE_ERROR);
}
@@ -627,7 +627,7 @@ void process_profile (void)
if (validate_id (tok))
strcpy (line_current->name, tok);
else {
printf ( catgets(dtsearch_catd, MS_chandel, 12,
printf ( CATGETS(dtsearch_catd, MS_chandel, 12,
"Error line %d: invalid identifier '%s'.\n") ,
line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -636,7 +636,7 @@ void process_profile (void)
/*-- get first value token --*/
tok = my_strtok ('\0', del_string);
if (!tok) {
printf ( catgets(dtsearch_catd, MS_chandel, 13,
printf ( CATGETS(dtsearch_catd, MS_chandel, 13,
"Error line %d - identifier '%s' missing value(s).\n") ,
line_num, line_current->name);
bad_profile = TRUE;
@@ -647,7 +647,7 @@ void process_profile (void)
else
line_current->comp->column_number = atoi (tok);
if (line_current->comp->column_number == 0) {
printf ( catgets(dtsearch_catd, MS_chandel, 14,
printf ( CATGETS(dtsearch_catd, MS_chandel, 14,
"Error line %d - zero or bad value for '%s'.\n"
" offensive token: %s.\n") ,
line_num, line_current->name, tok);
@@ -658,7 +658,7 @@ void process_profile (void)
tok = my_strtok ('\0', "\"");
if (!tok) {
if (line_current->comp->column_number == ANY) {
printf ( catgets(dtsearch_catd, MS_chandel, 15,
printf ( CATGETS(dtsearch_catd, MS_chandel, 15,
"Error line %d - for identifier '%s', column has "
"been set to ANY\n but there is no "
"identifying signature string.\n") ,
@@ -694,7 +694,7 @@ void process_profile (void)
else
line_current->comp->column_number = atoi (tok);
if (line_current->comp->column_number == 0) {
printf ( catgets(dtsearch_catd, MS_chandel, 16,
printf ( CATGETS(dtsearch_catd, MS_chandel, 16,
"Error line %d - zero or bad value for "
"identifier '%s'\n offensive token: %s.\n") ,
line_num, line_current->name, tok);
@@ -705,13 +705,13 @@ void process_profile (void)
tok = my_strtok ('\0', "\"");
if (!tok) {
if (line_current->comp->column_number == ANY)
printf ( catgets(dtsearch_catd, MS_chandel, 15,
printf ( CATGETS(dtsearch_catd, MS_chandel, 15,
"Error line %d - for identifier '%s', column has "
"been set to ANY\n but there is no "
"identifying signature string.\n") ,
line_num, line_current->name);
else
printf ( catgets(dtsearch_catd, MS_chandel, 18,
printf ( CATGETS(dtsearch_catd, MS_chandel, 18,
"Error line %d - missing value for "
"identifier '%s'\n") ,
line_num, line_current->name);
@@ -753,7 +753,7 @@ void process_profile (void)
field_current->is_month = TRUE;
}
else {
printf ( catgets(dtsearch_catd, MS_chandel, 12,
printf ( CATGETS(dtsearch_catd, MS_chandel, 12,
"Error line %d: invalid identifier '%s'.\n") ,
line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -763,7 +763,7 @@ void process_profile (void)
/*-- get constant value --*/
tok = my_strtok (NULL, "\"");
if (!tok) {
printf ( catgets(dtsearch_catd, MS_chandel, 93,
printf ( CATGETS(dtsearch_catd, MS_chandel, 93,
"Error line %d - '%s' string not "
"enclosed in double quotes.\n"),
line_num, field_current->name);
@@ -777,7 +777,7 @@ void process_profile (void)
/*-- get line id --*/
tok = my_strtok ('\0', del_string);
if (!tok) {
printf ( catgets(dtsearch_catd, MS_chandel, 13,
printf ( CATGETS(dtsearch_catd, MS_chandel, 13,
"Error line %d - identifier '%s' missing value(s).\n") ,
line_num, line_current->name);
bad_profile = TRUE;
@@ -788,7 +788,7 @@ void process_profile (void)
/*-- get "string" --*/
tok = my_strtok ('\0', "\"");
if (!tok) {
printf ( catgets(dtsearch_catd, MS_chandel, 93,
printf ( CATGETS(dtsearch_catd, MS_chandel, 93,
"Error line %d - '%s' string not "
"enclosed in double quotes.\n"),
line_num, field_current->name);
@@ -801,7 +801,7 @@ void process_profile (void)
/*-- get offset --*/
tok = my_strtok ('\0', del_string);
if (!tok) {
printf ( catgets(dtsearch_catd, MS_chandel, 13,
printf ( CATGETS(dtsearch_catd, MS_chandel, 13,
"Error line %d - identifier '%s' missing value(s).\n") ,
line_num, line_current->name);
bad_profile = TRUE;
@@ -813,7 +813,7 @@ void process_profile (void)
tok = my_strtok ('\0', del_string);
/*******if (!tok && field_current->length == ANY) ************/
if (!tok) {
printf ( catgets(dtsearch_catd, MS_chandel, 13,
printf ( CATGETS(dtsearch_catd, MS_chandel, 13,
"Error line %d - identifier '%s' missing value(s).\n") ,
line_num, line_current->name);
bad_profile = TRUE;
@@ -831,14 +831,14 @@ void process_profile (void)
case DELIMITER:
/*-- get next token - should be name of line --*/
if (warnings &&(bot_defined || top_defined))
printf ( catgets(dtsearch_catd, MS_chandel, 23,
printf ( CATGETS(dtsearch_catd, MS_chandel, 23,
"Warning line %d: Delimiter redefined.\n") ,
line_num);
tok = my_strtok ('\0', del_string);
if (validate_id (tok))
strcpy (top_rec_name, tok);
else {
printf ( catgets(dtsearch_catd, MS_chandel, 12,
printf ( CATGETS(dtsearch_catd, MS_chandel, 12,
"Error line %d: invalid identifier '%s'.\n"),
line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -857,7 +857,7 @@ void process_profile (void)
bot_defined = TRUE;
} else {
BAD_DELIM_VAL:
printf ( catgets(dtsearch_catd, MS_chandel, 25,
printf ( CATGETS(dtsearch_catd, MS_chandel, 25,
"Error line %d: delimiter not specified as "
"'top' or 'bottom'.\n") ,
line_num);
@@ -883,7 +883,7 @@ BAD_DELIM_VAL:
}
/* if it was a valid token */
else {
printf ( catgets(dtsearch_catd, MS_chandel, 26,
printf ( CATGETS(dtsearch_catd, MS_chandel, 26,
"Error line %d: invalid token '%s'.\n") ,
line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -911,7 +911,7 @@ BAD_DELIM_VAL:
}
/* if it was a valid token */
else {
printf ( catgets(dtsearch_catd, MS_chandel, 27,
printf ( CATGETS(dtsearch_catd, MS_chandel, 27,
"Error line %d: invalid token '%s'.\n") ,
line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -950,7 +950,7 @@ BAD_DELIM_VAL:
}
/* if in else */
else {
printf ( catgets(dtsearch_catd, MS_chandel, 12,
printf ( CATGETS(dtsearch_catd, MS_chandel, 12,
"Error line %d: invalid identifier '%s'.\n") ,
line_num, tok);
bad_profile = TRUE;
@@ -959,7 +959,7 @@ BAD_DELIM_VAL:
}
/* if validate... */
else {
printf (catgets(dtsearch_catd, MS_chandel, 12,
printf (CATGETS(dtsearch_catd, MS_chandel, 12,
"Error line %d: invalid identifier '%s'.\n") ,
line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -998,7 +998,7 @@ BAD_DELIM_VAL:
}
/* if in else */
else {
printf ( catgets(dtsearch_catd, MS_chandel, 12,
printf ( CATGETS(dtsearch_catd, MS_chandel, 12,
"Error line %d: invalid identifier '%s'.\n") ,
line_num, tok);
bad_profile = TRUE;
@@ -1007,7 +1007,7 @@ BAD_DELIM_VAL:
}
/* if validate... */
else {
printf ( catgets(dtsearch_catd, MS_chandel, 12,
printf ( CATGETS(dtsearch_catd, MS_chandel, 12,
"Error line %d: invalid identifier '%s'.\n") ,
line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -1046,7 +1046,7 @@ BAD_DELIM_VAL:
}
/* if in else */
else {
printf ( catgets(dtsearch_catd, MS_chandel, 12,
printf ( CATGETS(dtsearch_catd, MS_chandel, 12,
"Error line %d: invalid identifier '%s'.\n") ,
line_num, tok);
bad_profile = TRUE;
@@ -1055,7 +1055,7 @@ BAD_DELIM_VAL:
}
/* if validate... */
else {
printf ( catgets(dtsearch_catd, MS_chandel, 12,
printf ( CATGETS(dtsearch_catd, MS_chandel, 12,
"Error line %d: invalid identifier '%s'.\n") ,
line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -1094,7 +1094,7 @@ BAD_DELIM_VAL:
}
/* if in else */
else {
printf ( catgets(dtsearch_catd, MS_chandel, 12,
printf ( CATGETS(dtsearch_catd, MS_chandel, 12,
"Error line %d: invalid identifier '%s'.\n") ,
line_num, tok);
bad_profile = TRUE;
@@ -1103,7 +1103,7 @@ BAD_DELIM_VAL:
}
/* if validate... */
else {
printf ( catgets(dtsearch_catd, MS_chandel, 12,
printf ( CATGETS(dtsearch_catd, MS_chandel, 12,
"Error line %d: invalid identifier '%s'.\n") ,
line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -1116,13 +1116,13 @@ BAD_DELIM_VAL:
goto BAD_IMAGE;
for (i = 0; i < strlen (tok); i++)
tok[i] = tolower (tok[i]);
if (strcmp (tok, catgets (dtsearch_catd, MS_chandel, 34,"all")) == 0)
if (strcmp (tok, CATGETS(dtsearch_catd, MS_chandel, 34,"all")) == 0)
imagemode = INCLUDE;
else if (strcmp (tok, catgets (dtsearch_catd, MS_chandel, 35, "none")) == 0)
else if (strcmp (tok, CATGETS(dtsearch_catd, MS_chandel, 35, "none")) == 0)
imagemode = EXCLUDE;
else {
BAD_IMAGE:
printf ( catgets(dtsearch_catd, MS_chandel, 36,
printf ( CATGETS(dtsearch_catd, MS_chandel, 36,
"Error line %d: image mode must be 'all' or "
"'none' -'%s' not recognized.\n") ,
NULLORSTR(tok));
@@ -1143,7 +1143,7 @@ BAD_IMAGE:
textmode = EXCLUDE;
else {
BAD_TEXT:
printf ( catgets(dtsearch_catd, MS_chandel, 37,
printf ( CATGETS(dtsearch_catd, MS_chandel, 37,
"Error line %d: text mode must be 'all' or "
"'none' - '%s' not recognized.\n") , NULLORSTR(tok));
bad_profile = TRUE;
@@ -1154,14 +1154,14 @@ BAD_TEXT:
case KEYCHAR:
/*-- get next token - should be character for key type --*/
if (warnings && key_defined)
printf ( catgets(dtsearch_catd, MS_chandel, 38,
printf ( CATGETS(dtsearch_catd, MS_chandel, 38,
"Warning line %d: Key character redefined.\n") ,
line_num);
tok = my_strtok ('\0', del_string);
if (validate_id (tok))
key_char = tok[0];
else {
printf ( catgets(dtsearch_catd, MS_chandel, 39,
printf ( CATGETS(dtsearch_catd, MS_chandel, 39,
"Error line %d: invalid Key Character:'%c'.\n") ,
line_num, (tok)?tok[0]:'?');
bad_profile = TRUE;
@@ -1172,7 +1172,7 @@ BAD_TEXT:
case DATEFLD:
if (date_pos_defined) {
printf ( catgets(dtsearch_catd, MS_chandel, 110,
printf ( CATGETS(dtsearch_catd, MS_chandel, 110,
"Warning line %d - date field redefined.\n") ,
line_num);
null_date_specified = FALSE;
@@ -1187,7 +1187,7 @@ BAD_TEXT:
strcpy (date_current->field_id, tok);
else {
/* Msg #111 used two places */
printf ( catgets(dtsearch_catd, MS_chandel, 111,
printf ( CATGETS(dtsearch_catd, MS_chandel, 111,
"Error line %d - bad identifier '%s' for date.\n") ,
line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -1211,7 +1211,7 @@ BAD_TEXT:
strcpy (date_current->field_id, tok);
else {
/* Msg #111 used two places */
printf ( catgets(dtsearch_catd, MS_chandel, 111,
printf ( CATGETS(dtsearch_catd, MS_chandel, 111,
"Error line %d - bad identifier '%s' for date.\n"),
line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -1225,7 +1225,7 @@ BAD_TEXT:
case KEY:
/*-- building the key --*/
if (warnings && key_pos_defined)
printf ( catgets(dtsearch_catd, MS_chandel, 40,
printf ( CATGETS(dtsearch_catd, MS_chandel, 40,
"Warning line %d - key field redefined.\n") ,
line_num);
key_table = (struct key_id *) malloc (sizeof (struct key_id));
@@ -1245,7 +1245,7 @@ BAD_TEXT:
strcpy (key_current->field_id, tok);
}
else {
printf ( catgets(dtsearch_catd, MS_chandel, 43,
printf ( CATGETS(dtsearch_catd, MS_chandel, 43,
"Error line %d - bad identifier '%s' for key.\n") ,
line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -1260,7 +1260,7 @@ BAD_TEXT:
if (validate_id (tok))
strcpy (key_current->field_id, tok);
else {
printf ( catgets(dtsearch_catd, MS_chandel, 43,
printf ( CATGETS(dtsearch_catd, MS_chandel, 43,
"Error line %d - bad identifier '%s' for key.\n") ,
line_num, tok);
bad_profile = TRUE;
@@ -1283,7 +1283,7 @@ BAD_TEXT:
discard = FALSE;
else {
BAD_DISCARD:
printf ( catgets(dtsearch_catd, MS_chandel, 45,
printf ( CATGETS(dtsearch_catd, MS_chandel, 45,
"Error line %d: unknown option for 'discard': "
"'%s'.\n") , line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -1302,7 +1302,7 @@ BAD_DISCARD:
del_blanklines = FALSE;
else {
BAD_DELBLANKLINES:
printf ( catgets(dtsearch_catd, MS_chandel, 46,
printf ( CATGETS(dtsearch_catd, MS_chandel, 46,
"Error line %d: unknown option for "
"'delblanklines': '%s'.\n") ,
line_num, NULLORSTR(tok));
@@ -1342,7 +1342,7 @@ BAD_DELBLANKLINES:
break;
default:
BAD_ABSTR:
printf ( catgets(dtsearch_catd, MS_chandel, 47,
printf ( CATGETS(dtsearch_catd, MS_chandel, 47,
"Error line %d: Unknown option for abstract :'%s'\n"),
line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -1351,7 +1351,7 @@ BAD_ABSTR:
break;
default:
printf ( catgets(dtsearch_catd, MS_chandel, 48,
printf ( CATGETS(dtsearch_catd, MS_chandel, 48,
"Error line %d -unknown identifier type '%s'.\n") ,
line_num, NULLORSTR(tok));
bad_profile = TRUE;
@@ -1359,7 +1359,7 @@ BAD_ABSTR:
} /* main switch for each line in profile */
} while (TRUE); /* read-a-line do loop */
if (!date_pos_defined)
fprintf (aa_stderr, catgets(dtsearch_catd, MS_chandel, 115,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_chandel, 115,
"%s Default object dates will be '%s'.\n") ,
PROGNAME"1288", now_str);
if (bad_profile)
@@ -1368,17 +1368,17 @@ BAD_ABSTR:
/*---- Process tables, and check for identifiers referenced ----*/
if (!top_defined && !bot_defined) {
bad_profile = TRUE;
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 49,
printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 49,
"Error - delimiter not defined.\n") );
}
if (!key_defined) {
bad_profile = TRUE;
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 50,
printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 50,
"Error - key-type character never defined.\n") );
}
if (!key_pos_defined) {
bad_profile = TRUE;
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 51,
printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 51,
"Error - key never defined.\n") );
}
if (bad_profile)
@@ -1392,12 +1392,12 @@ BAD_ABSTR:
line_current = line_current->next;
}
if (top_rec_name[0] != 0 && top_rec == NULL) {
printf ( catgets(dtsearch_catd, MS_chandel, 52,
printf ( CATGETS(dtsearch_catd, MS_chandel, 52,
"Error - delimiter defined as '%s' was never found.\n") ,
top_rec_name);
bad_profile = TRUE;
} else if (strcmp (top_rec->head->text, line_mode) == 0) {
printf ( catgets(dtsearch_catd, MS_chandel, 53,
printf ( CATGETS(dtsearch_catd, MS_chandel, 53,
"Error - delimiter defined as '%s' references a physical "
"line in the record.\n Since the delimiter defines the "
"physical lines\n it cannot be referenced as a physical line.\n"),
@@ -1416,7 +1416,7 @@ BAD_ABSTR:
line_current = line_current->next;
}
if (!found && !field_current->constant) {
printf ( catgets(dtsearch_catd, MS_chandel, 54,
printf ( CATGETS(dtsearch_catd, MS_chandel, 54,
"Error - for field '%s', no line identifier matches '%s'.\n") ,
field_current->name, field_current->line_id);
bad_profile = TRUE;
@@ -1436,7 +1436,7 @@ BAD_ABSTR:
field_current = field_current->next;
}
if (!found) {
printf ( catgets(dtsearch_catd, MS_chandel, 55,
printf ( CATGETS(dtsearch_catd, MS_chandel, 55,
"Error - field include/exclude list included\n"
" the field '%s', which was never defined.\n") ,
finclude_current->field_id);
@@ -1457,7 +1457,7 @@ BAD_ABSTR:
line_current = line_current->next;
}
if (!found) {
printf ( catgets(dtsearch_catd, MS_chandel, 56,
printf ( CATGETS(dtsearch_catd, MS_chandel, 56,
"Error - image include/exclude list included\n"
" the line '%s', which was never defined.\n") ,
include_current->line_id);
@@ -1478,7 +1478,7 @@ BAD_ABSTR:
line_current = line_current->next;
}
if (!found) {
printf ( catgets(dtsearch_catd, MS_chandel, 57,
printf ( CATGETS(dtsearch_catd, MS_chandel, 57,
"Error - text include/exclude list included\n"
" the line '%s', which was never defined.\n") ,
include_current->line_id);
@@ -1505,7 +1505,7 @@ BAD_ABSTR:
}
}
if (!found) {
printf ( catgets(dtsearch_catd, MS_chandel, 116,
printf ( CATGETS(dtsearch_catd, MS_chandel, 116,
"Error - date references undefined field '%s'.\n"),
date_current->field_id);
bad_profile = TRUE;
@@ -1538,7 +1538,7 @@ END_DATE_TABLE:
field_current = field_current->next;
}
if (!found) {
printf ( catgets(dtsearch_catd, MS_chandel, 58,
printf ( CATGETS(dtsearch_catd, MS_chandel, 58,
"Error - key definition references field '%s'\n"
" which was never defined.\n") ,
key_current->field_id);
@@ -1558,7 +1558,7 @@ END_DATE_TABLE:
field_current = field_current->next;
}
if (!found) {
printf ( catgets(dtsearch_catd, MS_chandel, 59,
printf ( CATGETS(dtsearch_catd, MS_chandel, 59,
"Error - abstract definition references field '%s'\n"
" which was never defined.\n") ,
abstract_current->field_id);
@@ -1691,7 +1691,7 @@ void write_record (void)
/* Test final record write to check for full filesystem */
if (fprintf (outstream, "%c\n", CNTRL_L) <= 0) {
printf ( catgets(dtsearch_catd, MS_chandel, 124,
printf ( CATGETS(dtsearch_catd, MS_chandel, 124,
"%s Unable to write to output file '%s':\n %s\n") ,
PROGNAME"1663", outfile, strerror(errno));
DtSearchExit (2);
@@ -1715,7 +1715,7 @@ static void mmm_to_digits (struct field_id *fld)
int i;
if (months == NULL)
months = strdup (catgets(dtsearch_catd, MS_chandel, 125,
months = strdup (CATGETS(dtsearch_catd, MS_chandel, 125,
"JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC"));
for (i=0; i<3; i++)
valbuf[i] = toupper (fld->value[i]);
@@ -1954,7 +1954,7 @@ void process_record (void)
BAD_DATE_VALUE:
objdate_tmptr = &nowtm;
printf ( catgets(dtsearch_catd, MS_chandel, 133,
printf ( CATGETS(dtsearch_catd, MS_chandel, 133,
"Warning - '%s' is invalid date specification.\n"
" Using '%s' date for record number %ld that began: %.30s\n") ,
date_value, now_str, rec_count, record_head->text);
@@ -1981,12 +1981,12 @@ void process_record (void)
key_current = key_current->next;
}
if (dummy && warnings) {
printf ( catgets(dtsearch_catd, MS_chandel, 68,
printf ( CATGETS(dtsearch_catd, MS_chandel, 68,
"Warning - fields necessary for key not found.\n"
" discarding record #%ld that began:\n %s\n") ,
rec_count, record_head->text);
} else if (discard && meaningless && warnings) {
printf ( catgets(dtsearch_catd, MS_chandel, 69,
printf ( CATGETS(dtsearch_catd, MS_chandel, 69,
"Warning - record #ld deemed meaningless, discarding...\n"
" record began: %.60s\n") ,
rec_count, record_head->text);
@@ -2061,7 +2061,7 @@ void process_infile (void)
instream = stdin;
else {
if ((instream = fopen (infile, "rt")) == NULL) {
printf ( catgets(dtsearch_catd, MS_chandel, 70,
printf ( CATGETS(dtsearch_catd, MS_chandel, 70,
" Unable to open input file '%s'.\n") , infile);
exit (FILE_ERROR);
}
@@ -2197,7 +2197,7 @@ static void usage_msg (void)
if (!warnings)
return;
printf (catgets (dtsearch_catd, MS_chandel, 71, default_text),
printf (CATGETS(dtsearch_catd, MS_chandel, 71, default_text),
aa_argv0, EXT_FZKEY);
return;
} /* usage_msg() */
@@ -2225,7 +2225,7 @@ static void user_arg_processor (int argc, char **argv)
case 'w':
if ((screen_width = atoi (argptr + 2)) == 0) {
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 72,
printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 72,
"Invalid screen width specified.\n") );
bad_parm = TRUE;
}
@@ -2242,7 +2242,7 @@ static void user_arg_processor (int argc, char **argv)
else if (argptr[2] == 'a')
strcpy (outmode, "a");
else {
printf ( catgets(dtsearch_catd, MS_chandel, 75,
printf ( CATGETS(dtsearch_catd, MS_chandel, 75,
"'%s' is invalid output mode.\n") , argptr);
bad_parm = TRUE;
} /* else */
@@ -2250,14 +2250,14 @@ static void user_arg_processor (int argc, char **argv)
break;
default:
printf ( catgets(dtsearch_catd, MS_chandel, 76,
printf ( CATGETS(dtsearch_catd, MS_chandel, 76,
"Unknown command line argument '%s'.\n") , argptr);
bad_parm = TRUE;
} /*--switch--*/
} /*--while--*/
if (argc-- <= 0) {
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 77,
printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 77,
"Missing required profile-file name.\n") );
bad_parm = TRUE;
}
@@ -2274,7 +2274,7 @@ static void user_arg_processor (int argc, char **argv)
}
if (argc-- <= 0) {
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 78,
printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 78,
"Missing required input-file name.\n") );
bad_parm = TRUE;
}
@@ -2292,7 +2292,7 @@ static void user_arg_processor (int argc, char **argv)
strcat(outfile,EXT_FZKEY);
*****************/
if (strcmp (infile, "-") == 0) {
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 79, "Error - using "
printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 79, "Error - using "
"stdin as input, output filename is required!\n") );
exit (FILE_ERROR);
} else {
@@ -2321,38 +2321,38 @@ static void user_arg_processor (int argc, char **argv)
/*-- Sanity checks --*/
/*-- duplicates? --*/
if (strcmp (infile, profile) == 0) {
printf ( catgets(dtsearch_catd, MS_chandel, 80,
printf ( CATGETS(dtsearch_catd, MS_chandel, 80,
"Profile file and input file have same name:'%s'.\n") ,
infile);
bad_parm = TRUE;
} /* if */
if (strcmp (infile, outfile) == 0 && strcmp (infile, "-")) {
printf ( catgets(dtsearch_catd, MS_chandel, 81,
printf ( CATGETS(dtsearch_catd, MS_chandel, 81,
"Input file and output file have same name:'%s'.\n") ,
infile);
bad_parm = TRUE;
} /* if */
if (strcmp (profile, outfile) == 0) {
printf ( catgets(dtsearch_catd, MS_chandel, 82,
printf ( CATGETS(dtsearch_catd, MS_chandel, 82,
"Profile file and output file have same name:'%s'.\n") ,
profile);
bad_parm = TRUE;
} /* if */
if(warnings)
{
printf ( catgets(dtsearch_catd, MS_chandel, 83,
printf ( CATGETS(dtsearch_catd, MS_chandel, 83,
" Profile file: %s\n") , profile);
if (strcmp (infile, "-") == 0)
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 84,
printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 84,
" Input file: stdin\n") );
else
printf ( catgets(dtsearch_catd, MS_chandel, 85,
printf ( CATGETS(dtsearch_catd, MS_chandel, 85,
" Input file: %s\n") , infile);
if (strcmp (outfile, "-") == 0)
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 86,
printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 86,
" Output file: stdout\n") );
else
printf ( catgets(dtsearch_catd, MS_chandel, 87,
printf ( CATGETS(dtsearch_catd, MS_chandel, 87,
" Output file: %s\n") , outfile);
}
} /*--user_args_processor--*/
@@ -2377,8 +2377,8 @@ int main (int argc, char **argv)
/*-- Initialization --*/
aa_argv0 = argv[0];
setlocale (LC_ALL, "");
dtsearch_catd = catopen (FNAME_DTSRCAT, 0);
printf ( catgets(dtsearch_catd, MS_chandel, 88,
dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0);
printf ( CATGETS(dtsearch_catd, MS_chandel, 88,
"%s. %s %s Text Filter.\n") ,
aa_argv0, PRODNAME, DtSrVERSION);
@@ -2399,7 +2399,7 @@ int main (int argc, char **argv)
signal (SIGINT, flag_shutdown);
signal (SIGTERM, flag_shutdown);
open_outfile ();
printf ( catgets(dtsearch_catd, MS_chandel, 89,
printf ( CATGETS(dtsearch_catd, MS_chandel, 89,
"\nInterrupt with CTRL-C to exit gracefully "
"at record boundary.\n Each dot is %ld records...\n"),
RECS_PER_DOT);
@@ -2407,17 +2407,17 @@ int main (int argc, char **argv)
oops = fclose (outstream);
fclose (instream);
if (oops < 0) {
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 90,
printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 90,
"\nError closing output file - disk full?\n") );
exit (FILE_ERROR);
}
}
else {
printf ( "%s", catgets(dtsearch_catd, MS_chandel, 91,
printf ( "%s", CATGETS(dtsearch_catd, MS_chandel, 91,
"Quitting due to errors in profile file.\n") );
exit (BAD_PROFILE);
}
printf ( catgets(dtsearch_catd, MS_chandel, 92,
printf ( CATGETS(dtsearch_catd, MS_chandel, 92,
"\n%s: Normal completion. %ld records processed. Exit code = 0.\n"),
aa_argv0, rec_count);
return 0;

View File

@@ -295,7 +295,7 @@ static void print_exit_code (int exit_code)
/* Put total seconds into totalstart */
if (totalstart > 0)
totalstart = time (NULL) - totalstart;
printf (catgets (dtsearch_catd, MS_cborodin, 206,
printf (CATGETS(dtsearch_catd, MS_cborodin, 206,
"%s: Exit Code = %d, Total elapsed time %ldm %lds.\n"),
aa_argv0, exit_code, totalstart / 60L, totalstart % 60L);
return;
@@ -380,7 +380,7 @@ void write_to_file (TREENODE * output_node)
print_dba = print_dba->next_dba;
num_addrs_for_word++;
if (num_addrs_for_word >= batch_size) {
printf (catgets (dtsearch_catd, MS_cborodin, 280,
printf (CATGETS(dtsearch_catd, MS_cborodin, 280,
"\n%s num_addrs_for_word (%ld) >= batchsz (%ld).\n"),
PROGNAME"280", (long)num_addrs_for_word, (long)batch_size);
DtSearchExit (91);
@@ -449,7 +449,7 @@ void traverse_tree (void)
/* Dheck for the empty tree */
if (root_node == NULL) {
printf (catgets (dtsearch_catd, MS_cborodin, 288,
printf (CATGETS(dtsearch_catd, MS_cborodin, 288,
"%s Abort. There are no words in the input file %s.\n"),
PROGNAME"288", fname_input);
DtSearchExit (34);
@@ -522,7 +522,7 @@ void traverse_tree (void)
/********************************************************/
static void print_usage_msg (void)
{
printf (catgets (dtsearch_catd, MS_cborodin, 17,
printf (CATGETS(dtsearch_catd, MS_cborodin, 17,
"\n"
"USAGE: %s -d<dbname> [options] <infile>\n"
" Listed default file name extensions can be overridden.\n"
@@ -631,7 +631,7 @@ void user_args_processor (int argc, char **argv)
case 'r':
if ((recs_per_dot = atoi (argptr + 2)) <= 0) {
printf (catgets (dtsearch_catd, MS_cborodin, 577,
printf (CATGETS(dtsearch_catd, MS_cborodin, 577,
"%s Invalid arg '%s'. Using default -r%d.\n"),
PROGNAME"577", argptr, RECS_PER_DOT);
recs_per_dot = RECS_PER_DOT;
@@ -641,7 +641,7 @@ void user_args_processor (int argc, char **argv)
case 'h':
duprec_hashsize = atol (argptr + 2);
if (duprec_hashsize == 0UL)
printf (catgets (dtsearch_catd, MS_cborodin, 539,
printf (CATGETS(dtsearch_catd, MS_cborodin, 539,
"%s Duplicate record id checking disabled.\n"),
PROGNAME"539");
break;
@@ -649,7 +649,7 @@ void user_args_processor (int argc, char **argv)
case 'b':
batch_size = atol (argptr + 2);
if (batch_size <= 0L) {
printf (catgets (dtsearch_catd, MS_cborodin, 595,
printf (CATGETS(dtsearch_catd, MS_cborodin, 595,
"%s Invalid batch size argument '%s'.\n"),
PROGNAME"595", argptr);
goto BADPARM;
@@ -666,7 +666,7 @@ void user_args_processor (int argc, char **argv)
else
cache_size = CACHE_SIZE;
CACHE_ADJUSTED:
printf (catgets (dtsearch_catd, MS_cborodin, 600,
printf (CATGETS(dtsearch_catd, MS_cborodin, 600,
"%sCache size readjusted to %d.\n"),
PROGNAME "600 ", cache_size);
break;
@@ -703,7 +703,7 @@ CACHE_ADJUSTED:
case 'd':
/* May include both dicname and dicpath */
if (!segregate_dicname (argptr + 2)) {
printf (catgets (dtsearch_catd, MS_cborodin, 550,
printf (CATGETS(dtsearch_catd, MS_cborodin, 550,
"%s '%s' is invalid path/database name.\n"),
PROGNAME"550", argptr);
goto BADPARM;
@@ -712,7 +712,7 @@ CACHE_ADJUSTED:
case 'i': /* (I)nput buffer size */
if ((inbufsz = atol (argptr + 2)) <= 0) {
printf (catgets (dtsearch_catd, MS_cborodin, 558,
printf (CATGETS(dtsearch_catd, MS_cborodin, 558,
"%s Invalid input buffer size '%s'.\n"),
PROGNAME"558", argptr);
goto BADPARM;
@@ -720,7 +720,7 @@ CACHE_ADJUSTED:
break;
default:
printf (catgets (dtsearch_catd, MS_cborodin, 567,
printf (CATGETS(dtsearch_catd, MS_cborodin, 567,
"%s Unknown command line argument '%s'.\n"),
PROGNAME"567", argptr);
BADPARM:
@@ -732,7 +732,7 @@ BADPARM:
/* Validate input file name */
if (argc-- <= 0) {
printf (catgets (dtsearch_catd, MS_cborodin, 580,
printf (CATGETS(dtsearch_catd, MS_cborodin, 580,
"%s Missing required input file name.\n"),
PROGNAME"580");
goto BADPARM;
@@ -743,7 +743,7 @@ BADPARM:
/* Check for missing database name */
if (dicname[0] == 0) {
printf (catgets (dtsearch_catd, MS_cborodin, 589,
printf (CATGETS(dtsearch_catd, MS_cborodin, 589,
"%s No database name specified (-d argument).\a\n"),
PROGNAME"589");
goto BADPARM;
@@ -786,7 +786,7 @@ static void put_addrs_2_dtbs_addr_file (
DtSrINT32 num_addrs;
if (nitems >= batch_size) {
printf ( catgets(dtsearch_catd, MS_cborodin, 6,
printf ( CATGETS(dtsearch_catd, MS_cborodin, 6,
"put_addrs_2_dtbs_addr_file() nitems=%d, batchsz=%ld\n") ,
(int)nitems, (long)batch_size);
DtSearchExit (58);
@@ -837,7 +837,7 @@ static void put_addrs_2_dtbs_addr_file (
num_writes = fwrite (word_addrs_ii, sizeof(DB_ADDR), (size_t)num_addrs,
dtbs_addr_fp);
if (num_writes != num_addrs) {
printf (catgets (dtsearch_catd, MS_cborodin, 776, msg_776),
printf (CATGETS(dtsearch_catd, MS_cborodin, 776, msg_776),
PROGNAME"776", strerror(errno));
DtSearchExit (76);
}
@@ -848,7 +848,7 @@ static void put_addrs_2_dtbs_addr_file (
num_writes = fwrite (addrs_array, sizeof(DB_ADDR),
(size_t)got_word.or_hwfree, dtbs_addr_fp);
if (num_writes != got_word.or_hwfree) {
printf (catgets (dtsearch_catd, MS_cborodin, 776, msg_776),
printf (CATGETS(dtsearch_catd, MS_cborodin, 776, msg_776),
PROGNAME"786", strerror(errno));
DtSearchExit (86);
}
@@ -863,7 +863,7 @@ static void put_addrs_2_dtbs_addr_file (
num_writes = fwrite (addrs_array, sizeof(DB_ADDR),
(size_t)nitems, dtbs_addr_fp);
if (num_writes != nitems) {
printf (catgets (dtsearch_catd, MS_cborodin, 776, msg_776),
printf (CATGETS(dtsearch_catd, MS_cborodin, 776, msg_776),
PROGNAME"798", strerror(errno));
DtSearchExit (87);
}
@@ -871,7 +871,7 @@ static void put_addrs_2_dtbs_addr_file (
num_writes = fwrite (word_addrs_ii, sizeof(DB_ADDR),
(size_t)num_addrs, dtbs_addr_fp);
if (num_writes != num_addrs) {
printf (catgets (dtsearch_catd, MS_cborodin, 776, msg_776),
printf (CATGETS(dtsearch_catd, MS_cborodin, 776, msg_776),
PROGNAME"889", strerror(errno));
DtSearchExit (89);
}
@@ -934,7 +934,7 @@ void write_2_dtbs_addr_file (void)
num_addrs_ii = got_word.or_hwaddrs;
if (num_addrs_ii > or_reccount) {
printf (catgets (dtsearch_catd, MS_cborodin, 713,
printf (CATGETS(dtsearch_catd, MS_cborodin, 713,
"\n%s Word '%s' occurs in %ld records,\n"
" but there are only %ld records in database!\n"
" (This may be a good candidate for the stoplist).\n"),
@@ -947,7 +947,7 @@ void write_2_dtbs_addr_file (void)
if (fseek (dtbs_addr_fp, (long) got_word.or_hwoffset, SEEK_SET) != 0)
{
printf (catgets (dtsearch_catd, MS_cborodin, 875,
printf (CATGETS(dtsearch_catd, MS_cborodin, 875,
"\n%s Could not fseek d99 file to offset %ld.\n"),
PROGNAME"875", got_word.or_hwoffset);
DtSearchExit (98);
@@ -955,7 +955,7 @@ void write_2_dtbs_addr_file (void)
num_reads = fread (word_addrs_ii, sizeof(DB_ADDR),
(size_t)num_addrs_ii, dtbs_addr_fp);
if (num_reads != num_addrs_ii) {
printf (catgets (dtsearch_catd, MS_cborodin, 848,
printf (CATGETS(dtsearch_catd, MS_cborodin, 848,
"\n%s Could not fread %ld bytes (%ld dba's) of d99 file\n"
" at offset %ld. Number of dba's read (return code) = %ld.\n"),
PROGNAME"848", sizeof(DB_ADDR) * num_addrs_ii, (long)num_addrs_ii,
@@ -990,7 +990,7 @@ void write_2_dtbs_addr_file (void)
temp1 = (*(word_addrs_ii + i) >> 8) - 1; /* = rec#, base 0 */
cur_byte = temp1 >> 3; /* get matching byte# in bit vector */
if (cur_byte >= bit_vector_size) {
printf ( catgets(dtsearch_catd, MS_cborodin, 9,
printf ( CATGETS(dtsearch_catd, MS_cborodin, 9,
"\n%s Corrupted d99 file for word '%s',\n"
" database address %ld @ file position %ld => bitvector[%ld],"
" but max bitvector allocation = %ld.\n") ,
@@ -1134,7 +1134,7 @@ void write_new_word_2_dtbs (void)
num_writes = fwrite (record_addr_word, sizeof(DB_ADDR),
(size_t)got_word.or_hwfree, dtbs_addr_fp);
if (num_writes != got_word.or_hwfree) {
printf (catgets (dtsearch_catd, MS_cborodin, 776, msg_776),
printf (CATGETS(dtsearch_catd, MS_cborodin, 776, msg_776),
PROGNAME"960", strerror(errno));
DtSearchExit (96);
}
@@ -1167,7 +1167,7 @@ void fill_data1 (char *node_word)
count_word_ii++;
if (shutdown_now) {
printf (catgets (dtsearch_catd, MS_cborodin, 164,
printf (CATGETS(dtsearch_catd, MS_cborodin, 164,
"\n%s Abort due to signal %d. Database %s\n"
" probably corrupted. Restore backup database.\n"),
PROGNAME"164", shutdown_now, dicname);
@@ -1186,7 +1186,7 @@ void fill_data1 (char *node_word)
(((float) num_of_diff_words /
(float) count_word_ii - 1.) *
(float) (time (NULL) - timestart));
printf (catgets (dtsearch_catd, MS_cborodin, 849,
printf (CATGETS(dtsearch_catd, MS_cborodin, 849,
"\n%s: Word #%ld, %.0f%% done. Est %lum %02lus "
"to completion.\n"),
aa_argv0, count_word_ii,
@@ -1296,7 +1296,7 @@ static void load_into_bintree (
*/
else {
if ((newdba = malloc (sizeof(DBALIST))) == NULL) {
printf (catgets (dtsearch_catd, MS_cborodin, 374,
printf (CATGETS(dtsearch_catd, MS_cborodin, 374,
msg_374), PROGNAME"1150");
DtSearchExit (26);
}
@@ -1379,15 +1379,15 @@ main (int argc, char **argv)
/******************* INITIALIZE ******************/
setlocale (LC_ALL, "");
dtsearch_catd = catopen (FNAME_DTSRCAT, 0);
dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0);
aa_argv0 = strdup (argv[0]);
time (&elapsed);
tmptr = localtime (&elapsed);
strftime (buf, sizeof(buf),
catgets (dtsearch_catd, MS_misc, 22, "%A, %b %d %Y, %I:%M %p"),
CATGETS(dtsearch_catd, MS_misc, 22, "%A, %b %d %Y, %I:%M %p"),
tmptr);
printf (catgets (dtsearch_catd, MS_cborodin, 1, "%s. Run %s.\n"),
printf (CATGETS(dtsearch_catd, MS_cborodin, 1, "%s. Run %s.\n"),
aa_argv0, buf);
austext_exit_last = print_exit_code;
batch_size = BATCH_SIZE;
@@ -1430,7 +1430,7 @@ main (int argc, char **argv)
/* Load database's parser, stemmer, and linguistic files into dblk. */
if (!load_language (&dblk, NULL)) {
puts (DtSearchGetMessages());
printf (catgets (dtsearch_catd, MS_cborodin, 1097,
printf (CATGETS(dtsearch_catd, MS_cborodin, 1097,
"%s Aborting due to errors in loading language files.\n"),
PROGNAME"1097");
DtSearchExit(3);
@@ -1481,7 +1481,7 @@ main (int argc, char **argv)
new_dtbs_file = TRUE;
if (dtbs_addr_fp == NULL) {
/* msg 1068 used multiple places */
printf (catgets (dtsearch_catd, MS_cborodin, 1068,
printf (CATGETS(dtsearch_catd, MS_cborodin, 1068,
"%s Can't open new inverted index file '%s': %s\n"),
PROGNAME"1068", dtbs_addr_file, strerror(errno));
DtSearchExit (13);
@@ -1493,7 +1493,7 @@ main (int argc, char **argv)
/* read Header Information from d99 file */
if (!fread_d99_header (&fl_hdr, dtbs_addr_fp)) {
/* msg 1068 used multiple places */
printf (catgets (dtsearch_catd, MS_cborodin, 1068,
printf (CATGETS(dtsearch_catd, MS_cborodin, 1068,
"%s Can't read header data for '%s': %s\n"),
PROGNAME"1422", dtbs_addr_file, strerror(errno));
DtSearchExit (13);
@@ -1506,14 +1506,14 @@ main (int argc, char **argv)
printf (PROGNAME"1336 Can't getcwd: %s.\n", strerror(errno));
if (!src)
src = getenv ("PWD");
printf (catgets (dtsearch_catd, MS_misc, 24,
printf (CATGETS(dtsearch_catd, MS_misc, 24,
"%s: current working directory = '%s', .fzk file = '%s'\n"),
aa_argv0,
(src) ? src : catgets (dtsearch_catd, MS_misc, 6, "<unknown>"),
(src) ? src : CATGETS(dtsearch_catd, MS_misc, 6, "<unknown>"),
fname_input);
if ((instream = fopen (fname_input, "rt")) == NULL) {
BAD_INPUT_FILE:
printf (catgets (dtsearch_catd, MS_cborodin, 1083,
printf (CATGETS(dtsearch_catd, MS_cborodin, 1083,
"%s Can't read input file '%s': %s\n"),
PROGNAME"1083", fname_input, strerror(errno));
DtSearchExit (14);
@@ -1538,7 +1538,7 @@ BAD_INPUT_FILE:
* the language's parser() a 'word' at a time, which
* ultimately means a byte at a time.
*/
printf (catgets (dtsearch_catd, MS_cborodin, 1108,
printf (CATGETS(dtsearch_catd, MS_cborodin, 1108,
"%s: Beginning Pass 1, reading records from '%s'.\n"
" Each dot = %d records.\n"),
aa_argv0, fname_input, recs_per_dot);
@@ -1560,7 +1560,7 @@ BAD_INPUT_FILE:
inbuf [inbufsz] = 0; /* just to be sure */
if (shutdown_now) {
printf (catgets (dtsearch_catd, MS_cborodin, 164,
printf (CATGETS(dtsearch_catd, MS_cborodin, 164,
"\n%s: %s Abort due to signal %d. Database %s\n"
" possibly corrupted. Restore backup database.\n"),
aa_argv0, PROGNAME"1299", shutdown_now, dicname);
@@ -1576,7 +1576,7 @@ BAD_INPUT_FILE:
/*----- READ LINE #2, abstract -----*/
if (fgets (inbuf, inbufsz, instream) == NULL) {
INVALID_FZK_FORMAT:
printf (catgets (dtsearch_catd, MS_cborodin, 1129,
printf (CATGETS(dtsearch_catd, MS_cborodin, 1129,
"%s: %s Invalid .fzk file format.\n"),
fname_input, PROGNAME"1129");
DtSearchExit (22);
@@ -1593,7 +1593,7 @@ INVALID_FZK_FORMAT:
/* If necessary, discard long keys exactly like cravel */
if (strlen (cptr) >= DtSrMAX_DB_KEYSIZE) {
printf (catgets (dtsearch_catd, MS_cborodin, 659,
printf (CATGETS(dtsearch_catd, MS_cborodin, 659,
"\n%s: %s Discarding record, key too long:\n '%s'.\n"),
aa_argv0, PROGNAME"659", cptr);
discard_to_ETX (&parg);
@@ -1604,7 +1604,7 @@ INVALID_FZK_FORMAT:
/* Skip duplicate record ids in same order as dtsrload */
i = is_duprec (db_key);
if (i == 2) { /* out of memory */
printf (catgets (dtsearch_catd, MS_cborodin, 374, msg_374),
printf (CATGETS(dtsearch_catd, MS_cborodin, 374, msg_374),
PROGNAME"1317");
DtSearchExit (57);
}
@@ -1612,7 +1612,7 @@ INVALID_FZK_FORMAT:
duplicate_recids++;
if (dotcount > 0)
putchar ('\n');
printf (catgets (dtsearch_catd, MS_cborodin, 1402,
printf (CATGETS(dtsearch_catd, MS_cborodin, 1402,
"%s: Discarded duplicate rec #%lu '%s'.\n"),
aa_argv0, record_count, db_key);
discard_to_ETX (&parg);
@@ -1631,7 +1631,7 @@ INVALID_FZK_FORMAT:
normal_retncode = 1; /* = 'warning' */
if (dotcount > 0)
putchar ('\n');
printf (catgets (dtsearch_catd, MS_cborodin, 1168,
printf (CATGETS(dtsearch_catd, MS_cborodin, 1168,
"%s: %s Discarded '%s', key not in database.\n"),
aa_argv0, PROGNAME"1168", displayable(db_key));
discard_to_ETX (&parg);
@@ -1653,7 +1653,7 @@ INVALID_FZK_FORMAT:
* if user failed to run dtsrload before dtsrindex?
*/
if (dba < 1 || dba > or_maxdba) {
printf ( catgets(dtsearch_catd, MS_cborodin, 21,
printf ( CATGETS(dtsearch_catd, MS_cborodin, 21,
"\n%s '%s' record overflows word counter array.\n"
"Record number %ld > maxdba %ld, dba=%ld, "
"recslots=%ld, offs=%d.\n") ,
@@ -1665,7 +1665,7 @@ INVALID_FZK_FORMAT:
temp_dba = dba - 1; /* = rec# starting at 0 */
cur_byte = temp_dba >> 3; /* bits to bytes: div by 8 */
if (cur_byte >= bit_vector_size) {
printf ( catgets(dtsearch_catd, MS_cborodin, 22,
printf ( CATGETS(dtsearch_catd, MS_cborodin, 22,
"\n%s '%s' record in database (dba=%ld)\n"
" overflows bitvector allocation (%ld >= %ld).\n") ,
PROGNAME"1475", displayable(db_key), (long)dba,
@@ -1687,7 +1687,7 @@ INVALID_FZK_FORMAT:
(((float) fstat_input.st_size /
(float) bytes_in - 1.) *
(float) (time (NULL) - timestart));
printf (catgets (dtsearch_catd, MS_cborodin, 1190,
printf (CATGETS(dtsearch_catd, MS_cborodin, 1190,
"\n%s: Rec #%lu, %.0f%% done. "
"Est %lum %02lus to end Pass 1.\n"),
aa_argv0,
@@ -1748,20 +1748,20 @@ INVALID_FZK_FORMAT:
}
if (duplicate_recids > 0L) {
normal_retncode = 1; /* 'warning' */
sprintf (buf, catgets (dtsearch_catd, MS_cborodin, 40,
sprintf (buf, CATGETS(dtsearch_catd, MS_cborodin, 40,
"Ignored %ld duplicate records"),
duplicate_recids);
}
else
strcpy (buf, catgets (dtsearch_catd, MS_cborodin, 41,
strcpy (buf, CATGETS(dtsearch_catd, MS_cborodin, 41,
"No duplicate records found"));
printf (catgets (dtsearch_catd, MS_cborodin, 1225,
printf (CATGETS(dtsearch_catd, MS_cborodin, 1225,
"%s: Pass 1 completed in %lum %lus, read %lu records.\n"
" %s, parsed %lu words.\n"),
aa_argv0, elapsed / 60L, elapsed % 60L, record_count,
buf, num_of_diff_words);
if (record_count > batch_size) {
printf (catgets (dtsearch_catd, MS_cborodin, 33,
printf (CATGETS(dtsearch_catd, MS_cborodin, 33,
"\n%s Number of incoming records exceeded %d.\n"
" This will usually result in 'Out of Paging Space' "
"error in Pass 2\n"
@@ -1774,7 +1774,7 @@ INVALID_FZK_FORMAT:
/*----------------- PASS 2: -----------------
* Traverse completed binary tree and write it to d99 file.
*/
printf (catgets (dtsearch_catd, MS_cborodin, 1233,
printf (CATGETS(dtsearch_catd, MS_cborodin, 1233,
"%s: Beginning Pass 2: batch index traversal and database update.\n"
" Each dot = %d words.\n"),
aa_argv0, words_per_dot);
@@ -1788,7 +1788,7 @@ INVALID_FZK_FORMAT:
/* Write header information to the d99 file */
if (!fwrite_d99_header (&fl_hdr, dtbs_addr_fp)) {
printf (catgets (dtsearch_catd, MS_cborodin, 776, msg_776),
printf (CATGETS(dtsearch_catd, MS_cborodin, 776, msg_776),
PROGNAME"1723", strerror(errno));
DtSearchExit (13);
}
@@ -1796,11 +1796,11 @@ INVALID_FZK_FORMAT:
fclose (dtbs_addr_fp);
elapsed = time (NULL) - timestart;
printf (catgets (dtsearch_catd, MS_cborodin, 1246,
printf (CATGETS(dtsearch_catd, MS_cborodin, 1246,
"%s: Pass 2 completed in %lum %lus, updated %lu words.\n"),
aa_argv0, elapsed / 60L, elapsed % 60L, count_word_ii);
if (normal_retncode == 1)
printf (catgets (dtsearch_catd, MS_cborodin, 2,
printf (CATGETS(dtsearch_catd, MS_cborodin, 2,
"%s: Warnings were detected.\n"), aa_argv0);
DtSearchExit (normal_retncode);

View File

@@ -117,7 +117,7 @@ void count_words (int index)
else if (index == 4)
vista_field = OR_HWORDKEY;
else {
printf (catgets (dtsearch_catd, MS_dtsrkdump, 1,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 1,
"%s Program Error Abort.\a\n"),
PROGNAME"030");
DtSearchExit (4);
@@ -164,7 +164,7 @@ void count_words (int index)
printf ("\" ");
while (tabstop++ < 22)
putchar (' ');
printf (catgets(dtsearch_catd, MS_dtsrkdump, 2,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 2,
"%c dba=%d:%-7ld ofs=%-9ld adr=%-6ld fre=%ld\n"),
(addrs >= dbrec.or_reccount) ? '*' : ' ',
dba >> 24, dba & 0xffffff, offset, addrs, free);
@@ -227,17 +227,17 @@ int main (int argc, char *argv[])
sscanf ("$Revision: /main/3 $", "%*s %s", rcs_revision);
setlocale (LC_ALL, "");
dtsearch_catd = catopen (FNAME_DTSRCAT, 0);
dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0);
strftime (buf, sizeof (buf), "%m/%d/%Y, %I:%M %p",
localtime (&now));
printf (catgets(dtsearch_catd, MS_dtsrkdump, 3,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 3,
"%s %s, engine %s. %s.\n"),
aa_argv0, rcs_revision, AUSAPI_VERSION, buf);
if (argc <= 1) {
PRINT_USAGE:
printf (catgets(dtsearch_catd, MS_dtsrkdump, 4,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 4,
"\nUSAGE: %s -o|w|ow [-v] [-t<N> | -p<N>] dbname\n"
" Reads DtSearch key files and prints summary report.\n"
" -o Keys examined are OBJECT record keys.\n"
@@ -291,7 +291,7 @@ PRINT_USAGE:
percent = atof (ptr + 1);
if (percent <= 0.0 || percent > 100.0) {
fprintf (stderr,
catgets (dtsearch_catd, MS_dtsrkdump, 5,
CATGETS(dtsearch_catd, MS_dtsrkdump, 5,
"%s Invalid percent value %lf.\a\n"),
PROGNAME"195", percent);
goto PRINT_USAGE;
@@ -304,7 +304,7 @@ PRINT_USAGE:
do_wordkeys = TRUE;
if ((min_threshold = atol (ptr + 1)) <= 0L) {
fprintf (stderr,
catgets (dtsearch_catd, MS_dtsrkdump, 53,
CATGETS(dtsearch_catd, MS_dtsrkdump, 53,
"%s Invalid threshold value.\a\n"),
PROGNAME"198");
goto PRINT_USAGE;
@@ -314,7 +314,7 @@ PRINT_USAGE:
default:
fprintf (stderr,
catgets (dtsearch_catd, MS_dtsrkdump, 55,
CATGETS(dtsearch_catd, MS_dtsrkdump, 55,
"%s Unknown command line argument '%c'.\a\n"),
PROGNAME"278", *ptr);
goto PRINT_USAGE;
@@ -325,13 +325,13 @@ PRINT_USAGE:
oops = FALSE;
if (argc <= 0) {
printf (catgets (dtsearch_catd, MS_dtsrkdump, 56,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 56,
"%s Missing required database name.\a\n"),
PROGNAME"267");
oops = TRUE;
}
if (!do_wordkeys && !do_objkeys) {
printf (catgets (dtsearch_catd, MS_dtsrkdump, 57,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 57,
"%s Either -o or -w must be specified.\a\n"),
PROGNAME"271");
oops = TRUE;
@@ -359,7 +359,7 @@ PRINT_USAGE:
/* test for valid database name */
i = strlen (ptr);
if (i < 1 || i > 8) {
fprintf (stderr, catgets (dtsearch_catd, MS_dtsrkdump, 58,
fprintf (stderr, CATGETS(dtsearch_catd, MS_dtsrkdump, 58,
"%s Invalid database name '%s'.\a\n"),
PROGNAME"297", ptr);
goto PRINT_USAGE;
@@ -375,7 +375,7 @@ PRINT_USAGE:
}
maxdba = dbrec.or_maxdba;
printf (catgets(dtsearch_catd, MS_dtsrkdump, 60,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 60,
"%s: '%s' reccount=%ld maxdba=%ld recslots=%hd minw=%hd maxw=%hd\n"),
aa_argv0, dbname, dbrec.or_reccount,
dbrec.or_maxdba, dbrec.or_recslots,
@@ -392,7 +392,7 @@ PRINT_USAGE:
if (min_threshold > 1 && min_threshold < dbrec.or_reccount) {
printf (catgets(dtsearch_catd, MS_dtsrkdump, 70,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 70,
"%s Will only list words occurring "
"in %ld or more records.\n"),
aa_argv0, min_threshold);
@@ -400,7 +400,7 @@ PRINT_USAGE:
(float) min_threshold / (float) dbrec.or_reccount > .90;
}
else {
printf (catgets(dtsearch_catd, MS_dtsrkdump, 80,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 80,
"%s: Listing all words in database.\n"),
aa_argv0);
listing_most_words = TRUE;
@@ -445,7 +445,7 @@ PRINT_USAGE:
while (i++ < DtSrMAX_DB_KEYSIZE)
putchar (' ');
printf (catgets(dtsearch_catd, MS_dtsrkdump, 100,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 100,
"dba x%08lx, %6ld\n"), dba, dba);
} /* end verbose */
@@ -471,11 +471,11 @@ PRINT_USAGE:
if (dbpath[0] == 0)
buf[0] = 0;
else
sprintf (buf, catgets(dtsearch_catd, MS_dtsrkdump, 110,
sprintf (buf, CATGETS(dtsearch_catd, MS_dtsrkdump, 110,
" in %s"), dbpath);
printf (catgets(dtsearch_catd, MS_dtsrkdump, 120,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 120,
"Object Summary for '%s'%s:\n"), dbname, buf);
puts (catgets(dtsearch_catd, MS_dtsrkdump, 130,
puts (CATGETS(dtsearch_catd, MS_dtsrkdump, 130,
"Object Count by Keytypes:"));
total = 0L;
for (i = 0; i < 256; i++) {
@@ -487,16 +487,16 @@ PRINT_USAGE:
printf (" x%02x %6ld\n", i, counters[i]);
}
}
printf (catgets(dtsearch_catd, MS_dtsrkdump, 160,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 160,
"TOTAL Objects Count = %ld\n"), total);
printf (catgets(dtsearch_catd, MS_dtsrkdump, 170,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 170,
"Largest Object DBA = %ld\n"), maxdba);
free (counters);
} /* end do_objkeys */
if (do_wordkeys) {
if (listing_most_words)
printf (catgets(dtsearch_catd, MS_dtsrkdump, 180,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 180,
"%s: * Words marked with asterisk occur in every record.\n"),
aa_argv0);
@@ -519,16 +519,16 @@ PRINT_USAGE:
if (dbpath[0] == 0)
buf[0] = 0;
else
sprintf (buf, catgets(dtsearch_catd, MS_dtsrkdump, 110,
sprintf (buf, CATGETS(dtsearch_catd, MS_dtsrkdump, 110,
" in %s"), dbpath);
printf (catgets(dtsearch_catd, MS_dtsrkdump, 200,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 200,
"Words Summary for '%s'%s:\n"), dbname, buf);
total = 0L;
for (i = 0; i < 6; i++) {
printf (word_labels[i], counters[i]);
total += counters[i];
}
printf (catgets(dtsearch_catd, MS_dtsrkdump, 210,
printf (CATGETS(dtsearch_catd, MS_dtsrkdump, 210,
"TOTAL Words Count = %ld\n"), total);
free (counters);
} /* end do_wordkeys */

View File

@@ -225,7 +225,7 @@ static void user_args_processor (int argc, char **argv)
if (argc <= 1) {
PRINT_USAGE:
printf (catgets (dtsearch_catd, MS_cravel, 1,
printf (CATGETS(dtsearch_catd, MS_cravel, 1,
"\nUSAGE: %s -d<dbname> [options] infile\n"
" Listed default file name extensions can be overridden.\n"
" -d<dbname> 1 - 8 char database name, incl optional path prefix.\n"
@@ -261,7 +261,7 @@ PRINT_USAGE:
case 'd': /* (D)ictionary */
/* May include both dicname and dicpath */
if (!segregate_dicname (argptr + 2)) {
printf (catgets (dtsearch_catd, MS_cravel, 246,
printf (CATGETS(dtsearch_catd, MS_cravel, 246,
"\n%s '%s' is invalid path/dictionary name.\n"),
PROGNAME, argptr);
goto PRINT_USAGE;
@@ -286,7 +286,7 @@ PRINT_USAGE:
case 'p':
if ((recs_per_dot = atoi (argptr + 2)) <= 0) {
recs_per_dot = RECS_PER_DOT;
printf (catgets (dtsearch_catd, MS_cravel, 582,
printf (CATGETS(dtsearch_catd, MS_cravel, 582,
"%sIgnored invalid progress dot argument '%s'.\n"),
PROGNAME "582 ", argptr);
}
@@ -300,7 +300,7 @@ PRINT_USAGE:
case 'h':
duprec_hashsize = atol (argptr + 2);
if (duprec_hashsize == 0UL)
printf (catgets (dtsearch_catd, MS_cravel, 13,
printf (CATGETS(dtsearch_catd, MS_cravel, 13,
"%s Duplicate record id checking disabled.\n"),
PROGNAME);
break;
@@ -312,7 +312,7 @@ PRINT_USAGE:
default:
UNKNOWN_ARG:
printf (catgets (dtsearch_catd, MS_cravel, 14,
printf (CATGETS(dtsearch_catd, MS_cravel, 14,
"\n%s Unknown command line argument '%s'.\n"),
PROGNAME, argptr);
} /* endswitch */
@@ -320,7 +320,7 @@ UNKNOWN_ARG:
/* validate input file name */
if (argc <= 0) {
puts (catgets (dtsearch_catd, MS_cravel, 15,
puts (CATGETS(dtsearch_catd, MS_cravel, 15,
"\nMissing required input file name.\a"));
goto PRINT_USAGE;
}
@@ -329,7 +329,7 @@ UNKNOWN_ARG:
/* check for missing database name */
if (dicname[0] == 0) {
puts (catgets (dtsearch_catd, MS_cravel, 16,
puts (CATGETS(dtsearch_catd, MS_cravel, 16,
"\nNo database name specified (-d argument).\a"));
goto PRINT_USAGE;
}
@@ -351,7 +351,7 @@ static void count_all_records (void)
{
char keybuf[DtSrMAX_DB_KEYSIZE + 4];
printf (catgets (dtsearch_catd, MS_cravel, 17,
printf (CATGETS(dtsearch_catd, MS_cravel, 17,
"%s Initializing total record count "
"in database by actually counting...\n"),
PROGNAME);
@@ -388,7 +388,7 @@ static void read_dbrec (void)
{
RECFRST (PROGNAME "285", OR_DBREC, 0); /* seqtl retrieval */
if (db_status != S_OKAY) {
printf (catgets (dtsearch_catd, MS_misc, 13,
printf (CATGETS(dtsearch_catd, MS_misc, 13,
"%sNo DB record in database '%s'.\n"
" The usual cause is failure to initialize "
"the database (run initausd).\n"),
@@ -426,7 +426,7 @@ static void read_dbrec (void)
/* Confirm compatible program-database version numbers */
if (!is_compatible_version (dbrec.or_version, SCHEMA_VERSION)) {
printf (catgets(dtsearch_catd, MS_misc, 14,
printf (CATGETS(dtsearch_catd, MS_misc, 14,
"%s Program schema version '%s' incompatible with "
"database '%s' version '%s'.\n") ,
PROGNAME"245", SCHEMA_VERSION, dicname, dbrec.or_version);
@@ -443,7 +443,7 @@ static void read_dbrec (void)
blobs_are_used = TRUE;
if (!(dbrec.or_compflags & ORC_COMPBLOB)) {
/* = don't compress blobs */
printf (catgets (dtsearch_catd, MS_cravel, 717,
printf (CATGETS(dtsearch_catd, MS_cravel, 717,
"%s Aborting: Uncompressed blobs not yet supported.\n"),
PROGNAME"717");
DtSearchExit (5);
@@ -464,7 +464,7 @@ static void read_dbrec (void)
maxdba = dbrec.or_maxdba;
}
printf (catgets (dtsearch_catd, MS_cravel, 18,
printf (CATGETS(dtsearch_catd, MS_cravel, 18,
"%s: '%s' schema ver = %s, rec count = %ld, last slot = %ld.\n"),
aa_argv0, dicname, dbrec.or_version,
(long)system_reccount, (long)maxdba);
@@ -500,7 +500,7 @@ static void write_dbrec (void)
}
if (db_status != S_OKAY)
vista_abort (PROGNAME "344");
printf (catgets (dtsearch_catd, MS_cravel, 19,
printf (CATGETS(dtsearch_catd, MS_cravel, 19,
"%s: Final database record count = %ld, last slot = %ld.\n"),
aa_argv0, (long)system_reccount, (long)maxdba);
return;
@@ -521,7 +521,7 @@ static void print_progress (void)
if (bytes_in <= 0L)
bytes_in = fstat_input.st_size; /* make final msg "100%" */
TERMINATE_LINE
printf (catgets (dtsearch_catd, MS_cravel, 20,
printf (CATGETS(dtsearch_catd, MS_cravel, 20,
"%s: %ld input records processed in %ldm %lds, (%ld%%).\n"
" %ld duplicates, %ld new, %ld updates.\n"),
aa_argv0,
@@ -545,7 +545,7 @@ static void print_exit_code (int exit_code)
putchar ('\n');
dotcount = 0;
}
printf ( catgets(dtsearch_catd, MS_cravel, 2,
printf ( CATGETS(dtsearch_catd, MS_cravel, 2,
"%s: Exit code = %d\n") ,
aa_argv0, exit_code);
fflush (aa_stderr);
@@ -589,7 +589,7 @@ static int load_next_miscrec (int first_call)
if ((totbytes = dbrec.or_fzkeysz + dbrec.or_abstrsz) <= 0)
return FALSE;
if (dbrec.or_fzkeysz > 0) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_cravel, 522,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_cravel, 522,
"%s This version of %s does not support semantic databases.\n"),
PROGNAME"522", aa_argv0);
DtSearchExit (13);
@@ -638,7 +638,7 @@ static int load_next_miscrec (int first_call)
break;
default:
fprintf (aa_stderr, catgets (dtsearch_catd, MS_misc, 25,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_misc, 25,
"%sAbort due to program error.\n"),
PROGNAME "549 ");
DtSearchExit (54);
@@ -877,16 +877,16 @@ int main (int argc, char *argv[])
/* Init globals */
setlocale (LC_ALL, "");
dtsearch_catd = catopen (FNAME_DTSRCAT, 0);
dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0);
aa_argv0 = argv[0];
time (&starttime);
tmptr = localtime (&starttime);
starttimeobjd = tm2objdate (tmptr);
strftime (linebuf, sizeof (linebuf),
catgets (dtsearch_catd, MS_misc, 22, "%A, %b %d %Y, %I:%M %p"),
CATGETS(dtsearch_catd, MS_misc, 22, "%A, %b %d %Y, %I:%M %p"),
tmptr);
printf (catgets (dtsearch_catd, MS_misc, 23,
printf (CATGETS(dtsearch_catd, MS_misc, 23,
"%s: Version %s. Run %s.\n"),
aa_argv0,
DtSrVERSION,
@@ -919,13 +919,13 @@ int main (int argc, char *argv[])
src = getcwd (linebuf, sizeof (linebuf));
if (!src)
src = getenv ("PWD");
printf (catgets (dtsearch_catd, MS_misc, 24,
printf (CATGETS(dtsearch_catd, MS_misc, 24,
"%s: cwd = '%s', fzkfile = '%s'\n"),
aa_argv0,
(src) ? src : catgets (dtsearch_catd, MS_misc, 6, "<unknown>"),
(src) ? src : CATGETS(dtsearch_catd, MS_misc, 6, "<unknown>"),
fname_input);
if ((infile = fopen (fname_input, "r")) == NULL) {
fprintf (aa_stderr, catgets (dtsearch_catd, MS_misc, 12,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_misc, 12,
"%sUnable to open %s:\n %s\n"),
PROGNAME "326 ", fname_input, strerror (errno));
DtSearchExit (6);
@@ -939,7 +939,7 @@ int main (int argc, char *argv[])
* create correctly sized buffers for them.
*/
if (dbrec.or_fzkeysz > 0) {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_cravel, 522,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_cravel, 522,
"%s This version of %s does not support semantic databases.\n"),
PROGNAME"523", aa_argv0);
DtSearchExit (13);
@@ -950,19 +950,19 @@ int main (int argc, char *argv[])
/* Get input file size for progress msgs */
if (fstat (fileno (infile), &fstat_input) == -1) {
fprintf (aa_stderr, catgets (dtsearch_catd, MS_cravel, 29,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_cravel, 29,
"%s Unable to get status for %s: %s\n"),
PROGNAME"337", fname_input, strerror (errno));
DtSearchExit (10);
}
if (fstat_input.st_size <= 0L) {
fprintf (aa_stderr, catgets (dtsearch_catd, MS_cravel, 30,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_cravel, 30,
"%s File %s is empty.\n"),
PROGNAME"343", fname_input);
DtSearchExit (7);
}
printf (catgets (dtsearch_catd, MS_cravel, 31,
printf (CATGETS(dtsearch_catd, MS_cravel, 31,
"%s: Each dot = %d records processed.\n"),
aa_argv0, recs_per_dot);
@@ -1016,7 +1016,7 @@ int main (int argc, char *argv[])
if (shutdown_now) {
TERMINATE_LINE
printf (catgets (dtsearch_catd, MS_misc, 15,
printf (CATGETS(dtsearch_catd, MS_misc, 15,
"%sReceived abort signal %d.\n"),
PROGNAME"373 ", shutdown_now);
write_dbrec (); /* at least update reccount and maxdba */
@@ -1040,7 +1040,7 @@ int main (int argc, char *argv[])
INVALID_FORMAT:
normal_exitcode = EXIT_WARNING;
TERMINATE_LINE
printf (catgets (dtsearch_catd, MS_cravel, 579,
printf (CATGETS(dtsearch_catd, MS_cravel, 579,
"%s Discarded rec #%ld: Invalid .fzk file format.\n"),
cptr, input_reccount);
if (strcmp (linebuf, parg.etxdelim) != 0)
@@ -1081,7 +1081,7 @@ int main (int argc, char *argv[])
if (strlen (db_key) > DtSrMAX_DB_KEYSIZE - 1) {
normal_exitcode = EXIT_WARNING;
TERMINATE_LINE
printf (catgets (dtsearch_catd, MS_cravel, 33,
printf (CATGETS(dtsearch_catd, MS_cravel, 33,
"%s Discarded rec #%ld: Key too long:\n '%s'.\n"),
PROGNAME"606", input_reccount, db_key);
discard_to_ETX (&parg);
@@ -1090,7 +1090,7 @@ int main (int argc, char *argv[])
if (!isalnum (db_key[0])) {
normal_exitcode = EXIT_WARNING;
TERMINATE_LINE
printf (catgets (dtsearch_catd, MS_cravel, 927,
printf (CATGETS(dtsearch_catd, MS_cravel, 927,
"%s Discarded rec #%ld: First char (keytype) of key\n"
" '%s' is not alphanumeric.\n"),
PROGNAME"927", input_reccount, db_key);
@@ -1102,7 +1102,7 @@ int main (int argc, char *argv[])
i = is_duprec (db_key);
if (i == 2) {
TERMINATE_LINE
printf (catgets (dtsearch_catd, MS_cravel, 34,
printf (CATGETS(dtsearch_catd, MS_cravel, 34,
"%s Out of Memory! "
"Set -h arg to a smaller number,\n"
" or reduce the number of input records.\n"),
@@ -1112,7 +1112,7 @@ int main (int argc, char *argv[])
else if (i == 1) { /* skip duplicate record id */
normal_exitcode = EXIT_WARNING;
TERMINATE_LINE
printf (catgets (dtsearch_catd, MS_cravel, 35,
printf (CATGETS(dtsearch_catd, MS_cravel, 35,
"%s: Discarded duplicate rec #%ld '%s'.\n"),
aa_argv0, input_reccount, db_key);
duplicate_recids++;
@@ -1157,7 +1157,7 @@ int main (int argc, char *argv[])
goto INVALID_FORMAT;
}
TERMINATE_LINE
printf (catgets (dtsearch_catd, MS_cravel, 1086,
printf (CATGETS(dtsearch_catd, MS_cravel, 1086,
"%s Record '%s' has invalid date format--"
"using run date.\n"),
PROGNAME"1086", uniqkey);
@@ -1202,7 +1202,7 @@ int main (int argc, char *argv[])
gen_vec (fname_huffcode_tab);
if (dbrec_hufid != gen_vec_hufid && dbrec_hufid != -1L) {
TERMINATE_LINE
printf (catgets (dtsearch_catd, MS_cravel, 1153,
printf (CATGETS(dtsearch_catd, MS_cravel, 1153,
"%s Current data compression table id"
" in '%s' is %ld.\n"
" Database '%s' previously compressed"
@@ -1223,7 +1223,7 @@ int main (int argc, char *argv[])
if ((linebuf[0] = readchar_ftext (&parg)) == 0) {
normal_exitcode = EXIT_WARNING;
TERMINATE_LINE
printf ( catgets(dtsearch_catd, MS_cravel, 1215,
printf ( CATGETS(dtsearch_catd, MS_cravel, 1215,
"%s Warning. Record '%s' has no text.\n"),
PROGNAME"1215" , uniqkey);
continue;
@@ -1273,7 +1273,7 @@ int main (int argc, char *argv[])
*/
if (created_reccount <= 0L && updated_reccount <= 0L) {
normal_exitcode = EXIT_VANISH;
fprintf (stderr, catgets (dtsearch_catd, MS_cravel, 1048,
fprintf (stderr, CATGETS(dtsearch_catd, MS_cravel, 1048,
"%sDatabase objects not changed because input "
"file effectively empty.\n"),
PROGNAME "1048 ");

View File

@@ -266,14 +266,14 @@ static int build_tree (void)
* tree level, quit.
*/
if (hctree1[i].sort > MAX_BITLEN) {
fprintf (stderr, "%s", catgets(dtsearch_catd, MS_huff, 30,
fprintf (stderr, "%s", CATGETS(dtsearch_catd, MS_huff, 30,
"\n183 Bit strings have grown too large. You probably "
"have literals\n turned off with grossly unbalanced "
"character counts.\n\7"));
exit (2);
}
if (hctree1[curr].count >= total_count) {
fprintf (stderr, "%s", catgets(dtsearch_catd, MS_huff, 31,
fprintf (stderr, "%s", CATGETS(dtsearch_catd, MS_huff, 31,
"\n191 Programming Error: Still trying to build\n"
" Huffman Code Tree after root created.\n\7"));
exit (2);
@@ -391,7 +391,7 @@ static char *char_label (int x)
return buf;
}
else if (x >= 128) {
snprintf(buf, sizeof(buf), "%s", catgets(dtsearch_catd, MS_huff, 32,
snprintf(buf, sizeof(buf), "%s", CATGETS(dtsearch_catd, MS_huff, 32,
"(nonascii char, high bit set)"));
return buf;
}
@@ -476,7 +476,7 @@ static void init_treebase (void)
!= NULL) {
i = atoi (strtok (filebuf, DELIMITERS)); /* char */
if (i < 0 || i > 256) {
fprintf (stderr, catgets(dtsearch_catd, MS_huff, 33,
fprintf (stderr, CATGETS(dtsearch_catd, MS_huff, 33,
"366 Invalid file format for %s.\n"),
filename_huf);
exit (2);
@@ -534,13 +534,13 @@ static void huffman_code (time_t idstamp)
* Open both output files and verify they are not write protected.
*/
if ((outstream_huc = fopen (filename_huc, "w")) == NULL) {
fprintf (stderr, catgets(dtsearch_catd, MS_huff, 34,
fprintf (stderr, CATGETS(dtsearch_catd, MS_huff, 34,
"424 File '%s' failed to open for write. Is it read-only?\n"),
filename_huc);
exit (2);
}
if ((outstream_huf = fopen (filename_huf, "w")) == NULL) {
fprintf (stderr, catgets(dtsearch_catd, MS_huff, 34,
fprintf (stderr, CATGETS(dtsearch_catd, MS_huff, 34,
"439 File '%s' failed to open for write. Is it read-only?\n"),
filename_huf);
exit (2);
@@ -602,7 +602,7 @@ static void huffman_code (time_t idstamp)
/****************************************/
static void print_usage (void)
{
fprintf (stderr, catgets(dtsearch_catd, MS_huff, 35,
fprintf (stderr, CATGETS(dtsearch_catd, MS_huff, 35,
"USAGE: huffcode [-lN | -l-] [-o] <huffname> [<infile>]\n"
" -l<N> specifies the 'literal' threshold count. Any character occurring\n"
" <= <N> times will be coded with the Huffman literal. Default is -l0,\n"
@@ -663,7 +663,7 @@ static void user_args_processor (int argc, char **argv)
BADARG:
default:
fprintf (stderr, catgets(dtsearch_catd, MS_huff, 36,
fprintf (stderr, CATGETS(dtsearch_catd, MS_huff, 36,
"'%s' is invalid argument.\n"), argptr);
print_usage ();
exit (2); /* ABORT program */
@@ -673,7 +673,7 @@ static void user_args_processor (int argc, char **argv)
/* test for required tree file name */
if (argc <= 0) {
fprintf (stderr, "%s", catgets(dtsearch_catd, MS_huff, 37,
fprintf (stderr, "%s", CATGETS(dtsearch_catd, MS_huff, 37,
"576 Missing Huffman Code file names prefix.\n"));
print_usage ();
exit (2);
@@ -695,7 +695,7 @@ static void user_args_processor (int argc, char **argv)
if (!OK_to_overwrite)
if ((stream = fopen (filename_huc, "r")) != NULL) {
fclose (stream);
printf (catgets(dtsearch_catd, MS_huff, 38,
printf (CATGETS(dtsearch_catd, MS_huff, 38,
"Decode file '%s' already exists. "
"Is it OK to overwrite it? [y/n] "),
filename_huc);
@@ -729,8 +729,8 @@ int main (int argc, char *argv[])
time_t now, start_stamp;
setlocale (LC_ALL, "");
dtsearch_catd = catopen (FNAME_DTSRCAT, 0);
printf (catgets(dtsearch_catd, MS_huff, 40,
dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0);
printf (CATGETS(dtsearch_catd, MS_huff, 40,
"HUFFCODE Version %s\n"), AUSAPI_VERSION);
/* validate user's command line arguments */
@@ -739,15 +739,15 @@ int main (int argc, char *argv[])
/* initialize tree table, using the table file if it exists */
init_treebase ();
if (total_count == 0L)
printf ("%s", catgets(dtsearch_catd, MS_huff, 41,
printf ("%s", CATGETS(dtsearch_catd, MS_huff, 41,
"Huffman Code Tables will be newly created.\n"));
else
printf (catgets(dtsearch_catd, MS_huff, 42,
printf (CATGETS(dtsearch_catd, MS_huff, 42,
"Table '%s' already contains %ld Kbytes from previous runs.\n"),
filename_huf, total_count / 1000L);
if (!input_file_specified && no_huffcode_file) {
fprintf (stderr, catgets(dtsearch_catd, MS_huff, 43,
fprintf (stderr, CATGETS(dtsearch_catd, MS_huff, 43,
"645 Input file not specified and '%s' table file\n"
" doesn't exist--nothing to do!\n"),
filename_huf);
@@ -759,14 +759,14 @@ int main (int argc, char *argv[])
if (input_file_specified) {
if ((instream = fopen (filename_input, "rb")) == NULL) {
BAD_INPUT_FILE:
fprintf (stderr, catgets(dtsearch_catd, MS_huff, 44,
fprintf (stderr, CATGETS(dtsearch_catd, MS_huff, 44,
"Could not open input file '%s' or access status: %s\n"),
filename_input, strerror (errno));
exit (2);
}
if (fstat (fileno (instream), &fstat_input) == -1)
goto BAD_INPUT_FILE;
printf (catgets(dtsearch_catd, MS_huff, 45,
printf (CATGETS(dtsearch_catd, MS_huff, 45,
"Input file '%s' contains about %ld Kbytes.\n"),
filename_input, fstat_input.st_size / 1000L);
@@ -777,7 +777,7 @@ int main (int argc, char *argv[])
/* echo progress to user every so often */
if (!(++bytes_in % 10000L))
printf (catgets(dtsearch_catd, MS_huff, 46,
printf (CATGETS(dtsearch_catd, MS_huff, 46,
"\r%ld%% done. %2ld Kbytes read. "
"Estimate %3ld seconds to completion. "),
(bytes_in * 100L) / fstat_input.st_size,
@@ -793,13 +793,13 @@ int main (int argc, char *argv[])
/* build huffman code tree, write out files */
time (&now); /* this will be the official tree id time
* stamp */
printf (catgets(dtsearch_catd, MS_huff, 47,
printf (CATGETS(dtsearch_catd, MS_huff, 47,
"Identifying timestamp will be '%ld'.\n"
"%s Huffman Code Tables in '%s' and '%s'..."),
now,
(no_huffcode_file) ?
catgets(dtsearch_catd, MS_huff, 48, "Creating") :
catgets(dtsearch_catd, MS_huff, 49, "Rebuilding"),
CATGETS(dtsearch_catd, MS_huff, 48, "Creating") :
CATGETS(dtsearch_catd, MS_huff, 49, "Rebuilding"),
filename_huf,
filename_huc);
huffman_code (now);

View File

@@ -126,7 +126,7 @@ char parsed_recid [2048];
/* Called from inside DtSearchExit() at austext_exit_last */
static void print_exit_code (int exit_code)
{
printf ( catgets(dtsearch_catd, MS_tomita, 3,
printf ( CATGETS(dtsearch_catd, MS_tomita, 3,
"%s: Exit Code = %d.\n") ,
aa_argv0, exit_code);
return;
@@ -145,7 +145,7 @@ static void print_exit_code (int exit_code)
static void kill_delete (int sig)
{
shutdown_now = TRUE;
printf ( catgets(dtsearch_catd, MS_tomita, 1,
printf ( CATGETS(dtsearch_catd, MS_tomita, 1,
"\n%s Received interrupt %d.\n"
" Program will stop after current batch of deletions.\n") ,
PROGNAME"069", sig);
@@ -190,14 +190,14 @@ static int change_database (char *newname)
/* Invalid newname. If deleting, just say which database is invalid. */
retncode = 1;
fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 4,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 4,
"%s Database '%s' not found.\n") ,
PROGNAME"114", newname);
if (prog == 'D')
return FALSE;
/* If browsing, tell user his options */
fprintf (aa_stderr, "%s", catgets(dtsearch_catd, MS_tomita, 5,
fprintf (aa_stderr, "%s", CATGETS(dtsearch_catd, MS_tomita, 5,
"Available choices are:") );
for (db = usrblk.dblist; db != NULL; db = db->link)
fprintf (aa_stderr, " '%s'", db->name);
@@ -233,7 +233,7 @@ static int parse_infbuf (char *infbuf)
/* Parse first token (database name) */
if ((ptr = strtok (mybuf, " \t")) == NULL) {
/* Msg #8 is used in two places */
fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 8,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 8,
"%s Invalid input format: %.30s...\n") ,
PROGNAME"152", infbuf);
retncode = 1;
@@ -259,7 +259,7 @@ static int parse_infbuf (char *infbuf)
ptr = strtok (ptr, (*ptr == '\"') ? "\"" : " \t");
if (ptr == NULL) {
/* Msg #8 is used in two places */
fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 8,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 8,
"%s Invalid input format: %.30s...\n") ,
PROGNAME"176", infbuf);
retncode = 1;
@@ -306,7 +306,7 @@ static int browser (void)
}
/* Write main menu prompt */
printf ( catgets(dtsearch_catd, MS_tomita, 10,
printf ( CATGETS(dtsearch_catd, MS_tomita, 10,
"\n---------- SHOW NEXT RECORD ----------- Database = '%s'\n"
"q QUIT. Current Record Count = %ld\n"
"p Toggle PAUSE from %s.\n"
@@ -352,7 +352,7 @@ static int browser (void)
case 'r':
if (usrblk.objrec.or_objkey[0] == 0) {
fprintf (aa_stderr,
catgets(dtsearch_catd, MS_tomita, 11,
CATGETS(dtsearch_catd, MS_tomita, 11,
"%s Record buffer empty.\n"),
PROGNAME"267");
continue;
@@ -369,7 +369,7 @@ static int browser (void)
case 'n':
if (inf == NULL) {
fprintf (aa_stderr,
catgets(dtsearch_catd, MS_tomita, 12,
CATGETS(dtsearch_catd, MS_tomita, 12,
"%s Input file unavailable.\n"),
PROGNAME"282");
continue;
@@ -378,7 +378,7 @@ static int browser (void)
if ((fgets (infbuf, sizeof (infbuf), inf)) == NULL)
{
fprintf (aa_stderr,
catgets(dtsearch_catd, MS_tomita, 13,
CATGETS(dtsearch_catd, MS_tomita, 13,
"%s No more records in input file.\n"),
PROGNAME"288");
fclose (inf);
@@ -400,7 +400,7 @@ static int browser (void)
ptr = strtok (userbuf, "\"");
if (ptr == NULL || *ptr == 0) {
fprintf (aa_stderr,
catgets(dtsearch_catd, MS_tomita, 14,
CATGETS(dtsearch_catd, MS_tomita, 14,
"%s Invalid Record ID.\n"),
PROGNAME"303");
continue;
@@ -417,13 +417,13 @@ static int browser (void)
*/
fprintf (outf, DISCARD_FORMAT, usrblk.dblk->name,
usrblk.objrec.or_objkey, usrblk.userid, datestr);
printf ( catgets(dtsearch_catd, MS_tomita, 15,
printf ( CATGETS(dtsearch_catd, MS_tomita, 15,
"%s '%s' appended to file of confirmed deletions.\n") ,
PROGNAME"317", usrblk.objrec.or_objkey);
continue;
default:
printf ("%s", catgets(dtsearch_catd, MS_tomita, 16, "...what?\n"));
printf ("%s", CATGETS(dtsearch_catd, MS_tomita, 16, "...what?\n"));
continue;
} /* end switch */
@@ -439,7 +439,7 @@ static int browser (void)
* address
*/
if (usrblk.retncode == OE_WRAPPED)
fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 17,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 17,
"%s %s Engine wrapped to next record.\n") ,
PROGNAME"333", OE_prodname);
else if (usrblk.retncode != OE_OK)
@@ -453,14 +453,14 @@ static int browser (void)
DISPLAY_RECORD:
/* display the record's cleartext, character by character */
printf ( catgets(dtsearch_catd, MS_tomita, 18,
printf ( CATGETS(dtsearch_catd, MS_tomita, 18,
"\n\n"
"Record: '%s'\n"
"Abstract: '%s'\n"
"--------------------------------------\n") ,
usrblk.objrec.or_objkey,
(usrblk.abstrbufsz > 0) ? usrblk.abstrbuf :
catgets (dtsearch_catd, MS_misc, 1, "<null>"));
CATGETS(dtsearch_catd, MS_misc, 1, "<null>"));
pause_counter = 0;
for (ptr = usrblk.cleartext; *ptr != 0; ptr++) {
@@ -472,7 +472,7 @@ DISPLAY_RECORD:
if (pausing && *ptr == '\n') {
if (++pause_counter >= PAUSE_ROWS) {
/* Msg 21 is used in two places */
printf ( "%s", catgets(dtsearch_catd, MS_tomita, 21,
printf ( "%s", CATGETS(dtsearch_catd, MS_tomita, 21,
"\n...push ENTER to continue... ") );
*userbuf = '\0';
@@ -491,7 +491,7 @@ DISPLAY_RECORD:
/* display the user notes if any, character by character */
if (usrblk.notes != NULL) {
printf ( catgets(dtsearch_catd, MS_tomita, 20,
printf ( CATGETS(dtsearch_catd, MS_tomita, 20,
"--------------------------------------\n"
"End of Text Blob for '%s':\n\n"
"User Notes:\n"
@@ -504,7 +504,7 @@ DISPLAY_RECORD:
if (pausing && *ptr == '\n')
if (++pause_counter >= PAUSE_ROWS) {
/* Msg 21 is used in two places */
printf ( "%s", catgets(dtsearch_catd, MS_tomita, 21,
printf ( "%s", CATGETS(dtsearch_catd, MS_tomita, 21,
"\n...push ENTER to continue... ") );
*userbuf = '\0';
@@ -633,7 +633,7 @@ KEEP_READING:
first_err = FALSE;
fputc ('\n', aa_stderr);
}
fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 24,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 24,
"%s Database %s, '%s' not found.\n") ,
PROGNAME"482", parsed_dbname, parsed_recid);
continue;
@@ -676,7 +676,7 @@ static void deleter (char *infname)
char buf[128];
if (!yesarg) {
printf ( catgets(dtsearch_catd, MS_tomita, 25,
printf ( CATGETS(dtsearch_catd, MS_tomita, 25,
"\nDO NOT CONTINUE under any of the following circumstances:\n"
"-> If the input file which lists record ids to be deleted is not\n"
" named '%s'.\n"
@@ -738,7 +738,7 @@ static void deleter (char *infname)
seconds = elapsed - (3600L * hours); /* remaining after hours */
minutes = seconds / 60L;
seconds = seconds - (60L * minutes);
printf ( catgets(dtsearch_catd, MS_tomita, 26,
printf ( CATGETS(dtsearch_catd, MS_tomita, 26,
"%s %ld read, %ld deleted, %ldh %2ldm %2lds elapsed.\n"
" Database '%s': Current record count = %ld, Batch size = %d.\n") ,
aa_argv0, records_read, records_deleted,
@@ -768,7 +768,7 @@ static void deleter (char *infname)
minutes = seconds / 60L;
seconds = seconds - (60L * minutes); /* remaining after hours
* & mins */
printf ( catgets(dtsearch_catd, MS_tomita, 27,
printf ( CATGETS(dtsearch_catd, MS_tomita, 27,
"%s %ld records read from input file. %ld were deleted and\n"
" %ld were not found in %ld hours, %ld minutes, %ld seconds,\n") ,
aa_argv0, records_read, records_deleted,
@@ -779,7 +779,7 @@ static void deleter (char *infname)
elapsed = (records_deleted) ? elapsed / records_deleted : 0L;
minutes = elapsed / 60L;
seconds = elapsed - (60L * minutes);
printf ( catgets(dtsearch_catd, MS_tomita, 28,
printf ( CATGETS(dtsearch_catd, MS_tomita, 28,
" or an average of %ld minutes, %ld seconds per record deleted.\n"),
minutes, seconds);
return;
@@ -799,12 +799,12 @@ int main (int argc, char *argv[])
aa_argv0 = argv[0];
setlocale (LC_ALL, "");
dtsearch_catd = catopen (FNAME_DTSRCAT, 0);
dtsearch_catd = CATOPEN(FNAME_DTSRCAT, 0);
time (&mytime);
strftime (timebuf, sizeof (timebuf),
catgets(dtsearch_catd, MS_misc, 22, "%A, %b %d %Y, %I:%M %p"),
CATGETS(dtsearch_catd, MS_misc, 22, "%A, %b %d %Y, %I:%M %p"),
localtime (&mytime));
printf (catgets(dtsearch_catd, MS_tomita, 29,
printf (CATGETS(dtsearch_catd, MS_tomita, 29,
"%s. Run %s.\n") ,
aa_argv0, timebuf);
austext_exit_last = print_exit_code;
@@ -816,7 +816,7 @@ int main (int argc, char *argv[])
/* Validate program number argument */
if (argc < 2) {
BAD_ARGS:
fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 30,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 30,
"\nUSAGE: %s [options]\n"
" -i Input file name. If not specified, defaults to %s.\n"
" -d[v] Print debug statements.\n"
@@ -877,7 +877,7 @@ BAD_ARGS:
break;
default:
fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 31,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 31,
"\n%s Unknown argument '%s'.\n") ,
PROGNAME"689", arg);
goto BAD_ARGS;
@@ -891,7 +891,7 @@ BAD_ARGS:
*/
if ((inf = fopen (infname, "r")) == NULL) {
if (prog == 'D') {
fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 32,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 32,
"%s Unable to open input file '%s'.\n") ,
PROGNAME"710", infname);
goto BAD_ARGS;
@@ -905,7 +905,7 @@ BAD_ARGS:
if ((outf = fopen (outfname, "a ")) == NULL)
/* the blank in "a " works around old aix bug */
{
fprintf (aa_stderr, catgets(dtsearch_catd, MS_tomita, 33,
fprintf (aa_stderr, CATGETS(dtsearch_catd, MS_tomita, 33,
"\n%s Unable to open output file '%s'.\n") ,
PROGNAME"721", outfname);
goto BAD_ARGS;
@@ -913,7 +913,7 @@ BAD_ARGS:
}
/* Initialize the opera engine, i.e. open the database */
printf ( catgets(dtsearch_catd, MS_tomita, 34,
printf ( CATGETS(dtsearch_catd, MS_tomita, 34,
"Initializing %s engine...\n"),
OE_prodname);
strcpy (usrblk.userid, "ToMiTa");
@@ -931,7 +931,7 @@ BAD_ARGS:
usrblk.request = OE_SHUTDOWN;
Opera_Engine ();
printf ( "%s", catgets(dtsearch_catd, MS_tomita, 36,
printf ( "%s", CATGETS(dtsearch_catd, MS_tomita, 36,
"Normal engine shutdown.\n") );
DtSearchExit (0);
} /* main() */