From 86b9a0fee492842a0eb59c6214ff4b359483b854 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Fri, 29 Jun 2018 01:04:55 +0100 Subject: [PATCH] libDtSearch: remove NO_COUNTRY code which is always off for CDE --- cde/lib/DtSearch/raima/dblfcns.c | 4 ---- cde/lib/DtSearch/raima/dbtype.h | 5 +---- cde/lib/DtSearch/raima/dbxtrn.h | 2 -- cde/lib/DtSearch/raima/dproto.h | 2 -- cde/lib/DtSearch/raima/dtcover.h | 2 -- cde/lib/DtSearch/raima/libfcns.c | 6 ------ cde/lib/DtSearch/raima/mapchar.c | 2 -- cde/lib/DtSearch/raima/options.c | 4 ---- cde/lib/DtSearch/raima/pathfcns.c | 2 -- cde/lib/DtSearch/raima/task.h | 2 -- 10 files changed, 1 insertion(+), 30 deletions(-) diff --git a/cde/lib/DtSearch/raima/dblfcns.c b/cde/lib/DtSearch/raima/dblfcns.c index 1de487ec..f590ccc8 100644 --- a/cde/lib/DtSearch/raima/dblfcns.c +++ b/cde/lib/DtSearch/raima/dblfcns.c @@ -227,12 +227,10 @@ TASK_DECL #ifdef MIKER /**@@@***/ -#ifndef NO_COUNTRY /* initialize the country table if "vista.ctb" exists */ if ( ctb_init() != S_OKAY ) RETURN( db_status ); #endif -#endif /* initialize multi-db tables */ @@ -395,12 +393,10 @@ TASK_DECL } #ifdef MIKER /**@@@***/ -#ifndef NO_COUNTRY /* free the country table */ if ( db_global.ctbl_activ ) ctbl_free(); #endif -#endif /* termfree(); key_close(); diff --git a/cde/lib/DtSearch/raima/dbtype.h b/cde/lib/DtSearch/raima/dbtype.h index fa70887f..ba9e0dcf 100644 --- a/cde/lib/DtSearch/raima/dbtype.h +++ b/cde/lib/DtSearch/raima/dbtype.h @@ -358,7 +358,7 @@ typedef struct RN_ENTRY_S { #define TASK_PTR_DECL /**/ #define TASK_DBN_ONLY DBN_ONLY -#ifndef NO_COUNTRY + /* Country code table definition */ typedef struct CNTRY_TBL_S { unsigned char out_chr; @@ -366,7 +366,6 @@ typedef struct CNTRY_TBL_S { unsigned char sort_as2; unsigned char sub_sort; } CNTRY_TBL; -#endif /* names lists structure declaration */ typedef struct OBJNAMES_S { @@ -415,9 +414,7 @@ typedef struct {struct PGZERO_S *ptr; LOCK_DESC} PGZERO_P; typedef struct {struct RI_ENTRY_S *ptr; LOCK_DESC} RI_ENTRY_P; typedef struct {ULONG *ptr; LOCK_DESC} ULONG_P; typedef struct {LONG *ptr; LOCK_DESC} LONG_P; -#ifndef NO_COUNTRY typedef struct {struct CNTRY_TBL_S *ptr; LOCK_DESC} CNTRY_TBL_P; -#endif struct sk { INT sk_fld; CHAR_P sk_val; diff --git a/cde/lib/DtSearch/raima/dbxtrn.h b/cde/lib/DtSearch/raima/dbxtrn.h index f6b1ea43..8ab04110 100644 --- a/cde/lib/DtSearch/raima/dbxtrn.h +++ b/cde/lib/DtSearch/raima/dbxtrn.h @@ -123,11 +123,9 @@ typedef struct TASK_S { int Lock_lvl; #define LOCK_STACK_SIZE 10 int Lock_stack[LOCK_STACK_SIZE]; -#ifndef NO_COUNTRY CNTRY_TBL_P country_tbl; int ctbl_activ; char ctbpath[FILENMLEN]; -#endif llist Sk_list; } TASK; diff --git a/cde/lib/DtSearch/raima/dproto.h b/cde/lib/DtSearch/raima/dproto.h index 7e5d34cc..0fd71569 100644 --- a/cde/lib/DtSearch/raima/dproto.h +++ b/cde/lib/DtSearch/raima/dproto.h @@ -205,9 +205,7 @@ int d_csoread(P1(int) Pi(long) Pi(char *) DBN_Dn); int d_csoset(P1(int) Pi(DB_ADDR *) DBN_Dn); /* csoset.c */ int d_csowrite(P1(int) Pi(long) Pi(const char *) DBN_Dn); /* csowrite.c */ -#ifndef NO_COUNTRY int d_ctbpath(P1(const char *)); /* pathfcns.c */ -#endif /* NO_COUNTRY */ int d_dbdpath(P1(const char *)); /* dbdpath.c */ int d_dbfpath(P1(const char *)); /* dbfpath.c */ int d_dblog(P1(const char *)); /* dblog.c */ diff --git a/cde/lib/DtSearch/raima/dtcover.h b/cde/lib/DtSearch/raima/dtcover.h index 15f05ada..f28a25a3 100644 --- a/cde/lib/DtSearch/raima/dtcover.h +++ b/cde/lib/DtSearch/raima/dtcover.h @@ -60,9 +60,7 @@ #define d_csoread dt_csoread #define d_csoset dt_csoset #define d_csowrite dt_csowrite -#ifndef NO_COUNTRY #define d_ctbpath dt_ctbpath -#endif #define d_dbdpath dt_dbdpath #define d_dbfpath dt_dbfpath #define d_dblog dt_dblog diff --git a/cde/lib/DtSearch/raima/libfcns.c b/cde/lib/DtSearch/raima/libfcns.c index a335981c..c19c6ed5 100644 --- a/cde/lib/DtSearch/raima/libfcns.c +++ b/cde/lib/DtSearch/raima/libfcns.c @@ -214,12 +214,8 @@ const char *f2; /* pointer to field 2 */ return ( bytecmp(f1, f2, len) ); else if ( fld_ptr->fd_dim[0] ) { -#ifdef NO_COUNTRY - return ( strncmp(f1, f2, len) ); -#else if ( db_global.ctbl_activ ) return ( ctblcmp(f1, f2, len) ); else return ( strncmp(f1, f2, len) ); -#endif } else return ( (int)(*f1) - (int)(*f2) ); @@ -403,7 +399,6 @@ DB_ADDR dba; return( db_status ); } -#ifndef NO_COUNTRY /* Compare two strings with sorting according to char-table */ static int ctblcmp(s, t, n) @@ -465,5 +460,4 @@ int n; /* Max. String length */ } return(0); } -#endif /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin libfcns.c */ diff --git a/cde/lib/DtSearch/raima/mapchar.c b/cde/lib/DtSearch/raima/mapchar.c index 50b8cf84..f009b110 100644 --- a/cde/lib/DtSearch/raima/mapchar.c +++ b/cde/lib/DtSearch/raima/mapchar.c @@ -35,7 +35,6 @@ * * OBJECT CODE ONLY SOURCE MATERIALS */ -#ifndef NO_COUNTRY /*----------------------------------------------------------------------- mapchar.c -- db_VISTA character map module. @@ -203,5 +202,4 @@ void ctbl_free() db_global.ctbl_activ = FALSE; } -#endif /* NO_COUNTRY */ /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin mapchar.c */ diff --git a/cde/lib/DtSearch/raima/options.c b/cde/lib/DtSearch/raima/options.c index 02418aea..20ba7c40 100644 --- a/cde/lib/DtSearch/raima/options.c +++ b/cde/lib/DtSearch/raima/options.c @@ -54,7 +54,6 @@ TASK_DECL dboptions |= optflag; -#ifndef NO_COUNTRY if ( optflag & IGNORECASE ) { if ( !db_global.ctbl_activ) { if (ctbl_alloc() != S_OKAY ) @@ -65,7 +64,6 @@ TASK_DECL /* map lower to upper */ db_global.country_tbl.ptr[i].sort_as1 = (char)(i-32); } -#endif RETURN( db_status = S_OKAY ); } @@ -84,7 +82,6 @@ TASK_DECL dboptions &= ~optflag; -#ifndef NO_COUNTRY if ( optflag & IGNORECASE ) { if ( db_global.ctbl_activ) { for ( i = 97; i < 123; i++) @@ -92,7 +89,6 @@ TASK_DECL db_global.country_tbl.ptr[i].sort_as1 = (char)i; } } -#endif RETURN( db_status = S_OKAY ); } diff --git a/cde/lib/DtSearch/raima/pathfcns.c b/cde/lib/DtSearch/raima/pathfcns.c index ec817e5c..eedac96e 100644 --- a/cde/lib/DtSearch/raima/pathfcns.c +++ b/cde/lib/DtSearch/raima/pathfcns.c @@ -295,7 +295,6 @@ char *path_str; /* Path to remove filename from */ return (dirpath); } -#ifndef NO_COUNTRY /* Set Country Table path */ int d_ctbpath(ctb TASK_PARM) @@ -326,5 +325,4 @@ TASK_DECL RETURN( db_status ); } -#endif /* vpp -nOS2 -dUNIX -nBSD -nVANILLA_BSD -nVMS -nMEMLOCK -nWINDOWS -nFAR_ALLOC -f/usr/users/master/config/nonwin pathfcns.c */ diff --git a/cde/lib/DtSearch/raima/task.h b/cde/lib/DtSearch/raima/task.h index de599096..716f2ba4 100644 --- a/cde/lib/DtSearch/raima/task.h +++ b/cde/lib/DtSearch/raima/task.h @@ -288,9 +288,7 @@ int EXTERNAL_DBN dt_csoset(P1(int) Pi(DB_ADDR *) TASK_Di DBN_Dn); /* csoset.c */ int EXTERNAL_DBN dt_csowrite(P1(int) Pi(long) Pi(const char *) TASK_Di DBN_Dn); /* csowrite.c */ -#ifndef NO_COUNTRY int EXTERNAL_FIXED dt_ctbpath(P1(const char *) TASK_Di); /* pathfcns.c */ -#endif int EXTERNAL_FIXED dt_dbdpath(P1(const char *) TASK_Di ); /* dbdpath.c */ int EXTERNAL_FIXED dt_dbfpath(P1(const char *) TASK_Di ); /* dbfpath.c */ int EXTERNAL_FIXED dt_dblog(P1(const char *) TASK_Di ); /* dblog.c */ -- 2.25.1