"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/yvalve/gds.cpp" between
Firebird-3.0.2.32703-0.tar.bz2 and Firebird-3.0.4.33054-0.tar.bz2

About: Firebird is a relational database offering many ANSI SQL standard features.

gds.cpp  (Firebird-3.0.2.32703-0.tar.bz2):gds.cpp  (Firebird-3.0.4.33054-0.tar.bz2)
skipping to change at line 602 skipping to change at line 602
SINT64 API_ROUTINE isc_portable_integer(const UCHAR* ptr, SSHORT length) SINT64 API_ROUTINE isc_portable_integer(const UCHAR* ptr, SSHORT length)
{ {
/************************************** /**************************************
* *
* i s c _ p o r t a b l e _ i n t e g e r * i s c _ p o r t a b l e _ i n t e g e r
* *
************************************** **************************************
* *
* Functional description * Functional description
* Pick up (and convert) a Little Endian (VAX) style integer * Pick up (and convert) a Little Endian (VAX) style integer
* of length 1, 2, 4 or 8 bytes to local system's Endian format. * of variable length to local system's Endian format.
* *
* various parameter blocks (i.e., dpb, tpb, spb) flatten out multibyte * various parameter blocks (i.e., dpb, tpb, spb) flatten out multibyte
* values into little endian byte ordering before network transmission. * values into little endian byte ordering before network transmission.
* programs need to use this function in order to get the correct value * programs need to use this function in order to get the correct value
* of the integer in the correct Endian format. * of the integer in the correct Endian format.
* *
* **Note** * **Note**
* *
* This function is similar to gds__vax_integer() in functionality. * This function is similar to gds__vax_integer() in functionality.
* The difference is in the return type. Changed from SLONG to SINT64 * The difference is in the return type. Changed from SLONG to SINT64
* Since gds__vax_integer() is a public API routine, it could not be * Since gds__vax_integer() is a public API routine, it could not be
* changed. This function has been made public so gbak can use it. * changed. This function has been made public so gbak can use it.
* *
**************************************/ **************************************/
if (!ptr || length <= 0 || length > 8) if (!ptr || length <= 0 || length > 8)
return 0; return 0;
SINT64 value = 0; SINT64 value = 0;
int shift = 0;
for (int shift = 0; --length >= 0; shift += 8) { while (--length > 0)
{
value += ((SINT64) *ptr++) << shift; value += ((SINT64) *ptr++) << shift;
shift += 8;
} }
value += ((SINT64)(SCHAR) *ptr) << shift;
return value; return value;
} }
void API_ROUTINE gds_alloc_flag_unfreed(void* /*blk*/) void API_ROUTINE gds_alloc_flag_unfreed(void* /*blk*/)
{ {
/************************************** /**************************************
* *
* g d s _ a l l o c _ f l a g _ u n f r e e d * g d s _ a l l o c _ f l a g _ u n f r e e d
* *
skipping to change at line 2493 skipping to change at line 2497
SLONG API_ROUTINE gds__vax_integer(const UCHAR* ptr, SSHORT length) SLONG API_ROUTINE gds__vax_integer(const UCHAR* ptr, SSHORT length)
{ {
/************************************** /**************************************
* *
* g d s _ $ v a x _ i n t e g e r * g d s _ $ v a x _ i n t e g e r
* *
************************************** **************************************
* *
* Functional description * Functional description
* Pick up (and convert) a VAX style integer of length 1, 2, or 4 * Pick up (and convert) a VAX style integer of variable length.
* bytes.
* *
**************************************/ **************************************/
if (!ptr || length <= 0 || length > 4) if (!ptr || length <= 0 || length > 4)
return 0; return 0;
SLONG value = 0; SLONG value = 0;
int shift = 0;
for (int shift = 0; --length >= 0; shift += 8) { while (--length > 0)
{
value += ((SLONG) *ptr++) << shift; value += ((SLONG) *ptr++) << shift;
shift += 8;
} }
value += ((SLONG)(SCHAR) *ptr) << shift;
return value; return value;
} }
void API_ROUTINE gds__vtof(const SCHAR* string, SCHAR* fieldL, USHORT length) void API_ROUTINE gds__vtof(const SCHAR* string, SCHAR* fieldL, USHORT length)
{ {
/************************************** /**************************************
* *
* g d s _ v t o f * g d s _ v t o f
* *
 End of changes. 10 change blocks. 
5 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)