You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by an...@apache.org on 2017/09/07 01:55:12 UTC
[18/30] incubator-trafodion git commit: TRAFODION-2731 CodeCleanup:
Remove obsolete, legacy and unused code
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/charinfo.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/charinfo.cpp b/core/sql/common/charinfo.cpp
index 576637f..c26efe8 100644
--- a/core/sql/common/charinfo.cpp
+++ b/core/sql/common/charinfo.cpp
@@ -171,7 +171,7 @@ NABoolean CharInfo::isCharSetSupported(CharSet cs)
if (cs >= CHARSET_MIN && cs <= CHARSET_MAX)
{
// Special for running regress/fullstack/TEST001 on NSK:
-#ifdef NA_DEBUG_C_RUNTIME
+#ifdef _DEBUG
if (IF_WIDE == FALSE &&
mapCSArray[cs-CHARSET_MIN].maxBytesPerChar > 1 && // SJIS or UNICODE
getenv("NCHAR_SJIS_DEBUG"))
@@ -188,7 +188,7 @@ NABoolean CharInfo::isCharSetFullySupported(CharSet cs)
if (cs >= CHARSET_MIN && cs <= CHARSET_MAX)
{
// Special for running regress/fullstack/TEST001 on NSK:
-#ifdef NA_DEBUG_C_RUNTIME
+#ifdef _DEBUG
if (IF_WIDE == FALSE &&
mapCSArray[cs-CHARSET_MIN].maxBytesPerChar > 1 && // SJIS or UNICODE
getenv("NCHAR_SJIS_DEBUG"))
@@ -223,7 +223,7 @@ NABoolean CharInfo::isMsgCharSetSupported(CharSet cs) {
// see TESTCHARSET in CmpMain.cpp
void CharInfo::toggleCharSetSupport(CharSet cs)
{
-#ifdef NA_DEBUG_C_RUNTIME
+#ifdef _DEBUG
size_t i;
for (i = 0; i < SIZEOF_CS; i++)
if (cs == mapCSArray[i].cs)
@@ -486,10 +486,6 @@ Int32 CollationDB::getCollationFlags(CharInfo::Collation co) const
//
// So we must check that any spaces are *trailing* spaces only.
//
-// The smdio/CmColumnsRow.cpp and sqlcat/ReadTableDef.cpp
-// callers do not have a '\0'-terminated string,
-// hence our needing this length arg to pass in.
-//
// We can't use plain old strcmp here, because we want both
// "SJIS" and "SJIS "
// to be matched. The public caller CharInfo::getCollationEnum()
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/conversionLocale.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/conversionLocale.cpp b/core/sql/common/conversionLocale.cpp
index a225308..9d587b3 100644
--- a/core/sql/common/conversionLocale.cpp
+++ b/core/sql/common/conversionLocale.cpp
@@ -69,7 +69,7 @@ cnv_charset convertCharsetEnum (Int32 inset)
// The optional utf8String argument holds the buffer into which the Unicode string
// will be stored. In case the argument is NULL or it is not big enough,
// the function allocates memory from the heap (if the heap pointer is not NULL),
-// or from the C run-time system heap (if NA_NO_C_RUNTIME is not defined).
+// or from the C run-time system heap.
// If the memory allocation fails, the function returns 0. If any illegal
// characters are encountered, the function also returns 0.
//
@@ -651,7 +651,6 @@ Int32 ComputeStrLenInNAWchars (const char * pStr,
// error code values are defined in w:/common/csconvert.h. Note that
// this function does not need to use a workspace heap.
// -----------------------------------------------------------------------
-NA_EIDPROC
Int32 ComputeStrLenInUCS4chars (const char * pStr,
const Int32 strLenInBytes,
const CharInfo::CharSet cs)
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/conversionSJIS.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/conversionSJIS.cpp b/core/sql/common/conversionSJIS.cpp
index 52aaa65..5aab462 100644
--- a/core/sql/common/conversionSJIS.cpp
+++ b/core/sql/common/conversionSJIS.cpp
@@ -58,7 +58,6 @@
// unicode.org.
///////////////////////////////////////////////////////////////////////
-NA_EIDPROC
inline Int32 in_range(Int32 x, Int32 lower, Int32 upper)
{
return ( lower <= x && x <= upper ) ? 1 : 0;
@@ -80,7 +79,7 @@ typedef struct SJISCodeBound {
// will be stored. In case the result argument is NULL or the buffer it points
// at is not big enough, the function allocates memory from the heap
// (if the heap pointer is not NULL), or from the C run-time system heap
-// (if NA_NO_C_RUNTIME is not defined), and returns the result.
+// and returns the result.
//
// If memory allocation fails, the function returns NULL.
// If any illegal characters are encountered, the function also returns NULL.
@@ -282,7 +281,6 @@ typedef struct Unicode2SjisMap
// The function only returns the SJIS that are double-byte. Hense it is static.
//
static
-NA_EIDPROC
NABoolean binarySearchU2STable(NAWchar u, NAWchar& sjis)
{
@@ -328,7 +326,6 @@ NABoolean binarySearchU2STable(NAWchar u, NAWchar& sjis)
// bytes is returned by the function. The function returns 0 if the
// Unicode character is not mappable from SJIS.
//
-NA_EIDPROC
Int32 unicodeToSjisChar(NAWchar wc, unsigned char *sjis, NABoolean allowInvalidCodePoint)
{
NAWchar t;
@@ -369,7 +366,7 @@ Int32 unicodeToSjisChar(NAWchar wc, unsigned char *sjis, NABoolean allowInvalidC
// The optional sjisString argument holds the buffer into which the Unicode string
// will be stored. In case the argument is NULL or it is not big enough,
// the function allocates memory from the heap (if the heap pointer is not NULL),
-// or from the C run-time system heap (if NA_NO_C_RUNTIME is not defined).
+// or from the C run-time system heap.
// If the memory allocation fails, the function returns 0. If any illegal
// characters are encountered, the function also returns 0.
//
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/csconvert.h
----------------------------------------------------------------------
diff --git a/core/sql/common/csconvert.h b/core/sql/common/csconvert.h
index 810fae5..3e9417c 100644
--- a/core/sql/common/csconvert.h
+++ b/core/sql/common/csconvert.h
@@ -31,11 +31,6 @@
// for them can be used in not only the SQL/MX compiler build,
// but also used by the ODBC build and maybe others.
-#ifndef NA_EIDPROC
-#define NA_EIDPROC
-#define _resident
-#endif
-
enum cnv_version { cnv_version1 = 1 }; /* For future expansion */
#ifndef cnv_charset_DEFINED
@@ -59,7 +54,6 @@ enum cnv_charset { cnv_UnknownCharSet = 0, cnv_UTF8 = 1,
#endif
//NOTE: The following definitions assume that FALSE = 0 and TRUE <> 0
-NA_EIDPROC
int LocaleToUTF8( const enum cnv_version version,
const char *in_bufr, const int in_len,
const char *out_bufr, const int out_len,
@@ -69,7 +63,6 @@ int LocaleToUTF8( const enum cnv_version version,
const int addNullAtEnd_flag = FALSE,
unsigned int *translated_char_cnt_p = NULL );
-NA_EIDPROC
int UTF8ToLocale( const enum cnv_version version,
const char *in_bufr, const int in_len,
const char *out_bufr, const int out_len,
@@ -81,7 +74,6 @@ int UTF8ToLocale( const enum cnv_version version,
unsigned int * translated_char_cnt_p = NULL ,
const char *substitution_char = NULL );
-NA_EIDPROC
int LocaleToUTF16( const enum cnv_version version,
const char *in_bufr, const int in_len,
const char *out_bufr, const int out_len,
@@ -93,7 +85,6 @@ int LocaleToUTF16( const enum cnv_version version,
unsigned int *translated_char_cnt_p = NULL ,
unsigned int max_chars_to_convert = 0xffffffff);
-NA_EIDPROC
int UTF16ToLocale( const enum cnv_version version,
const char *in_bufr, const int in_len,
const char *out_bufr, const int out_len,
@@ -106,7 +97,6 @@ int UTF16ToLocale( const enum cnv_version version,
unsigned int * translated_char_cnt_p = NULL ,
const char *substitution_char = NULL );
-NA_EIDPROC
int gbkToUtf8(char* gbkString, size_t gbklen,
char* result ,size_t outlen, bool addNullAtEnd=FALSE);
@@ -115,7 +105,6 @@ int gbkToUtf8(char* gbkString, size_t gbklen,
* UCS4 value. Returns the UCS4 value at location specified AND the
* length of the input character in bytes as the return value.
*/
-NA_EIDPROC
int LocaleCharToUCS4( const char *in_bufr, //Ptr to Input string
const int in_len, //Len of Input string (bytes)
unsigned int *UCS4ptr , //Ptr to output location
@@ -125,7 +114,6 @@ int LocaleCharToUCS4( const char *in_bufr, //Ptr to Input string
* and stores the character in the output buffer specified.
* Returns length of the output character in bytes as the return value.
*/
-NA_EIDPROC
int UCS4ToLocaleChar( const unsigned int *UCS4ptr , //Ptr to input char
const char *out_bufr, //Ptr to output bufr
const int out_len, //Len of output bufr
@@ -250,13 +238,11 @@ int UCS4ToLocaleChar( const unsigned int *UCS4ptr , //Ptr to input char
* truncated with blanks
*/
-NA_EIDPROC
int lightValidateUTF8Str(const char *bufr, // ptr to buffer to validate
int in_len, // len in bytes of buffer
int max_chars = 0, // max chars allowed in buffer or 0 for unlimited
int ignore_trailing_blanks = 1); // don't count trailing blanks as chars
-NA_EIDPROC
int lightValidateUTF8StrAndPad(char *bufr,
int in_len,
int max_chars = 0,
@@ -285,7 +271,6 @@ inline int fillWithMinMaxUTF8Chars(char *bufr,
/* A method to find the beginning of a UTF8 char that is at the end off
a buffer.
*/
-NA_EIDPROC
char * findStartOfChar( char *someByteInChar, char *startOfBuffer );
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/dfs2rec.h
----------------------------------------------------------------------
diff --git a/core/sql/common/dfs2rec.h b/core/sql/common/dfs2rec.h
index 1d27fa2..7136bd4 100644
--- a/core/sql/common/dfs2rec.h
+++ b/core/sql/common/dfs2rec.h
@@ -66,14 +66,9 @@
#define REC_MIN_FLOAT 142
#define REC_IEEE_FLOAT32 142
#define REC_IEEE_FLOAT64 143
-#define REC_MAX_FLOAT 143
-
-#if defined(NA_IEEE_FLOAT)
#define REC_FLOAT32 142
#define REC_FLOAT64 143
-#else
-#error Unknown float type
-#endif
+#define REC_MAX_FLOAT 143
#define REC_MIN_DECIMAL 150
#define REC_DECIMAL_UNSIGNED 150
@@ -100,15 +95,7 @@
// not-quite-right values.
// These unused, unnecessary #defines have been commented out.
//
-// In MX, none of the _UP datatypes occur because a column's UPSHIFT attribute
-// is kept only in a separate COLUMNS.ISUPSHIFTED metadata column,
-// and ReadTableDef correctly maps REC_BYTE_x_ASCII_UP to REC_BYTE_x_ASCII.
-// Below, these are marked "[Mxmapped]".
-// Thus, only ReadTableDef.cpp needs to know about REC_BYTE_x_ASCII_UP --
-// none of the rest of MX will ever encounter this datatype --
-// thus, no other MX code should use the #defines for REC_BYTE_x_ASCII_UP.
-
-// All MP or MX multibyte char data is REC_BYTE_x_DOUBLE;
+// All MX multibyte char data is REC_BYTE_x_DOUBLE;
// the REC_NCHAR_x_UNICODE are synonyms, for convenience, marked "[Mxsynonym]".
//
// The COLUMNS.CHARSET metadata of sqlcat/desc.h,
@@ -126,9 +113,6 @@
#define REC_MIN_F_CHAR_H 0 // MP same name
#define REC_BYTE_F_ASCII 0 // MP same name
- #ifdef READTABLEDEF_IMPLEMENTATION
- #define REC_BYTE_F_ASCII_UP 1 // MP same name [MXmapped]
- #endif
#define REC_BYTE_F_DOUBLE 2 // MP same name
#define REC_NCHAR_F_UNICODE 2 // [MXsynonym]
@@ -137,9 +121,6 @@
#define REC_MIN_V_CHAR_H 64 // MP same name
#define REC_BYTE_V_ASCII 64 // MP same name
- #ifdef READTABLEDEF_IMPLEMENTATION
- #define REC_BYTE_V_ASCII_UP 65 // MP same name [MXmapped]
- #endif
#define REC_BYTE_V_DOUBLE 66 // MP same name
#define REC_NCHAR_V_UNICODE 66 // [MXsynonym]
@@ -232,7 +213,7 @@ enum REC_DATETIME_CODE {
#define REC_INT_DAY_SECOND 207
// #define REC_MAX_INTERVAL 207
-#define REC_INT_FRACTION 208 // Used in MP only! See ReadTableDef.C
+#define REC_INT_FRACTION 208 // Used in MP only!
#define REC_MAX_INTERVAL 208
#define REC_MAX_INTERVAL_MP 212
#define REC_MAX_INTERVAL_MP 212
@@ -249,7 +230,7 @@ enum rec_datetime_field {
, REC_DATE_HOUR
, REC_DATE_MINUTE
, REC_DATE_SECOND
-, REC_DATE_FRACTION_MP // Used in MP only! See ReadTableDef.C
+, REC_DATE_FRACTION_MP // Used in MP only!
, REC_DATE_MAX_SINGLE_FIELD
// other datetime fields, not used in FS2 and DDL
@@ -397,7 +378,6 @@ struct rec_project_struct
class rec_field_struct
{
private:
-NA_EIDPROC
// this code is same as that in common/DateTimeType.cpp.
// We cannot source in DateTimeType.h in here. Maybe we
// extract this method in some kind of common utility.
@@ -479,7 +459,6 @@ NA_EIDPROC
public:
//LCOV_EXCL_START : Reported by Code Coverage tool as unused, but actually not executable on SQ
- NA_EIDPROC
Lng32 getLength()
{
if ((type >= REC_MIN_NUMERIC) && (type <= REC_MAX_NUMERIC))
@@ -495,7 +474,6 @@ public:
};
//LCOV_EXCL_STOP
-NA_EIDPROC
Lng32 getPrecision()
{
if ((type >= REC_MIN_NUMERIC) && (type <= REC_MAX_NUMERIC))
@@ -521,7 +499,6 @@ NA_EIDPROC
return 0;
};
-NA_EIDPROC
Lng32 getScale()
{
if ((type >= REC_MIN_NUMERIC) && (type <= REC_MAX_NUMERIC))
@@ -537,7 +514,6 @@ NA_EIDPROC
};
-NA_EIDPROC
void setLength(Lng32 len)
{
if ((type >= REC_MIN_NUMERIC) && (type <= REC_MAX_NUMERIC))
@@ -553,7 +529,6 @@ NA_EIDPROC
};
#ifdef NA_CATMAN_SIM
-NA_EIDPROC
Lng32 getBeginType()
{
if (type == REC_DATETIME)
@@ -562,14 +537,12 @@ NA_EIDPROC
return -1;
};
-NA_EIDPROC
void setBeginType(Lng32 ltype)
{
if (type == REC_DATETIME)
len_etc.datetime_.lead_type = (unsigned short) ltype;
};
-NA_EIDPROC
Lng32 getEndType()
{
if (type == REC_DATETIME)
@@ -578,7 +551,6 @@ NA_EIDPROC
return -1;
};
-NA_EIDPROC
void setEndType(Lng32 etype)
{
if (type == REC_DATETIME)
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/from_GB18030.c
----------------------------------------------------------------------
diff --git a/core/sql/common/from_GB18030.c b/core/sql/common/from_GB18030.c
index 2c90f0a..8b02627 100644
--- a/core/sql/common/from_GB18030.c
+++ b/core/sql/common/from_GB18030.c
@@ -149,7 +149,6 @@ static const gb4idx_ucs_t gb4idx_ucs_table[] = { 0, 0 } ;
static const ucs_gb4idx_t ucs_gb4idx_table[] = { 0, 0, 0 } ;
#endif
-NA_EIDPROC
static int
compare_gb4idx_ucs(gb4idx_ucs_t *ptr1, gb4idx_ucs_t *ptr2)
{
@@ -174,14 +173,12 @@ compare_gb4idx_ucs(gb4idx_ucs_t *ptr1, gb4idx_ucs_t *ptr2)
return(factor) ;
}
-NA_EIDPROC
static int
compare_gb4idx_ucs_C(const void *ptr1, const void *ptr2) //JAC - CAST FUNCTION needed to make our NT compiler happy
{
return compare_gb4idx_ucs( (gb4idx_ucs_t *) ptr1, (gb4idx_ucs_t *) ptr2 );
}
-NA_EIDPROC
static int
compare_ucs_gb4idx(ucs_gb4idx_t *ptr1, ucs_gb4idx_t *ptr2)
{
@@ -205,7 +202,6 @@ compare_ucs_gb4idx(ucs_gb4idx_t *ptr1, ucs_gb4idx_t *ptr2)
return(0) ; /* A match */
}
-NA_EIDPROC
static int
compare_ucs_gb4idx_C(const void *ptr1, const void *ptr2) //JAC - CAST FUNCTION needed to make our NT compiler happy
{
@@ -218,7 +214,6 @@ compare_ucs_gb4idx_C(const void *ptr1, const void *ptr2) //JAC - CAST FUNCTION n
* a 2-byte GB18030 code if the value >= 0xa1a1. Otherwise, it is assumed
* to be a 4-byte index and converted to a 4-byte GB18030 code.
*/
-NA_EIDPROC
static uint_t
tudc_to_gb(int udc)
{
@@ -240,7 +235,6 @@ tudc_to_gb(int udc)
* -1 - Invalid sequence (EILSEQ)
* -2 - Input incomplete
*/
-NA_EIDPROC
int
__gb18030_index(_LC_fcconv_iconv_t * cd, uchar_t **in, int len)
{
@@ -320,7 +314,6 @@ __gb18030_index(_LC_fcconv_iconv_t * cd, uchar_t **in, int len)
/*
* This routine maps UDC characters in Unicode to those in GB18030
*/
-NA_EIDPROC
WChar_t // JAC
__UDC_to_gb18030(ucs4_t ucs)
{
@@ -341,7 +334,6 @@ __UDC_to_gb18030(ucs4_t ucs)
/*
* This routine maps UCS characters to 4-byte GB18030 characters
*/
-NA_EIDPROC
WChar_t // JAC
__UCS_to_gb18030(ucs4_t ucs)
{
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/from_GBK.c
----------------------------------------------------------------------
diff --git a/core/sql/common/from_GBK.c b/core/sql/common/from_GBK.c
index b44a1ed..556bf60 100644
--- a/core/sql/common/from_GBK.c
+++ b/core/sql/common/from_GBK.c
@@ -57,7 +57,6 @@
* -1 - Invalid sequence (EILSEQ)
* -2 - Input incomplete
*/
-NA_EIDPROC
int
__gbk_index(_LC_fcconv_iconv_t * cd, uchar_t **in, int len)
{
@@ -97,7 +96,6 @@ __gbk_index(_LC_fcconv_iconv_t * cd, uchar_t **in, int len)
* This routine performs the conversion from a GBK code to GBK:GLGR
* code.
*/
-NA_EIDPROC
int
__gbk_to_gbkglgr(WChar_t code)
{
@@ -109,7 +107,6 @@ __gbk_to_gbkglgr(WChar_t code)
/*
* This routine maps UDC characters in Unicode to those in GBK
*/
-NA_EIDPROC
WChar_t
__UDC_to_gbk(ucs4_t ucs)
{
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/from_SJIS.c
----------------------------------------------------------------------
diff --git a/core/sql/common/from_SJIS.c b/core/sql/common/from_SJIS.c
index e6e5498..73aea9c 100644
--- a/core/sql/common/from_SJIS.c
+++ b/core/sql/common/from_SJIS.c
@@ -135,7 +135,6 @@ static const uchar_t idx_to_sjis[] =
* -1 - Invalid sequence (EILSEQ)
* -2 - Input incomplete
*/
-NA_EIDPROC
int
__sjis_index(_LC_fcconv_iconv_t *cd, uchar_t **in, int len)
{
@@ -167,7 +166,6 @@ __sjis_index(_LC_fcconv_iconv_t *cd, uchar_t **in, int len)
/*
* This routine map UDC characters in Unicode to those in SJIS
*/
-NA_EIDPROC
WChar_t // JAC
__UDC_to_sjis(ucs4_t ucs)
{
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/from_ksc5601.c
----------------------------------------------------------------------
diff --git a/core/sql/common/from_ksc5601.c b/core/sql/common/from_ksc5601.c
index 1433966..14c4fcd 100644
--- a/core/sql/common/from_ksc5601.c
+++ b/core/sql/common/from_ksc5601.c
@@ -56,7 +56,6 @@
* -1 - Invalid sequence (EILSEQ)
* -2 - Input incomplete
*/
-NA_EIDPROC
int
__cp949_index(_LC_fcconv_iconv_t *cd, uchar_t **in, int len)
{
@@ -85,7 +84,6 @@ __cp949_index(_LC_fcconv_iconv_t *cd, uchar_t **in, int len)
/*
* This routine enables table lookup of BMP UDC characters to cp949
*/
-NA_EIDPROC
WChar_t // JAC
__UDC_to_cp949(ucs4_t ucs)
{
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/iconv_gen.c
----------------------------------------------------------------------
diff --git a/core/sql/common/iconv_gen.c b/core/sql/common/iconv_gen.c
index 5af2956..547b152 100644
--- a/core/sql/common/iconv_gen.c
+++ b/core/sql/common/iconv_gen.c
@@ -167,7 +167,6 @@
* Driver routine for converting from UCS/UTF.
**********/
#ifdef USING_OPEN_SOURCE_from_ucs_exec /* JAC */
-NA_EIDPROC
int
__from_ucs_exec (_LC_fcconv_iconv_t *cd,
uchar_t** in_buff , size_t *in_bytes_left ,
@@ -367,7 +366,6 @@ __from_ucs_exec (_LC_fcconv_iconv_t *cd,
**********/
#ifdef USING_OPEN_SOURCE_sb_to_ucs_exec /* JAC */
-NA_EIDPROC
int
__sb_to_ucs_exec(_LC_fcconv_iconv_t *cd,
uchar_t** in_buff , size_t *in_bytes_left ,
@@ -457,7 +455,6 @@ __sb_to_ucs_exec(_LC_fcconv_iconv_t *cd,
**********/
#ifdef USING_OPEN_SOURCE_sb_to_sb_exec /* JAC */
-NA_EIDPROC
int
__sb_to_sb_exec(_LC_fcconv_iconv_t *cd,
uchar_t** in_buff , size_t *in_bytes_left ,
@@ -600,7 +597,6 @@ __sb_to_sb_exec(_LC_fcconv_iconv_t *cd,
**********/
#ifdef USING_OPEN_SOURCE_to_ucs_exec /* JAC */
-NA_EIDPROC
int
__to_ucs_exec(_LC_fcconv_iconv_t *cd,
uchar_t** in_buff , size_t *in_bytes_left ,
@@ -746,7 +742,6 @@ __to_ucs_exec(_LC_fcconv_iconv_t *cd,
**********/
#ifdef USING_OPEN_SOURCE_cs_to_ucs_exec /* JAC */
-NA_EIDPROC
int
__cs_to_ucs_exec(_LC_fcconv_iconv_t *cd,
uchar_t** in_buff , size_t *in_bytes_left ,
@@ -857,7 +852,6 @@ __cs_to_ucs_exec(_LC_fcconv_iconv_t *cd,
**********/
#ifdef USING_OPEN_SOURCE_mb_to_mb_exec /* JAC */
-NA_EIDPROC
int
__mb_to_mb_exec(_LC_fcconv_iconv_t *cd,
uchar_t** in_buff , size_t *in_bytes_left ,
@@ -1255,7 +1249,6 @@ typedef struct utf7_conv
/*
* UTF-7 conversion table initialization routine
*/
-NA_EIDPROC
static void
utf7_convtable_init(_LC_fcconv_iconv_t *cd)
{
@@ -1312,7 +1305,6 @@ utf7_convtable_init(_LC_fcconv_iconv_t *cd)
/* */
/************************************************************************/
//LCOV_EXCL_START :cnu -- As of 8/30/2011, not used on SQ platform, but may be used on Clients
-NA_EIDPROC
int __input_ucs4(_LC_fcconv_iconv_t *cd, uchar_t **in, int len)
{
ucs4_t *inptr = (ucs4_t *)*in ;
@@ -1349,7 +1341,6 @@ int __input_ucs4(_LC_fcconv_iconv_t *cd, uchar_t **in, int len)
//LCOV_EXCL_STOP
/*#endif /* USING_OPEN_SOURCE_input_ucs4 // JAC */
-NA_EIDPROC
int __input_ucs2(_LC_fcconv_iconv_t *cd, uchar_t **in, int len)
{
ucs2_t *inptr = (ucs2_t *)*in ;
@@ -1404,7 +1395,6 @@ int __input_ucs2(_LC_fcconv_iconv_t *cd, uchar_t **in, int len)
return((int)word) ;
}
-NA_EIDPROC
int __input_utf8(_LC_fcconv_iconv_t *cd, uchar_t **in, int len)
{
int first = !(cd->flags & CONV_INPUT_PROCESSED) ;
@@ -1497,7 +1487,6 @@ int __input_utf8(_LC_fcconv_iconv_t *cd, uchar_t **in, int len)
* character-by-character basis.
*/
#ifdef USING_OPEN_SOURCE_UTF7 /* JAC */
-NA_EIDPROC
int __input_utf7(_LC_fcconv_iconv_t *cd, uchar_t **in, int len)
{
uchar_t *inptr = *in ;
@@ -1601,7 +1590,6 @@ int __input_utf7(_LC_fcconv_iconv_t *cd, uchar_t **in, int len)
/* */
/************************************************************************/
//LCOV_EXCL_START :cnu -- As of 8/30/2011, not used on SQ platform, but may be used on Clients
-NA_EIDPROC
int __output_ucs4(_LC_fcconv_iconv_t *cd, uchar_t *out, int len, ucs4_t word)
{
ucs4_t *outptr = (ucs4_t *)out ;
@@ -1632,7 +1620,6 @@ int __output_ucs4(_LC_fcconv_iconv_t *cd, uchar_t *out, int len, ucs4_t word)
//LCOV_EXCL_STOP
/*#endif /* USING_OPEN_SOURCE_output_ucs4 // JAC */
-NA_EIDPROC
int __output_ucs2(_LC_fcconv_iconv_t *cd, uchar_t *out, int len, ucs4_t word)
{
ucs2_t *outptr = (ucs2_t *)out ;
@@ -1681,7 +1668,6 @@ int __output_ucs2(_LC_fcconv_iconv_t *cd, uchar_t *out, int len, ucs4_t word)
return((uchar_t *)outptr - out) ;
}
-NA_EIDPROC
int __output_utf8(_LC_fcconv_iconv_t *cd, uchar_t *out, int len, ucs4_t word)
{
uchar_t *outptr = out ;
@@ -1725,7 +1711,6 @@ int __output_utf8(_LC_fcconv_iconv_t *cd, uchar_t *out, int len, ucs4_t word)
}
#ifdef USING_OPEN_SOURCE_output_utf7 /* JAC */
-NA_EIDPROC
int __output_utf7(_LC_fcconv_iconv_t *cd, uchar_t *out, int len, ucs4_t word)
{
uchar_t *outptr = out ;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/ipcmsg.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/ipcmsg.cpp b/core/sql/common/ipcmsg.cpp
index 5001f7d..1daa976 100644
--- a/core/sql/common/ipcmsg.cpp
+++ b/core/sql/common/ipcmsg.cpp
@@ -69,7 +69,7 @@ enum {FS_SMS_VERSION_MAY94 = 1};
#include <fcntl.h>
#include "logmxevent.h"
-#if (defined(NA_GUARDIAN_IPC) || defined(NA_GUARDIAN_MSG))
+#if (defined(NA_GUARDIAN_IPC))
// all of these files are OK in the executor environment (PRIV, no globals)
extern "C" {
//#include <cextdecs.h>
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/mb_lconv.c
----------------------------------------------------------------------
diff --git a/core/sql/common/mb_lconv.c b/core/sql/common/mb_lconv.c
index f5a47db..a3ecdbd 100644
--- a/core/sql/common/mb_lconv.c
+++ b/core/sql/common/mb_lconv.c
@@ -109,7 +109,7 @@
#define Max_BIG5_chr 0xF9FF /* Max for using lookup table */
#define BAD_UCS_VAL 0x0000FFFF
-NA_EIDPROC size_t Our_mbtowc_big5_ucs4(WChar_t *pwc, const char *ts, size_t maxlen,
+size_t Our_mbtowc_big5_ucs4(WChar_t *pwc, const char *ts, size_t maxlen,
_LC_charmap_t *hdl)
{
uchar_t *s = (uchar_t *)ts ;
@@ -169,7 +169,7 @@ err_exit:
#define Min_SJIS_chr 0x8140 /* Min for using lookup table */
#define Max_SJIS_chr 0xFC4B /* Max for using lookup table */
-NA_EIDPROC size_t Our_mbtowc_sjis_ucs4(WChar_t *pwc, const char *ts, size_t maxlen,
+size_t Our_mbtowc_sjis_ucs4(WChar_t *pwc, const char *ts, size_t maxlen,
_LC_charmap_t *hdl)
{
uchar_t *s = (uchar_t *)ts ;
@@ -250,7 +250,7 @@ err_exit:
#define Min_KSC_chr 0x8141 /* Min for using lookup table */
#define Max_KSC_chr 0xFEFE /* Max for using lookup table */
-NA_EIDPROC size_t Our_mbtowc_cp949_ucs4(WChar_t *pwc, const char *ts, size_t maxlen,
+size_t Our_mbtowc_cp949_ucs4(WChar_t *pwc, const char *ts, size_t maxlen,
_LC_charmap_t *hdl)
{
uchar_t *s = (uchar_t *)ts ;
@@ -317,7 +317,7 @@ err_exit:
#define EUCJP_ROW_LEN (0xFE - 0xA1 + 1)
#define EUCJP_NUM_ROWS (0xFE - 0xA1 +1)
-NA_EIDPROC size_t Our_mbtowc_eucjp_ucs4(WChar_t *pwc, const char *ts, size_t maxlen,
+size_t Our_mbtowc_eucjp_ucs4(WChar_t *pwc, const char *ts, size_t maxlen,
_LC_charmap_t *hdl)
{
uchar_t *s = (uchar_t *)ts ;
@@ -402,7 +402,7 @@ err_exit:
*/
#define Max_BIG5_UCS_val (0xFFFE)
-NA_EIDPROC int Our_wctomb_big5_ucs4(char *s, WChar_t wc, _LC_charmap_t *hdl)
+int Our_wctomb_big5_ucs4(char *s, WChar_t wc, _LC_charmap_t *hdl)
{
WChar_t mb = 0 ;
@@ -452,7 +452,7 @@ NA_EIDPROC int Our_wctomb_big5_ucs4(char *s, WChar_t wc, _LC_charmap_t *hdl)
*/
#define Max_KSC_UCS_val (0xFFFE)
-NA_EIDPROC int Our_wctomb_cp949_ucs4(char *s, WChar_t wc, _LC_charmap_t *hdl)
+int Our_wctomb_cp949_ucs4(char *s, WChar_t wc, _LC_charmap_t *hdl)
{
WChar_t mb = 0 ;
@@ -508,7 +508,7 @@ NA_EIDPROC int Our_wctomb_cp949_ucs4(char *s, WChar_t wc, _LC_charmap_t *hdl)
*/
#define Max_SJIS_UCS_val (0xFFFE)
-NA_EIDPROC int Our_wctomb_sjis_ucs4(char *s, WChar_t wc, _LC_charmap_t *hdl)
+int Our_wctomb_sjis_ucs4(char *s, WChar_t wc, _LC_charmap_t *hdl)
{
WChar_t mb = 0 ;
@@ -562,7 +562,7 @@ NA_EIDPROC int Our_wctomb_sjis_ucs4(char *s, WChar_t wc, _LC_charmap_t *hdl)
* NOTE: It is the caller's responsibility to ensure output array is
* big enough.
*/
-NA_EIDPROC int Our_wctomb_eucjp_ucs4(char *s, WChar_t wc, _LC_charmap_t *hdl)
+int Our_wctomb_eucjp_ucs4(char *s, WChar_t wc, _LC_charmap_t *hdl)
{
WChar_t mb = 0 ;
@@ -711,8 +711,8 @@ NA_EIDPROC int Our_wctomb_eucjp_ucs4(char *s, WChar_t wc, _LC_charmap_t *hdl)
/*
* Dummy pctomb() and pcstombs() routines
*/
-NA_EIDPROC int __pctomb_mb_ucs4 () { return(-1) ; }
-NA_EIDPROC int __pcstombs_mb_ucs4() { return(-1) ; }
+int __pctomb_mb_ucs4 () { return(-1) ; }
+int __pcstombs_mb_ucs4() { return(-1) ; }
/*
* Dummy cell4_t table
@@ -811,7 +811,7 @@ const static int WCDMAPVAL = WCDMAP ;
/*
* Map a wide character code (UCS) to its multibyte format
*/
-NA_EIDPROC inline static WChar_t WCGETVAL(WChar_t wc) //JAC
+inline static WChar_t WCGETVAL(WChar_t wc) //JAC
{
int row = ROW(wc) ;
if ((row >= WCROWSIZE) || ((row = WCROW[row]) == UCS2_BAD))
@@ -828,7 +828,7 @@ NA_EIDPROC inline static WChar_t WCGETVAL(WChar_t wc) //JAC
/*
* Map a multibyte index to wide character encoding
*/
-NA_EIDPROC inline static WChar_t MBGETVAL(int idx) //JAC
+inline static WChar_t MBGETVAL(int idx) //JAC
{
int row = ROW(idx) ;
if ((row >= MBROWSIZE) || ((row = MBROW[row]) == UCS2_BAD))
@@ -845,7 +845,7 @@ NA_EIDPROC inline static WChar_t MBGETVAL(int idx) //JAC
/*--------------------[ Conversion routines start here ]---------------------*/
#ifdef USING_OPEN_SOURCE_MBLEN
-NA_EIDPROC int MBLEN(const char *ts, size_t maxlen, _LC_charmap_t *hdl)
+int MBLEN(const char *ts, size_t maxlen, _LC_charmap_t *hdl)
{
uchar_t *s = (uchar_t *)ts ;
#ifdef DONT_NEED_THIS // JAC
@@ -886,7 +886,7 @@ NA_EIDPROC int MBLEN(const char *ts, size_t maxlen, _LC_charmap_t *hdl)
}
#endif // USING_OPEN_SOURCE_MBLEN
-NA_EIDPROC size_t MBTOWC(WChar_t *pwc, const char *ts, size_t maxlen, _LC_charmap_t *hdl) // JAC
+size_t MBTOWC(WChar_t *pwc, const char *ts, size_t maxlen, _LC_charmap_t *hdl) // JAC
{
uchar_t *s = (uchar_t *)ts ;
WChar_t wc ; //JAC
@@ -1033,7 +1033,7 @@ err_exit:
return((size_t)-1);
}
-NA_EIDPROC int WCTOMB(char *s, WChar_t wc, _LC_charmap_t *hdl) // JAC
+int WCTOMB(char *s, WChar_t wc, _LC_charmap_t *hdl) // JAC
{
WChar_t mb = 0 ;
#ifdef DONT_NEED_THIS // JAC
@@ -1150,7 +1150,7 @@ success_exit:
}
#ifdef USING_OPEN_SOURCE_MBSTOWCS
-NA_EIDPROC size_t MBSTOWCS(WChar_t *pwcs, const char *ts, size_t n, _LC_charmap_t *hdl) // JAC
+size_t MBSTOWCS(WChar_t *pwcs, const char *ts, size_t n, _LC_charmap_t *hdl) // JAC
{
uchar_t *s = (uchar_t *)ts ;
WChar_t wc ; // JAC
@@ -1231,7 +1231,7 @@ NA_EIDPROC size_t MBSTOWCS(WChar_t *pwcs, const char *ts, size_t n, _LC_charmap_
#endif // USING_OPEN_SOURCE_MBSTOWCS
#ifdef USING_OPEN_SOURCE_WCSTOMBS
-NA_EIDPROC size_t WCSTOMBS(char *s, const WChar_t *pwcs, size_t n, _LC_charmap_t *hdl) // JAC
+size_t WCSTOMBS(char *s, const WChar_t *pwcs, size_t n, _LC_charmap_t *hdl) // JAC
{
#ifdef DONT_NEED_THIS // JAC
int cnt, len, row ;
@@ -1301,7 +1301,7 @@ NA_EIDPROC size_t WCSTOMBS(char *s, const WChar_t *pwcs, size_t n, _LC_charmap_t
#endif // USING_OPEN_SOURCE_WCSTOMBS
#ifdef USING_OPEN_SOURCE_MBTOPC
-NA_EIDPROC size_t
+size_t
MBTOPC(WChar_t *pwc, char *ts, size_t maxlen, int *err, _LC_charmap_t *hdl) // JAC
{
uchar_t *s=(uchar_t *)ts ; /* Better to work with unsigned char. */
@@ -1368,7 +1368,7 @@ MBTOPC(WChar_t *pwc, char *ts, size_t maxlen, int *err, _LC_charmap_t *hdl) // J
#endif // USING_OPEN_SOURCE_MBTOPC
#ifdef USING_OPEN_SOURCE_MBSTOPCS
-NA_EIDPROC size_t MBSTOPCS(WChar_t *pwcs, size_t pwcs_len, const char *s, size_t s_len, /* JAC */
+size_t MBSTOPCS(WChar_t *pwcs, size_t pwcs_len, const char *s, size_t s_len, /* JAC */
int stopchr, char **endptr, int *err, _LC_charmap_t *hdl)
{
int pwcs_cnt = 0 ;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/memtest.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/memtest.cpp b/core/sql/common/memtest.cpp
index 1bc5ad5..747b877 100644
--- a/core/sql/common/memtest.cpp
+++ b/core/sql/common/memtest.cpp
@@ -30,7 +30,6 @@
// by regress/core/TESTMEM and increase the regression runtime substantially.
//
//-------------------------------------------------------------------------
-#undef __EID // force non-mmap based allocation
#include "NAMemory.h"
#include <fstream>
#include <unistd.h>
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/multi-byte.h
----------------------------------------------------------------------
diff --git a/core/sql/common/multi-byte.h b/core/sql/common/multi-byte.h
index fb7d6cf..af7cd5c 100644
--- a/core/sql/common/multi-byte.h
+++ b/core/sql/common/multi-byte.h
@@ -27,11 +27,6 @@
#include <sys/types.h>
-#ifndef NA_EIDPROC
-#define NA_EIDPROC
-#define _resident
-#endif
-
/*
* Macros
*/
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/nawstring.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/nawstring.cpp b/core/sql/common/nawstring.cpp
index ca35736..33ca1a1 100644
--- a/core/sql/common/nawstring.cpp
+++ b/core/sql/common/nawstring.cpp
@@ -150,7 +150,6 @@ NAWString::replace(size_t pos, size_t n1, const NAWchar* cs, size_t n2)
return *this;
}
-SQLEXPORT_LIB_FUNC
NAWString operator+(const NAWString& s1, const NAWString& s2)
{
// Use the special concatenation constructor:
@@ -249,7 +248,6 @@ size_t NAWString::index(const NAWchar* pattern, size_t patLen, size_t startIndex
// call (C macro expansion/invocation) to deallocate the buffer.
// -----------------------------------------------------------------------
//LCOV_EXCL_START :cnu -- As of 8/30/2011, no callers in SQ SQL except copyNAWString() which has no callers
-SQLEXPORT_LIB_FUNC
NAWchar * newNAWcharBuffer(const NAWString& naws, CollHeap *heap)
{
size_t len = naws.length();
@@ -285,7 +283,6 @@ NAWchar * newNAWcharBuffer(const NAWString& naws, CollHeap *heap)
// call (C macro expansion/invocation) to deallocate the buffer.
// -----------------------------------------------------------------------
//LCOV_EXCL_START :cnu -- As of 8/30/2011, no callers in SQ SQL except copyNAWString() which has no callers
-SQLEXPORT_LIB_FUNC
NAWchar * newNAWcharBufferContainingAnEmptyString(CollHeap *heap)
{
NAWchar* buf = NULL;
@@ -306,7 +303,6 @@ NAWchar * newNAWcharBufferContainingAnEmptyString(CollHeap *heap)
// -----------------------------------------------------------------------
// Remove whitespace (spaces and tabs) from front or back or both
// -----------------------------------------------------------------------
-SQLEXPORT_LIB_FUNC
void TrimNAWStringSpace(NAWString& ns, NAString::stripType eStripType) // default is NAString::trailing
{
StringPos i;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/nawstring.h
----------------------------------------------------------------------
diff --git a/core/sql/common/nawstring.h b/core/sql/common/nawstring.h
index 985d3e2..f6b47f5 100644
--- a/core/sql/common/nawstring.h
+++ b/core/sql/common/nawstring.h
@@ -50,7 +50,7 @@
// count in the trailing NAWchar null here.
#define NAW_TO_NASTRING(w) (const char *)w.data(), (w.length()+1) * BYTES_PER_NAWCHAR
-class SQLEXPORT_LIB_FUNC NAWString : public NABasicObject
+class NAWString : public NABasicObject
{
public:
@@ -111,19 +111,15 @@ public:
NAWString ToQuotedWString();
friend
-SQLEXPORT_LIB_FUNC
NAWString operator+(const NAWString& s1, const NAWString& s2);
friend
-SQLEXPORT_LIB_FUNC
NABoolean operator==(const NAWString& s1, const NAWString& s2);
friend
-SQLEXPORT_LIB_FUNC
NABoolean operator< (const NAWString& s1, const NAWString& s2);
friend
-SQLEXPORT_LIB_FUNC
NABoolean operator> (const NAWString& s1, const NAWString& s2);
protected:
@@ -160,29 +156,22 @@ private:
}; //NAWString
// NAWString Logical operators:
-NA_EIDPROC
-//#ifdef NA_NSK // :cnu -- As of 8/30/2011, there are no callers in SQ SQL
inline NABoolean operator==(const NAWString& s1, const NAWString& s2)
{ return s1.fbwstring_ == s2.fbwstring_; }
-NA_EIDPROC
inline NABoolean operator< (const NAWString& s1, const NAWString& s2)
{ return s1.fbwstring_ < s2.fbwstring_; }
//#endif // :cnu
-NA_EIDPROC
inline NABoolean operator!=(const NAWString& s1, const NAWString& s2)
{ return !(s1 == s2); }
-NA_EIDPROC
inline NABoolean operator> (const NAWString& s1, const NAWString& s2)
{ return s1.fbwstring_ > s2.fbwstring_; }
-NA_EIDPROC
inline NABoolean operator<=(const NAWString& s1, const NAWString& s2)
{ return !(s1 > s2); }
-NA_EIDPROC
inline NABoolean operator>=(const NAWString& s1, const NAWString& s2)
{ return !(s1 < s2); }
@@ -191,13 +180,11 @@ inline NABoolean operator>=(const NAWString& s1, const NAWString& s2)
// Returns TRUE if the string consists entirely of whitespace
// (zero or more spaces or tabs, and nothing else), including none (empty str).
// -----------------------------------------------------------------------
-SQLEXPORT_LIB_FUNC
NABoolean IsNAWStringSpaceOrEmpty(const NAWString& naws);
// -----------------------------------------------------------------------
// Remove whitespace (spaces and tabs) from front or back or both
// -----------------------------------------------------------------------
-SQLEXPORT_LIB_FUNC
void TrimNAWStringSpace(NAWString& naws, NAString::stripType s = NAString::trailing);
// -----------------------------------------------------------------------
@@ -212,7 +199,6 @@ void TrimNAWStringSpace(NAWString& naws, NAString::stripType s = NAString::trail
// Use the NADELETEBASIC(returned_NAWchar_star_pointer, heap_pointer)
// call (C macro expansion/invocation) to deallocate the buffer.
// -----------------------------------------------------------------------
-SQLEXPORT_LIB_FUNC
NAWchar * newNAWcharBuffer(const NAWString& naws, CollHeap *heap = NULL);
// -----------------------------------------------------------------------
@@ -228,7 +214,6 @@ NAWchar * newNAWcharBuffer(const NAWString& naws, CollHeap *heap = NULL);
// Use the NADELETEBASIC(returned_NAWchar_star_pointer, heap_pointer)
// call (C macro expansion/invocation) to deallocate the buffer.
// -----------------------------------------------------------------------
-SQLEXPORT_LIB_FUNC
NAWchar * newNAWcharBufferContainingAnEmptyString(CollHeap *heap = NULL);
// // -----------------------------------------------------------------------
@@ -245,6 +230,5 @@ NAWchar * newNAWcharBufferContainingAnEmptyString(CollHeap *heap = NULL);
// //
// // 3/21/2011 Comment out the function because it is not currently used.
// // -----------------------------------------------------------------------
-// SQLEXPORT_LIB_FUNC
// NAWString Latin1StrToUCS2(const NAString & latin1Str, CollHeap * workHeap = NULL);
#endif
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/nchar_mp.h
----------------------------------------------------------------------
diff --git a/core/sql/common/nchar_mp.h b/core/sql/common/nchar_mp.h
index 08fe81a..0008684 100644
--- a/core/sql/common/nchar_mp.h
+++ b/core/sql/common/nchar_mp.h
@@ -59,24 +59,15 @@ class kanji_char_set
{
public:
-NA_EIDPROC
kanji_char_set() {};
-#ifndef PRIV_SRL
-NA_EIDPROC
virtual ~kanji_char_set() {};
-#else
-NA_EIDPROC ~kanji_char_set() {};
-#endif // PRIV_SRL
-
-NA_EIDPROC
static NAWchar space_char() { return ' '; };
-NA_EIDPROC
static NAWchar null_char() {return 0;};
-NA_EIDPROC static NAWchar underscore_char()
+static NAWchar underscore_char()
{
#ifdef NA_LITTLE_ENDIAN
// need to flip the two bytes because KANJI_MP data is in multi-byte
@@ -87,7 +78,7 @@ NA_EIDPROC static NAWchar underscore_char()
#endif
};
-NA_EIDPROC static NAWchar percent_char()
+static NAWchar percent_char()
{
#ifdef NA_LITTLE_ENDIAN
// need to flip the two bytes because KANJI_MP data is in multi-byte
@@ -98,9 +89,9 @@ NA_EIDPROC static NAWchar percent_char()
#endif
};
-NA_EIDPROC static NAWchar maxCharValue() { return USHRT_MAX; };
+static NAWchar maxCharValue() { return USHRT_MAX; };
-NA_EIDPROC static short bytesPerChar() { return 2; };
+static short bytesPerChar() { return 2; };
private:
@@ -118,24 +109,15 @@ class ksc5601_char_set
{
public:
-NA_EIDPROC
ksc5601_char_set() {};
-#ifndef PRIV_SRL
-NA_EIDPROC
virtual ~ksc5601_char_set() {};
-#else
-NA_EIDPROC ~ksc5601_char_set() {};
-#endif // PRIV_SRL
-
-NA_EIDPROC
static NAWchar space_char() { return ' '; };
-NA_EIDPROC
static NAWchar null_char() {return 0;};
-NA_EIDPROC static NAWchar underscore_char()
+static NAWchar underscore_char()
{
#ifdef NA_LITTLE_ENDIAN
// need to flip the two bytes because KANJI_MP data is in multi-byte
@@ -146,7 +128,7 @@ NA_EIDPROC static NAWchar underscore_char()
#endif
};
-NA_EIDPROC static NAWchar percent_char()
+static NAWchar percent_char()
{
#ifdef NA_LITTLE_ENDIAN
// need to flip the two bytes because KANJI_MP data is in multi-byte
@@ -157,10 +139,9 @@ NA_EIDPROC static NAWchar percent_char()
#endif
};
-NA_EIDPROC
static NAWchar maxCharValue() { return USHRT_MAX; };
-NA_EIDPROC static short bytesPerChar() { return 2; };
+static short bytesPerChar() { return 2; };
private:
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/str.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/str.cpp b/core/sql/common/str.cpp
index 8e1195b..bcb9d36 100644
--- a/core/sql/common/str.cpp
+++ b/core/sql/common/str.cpp
@@ -45,10 +45,7 @@
#include <stdarg.h>
-
-#if !defined(__EID) && !defined(ARKFS_OPEN)
#include "ComResWords.h"
-#endif
/*
******************************************************************
@@ -56,7 +53,6 @@
*
*/
-NA_EIDPROC
Int32 isUpper8859_1(NAWchar c)
{
if ((c >= 'A') && (c <= 'Z'))
@@ -75,7 +71,6 @@ Int32 isUpper8859_1(NAWchar c)
}
-NA_EIDPROC
Int32 isLower8859_1(NAWchar c)
{
if ((c >= 'a') && (c <= 'z'))
@@ -94,7 +89,6 @@ Int32 isLower8859_1(NAWchar c)
}
-NA_EIDPROC
Int32 isAlpha8859_1(NAWchar c)
{
if (((c >= 'a') && (c <= 'z')) ||
@@ -115,19 +109,16 @@ Int32 isAlpha8859_1(NAWchar c)
return FALSE;
}
-NA_EIDPROC
Int32 isHexDigit8859_1(NAWchar c)
{
return (isDigit8859_1(c) || ('A' <= c AND c <= 'F' ) || ( 'a' <= c AND c <= 'f'));
}
-NA_EIDPROC
Int32 isAlNum8859_1(NAWchar c)
{
return (isAlpha8859_1(c) || isDigit8859_1(c));
}
-NA_EIDPROC
Int32 isSpace8859_1(NAWchar c)
{
if (((c >= 0x09) && (c <= 0x0d)) ||
@@ -137,7 +128,6 @@ Int32 isSpace8859_1(NAWchar c)
return FALSE;
}
-NA_EIDPROC
Int32 isDigit8859_1(NAWchar c) // ISO 8859-1 char set safe isdigit routine
{
if ((c >= '0') && (c <= '9'))
@@ -145,7 +135,6 @@ Int32 isDigit8859_1(NAWchar c) // ISO 8859-1 char set safe isdigit routine
return FALSE;
}
-NA_EIDPROC
Int32 isCaseInsensitive8859_1(NAWchar c) // ISO 8859-1 char for which there is no
// upcase equivalent. hex values 0xDF & 0xFF
{
@@ -1037,7 +1026,6 @@ char * str_strip_blanks(char *src , Lng32 &len,
return &src[i];
}
-#if !defined(__EID) && !defined(ARKFS_OPEN)
//------------------------------------------------
//See .h file for explanation on parameters etc
//------------------------------------------------
@@ -1164,17 +1152,12 @@ Lng32 str_to_ansi_id(char *src, char *tgt,Lng32 &tgtLen, short mustValidate, cha
tgt = pBuf;
return 0;
}
-#endif
-
-
-
// -----------------------------------------------------------------------
// following two functions are used to return the catalog and schema names
// given a qualified table name. Either the catalog or schema name can be
// a delimited identifier name.
// -----------------------------------------------------------------------
-NA_EIDPROC
Int32 extractDelimitedName (char* tgt, const char* const src, const char sep)
{
Int32 i = 0, j = 0;
@@ -1208,7 +1191,6 @@ Int32 extractDelimitedName (char* tgt, const char* const src, const char sep)
return (i);
}
-NA_EIDPROC
void extractCatSchemaNames (char* catName, char *schName, char* qualTabName)
{
assert(catName && schName && qualTabName);
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/str.h
----------------------------------------------------------------------
diff --git a/core/sql/common/str.h b/core/sql/common/str.h
index eb60ae0..ce8db9a 100644
--- a/core/sql/common/str.h
+++ b/core/sql/common/str.h
@@ -74,7 +74,6 @@ Int32 isAlNum8859_1(NAWchar c);
Int32 isSpace8859_1(NAWchar c);
Int32 isHexDigit8859_1(NAWchar c); // 0, 1, .., A, B, C, D, E, F (case insensitive)
-NA_EIDPROC
Int32 isDigit8859_1(NAWchar c);
Int32 isCaseInsensitive8859_1(NAWchar c); // ISO 8859-1 char for which there is no
@@ -87,7 +86,6 @@ Int32 isCaseInsensitive8859_1(NAWchar c); // ISO 8859-1 char for which there is
// return 0 if left == right,
// return 1 if left > right.
// -----------------------------------------------------------------------
-NA_EIDPROC
inline Int32 str_cmp(const char *left, const char *right, Int32 length)
{
Int32 result = memcmp(left, right, length);
@@ -96,7 +94,6 @@ inline Int32 str_cmp(const char *left, const char *right, Int32 length)
else
return ((result > 0)? 1: -1);
}
-NA_EIDPROC
Int32 str_cmp_ne(const char *left, const char *right);
// str_cmp_c() takes two strings as arguments and returns a value less
@@ -105,7 +102,6 @@ Int32 str_cmp_ne(const char *left, const char *right);
// than the second, or zero if the two strings are equal. The
// comparison is done by comparing the coded (ascii) value of the
// chararacters, character by character.
-NA_EIDPROC
Int32 (str_cmp_c)(const char *s1, const char *s2);
// The str_ncmp() function shall compare not more than n bytes
@@ -114,7 +110,6 @@ Int32 (str_cmp_c)(const char *s1, const char *s2);
// non-zero return value is determined by the sign of the difference
// between the values of the first pair of bytes (both interpreted
// as type unsigned char) that differ in the strings being compared.
-NA_EIDPROC
Int32 (str_ncmp)(const char *s1, const char *s2, size_t n);
// The str_str() function shall locate the first occurrence in the
@@ -123,7 +118,6 @@ Int32 (str_ncmp)(const char *s1, const char *s2, size_t n);
// function returns the pointer to the matching string in s1 or a
// null pointer if a match is not found. If s2 is an empty string,
// the function returns s1.
-NA_EIDPROC
char *(str_str)(const char *s1, const char *s2);
// The str_chr() function shall locate the first occurrence of c
@@ -132,7 +126,6 @@ char *(str_str)(const char *s1, const char *s2);
// returns the location of the found character, or a null pointer
// if the character was not found.
// This function is used to find certain characters in strings.
-NA_EIDPROC
char *(str_chr)(const char *s, Int32 c);
// The str_replace() function shall locate all occurrences in the
@@ -143,13 +136,11 @@ char *(str_chr)(const char *s, Int32 c);
// The function returns the pointer to the replaced string s1 or a
// null pointer if a match is not found. If s2 or s3 are empty strings,
// or do not have the same length, the function returns NULL.
-NA_EIDPROC
char *(str_replace)(char *s1, const char *s2, const char *s3);
// -----------------------------------------------------------------------
// fill string <str> for <length> bytes with <padchar>
// -----------------------------------------------------------------------
-NA_EIDPROC
inline
Int32 str_pad(char *str, Int32 length, char padchar = ' ')
{
@@ -182,14 +173,12 @@ Int32 str_pad(char *str, Int32 length, char padchar = ' ')
// work. You may want to use str_cpy_all() instead; that
// routine works more like memcpy() and behaves well.
// -----------------------------------------------------------------------
-NA_EIDPROC
Int32 str_cpy(char *tgt, const char *src, Int32 tgtlen, char padchar = ' ');
// -----------------------------------------------------------------------
// This routine behaves like str_cpy except that the length of
// the target is also supplied.
// -----------------------------------------------------------------------
-NA_EIDPROC
Int32 byte_str_cpy(char *tgt, Int32 tgtlen,
const char *src, Int32 srclen, char padchar);
@@ -199,7 +188,6 @@ Int32 byte_str_cpy(char *tgt, Int32 tgtlen,
// s1. If copying takes place between objects that overlap,
// the behavior is undefined. The function returns s1. No value is
// used to indicate an error.
-NA_EIDPROC
char *(str_cpy_c)(char *s1, const char *s2);
// The str_ncpy() function shall copy not more than n bytes (bytes
@@ -210,13 +198,11 @@ char *(str_cpy_c)(char *s1, const char *s2);
// shall be appended to the copy in the array pointed to by s1, until
// n bytes in all are written. The function shall return s1;
// no return value is reserved to indicate an error.
-NA_EIDPROC
char *(str_ncpy)(char *s1, const char *s2, size_t n);
// -----------------------------------------------------------------------
// concatenate <first> and <second> and store the result in <result>
// -----------------------------------------------------------------------
-NA_EIDPROC
Int32 str_cat(const char *first, const char *second, char *result);
@@ -228,21 +214,17 @@ Int32 str_cat(const char *first, const char *second, char *result);
// This function is used to attach one string to the end of another
// string. It is imperative that the first string (s1) have the space
// needed to store both strings.
-NA_EIDPROC
char *(str_cat_c)(char *s1, const char *s2);
// -----------------------------------------------------------------------
// convert <i> to ASCII and store the result in <outstr>
// -----------------------------------------------------------------------
-NA_EIDPROC
char *str_itoa(ULng32 i, char *outstr);
-NA_EIDPROC
char *str_ltoa(Int64 i, char *outstr);
// -----------------------------------------------------------------------
// convert instr to numeric and return in i. String must be numbers only.
// -----------------------------------------------------------------------
-NA_EIDPROC
Int64 str_atoi(const char * instr, Lng32 instrLen);
// convert a scaled exact numeric string and return as float.
@@ -253,13 +235,11 @@ double str_ftoi(const char * instr, Lng32 instrLen);
// the compiler is fixed to inline routines with calls to assert,
// Remove callAssert() in callers and replace with direct call to
// assert.
-NA_EIDPROC
void callAssert(const char* tgt, const char* src, Lng32 length);
// -----------------------------------------------------------------------
// move <length> bytes from <src> to <tgt>
// -----------------------------------------------------------------------
-NA_EIDPROC
inline void str_cpy_all(char *tgt, const char *src, Lng32 length)
{
if ((!tgt || !src) && length)
@@ -281,7 +261,6 @@ inline void str_cpy_all(char *tgt, const char *src, Lng32 length)
// move <length> bytes from <src> to <tgt>
// handles overlapping memory between target and source
// -----------------------------------------------------------------------
-NA_EIDPROC
void str_memmove(char *tgt, const char *src, Lng32 length);
// -----------------------------------------------------------------------
@@ -292,14 +271,12 @@ void str_memmove(char *tgt, const char *src, Lng32 length);
//
// Compare convertNAString in String.h
// -----------------------------------------------------------------------
-NA_EIDPROC
Int32 str_varchar_alloc_and_copy(char *tgt, const char *src, Lng32 length);
// -----------------------------------------------------------------------
// Copies <src> to <tgt> for <length> bytes.
// Removes trailing <blank_char>s by putting an <end_char> as terminator.
// -----------------------------------------------------------------------
-NA_EIDPROC
Int32 str_cpy_and_null(char * tgt,
const char * src,
Lng32 length,
@@ -312,31 +289,27 @@ Int32 str_cpy_and_null(char * tgt,
// else downshifts.
// Src and Tgt may point to the same location.
// ---------------------------------------------------------------
-NA_EIDPROC
Int32 str_cpy_convert(char * tgt, char * src,
Lng32 length, Int32 upshift);
-NA_EIDPROC
Int32 str_len(const char * s);
// -----------------------------------------------------------------------
// "Increments" a string. If successful, 0 is returned. Otherwise, 1
// is returned.
// -----------------------------------------------------------------------
-NA_EIDPROC
Int32 str_inc(const ULng32 length, char * s);
// -----------------------------------------------------------------------
// Complements a string.
// -----------------------------------------------------------------------
-NA_EIDPROC
void str_complement(const ULng32 length, char * s);
//------------------------------------------------------------------------
// Our own version of sprintf that provides a subset of the functionality
// of sprintf as we cannot call C runtime from the SQL executor.
//------------------------------------------------------------------------
-NA_EIDPROC
+
Int32 str_sprintf(char *, const char *, ...);
// -----------------------------------------------------------------------
@@ -349,13 +322,9 @@ Int32 str_sprintf(char *, const char *, ...);
// bytes decoded
// -----------------------------------------------------------------------
-NA_EIDPROC
Lng32 str_encoded_len(Lng32 byteLen);
-NA_EIDPROC
Lng32 str_encode(char *tgt, Lng32 tgtMaxLen, void *src, Lng32 srcLen);
-NA_EIDPROC
Lng32 str_decoded_len(Lng32 srcLen);
-NA_EIDPROC
Lng32 str_decode(void *tgt, Lng32 tgtMaxLen, const char *src, Lng32 srcLen);
//------------------------------------------------------------------------
@@ -378,14 +347,13 @@ char * str_strip_blanks(char *src , Lng32 &len,
// characters to be allowed as part of the Id, then a null termintated string
// of these chars needs to be passed in eg : "$#"
//------------------------------------------------------------------------
-NA_EIDPROC Lng32 str_to_ansi_id(char *src, char *tgt,Lng32 &tgtLen,short mustValidate = 1, char *allowedChar = 0);
+Lng32 str_to_ansi_id(char *src, char *tgt,Lng32 &tgtLen,short mustValidate = 1, char *allowedChar = 0);
//int strSprintf(char * buffer, char * format, ...);
// -----------------------------------------------------------------------
// following function is used to extract a name that may be delimited
// from a given string. The name may end with a separator or end of line.
// -----------------------------------------------------------------------
-NA_EIDPROC
Int32 extractDelimitedName (char* tgt, const char* const src, const char sep = '.');
// -----------------------------------------------------------------------
@@ -393,10 +361,9 @@ Int32 extractDelimitedName (char* tgt, const char* const src, const char sep =
// given a qualified table name. Either the catalog or schema name can be
// a delimited identifier name.
// -----------------------------------------------------------------------
-NA_EIDPROC
+
void extractCatSchemaNames (char* catName, char *schName, char* qualTabName);
-NA_EIDPROC
//inline
Int32 mem_cpy_all(void *tgt, const void *src, Lng32 length);
//{
@@ -410,7 +377,6 @@ Int32 mem_cpy_all(void *tgt, const void *src, Lng32 length);
//}
-NA_EIDPROC
// Similar to strtok, but for the following
// Only one character can be delimiter
// Third parameter char **internal should not be manipulated by the caller
@@ -422,11 +388,8 @@ char *str_tok(char *inStr, char c, char **internal);
// String compression and decompression functions using RLE method
// See str.cpp for details
//------------------------------------------------------------------------
-NA_EIDPROC
size_t str_compress_size(const char *src, const size_t len);
-NA_EIDPROC
size_t str_compress(char *tgt, const char *src, const size_t len);
-NA_EIDPROC
size_t str_decompress(char *tgt, const char *src, const size_t srcLen);
// -----------------------------------------------------------------------
@@ -437,7 +400,6 @@ size_t str_decompress(char *tgt, const char *src, const size_t srcLen);
// The computed length includes neither the NULL terminator character
// nor the 0x (or 0X) prefix.
// -----------------------------------------------------------------------
-NA_EIDPROC
size_t str_computeHexAsciiLen(size_t srcByteLen);
// -----------------------------------------------------------------------
@@ -446,7 +408,6 @@ size_t str_computeHexAsciiLen(size_t srcByteLen);
// The output string does not include the 0x prefix. By default a
// NULL character - i.e. '\0' - is appended to the output string.
// -----------------------------------------------------------------------
-NA_EIDPROC
Int32 str_convertToHexAscii(const char * src, // in
const size_t srcLength, // in
char * result, // out
@@ -465,6 +426,5 @@ Int32 str_convertToHexAscii(const char * src, // in
//
// printBrief(dataPointer, len, FALSE) if you don't
//
-NA_EIDPROC
void printBrief(char* dataPointer, Lng32 keyLen, NABoolean endLine = TRUE);
#endif // STR_H
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/stringBuf.h
----------------------------------------------------------------------
diff --git a/core/sql/common/stringBuf.h b/core/sql/common/stringBuf.h
index fdcb0fb..b03f8b1 100644
--- a/core/sql/common/stringBuf.h
+++ b/core/sql/common/stringBuf.h
@@ -48,24 +48,24 @@
#include "NAWinNT.h"
#endif
-#ifdef NA_DEBUG_C_RUNTIME
+#ifdef _DEBUG
#include <iostream>
-#endif // NA_DEBUG_C_RUNTIME
+#endif // _DEBUG
template <class T> class stringBuf
{
public:
-NA_EIDPROC stringBuf(T* buf, Int32 len, CollHeap* heap = 0) :
+stringBuf(T* buf, Int32 len, CollHeap* heap = 0) :
buf_(buf), bufSize_(len), count_(len), alloc_(FALSE), heap_(heap) {};
-NA_EIDPROC stringBuf(T* buf, Int32 iBufSize, Int32 iStrLen, CollHeap* heap = 0) :
+stringBuf(T* buf, Int32 iBufSize, Int32 iStrLen, CollHeap* heap = 0) :
buf_(buf), bufSize_(iBufSize),
count_(iStrLen <= iBufSize? iStrLen : iBufSize),
alloc_(FALSE), heap_(heap) {};
-NA_EIDPROC stringBuf(Int32 len, CollHeap* heap = 0) :
+ stringBuf(Int32 len, CollHeap* heap = 0) :
bufSize_(len),
count_(len), // should be set to 0, but keep the existing behavior for now
alloc_(FALSE), heap_(heap)
@@ -84,7 +84,6 @@ NA_EIDPROC stringBuf(Int32 len, CollHeap* heap = 0) :
}
};
-NA_EIDPROC
~stringBuf()
{
if ( alloc_ ) {
@@ -95,34 +94,24 @@ NA_EIDPROC
}
};
-NA_EIDPROC
inline Int32 getBufSize() const { return bufSize_; }
-NA_EIDPROC
inline Int32 getStrLen() const { return count_; } // same as length()
-NA_EIDPROC
inline Int32 length() const { return count_; }
-NA_EIDPROC
inline void setStrLen(Int32 x) { count_ = (x <= bufSize_) ? x : bufSize_; } // avoid buffer overrun
-NA_EIDPROC
inline void setLength(Int32 x) { count_ = x; }
-NA_EIDPROC
inline T* data() const { return buf_; }
-NA_EIDPROC
T operator() (Int32 i) const { return buf_[i]; };
-NA_EIDPROC
T last() const { return buf_[getStrLen()-1]; };
-NA_EIDPROC
void decrementAndNullTerminate() { /* if (count > 0) */ buf_[--count_]=0; }
-NA_EIDPROC
void zeroOutBuf(Int32 startPos = 0)
{
if (startPos >= 0 && buf_ && bufSize_ > 0 && bufSize_ - startPos > 0)
@@ -132,8 +121,7 @@ NA_EIDPROC
}
};
-#ifdef NA_DEBUG_C_RUNTIME
-NA_EIDPROC
+#ifdef _DEBUG
ostream& print(ostream& out) {
Int32 i=0;
@@ -147,7 +135,7 @@ NA_EIDPROC
out << endl;
return out;
};
-#endif // NA_DEBUG_C_RUNTIME
+#endif // _DEBUG
private:
T* buf_;
@@ -172,17 +160,14 @@ typedef stringBuf<unsigned char> charBuf;
// is returned; otherwise, NULL is returned.
// case 2: target buffer pointer 'target' is NULL
// a buffer of SIZE is allocated from the heap (if the heap argument
-// is not NULL), or from the C runtime system heap if NA_NO_C_RUNTIME is
-// not defined. Otherwise, a NULL is returned.
+// is not NULL), or from the C runtime system heap.
// For either case, SIZE is defined as olen + (addNullAtEnd) ? 1 : 0.
//
// If addNullAtEnd is TRUE, a NULL will be inserted at the beginning of 'target'
// if it is not NULL.
//
-NA_EIDPROC
NAWcharBuf* checkSpace(CollHeap* heap, Int32 olen, NAWcharBuf*& target, NABoolean addNullAtEnd);
-NA_EIDPROC
charBuf* checkSpace(CollHeap* heap, Int32 olen, charBuf*& target, NABoolean addNullAtEnd);
#endif
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/swscanf.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/swscanf.cpp b/core/sql/common/swscanf.cpp
index 33ffb37..241fc64 100644
--- a/core/sql/common/swscanf.cpp
+++ b/core/sql/common/swscanf.cpp
@@ -114,7 +114,6 @@ typedef quad_t (*ccfnT)(const NAWchar*);
#include <string.h>
-NA_EIDPROC
Int32
__srefill(SCANBUF* fp)
@@ -122,7 +121,6 @@ __srefill(SCANBUF* fp)
return 1;
}
-NA_EIDPROC
void ungetc(NAWchar c, SCANBUF* fp)
{
fp->_p--;
@@ -135,7 +133,6 @@ void ungetc(NAWchar c, SCANBUF* fp)
* closing `]'. The table has a 1 wherever characters should be
* considered part of the scanset.
*/
-NA_EIDPROC
static NAWchar *
__sccl(NAWchar* tab, NAWchar* fmt)
{
@@ -236,7 +233,6 @@ doswitch:
/*
* vfscanf
*/
-NA_EIDPROC
Int32
__svfscanf(SCANBUF* fp, NAWchar const* fmt0, va_list ap)
{
@@ -844,7 +840,6 @@ match_failure:
return (nassigned);
}
-NA_EIDPROC
Int32 na_swscanf(const NAWchar *str, NAWchar const *fmt, ...)
{
Int32 ret;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/swsprintf.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/swsprintf.cpp b/core/sql/common/swsprintf.cpp
index 84fc586..fbcc1e8 100644
--- a/core/sql/common/swsprintf.cpp
+++ b/core/sql/common/swsprintf.cpp
@@ -79,7 +79,6 @@
//#define FLOATING_POINT 1
-NA_EIDPROC
Int32
vfprintf(SPRINTF_BUF* fp, const NAWchar* fmt0, va_list ap);
@@ -152,7 +151,6 @@ static Int32 exponent __P((char *, Int32, Int32));
#define SHORTINT 0x040 /* short integer */
#define ZEROPAD 0x080 /* zero (as opposed to blank) pad */
#define FPT 0x100 /* Floating point number */
-NA_EIDPROC
Int32
vfprintf(SPRINTF_BUF* fp, const NAWchar* fmt0, va_list ap)
{
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/unicode_char_set.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/unicode_char_set.cpp b/core/sql/common/unicode_char_set.cpp
index 9f1eee4..e469da8 100644
--- a/core/sql/common/unicode_char_set.cpp
+++ b/core/sql/common/unicode_char_set.cpp
@@ -43,9 +43,7 @@
#include "unicode_char_set.h"
#include "BaseTypes.h"
-#if !defined(_EID) && !defined(CLI_PRIV_SRL)
#include "nawstring.h"
-#endif
// 4/10/98 Unicode char/string manipulations
@@ -80,7 +78,6 @@ static const unicode_mapping_t unicode_upper2lower_mapping_table[] =
};
-NA_EIDPROC
NAWchar
binary_search(NAWchar wc, Int32 lower, Int32 upper,
unicode_mapping_t table[])
@@ -99,7 +96,6 @@ binary_search(NAWchar wc, Int32 lower, Int32 upper,
}
// search the lower to upper full mapping table
-NA_EIDPROC
NAWchar*
binary_search(NAWchar wc, Int32 lower, Int32 upper,
unicode_mapping_full_t table[])
@@ -154,7 +150,6 @@ NAWchar* unicode_char_set::to_upper_full(const NAWchar x)
// by ConstValue::toUpper() while applying upper method on constants.
// The 'len' number of chars in 'str' are upshifted and the result
// is kept in 'upStr'.
-#if !defined(__EID) && !defined(CLI_PRIV_SRL)
void
unicode_char_set::to_upper(NAWchar *str, size_t len, NAWString &upStr)
{
@@ -179,7 +174,6 @@ unicode_char_set::to_upper(NAWchar *str, size_t len, NAWString &upStr)
}
}
}
-#endif
/*
long unicode_char_set::to_upper(NAWchar *str, long srcLen,
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/unicode_char_set.h
----------------------------------------------------------------------
diff --git a/core/sql/common/unicode_char_set.h b/core/sql/common/unicode_char_set.h
index 2b54a71..8e98292 100644
--- a/core/sql/common/unicode_char_set.h
+++ b/core/sql/common/unicode_char_set.h
@@ -65,50 +65,32 @@ public:
enum CHAR_CODE_POINTS {SPACE=0x0020, PERCENT=0x0025, UNDERSCORE=0x005F};
-NA_EIDPROC
unicode_char_set() {};
-#ifndef PRIV_SRL
-NA_EIDPROC
virtual ~unicode_char_set() {};
-#else
-NA_EIDPROC ~unicode_char_set() {};
-#endif // PRIV_SRL
-NA_EIDPROC
static NAWchar to_upper(const NAWchar);
-#if !defined(__EID) && !defined(CLI_PRIV_SRL)
-NA_EIDPROC
static void to_upper(NAWchar *, size_t, NAWString &);
-#endif
static Lng32 to_upper(NAWchar *, Lng32 , NAWchar *, Lng32);
// For full case mapping, an lower case character may map to
// more than one upper case character
-NA_EIDPROC
static NAWchar* to_upper_full(const NAWchar);
-NA_EIDPROC
static NAWchar to_lower(const NAWchar);
-NA_EIDPROC
static NAWchar space_char() { return unicode_char_set::SPACE; };
-NA_EIDPROC
static NAWchar null_char() {return 0;};
-NA_EIDPROC
static NAWchar underscore_char() { return unicode_char_set::UNDERSCORE; };
-NA_EIDPROC
static NAWchar percent_char() { return unicode_char_set::PERCENT; };
-NA_EIDPROC
static NAWchar maxCharValue() { return USHRT_MAX; };
-NA_EIDPROC
static short bytesPerChar() { return sizeof(NAWchar); };
static NABoolean isValidUCS2CodePoint(NAWchar wc)
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/wc_scanf_sprintf.h
----------------------------------------------------------------------
diff --git a/core/sql/common/wc_scanf_sprintf.h b/core/sql/common/wc_scanf_sprintf.h
index d4c7a44..998c52b 100644
--- a/core/sql/common/wc_scanf_sprintf.h
+++ b/core/sql/common/wc_scanf_sprintf.h
@@ -24,24 +24,6 @@
#ifndef WIDECHAR_H
#define WIDECHAR_H 1
-/* uncomment out for debug
-#if !defined(NA_NSK) // for debug on NT only
-#include <wchar.h>
-#else
-#include "NAWinnt.h"
-#endif
-
-#ifdef NAWchar
-#undef NAWchar
-#endif
-
-#if !defined(NA_NSK) // for debug on NT only
-#define NAWchar NAWchar
-#else
-#define NAWchar NAWchar
-#endif
-*/
-
#include "NAWinNT.h"
struct _scanfbuf {
@@ -68,7 +50,7 @@ typedef struct _sprintf_buf SPRINTF_BUF;
Int32
na_wsprintf(NAWchar *str, NAWchar const *fmt, ...);
-#if (defined(NA_C89) || defined(NA_WINNT) || defined(NA_HSC_WINDOWS))
+#if (defined(NA_C89) || defined(NA_WINNT))
typedef UInt64 u_quad_t;
typedef Int64 quad_t;
#endif
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/common/wstr.h
----------------------------------------------------------------------
diff --git a/core/sql/common/wstr.h b/core/sql/common/wstr.h
index a7f9d81..ca819eb 100644
--- a/core/sql/common/wstr.h
+++ b/core/sql/common/wstr.h
@@ -62,7 +62,6 @@ Int32 compareWcharWithBlankPadding(const NAWchar *wstr1, UInt32 len1,
// return 0 if left == right,
// return a positive value if left > right.
// -----------------------------------------------------------------------
-NA_EIDPROC
inline
Int32 wc_str_cmp(const NAWchar *left, const NAWchar *right, Int32 length)
{
@@ -76,7 +75,7 @@ Int32 wc_str_cmp(const NAWchar *left, const NAWchar *right, Int32 length)
// -----------------------------------------------------------------------
// fill string <str> for <length> bytes with <padchar>
// -----------------------------------------------------------------------
-NA_EIDPROC
+
inline
void wc_str_pad(NAWchar *str, Int32 length,
NAWchar padchar = unicode_char_set::SPACE)
@@ -85,7 +84,6 @@ void wc_str_pad(NAWchar *str, Int32 length,
}
// Swap bytes for each NAWchar in the string.
-NA_EIDPROC
inline
void wc_swap_bytes(NAWchar *str, Int32 length)
{
@@ -103,7 +101,6 @@ void wc_swap_bytes(NAWchar *str, Int32 length)
}
}
-NA_EIDPROC
Int32 na_wstr_cpy_convert(NAWchar *tgt, NAWchar *src, Lng32 length, Int32 upshift);
#endif
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/executor/ExBitMapTable.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExBitMapTable.cpp b/core/sql/executor/ExBitMapTable.cpp
index ea0f0ff..375007f 100644
--- a/core/sql/executor/ExBitMapTable.cpp
+++ b/core/sql/executor/ExBitMapTable.cpp
@@ -107,12 +107,6 @@ ExBitMapTable::ExBitMapTable(Int32 keySize, Int32 dataSize, Int32 countOffset,
//
numberHashBuckets_ = ROUND2(memSize_ / (sizeof(char*) + rowSize_));
-//#ifdef _DEBUG
-//#ifndef _EID
- // if(getenv("EX_BITMAP_BUCKETS"))
- // numberHashBuckets_ = atoi(getenv("EX_BITMAP_BUCKETS"));
-//#endif
-//#endif
// Compute the maximum number of groups that can be stored in the table.
//
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/executor/ExBitMapTable.h
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExBitMapTable.h b/core/sql/executor/ExBitMapTable.h
index 92f4403..670b903 100644
--- a/core/sql/executor/ExBitMapTable.h
+++ b/core/sql/executor/ExBitMapTable.h
@@ -56,66 +56,54 @@ class ExBitMapTable : public ExGod {
public:
// constructor
//
-NA_EIDPROC
ExBitMapTable(Int32 keySize, Int32 dataSize, Int32 countOffset,
Int32 memSize, NAMemory *heap);
// destructor
//
-NA_EIDPROC
~ExBitMapTable();
// Returns the maximum number of groups that can fit in the table. This
// reflects the best case scenario.
//
-NA_EIDPROC
Int32 getMaximumNumberGroups() const { return maximumNumberGroups_; };
// Returns the minimum number of groups that can fit in the table. This
// reflects the worst case scenario.
//
-NA_EIDPROC
Int32 getMinimumNumberGroups() const { return maximumNumberGroups_; };
// Returns a pointer to the current group's data.
//
-NA_EIDPROC
char *getData() const { return data_; };
// Returns a pointer to the Nth group's data.
//
-NA_EIDPROC
char *getGroup(Int32 n) { return groups_ + n * rowSize_; }
// Returns a pointer to the group's key.
//
-NA_EIDPROC
char *getKey(char *group) { return group + dataSize_; }
// Returns a pointer to the group's next group pointer.
//
-NA_EIDPROC
char**getNextPtr(char *group)
{ return (char**)(group + dataSize_ + ROUND4(keySize_) ); }
// Return the number of groups in the table.
//
-NA_EIDPROC
Int32 getNumberGroups() const { return numberGroups_; };
// Advances the current return group.
//
-NA_EIDPROC
void advanceReturnGroup() { returnGroup_++; };
// Resets the current return group.
//
-NA_EIDPROC
void resetReturnGroup() { returnGroup_ = 0; };
// Gets the current returng group.
//
-NA_EIDPROC
char *getReturnGroup() {
if(returnGroup_ < numberGroups_) return getGroup(returnGroup_);
return NULL;
@@ -123,22 +111,18 @@ NA_EIDPROC
// Find or adds the group pointed to be key to the table.
//
-NA_EIDPROC
Int32 findOrAdd(char *key);
// Initialize any table aggregates.
//
-NA_EIDPROC
inline void initAggregates() { *(Int64*)(data_ + countOffset_) = 0; };
// Increment any table aggregates.
//
-NA_EIDPROC
inline void applyAggregates() { (*(Int64*)(data_ + countOffset_))++; };
// Reset the table.
//
-NA_EIDPROC
void reset();
private:
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/executor/ExCancel.h
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExCancel.h b/core/sql/executor/ExCancel.h
index 9eb2b1c..1382364 100644
--- a/core/sql/executor/ExCancel.h
+++ b/core/sql/executor/ExCancel.h
@@ -57,16 +57,16 @@ public:
// retrieval of the virtual table function pointer of the class while
// unpacking. An empty constructor is enough.
// ---------------------------------------------------------------------
- NA_EIDPROC ExCancelTdb()
+ ExCancelTdb()
{}
- NA_EIDPROC virtual ~ExCancelTdb()
+ virtual ~ExCancelTdb()
{}
// ---------------------------------------------------------------------
// Build a TCB for this TDB. Redefined in the Executor project.
// ---------------------------------------------------------------------
- NA_EIDPROC virtual ex_tcb *build(ex_globals *globals);
+ virtual ex_tcb *build(ex_globals *globals);
private:
// ---------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/executor/ExComTdb.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExComTdb.cpp b/core/sql/executor/ExComTdb.cpp
index a68f80f..cd54970 100644
--- a/core/sql/executor/ExComTdb.cpp
+++ b/core/sql/executor/ExComTdb.cpp
@@ -53,9 +53,6 @@
#include "ex_onlj.h"
#include "ex_tuple_flow.h"
#include "ExFastTransport.h"
-
-
-#ifndef __EID
#include "ex_root.h"
#include "ex_mj.h"
#include "ex_hashj.h"
@@ -81,9 +78,6 @@
#include "ExHdfsScan.h"
#include "ExHbaseAccess.h"
-
-#endif
-
// -----------------------------------------------------------------------
// When called within tdm_sqlcli.dll, fixupVTblPtr() translates to a call
// to fix up the TDB's to the Executor version. This function is also
@@ -124,7 +118,7 @@ void ComTdb::fixupVTblPtrExe()
// implemented in the comexe project (in ComTdb.cpp) which returns the
// pointer for an "compiler TDB".
// -----------------------------------------------------------------------
-NA_EIDPROC char *ComTdb::findVTblPtrExe(short classID)
+char *ComTdb::findVTblPtrExe(short classID)
{
char *vtblptr = NULL;
switch (classID)
@@ -212,8 +206,6 @@ NA_EIDPROC char *ComTdb::findVTblPtrExe(short classID)
break;
}
-// LCOV_EXCL_START
-
case ex_NON_LEAF_TUPLE:
{
#pragma nowarn(1506) // warning elimination
@@ -222,10 +214,6 @@ NA_EIDPROC char *ComTdb::findVTblPtrExe(short classID)
break;
}
-#ifndef __EID
-
-// LCOV_EXCL_STOP
-
case ex_CONTROL_QUERY:
{
#pragma nowarn(1506) // warning elimination
@@ -241,7 +229,6 @@ NA_EIDPROC char *ComTdb::findVTblPtrExe(short classID)
#pragma warn(1506) // warning elimination
break;
}
-#endif
case ex_ONLJ:
{
@@ -282,7 +269,6 @@ NA_EIDPROC char *ComTdb::findVTblPtrExe(short classID)
break;
}
-#ifndef __EID
case ex_UDR:
{
#pragma nowarn(1506) // warning elimination
@@ -361,7 +347,6 @@ NA_EIDPROC char *ComTdb::findVTblPtrExe(short classID)
#pragma warn(1506) // warning elimination
break;
}
-#endif
case ex_TUPLE_FLOW:
{
@@ -371,7 +356,6 @@ NA_EIDPROC char *ComTdb::findVTblPtrExe(short classID)
break;
}
-#ifndef __EID
case ex_SET_TIMEOUT:
{
#pragma nowarn(1506) // warning elimination
@@ -733,7 +717,6 @@ case ex_LOB_INFO:
break;
}
-#endif
default:
ex_assert(0, "findVTblPtrExe(): Cannot find entry of this ClassId"); // LCOV_EXCL_LINE
break;
@@ -741,7 +724,6 @@ case ex_LOB_INFO:
return vtblptr;
}
-NA_EIDPROC
void fixupExeVtblPtr(ComTdb * tdb)
{
for (Int32 i = 0; i < tdb->numChildren(); i++)
@@ -755,7 +737,6 @@ void fixupExeVtblPtr(ComTdb * tdb)
}
-NA_EIDPROC
void fixupComVtblPtr(ComTdb * tdb)
{
for (Int32 i = 0; i < tdb->numChildren(); i++)
@@ -769,7 +750,6 @@ void fixupComVtblPtr(ComTdb * tdb)
}
-NA_EIDPROC
void resetBufSize(ex_tcb * tcb, Lng32 &tcbSpaceNeeded, Lng32 &poolSpaceNeeded)
{
for (Int32 i = 0; i < tcb->numChildren(); i++)
@@ -805,7 +785,6 @@ void resetBufSize(ex_tcb * tcb, Lng32 &tcbSpaceNeeded, Lng32 &poolSpaceNeeded)
}
#pragma nowarn(262) // warning elimination
-NA_EIDPROC
Lng32 getTotalTcbSpace(char*inTdb, char * otherInfo, char * parentMemory)
{
ComTdb * tdb = (ComTdb*)inTdb;
@@ -820,7 +799,6 @@ Lng32 getTotalTcbSpace(char*inTdb, char * otherInfo, char * parentMemory)
NAHeap heap("temp heap", (NAHeap*)parentMemory, 32000 /*blocksize*/);
ex_globals * g = NULL;
-#ifndef __EID
switch (tdb->getNodeType())
{
// LCOV_EXCL_START
@@ -843,8 +821,6 @@ Lng32 getTotalTcbSpace(char*inTdb, char * otherInfo, char * parentMemory)
break;
}
-#else
-#endif
g->setComputeSpace(TRUE);
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/executor/ExCompoundStmt.h
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExCompoundStmt.h b/core/sql/executor/ExCompoundStmt.h
index fed1674..641eacc 100644
--- a/core/sql/executor/ExCompoundStmt.h
+++ b/core/sql/executor/ExCompoundStmt.h
@@ -164,16 +164,16 @@ public:
// retrieval of the virtual table function pointer of the class while
// unpacking. An empty constructor is enough.
// ---------------------------------------------------------------------
- NA_EIDPROC ExCatpoundStmtTdb()
+ ExCatpoundStmtTdb()
{}
- NA_EIDPROC virtual ~ExCatpoundStmtTdb()
+ virtual ~ExCatpoundStmtTdb()
{}
// ---------------------------------------------------------------------
// Build a TCB for this TDB. Redefined in the Executor project.
// ---------------------------------------------------------------------
- NA_EIDPROC virtual ex_tcb *build(ex_globals *globals);
+ virtual ex_tcb *build(ex_globals *globals);
private:
// ---------------------------------------------------------------------
@@ -214,86 +214,60 @@ class ExCatpoundStmtTcb : public ex_tcb
public:
// Standard TCB methods.
-NA_EIDPROC
ExCatpoundStmtTcb(const ExCatpoundStmtTdb &tdb,
const ex_tcb &left,
const ex_tcb &right,
ex_globals *glob);
-NA_EIDPROC
~ExCatpoundStmtTcb();
-NA_EIDPROC
void freeResources() {}
-NA_EIDPROC
void registerSubtasks();
-NA_EIDPROC
virtual const ex_tcb* getChild(Int32 pos) const;
-NA_EIDPROC
virtual Int32 numChildren() const { return 2; }
-NA_EIDPROC
ExWorkProcRetcode work();
private:
// CS TCB specific methods.
-NA_EIDPROC
ex_queue_pair getParentQueue() const { return qparent_; }
-NA_EIDPROC
ExWorkProcRetcode workDownLeft();
-NA_EIDPROC
ExWorkProcRetcode workLeft2Right();
-NA_EIDPROC
ExWorkProcRetcode workUp();
-NA_EIDPROC
ExWorkProcRetcode workCancel();
-NA_EIDPROC
static ExWorkProcRetcode sWorkDownLeft(ex_tcb *tcb)
{ return ((ExCatpoundStmtTcb *) tcb)->workDownLeft(); }
-NA_EIDPROC
static ExWorkProcRetcode sWorkLeft2Right(ex_tcb *tcb)
{ return ((ExCatpoundStmtTcb *) tcb)->workLeft2Right(); }
-NA_EIDPROC
static ExWorkProcRetcode sWorkUp(ex_tcb *tcb)
{ return ((ExCatpoundStmtTcb *) tcb)->workUp(); }
-NA_EIDPROC
+
static ExWorkProcRetcode sWorkCancel(ex_tcb *tcb)
{ return ((ExCatpoundStmtTcb *) tcb)->workCancel(); }
-NA_EIDPROC
void startLeftChild();
-NA_EIDPROC
void flowLeft2Right(ex_queue_entry *lentry);
-NA_EIDPROC
void flowParent2Right(queue_index pindex);
-NA_EIDPROC
void passChildReplyUp(ex_queue_entry *centry);
-NA_EIDPROC
void processError(atp_struct *atp, ComDiagsArea *da);
-NA_EIDPROC
void processCardinalityError(ex_queue_entry *centry);
-NA_EIDPROC
void processEODErrorOrWarning(NABoolean isWarning);
-NA_EIDPROC
inline ExCatpoundStmtTdb & csTdb() const
{ return (ExCatpoundStmtTdb &) tdb; }
-NA_EIDPROC
inline NABoolean expectingRightRows() const
{ return csTdb().expectingRightRows(); }
-NA_EIDPROC
inline NABoolean expectingLeftRows() const
{ return csTdb().expectingLeftRows(); }
-NA_EIDPROC
inline NABoolean afterUpdate() const
{ return csTdb().afterUpdate(); }
@@ -329,18 +303,14 @@ class ExCatpoundStmtPrivateState : public ex_tcb_private_state
public:
// Standard private state methods.
-NA_EIDPROC
ExCatpoundStmtPrivateState(const ExCatpoundStmtTcb *tcb)
{ init(); }
-NA_EIDPROC
~ExCatpoundStmtPrivateState(){}
-NA_EIDPROC
ex_tcb_private_state * allocate_new(const ex_tcb *tcb);
private:
-NA_EIDPROC
void init();
private: