mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 06:03:02 +01:00
Style
This commit is contained in:
parent
3c8c4b1994
commit
7b51928503
@ -407,10 +407,10 @@ public:
|
||||
UCHAR* str_start; /* start of string buffer */
|
||||
UCHAR* str_current; /* current position in string being built */
|
||||
USHORT str_length; /* length of buffer */
|
||||
inline void add_byte(const int byte){
|
||||
inline void add_byte(const int byte) {
|
||||
*str_current++ = byte;
|
||||
}
|
||||
inline void add_word(const int word){
|
||||
inline void add_word(const int word) {
|
||||
add_byte(word);
|
||||
add_byte(word >> 8);
|
||||
}
|
||||
|
@ -208,9 +208,9 @@ static void generate( STR blr, DUDLEY_NOD node)
|
||||
p = (SCHAR *) symbol->sym_string;
|
||||
if (l) {
|
||||
check_blr(blr, l);
|
||||
do
|
||||
do {
|
||||
blr->add_byte(*p++);
|
||||
while (--l);
|
||||
} while (--l);
|
||||
}
|
||||
generate(blr, node->nod_arg[0]);
|
||||
return;
|
||||
@ -309,9 +309,9 @@ static void generate( STR blr, DUDLEY_NOD node)
|
||||
default:
|
||||
if (l) {
|
||||
check_blr(blr, l);
|
||||
do
|
||||
do {
|
||||
blr->add_byte(*p++);
|
||||
while (--l);
|
||||
} while (--l);
|
||||
}
|
||||
}
|
||||
return;
|
||||
@ -598,9 +598,9 @@ static void get_set_generator( STR blr, DUDLEY_NOD node)
|
||||
l = sizeof(gen_prologue);
|
||||
p = gen_prologue;
|
||||
check_blr(blr, l);
|
||||
do
|
||||
do {
|
||||
blr->add_byte(*p++);
|
||||
while (--l);
|
||||
} while (--l);
|
||||
|
||||
/* stuff in the name length and the name */
|
||||
|
||||
@ -610,9 +610,9 @@ static void get_set_generator( STR blr, DUDLEY_NOD node)
|
||||
p = (SCHAR *) symbol->sym_string;
|
||||
if (l) {
|
||||
check_blr(blr, l);
|
||||
do
|
||||
do {
|
||||
blr->add_byte(*p++);
|
||||
while (--l);
|
||||
} while (--l);
|
||||
}
|
||||
|
||||
/* now for the increvent value */
|
||||
@ -631,8 +631,8 @@ static void get_set_generator( STR blr, DUDLEY_NOD node)
|
||||
l = sizeof(gen_epilogue);
|
||||
p = (SCHAR *) gen_epilogue;
|
||||
check_blr(blr, l);
|
||||
do
|
||||
do {
|
||||
blr->add_byte(*p++);
|
||||
while (--l);
|
||||
} while (--l);
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
//
|
||||
//____________________________________________________________
|
||||
//
|
||||
// $Id: cme.cpp,v 1.28 2004-05-24 17:13:36 brodsom Exp $
|
||||
// $Id: cme.cpp,v 1.29 2004-05-29 04:50:46 robocop Exp $
|
||||
//
|
||||
|
||||
#include "firebird.h"
|
||||
@ -1029,7 +1029,9 @@ void CME_relation(gpre_ctx* context, gpre_req* request)
|
||||
{
|
||||
if ((context->ctx_alias) &&
|
||||
!(request->req_database->dbb_flags & DBB_v3))
|
||||
request->add_byte(blr_relation2);
|
||||
{
|
||||
request->add_byte(blr_relation2);
|
||||
}
|
||||
else
|
||||
request->add_byte(blr_relation);
|
||||
CMP_stuff_symbol(request, relation->rel_symbol);
|
||||
@ -1037,7 +1039,9 @@ void CME_relation(gpre_ctx* context, gpre_req* request)
|
||||
|
||||
if ((context->ctx_alias) &&
|
||||
!(request->req_database->dbb_flags & DBB_v3))
|
||||
request->add_cstring(context->ctx_alias);
|
||||
{
|
||||
request->add_cstring(context->ctx_alias);
|
||||
}
|
||||
request->add_byte(context->ctx_internal);
|
||||
}
|
||||
else if (procedure = context->ctx_procedure)
|
||||
|
@ -27,7 +27,7 @@
|
||||
//
|
||||
//____________________________________________________________
|
||||
//
|
||||
// $Id: cob.cpp,v 1.44 2004-05-24 17:13:37 brodsom Exp $
|
||||
// $Id: cob.cpp,v 1.45 2004-05-29 04:50:46 robocop Exp $
|
||||
//
|
||||
// 2002.10.27 Sean Leyne - Completed removal of obsolete "DG_X86" port
|
||||
// 2002.10.27 Sean Leyne - Code Cleanup, removed obsolete "UNIXWARE" port
|
||||
@ -2648,7 +2648,8 @@ static void gen_finish( const act* action)
|
||||
rdy* ready;
|
||||
|
||||
if (gpreGlob.sw_auto || ((action->act_flags & ACT_sql) &&
|
||||
(action->act_type != ACT_disconnect))) {
|
||||
(action->act_type != ACT_disconnect)))
|
||||
{
|
||||
printa(names[COLUMN], false, "IF %s NOT = 0 THEN", names[isc_trans_pos]);
|
||||
printa(names[COLUMN], true,
|
||||
" CALL \"%s\" USING %s, %s%s",
|
||||
|
@ -24,7 +24,7 @@
|
||||
//
|
||||
//____________________________________________________________
|
||||
//
|
||||
// $Id: ftn.cpp,v 1.46 2004-05-24 17:13:37 brodsom Exp $
|
||||
// $Id: ftn.cpp,v 1.47 2004-05-29 04:50:46 robocop Exp $
|
||||
//
|
||||
// 2002.10.28 Sean Leyne - Completed removal of obsolete "DGUX" port
|
||||
// 2002.10.28 Sean Leyne - Completed removal of obsolete "SGI" port
|
||||
@ -2318,7 +2318,8 @@ static void gen_finish(const act* action)
|
||||
DBB db = NULL;
|
||||
|
||||
if (gpreGlob.sw_auto || ((action->act_flags & ACT_sql) &&
|
||||
(action->act_type != ACT_disconnect))) {
|
||||
(action->act_type != ACT_disconnect)))
|
||||
{
|
||||
printa(COLUMN, "IF (GDS__TRANS .NE. 0) THEN");
|
||||
printa(COLUMN, " CALL ISC_%s_TRANSACTION (%s, GDS__TRANS)",
|
||||
(action->act_type != ACT_rfinish) ? "COMMIT" : "ROLLBACK",
|
||||
|
@ -20,7 +20,7 @@
|
||||
//
|
||||
// All Rights Reserved.
|
||||
// Contributor(s): ______________________________________.
|
||||
// $Id: gpre.cpp,v 1.60 2004-05-24 17:13:37 brodsom Exp $
|
||||
// $Id: gpre.cpp,v 1.61 2004-05-29 04:52:00 robocop Exp $
|
||||
// Revision 1.2 2000/11/16 15:54:29 fsg
|
||||
// Added new switch -verbose to gpre that will dump
|
||||
// parsed lines to stderr
|
||||
@ -270,7 +270,7 @@ int main(int argc, char* argv[])
|
||||
gpreGlob.errors_global = 0;
|
||||
warnings_global = 0;
|
||||
fatals_global = 0;
|
||||
gpreGlob.ADA_create_database= 1;
|
||||
gpreGlob.ADA_create_database = 1;
|
||||
|
||||
bool use_lang_internal_gxx_output;
|
||||
|
||||
@ -708,7 +708,9 @@ int main(int argc, char* argv[])
|
||||
}
|
||||
} // for (...)
|
||||
|
||||
if ((gpreGlob.sw_auto) && (gpreGlob.default_user || gpreGlob.default_password || gpreGlob.default_lc_ctype)) {
|
||||
if ((gpreGlob.sw_auto) && (gpreGlob.default_user || gpreGlob.default_password
|
||||
|| gpreGlob.default_lc_ctype))
|
||||
{
|
||||
CPR_warn("gpre: -user, -password and -charset switches require -manual");
|
||||
}
|
||||
//
|
||||
@ -1048,7 +1050,8 @@ TOK CPR_eol_token()
|
||||
gpreGlob.prior_token.tok_position = last_position;
|
||||
|
||||
last_position =
|
||||
gpreGlob.token_global.tok_position + gpreGlob.token_global.tok_length + gpreGlob.token_global.tok_white_space - 1;
|
||||
gpreGlob.token_global.tok_position + gpreGlob.token_global.tok_length
|
||||
+ gpreGlob.token_global.tok_white_space - 1;
|
||||
TEXT* p = gpreGlob.token_global.tok_string;
|
||||
SSHORT num_chars = 0;
|
||||
|
||||
@ -1575,7 +1578,8 @@ static void finish_based( act* action)
|
||||
field = NULL;
|
||||
for (db = gpreGlob.isc_databases; db; db = db->dbb_next)
|
||||
if (relation =
|
||||
MET_get_relation(db, based_on->bas_rel_name->str_string, "")) {
|
||||
MET_get_relation(db, based_on->bas_rel_name->str_string, ""))
|
||||
{
|
||||
if (field) {
|
||||
/* The field reference is ambiguous. It exists in more
|
||||
than one database. */
|
||||
@ -1977,7 +1981,8 @@ static TOK get_token()
|
||||
gpreGlob.prior_token.tok_position = last_position;
|
||||
|
||||
last_position =
|
||||
gpreGlob.token_global.tok_position + gpreGlob.token_global.tok_length + gpreGlob.token_global.tok_white_space - 1;
|
||||
gpreGlob.token_global.tok_position + gpreGlob.token_global.tok_length
|
||||
+ gpreGlob.token_global.tok_white_space - 1;
|
||||
int start_line = line_global;
|
||||
SLONG start_position = position;
|
||||
gpreGlob.token_global.tok_charset = NULL;
|
||||
@ -2123,7 +2128,8 @@ static TOK get_token()
|
||||
}
|
||||
}
|
||||
else if (next == EOF
|
||||
|| (next == '\n' && (p[-1] != '\\' || gpreGlob.sw_sql))) {
|
||||
|| (next == '\n' && (p[-1] != '\\' || gpreGlob.sw_sql)))
|
||||
{
|
||||
return_char(*p);
|
||||
|
||||
/* Decrement, then increment line counter, for accuracy of
|
||||
@ -2254,7 +2260,9 @@ static TOK get_token()
|
||||
//IF symbol is null AND it is not a quoted string AND -e switch was specified
|
||||
//THEN search again using HSH_lookup2().
|
||||
//*
|
||||
if ((gpreGlob.token_global.tok_symbol == NULL) && (!isQuoted(gpreGlob.token_global.tok_type)) && gpreGlob.sw_case) {
|
||||
if ((gpreGlob.token_global.tok_symbol == NULL) && (!isQuoted(gpreGlob.token_global.tok_type))
|
||||
&& gpreGlob.sw_case)
|
||||
{
|
||||
gpreGlob.token_global.tok_symbol = symbol = HSH_lookup2(gpreGlob.token_global.tok_string);
|
||||
if (symbol && symbol->sym_type == SYM_keyword)
|
||||
gpreGlob.token_global.tok_keyword = (KWWORDS) symbol->sym_keyword;
|
||||
|
@ -19,7 +19,7 @@
|
||||
*
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
* $Id: show.epp,v 1.50 2004-05-24 17:16:02 brodsom Exp $
|
||||
* $Id: show.epp,v 1.51 2004-05-29 04:55:23 robocop Exp $
|
||||
* Revision 1.2 2000/11/19 07:02:49 fsg
|
||||
* Change in show.e to use CHARACTER_LENGTH instead of FIELD_LENGTH in
|
||||
* SHOW PROCEDURE
|
||||
@ -185,11 +185,11 @@ static const UCHAR metadata_text_bpb[] = {
|
||||
|
||||
// trigger action helpers
|
||||
|
||||
inline int TRIGGER_ACTION_PREFIX(int value){
|
||||
inline int TRIGGER_ACTION_PREFIX(int value) {
|
||||
return (value + 1) & 1;
|
||||
}
|
||||
|
||||
inline int TRIGGER_ACTION_SUFFIX(int value, int slot){
|
||||
inline int TRIGGER_ACTION_SUFFIX(int value, int slot) {
|
||||
return ((value + 1) >> (slot * 2 - 1)) & 3;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user