From ebe0a7502672c802e5169a473e44974adf862c48 Mon Sep 17 00:00:00 2001 From: robocop Date: Thu, 4 May 2006 00:02:58 +0000 Subject: [PATCH] Simplification. --- src/burp/backup.epp | 2 +- src/gpre/exp.cpp | 2 +- src/isql/isql.epp | 6 +++--- src/jrd/dbt.cpp | 2 +- src/jrd/dyn.epp | 2 +- src/jrd/dyn_util.epp | 12 ++++++------ src/jrd/grant.epp | 4 ++-- src/jrd/ini.epp | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/burp/backup.epp b/src/burp/backup.epp index 5dd444114a..efcd59322c 100644 --- a/src/burp/backup.epp +++ b/src/burp/backup.epp @@ -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 } diff --git a/src/gpre/exp.cpp b/src/gpre/exp.cpp index 5e61f7a626..be6eb7dd2e 100644 --- a/src/gpre/exp.cpp +++ b/src/gpre/exp.cpp @@ -381,7 +381,7 @@ SINT64 EXP_SINT64_ordinal(bool advance_flag) if (gpreGlob.token_global.tok_type != tok_number) CPR_s_error(""); - const char format[8] = "%"QUADFORMAT"d"; + const char format[8] = "%"SQUADFORMAT; SINT64 n; sscanf(gpreGlob.token_global.tok_string, format, &n); diff --git a/src/isql/isql.epp b/src/isql/isql.epp index 5838f42086..b94bcc0735 100644 --- a/src/isql/isql.epp +++ b/src/isql/isql.epp @@ -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; diff --git a/src/jrd/dbt.cpp b/src/jrd/dbt.cpp index fbccfb887d..6409f276d4 100644 --- a/src/jrd/dbt.cpp +++ b/src/jrd/dbt.cpp @@ -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), diff --git a/src/jrd/dyn.epp b/src/jrd/dyn.epp index 0ab115dfb5..6d1572e836 100644 --- a/src/jrd/dyn.epp +++ b/src/jrd/dyn.epp @@ -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)); diff --git a/src/jrd/dyn_util.epp b/src/jrd/dyn_util.epp index 49fd29730b..3b11b23b94 100644 --- a/src/jrd/dyn_util.epp +++ b/src/jrd/dyn_util.epp @@ -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, diff --git a/src/jrd/grant.epp b/src/jrd/grant.epp index 38b9339f75..3baafc6e40 100644 --- a/src/jrd/grant.epp +++ b/src/jrd/grant.epp @@ -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)); diff --git a/src/jrd/ini.epp b/src/jrd/ini.epp index bee0860ac2..04a6bca1f4 100644 --- a/src/jrd/ini.epp +++ b/src/jrd/ini.epp @@ -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));