mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 20:03:03 +01:00
Style.
This commit is contained in:
parent
1dc66f5e68
commit
8134016877
@ -442,12 +442,14 @@ static ISC_STATUS gen_sdl(ISC_STATUS* status,
|
|||||||
return status[1];
|
return status[1];
|
||||||
|
|
||||||
SSHORT from, to, increment;
|
SSHORT from, to, increment;
|
||||||
if (desc->array_desc_flags & array_desc_column_major) {
|
if (desc->array_desc_flags & array_desc_column_major)
|
||||||
|
{
|
||||||
from = dimensions - 1;
|
from = dimensions - 1;
|
||||||
to = -1;
|
to = -1;
|
||||||
increment = -1;
|
increment = -1;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
from = 0;
|
from = 0;
|
||||||
to = dimensions;
|
to = dimensions;
|
||||||
increment = 1;
|
increment = 1;
|
||||||
@ -457,11 +459,13 @@ static ISC_STATUS gen_sdl(ISC_STATUS* status,
|
|||||||
for (n = from; n != to; n += increment)
|
for (n = from; n != to; n += increment)
|
||||||
{
|
{
|
||||||
const ISC_ARRAY_BOUND* tail = desc->array_desc_bounds + n;
|
const ISC_ARRAY_BOUND* tail = desc->array_desc_bounds + n;
|
||||||
if (tail->array_bound_lower == 1) {
|
if (tail->array_bound_lower == 1)
|
||||||
|
{
|
||||||
if (stuff_args(gen, 2, isc_sdl_do1, n))
|
if (stuff_args(gen, 2, isc_sdl_do1, n))
|
||||||
return status[1];
|
return status[1];
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
if (stuff_args(gen, 2, isc_sdl_do2, n))
|
if (stuff_args(gen, 2, isc_sdl_do2, n))
|
||||||
return status[1];
|
return status[1];
|
||||||
if (stuff_literal(gen, (SLONG) tail->array_bound_lower))
|
if (stuff_literal(gen, (SLONG) tail->array_bound_lower))
|
||||||
@ -574,7 +578,8 @@ static ISC_STATUS stuff_args(gen_t* gen, SSHORT count, ...)
|
|||||||
|
|
||||||
const SSHORT new_len = gen->gen_end - *gen->gen_sdl_ptr + 512 + count;
|
const SSHORT new_len = gen->gen_end - *gen->gen_sdl_ptr + 512 + count;
|
||||||
UCHAR* const new_sdl = (UCHAR*) gds__alloc(new_len);
|
UCHAR* const new_sdl = (UCHAR*) gds__alloc(new_len);
|
||||||
if (!new_sdl) {
|
if (!new_sdl)
|
||||||
|
{
|
||||||
return error(gen->gen_status, Arg::Gds(isc_misc_interpreted) << Arg::Str("SDL buffer overflow") <<
|
return error(gen->gen_status, Arg::Gds(isc_misc_interpreted) << Arg::Str("SDL buffer overflow") <<
|
||||||
Arg::Gds(isc_virmemexh));
|
Arg::Gds(isc_virmemexh));
|
||||||
}
|
}
|
||||||
@ -590,7 +595,8 @@ static ISC_STATUS stuff_args(gen_t* gen, SSHORT count, ...)
|
|||||||
|
|
||||||
va_start(ptr, count);
|
va_start(ptr, count);
|
||||||
|
|
||||||
for (; count; --count) {
|
for (; count; --count)
|
||||||
|
{
|
||||||
c = va_arg(ptr, int);
|
c = va_arg(ptr, int);
|
||||||
*(gen->gen_sdl)++ = c;
|
*(gen->gen_sdl)++ = c;
|
||||||
}
|
}
|
||||||
@ -648,7 +654,8 @@ static ISC_STATUS stuff_string(gen_t* gen, UCHAR sdl, const SCHAR* string)
|
|||||||
if (stuff_sdl(gen, strlen(string)))
|
if (stuff_sdl(gen, strlen(string)))
|
||||||
return status[1];
|
return status[1];
|
||||||
|
|
||||||
while (*string) {
|
while (*string)
|
||||||
|
{
|
||||||
if (stuff_sdl(gen, *string++))
|
if (stuff_sdl(gen, *string++))
|
||||||
return status[1];
|
return status[1];
|
||||||
}
|
}
|
||||||
|
@ -262,7 +262,8 @@ static void copy_exact_name (const UCHAR* from, UCHAR* to, SSHORT bsize)
|
|||||||
**************************************/
|
**************************************/
|
||||||
const UCHAR* const from_end = from + bsize - 1;
|
const UCHAR* const from_end = from + bsize - 1;
|
||||||
UCHAR* to2 = to - 1;
|
UCHAR* to2 = to - 1;
|
||||||
while (*from && from < from_end) {
|
while (*from && from < from_end)
|
||||||
|
{
|
||||||
if (*from != ' ') {
|
if (*from != ' ') {
|
||||||
to2 = to;
|
to2 = to;
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,8 @@ static void internal_post(const ISC_STATUS* tmp_status)
|
|||||||
size_t warning_count = 0;
|
size_t warning_count = 0;
|
||||||
ISC_STATUS_ARRAY warning_status;
|
ISC_STATUS_ARRAY warning_status;
|
||||||
|
|
||||||
if (warning_indx) {
|
if (warning_indx)
|
||||||
|
{
|
||||||
// copy current warning(s) to a temp buffer
|
// copy current warning(s) to a temp buffer
|
||||||
MOVE_CLEAR(warning_status, sizeof(warning_status));
|
MOVE_CLEAR(warning_status, sizeof(warning_status));
|
||||||
memcpy(warning_status, &status_vector[warning_indx],
|
memcpy(warning_status, &status_vector[warning_indx],
|
||||||
|
Loading…
Reference in New Issue
Block a user