|
From: <asf...@us...> - 2013-06-28 02:03:15
|
Revision: 58264
http://sourceforge.net/p/firebird/code/58264
Author: asfernandes
Date: 2013-06-28 02:03:10 +0000 (Fri, 28 Jun 2013)
Log Message:
-----------
Misc.
Modified Paths:
--------------
firebird/trunk/examples/interfaces/01.create.cpp
firebird/trunk/examples/interfaces/02.update.cpp
firebird/trunk/examples/interfaces/03.select.cpp
firebird/trunk/examples/interfaces/04.print_table.cpp
firebird/trunk/src/auth/SecureRemotePassword/client/SrpClient.cpp
firebird/trunk/src/extlib/fbudf/fbudf.cpp
firebird/trunk/src/isql/extract.epp
firebird/trunk/src/isql/show.epp
firebird/trunk/src/msgs/facilities2.sql
firebird/trunk/src/remote/client/interface.cpp
firebird/trunk/src/remote/server/server.cpp
Modified: firebird/trunk/examples/interfaces/01.create.cpp
===================================================================
--- firebird/trunk/examples/interfaces/01.create.cpp 2013-06-28 01:16:38 UTC (rev 58263)
+++ firebird/trunk/examples/interfaces/01.create.cpp 2013-06-28 02:03:10 UTC (rev 58264)
@@ -135,7 +135,7 @@
check(st, "detach");
att = NULL;
}
- catch(const char* text)
+ catch (const char* text)
{
// handle error
rc = 1;
Modified: firebird/trunk/examples/interfaces/02.update.cpp
===================================================================
--- firebird/trunk/examples/interfaces/02.update.cpp 2013-06-28 01:16:38 UTC (rev 58263)
+++ firebird/trunk/examples/interfaces/02.update.cpp 2013-06-28 02:03:10 UTC (rev 58264)
@@ -46,8 +46,8 @@
static IMaster* master = fb_get_master_interface();
-int get_input (char* , double*);
-static const char *Dept_data[] =
+int get_input(char*, double*);
+static const char* Dept_data[] =
{"622", "100", "116", "900", 0};
static double Percent_data[] =
{0.05, 1.00, 0.075, 0.10, 0};
@@ -82,7 +82,7 @@
// Interface makes it possible to change format of data or define it yourself
IMetadataBuilder* builder = NULL;
- const char *updstr =
+ const char* updstr =
"UPDATE department SET budget = ? * budget + budget WHERE dept_no = ?";
try
@@ -133,14 +133,14 @@
// locations of parameters in input message
char* dept_no = &buffer[meta->getOffset(st, 1)];
check(st, "getOffset");
- double* percent_inc = (double*)&buffer[meta->getOffset(st, 0)];
+ double* percent_inc = (double*) &buffer[meta->getOffset(st, 0)];
check(st, "getOffset");
// null IDs (set to NOT NULL)
short* flag = (short*)&buffer[meta->getNullOffset(st, 0)];
check(st, "getNullOffset");
*flag = 0;
- flag = (short*)&buffer[meta->getNullOffset(st, 1)];
+ flag = (short*) &buffer[meta->getNullOffset(st, 1)];
check(st, "getNullOffset");
*flag = 0;
@@ -192,7 +192,7 @@
check(st, "detach");
att = NULL;
}
- catch(const char* text)
+ catch (const char* text)
{
// handle error
rc = 1;
Modified: firebird/trunk/examples/interfaces/03.select.cpp
===================================================================
--- firebird/trunk/examples/interfaces/03.select.cpp 2013-06-28 01:16:38 UTC (rev 58263)
+++ firebird/trunk/examples/interfaces/03.select.cpp 2013-06-28 02:03:10 UTC (rev 58264)
@@ -190,7 +190,7 @@
check(st, "detach");
att = NULL;
}
- catch(const char* text)
+ catch (const char* text)
{
// handle error
rc = 1;
Modified: firebird/trunk/examples/interfaces/04.print_table.cpp
===================================================================
--- firebird/trunk/examples/interfaces/04.print_table.cpp 2013-06-28 01:16:38 UTC (rev 58263)
+++ firebird/trunk/examples/interfaces/04.print_table.cpp 2013-06-28 02:03:10 UTC (rev 58264)
@@ -60,6 +60,7 @@
int main()
{
int rc = 0;
+ char s[100];
setenv("ISC_USER", "sysdba", 0);
setenv("ISC_PASSWORD", "masterkey", 0);
@@ -112,7 +113,7 @@
unsigned sub = meta->getSubType(st, j);
check(st, "getSubType");
- switch(t)
+ switch (t)
{
case SQL_BLOB:
if (sub != 1)
@@ -127,7 +128,6 @@
default:
{
- char s[100];
sprintf(s, "Unknown type %d for %s", t, meta->getField(st, j));
throw s;
}
@@ -183,7 +183,7 @@
check(st, "detach");
att = NULL;
}
- catch(const char* text)
+ catch (const char* text)
{
rc = 1;
@@ -229,7 +229,7 @@
// IBlob makes it possible to read/write BLOB data
IBlob* blob = NULL;
- switch(type)
+ switch (type)
{
// text fields
case SQL_TEXT:
@@ -257,7 +257,7 @@
try
{
// use attachment's method to access BLOB object
- blob = att->openBlob(st, tra, (ISC_QUAD*)(buf + offset));
+ blob = att->openBlob(st, tra, (ISC_QUAD*) (buf + offset));
check(st, "openBlob");
char segbuf[16];
@@ -279,7 +279,7 @@
blob = NULL;
printf("\n");
}
- catch(...)
+ catch (...)
{
if (blob)
blob->release();
Modified: firebird/trunk/src/auth/SecureRemotePassword/client/SrpClient.cpp
===================================================================
--- firebird/trunk/src/auth/SecureRemotePassword/client/SrpClient.cpp 2013-06-28 01:16:38 UTC (rev 58263)
+++ firebird/trunk/src/auth/SecureRemotePassword/client/SrpClient.cpp 2013-06-28 02:03:10 UTC (rev 58264)
@@ -64,7 +64,8 @@
if (!client)
{
- HANDSHAKE_DEBUG(fprintf(stderr, "Cli: SRP phase1: login=%s password=%s\n", cb->getLogin(), cb->getPassword()));
+ HANDSHAKE_DEBUG(fprintf(stderr, "Cli: SRP phase1: login=%s password=%s\n",
+ cb->getLogin(), cb->getPassword()));
if (!(cb->getLogin() && cb->getPassword()))
{
return AUTH_CONTINUE;
Modified: firebird/trunk/src/extlib/fbudf/fbudf.cpp
===================================================================
--- firebird/trunk/src/extlib/fbudf/fbudf.cpp 2013-06-28 01:16:38 UTC (rev 58263)
+++ firebird/trunk/src/extlib/fbudf/fbudf.cpp 2013-06-28 02:03:10 UTC (rev 58264)
@@ -507,7 +507,7 @@
}
const int ly = times.tm_year + 1900;
const bool leap = (ly % 4 == 0 && ly % 100 != 0) || ly % 400 == 0;
- const int md[] = {31, leap ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+ const int md[] = {31, (leap ? 29 : 28), 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
if (times.tm_mday > md[times.tm_mon])
times.tm_mday = md[times.tm_mon];
internal::encode_timestamp(×, v);
Modified: firebird/trunk/src/isql/extract.epp
===================================================================
--- firebird/trunk/src/isql/extract.epp 2013-06-28 01:16:38 UTC (rev 58263)
+++ firebird/trunk/src/isql/extract.epp 2013-06-28 02:03:10 UTC (rev 58264)
@@ -3174,7 +3174,7 @@
}
else
isqlGlob.printf("%sALTER FUNCTION %s ", NEWLINE, FUN.RDB$FUNCTION_NAME);
-
+
get_function_args_ods12(FUN.RDB$FUNCTION_NAME, FUN.RDB$RETURN_ARGUMENT);
// Print the function body
Modified: firebird/trunk/src/isql/show.epp
===================================================================
--- firebird/trunk/src/isql/show.epp 2013-06-28 01:16:38 UTC (rev 58263)
+++ firebird/trunk/src/isql/show.epp 2013-06-28 02:03:10 UTC (rev 58264)
@@ -3356,7 +3356,7 @@
}
- if (i == 0 && private_flag || i == 1 && !private_flag)
+ if ((i == 0 && private_flag) || (i == 1 && !private_flag))
continue;
// Strip trailing blanks
@@ -3377,7 +3377,7 @@
}
first_dep = false;
isqlGlob.printf("%s, %s", DEP.RDB$DEPENDED_ON_NAME,
- Object_types[DEP.RDB$DEPENDED_ON_TYPE]);
+ Object_types[DEP.RDB$DEPENDED_ON_TYPE]);
END_FOR
ON_ERROR
ISQL_errmsg (isc_status);
@@ -3457,7 +3457,7 @@
fb_utils::exact_name(ARG.RDB$ARGUMENT_NAME);
isqlGlob.printf("%-33s %s ", ARG.RDB$ARGUMENT_NAME,
- (ARG.RDB$ARGUMENT_POSITION == FUN.RDB$RETURN_ARGUMENT ? "OUTPUT" : "INPUT"));
+ (ARG.RDB$ARGUMENT_POSITION == FUN.RDB$RETURN_ARGUMENT ? "OUTPUT" : "INPUT"));
prm_mech_t mechanism = prm_mech_normal;
bool prm_default_source_null = true;
Modified: firebird/trunk/src/msgs/facilities2.sql
===================================================================
--- firebird/trunk/src/msgs/facilities2.sql 2013-06-28 01:16:38 UTC (rev 58263)
+++ firebird/trunk/src/msgs/facilities2.sql 2013-06-28 02:03:10 UTC (rev 58264)
@@ -13,7 +13,7 @@
('2012-02-18 20:00:00', 'SQLERR', 13, 1033)
('1996-11-07 13:38:42', 'SQLWARN', 14, 613)
('2006-09-10 03:04:31', 'JRD_BUGCHK', 15, 307)
-('2009-12-21 04:00:05', 'ISQL', 17, 174)
+('2013-06-27 23:00:00', 'ISQL', 17, 174)
('2010-07-10 10:50:30', 'GSEC', 18, 105)
('2012-05-25 19:59:42', 'GSTAT', 21, 56)
('2009-12-18 19:33:34', 'FBSVCMGR', 22, 57)
Modified: firebird/trunk/src/remote/client/interface.cpp
===================================================================
--- firebird/trunk/src/remote/client/interface.cpp 2013-06-28 01:16:38 UTC (rev 58263)
+++ firebird/trunk/src/remote/client/interface.cpp 2013-06-28 02:03:10 UTC (rev 58264)
@@ -6180,7 +6180,8 @@
{
case Auth::AUTH_SUCCESS:
case Auth::AUTH_MORE_DATA:
- HANDSHAKE_DEBUG(fprintf(stderr, "Cli: authFillParametersBlock: plugin %s is OK\n", cBlock.plugins.name()));
+ HANDSHAKE_DEBUG(fprintf(stderr, "Cli: authFillParametersBlock: plugin %s is OK\n",
+ cBlock.plugins.name()));
cleanDpb(dpb, tags);
cBlock.extractDataFromPluginTo(dpb, tags, port->port_protocol);
return;
@@ -6189,12 +6190,15 @@
continue;
case Auth::AUTH_FAILED:
- HANDSHAKE_DEBUG(fprintf(stderr, "Cli: authFillParametersBlock: plugin %s FAILED\n", cBlock.plugins.name()));
+ HANDSHAKE_DEBUG(fprintf(stderr, "Cli: authFillParametersBlock: plugin %s FAILED\n",
+ cBlock.plugins.name()));
(Arg::Gds(isc_login) << Arg::StatusVector(s.get())).raise();
break; // compiler silencer
}
}
- HANDSHAKE_DEBUG(fprintf(stderr, "Cli: authFillParametersBlock: try next plugin, %s skipped\n", cBlock.plugins.name()));
+
+ HANDSHAKE_DEBUG(fprintf(stderr, "Cli: authFillParametersBlock: try next plugin, %s skipped\n",
+ cBlock.plugins.name()));
}
}
@@ -6252,8 +6256,9 @@
d = &packet->p_auth_cont.p_data;
n = &packet->p_auth_cont.p_name;
port->addServerKeys(&packet->p_auth_cont.p_keys);
- HANDSHAKE_DEBUG(fprintf(stderr, "Cli: authReceiveResponse: ont_auth d=%d n=%d '%.*s' 0x%x\n", d->cstr_length, n->cstr_length,
- n->cstr_length, n->cstr_address, n->cstr_address ? n->cstr_address[0] : 0));
+ HANDSHAKE_DEBUG(fprintf(stderr, "Cli: authReceiveResponse: ont_auth d=%d n=%d '%.*s' 0x%x\n",
+ d->cstr_length, n->cstr_length,
+ n->cstr_length, n->cstr_address, n->cstr_address ? n->cstr_address[0] : 0));
break;
case op_crypt:
@@ -7505,13 +7510,15 @@
}
dpb.insertPath(tags->plugin_list, pluginList);
firstTime = false;
- HANDSHAKE_DEBUG(fprintf(stderr, "Cli: extractDataFromPluginTo: first time - added plugName & pluginList\n"));
+ HANDSHAKE_DEBUG(fprintf(stderr,
+ "Cli: extractDataFromPluginTo: first time - added plugName & pluginList\n"));
}
fb_assert(tags->specific_data);
dpb.insertBytes(tags->specific_data, dataFromPlugin.begin(), dataFromPlugin.getCount());
- HANDSHAKE_DEBUG(fprintf(stderr, "Cli: extractDataFromPluginTo: Added %" SIZEFORMAT " bytes of spec data with tag %d\n",
- dataFromPlugin.getCount(), tags->specific_data));
+ HANDSHAKE_DEBUG(fprintf(stderr,
+ "Cli: extractDataFromPluginTo: Added %" SIZEFORMAT " bytes of spec data with tag %d\n",
+ dataFromPlugin.getCount(), tags->specific_data));
return;
}
@@ -7556,12 +7563,14 @@
makeUtfString(uft8Convert, password);
dpb.getString(password);
dpb.deleteClumplet();
- HANDSHAKE_DEBUG(fprintf(stderr, "Cli: loadClnt: Loaded from PB password = %s\n", password.c_str()));
+ HANDSHAKE_DEBUG(fprintf(stderr,
+ "Cli: loadClnt: Loaded from PB password = %s\n", password.c_str()));
}
else if (t == tags->encrypt_key)
{
hasCryptKey = true;
- HANDSHAKE_DEBUG(fprintf(stderr, "Cli: loadClnt: PB contains crypt key - need encrypted line to pass\n"));
+ HANDSHAKE_DEBUG(fprintf(stderr,
+ "Cli: loadClnt: PB contains crypt key - need encrypted line to pass\n"));
}
}
}
@@ -7591,8 +7600,9 @@
to->p_list.cstr_length = (ULONG) pluginList.length();
to->p_list.cstr_address = (UCHAR*) pluginList.c_str();
to->p_list.cstr_allocated = 0;
- HANDSHAKE_DEBUG(fprintf(stderr, "Cli: extractDataFromPluginTo: added plugin list (%d len) to packet\n",
- to->p_list.cstr_length));
+ HANDSHAKE_DEBUG(fprintf(stderr,
+ "Cli: extractDataFromPluginTo: added plugin list (%d len) to packet\n",
+ to->p_list.cstr_length));
firstTime = false;
}
else
Modified: firebird/trunk/src/remote/server/server.cpp
===================================================================
--- firebird/trunk/src/remote/server/server.cpp 2013-06-28 01:16:38 UTC (rev 58263)
+++ firebird/trunk/src/remote/server/server.cpp 2013-06-28 02:03:10 UTC (rev 58264)
@@ -376,8 +376,9 @@
// if we asked for more data but received nothing switch to next plugin
bool forceNext = contAuth && (!authPort->port_srv_auth_block->hasDataForPlugin());
- HANDSHAKE_DEBUG(fprintf(stderr, "Srv: authenticate: ServerAuth calls plug %s\n", forceNext ? "forced-NEXT" : authItr->name()));
- int authResult = forceNext ? Auth::AUTH_CONTINUE :
+ HANDSHAKE_DEBUG(fprintf(stderr, "Srv: authenticate: ServerAuth calls plug %s\n",
+ forceNext ? "forced-NEXT" : authItr->name()));
+ int authResult = forceNext ? Auth::AUTH_CONTINUE :
authServer->authenticate(&st, authPort->port_srv_auth_block,
&authPort->port_srv_auth_block->authBlockWriter);
authPort->port_srv_auth_block->setPluginName(authItr->name());
@@ -1567,14 +1568,16 @@
Firebird::ClumpletReader id(Firebird::ClumpletReader::UnTagged,
connect->p_cnct_user_id.cstr_address,
connect->p_cnct_user_id.cstr_length);
- HANDSHAKE_DEBUG(fprintf(stderr, "Srv: accept_connection: is going to load data to port_srv_auth_block\n"));
+ HANDSHAKE_DEBUG(fprintf(stderr,
+ "Srv: accept_connection: is going to load data to port_srv_auth_block\n"));
port->port_srv_auth_block->load(id);
if (port->port_srv_auth_block->getLogin())
{
port->port_login = port->port_srv_auth_block->getLogin();
}
- HANDSHAKE_DEBUG(fprintf(stderr, "Srv: accept_connection: finished with port_srv_auth_block prepare, a=%d\n", accepted));
+ HANDSHAKE_DEBUG(fprintf(stderr,
+ "Srv: accept_connection: finished with port_srv_auth_block prepare, a=%d\n", accepted));
if (port->port_srv_auth_block->getPluginName())
{
@@ -1585,7 +1588,8 @@
if (port->port_srv_auth_block->plugins) // We have all required data and iterator was created
{
- HANDSHAKE_DEBUG(fprintf(stderr, "Srv: accept_connection: call plugin %s\n", port->port_srv_auth_block->getPluginName()));
+ HANDSHAKE_DEBUG(fprintf(stderr,
+ "Srv: accept_connection: call plugin %s\n", port->port_srv_auth_block->getPluginName()));
AuthServerPlugins* const plugins = port->port_srv_auth_block->plugins;
for (; plugins->hasData(); plugins->next())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|