8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 12:03:02 +01:00

Simplification.

This commit is contained in:
robocop 2006-05-04 00:02:58 +00:00
parent 8e68573abb
commit ebe0a75026
8 changed files with 16 additions and 16 deletions

View File

@ -486,7 +486,7 @@ int BACKUP_backup(const TEXT* dbb_file, const TEXT* file_name)
}
else {
char psz[64];
sprintf(psz, "%" QUADFORMAT "d", cumul_count);
sprintf(psz, "%" SQUADFORMAT, cumul_count);
BURP_verbose(283, psz, NULL, NULL, NULL, NULL);
// msg 283 closing file, committing, and finishing. %s bytes written
}

View File

@ -381,7 +381,7 @@ SINT64 EXP_SINT64_ordinal(bool advance_flag)
if (gpreGlob.token_global.tok_type != tok_number)
CPR_s_error("<number>");
const char format[8] = "%"QUADFORMAT"d";
const char format[8] = "%"SQUADFORMAT;
SINT64 n;
sscanf(gpreGlob.token_global.tok_string, format, &n);

View File

@ -2379,7 +2379,7 @@ static processing_state add_row(TEXT* tabname)
}
}
// sscanf assumes a 64-bit integer target
else if (sscanf(lastInputLine, "%" QUADFORMAT "d", &n) != 1)
else if (sscanf(lastInputLine, "%" SQUADFORMAT, &n) != 1)
{
STDERROUT("Input parsing problem");
done = true;
@ -6368,13 +6368,13 @@ static void print_item_numeric(SINT64 value,
if (scale >= 0) {
if (scale > 0)
value *= (SINT64) pow(10.0, (double) scale);
sprintf(buf, "%*" QUADFORMAT "d", length, value);
sprintf(buf, "%*" SQUADFORMAT, length, value);
return;
}
// Use one less space than allowed, to leave room for '.'
length--;
sprintf(buf, "%*" QUADFORMAT "d", length, value);
sprintf(buf, "%*" SQUADFORMAT, length, value);
// start from LSByte towards MSByte
SSHORT from = length - 1;

View File

@ -79,7 +79,7 @@ TEXT_PTR dbt_window[] = {
},
dbt_record_param[] = {
FLD(record_param*, "Relation %x", rpb_relation),
FLD(record_param*, "Number %"QUADFORMAT"d", rpb_number.getValue()),
FLD(record_param*, "Number %"SQUADFORMAT, rpb_number.getValue()),
FLD(record_param*, "Trans %ld", rpb_transaction_nr),
FLD(record_param*, "Page %ld", rpb_page),
FLD(record_param*, "Line %x", rpb_line),

View File

@ -1840,7 +1840,7 @@ static void set_field_class_name(Global* gbl,
MODIFY RFR
while (!unique)
{
sprintf(RFR.RDB$SECURITY_CLASS, "%s%" QUADFORMAT "d", "SQL$GRANT",
sprintf(RFR.RDB$SECURITY_CLASS, "%s%" SQUADFORMAT, "SQL$GRANT",
DPM_gen_id(tdbb,
MET_lookup_generator(tdbb, "RDB$SECURITY_CLASS"), false, (SINT64) 1));

View File

@ -182,7 +182,7 @@ void DYN_UTIL_generate_constraint_name( thread_db* tdbb, Global* gbl, Firebird::
do {
id = drq_g_nxt_con;
buffer.printf("INTEG_%" QUADFORMAT "d",
buffer.printf("INTEG_%" SQUADFORMAT,
(SINT64) DYN_UTIL_gen_unique_id(tdbb,
gbl,
drq_g_nxt_con,
@ -259,7 +259,7 @@ void DYN_UTIL_generate_field_name( thread_db* tdbb, Global* gbl, Firebird::MetaN
do {
id = drq_g_nxt_fld;
buffer.printf("RDB$%" QUADFORMAT "d",
buffer.printf("RDB$%" SQUADFORMAT,
(SINT64) DYN_UTIL_gen_unique_id(tdbb,
gbl,
drq_g_nxt_fld,
@ -371,11 +371,11 @@ void DYN_UTIL_generate_index_name(thread_db* tdbb, Global* gbl,
do {
const SCHAR* format;
if (verb == isc_dyn_def_primary_key)
format = "RDB$PRIMARY%" QUADFORMAT "d";
format = "RDB$PRIMARY%" SQUADFORMAT;
else if (verb == isc_dyn_def_foreign_key)
format = "RDB$FOREIGN%" QUADFORMAT "d";
format = "RDB$FOREIGN%" SQUADFORMAT;
else
format = "RDB$%" QUADFORMAT "d";
format = "RDB$%" SQUADFORMAT;
id = drq_g_nxt_idx;
buffer.printf(format,
(SINT64) DYN_UTIL_gen_unique_id(tdbb,
@ -434,7 +434,7 @@ void DYN_UTIL_generate_trigger_name( thread_db* tdbb, Global* gbl, Firebird::Met
do {
id = drq_g_nxt_trg;
buffer.printf("CHECK_%" QUADFORMAT "d",
buffer.printf("CHECK_%" SQUADFORMAT,
(SINT64) DYN_UTIL_gen_unique_id(tdbb,
gbl,
drq_g_nxt_trg,

View File

@ -299,7 +299,7 @@ static void define_default_class(
Database* dbb = tdbb->tdbb_database;
if (default_class.length() == 0) {
default_class.printf("%s%" QUADFORMAT "d", DEFAULT_CLASS,
default_class.printf("%s%" SQUADFORMAT, DEFAULT_CLASS,
DPM_gen_id(tdbb, MET_lookup_generator(tdbb, DEFAULT_CLASS), false,
(SINT64) 1));
@ -871,7 +871,7 @@ static SecurityClass::flags_t save_field_privileges(thread_db* tdbb,
MODIFY RFR
while (!unique)
{
sprintf(RFR.RDB$SECURITY_CLASS, "%s%" QUADFORMAT "d", "SQL$GRANT",
sprintf(RFR.RDB$SECURITY_CLASS, "%s%" SQUADFORMAT, "SQL$GRANT",
DPM_gen_id(tdbb, MET_lookup_generator(tdbb, "RDB$SECURITY_CLASS"),
false, (SINT64) 1));

View File

@ -1089,7 +1089,7 @@ static void add_security_to_sys_rel(thread_db* tdbb,
BLB_put_segment(tdbb, blob, acl, acl_length);
BLB_close(tdbb, blob);
default_class.printf("%s%" QUADFORMAT "d", DEFAULT_CLASS,
default_class.printf("%s%" SQUADFORMAT, DEFAULT_CLASS,
DPM_gen_id(tdbb, MET_lookup_generator(tdbb, DEFAULT_CLASS),
false, (SINT64) 1));