tldm-universe/Ardent/UV/gcidir/include/NLShooks.h

86 lines
3.3 KiB
C
Raw Normal View History

2024-09-09 21:51:08 +00:00
#ifndef h_NLShooks
#define h_NLShooks
/******************************************************************************
*
* Public Include file for National Language Support hooks
*
* Module %M% Version %I% Date %H%
*
* (c) Copyright 1998 Ardent Software Inc. - All Rights Reserved
* This is unpublished proprietary source code of Ardent Software, Inc.
* The copyright notice above does not evidence any actual or intented
* publication of such source code.
*
*******************************************************************************
*
* Maintenence log - insert most recent change descriptions at top
*
* Date.... GTAR# WHO Description.........................................
* 10/14/98 23801 SAP Change copyrights.
* 07/07/97 20965 CSM Remove NLSHKhooktable definition for NT
* 07/01/97 20965 CSM Public Include file for NLS
*
*****************************************************************************/
/* Maximum number of slots in NLS hook table */
#define NLSHK_TABLE_SIZE 10
/* Slots in the NLS hook table have predefined meanings which
cannot be changed. The slots are as follows: */
#define NLSHK_TABLE_CASE 0
#define NLSHK_TABLE_COMPARE 1
#define NLSHK_TABLE_CTYPE 2
#define NLSHK_TABLE_FMT 3
#define NLSHK_TABLE_ICONV 4
#define NLSHK_TABLE_LENDP 5
#define NLSHK_TABLE_OCONV 6
#define NLSHK_TABLE_SOUNDEX 7
#define NLSHK_TABLE_TRIM 8
#define NLSHK_TABLE_MATCH 9
/* Tokens for conversion types, used by ih_case_HID */
#define NLSHK_CT_UPCASE 1 /* Convert string to uppercase (MCU) */
#define NLSHK_CT_DOWNCASE 2 /* Convert string to lowercase (MCL) */
#define NLSHK_CT_CAPITALIZE 3 /* Capitalize string (MCT), not used */
/* Tokens for conversion types, used by ih_ctype_HID */
#define NLSHK_CT_NONALPHA 1 /* Remove non-alphabetics (MCA) */
#define NLSHK_CT_ALPHA 2 /* Remove alphabetics (MC/A) */
#define NLSHK_CT_NONNUMERIC 3 /* Remove non-numerics (MCN) */
#define NLSHK_CT_NUMERIC 4 /* Remove numerics (MC/N) */
#define NLSHK_CT_NONPRINTABLE 5 /* Remove non-printables (MCP) */
/* Tokens for comparison operators, used by ih_compare_HID */
#define NLSHK_CO_EQUAL 1 /* BASIC equal */
#define NLSHK_CO_NEQUAL 2 /* BASIC not equal */
#define NLSHK_CO_LTEQUAL 3 /* BASIC less than or equal */
#define NLSHK_CO_LESSTHAN 4 /* BASIC less than */
#define NLSHK_CO_GTEQUAL 5 /* BASIC greater or equal */
#define NLSHK_CO_GREATER 6 /* BASIC greater */
#define NLSHK_CO_COMPARE 7 /* BASIC compare */
/* Tokens for trim types, used by ih_trim_HID */
#define NLSHK_TT_TRIM 1 /* Remove all whitspace (TRIM) */
#define NLSHK_TT_TRIMF 2 /* Remove leading spaces (TRIMF) */
#define NLSHK_TT_TRIMB 3 /* Remove trailing spaces (TRIMB) */
#define NLSHK_TT_TRIMS 4 /* As TRIM, but multivalued */
#define NLSHK_TT_TRIMFS 5 /* Remove leading spacs from dynarray */
#define NLSHK_TT_TRIMBS 6 /* Remove trailing spcs from dynarray */
/* Possible hook return codes */
#define NLSHK_HKE_OK 0 /* Hook completed successfully */
#define NLSHK_HKE_NO_CONV -1 /* Hook did no conversion */
#define NLSHK_HKE_SOME_CONV 1 /* Hook did some conversion */
#define NLSHK_HKE_INPUT_INVALID 2 /* Input string cannot be converted */
#define NLSHK_HKE_CC_INVALID 3 /* Conversion code is invalid */
#define NLSHK_HKE_DATA_INVALID 4 /* Conversion on likely invalid data */
#endif