tldm-universe/Ardent/UV/sample/NLSHKtmplt.c

188 lines
4.2 KiB
C
Raw Normal View History

2024-09-09 21:51:08 +00:00
/******************************************************************************
*
* NLSHKtmplt.c - Template for a NLS hooks module
*
* 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 intended
* 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/10/97 20965 CSM Template for NLS hooks module
*
******************************************************************************/
#undef MALLOC_TRACING
#include "uv.h"
#include "NLShooks.h"
/******************************************************************************
*
* To use this module, do a global replace of HID with the name of
* your hook library id.
*
******************************************************************************/
#ifdef MSWIN
#define NLSHKHookTable (*NLSHKHookTable)
#endif
extern int (*NLSHKHookTable[])();
int ih_case_HID();
int ih_compare_HID();
int ih_ctype_HID();
int ih_fmt_HID();
int ih_iconv_HID();
int ih_lendp_HID();
int ih_oconv_HID();
int ih_soundex_HID();
int ih_trim_HID();
int ih_match_HID();
/* ih_init_HID */
void ih_init_HID()
{
NLSHKHookTable[NLSHK_TABLE_CASE] = ih_case_HID;
/* NLSHKHookTable[NLSHK_TABLE_CASE] = 0; if no hook function for CASE */
NLSHKHookTable[NLSHK_TABLE_COMPARE] = ih_compare_HID;
NLSHKHookTable[NLSHK_TABLE_CTYPE] = ih_ctype_HID;
NLSHKHookTable[NLSHK_TABLE_FMT] = ih_fmt_HID;
NLSHKHookTable[NLSHK_TABLE_ICONV] = ih_iconv_HID;
NLSHKHookTable[NLSHK_TABLE_LENDP] = ih_lendp_HID;
NLSHKHookTable[NLSHK_TABLE_OCONV] = ih_oconv_HID;
NLSHKHookTable[NLSHK_TABLE_SOUNDEX] = ih_soundex_HID;
NLSHKHookTable[NLSHK_TABLE_TRIM] = ih_trim_HID;
NLSHKHookTable[NLSHK_TABLE_MATCH] = ih_match_HID;
}
/* ih_case_HID */
int ih_case_HID(in_str, replaced_char, out_str, conv_type)
STRING in_str;
int replaced_char;
STRING *out_str;
int conv_type;
{
return(NLSHK_HKE_NO_CONV);
}
/* ih_compare_HID */
int ih_compare_HID(in_str1, rep_char1, in_str2, rep_char2, type,
justprec, pretval)
STRING in_str1;
int rep_char1;
STRING in_str2;
int rep_char2;
int type, justprec, *pretval;
{
*pretval = 0;
return(NLSHK_HKE_NO_CONV);
}
/* ih_ctype_HID */
int ih_ctype_HID(in_str, replaced_char, pretval)
STRING in_str;
int replaced_char;
int *pretval;
{
*pretval = 0;
return(NLSHK_HKE_NO_CONV);
}
/* ih_fmt_HID */
int ih_fmt_HID(in_str, replaced_char, out_str, fmt_code,
options_flag, precision)
STRING in_str;
int replaced_char;
STRING *out_str;
STRING fmt_code;
int options_flag;
int precision;
{
return(NLSHK_HKE_NO_CONV);
}
/* ih_iconv_HID */
int ih_iconv_HID(in_str, replaced_char, out_str, conv_code, options_flag)
STRING in_str;
int replaced_char;
STRING *out_str;
STRING conv_code;
int options_flag;
{
return(NLSHK_HKE_NO_CONV);
}
/* ih_lendp_HID */
int ih_lendp_HID(in_str, replaced_char, pretval)
STRING in_str;
int replaced_char;
int *pretval;
{
*pretval = 0;
return(NLSHK_HKE_NO_CONV);
}
/* ih_oconv_HID */
int ih_oconv_HID(in_str, replaced_char, out_str, conv_code, options_flag)
STRING in_str;
int replaced_char;
STRING *out_str;
STRING conv_code;
int options_flag;
{
return(NLSHK_HKE_NO_CONV);
}
/* ih_soundex_HID */
int ih_soundex_HID(in_str, replaced_char, out_str)
STRING in_str;
int replaced_char;
STRING *out_str;
{
return(NLSHK_HKE_NO_CONV);
}
/* ih_trim_HID */
int ih_trim_HID(in_str, replaced_char, out_str, trim_type)
STRING in_str;
int replaced_char;
STRING *out_str;
int trim_type;
{
return(NLSHK_HKE_NO_CONV);
}
/* ih_match_HID */
int ih_match_HID(in_str1, rep_char1, mask_str, rep_char2, out_str,
fieldnum, pmatched)
STRING in_str1;
int rep_char1;
STRING mask_str;
int rep_char2;
STRING *out_str;
int fieldnum;
int *pmatched;
{
*pmatched = 0;
return(NLSHK_HKE_NO_CONV);
}