mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 16:03:02 +01:00
Macro cleaning
This commit is contained in:
parent
b07c16ed1b
commit
98d9fe6e63
@ -26,8 +26,8 @@
|
||||
|
||||
// SQLDA dialects
|
||||
|
||||
#define DIALECT_sqlda 0
|
||||
#define DIALECT_xsqlda 1
|
||||
const USHORT DIALECT_sqlda = 0;
|
||||
const USHORT DIALECT_xsqlda = 1;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -1001,7 +1001,7 @@ ISC_STATUS API_ROUTINE isc_describe(ISC_STATUS* status_vector,
|
||||
{
|
||||
return isc_embed_dsql_describe(status_vector,
|
||||
statement_name,
|
||||
(USHORT) DIALECT_sqlda,
|
||||
DIALECT_sqlda,
|
||||
reinterpret_cast<XSQLDA*>(sqlda));
|
||||
}
|
||||
|
||||
@ -1011,7 +1011,7 @@ ISC_STATUS API_ROUTINE isc_describe_bind(ISC_STATUS* status_vector,
|
||||
{
|
||||
return isc_embed_dsql_describe_bind(status_vector,
|
||||
statement_name,
|
||||
(USHORT) DIALECT_sqlda,
|
||||
DIALECT_sqlda,
|
||||
reinterpret_cast<XSQLDA*>(sqlda));
|
||||
}
|
||||
|
||||
@ -1027,7 +1027,7 @@ ISC_STATUS API_ROUTINE isc_execute(ISC_STATUS* status_vector,
|
||||
return isc_embed_dsql_execute(status_vector,
|
||||
tra_handle,
|
||||
statement_name,
|
||||
(USHORT) DIALECT_sqlda,
|
||||
DIALECT_sqlda,
|
||||
reinterpret_cast<XSQLDA*>(sqlda));
|
||||
}
|
||||
|
||||
@ -1040,7 +1040,7 @@ ISC_STATUS API_ROUTINE isc_execute_immediate(ISC_STATUS* status_vector,
|
||||
db_handle, tra_handle,
|
||||
(USHORT) ((sql_length) ? *sql_length :
|
||||
0), sql,
|
||||
(USHORT) DIALECT_sqlda, NULL);
|
||||
DIALECT_sqlda, NULL);
|
||||
}
|
||||
|
||||
#ifdef VMS
|
||||
@ -1064,7 +1064,7 @@ ISC_STATUS API_ROUTINE isc_fetch(ISC_STATUS* status_vector,
|
||||
{
|
||||
return isc_embed_dsql_fetch(status_vector,
|
||||
cursor_name,
|
||||
(USHORT) DIALECT_sqlda,
|
||||
DIALECT_sqlda,
|
||||
reinterpret_cast<XSQLDA*>(sqlda));
|
||||
}
|
||||
|
||||
@ -1075,7 +1075,7 @@ ISC_STATUS API_ROUTINE isc_fetch_a(ISC_STATUS* status_vector,
|
||||
return isc_embed_dsql_fetch_a(status_vector,
|
||||
sqlcode,
|
||||
cursor_name,
|
||||
(USHORT) DIALECT_sqlda,
|
||||
DIALECT_sqlda,
|
||||
reinterpret_cast<XSQLDA*>(sqlda));
|
||||
}
|
||||
|
||||
@ -1086,7 +1086,7 @@ ISC_STATUS API_ROUTINE isc_open(ISC_STATUS* status_vector,
|
||||
return isc_embed_dsql_open(status_vector,
|
||||
tra_handle,
|
||||
cursor_name,
|
||||
(USHORT) DIALECT_sqlda,
|
||||
DIALECT_sqlda,
|
||||
reinterpret_cast<XSQLDA*>(sqlda));
|
||||
}
|
||||
|
||||
@ -1104,7 +1104,7 @@ ISC_STATUS API_ROUTINE isc_prepare( ISC_STATUS* status_vector,
|
||||
statement_name,
|
||||
(USHORT) ((sql_length) ? *sql_length : 0),
|
||||
sql,
|
||||
(USHORT) DIALECT_sqlda,
|
||||
DIALECT_sqlda,
|
||||
reinterpret_cast<XSQLDA*>(sqlda));
|
||||
}
|
||||
|
||||
|
@ -26,8 +26,6 @@
|
||||
#include "ld_proto.h"
|
||||
#include "lc_ascii.h"
|
||||
|
||||
#define ASCII_SPACE 32 // ASCII code for space
|
||||
|
||||
static inline void FAMILY_ASCII(TEXTTYPE cache,
|
||||
TTYPE_ID id_number,
|
||||
pfn_INTL_init name,
|
||||
@ -418,7 +416,7 @@ TEXTTYPE_ENTRY(NEXT_c0_init)
|
||||
|
||||
#define LANGASCII_MAX_KEY (MAX_KEY)
|
||||
|
||||
//#define ASCII_SPACE 32 // ASCII code for space
|
||||
#define ASCII_SPACE 32 // ASCII code for space
|
||||
|
||||
#define ASCII7_UPPER(ch) \
|
||||
((((UCHAR) (ch) >= (UCHAR) ASCII_LOWER_A) && ((UCHAR) (ch) <= (UCHAR) ASCII_LOWER_Z)) \
|
||||
@ -429,21 +427,21 @@ TEXTTYPE_ENTRY(NEXT_c0_init)
|
||||
? (UCHAR) ((ch)-ASCII_UPPER_A+ASCII_LOWER_A) \
|
||||
: (UCHAR) (ch))
|
||||
|
||||
#define CP1251_UPPER_A 0xC0
|
||||
#define CP1251_LOWER_A 0xE0
|
||||
#define CP1251_UPPER_YA 0xDF
|
||||
#define CP1251_LOWER_YA 0xFF
|
||||
const UCHAR CP1251_UPPER_A = 0xC0;
|
||||
const UCHAR CP1251_LOWER_A = 0xE0;
|
||||
const UCHAR CP1251_UPPER_YA = 0xDF;
|
||||
const UCHAR CP1251_LOWER_YA = 0xFF;
|
||||
|
||||
#define CP1251_UPPER_EX0 0xA8 // ¨
|
||||
#define CP1251_LOWER_EX0 0xB8 // ¸
|
||||
#define CP1251_UPPER_EX1 0xA5 // ¥
|
||||
#define CP1251_LOWER_EX1 0xB4 // ´
|
||||
#define CP1251_UPPER_EX2 0xAA // ª
|
||||
#define CP1251_LOWER_EX2 0xBA // º
|
||||
#define CP1251_UPPER_EX3 0xAF // ¯
|
||||
#define CP1251_LOWER_EX3 0xBF // ¿
|
||||
#define CP1251_UPPER_EX4 0xB2 // ²
|
||||
#define CP1251_LOWER_EX4 0xB3 // ³
|
||||
const UCHAR CP1251_UPPER_EX0 = 0xA8; // ¨
|
||||
const UCHAR CP1251_LOWER_EX0 = 0xB8; // ¸
|
||||
const UCHAR CP1251_UPPER_EX1 = 0xA5; // ¥
|
||||
const UCHAR CP1251_LOWER_EX1 = 0xB4; // ´
|
||||
const UCHAR CP1251_UPPER_EX2 = 0xAA; // ª
|
||||
const UCHAR CP1251_LOWER_EX2 = 0xBA; // º
|
||||
const UCHAR CP1251_UPPER_EX3 = 0xAF; // ¯
|
||||
const UCHAR CP1251_LOWER_EX3 = 0xBF; // ¿
|
||||
const UCHAR CP1251_UPPER_EX4 = 0xB2; // ²
|
||||
const UCHAR CP1251_LOWER_EX4 = 0xB3; // ³
|
||||
|
||||
static inline UCHAR CP1251_UPPER(UCHAR ch)
|
||||
{
|
||||
|
@ -48,9 +48,9 @@
|
||||
#endif
|
||||
|
||||
/* Startup Configuration Entry point for regcfg.exe. */
|
||||
#define SVC_CONFIG 4
|
||||
#define REGCFG_ENTRYPOINT "LaunchInstReg"
|
||||
#define REGCFG_DLL "REGCFG.DLL"
|
||||
//#define SVC_CONFIG 4
|
||||
//#define REGCFG_ENTRYPOINT "LaunchInstReg"
|
||||
//#define REGCFG_DLL "REGCFG.DLL"
|
||||
typedef void (__cdecl * LPFNREGCFG) (char *, short);
|
||||
|
||||
// Define an array of dword pairs,
|
||||
@ -676,7 +676,7 @@ void start_and_watch_server(const char* server_name)
|
||||
|
||||
const int ret_val = WaitForSingleObject(procHandle, INFINITE);
|
||||
if (ret_val == WAIT_ABANDONED)
|
||||
exit_status = (DWORD) CRASHED;
|
||||
exit_status = CRASHED;
|
||||
else if (ret_val == WAIT_OBJECT_0)
|
||||
exit_status = NORMAL_EXIT;
|
||||
|
||||
|
@ -16,24 +16,27 @@
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
#define GUARDIAN_APP_NAME "Firebird Guardian"
|
||||
#define GUARDIAN_APP_LABEL "Firebird Guardian"
|
||||
#define GUARDIAN_CLASS_NAME "FB_Guard"
|
||||
#define FBSERVER "fbserver.exe"
|
||||
#define GUARDIAN_HELP_FILE "fbserver.hlp"
|
||||
#ifndef ISCGUARD_H
|
||||
#define ISCGUARD_H
|
||||
|
||||
const char* GUARDIAN_APP_NAME = "Firebird Guardian";
|
||||
const char* GUARDIAN_APP_LABEL = "Firebird Guardian";
|
||||
const char* GUARDIAN_CLASS_NAME = "FB_Guard";
|
||||
const char* FBSERVER = "fbserver.exe";
|
||||
const char* GUARDIAN_HELP_FILE = "fbserver.hlp";
|
||||
|
||||
/* Help Constants */
|
||||
#define ibs_server_directory 8060
|
||||
#define ibs_guard_version 8080
|
||||
#define ibs_guard_log 8090
|
||||
const DWORD ibs_server_directory = 8060;
|
||||
const DWORD ibs_guard_version = 8080;
|
||||
const DWORD ibs_guard_log = 8090;
|
||||
|
||||
#define WM_SWITCHICONS WM_USER + 3
|
||||
|
||||
#define START_ONCE 0
|
||||
#define START_FOREVER 1
|
||||
const short START_ONCE = 0;
|
||||
const short START_FOREVER = 1;
|
||||
|
||||
#define NORMAL_EXIT 0
|
||||
#define CRASHED -1
|
||||
const DWORD NORMAL_EXIT = 0;
|
||||
const DWORD CRASHED = (DWORD) -1;
|
||||
|
||||
typedef void (*FPTR_VOID) ();
|
||||
|
||||
@ -44,3 +47,4 @@ struct log_info {
|
||||
log_info* next;
|
||||
};
|
||||
|
||||
#endif // ISCGUARD_H
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#include "../jrd/os/path_utils.h"
|
||||
|
||||
#define CONFIG_FILE "firebird.conf"
|
||||
static const char* CONFIG_FILE = "firebird.conf";
|
||||
|
||||
/**
|
||||
Since the original (isc.cpp) code wasn't able to provide powerful and
|
||||
|
@ -56,9 +56,9 @@
|
||||
#endif
|
||||
|
||||
|
||||
#define TEST_REPEATS 6 /* Number of times to repeat timing */
|
||||
#define MCOUNT 10000 /* Number of operations per timing */
|
||||
#define MAXSIZE 8196 /* Max size of buffer to copy */
|
||||
const int TEST_REPEATS = 6; /* Number of times to repeat timing */
|
||||
const int MCOUNT = 10000; /* Number of operations per timing */
|
||||
const int MAXSIZE = 8196; /* Max size of buffer to copy */
|
||||
|
||||
ULONG force_alignment_dummy1;
|
||||
UCHAR source[MAXSIZE + sizeof(ULONG) * 2];
|
||||
@ -255,10 +255,10 @@ do_test_memset(dest, size)
|
||||
report_time(message_buffer);
|
||||
|
||||
/* Guesses for optimal length for each algorithm */
|
||||
#define SIZE_OPTIMAL_MEMSET_INLINE 16
|
||||
#define SIZE_OPTIMAL_MEMSET_MEMSET 160
|
||||
#define SIZE_OPTIMAL_MEMCPY_INLINE 16
|
||||
#define SIZE_OPTIMAL_MEMCPY_MEMCPY 160
|
||||
const int SIZE_OPTIMAL_MEMSET_INLINE = 16;
|
||||
const int SIZE_OPTIMAL_MEMSET_MEMSET = 160;
|
||||
const int SIZE_OPTIMAL_MEMCPY_INLINE = 16;
|
||||
const int SIZE_OPTIMAL_MEMCPY_MEMCPY = 160;
|
||||
|
||||
init_time();
|
||||
for (r = 0; r < TEST_REPEATS; r++) {
|
||||
|
@ -36,13 +36,13 @@
|
||||
|
||||
DATABASE DB = "msg.fdb";
|
||||
|
||||
#define FAC_SQL_POSITIVE 14
|
||||
#define FAC_SQL_NEGATIVE 13
|
||||
//#define FAC_SQL_POSITIVE 14
|
||||
//#define FAC_SQL_NEGATIVE 13
|
||||
|
||||
#define LOWER_A 'a'
|
||||
#define UPPER_A 'A'
|
||||
#define LOWER_Z 'z'
|
||||
#define UPPER_Z 'Z'
|
||||
const char LOWER_A = 'a';
|
||||
const char UPPER_A = 'A';
|
||||
const char LOWER_Z = 'z';
|
||||
const char UPPER_Z = 'Z';
|
||||
|
||||
static void ascii_str_upper(UCHAR *);
|
||||
static void explicit_print(TEXT *);
|
||||
|
@ -50,9 +50,9 @@
|
||||
DATABASE DB = "msg.fdb";
|
||||
|
||||
|
||||
#define INCLUDE_INDICATOR "indicator.incl"
|
||||
#define MESSAGE_INDICATOR "indicator.msg"
|
||||
#define LOCALE_INDICATOR "indicator.loc"
|
||||
const char* INCLUDE_INDICATOR = "indicator.incl";
|
||||
const char* MESSAGE_INDICATOR = "indicator.msg";
|
||||
const char* LOCALE_INDICATOR = "indicator.loc";
|
||||
|
||||
|
||||
int CLIB_ROUTINE main( int argc, char *argv[])
|
||||
|
@ -50,13 +50,13 @@ static int store_sql_msg(void);
|
||||
static int translate(UCHAR *, UCHAR *, SSHORT);
|
||||
static bool get_symbol( UCHAR *);
|
||||
|
||||
#define FAC_SQL_POSITIVE 14
|
||||
#define FAC_SQL_NEGATIVE 13
|
||||
const int FAC_SQL_POSITIVE = 14;
|
||||
const int FAC_SQL_NEGATIVE = 13;
|
||||
|
||||
#define LOWER_A 'a'
|
||||
#define UPPER_A 'A'
|
||||
#define LOWER_Z 'z'
|
||||
#define UPPER_Z 'Z'
|
||||
const char LOWER_A = 'a';
|
||||
const char UPPER_A = 'A';
|
||||
const char LOWER_Z = 'z';
|
||||
const char UPPER_Z = 'Z';
|
||||
|
||||
|
||||
int main( int argc, char **argv)
|
||||
|
@ -37,9 +37,9 @@ static int put_error(FILE *, SCHAR **, SCHAR *, SSHORT);
|
||||
static int put_symbol(FILE *, SCHAR *, SCHAR *, SLONG, SSHORT);
|
||||
static int put_symbols(FILE *, SCHAR **, SCHAR *, SSHORT);
|
||||
|
||||
#define OPT_byte 1
|
||||
#define OPT_signed 2
|
||||
#define OPT_sans_dollar 4
|
||||
const SSHORT OPT_byte = 1;
|
||||
const SSHORT OPT_signed = 2;
|
||||
const SSHORT OPT_sans_dollar = 4;
|
||||
|
||||
static SSHORT defaults;
|
||||
static SCHAR *formats[40], *format_ptr, format_buffer[1024];
|
||||
|
@ -41,7 +41,7 @@
|
||||
*
|
||||
*/
|
||||
/*
|
||||
$Id: inet.cpp,v 1.108 2004-05-17 22:29:41 brodsom Exp $
|
||||
$Id: inet.cpp,v 1.109 2004-05-18 16:26:23 brodsom Exp $
|
||||
*/
|
||||
#include "firebird.h"
|
||||
#include <stdio.h>
|
||||
@ -210,9 +210,9 @@ static bool first_time = true;
|
||||
#ifdef HAVE_SYS_TIMEB_H
|
||||
# include <sys/timeb.h>
|
||||
#endif
|
||||
#define TRACE_packets (1 << 0) /* bit 0 */
|
||||
#define TRACE_operations (1 << 1) /* bit 1 */
|
||||
#define TRACE_summary (1 << 2) /* bit 2 */
|
||||
const int TRACE_packets = 1 << 0; /* bit 0 */
|
||||
const int TRACE_operations = 1 << 1; /* bit 1 */
|
||||
const int TRACE_summary = 1 << 2; /* bit 2 */
|
||||
|
||||
static int INET_trace = TRACE_summary | TRACE_packets | TRACE_operations;
|
||||
static time_t INET_start_time = 0;
|
||||
|
@ -164,23 +164,23 @@ const size_t XNET_CONNECT_RESPONZE_SIZE = sizeof(XNET_RESPONSE);
|
||||
|
||||
/* Windows names used to identify various named objects */
|
||||
|
||||
#define XNET_PREFIX "FirebirdXNET"
|
||||
#define XNET_MAPPED_FILE_NAME "%s_MAP_%"ULONGFORMAT"_%"ULONGFORMAT
|
||||
const char* XNET_PREFIX = "FirebirdXNET";
|
||||
const char* XNET_MAPPED_FILE_NAME = "%s_MAP_%"ULONGFORMAT"_%"ULONGFORMAT;
|
||||
|
||||
#define XNET_MA_CONNECT_MAP "%s_CONNECT_MAP"
|
||||
#define XNET_MU_CONNECT_MUTEX "%s_CONNECT_MUTEX"
|
||||
#define XNET_E_CONNECT_EVENT "%s_E_CONNECT_EVENT"
|
||||
#define XNET_E_RESPONSE_EVENT "%s_E_RESPONSE_EVENT"
|
||||
const char* XNET_MA_CONNECT_MAP = "%s_CONNECT_MAP";
|
||||
const char* XNET_MU_CONNECT_MUTEX = "%s_CONNECT_MUTEX";
|
||||
const char* XNET_E_CONNECT_EVENT = "%s_E_CONNECT_EVENT";
|
||||
const char* XNET_E_RESPONSE_EVENT = "%s_E_RESPONSE_EVENT";
|
||||
|
||||
#define XNET_E_C2S_DATA_CHAN_FILLED "%s_E_C2S_DATA_FILLED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT
|
||||
#define XNET_E_C2S_DATA_CHAN_EMPTED "%s_E_C2S_DATA_EMPTED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT
|
||||
#define XNET_E_S2C_DATA_CHAN_FILLED "%s_E_S2C_DATA_FILLED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT
|
||||
#define XNET_E_S2C_DATA_CHAN_EMPTED "%s_E_S2C_DATA_EMPTED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT
|
||||
const char* XNET_E_C2S_DATA_CHAN_FILLED = "%s_E_C2S_DATA_FILLED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT;
|
||||
const char* XNET_E_C2S_DATA_CHAN_EMPTED = "%s_E_C2S_DATA_EMPTED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT;
|
||||
const char* XNET_E_S2C_DATA_CHAN_FILLED = "%s_E_S2C_DATA_FILLED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT;
|
||||
const char* XNET_E_S2C_DATA_CHAN_EMPTED = "%s_E_S2C_DATA_EMPTED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT;
|
||||
|
||||
#define XNET_E_C2S_EVNT_CHAN_FILLED "%s_E_C2S_EVNT_FILLED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT
|
||||
#define XNET_E_C2S_EVNT_CHAN_EMPTED "%s_E_C2S_EVNT_EMPTED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT
|
||||
#define XNET_E_S2C_EVNT_CHAN_FILLED "%s_E_S2C_EVNT_FILLED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT
|
||||
#define XNET_E_S2C_EVNT_CHAN_EMPTED "%s_E_S2C_EVNT_EMPTED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT
|
||||
const char* XNET_E_C2S_EVNT_CHAN_FILLED = "%s_E_C2S_EVNT_FILLED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT;
|
||||
const char* XNET_E_C2S_EVNT_CHAN_EMPTED = "%s_E_C2S_EVNT_EMPTED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT;
|
||||
const char* XNET_E_S2C_EVNT_CHAN_FILLED = "%s_E_S2C_EVNT_FILLED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT;
|
||||
const char* XNET_E_S2C_EVNT_CHAN_EMPTED = "%s_E_S2C_EVNT_EMPTED_%"ULONGFORMAT"_%"ULONGFORMAT"_%"ULONGFORMAT;
|
||||
|
||||
#endif /* REMOTE_XNET_H */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user