mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 22:03:03 +01:00
Some changes to get it compiled under linux.
Use const declarations for BLANK etc. in isql.h again. FSG
This commit is contained in:
parent
0e0c121825
commit
e3ba8c5f42
@ -30,6 +30,13 @@
|
||||
// =====================================
|
||||
// Utility functions
|
||||
|
||||
|
||||
#ifdef LINUX
|
||||
#define __need_size_t
|
||||
#include <stddef.h>
|
||||
#undef __need_size_t
|
||||
#endif
|
||||
|
||||
namespace fb_utils {
|
||||
|
||||
char* fb_exact_name(char* const str)
|
||||
|
@ -19,7 +19,7 @@
|
||||
*
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
* $Id: isql.h,v 1.19 2003-12-27 17:59:57 fsg Exp $
|
||||
* $Id: isql.h,v 1.20 2004-01-03 14:12:43 fsg Exp $
|
||||
* Revision 1.2 2000/11/18 16:49:24 fsg
|
||||
* Increased PRINT_BUFFER_LENGTH to 2048 to show larger plans
|
||||
* Fixed Bug #122563 in extract.e get_procedure_args
|
||||
@ -309,9 +309,10 @@ struct sqltypes {
|
||||
#endif
|
||||
|
||||
#define TAB_AS_SPACES " "
|
||||
#define BLANK '\040'
|
||||
#define DBL_QUOTE '\042'
|
||||
#define SINGLE_QUOTE '\''
|
||||
|
||||
const char BLANK= '\040';
|
||||
const char DBL_QUOTE= '\042';
|
||||
const char SINGLE_QUOTE= '\'';
|
||||
|
||||
|
||||
|
||||
@ -322,6 +323,5 @@ const SCHAR wal_items[] = {
|
||||
isc_info_wal_grpc_wait_usecs,
|
||||
isc_info_end
|
||||
};
|
||||
|
||||
#endif /* ISQL_ISQL_H */
|
||||
|
||||
|
@ -43,7 +43,7 @@ BLKDEF (type_con, con, 1) /* Constant block */
|
||||
BLKDEF (type_itm, itm, 0) /* Print item */
|
||||
BLKDEF (type_par, par, 0) /* Parameter block */
|
||||
BLKDEF (type_line, line, 1) /* Input line block */
|
||||
BLKDEF (type_brk, brk, 0)
|
||||
BLKDEF (type_brk, qli_brk, 0)
|
||||
BLKDEF (type_rpt, rpt, 0)
|
||||
BLKDEF (type_pic, pics, 0)
|
||||
BLKDEF (type_prt, prt, 0)
|
||||
|
@ -40,7 +40,7 @@
|
||||
static QLI_NOD compile_any(QLI_NOD, QLI_REQ, bool);
|
||||
static QLI_NOD compile_assignment(QLI_NOD, QLI_REQ, bool);
|
||||
static void compile_context(QLI_NOD, QLI_REQ, bool);
|
||||
static void compile_control_break(BRK, QLI_REQ);
|
||||
static void compile_control_break(QLI_BRK, QLI_REQ);
|
||||
static QLI_NOD compile_edit(QLI_NOD, QLI_REQ);
|
||||
static QLI_NOD compile_erase(QLI_NOD, QLI_REQ);
|
||||
static QLI_NOD compile_expression(QLI_NOD, QLI_REQ, bool);
|
||||
@ -71,7 +71,7 @@ static int string_length(const dsc*);
|
||||
|
||||
static LLS print_items;
|
||||
static TEXT** print_header;
|
||||
static BRK report_control_break;
|
||||
static QLI_BRK report_control_break;
|
||||
|
||||
|
||||
QLI_NOD CMPQ_compile( QLI_NOD node)
|
||||
@ -365,7 +365,7 @@ static void compile_context( QLI_NOD node, QLI_REQ request, bool internal_flag)
|
||||
}
|
||||
|
||||
|
||||
static void compile_control_break( BRK control, QLI_REQ request)
|
||||
static void compile_control_break( QLI_BRK control, QLI_REQ request)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -1139,7 +1139,7 @@ static QLI_NOD compile_report( QLI_NOD node, QLI_REQ request)
|
||||
* Compile the body of a report specification.
|
||||
*
|
||||
**************************************/
|
||||
BRK control;
|
||||
QLI_BRK control;
|
||||
QLI_NOD list;
|
||||
|
||||
RPT report = (RPT) node->nod_arg[e_prt_list];
|
||||
@ -1160,7 +1160,7 @@ static QLI_NOD compile_report( QLI_NOD node, QLI_REQ request)
|
||||
compile_control_break(control, request);
|
||||
report->rpt_bottom_breaks = NULL;
|
||||
while (control) {
|
||||
BRK temp = control;
|
||||
QLI_BRK temp = control;
|
||||
control = control->brk_next;
|
||||
temp->brk_next = report->rpt_bottom_breaks;
|
||||
report->rpt_bottom_breaks = temp;
|
||||
|
@ -50,7 +50,7 @@ static NAM decompile_symbol(SYM);
|
||||
static QLI_NOD expand_assignment(SYN, LLS, LLS);
|
||||
static QLI_NOD expand_any(SYN, LLS);
|
||||
static QLI_NOD expand_boolean(SYN, LLS);
|
||||
static void expand_control_break(BRK*, LLS);
|
||||
static void expand_control_break(QLI_BRK*, LLS);
|
||||
static void expand_distinct(QLI_NOD, QLI_NOD);
|
||||
static void expand_edit_string(QLI_NOD, ITM);
|
||||
static QLI_NOD expand_erase(SYN, LLS, LLS);
|
||||
@ -607,7 +607,7 @@ static QLI_NOD expand_boolean( SYN input, LLS stack)
|
||||
}
|
||||
|
||||
|
||||
static void expand_control_break( BRK* ptr, LLS right)
|
||||
static void expand_control_break( QLI_BRK* ptr, LLS right)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -620,9 +620,9 @@ static void expand_control_break( BRK* ptr, LLS right)
|
||||
* to handle multiple breaks.
|
||||
*
|
||||
**************************************/
|
||||
BRK control;
|
||||
QLI_BRK control;
|
||||
|
||||
BRK list = NULL;
|
||||
QLI_BRK list = NULL;
|
||||
|
||||
while (control = *ptr) {
|
||||
*ptr = control->brk_next;
|
||||
|
@ -64,7 +64,7 @@ static bool match_expr(const qli_nod*, const qli_nod*);
|
||||
static void print_blobs(PRT, itm**, itm**);
|
||||
static int print_line(itm*, TEXT**);
|
||||
static void put_line(PRT, TEXT**, TEXT*, TEXT);
|
||||
static void report_break(BRK, VEC*, const bool);
|
||||
static void report_break(QLI_BRK, VEC*, const bool);
|
||||
static void report_item(ITM, VEC*, USHORT*);
|
||||
static void report_line(QLI_NOD, VEC*);
|
||||
|
||||
@ -1331,7 +1331,7 @@ static void put_line( PRT print, TEXT** ptr, TEXT* buffer, TEXT terminator)
|
||||
}
|
||||
|
||||
|
||||
static void report_break( BRK control, VEC* columns_vec, const bool bottom_flag)
|
||||
static void report_break( QLI_BRK control, VEC* columns_vec, const bool bottom_flag)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
|
@ -21,7 +21,7 @@
|
||||
* Contributor(s): ______________________________________.
|
||||
*/
|
||||
/*
|
||||
$Id: gener.cpp,v 1.27 2003-11-08 16:31:07 brodsom Exp $
|
||||
$Id: gener.cpp,v 1.28 2004-01-03 14:12:45 fsg Exp $
|
||||
*/
|
||||
|
||||
#include "firebird.h"
|
||||
@ -50,7 +50,7 @@ static void explain_printf(SSHORT, const TEXT*, const TEXT*);
|
||||
|
||||
static void gen_any(QLI_NOD, QLI_REQ);
|
||||
static void gen_assignment(QLI_NOD, QLI_REQ);
|
||||
static void gen_control_break(BRK, QLI_REQ);
|
||||
static void gen_control_break(QLI_BRK, QLI_REQ);
|
||||
static void gen_compile(QLI_REQ);
|
||||
static void gen_descriptor(const dsc*, QLI_REQ);
|
||||
static void gen_erase(QLI_NOD, QLI_REQ);
|
||||
@ -561,7 +561,7 @@ static void gen_assignment( QLI_NOD node, QLI_REQ request)
|
||||
}
|
||||
|
||||
|
||||
static void gen_control_break( BRK control, QLI_REQ request)
|
||||
static void gen_control_break( QLI_BRK control, QLI_REQ request)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
|
@ -3353,7 +3353,7 @@ static SYN parse_report(void)
|
||||
*
|
||||
**************************************/
|
||||
SYN flds, qli_fld, rse_fld;
|
||||
BRK control, *ptr, tmpptr, tmpptr1;
|
||||
QLI_BRK control, *ptr, tmpptr, tmpptr1;
|
||||
USHORT top, i, srt_syn, ctl_syn, syn_count;
|
||||
NAM name1, name2;
|
||||
|
||||
@ -3390,7 +3390,7 @@ static SYN parse_report(void)
|
||||
SYNTAX_ERROR(382); // Msg382 TOP or BOTTOM
|
||||
MATCH(KW_OF);
|
||||
if (MATCH(KW_REPORT)) {
|
||||
control = (BRK) ALLOCD(type_brk);
|
||||
control = (QLI_BRK) ALLOCD(type_brk);
|
||||
ptr = (top) ? &report->rpt_top_rpt : &report->rpt_bottom_rpt;
|
||||
control->brk_next = *ptr;
|
||||
*ptr = control;
|
||||
@ -3398,7 +3398,7 @@ static SYN parse_report(void)
|
||||
control->brk_line = parse_print_list();
|
||||
}
|
||||
else if (MATCH(KW_PAGE)) {
|
||||
control = (BRK) ALLOCD(type_brk);
|
||||
control = (QLI_BRK) ALLOCD(type_brk);
|
||||
ptr =
|
||||
(top) ? &report->rpt_top_page : &report->rpt_bottom_page;
|
||||
control->brk_next = *ptr;
|
||||
@ -3417,7 +3417,7 @@ static SYN parse_report(void)
|
||||
SYNTAX_ERROR(383); // Msg383 sort field
|
||||
tmpptr = *ptr;
|
||||
for (i = 0; i < flds->syn_count; i += 2) {
|
||||
control = (BRK) ALLOCD(type_brk);
|
||||
control = (QLI_BRK) ALLOCD(type_brk);
|
||||
control->brk_field = flds->syn_arg[i];
|
||||
control->brk_line = NULL;
|
||||
control->brk_statisticals = NULL;
|
||||
|
@ -34,11 +34,11 @@
|
||||
#include "../qli/mov_proto.h"
|
||||
#include "../qli/repor_proto.h"
|
||||
|
||||
static void bottom_break(BRK, PRT);
|
||||
static void increment_break(BRK);
|
||||
static void initialize_break(BRK);
|
||||
static bool test_break(BRK, RPT, QLI_MSG);
|
||||
static void top_break(BRK, PRT);
|
||||
static void bottom_break(QLI_BRK, PRT);
|
||||
static void increment_break(QLI_BRK);
|
||||
static void initialize_break(QLI_BRK);
|
||||
static bool test_break(QLI_BRK, RPT, QLI_MSG);
|
||||
static void top_break(QLI_BRK, PRT);
|
||||
static void top_of_page(PRT, bool);
|
||||
|
||||
//#define SWAP(a,b) {temp = a; a = b; b = temp;}
|
||||
@ -106,7 +106,7 @@ void RPT_report( QLI_NOD loop)
|
||||
MOVQ_fast((SCHAR*) message->msg_buffer, (SCHAR*) report->rpt_buffer,
|
||||
(SLONG) message->msg_length);
|
||||
|
||||
BRK control;
|
||||
QLI_BRK control;
|
||||
if (control = report->rpt_top_rpt)
|
||||
FMT_print((QLI_NOD) control->brk_line, print);
|
||||
|
||||
@ -178,7 +178,7 @@ void RPT_report( QLI_NOD loop)
|
||||
}
|
||||
|
||||
|
||||
static void bottom_break( BRK control, PRT print)
|
||||
static void bottom_break( QLI_BRK control, PRT print)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -205,7 +205,7 @@ static void bottom_break( BRK control, PRT print)
|
||||
}
|
||||
|
||||
|
||||
static void increment_break( BRK control)
|
||||
static void increment_break( QLI_BRK control)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -225,7 +225,7 @@ static void increment_break( BRK control)
|
||||
}
|
||||
|
||||
|
||||
static void initialize_break( BRK control)
|
||||
static void initialize_break( QLI_BRK control)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -245,7 +245,7 @@ static void initialize_break( BRK control)
|
||||
}
|
||||
|
||||
|
||||
static bool test_break(BRK control,
|
||||
static bool test_break(QLI_BRK control,
|
||||
RPT report,
|
||||
QLI_MSG message)
|
||||
{
|
||||
@ -300,7 +300,7 @@ static bool test_break(BRK control,
|
||||
}
|
||||
|
||||
|
||||
static void top_break( BRK control, PRT print)
|
||||
static void top_break( QLI_BRK control, PRT print)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -338,7 +338,7 @@ static void top_of_page(PRT print,
|
||||
* Handle top of page condition.
|
||||
*
|
||||
**************************************/
|
||||
BRK control;
|
||||
QLI_BRK control;
|
||||
|
||||
++print->prt_page_number;
|
||||
RPT report = print->prt_report;
|
||||
|
@ -26,25 +26,25 @@
|
||||
|
||||
/* Control break block */
|
||||
|
||||
typedef struct brk {
|
||||
typedef struct qli_brk {
|
||||
blk brk_header;
|
||||
brk* brk_next; /* Next break */
|
||||
qli_brk* brk_next; /* Next break */
|
||||
SYN brk_field; /* Field expression for break */
|
||||
SYN brk_line; /* Print line */
|
||||
LLS brk_statisticals; /* Statistical expressions */
|
||||
} *BRK;
|
||||
} *QLI_BRK;
|
||||
|
||||
/* Report block */
|
||||
|
||||
typedef struct rpt {
|
||||
blk rpt_hdr;
|
||||
qli_nod* rpt_detail_line; /* Detail line print list */
|
||||
BRK rpt_top_page; /* Top of page print list */
|
||||
BRK rpt_bottom_page; /* Bottom of page print list */
|
||||
BRK rpt_top_rpt; /* Top of report print list */
|
||||
BRK rpt_bottom_rpt; /* Bottom of report print list */
|
||||
BRK rpt_top_breaks; /* Top of <field> break list */
|
||||
BRK rpt_bottom_breaks; /* Bottom of <field> break list */
|
||||
QLI_BRK rpt_top_page; /* Top of page print list */
|
||||
QLI_BRK rpt_bottom_page; /* Bottom of page print list */
|
||||
QLI_BRK rpt_top_rpt; /* Top of report print list */
|
||||
QLI_BRK rpt_bottom_rpt; /* Bottom of report print list */
|
||||
QLI_BRK rpt_top_breaks; /* Top of <field> break list */
|
||||
QLI_BRK rpt_bottom_breaks; /* Bottom of <field> break list */
|
||||
TEXT *rpt_column_header;
|
||||
TEXT *rpt_name; /* Parsed report name */
|
||||
TEXT *rpt_header; /* Expanded report header */
|
||||
|
Loading…
Reference in New Issue
Block a user