8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 22:43:04 +01:00

-Replace STATIC with static

-Remove a few unused macros
This commit is contained in:
brodsom 2003-08-21 16:22:11 +00:00
parent 708cde4c32
commit b353fb955b
10 changed files with 39 additions and 114 deletions

View File

@ -78,7 +78,7 @@ TEXTTYPE_ENTRY(BIG5_init)
* Note: This function expects Wide-Char input, not * Note: This function expects Wide-Char input, not
* Multibyte input * Multibyte input
*/ */
STATIC USHORT big5_to_upper(TEXTTYPE obj, UCS2_CHAR ch) static USHORT big5_to_upper(TEXTTYPE obj, UCS2_CHAR ch)
{ {
if (ch >= (UCS2_CHAR) ASCII_LOWER_A && ch <= (UCS2_CHAR) ASCII_LOWER_Z) if (ch >= (UCS2_CHAR) ASCII_LOWER_A && ch <= (UCS2_CHAR) ASCII_LOWER_Z)
return (ch - (UCS2_CHAR) ASCII_LOWER_A + (UCS2_CHAR) ASCII_UPPER_A); return (ch - (UCS2_CHAR) ASCII_LOWER_A + (UCS2_CHAR) ASCII_UPPER_A);
@ -92,7 +92,7 @@ STATIC USHORT big5_to_upper(TEXTTYPE obj, UCS2_CHAR ch)
/* /*
* Note: This function expects Multibyte input * Note: This function expects Multibyte input
*/ */
STATIC SSHORT big5_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr) static SSHORT big5_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr)
{ {
BYTE *p; BYTE *p;
USHORT waiting_for_big52 = FALSE; USHORT waiting_for_big52 = FALSE;
@ -129,7 +129,7 @@ STATIC SSHORT big5_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iO
* Note: This function expects Wide-Char input, not * Note: This function expects Wide-Char input, not
* Multibyte input * Multibyte input
*/ */
STATIC USHORT big5_to_lower(TEXTTYPE obj, UCS2_CHAR ch) static USHORT big5_to_lower(TEXTTYPE obj, UCS2_CHAR ch)
{ {
if (ch >= (UCS2_CHAR) ASCII_UPPER_A && ch <= (UCS2_CHAR) ASCII_UPPER_Z) if (ch >= (UCS2_CHAR) ASCII_UPPER_A && ch <= (UCS2_CHAR) ASCII_UPPER_Z)
return (ch - (UCS2_CHAR) ASCII_UPPER_A + (UCS2_CHAR) ASCII_LOWER_A); return (ch - (UCS2_CHAR) ASCII_UPPER_A + (UCS2_CHAR) ASCII_LOWER_A);

View File

@ -22,6 +22,6 @@
*/ */
/* These macros have a duplicate in cv_big5.c */ /* These macros have a duplicate in cv_big5.c */
STATIC USHORT big5_to_upper(TEXTTYPE obj, UCS2_CHAR ch); static USHORT big5_to_upper(TEXTTYPE obj, UCS2_CHAR ch);
STATIC SSHORT big5_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr); static SSHORT big5_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr);
STATIC USHORT big5_to_lower(TEXTTYPE obj, UCS2_CHAR ch); static USHORT big5_to_lower(TEXTTYPE obj, UCS2_CHAR ch);

View File

@ -25,9 +25,9 @@
#include "firebird.h" #include "firebird.h"
#include "../intl/ldcommon.h" #include "../intl/ldcommon.h"
STATIC USHORT fam2_to_upper(TEXTTYPE obj, BYTE ch); static USHORT fam2_to_upper(TEXTTYPE obj, BYTE ch);
STATIC SSHORT fam2_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr); static SSHORT fam2_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr);
STATIC USHORT fam2_to_lower(TEXTTYPE obj, BYTE ch); static USHORT fam2_to_lower(TEXTTYPE obj, BYTE ch);
#include "lc_narrow.h" #include "lc_narrow.h"
#include "lc_dos.h" #include "lc_dos.h"
@ -522,7 +522,7 @@ TEXTTYPE_ENTRY(NEXT_c4_init)
STATIC USHORT fam2_to_upper(TEXTTYPE obj, BYTE ch) static USHORT fam2_to_upper(TEXTTYPE obj, BYTE ch)
{ {
return (LOCALE_UPPER(ch)); return (LOCALE_UPPER(ch));
} }
@ -531,7 +531,7 @@ STATIC USHORT fam2_to_upper(TEXTTYPE obj, BYTE ch)
/* /*
* Returns -1 if output buffer was too small * Returns -1 if output buffer was too small
*/ */
STATIC SSHORT fam2_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr) static SSHORT fam2_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr)
{ {
BYTE *p; BYTE *p;
assert(pStr != NULL); assert(pStr != NULL);
@ -554,7 +554,7 @@ STATIC SSHORT fam2_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iO
STATIC USHORT fam2_to_lower(TEXTTYPE obj, BYTE ch) static USHORT fam2_to_lower(TEXTTYPE obj, BYTE ch)
{ {
return (LOCALE_LOWER(ch)); return (LOCALE_LOWER(ch));
} }

View File

@ -21,9 +21,9 @@
#include "firebird.h" #include "firebird.h"
#include "../intl/ldcommon.h" #include "../intl/ldcommon.h"
STATIC USHORT fam2_to_upper (TEXTTYPE obj, BYTE ch); static USHORT fam2_to_upper (TEXTTYPE obj, BYTE ch);
STATIC SSHORT fam2_str_to_upper (TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr); static SSHORT fam2_str_to_upper (TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr);
STATIC USHORT fam2_to_lower (TEXTTYPE obj, BYTE ch); static USHORT fam2_to_lower (TEXTTYPE obj, BYTE ch);
#include "lc_narrow.h" #include "lc_narrow.h"
#include "lc_dos.h" #include "lc_dos.h"
@ -76,7 +76,7 @@ TEXTTYPE_RETURN;
#define LOCALE_LOWER(ch) (obj->texttype_tolower_table[ (unsigned) (ch) ]) #define LOCALE_LOWER(ch) (obj->texttype_tolower_table[ (unsigned) (ch) ])
STATIC USHORT fam2_to_upper (TEXTTYPE obj, BYTE ch) static USHORT fam2_to_upper (TEXTTYPE obj, BYTE ch)
{ {
return (LOCALE_UPPER (ch)); return (LOCALE_UPPER (ch));
} }
@ -85,7 +85,7 @@ STATIC USHORT fam2_to_upper (TEXTTYPE obj, BYTE ch)
/* /*
* Returns -1 if output buffer was too small * Returns -1 if output buffer was too small
*/ */
STATIC SSHORT fam2_str_to_upper (TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr) static SSHORT fam2_str_to_upper (TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr)
{ {
BYTE *p; BYTE *p;
assert (pStr != NULL); assert (pStr != NULL);
@ -106,7 +106,7 @@ STATIC SSHORT fam2_str_to_upper (TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT i
} }
STATIC USHORT fam2_to_lower (TEXTTYPE obj, BYTE ch) static USHORT fam2_to_lower (TEXTTYPE obj, BYTE ch)
{ {
return (LOCALE_LOWER (ch)); return (LOCALE_LOWER (ch));
} }

View File

@ -28,9 +28,9 @@
#include "lc_ascii.h" #include "lc_ascii.h"
#include "cv_jis.h" #include "cv_jis.h"
STATIC USHORT sjis_to_upper(TEXTTYPE obj, UCS2_CHAR ch); static USHORT sjis_to_upper(TEXTTYPE obj, UCS2_CHAR ch);
STATIC USHORT sjis_to_lower(TEXTTYPE obj, UCS2_CHAR ch); static USHORT sjis_to_lower(TEXTTYPE obj, UCS2_CHAR ch);
STATIC SSHORT sjis_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr); static SSHORT sjis_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr);
#define FAMILY_MULTIBYTE(id_number, name, charset, country) \ #define FAMILY_MULTIBYTE(id_number, name, charset, country) \
cache->texttype_version = IB_LANGDRV_VERSION; \ cache->texttype_version = IB_LANGDRV_VERSION; \
@ -102,7 +102,7 @@ TEXTTYPE_ENTRY(JIS230_init)
* Note: This function expects Wide-Char input, not * Note: This function expects Wide-Char input, not
* Multibyte input * Multibyte input
*/ */
STATIC USHORT sjis_to_upper(TEXTTYPE obj, UCS2_CHAR ch) static USHORT sjis_to_upper(TEXTTYPE obj, UCS2_CHAR ch)
{ {
if (ch >= (UCS2_CHAR) ASCII_LOWER_A && ch <= (UCS2_CHAR) ASCII_LOWER_Z) if (ch >= (UCS2_CHAR) ASCII_LOWER_A && ch <= (UCS2_CHAR) ASCII_LOWER_Z)
return (ch - (UCS2_CHAR) ASCII_LOWER_A + (UCS2_CHAR) ASCII_UPPER_A); return (ch - (UCS2_CHAR) ASCII_LOWER_A + (UCS2_CHAR) ASCII_UPPER_A);
@ -116,7 +116,7 @@ STATIC USHORT sjis_to_upper(TEXTTYPE obj, UCS2_CHAR ch)
/* /*
* Note: This function expects Multibyte input * Note: This function expects Multibyte input
*/ */
STATIC SSHORT sjis_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr) static SSHORT sjis_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iOutLen, BYTE *pOutStr)
{ {
BYTE *p; BYTE *p;
USHORT waiting_for_sjis2 = FALSE; USHORT waiting_for_sjis2 = FALSE;
@ -153,7 +153,7 @@ STATIC SSHORT sjis_str_to_upper(TEXTTYPE obj, USHORT iLen, BYTE *pStr, USHORT iO
* Note: This function expects Wide-Char input, not * Note: This function expects Wide-Char input, not
* Multibyte input * Multibyte input
*/ */
STATIC USHORT sjis_to_lower(TEXTTYPE obj, UCS2_CHAR ch) static USHORT sjis_to_lower(TEXTTYPE obj, UCS2_CHAR ch)
{ {
if (ch >= (UCS2_CHAR) ASCII_UPPER_A && ch <= (UCS2_CHAR) ASCII_UPPER_Z) if (ch >= (UCS2_CHAR) ASCII_UPPER_A && ch <= (UCS2_CHAR) ASCII_UPPER_Z)
return (ch - (UCS2_CHAR) ASCII_UPPER_A + (UCS2_CHAR) ASCII_LOWER_A); return (ch - (UCS2_CHAR) ASCII_UPPER_A + (UCS2_CHAR) ASCII_LOWER_A);

View File

@ -28,9 +28,9 @@
#define ASCII_SPACE 32 #define ASCII_SPACE 32
STATIC USHORT LCKSC_string_to_key(TEXTTYPE obj, USHORT iInLen, BYTE *pInChar, USHORT iOutLen, BYTE *pOutChar); static USHORT LCKSC_string_to_key(TEXTTYPE obj, USHORT iInLen, BYTE *pInChar, USHORT iOutLen, BYTE *pOutChar);
STATIC USHORT LCKSC_key_length(TEXTTYPE obj, USHORT inLen); static USHORT LCKSC_key_length(TEXTTYPE obj, USHORT inLen);
STATIC SSHORT LCKSC_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2); static SSHORT LCKSC_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2);
static int GetGenHanNdx(unsigned char b1, unsigned char b2); static int GetGenHanNdx(unsigned char b1, unsigned char b2);
static int GetSpeHanNdx(unsigned char b1, unsigned char b2); static int GetSpeHanNdx(unsigned char b1, unsigned char b2);
@ -132,7 +132,7 @@ unsigned char gen_han[18][2] = {
STATIC USHORT LCKSC_string_to_key(TEXTTYPE obj, USHORT iInLen, BYTE *pInChar, USHORT iOutLen, BYTE *pOutChar) static USHORT LCKSC_string_to_key(TEXTTYPE obj, USHORT iInLen, BYTE *pInChar, USHORT iOutLen, BYTE *pOutChar)
{ {
USHORT i; USHORT i;
int idx; int idx;
@ -240,7 +240,7 @@ static int GetSpeHanNdx(unsigned char b1, unsigned char b2)
} }
STATIC USHORT LCKSC_key_length(TEXTTYPE obj, USHORT inLen) static USHORT LCKSC_key_length(TEXTTYPE obj, USHORT inLen)
{ {
USHORT len; USHORT len;
@ -254,7 +254,7 @@ STATIC USHORT LCKSC_key_length(TEXTTYPE obj, USHORT inLen)
* function name : LCKSC_compare * function name : LCKSC_compare
* description : compare two string * description : compare two string
*/ */
STATIC SSHORT LCKSC_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2) static SSHORT LCKSC_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2)
{ {
BYTE key1[LANGKSC_MAX_KEY]; BYTE key1[LANGKSC_MAX_KEY];
BYTE key2[LANGKSC_MAX_KEY]; BYTE key2[LANGKSC_MAX_KEY];

View File

@ -528,7 +528,7 @@ SSHORT LC_NARROW_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2)
* Routine used for comparing results from comparision algorithm * Routine used for comparing results from comparision algorithm
* to results from key creation algorithm * to results from key creation algorithm
*/ */
STATIC SSHORT old_fam2_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2) static SSHORT old_fam2_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2)
{ {
BYTE key1[LANGFAM2_MAX_KEY]; BYTE key1[LANGFAM2_MAX_KEY];
BYTE key2[LANGFAM2_MAX_KEY]; BYTE key2[LANGFAM2_MAX_KEY];
@ -570,7 +570,7 @@ STATIC SSHORT old_fam2_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYT
* Routine used for comparing results from comparision algorithm * Routine used for comparing results from comparision algorithm
* to results from key creation algorithm * to results from key creation algorithm
*/ */
STATIC SSHORT fam2_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2) static SSHORT fam2_compare(TEXTTYPE obj, USHORT l1, BYTE *s1, USHORT l2, BYTE *s2)
{ {
SSHORT res1, res2; SSHORT res1, res2;

View File

@ -26,7 +26,7 @@
#include "lc_ascii.h" #include "lc_ascii.h"
#include "cv_unicode_fss.h" #include "cv_unicode_fss.h"
STATIC SSHORT wc_mbtowc(TEXTTYPE *obj, UCS2_CHAR *wc, NCHAR *p, USHORT n); static SSHORT wc_mbtowc(TEXTTYPE *obj, UCS2_CHAR *wc, NCHAR *p, USHORT n);
#define FAMILY_UNICODE_WIDE_BIN(id_number, name, charset, country) \ #define FAMILY_UNICODE_WIDE_BIN(id_number, name, charset, country) \
cache->texttype_version = IB_LANGDRV_VERSION; \ cache->texttype_version = IB_LANGDRV_VERSION; \
@ -97,7 +97,7 @@ TEXTTYPE_ENTRY(UNI201_init)
#include "../intl/collations/undef.h" #include "../intl/collations/undef.h"
STATIC SSHORT wc_mbtowc(TEXTTYPE *obj, UCS2_CHAR *wc, NCHAR *p, USHORT n) static SSHORT wc_mbtowc(TEXTTYPE *obj, UCS2_CHAR *wc, NCHAR *p, USHORT n)
{ {
assert(obj); assert(obj);
assert(wc); assert(wc);

View File

@ -52,15 +52,8 @@
#undef CHAR #undef CHAR
#endif #endif
#define CHAR SCHAR #define CHAR SCHAR
/* #define BYTE UCHAR */
#define INT8 SCHAR
#define UINT8 UCHAR
#define INT16 SSHORT
#define UINT16 USHORT
#define INT32 SLONG
#define UINT32 ULONG
#define BOOL UINT16 #define UINT16 USHORT
#ifdef WIN_NT #ifdef WIN_NT
#define DLL_EXPORT __declspec(dllexport) #define DLL_EXPORT __declspec(dllexport)
@ -103,75 +96,6 @@
#define FALSE 0 #define FALSE 0
#endif #endif
/*
//For pointers
*/
#ifndef NULL
#define NULL 0
#endif
#ifndef NULLP
#define NULLP (0)
#endif
#ifndef VOID
#define VOID void
#endif
#ifndef CHAR
#define CHAR char
#endif
#ifndef BYTE
#define BYTE unsigned char
#endif
#ifndef INT8
#define INT8 char
#endif
#ifndef UINT8
#define UINT8 unsigned char
#endif
#ifndef INT16
#define INT16 int
#endif
#ifndef UINT16
#define UINT16 unsigned int
#endif
#ifndef INT32
#define INT32 long
#endif
#ifndef UINT32
#define UINT32 unsigned long
#endif
#ifndef BOOL
#define BOOL int
#endif
#define far
typedef VOID far *pVOID;
typedef pVOID far *ppVOID;
typedef CHAR far *pCHAR;
typedef BYTE far *pBYTE;
typedef INT8 far *pINT8;
typedef UINT8 far *pUINT8;
typedef INT32 far *pINT32;
typedef UINT32 far *pUINT32;
typedef BOOL far *pBOOL;
typedef INT16 far *pINT16;
typedef UINT16 far *pUINT16;
typedef UINT16 PDXResult;
#define hFILE INT16
#define phFILE pINT16
/* /*
//----------------------------------------------------------------- //-----------------------------------------------------------------
// API CONSTANT VALUES // API CONSTANT VALUES
@ -557,9 +481,12 @@ struct CompressPair {
// VCS AREA // VCS AREA
//----------------------------------------------------------------- //-----------------------------------------------------------------
// $Header: /home/job/firebird/cvs-backup/firebird2/src/intl/ld.h,v 1.19 2003-02-28 12:45:35 brodsom Exp $ // $Header: /home/job/firebird/cvs-backup/firebird2/src/intl/ld.h,v 1.20 2003-08-21 16:22:11 brodsom Exp $
// $Log: not supported by cvs2svn $ // $Log: not supported by cvs2svn $
// Revision 1.19 2003/02/28 12:45:35 brodsom
// Remove FAR_VARIABLE
//
// Revision 1.18 2003/02/14 13:47:27 eku // Revision 1.18 2003/02/14 13:47:27 eku
// Fixed nested comment. // Fixed nested comment.
// //

View File

@ -35,8 +35,6 @@
#undef DEBUG #undef DEBUG
#define STATIC static
typedef USHORT UNICODE; typedef USHORT UNICODE;
/* Redirect the assertion code defined by gdsassert.h to a local routine */ /* Redirect the assertion code defined by gdsassert.h to a local routine */