8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 09:20:39 +01:00
This commit is contained in:
asfernandes 2007-04-21 03:27:36 +00:00
parent bf6a2a7e98
commit f676883248
8 changed files with 14 additions and 99 deletions

View File

@ -27,7 +27,6 @@
# Contributor(s):
#
#
# $Id: Makefile.in.client.gbak,v 1.16 2007-04-19 09:09:25 alexpeshkoff Exp $
#
ROOT=..

View File

@ -8,7 +8,7 @@ excellent concurrency, high performance, and powerful language support for
stored procedures and triggers. It has been used in production systems, under
a variety of names since 1981.
Firebird is a opensource project developing and enhancing a multi-platform
Firebird is an open source project developing and enhancing a multi-platform
relational database management system based on the source code released by
Inprise Corp (now known again as Borland Software Corp).

View File

@ -74,8 +74,8 @@ public:
size_t getBufferLength() const
{
size_t rc = getBufferEnd() - getBuffer();
if (rc == 1 && kind != UnTagged && kind != SpbStart
&& kind != WideUnTagged && kind != SpbItems)
if (rc == 1 && kind != UnTagged && kind != SpbStart &&
kind != WideUnTagged && kind != SpbItems)
{
rc = 0;
}

View File

@ -192,8 +192,10 @@ const Element* Element::findAttribute(int seq) const
int n = 0;
for (const Element *attribute = attributes; attribute; attribute = attribute->sibling)
{
if (n++ == seq)
return attribute;
}
return NULL;
}

View File

@ -1716,7 +1716,10 @@ static dsc* evlPad(Jrd::thread_db* tdbb, SysFunction* function, Jrd::jrd_nod* ar
const dsc* padLenDsc = EVL_expr(tdbb, args->nod_arg[1]);
if (request->req_flags & req_null) // return NULL if padLenDsc is NULL
return NULL;
ULONG padLen = MOV_get_long(padLenDsc, 0);
SLONG padLenArg = MOV_get_long(padLenDsc, 0);
if (padLenArg < 0)
status_exception::raise(isc_expression_eval_err, 0);
ULONG padLen = static_cast<ULONG>(padLenArg);
const dsc* value2 = NULL;
if (args->nod_count >= 3)

View File

@ -6708,7 +6708,7 @@ static bool scan(thread_db* tdbb, UCHAR* pointer, RecordBitmap** bitmap, RecordB
{
// We've bigger data in the node than in the lowerKey,
// now check the segment-number
const UCHAR *segp = node->btn_data + lowerKey.key_length;
const UCHAR* segp = node->btn_data + lowerKey.key_length;
const USHORT segnum =
idx->idx_count - (UCHAR)((idx->idx_flags & idx_descending) ?

View File

@ -1235,96 +1235,6 @@ static INTL_BOOL cs_utf32_well_formed(charset* cs,
}
#ifdef NOT_USED_OR_REPLACED
static ULONG cvt_ascii_to_unicode(csconvert* obj, ULONG nSrc, const UCHAR* pSrc,
ULONG nDest, USHORT* pDest,
USHORT* err_code, ULONG* err_position)
{
/**************************************
*
* c v t _ a s c i i _ t o _ u n i c o d e
*
**************************************
*
* Functional description
* Convert CHARACTER SET NONE to UNICODE (wide char).
* Byte values below 128 treated as ASCII.
* Byte values >= 128 create BAD_INPUT
*
*************************************/
fb_assert(obj != NULL);
fb_assert((pSrc != NULL) || (pDest == NULL));
fb_assert(err_code != NULL);
*err_code = 0;
if (pDest == NULL) /* length estimate needed? */
return (2 * nSrc);
const USHORT* const pStart = pDest;
const UCHAR* const pStart_src = pSrc;
while (nDest >= sizeof(*pDest) && nSrc >= sizeof(*pSrc)) {
if (*pSrc > 127) {
*err_code = CS_BAD_INPUT;
break;
}
*pDest++ = *pSrc++;
nDest -= sizeof(*pDest);
nSrc -= sizeof(*pSrc);
}
if (!*err_code && nSrc) {
*err_code = CS_TRUNCATION_ERROR;
}
*err_position = (pSrc - pStart_src) * sizeof(*pSrc);
return ((pDest - pStart) * sizeof(*pDest));
}
static ULONG cvt_unicode_to_ascii(csconvert* obj, ULONG nSrc, const USHORT* pSrc,
ULONG nDest, UCHAR* pDest,
USHORT* err_code, ULONG* err_position)
{
/**************************************
*
* c v t _ u n i c o d e _ t o _ a s c i i
*
**************************************
*
* Functional description
* Convert UNICODE to CHARACTER SET ASCII (wide char).
* Byte values below 128 treated as ASCII.
* Byte values >= 128 create CONVERT_ERROR
*
*************************************/
fb_assert(obj != NULL);
fb_assert((pSrc != NULL) || (pDest == NULL));
fb_assert(err_code != NULL);
*err_code = 0;
if (pDest == NULL) /* length estimate needed? */
return (nSrc / 2);
const UCHAR* const pStart = pDest;
const USHORT* const pStart_src = pSrc;
while (nDest >= sizeof(*pDest) && nSrc >= sizeof(*pSrc)) {
if (*pSrc > 127) {
*err_code = CS_CONVERT_ERROR;
break;
}
*pDest++ = *pSrc++;
nDest -= sizeof(*pDest);
nSrc -= sizeof(*pSrc);
}
if (!*err_code && nSrc) {
*err_code = CS_TRUNCATION_ERROR;
}
*err_position = (pSrc - pStart_src) * sizeof(*pSrc);
return ((pDest - pStart) * sizeof(*pDest));
}
#endif //NOT_USED_OR_REPLACED
static ULONG cvt_none_to_unicode(csconvert* obj, ULONG nSrc, const UCHAR* pSrc,
ULONG nDest, USHORT* pDest,
USHORT* err_code, ULONG* err_position)

View File

@ -3372,8 +3372,9 @@ static const LPCSTR FAST_MUTEX_MAP_NAME = "%s_FM_MAP";
static const int DEFAULT_INTERLOCKED_SPIN_COUNT = 0;
static const int DEFAULT_INTERLOCKED_SPIN_COUNT_SMP = 200;
typedef WINBASEAPI BOOL (WINAPI *pfnSwitchToThread) ();
inline BOOL _switchToThread()
static inline BOOL switchToThread()
{
static pfnSwitchToThread fnSwitchToThread = NULL;
static bool bInit = false;
@ -3427,7 +3428,7 @@ static inline void lockSharedSection(volatile FAST_MUTEX_SHARED_SECTION* lpSect,
goto next;
j--;
}
_switchToThread();
switchToThread();
next:;
}
}
@ -3584,7 +3585,7 @@ static bool initializeFastMutex(FAST_MUTEX* lpMutex, LPSECURITY_ATTRIBUTES lpAtt
else
{
while (!lpMutex->lpSharedInfo->fInitialized)
_switchToThread();
switchToThread();
}
SetLastError(dwLastError);