Merge branch 'master' into dtdocbook

This commit is contained in:
Liang Chang
2022-01-30 08:04:32 +08:00
285 changed files with 778 additions and 838 deletions

View File

@@ -13,18 +13,6 @@ MsgCat.c: ${top_srcdir}/lib/DtSvc/DtUtil2/MsgCat.c
$(RM) MsgCat.c && ln -s ${top_srcdir}/lib/DtSvc/DtUtil2/MsgCat.c MsgCat.c
if I386
AM_CFLAGS += -DBYTE_SWAP
endif
if X86_64
AM_CFLAGS += -DBYTE_SWAP
endif
if ARM
AM_CFLAGS += -DBYTE_SWAP
endif
LDADD = ../../lib/DtSearch/libDtSearch.la
dtsrcreate_SOURCES = dtsrcreate.c MsgCat.c

View File

@@ -737,10 +737,9 @@ static void copy_new_d99 (long keyfield)
* dbrec offset.
*/
if (validation_mode) {
#ifdef BYTE_SWAP
for (swapx = 0; swapx < num_reads; swapx++)
NTOHL (word_addrs[swapx]);
#endif
/* set x to number of good addrs in this block */
if (good_addrs_left > num_reads) {
x = num_reads;
@@ -868,10 +867,9 @@ static void copy_new_d99 (long keyfield)
* dba loop for this word.
*/
if (good_addrs_this_block > 0) {
#ifdef BYTE_SWAP
for (swapx = 0; swapx < good_addrs_this_block; swapx++)
NTOHL (word_addrs_out[swapx]);
#endif
num_writes = fwrite (word_addrs_out, sizeof (DB_ADDR),
(size_t)good_addrs_this_block, fp_d99_new);
if (num_writes != good_addrs_this_block)

View File

@@ -561,14 +561,14 @@ void process_profile (void)
int line_num = 0;
int i;
char *tok;
struct line_id *line_current;
struct field_id *field_current;
struct line_id *line_current = NULL;
struct field_id *field_current = NULL;
struct key_id *key_current;
struct date_id *date_current;
struct key_id *abstract_current;
struct finclude *finclude_current;
struct include *include_current;
struct include *i_i_current;
struct key_id *abstract_current = NULL;
struct finclude *finclude_current = NULL;
struct include *include_current = NULL;
struct include *i_i_current = NULL;
int found;
int tok_type;
@@ -2052,7 +2052,7 @@ void process_infile (void)
{
int line_num = 0;
struct line_id *line_current;
struct rec *record;
struct rec *record = NULL;
char buffer[200];
int cant_be;
time_t startime = 0L;

View File

@@ -111,7 +111,8 @@
* 2.1.5b cborodin bug. Segfault due to overflowing bitvector
* after many deletions and no mrclean.
*/
#include "SearchP.h"
#include <cde_config.h>
#include <Dt/SearchP.h>
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
@@ -801,13 +802,11 @@ static void put_addrs_2_dtbs_addr_file (
**** num addrs in database by 1 (!?) ******/
/* (...only if prev 'overlay/compression' didn't delete all) */
#ifdef BYTE_SWAP
/* Put both arrays in 'network' byte order */
for (int32 = 0; int32 < nitems; int32++)
HTONL (addrs_array[int32]);
for (int32 = 0; int32 < num_addrs; int32++)
HTONL (word_addrs_ii[int32]);
#endif
/* Put both arrays in 'network' byte order */
for (int32 = 0; int32 < nitems; int32++)
HTONL (addrs_array[int32]);
for (int32 = 0; int32 < num_addrs; int32++)
HTONL (word_addrs_ii[int32]);
/*
* If number of new addresses greater than number of free holes,
@@ -921,7 +920,7 @@ void write_2_dtbs_addr_file (void)
{
DtSrINT32 num_addrs_ii;
DtSrINT32 num_reads;
DtSrINT32 i_start, k, cur_ind;
DtSrINT32 i_start, k, cur_ind = 0;
DtSrINT32 num_delete_addrs = 0;
char addrs_removed = FALSE;
DtSrINT32 i;
@@ -966,11 +965,10 @@ void write_2_dtbs_addr_file (void)
(long)got_word.or_hwoffset, (long)num_reads);
DtSearchExit (98);
}
#ifdef BYTE_SWAP
for (i = 0; i < num_addrs_ii; i++)
NTOHL (word_addrs_ii[i]);
/* Now both addr arrays are in 'host' byte swap order */
#endif
/* If there are only new docs,
* this switch will prevent the checking for updates.
@@ -1116,11 +1114,11 @@ void write_new_word_2_dtbs (void)
(long)record_addr_word[int32] & 0xffL);
}
}
#ifdef BYTE_SWAP
/* Put addr array in 'network' byte order */
for (int32 = 0; int32 < num_addrs_for_word; int32++)
HTONL (record_addr_word[int32]);
#endif
/* Put addr array in 'network' byte order */
for (int32 = 0; int32 < num_addrs_for_word; int32++)
HTONL (record_addr_word[int32]);
num_writes = fwrite (record_addr_word, sizeof(DB_ADDR),
(size_t)num_addrs_for_word, dtbs_addr_fp);
if (num_writes != num_addrs_for_word)

View File

@@ -103,7 +103,7 @@ static struct or_dbrec
/****************************************/
void count_words (int index)
{
long vista_field;
long vista_field = 0;
UCHAR *ptr;
DtSrINT32 offset, free, addrs;
int tabstop;