From 25c1dbd36716aa95e3d8a1bfbf1bb7df40d053c3 Mon Sep 17 00:00:00 2001 From: hippoman Date: Mon, 11 Nov 2002 19:42:47 +0000 Subject: [PATCH] * Changed NOD struct name to JRD_NOD. --- src/jrd/blb.cpp | 6 +- src/jrd/blk.h | 2 +- src/jrd/btr.cpp | 8 +- src/jrd/cmp.cpp | 222 ++++++++++++++++---------------- src/jrd/evl.cpp | 130 +++++++++---------- src/jrd/exe.cpp | 114 ++++++++--------- src/jrd/exe.h | 10 +- src/jrd/ext.cpp | 4 +- src/jrd/inf.cpp | 2 +- src/jrd/jrd.cpp | 2 +- src/jrd/nav.cpp | 14 +- src/jrd/opt.cpp | 334 ++++++++++++++++++++++++------------------------ src/jrd/par.cpp | 306 ++++++++++++++++++++++---------------------- src/jrd/rng.cpp | 10 +- src/jrd/rse.cpp | 66 +++++----- 15 files changed, 615 insertions(+), 615 deletions(-) diff --git a/src/jrd/blb.cpp b/src/jrd/blb.cpp index d01ede44ed..166b0435a4 100644 --- a/src/jrd/blb.cpp +++ b/src/jrd/blb.cpp @@ -33,7 +33,7 @@ * */ /* -$Id: blb.cpp,v 1.14 2002-10-31 10:38:03 dimitr Exp $ +$Id: blb.cpp,v 1.15 2002-11-11 19:42:43 hippoman Exp $ */ #include "firebird.h" @@ -820,7 +820,7 @@ void DLL_EXPORT BLB_map_blobs(TDBB tdbb, BLB old_blob, BLB new_blob) #endif // REPLAY_OSRI_API_CALLS_SUBSYSTEM -void BLB_move(TDBB tdbb, DSC * from_desc, DSC * to_desc, NOD field) +void BLB_move(TDBB tdbb, DSC * from_desc, DSC * to_desc, JRD_NOD field) { /************************************** * @@ -946,7 +946,7 @@ void BLB_move(TDBB tdbb, DSC * from_desc, DSC * to_desc, NOD field) } -void BLB_move_from_string(TDBB tdbb, DSC * from_desc, DSC * to_desc, NOD field) +void BLB_move_from_string(TDBB tdbb, DSC * from_desc, DSC * to_desc, JRD_NOD field) { /************************************** * diff --git a/src/jrd/blk.h b/src/jrd/blk.h index eae54d8640..114fd335e5 100644 --- a/src/jrd/blk.h +++ b/src/jrd/blk.h @@ -42,7 +42,7 @@ BLKDEF(type_fmt, fmt, sizeof(((FMT) 0)->fmt_desc[0])) /* Done */ BLKDEF(type_vcl, vcl, sizeof(((VCL) 0)->vcl_long[0])) /* Done */ BLKDEF(type_req, req, sizeof(((REQ) 0)->req_rpb[0])) /* Done */ BLKDEF(type_tra, tra, 1) -BLKDEF(type_nod, nod, sizeof(((NOD) 0)->nod_arg[0])) /* Done */ +BLKDEF(type_nod, nod, sizeof(((JRD_NOD) 0)->nod_arg[0])) /* Done */ BLKDEF(type_csb, Csb, sizeof(((CSB) 0)->csb_rpt[0])) /* Done */ BLKDEF(type_lls, lls, 0) /* linked list stack */ BLKDEF(type_rec, rec, 1) /* record parameter */ diff --git a/src/jrd/btr.cpp b/src/jrd/btr.cpp index 72d641eaa2..3f80f1483f 100644 --- a/src/jrd/btr.cpp +++ b/src/jrd/btr.cpp @@ -24,7 +24,7 @@ * */ /* -$Id: btr.cpp,v 1.9 2002-10-31 05:05:56 seanleyne Exp $ +$Id: btr.cpp,v 1.10 2002-11-11 19:42:44 hippoman Exp $ */ #include "firebird.h" @@ -164,7 +164,7 @@ static USHORT compute_prefix(KEY *, UCHAR *, USHORT); static void copy_key(KEY *, KEY *); static CONTENTS delete_node(TDBB, WIN *, BTN); static void delete_tree(TDBB, USHORT, USHORT, SLONG, SLONG); -static DSC *eval(TDBB, NOD, DSC *, int *); +static DSC *eval(TDBB, JRD_NOD, DSC *, int *); static SLONG fast_load(TDBB, REL, IDX *, USHORT, SCB, float *); static IRT fetch_root(TDBB, WIN *, REL); static BTN find_node(register BTR, KEY *, USHORT); @@ -1285,7 +1285,7 @@ USHORT BTR_lookup(TDBB tdbb, REL relation, USHORT id, register IDX * buffer) void BTR_make_key(TDBB tdbb, USHORT count, - NOD * exprs, IDX * idx, KEY * key, USHORT fuzzy) + JRD_NOD * exprs, IDX * idx, KEY * key, USHORT fuzzy) { /************************************** * @@ -2530,7 +2530,7 @@ static void delete_tree(TDBB tdbb, } -static DSC *eval(TDBB tdbb, NOD node, DSC * temp, int *missing) +static DSC *eval(TDBB tdbb, JRD_NOD node, DSC * temp, int *missing) { /************************************** * diff --git a/src/jrd/cmp.cpp b/src/jrd/cmp.cpp index c3b5028b52..793d94ffda 100644 --- a/src/jrd/cmp.cpp +++ b/src/jrd/cmp.cpp @@ -40,7 +40,7 @@ * */ /* -$Id: cmp.cpp,v 1.17 2002-10-31 05:05:56 seanleyne Exp $ +$Id: cmp.cpp,v 1.18 2002-11-11 19:42:44 hippoman Exp $ */ #include "firebird.h" @@ -133,35 +133,35 @@ rel_MAX} RIDS; #endif static UCHAR *alloc_map(TDBB, CSB *, USHORT); -static NOD catenate_nodes(TDBB, LLS); -static NOD copy(TDBB, CSB *, NOD, UCHAR *, USHORT, USHORT); +static JRD_NOD catenate_nodes(TDBB, LLS); +static JRD_NOD copy(TDBB, CSB *, JRD_NOD, UCHAR *, USHORT, USHORT); static void expand_view_nodes(TDBB, CSB, USHORT, LLS *, NOD_T); static void ignore_dbkey(TDBB, CSB, RSE, REL); -static NOD make_defaults(TDBB, CSB *, USHORT, NOD); -static NOD make_validation(TDBB, CSB *, USHORT); -static NOD pass1(TDBB, CSB *, NOD, REL, USHORT, BOOLEAN); -static void pass1_erase(TDBB, CSB *, NOD); -static NOD pass1_expand_view(TDBB, CSB, USHORT, USHORT, USHORT); -static void pass1_modify(TDBB, CSB *, NOD); +static JRD_NOD make_defaults(TDBB, CSB *, USHORT, JRD_NOD); +static JRD_NOD make_validation(TDBB, CSB *, USHORT); +static JRD_NOD pass1(TDBB, CSB *, JRD_NOD, REL, USHORT, BOOLEAN); +static void pass1_erase(TDBB, CSB *, JRD_NOD); +static JRD_NOD pass1_expand_view(TDBB, CSB, USHORT, USHORT, USHORT); +static void pass1_modify(TDBB, CSB *, JRD_NOD); static RSE pass1_rse(TDBB, CSB *, RSE, REL, USHORT); -static void pass1_source(TDBB, CSB *, RSE, NOD, NOD *, LLS *, REL, USHORT); -static NOD pass1_store(TDBB, CSB *, NOD); -static NOD pass1_update(TDBB, CSB *, REL, TRIG_VEC, USHORT, USHORT, USHORT, REL, +static void pass1_source(TDBB, CSB *, RSE, JRD_NOD, JRD_NOD *, LLS *, REL, USHORT); +static JRD_NOD pass1_store(TDBB, CSB *, JRD_NOD); +static JRD_NOD pass1_update(TDBB, CSB *, REL, TRIG_VEC, USHORT, USHORT, USHORT, REL, USHORT); -static NOD pass2(TDBB, register CSB, register NOD, NOD); +static JRD_NOD pass2(TDBB, register CSB, register JRD_NOD, JRD_NOD); static void pass2_rse(TDBB, CSB, RSE); -static NOD pass2_union(TDBB, CSB, NOD); +static JRD_NOD pass2_union(TDBB, CSB, JRD_NOD); static void plan_check(CSB, RSE); -static void plan_set(CSB, RSE, NOD); +static void plan_set(CSB, RSE, JRD_NOD); static void post_procedure_access(TDBB, CSB, PRC); static RSB post_rse(TDBB, CSB, RSE); static void post_trigger_access(TDBB, CSB, REL, TRIG_VEC, REL); -static void process_map(TDBB, CSB, NOD, FMT *); +static void process_map(TDBB, CSB, JRD_NOD, FMT *); static BOOLEAN stream_in_rse(USHORT, RSE); static SSHORT strcmp_space(TEXT *, TEXT *); #ifdef PC_ENGINE -static USHORT base_stream(CSB, NOD *, BOOLEAN); +static USHORT base_stream(CSB, JRD_NOD *, BOOLEAN); #endif @@ -195,7 +195,7 @@ int DLL_EXPORT CMP_clone_active(REQ request) } -NOD DLL_EXPORT CMP_clone_node(TDBB tdbb, CSB csb, NOD node) +JRD_NOD DLL_EXPORT CMP_clone_node(TDBB tdbb, CSB csb, JRD_NOD node) { /************************************** * @@ -208,7 +208,7 @@ NOD DLL_EXPORT CMP_clone_node(TDBB tdbb, CSB csb, NOD node) * (if necessary) and assign impure space. * **************************************/ - NOD clone; + JRD_NOD clone; SET_TDBB(tdbb); @@ -576,7 +576,7 @@ FMT DLL_EXPORT CMP_format(TDBB tdbb, CSB csb, USHORT stream) void DLL_EXPORT CMP_get_desc( TDBB tdbb, - register CSB csb, register NOD node, DSC * desc) + register CSB csb, register JRD_NOD node, DSC * desc) { /************************************** * @@ -786,7 +786,7 @@ void DLL_EXPORT CMP_get_desc( case nod_scalar: { - NOD sub; + JRD_NOD sub; REL relation; USHORT id; FLD field; @@ -1520,7 +1520,7 @@ void DLL_EXPORT CMP_get_desc( case nod_argument: { FMT format; - NOD message; + JRD_NOD message; message = node->nod_arg[e_arg_message]; format = (FMT) message->nod_arg[e_msg_format]; @@ -1586,7 +1586,7 @@ void DLL_EXPORT CMP_get_desc( case nod_variable: { - NOD value; + JRD_NOD value; value = node->nod_arg[e_var_variable]; *desc = *(DSC *) (value->nod_arg + e_dcl_desc); @@ -1724,7 +1724,7 @@ REQ DLL_EXPORT CMP_make_request(TDBB tdbb, CSB * csb_ptr) optimizations can be performed here */ DEBUG; - NOD node = pass1(tdbb, csb_ptr, (*csb_ptr)->csb_node, 0, 0, FALSE); + JRD_NOD node = pass1(tdbb, csb_ptr, (*csb_ptr)->csb_node, 0, 0, FALSE); CSB csb = *csb_ptr; csb->csb_node = node; csb->csb_impure = REQ_SIZE + REQ_TAIL * csb->csb_n_stream; @@ -2261,7 +2261,7 @@ static UCHAR *alloc_map(TDBB tdbb, CSB * csb, USHORT stream) #ifdef PC_ENGINE -static USHORT base_stream(CSB csb, NOD * stream_number, BOOLEAN nav_stream) +static USHORT base_stream(CSB csb, JRD_NOD * stream_number, BOOLEAN nav_stream) { /************************************** * @@ -2279,7 +2279,7 @@ static USHORT base_stream(CSB csb, NOD * stream_number, BOOLEAN nav_stream) USHORT stream; DEV_BLKCHK(csb, type_csb); -/* Note: *stream_number is NOT a NOD */ +/* Note: *stream_number is NOT a JRD_NOD */ stream = (USHORT) * stream_number; @@ -2300,13 +2300,13 @@ static USHORT base_stream(CSB csb, NOD * stream_number, BOOLEAN nav_stream) in the node tree to point to the base table from now on */ if (nav_stream) - *stream_number = (NOD) stream; + *stream_number = (JRD_NOD) stream; return stream; } #endif -static NOD catenate_nodes(TDBB tdbb, LLS stack) +static JRD_NOD catenate_nodes(TDBB tdbb, LLS stack) { /************************************** * @@ -2319,13 +2319,13 @@ static NOD catenate_nodes(TDBB tdbb, LLS stack) * and turn them into a tree of concatenations. * **************************************/ - NOD cat_node, node1; + JRD_NOD cat_node, node1; SET_TDBB(tdbb); DEV_BLKCHK(stack, type_lls); - node1 = (NOD) LLS_POP(&stack); + node1 = (JRD_NOD) LLS_POP(&stack); if (!stack) return node1; @@ -2339,10 +2339,10 @@ static NOD catenate_nodes(TDBB tdbb, LLS stack) } -static NOD copy( +static JRD_NOD copy( TDBB tdbb, CSB * csb, - NOD input, UCHAR * remap, USHORT field_id, USHORT remap_fld) + JRD_NOD input, UCHAR * remap, USHORT field_id, USHORT remap_fld) { /************************************** * @@ -2355,7 +2355,7 @@ static NOD copy( * map isn't present, don't remap. * **************************************/ - NOD node, *arg1, *arg2, *end; + JRD_NOD node, *arg1, *arg2, *end; USHORT stream, new_stream, args; SET_TDBB(tdbb); @@ -2430,7 +2430,7 @@ static NOD copy( case nod_field: { - NOD temp_node; + JRD_NOD temp_node; if (field_id && (input->nod_flags & nod_id) && !input->nod_arg[e_fld_id] && !input->nod_arg[e_fld_stream]) @@ -2541,7 +2541,7 @@ static NOD copy( new_rse->rse_projection = copy(tdbb, csb, old_rse->rse_projection, remap, field_id, remap_fld); - return (NOD) new_rse; + return (JRD_NOD) new_rse; } case nod_relation: @@ -2563,7 +2563,7 @@ static NOD copy( **/ relative_stream = (stream) ? remap[stream - 1] : stream; new_stream = (*csb)->csb_n_stream++; - node->nod_arg[e_rel_stream] = (NOD) (SLONG) new_stream; + node->nod_arg[e_rel_stream] = (JRD_NOD) (SLONG) new_stream; /* TMN: Here we should really have the following assert */ /* assert(new_stream <= MAX_UCHAR); */ remap[stream] = (UCHAR) new_stream; @@ -2632,7 +2632,7 @@ static NOD copy( node->nod_arg[e_prc_in_msg] = input->nod_arg[e_prc_in_msg]; stream = (USHORT) input->nod_arg[e_prc_stream]; new_stream = (*csb)->csb_n_stream++; - node->nod_arg[e_prc_stream] = (NOD) (SLONG) new_stream; + node->nod_arg[e_prc_stream] = (JRD_NOD) (SLONG) new_stream; /* TMN: Here we should really have the following assert */ /* assert(new_stream <= MAX_UCHAR); */ remap[stream] = (UCHAR) new_stream; @@ -2653,7 +2653,7 @@ static NOD copy( node->nod_count = 0; stream = (USHORT) input->nod_arg[e_agg_stream]; new_stream = (*csb)->csb_n_stream++; - node->nod_arg[e_agg_stream] = (NOD) (SLONG) new_stream; + node->nod_arg[e_agg_stream] = (JRD_NOD) (SLONG) new_stream; /* TMN: Here we should really have the following assert */ /* assert(new_stream <= MAX_UCHAR); */ remap[stream] = (UCHAR) new_stream; @@ -2680,7 +2680,7 @@ static NOD copy( node->nod_count = 2; stream = (USHORT) input->nod_arg[e_uni_stream]; new_stream = (*csb)->csb_n_stream++; - node->nod_arg[e_uni_stream] = (NOD) (SLONG) new_stream; + node->nod_arg[e_uni_stream] = (JRD_NOD) (SLONG) new_stream; /* TMN: Here we should really have the following assert */ /* assert(new_stream <= MAX_UCHAR); */ remap[stream] = (UCHAR) new_stream; @@ -2763,12 +2763,12 @@ static void expand_view_nodes( /* Relation is primitive -- make dbkey node */ if (csb->csb_rpt[stream].csb_relation) { - NOD node; + JRD_NOD node; node = PAR_make_node(tdbb, 1); node->nod_count = 0; node->nod_type = type; - node->nod_arg[0] = (NOD) (SLONG) stream; + node->nod_arg[0] = (JRD_NOD) (SLONG) stream; LLS_PUSH(node, stack); } } @@ -2787,7 +2787,7 @@ static void ignore_dbkey(TDBB tdbb, CSB csb, RSE rse, REL view) * rse, mark it as not having a dbkey. * **************************************/ - NOD *ptr, *end, node; + JRD_NOD *ptr, *end, node; SET_TDBB(tdbb); @@ -2816,7 +2816,7 @@ static void ignore_dbkey(TDBB tdbb, CSB csb, RSE rse, REL view) else if (node->nod_type == nod_aggregate) ignore_dbkey(tdbb, csb, (RSE) node->nod_arg[e_agg_rse], view); else if (node->nod_type == nod_union) { - NOD clauses, *ptr_uni, *end_uni; + JRD_NOD clauses, *ptr_uni, *end_uni; clauses = node->nod_arg[e_uni_clauses]; for (ptr_uni = clauses->nod_arg, end_uni = @@ -2827,7 +2827,7 @@ static void ignore_dbkey(TDBB tdbb, CSB csb, RSE rse, REL view) } -static NOD make_defaults(TDBB tdbb, CSB * csb, USHORT stream, NOD statement) +static JRD_NOD make_defaults(TDBB tdbb, CSB * csb, USHORT stream, JRD_NOD statement) { /************************************** * @@ -2839,7 +2839,7 @@ static NOD make_defaults(TDBB tdbb, CSB * csb, USHORT stream, NOD statement) * Build an default value assignments. * **************************************/ - NOD node, value; + JRD_NOD node, value; LLS stack; VEC vector; vec::iterator ptr1, end; @@ -2891,7 +2891,7 @@ static NOD make_defaults(TDBB tdbb, CSB * csb, USHORT stream, NOD statement) } -static NOD make_validation(TDBB tdbb, CSB * csb, USHORT stream) +static JRD_NOD make_validation(TDBB tdbb, CSB * csb, USHORT stream) { /************************************** * @@ -2903,7 +2903,7 @@ static NOD make_validation(TDBB tdbb, CSB * csb, USHORT stream) * Build a validation list for a relation, if appropriate. * **************************************/ - NOD node, validation; + JRD_NOD node, validation; LLS stack; VEC vector; vec::iterator ptr1, end; @@ -2962,10 +2962,10 @@ static NOD make_validation(TDBB tdbb, CSB * csb, USHORT stream) } -static NOD pass1( +static JRD_NOD pass1( TDBB tdbb, CSB * csb, - NOD node, + JRD_NOD node, REL view, USHORT view_stream, BOOLEAN validate_expr) { /************************************** @@ -2988,7 +2988,7 @@ static NOD pass1( * function.) * **************************************/ - NOD sub, *ptr, *end; + JRD_NOD sub, *ptr, *end; USHORT stream; csb_repeat *tail; PRC procedure; @@ -3214,7 +3214,7 @@ static NOD pass1( case nod_rse: case nod_stream: - return (NOD) pass1_rse(tdbb, csb, (RSE) node, view, view_stream); + return (JRD_NOD) pass1_rse(tdbb, csb, (RSE) node, view, view_stream); case nod_max: case nod_min: @@ -3272,7 +3272,7 @@ static NOD pass1( node->nod_count = 0; node->nod_type = type; node->nod_flags |= nod_agg_dbkey; - node->nod_arg[0] = (NOD) (SLONG) stream; + node->nod_arg[0] = (JRD_NOD) (SLONG) stream; return node; } @@ -3319,7 +3319,7 @@ static NOD pass1( } -static void pass1_erase(TDBB tdbb, CSB * csb, NOD node) +static void pass1_erase(TDBB tdbb, CSB * csb, JRD_NOD node) { /************************************** * @@ -3333,7 +3333,7 @@ static void pass1_erase(TDBB tdbb, CSB * csb, NOD node) * **************************************/ REL relation, parent, view; - NOD source, view_node; + JRD_NOD source, view_node; UCHAR *map; USHORT stream, new_stream, parent_stream = 0; TRIG_VEC trigger; @@ -3374,7 +3374,7 @@ static void pass1_erase(TDBB tdbb, CSB * csb, NOD node) if (relation->rel_view_rse && trigger) { new_stream = (*csb)->csb_n_stream++; - node->nod_arg[e_erase_stream] = (NOD) (SLONG) new_stream; + node->nod_arg[e_erase_stream] = (JRD_NOD) (SLONG) new_stream; CMP_csb_element(csb, new_stream)->csb_relation = relation; } @@ -3423,12 +3423,12 @@ static void pass1_erase(TDBB tdbb, CSB * csb, NOD node) parent = relation; parent_stream = stream; new_stream = (USHORT) source->nod_arg[e_rel_stream]; - node->nod_arg[e_erase_stream] = (NOD) (SLONG) map[new_stream]; + node->nod_arg[e_erase_stream] = (JRD_NOD) (SLONG) map[new_stream]; } } -static NOD pass1_expand_view( +static JRD_NOD pass1_expand_view( TDBB tdbb, CSB csb, USHORT org_stream, @@ -3444,7 +3444,7 @@ static NOD pass1_expand_view( * Process a view update performed by a trigger. * **************************************/ - NOD assign, node; + JRD_NOD assign, node; REL relation; VEC fields; vec::iterator ptr, end; @@ -3469,7 +3469,7 @@ static NOD pass1_expand_view( field = MET_get_field(relation, id); if (field->fld_source) new_id = - (USHORT) (NOD) (field->fld_source)->nod_arg[e_fld_id]; + (USHORT) (JRD_NOD) (field->fld_source)->nod_arg[e_fld_id]; else new_id = id; } @@ -3493,7 +3493,7 @@ static NOD pass1_expand_view( } -static void pass1_modify(TDBB tdbb, CSB * csb, NOD node) +static void pass1_modify(TDBB tdbb, CSB * csb, JRD_NOD node) { /************************************** * @@ -3506,7 +3506,7 @@ static void pass1_modify(TDBB tdbb, CSB * csb, NOD node) * get a little tricky if the relation is a view. * **************************************/ - NOD source, view_node; + JRD_NOD source, view_node; REL relation, parent, view; UCHAR *map; USHORT view_stream, stream, new_stream, parent_stream = 0; @@ -3585,7 +3585,7 @@ static void pass1_modify(TDBB tdbb, CSB * csb, NOD node) /* assert(source->nod_arg [e_rel_stream] <= MAX_UCHAR); */ map[new_stream] = (UCHAR) source->nod_arg[e_rel_stream]; view_node = copy(tdbb, csb, node, map, 0, TRUE); - view_node->nod_arg[e_mod_org_stream] = (NOD) (SLONG) stream; + view_node->nod_arg[e_mod_org_stream] = (JRD_NOD) (SLONG) stream; view_node->nod_arg[e_mod_new_stream] = source->nod_arg[e_rel_stream]; view_node->nod_arg[e_mod_map_view] = NULL; @@ -3604,7 +3604,7 @@ static void pass1_modify(TDBB tdbb, CSB * csb, NOD node) map = (*csb)->csb_rpt[stream].csb_map; stream = (USHORT) source->nod_arg[e_rel_stream]; - node->nod_arg[e_mod_org_stream] = (NOD) (SLONG) map[stream]; + node->nod_arg[e_mod_org_stream] = (JRD_NOD) (SLONG) map[stream]; /* Next, do update stream */ @@ -3635,9 +3635,9 @@ static RSE pass1_rse( **************************************/ USHORT count; LLS stack, temp; - NOD *arg, *end, boolean, sort, project, first, skip, plan; + JRD_NOD *arg, *end, boolean, sort, project, first, skip, plan; #ifdef SCROLLABLE_CURSORS - NOD async_message; + JRD_NOD async_message; #endif SET_TDBB(tdbb); @@ -3691,7 +3691,7 @@ static RSE pass1_rse( arg = rse->rse_relation + count; while (stack) - *--arg = (NOD) LLS_POP(&stack); + *--arg = (JRD_NOD) LLS_POP(&stack); /* Finish of by processing other clauses */ @@ -3702,7 +3702,7 @@ static RSE pass1_rse( if (boolean) { if (rse->rse_boolean) { - NOD additional; + JRD_NOD additional; additional = PAR_make_node(tdbb, 2); additional->nod_type = nod_and; @@ -3748,8 +3748,8 @@ static void pass1_source( TDBB tdbb, CSB * csb, RSE rse, - NOD source, - NOD * boolean, + JRD_NOD source, + JRD_NOD * boolean, LLS * stack, REL parent_view, USHORT view_stream) { /************************************** @@ -3765,7 +3765,7 @@ static void pass1_source( **************************************/ DBB dbb; RSE view_rse; - NOD *arg, *end, node; + JRD_NOD *arg, *end, node; REL view; UCHAR *map; USHORT stream; @@ -3810,7 +3810,7 @@ static void pass1_source( pass1(tdbb, csb, sub_rse->rse_boolean, parent_view, view_stream, FALSE); if (*boolean) { - NOD additional; + JRD_NOD additional; additional = PAR_make_node(tdbb, 2); additional->nod_type = nod_and; @@ -3870,7 +3870,7 @@ static void pass1_source( view = (REL) source->nod_arg[e_rel_relation]; CMP_post_resource(tdbb, &(*csb)->csb_resources, (BLK) view, rsc_relation, view->rel_id); - source->nod_arg[e_rel_view] = (NOD) parent_view; + source->nod_arg[e_rel_view] = (JRD_NOD) parent_view; stream = (USHORT) source->nod_arg[e_rel_stream]; element = CMP_csb_element(csb, stream); @@ -3913,7 +3913,7 @@ static void pass1_source( if ((view_rse->rse_projection && rse->rse_projection) || rse->rse_jointype) { - node = copy(tdbb, csb, (NOD) view_rse, map, 0, FALSE); + node = copy(tdbb, csb, (JRD_NOD) view_rse, map, 0, FALSE); DEBUG; LLS_PUSH(pass1(tdbb, csb, node, view, stream, FALSE), stack); DEBUG; @@ -3966,7 +3966,7 @@ static void pass1_source( copy(tdbb, csb, view_rse->rse_boolean, map, 0, FALSE), view, stream, FALSE); if (*boolean) { - NOD additional; + JRD_NOD additional; /* The order of the nodes here is important! The boolean from the view must appear first so that @@ -3986,7 +3986,7 @@ static void pass1_source( } -static NOD pass1_store(TDBB tdbb, CSB * csb, NOD node) +static JRD_NOD pass1_store(TDBB tdbb, CSB * csb, JRD_NOD node) { /************************************** * @@ -3999,7 +3999,7 @@ static NOD pass1_store(TDBB tdbb, CSB * csb, NOD node) * the relation is a view. * **************************************/ - NOD source, original, view_node, very_orig; + JRD_NOD source, original, view_node, very_orig; REL relation, parent, view; UCHAR *map; USHORT stream, new_stream, trigger_seen, parent_stream = 0; @@ -4096,7 +4096,7 @@ static NOD pass1_store(TDBB tdbb, CSB * csb, NOD node) } -static NOD pass1_update( +static JRD_NOD pass1_update( TDBB tdbb, CSB * csb, REL relation, @@ -4118,7 +4118,7 @@ USHORT update_stream, USHORT priv, REL view, USHORT view_stream) * **************************************/ RSE rse; - NOD node; + JRD_NOD node; SET_TDBB(tdbb); @@ -4166,7 +4166,7 @@ USHORT update_stream, USHORT priv, REL view, USHORT view_stream) else { ERR_post(gds_read_only_view, gds_arg_string, relation->rel_name, 0); - return ((NOD) NULL); /* Added to remove compiler warnings */ + return ((JRD_NOD) NULL); /* Added to remove compiler warnings */ } } else { @@ -4178,7 +4178,7 @@ USHORT update_stream, USHORT priv, REL view, USHORT view_stream) } -static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) +static JRD_NOD pass2(TDBB tdbb, register CSB csb, register JRD_NOD node, JRD_NOD parent) { /************************************** * @@ -4190,7 +4190,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) * Allocate and assign impure space for various nodes. * **************************************/ - NOD rse_node, *ptr, *end; + JRD_NOD rse_node, *ptr, *end; ULONG id; USHORT stream; RSB *rsb_ptr; @@ -4232,7 +4232,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) case nod_seek_no_warn: /* store the rse in whose scope we are defined */ - node->nod_arg[e_seek_rse] = (NOD) csb->csb_current_rse; + node->nod_arg[e_seek_rse] = (JRD_NOD) csb->csb_current_rse; break; #endif @@ -4272,7 +4272,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) case nod_function: { - NOD value; + JRD_NOD value; FUN function; value = node->nod_arg[e_fun_args]; @@ -4285,7 +4285,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) if (!(tdbb->tdbb_attachment->att_flags & ATT_gbak_attachment) && !(tdbb->tdbb_flags & TDBB_prc_being_dropped)) { node->nod_arg[e_fun_function] = - (NOD) FUN_resolve(csb, function, value); + (JRD_NOD) FUN_resolve(csb, function, value); if (!node->nod_arg[e_fun_function]) ERR_post(gds_funmismat, gds_arg_string, function->fun_symbol->sym_string, 0); @@ -4301,7 +4301,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) case nod_stream: { - NOD relation; + JRD_NOD relation; RSE rse; rse = (RSE) node; @@ -4320,7 +4320,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) stream = base_stream(csb, &node->nod_arg[e_find_stream], TRUE); if (! (node->nod_arg[e_find_rsb] = - (NOD) csb-> + (JRD_NOD) csb-> csb_rpt[stream].csb_rsb_ptr)) ERR_post(gds__stream_not_defined, 0); break; @@ -4330,7 +4330,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) stream = base_stream(csb, &node->nod_arg[e_find_dbkey_stream], TRUE); if (! (node->nod_arg[e_find_dbkey_rsb] = - (NOD) csb-> + (JRD_NOD) csb-> csb_rpt[stream].csb_rsb_ptr)) ERR_post(gds__stream_not_defined, 0); break; @@ -4339,7 +4339,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) stream = base_stream(csb, &node->nod_arg[e_index_stream], TRUE); if (! (node->nod_arg[e_index_rsb] = - (NOD) csb-> + (JRD_NOD) csb-> csb_rpt[stream].csb_rsb_ptr)) ERR_post(gds__stream_not_defined, 0); break; @@ -4348,7 +4348,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) stream = base_stream(csb, &node->nod_arg[e_getmark_stream], TRUE); if (! (node->nod_arg[e_getmark_rsb] = - (NOD) csb-> + (JRD_NOD) csb-> csb_rpt[stream].csb_rsb_ptr)) ERR_post(gds__stream_not_defined, 0); break; @@ -4357,7 +4357,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) stream = base_stream(csb, &node->nod_arg[e_setmark_stream], TRUE); if (! (node->nod_arg[e_setmark_rsb] = - (NOD) csb-> + (JRD_NOD) csb-> csb_rpt[stream].csb_rsb_ptr)) ERR_post(gds__stream_not_defined, 0); break; @@ -4366,7 +4366,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) stream = base_stream(csb, &node->nod_arg[e_lockrec_stream], TRUE); if (! (node->nod_arg[e_lockrec_rsb] = - (NOD) csb-> + (JRD_NOD) csb-> csb_rpt[stream].csb_rsb_ptr)) ERR_post(gds__stream_not_defined, 0); break; @@ -4374,7 +4374,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) case nod_crack: case nod_force_crack: stream = base_stream(csb, &node->nod_arg[0], TRUE); - if (!(node->nod_arg[1] = (NOD) csb->csb_rpt[stream].csb_rsb_ptr)) + if (!(node->nod_arg[1] = (JRD_NOD) csb->csb_rpt[stream].csb_rsb_ptr)) ERR_post(gds__stream_not_defined, 0); break; @@ -4382,7 +4382,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) stream = base_stream(csb, &node->nod_arg[e_reset_from_stream], TRUE); if (! (node->nod_arg[e_reset_from_rsb] = - (NOD) csb-> + (JRD_NOD) csb-> csb_rpt[stream].csb_rsb_ptr)) ERR_post(gds__stream_not_defined, 0); break; @@ -4391,7 +4391,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) stream = base_stream(csb, &node->nod_arg[e_card_stream], TRUE); if (! (node->nod_arg[e_card_rsb] = - (NOD) csb-> + (JRD_NOD) csb-> csb_rpt[stream].csb_rsb_ptr)) ERR_post(gds__stream_not_defined, 0); break; @@ -4402,12 +4402,12 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) case nod_erase: stream = base_stream(csb, &node->nod_arg[e_erase_stream], FALSE); - node->nod_arg[e_erase_rsb] = (NOD) csb->csb_rpt[stream].csb_rsb_ptr; + node->nod_arg[e_erase_rsb] = (JRD_NOD) csb->csb_rpt[stream].csb_rsb_ptr; break; case nod_modify: stream = base_stream(csb, &node->nod_arg[e_mod_org_stream], FALSE); - node->nod_arg[e_mod_rsb] = (NOD) csb->csb_rpt[stream].csb_rsb_ptr; + node->nod_arg[e_mod_rsb] = (JRD_NOD) csb->csb_rpt[stream].csb_rsb_ptr; break; #endif @@ -4432,7 +4432,7 @@ static NOD pass2(TDBB tdbb, register CSB csb, register NOD node, NOD parent) switch (node->nod_type) { case nod_assignment: { - NOD value; + JRD_NOD value; if ( (value = node->nod_arg[e_asgn_missing2]) ) pass2(tdbb, csb, value, node); @@ -4713,7 +4713,7 @@ static void pass2_rse(TDBB tdbb, CSB csb, RSE rse) * The actual optimization is done in "post_rse". * **************************************/ - NOD *ptr, *end; + JRD_NOD *ptr, *end; SET_TDBB(tdbb); DEV_BLKCHK(csb, type_csb); @@ -4726,7 +4726,7 @@ static void pass2_rse(TDBB tdbb, CSB csb, RSE rse) for (ptr = rse->rse_relation, end = ptr + rse->rse_count; ptr < end; ptr++) { - NOD node; + JRD_NOD node; node = *ptr; if (node->nod_type == nod_relation) { @@ -4734,12 +4734,12 @@ static void pass2_rse(TDBB tdbb, CSB csb, RSE rse) stream = (USHORT) node->nod_arg[e_rel_stream]; csb->csb_rpt[stream].csb_flags |= csb_active; - pass2(tdbb, csb, node, (NOD) rse); + pass2(tdbb, csb, node, (JRD_NOD) rse); } else if (node->nod_type == nod_rse) pass2_rse(tdbb, csb, (RSE) node); else - pass2(tdbb, csb, node, (NOD) rse); + pass2(tdbb, csb, node, (JRD_NOD) rse); } if (rse->rse_boolean) @@ -4765,7 +4765,7 @@ static void pass2_rse(TDBB tdbb, CSB csb, RSE rse) } -static NOD pass2_union(TDBB tdbb, CSB csb, NOD node) +static JRD_NOD pass2_union(TDBB tdbb, CSB csb, JRD_NOD node) { /************************************** * @@ -4777,7 +4777,7 @@ static NOD pass2_union(TDBB tdbb, CSB csb, NOD node) * Process a union clause of an rse. * **************************************/ - NOD clauses, *ptr, *end, map; + JRD_NOD clauses, *ptr, *end, map; FMT *format; USHORT id; @@ -4820,7 +4820,7 @@ static void plan_check(CSB csb, RSE rse) * in the plan. * **************************************/ - NOD *ptr, *end; + JRD_NOD *ptr, *end; USHORT stream; DEV_BLKCHK(csb, type_csb); @@ -4838,7 +4838,7 @@ static void plan_check(CSB csb, RSE rse) } -static void plan_set(CSB csb, RSE rse, NOD plan) +static void plan_set(CSB csb, RSE rse, JRD_NOD plan) { /************************************** * @@ -4855,7 +4855,7 @@ static void plan_set(CSB csb, RSE rse, NOD plan) * the plan. * **************************************/ - NOD plan_relation_node, *ptr, *end; + JRD_NOD plan_relation_node, *ptr, *end; USHORT stream; UCHAR *map, *map_base, *duplicate_map; REL relation, plan_relation, view_relation, duplicate_relation; @@ -5009,7 +5009,7 @@ static void plan_set(CSB csb, RSE rse, NOD plan) ERR_post(gds_stream_not_found, gds_arg_string, plan_relation->rel_name, 0); - plan_relation_node->nod_arg[e_rel_stream] = (NOD) (SLONG) * map; + plan_relation_node->nod_arg[e_rel_stream] = (JRD_NOD) (SLONG) * map; } /* make some validity checks */ @@ -5107,7 +5107,7 @@ static RSB post_rse(TDBB tdbb, CSB csb, RSE rse) * **************************************/ RSB rsb; - NOD node, *ptr, *end; + JRD_NOD node, *ptr, *end; USHORT stream; SET_TDBB(tdbb); @@ -5284,7 +5284,7 @@ static void post_trigger_access(TDBB tdbb, CSB csb, REL owner_relation, TRIG_VEC } -static void process_map(TDBB tdbb, CSB csb, NOD map, FMT * input_format) +static void process_map(TDBB tdbb, CSB csb, JRD_NOD map, FMT * input_format) { /************************************** * @@ -5297,7 +5297,7 @@ static void process_map(TDBB tdbb, CSB csb, NOD map, FMT * input_format) * is missing or incomplete, extend it. * **************************************/ - NOD *ptr, *end, assignment, field; + JRD_NOD *ptr, *end, assignment, field; FMT format; DSC *desc, desc2; USHORT id, min, max, align; @@ -5442,7 +5442,7 @@ static BOOLEAN stream_in_rse(USHORT stream, RSE rse) * the specified RSE. * **************************************/ - NOD sub, *ptr, *end; + JRD_NOD sub, *ptr, *end; DEV_BLKCHK(rse, type_nod); diff --git a/src/jrd/evl.cpp b/src/jrd/evl.cpp index c5ad01f051..a46d93a84c 100644 --- a/src/jrd/evl.cpp +++ b/src/jrd/evl.cpp @@ -19,7 +19,7 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. - * $Id: evl.cpp,v 1.19 2002-10-29 16:27:45 tamlin Exp $ + * $Id: evl.cpp,v 1.20 2002-11-11 19:42:44 hippoman Exp $ */ /* @@ -136,43 +136,43 @@ extern double MTH$CVT_D_G(), MTH$CVT_G_D(); * The order should be made to agree as part of the next code cleanup. */ -static DSC *add(DSC *, NOD, VLU); -static DSC *add2(DSC *, NOD, VLU); -static DSC *add_datetime(DSC *, NOD, VLU); -static DSC *add_sql_date(DSC *, NOD, VLU); -static DSC *add_sql_time(DSC *, NOD, VLU); -static DSC *add_timestamp(DSC *, NOD, VLU); -static DSC *binary_value(TDBB, NOD, VLU); -static DSC *cast(TDBB, DSC *, NOD, VLU); -static SSHORT compute_agg_distinct(TDBB, NOD); -static DSC *concatenate(TDBB, NOD, VLU); -static DSC *dbkey(TDBB, NOD, VLU); -static DSC *eval_statistical(TDBB, NOD, VLU); +static DSC *add(DSC *, JRD_NOD, VLU); +static DSC *add2(DSC *, JRD_NOD, VLU); +static DSC *add_datetime(DSC *, JRD_NOD, VLU); +static DSC *add_sql_date(DSC *, JRD_NOD, VLU); +static DSC *add_sql_time(DSC *, JRD_NOD, VLU); +static DSC *add_timestamp(DSC *, JRD_NOD, VLU); +static DSC *binary_value(TDBB, JRD_NOD, VLU); +static DSC *cast(TDBB, DSC *, JRD_NOD, VLU); +static SSHORT compute_agg_distinct(TDBB, JRD_NOD); +static DSC *concatenate(TDBB, JRD_NOD, VLU); +static DSC *dbkey(TDBB, JRD_NOD, VLU); +static DSC *eval_statistical(TDBB, JRD_NOD, VLU); static SINT64 get_day_fraction(DSC * d); -static DSC *get_mask(TDBB, NOD, VLU); +static DSC *get_mask(TDBB, JRD_NOD, VLU); static SINT64 get_timestamp_to_isc_ticks(DSC * d); -static SSHORT init_agg_distinct(TDBB, NOD); +static SSHORT init_agg_distinct(TDBB, JRD_NOD); #ifdef PC_ENGINE -static DSC *lock_record(TDBB, NOD, VLU); -static DSC *lock_relation(TDBB, NOD, VLU); +static DSC *lock_record(TDBB, JRD_NOD, VLU); +static DSC *lock_relation(TDBB, JRD_NOD, VLU); #endif -static DSC *lock_state(TDBB, NOD, VLU); -static DSC *multiply(DSC *, VLU, NOD); -static DSC *multiply2(DSC *, VLU, NOD); -static DSC *divide2(DSC *, VLU, NOD); +static DSC *lock_state(TDBB, JRD_NOD, VLU); +static DSC *multiply(DSC *, VLU, JRD_NOD); +static DSC *multiply2(DSC *, VLU, JRD_NOD); +static DSC *divide2(DSC *, VLU, JRD_NOD); static DSC *negate_dsc(TDBB, DSC *, VLU); -static DSC *record_version(TDBB, NOD, VLU); +static DSC *record_version(TDBB, JRD_NOD, VLU); static BOOLEAN reject_duplicate(UCHAR *, UCHAR *, int); -static DSC *scalar(TDBB, NOD, VLU); -static SSHORT sleuth(TDBB, NOD, DSC *, DSC *); +static DSC *scalar(TDBB, JRD_NOD, VLU); +static SSHORT sleuth(TDBB, JRD_NOD, DSC *, DSC *); static BOOLEAN nc_sleuth_check(class TextType*, USHORT, UCHAR *, UCHAR *, UCHAR *, UCHAR *); static BOOLEAN nc_sleuth_class(class TextType*, USHORT, UCHAR *, UCHAR *, UCHAR); static BOOLEAN wc_sleuth_check(class TextType*, USHORT, WCHAR *, WCHAR *, WCHAR *, WCHAR *); static BOOLEAN wc_sleuth_class(class TextType*, USHORT, WCHAR *, WCHAR *, WCHAR); -static SSHORT string_boolean(TDBB, NOD, DSC *, DSC *); -static SSHORT string_function(TDBB, NOD, SSHORT, UCHAR *, +static SSHORT string_boolean(TDBB, JRD_NOD, DSC *, DSC *); +static SSHORT string_function(TDBB, JRD_NOD, SSHORT, UCHAR *, SSHORT, UCHAR *, USHORT); static DSC *substring(TDBB, VLU, DSC *, USHORT, USHORT); static DSC *upcase(TDBB, DSC *, VLU); @@ -207,7 +207,7 @@ static CONST UCHAR special[256] = { -DSC *DLL_EXPORT EVL_assign_to(TDBB tdbb, register NOD node) +DSC *DLL_EXPORT EVL_assign_to(TDBB tdbb, register JRD_NOD node) { /************************************** * @@ -224,7 +224,7 @@ DSC *DLL_EXPORT EVL_assign_to(TDBB tdbb, register NOD node) VLU impure; DSC *desc; FMT format; - NOD message; + JRD_NOD message; REC record; SET_TDBB(tdbb); @@ -285,7 +285,7 @@ DSC *DLL_EXPORT EVL_assign_to(TDBB tdbb, register NOD node) } -SBM *DLL_EXPORT EVL_bitmap(TDBB tdbb, register NOD node) +SBM *DLL_EXPORT EVL_bitmap(TDBB tdbb, register JRD_NOD node) { /************************************** * @@ -350,7 +350,7 @@ SBM *DLL_EXPORT EVL_bitmap(TDBB tdbb, register NOD node) } -BOOLEAN DLL_EXPORT EVL_boolean(TDBB tdbb, register NOD node) +BOOLEAN DLL_EXPORT EVL_boolean(TDBB tdbb, register JRD_NOD node) { /************************************** * @@ -363,7 +363,7 @@ BOOLEAN DLL_EXPORT EVL_boolean(TDBB tdbb, register NOD node) * **************************************/ REQ request; - NOD *ptr; + JRD_NOD *ptr; DSC *desc[2]; USHORT value; SSHORT comparison; @@ -393,7 +393,7 @@ BOOLEAN DLL_EXPORT EVL_boolean(TDBB tdbb, register NOD node) case nod_between: case nod_sleuth: { - NOD rec_version; + JRD_NOD rec_version; ULONG flags; SSHORT force_equal; @@ -529,7 +529,7 @@ BOOLEAN DLL_EXPORT EVL_boolean(TDBB tdbb, register NOD node) rse = (RSE) (node->nod_arg[e_any_rse]); rsb = (RSB) (node->nod_arg[e_any_rsb]); if (node->nod_type != nod_any) { - rsb->rsb_any_boolean = (NOD) rse->rse_boolean; + rsb->rsb_any_boolean = (JRD_NOD) rse->rse_boolean; if (node->nod_type == nod_ansi_any) request->req_flags |= req_ansi_any; else @@ -712,7 +712,7 @@ BOOLEAN DLL_EXPORT EVL_boolean(TDBB tdbb, register NOD node) } -DSC* DLL_EXPORT EVL_expr(TDBB tdbb, register NOD node) +DSC* DLL_EXPORT EVL_expr(TDBB tdbb, register JRD_NOD node) { /************************************** * @@ -756,7 +756,7 @@ DSC* DLL_EXPORT EVL_expr(TDBB tdbb, register NOD node) case nod_argument: { FMT format; - NOD message; + JRD_NOD message; DSC *desc; if (node->nod_arg[e_arg_flag]) { @@ -1091,7 +1091,7 @@ DSC* DLL_EXPORT EVL_expr(TDBB tdbb, register NOD node) DSC *values[3]; if (node->nod_count) { - NOD *ptr, *end; + JRD_NOD *ptr, *end; DSC **v; for (ptr = node->nod_arg, end = ptr + node->nod_count, v = values; @@ -1316,7 +1316,7 @@ BOOLEAN DLL_EXPORT EVL_field(register REL relation, } -USHORT DLL_EXPORT EVL_group(TDBB tdbb, BLK rsb, NOD node, USHORT state) +USHORT DLL_EXPORT EVL_group(TDBB tdbb, BLK rsb, JRD_NOD node, USHORT state) { /************************************** * @@ -1336,7 +1336,7 @@ USHORT DLL_EXPORT EVL_group(TDBB tdbb, BLK rsb, NOD node, USHORT state) * **************************************/ REQ request; - NOD group, map, *ptr, *end, from, field; + JRD_NOD group, map, *ptr, *end, from, field; DSC temp, *desc; VLUX impure; struct vlu vtemp; @@ -2263,7 +2263,7 @@ USHORT DLL_EXPORT EVL_wc_contains(TDBB tdbb_dumm, -static DSC *add(DSC * desc, NOD node, VLU value) +static DSC *add(DSC * desc, JRD_NOD node, VLU value) { /************************************** * @@ -2349,7 +2349,7 @@ static DSC *add(DSC * desc, NOD node, VLU value) } -static DSC *add2(DSC * desc, NOD node, VLU value) +static DSC *add2(DSC * desc, JRD_NOD node, VLU value) { /************************************** * @@ -2459,7 +2459,7 @@ static DSC *add2(DSC * desc, NOD node, VLU value) } -static DSC *add_datetime(DSC * desc, NOD node, VLU value) +static DSC *add_datetime(DSC * desc, JRD_NOD node, VLU value) { /************************************** * @@ -2521,7 +2521,7 @@ static DSC *add_datetime(DSC * desc, NOD node, VLU value) } -static DSC *add_sql_date(DSC * desc, NOD node, VLU value) +static DSC *add_sql_date(DSC * desc, JRD_NOD node, VLU value) { /************************************** * @@ -2623,7 +2623,7 @@ static DSC *add_sql_date(DSC * desc, NOD node, VLU value) } -static DSC *add_sql_time(DSC * desc, NOD node, VLU value) +static DSC *add_sql_time(DSC * desc, JRD_NOD node, VLU value) { /************************************** * @@ -2720,7 +2720,7 @@ static DSC *add_sql_time(DSC * desc, NOD node, VLU value) } -static DSC *add_timestamp(DSC * desc, NOD node, VLU value) +static DSC *add_timestamp(DSC * desc, JRD_NOD node, VLU value) { /************************************** * @@ -2952,7 +2952,7 @@ static DSC *add_timestamp(DSC * desc, NOD node, VLU value) } -static DSC *binary_value(TDBB tdbb, NOD node, VLU impure) +static DSC *binary_value(TDBB tdbb, JRD_NOD node, VLU impure) { /************************************** * @@ -3032,7 +3032,7 @@ static DSC *binary_value(TDBB tdbb, NOD node, VLU impure) } -static DSC *cast(TDBB tdbb, DSC * value, NOD node, VLU impure) +static DSC *cast(TDBB tdbb, DSC * value, JRD_NOD node, VLU impure) { /************************************** * @@ -3092,7 +3092,7 @@ static DSC *cast(TDBB tdbb, DSC * value, NOD node, VLU impure) } -static SSHORT compute_agg_distinct(TDBB tdbb, NOD node) +static SSHORT compute_agg_distinct(TDBB tdbb, JRD_NOD node) { /************************************** * @@ -3179,7 +3179,7 @@ static SSHORT compute_agg_distinct(TDBB tdbb, NOD node) } -static DSC *concatenate(TDBB tdbb, NOD node, VLU impure) +static DSC *concatenate(TDBB tdbb, JRD_NOD node, VLU impure) { /************************************** * @@ -3275,7 +3275,7 @@ static DSC *concatenate(TDBB tdbb, NOD node, VLU impure) } -static DSC *dbkey(TDBB tdbb, NOD node, VLU impure) +static DSC *dbkey(TDBB tdbb, JRD_NOD node, VLU impure) { /************************************** * @@ -3325,7 +3325,7 @@ static DSC *dbkey(TDBB tdbb, NOD node, VLU impure) } -static DSC *eval_statistical(TDBB tdbb, NOD node, VLU impure) +static DSC *eval_statistical(TDBB tdbb, JRD_NOD node, VLU impure) { /************************************** * @@ -3597,7 +3597,7 @@ static SINT64 get_day_fraction(DSC * d) -static DSC *get_mask(TDBB tdbb, NOD node, VLU impure) +static DSC *get_mask(TDBB tdbb, JRD_NOD node, VLU impure) { /************************************** * @@ -3679,7 +3679,7 @@ static SINT64 get_timestamp_to_isc_ticks(DSC * d) } -static SSHORT init_agg_distinct(TDBB tdbb, NOD node) +static SSHORT init_agg_distinct(TDBB tdbb, JRD_NOD node) { /************************************** * @@ -3722,7 +3722,7 @@ static SSHORT init_agg_distinct(TDBB tdbb, NOD node) #ifdef PC_ENGINE -static DSC *lock_record(TDBB tdbb, NOD node, VLU impure) +static DSC *lock_record(TDBB tdbb, JRD_NOD node, VLU impure) { /************************************** * @@ -3800,7 +3800,7 @@ static DSC *lock_record(TDBB tdbb, NOD node, VLU impure) #ifdef PC_ENGINE -static DSC *lock_relation(TDBB tdbb, NOD node, VLU impure) +static DSC *lock_relation(TDBB tdbb, JRD_NOD node, VLU impure) { /************************************** * @@ -3815,7 +3815,7 @@ static DSC *lock_relation(TDBB tdbb, NOD node, VLU impure) **************************************/ DSC *desc; USHORT lock_level; - NOD relation_node; + JRD_NOD relation_node; REL relation; LCK lock = NULL; @@ -3875,7 +3875,7 @@ static DSC *lock_relation(TDBB tdbb, NOD node, VLU impure) #endif -static DSC *lock_state(TDBB tdbb, NOD node, VLU impure) +static DSC *lock_state(TDBB tdbb, JRD_NOD node, VLU impure) { /************************************** * @@ -3946,7 +3946,7 @@ static DSC *lock_state(TDBB tdbb, NOD node, VLU impure) } -static DSC *multiply(DSC * desc, VLU value, NOD node) +static DSC *multiply(DSC * desc, VLU value, JRD_NOD node) { /************************************** * @@ -4046,7 +4046,7 @@ static DSC *multiply(DSC * desc, VLU value, NOD node) } -static DSC *multiply2(DSC * desc, VLU value, NOD node) +static DSC *multiply2(DSC * desc, VLU value, JRD_NOD node) { /************************************** * @@ -4144,7 +4144,7 @@ static DSC *multiply2(DSC * desc, VLU value, NOD node) } -static DSC *divide2(DSC * desc, VLU value, NOD node) +static DSC *divide2(DSC * desc, VLU value, JRD_NOD node) { /************************************** * @@ -4355,7 +4355,7 @@ static DSC *negate_dsc(TDBB tdbb, DSC * desc, VLU value) return &value->vlu_desc; } -static DSC *record_version(TDBB tdbb, NOD node, VLU impure) +static DSC *record_version(TDBB tdbb, JRD_NOD node, VLU impure) { /************************************** * @@ -4432,7 +4432,7 @@ static BOOLEAN reject_duplicate(UCHAR * data1, UCHAR * data2, int user_arg) } -static DSC *scalar(TDBB tdbb, NOD node, VLU impure) +static DSC *scalar(TDBB tdbb, JRD_NOD node, VLU impure) { /************************************** * @@ -4445,7 +4445,7 @@ static DSC *scalar(TDBB tdbb, NOD node, VLU impure) * **************************************/ SLONG subscripts[16], *p; - NOD list, *ptr, *end; + JRD_NOD list, *ptr, *end; DSC *desc; REQ request; @@ -4481,7 +4481,7 @@ static DSC *scalar(TDBB tdbb, NOD node, VLU impure) } -static SSHORT sleuth(TDBB tdbb, NOD node, DSC * desc1, DSC * desc2) +static SSHORT sleuth(TDBB tdbb, JRD_NOD node, DSC * desc1, DSC * desc2) { /************************************** * @@ -4606,7 +4606,7 @@ static SSHORT sleuth(TDBB tdbb, NOD node, DSC * desc1, DSC * desc2) } -static SSHORT string_boolean(TDBB tdbb, NOD node, DSC * desc1, DSC * desc2) +static SSHORT string_boolean(TDBB tdbb, JRD_NOD node, DSC * desc1, DSC * desc2) { /************************************** * @@ -4728,7 +4728,7 @@ static SSHORT string_boolean(TDBB tdbb, NOD node, DSC * desc1, DSC * desc2) static SSHORT string_function( TDBB tdbb, - NOD node, + JRD_NOD node, SSHORT l1, UCHAR * p1, SSHORT l2, UCHAR * p2, USHORT ttype) { diff --git a/src/jrd/exe.cpp b/src/jrd/exe.cpp index 25c0acbd59..5da069e61a 100644 --- a/src/jrd/exe.cpp +++ b/src/jrd/exe.cpp @@ -42,7 +42,7 @@ * */ /* -$Id: exe.cpp,v 1.26 2002-11-03 17:29:51 skidder Exp $ +$Id: exe.cpp,v 1.27 2002-11-11 19:42:45 hippoman Exp $ */ #include "firebird.h" @@ -124,39 +124,39 @@ IDX_E IDX_modify_check_constraints(TDBB tdbb, static void cleanup_rpb(TDBB, RPB *); -static NOD erase(TDBB, NOD, SSHORT); +static JRD_NOD erase(TDBB, JRD_NOD, SSHORT); static void execute_looper(TDBB, REQ, TRA, ENUM req::req_s); static void exec_sql(TDBB, REQ, DSC *); -static void execute_procedure(TDBB, NOD); +static void execute_procedure(TDBB, JRD_NOD); static REQ execute_triggers(TDBB, TRIG_VEC *, REC, REC); -static NOD looper(TDBB, REQ, NOD); -static NOD modify(TDBB, register NOD, SSHORT); -static void writelock(TDBB, register NOD); -static NOD receive_msg(TDBB, register NOD); +static JRD_NOD looper(TDBB, REQ, JRD_NOD); +static JRD_NOD modify(TDBB, register JRD_NOD, SSHORT); +static void writelock(TDBB, register JRD_NOD); +static JRD_NOD receive_msg(TDBB, register JRD_NOD); static void release_blobs(TDBB, REQ); static void release_proc_save_points(REQ); #ifdef SCROLLABLE_CURSORS -static NOD seek_rse(TDBB, REQ, NOD); +static JRD_NOD seek_rse(TDBB, REQ, JRD_NOD); static void seek_rsb(TDBB, REQ, RSB, USHORT, SLONG); #endif -static NOD selct(TDBB, register NOD); -static NOD send_msg(TDBB, register NOD); -static void set_error(TDBB, XCP, NOD); -static NOD stall(TDBB, register NOD); -static NOD store(TDBB, register NOD, SSHORT); +static JRD_NOD selct(TDBB, register JRD_NOD); +static JRD_NOD send_msg(TDBB, register JRD_NOD); +static void set_error(TDBB, XCP, JRD_NOD); +static JRD_NOD stall(TDBB, register JRD_NOD); +static JRD_NOD store(TDBB, register JRD_NOD, SSHORT); static BOOLEAN test_and_fixup_error(TDBB, const XCP, REQ); static void trigger_failure(TDBB, REQ); -static void validate(TDBB, NOD); +static void validate(TDBB, JRD_NOD); #ifdef PC_ENGINE static BOOLEAN check_crack(RSB, USHORT); -static NOD find(TDBB, register NOD); -static NOD find_dbkey(TDBB, register NOD); +static JRD_NOD find(TDBB, register JRD_NOD); +static JRD_NOD find_dbkey(TDBB, register JRD_NOD); static LCK implicit_record_lock(TRA, RPB *); -static NOD release_bookmark(TDBB, NOD); -static NOD set_bookmark(TDBB, NOD); -static NOD set_index(TDBB, register NOD); -static NOD stream(TDBB, register NOD); +static JRD_NOD release_bookmark(TDBB, JRD_NOD); +static JRD_NOD set_bookmark(TDBB, JRD_NOD); +static JRD_NOD set_index(TDBB, register JRD_NOD); +static JRD_NOD stream(TDBB, register JRD_NOD); #endif #ifdef DEBUG_GDS_ALLOC @@ -219,7 +219,7 @@ private: #endif -void EXE_assignment(TDBB tdbb, NOD node) +void EXE_assignment(TDBB tdbb, JRD_NOD node) { /************************************** * @@ -247,7 +247,7 @@ void EXE_assignment(TDBB tdbb, NOD node) missing = EVL_expr(tdbb, node->nod_arg[e_asgn_missing]); } - NOD to = node->nod_arg[e_asgn_to]; + JRD_NOD to = node->nod_arg[e_asgn_to]; DSC* to_desc = EVL_assign_to(tdbb, to); request->req_flags &= ~req_null; @@ -595,10 +595,10 @@ void EXE_receive(TDBB tdbb, * * Functional description * Move a message from JRD to the host program. This corresponds to - * a JRD BLR/NOD send. + * a JRD BLR/JRD_NOD send. * **************************************/ - NOD message; + JRD_NOD message; FMT format; TRA transaction; SAV save_sav_point; @@ -749,12 +749,12 @@ void EXE_send(TDBB tdbb, * This corresponds to a blr_receive or blr_select statement. * **************************************/ - NOD node, message, *ptr, *end; + JRD_NOD node, message, *ptr, *end; FMT format; TRA transaction; #ifdef SCROLLABLE_CURSORS USHORT save_operation; - NOD save_next = NULL, save_message; + JRD_NOD save_next = NULL, save_message; #endif SET_TDBB(tdbb); @@ -911,7 +911,7 @@ void EXE_start(TDBB tdbb, REQ request, TRA transaction) for (ptr = request->req_invariants->begin(), end = request->req_invariants->end(); ptr < end; ptr++) if (*ptr) { - impure = (VLU) ((SCHAR *) request + ((NOD)(*ptr))->nod_impure); + impure = (VLU) ((SCHAR *) request + ((JRD_NOD)(*ptr))->nod_impure); invariant_flags = (USHORT *) & impure->vlu_string; *invariant_flags = 0; } @@ -1051,7 +1051,7 @@ static void cleanup_rpb(TDBB tdbb, RPB *rpb) } -static NOD erase(TDBB tdbb, NOD node, SSHORT which_trig) +static JRD_NOD erase(TDBB tdbb, JRD_NOD node, SSHORT which_trig) { /************************************** * @@ -1391,7 +1391,7 @@ static void exec_sql(TDBB tdbb, REQ request, DSC* dsc) } -static void execute_procedure(TDBB tdbb, NOD node) +static void execute_procedure(TDBB tdbb, JRD_NOD node) { /************************************** * @@ -1406,7 +1406,7 @@ static void execute_procedure(TDBB tdbb, NOD node) * **************************************/ REQ request, proc_request; - NOD in_message, out_message, temp; + JRD_NOD in_message, out_message, temp; FMT format; USHORT in_msg_length, out_msg_length; SCHAR *in_msg, *out_msg; @@ -1422,7 +1422,7 @@ static void execute_procedure(TDBB tdbb, NOD node) request = tdbb->tdbb_request; if ( (temp = node->nod_arg[e_esp_inputs]) ) { - NOD *ptr, *end; + JRD_NOD *ptr, *end; for (ptr = temp->nod_arg, end = ptr + temp->nod_count; ptr < end; ptr++) @@ -1502,7 +1502,7 @@ static void execute_procedure(TDBB tdbb, NOD node) temp = node->nod_arg[e_esp_outputs]; if (temp) { - NOD *ptr, *end; + JRD_NOD *ptr, *end; for (ptr = temp->nod_arg, end = ptr + temp->nod_count; ptr < end; ptr++) @@ -1591,7 +1591,7 @@ static REQ execute_triggers(TDBB tdbb, #ifdef PC_ENGINE -static NOD find(TDBB tdbb, register NOD node) +static JRD_NOD find(TDBB tdbb, register JRD_NOD node) { /************************************** * @@ -1671,7 +1671,7 @@ static NOD find(TDBB tdbb, register NOD node) #ifdef PC_ENGINE -static NOD find_dbkey(TDBB tdbb, register NOD node) +static JRD_NOD find_dbkey(TDBB tdbb, register JRD_NOD node) { /************************************** * @@ -1756,7 +1756,7 @@ static LCK implicit_record_lock(TRA transaction, RPB * rpb) #endif -static NOD looper(TDBB tdbb, REQ request, NOD in_node) +static JRD_NOD looper(TDBB tdbb, REQ request, JRD_NOD in_node) { /************************************** * @@ -1776,8 +1776,8 @@ static NOD looper(TDBB tdbb, REQ request, NOD in_node) SSHORT which_erase_trig = 0; SSHORT which_sto_trig = 0; SSHORT which_mod_trig = 0; - volatile NOD top_node = 0; - volatile NOD prev_node; + volatile JRD_NOD top_node = 0; + volatile JRD_NOD prev_node; TRA transaction; /* If an error happens during the backout of a savepoint, then the transaction @@ -1817,7 +1817,7 @@ static NOD looper(TDBB tdbb, REQ request, NOD in_node) SLONG save_point_number = (transaction->tra_save_point) ? transaction->tra_save_point->sav_number : 0; - volatile NOD node = in_node; + volatile JRD_NOD node = in_node; // Catch errors so we can unwind cleanly @@ -1845,7 +1845,7 @@ static NOD looper(TDBB tdbb, REQ request, NOD in_node) switch (node->nod_type) { case nod_asn_list: if (request->req_operation == req::req_evaluate) { - volatile NOD *ptr, *end; + volatile JRD_NOD *ptr, *end; for (ptr = node->nod_arg, end = ptr + node->nod_count; ptr < end; ptr++) @@ -2114,7 +2114,7 @@ static NOD looper(TDBB tdbb, REQ request, NOD in_node) case req::req_unwind: { - volatile NOD *ptr, *end; + volatile JRD_NOD *ptr, *end; if (request->req_flags & req_leave) { @@ -2142,7 +2142,7 @@ static NOD looper(TDBB tdbb, REQ request, NOD in_node) } } - volatile NOD handlers = node->nod_arg[e_blk_handlers]; + volatile JRD_NOD handlers = node->nod_arg[e_blk_handlers]; if (handlers) { ULONG prev_req_error_handler; @@ -2661,7 +2661,7 @@ static NOD looper(TDBB tdbb, REQ request, NOD in_node) } -static NOD modify(TDBB tdbb, register NOD node, SSHORT which_trig) +static JRD_NOD modify(TDBB tdbb, register JRD_NOD node, SSHORT which_trig) { /************************************** * @@ -2994,7 +2994,7 @@ static NOD modify(TDBB tdbb, register NOD node, SSHORT which_trig) return node->nod_arg[e_mod_statement]; } -static void writelock(TDBB tdbb, register NOD node) +static void writelock(TDBB tdbb, register JRD_NOD node) { /************************************** * @@ -3157,7 +3157,7 @@ static void writelock(TDBB tdbb, register NOD node) } -static NOD receive_msg(TDBB tdbb, register NOD node) +static JRD_NOD receive_msg(TDBB tdbb, register JRD_NOD node) { /************************************** * @@ -3241,7 +3241,7 @@ static void release_blobs(TDBB tdbb, REQ request) #ifdef PC_ENGINE -static NOD release_bookmark(TDBB tdbb, NOD node) +static JRD_NOD release_bookmark(TDBB tdbb, JRD_NOD node) { /************************************** * @@ -3298,7 +3298,7 @@ static void release_proc_save_points(REQ request) #ifdef SCROLLABLE_CURSORS -static NOD seek_rse(TDBB tdbb, REQ request, NOD node) +static JRD_NOD seek_rse(TDBB tdbb, REQ request, JRD_NOD node) { /************************************** * @@ -3518,7 +3518,7 @@ static void seek_rsb( #endif -static NOD selct(TDBB tdbb, register NOD node) +static JRD_NOD selct(TDBB tdbb, register JRD_NOD node) { /************************************** * @@ -3557,7 +3557,7 @@ static NOD selct(TDBB tdbb, register NOD node) -static NOD send_msg(TDBB tdbb, register NOD node) +static JRD_NOD send_msg(TDBB tdbb, register JRD_NOD node) { /************************************** * @@ -3596,7 +3596,7 @@ static NOD send_msg(TDBB tdbb, register NOD node) #ifdef PC_ENGINE -static NOD set_bookmark(TDBB tdbb, NOD node) +static JRD_NOD set_bookmark(TDBB tdbb, JRD_NOD node) { /************************************** * @@ -3655,7 +3655,7 @@ static NOD set_bookmark(TDBB tdbb, NOD node) #endif -static void set_error(TDBB tdbb, XCP condition, NOD node) +static void set_error(TDBB tdbb, XCP condition, JRD_NOD node) { /************************************** * @@ -3749,7 +3749,7 @@ static void set_error(TDBB tdbb, XCP condition, NOD node) #ifdef PC_ENGINE -static NOD set_index(TDBB tdbb, register NOD node) +static JRD_NOD set_index(TDBB tdbb, register JRD_NOD node) { /************************************** * @@ -3800,7 +3800,7 @@ static NOD set_index(TDBB tdbb, register NOD node) #endif -static NOD stall(TDBB tdbb, register NOD node) +static JRD_NOD stall(TDBB tdbb, register JRD_NOD node) { /************************************** * @@ -3838,7 +3838,7 @@ static NOD stall(TDBB tdbb, register NOD node) } -static NOD store(TDBB tdbb, register NOD node, SSHORT which_trig) +static JRD_NOD store(TDBB tdbb, register JRD_NOD node, SSHORT which_trig) { /************************************** * @@ -4006,7 +4006,7 @@ static NOD store(TDBB tdbb, register NOD node, SSHORT which_trig) #ifdef PC_ENGINE -static NOD stream(TDBB tdbb, register NOD node) +static JRD_NOD stream(TDBB tdbb, register JRD_NOD node) { /************************************** * @@ -4218,7 +4218,7 @@ static void trigger_failure(TDBB tdbb, REQ trigger) } -static void validate(TDBB tdbb, NOD list) +static void validate(TDBB tdbb, JRD_NOD list) { /************************************** * @@ -4234,7 +4234,7 @@ static void validate(TDBB tdbb, NOD list) SET_TDBB(tdbb); BLKCHK(list, type_nod); - NOD *ptr1, *ptr2; + JRD_NOD *ptr1, *ptr2; for (ptr1 = list->nod_arg, ptr2 = ptr1 + list->nod_count; ptr1 < ptr2; ptr1++) @@ -4243,7 +4243,7 @@ static void validate(TDBB tdbb, NOD list) { /* Validation error -- report result */ - NOD node; + JRD_NOD node; VEC vector; REL relation; REQ request; diff --git a/src/jrd/exe.h b/src/jrd/exe.h index e9691902a5..9738ab017b 100644 --- a/src/jrd/exe.h +++ b/src/jrd/exe.h @@ -72,7 +72,7 @@ public: USHORT nod_count; /* Number of arguments */ nod* nod_arg[1]; }; -typedef nod* NOD; +typedef nod* JRD_NOD; #define nod_comparison 1 #define nod_id 1 /* marks a field node as a blr_fid guy */ @@ -119,7 +119,7 @@ typedef rse* RSE; #define rse_singular 2 /* flags rse-type node as from a singleton select */ #define rse_variant 4 /* flags rse as variant (not invariant?) */ -#define rse_delta (sizeof(struct rse)-sizeof(struct nod))/sizeof(((NOD) 0)->nod_arg[0]) +#define rse_delta (sizeof(struct rse)-sizeof(struct nod))/sizeof(((JRD_NOD) 0)->nod_arg[0]) /* Literal value */ @@ -138,7 +138,7 @@ public: }; typedef lit* LIT; -#define lit_delta (sizeof(dsc) / sizeof(NOD*)) +#define lit_delta (sizeof(dsc) / sizeof(JRD_NOD*)) /* Aggregate Sort Block (for DISTINCT aggregates) */ @@ -158,7 +158,7 @@ public: }; typedef asb* ASB; -#define asb_delta ((sizeof(struct asb) - sizeof(struct nod)) / sizeof (NOD*)) +#define asb_delta ((sizeof(struct asb) - sizeof(struct nod)) / sizeof (JRD_NOD*)) /* Various structures in the impure area */ @@ -378,7 +378,7 @@ typedef struct iasb { #define e_dcl_id 0 #define e_dcl_desc 1 -#define e_dcl_length (1 + sizeof (DSC)/sizeof (NOD)) /* Room for descriptor */ +#define e_dcl_length (1 + sizeof (DSC)/sizeof (JRD_NOD)) /* Room for descriptor */ #define e_dep_object 0 /* node for registering dependencies */ #define e_dep_object_type 1 diff --git a/src/jrd/ext.cpp b/src/jrd/ext.cpp index b97fe163e2..9f63d478ef 100644 --- a/src/jrd/ext.cpp +++ b/src/jrd/ext.cpp @@ -411,7 +411,7 @@ void EXT_open(RSB rsb) } -RSB EXT_optimize(register OPT opt, SSHORT stream, NOD * sort_ptr) +RSB EXT_optimize(register OPT opt, SSHORT stream, JRD_NOD * sort_ptr) { /************************************** * @@ -429,7 +429,7 @@ RSB EXT_optimize(register OPT opt, SSHORT stream, NOD * sort_ptr) REL relation; RSB rsb_; /* all these are un refrenced due to the code commented below -NOD node, inversion; +JRD_NOD node, inversion; register opt::opt_repeat *tail, *opt_end; SSHORT i, size; */ diff --git a/src/jrd/inf.cpp b/src/jrd/inf.cpp index cd68c05f5d..c69eb45b91 100644 --- a/src/jrd/inf.cpp +++ b/src/jrd/inf.cpp @@ -851,7 +851,7 @@ int INF_request_info( * Return information about requests. * **************************************/ - NOD node; + JRD_NOD node; FMT format; SCHAR item, *end_items, *end, buffer[256], *buffer_ptr; SSHORT state; diff --git a/src/jrd/jrd.cpp b/src/jrd/jrd.cpp index 3690ff1d1c..a783df8c0c 100644 --- a/src/jrd/jrd.cpp +++ b/src/jrd/jrd.cpp @@ -3813,7 +3813,7 @@ STATUS DLL_EXPORT GDS_TRANSACT_REQUEST(STATUS* user_status, TRA transaction; CSB csb; REQ request; - NOD in_message, out_message, node; + JRD_NOD in_message, out_message, node; ACC access; SCL class_; FMT format; diff --git a/src/jrd/nav.cpp b/src/jrd/nav.cpp index 15c9b0fc95..8e7d14c791 100644 --- a/src/jrd/nav.cpp +++ b/src/jrd/nav.cpp @@ -153,7 +153,7 @@ EXP NAV_expand_index(register WIN * window, IRSB_NAV impure) #ifdef PC_ENGINE BOOLEAN NAV_find_record(RSB rsb, - USHORT operator, USHORT direction, NOD find_key) + USHORT operator, USHORT direction, JRD_NOD find_key) { /************************************** * @@ -456,7 +456,7 @@ BOOLEAN NAV_get_record( TDBB tdbb; IDX *idx; IRB retrieval; - NOD retrieval_node; + JRD_NOD retrieval_node; BTR page; BTN node, next; EXP expanded_page; @@ -511,7 +511,7 @@ BOOLEAN NAV_get_record( next = get_position(tdbb, rsb, impure, &window, direction, &expanded_next); MOVE_FAST(impure->irsb_nav_data, key.key_data, impure->irsb_nav_length); - retrieval_node = (NOD) rsb->rsb_arg[RSB_NAV_index]; + retrieval_node = (JRD_NOD) rsb->rsb_arg[RSB_NAV_index]; retrieval = (IRB) retrieval_node->nod_arg[e_idx_retrieval]; /* set the upper (or lower) limit for navigational retrieval */ @@ -1176,7 +1176,7 @@ static BOOLEAN find_record( REQ request; IRSB_NAV impure; RPB *rpb; - NOD retrieval_node; + JRD_NOD retrieval_node; IRB retrieval; IDX *idx; BTR page; @@ -1196,7 +1196,7 @@ static BOOLEAN find_record( rpb = request->req_rpb + rsb->rsb_stream; window.win_flags = 0; - retrieval_node = (NOD) rsb->rsb_arg[RSB_NAV_index]; + retrieval_node = (JRD_NOD) rsb->rsb_arg[RSB_NAV_index]; retrieval = (IRB) retrieval_node->nod_arg[e_idx_retrieval]; /* save the current equality retrieval key */ @@ -1735,7 +1735,7 @@ static BTN nav_open( BTR page; //EXP expanded_page; BTN node; - NOD retrieval_node; + JRD_NOD retrieval_node; IDX *idx; SET_TDBB(tdbb); @@ -1753,7 +1753,7 @@ static BTN nav_open( /* Find the starting leaf page */ - retrieval_node = (NOD) rsb->rsb_arg[RSB_NAV_index]; + retrieval_node = (JRD_NOD) rsb->rsb_arg[RSB_NAV_index]; retrieval = (IRB) retrieval_node->nod_arg[e_idx_retrieval]; idx = (IDX *) ((SCHAR *) impure + (SLONG) rsb->rsb_arg[RSB_NAV_idx_offset]); diff --git a/src/jrd/opt.cpp b/src/jrd/opt.cpp index 4488979563..5e09d07362 100644 --- a/src/jrd/opt.cpp +++ b/src/jrd/opt.cpp @@ -76,79 +76,79 @@ #include "../jrd/dbg_proto.h" -static BOOLEAN augment_stack(NOD, LLS *); +static BOOLEAN augment_stack(JRD_NOD, LLS *); static void check_indices(csb_repeat *); static BOOLEAN check_relationship(OPT, USHORT, USHORT); static void check_sorts(RSE); -static void class_mask(USHORT, NOD *, ULONG *); +static void class_mask(USHORT, JRD_NOD *, ULONG *); static void clear_bounds(OPT, IDX *); -static NOD compose(NOD *, NOD, NOD_T); -static BOOLEAN computable(CSB, register NOD, SSHORT, BOOLEAN); -static void compute_dependencies(NOD, ULONG *); -static void compute_dbkey_streams(CSB, NOD, UCHAR *); +static JRD_NOD compose(JRD_NOD *, JRD_NOD, NOD_T); +static BOOLEAN computable(CSB, register JRD_NOD, SSHORT, BOOLEAN); +static void compute_dependencies(JRD_NOD, ULONG *); +static void compute_dbkey_streams(CSB, JRD_NOD, UCHAR *); static void compute_rse_streams(CSB, RSE, UCHAR *); -static SLONG decompose(TDBB, register NOD, LLS *, CSB); +static SLONG decompose(TDBB, register JRD_NOD, LLS *, CSB); static USHORT distribute_equalities(LLS *, CSB); -static BOOLEAN dump_index(NOD, SCHAR **, SSHORT *); +static BOOLEAN dump_index(JRD_NOD, SCHAR **, SSHORT *); static BOOLEAN dump_rsb(REQ, RSB, SCHAR **, SSHORT *); static BOOLEAN estimate_cost(TDBB, OPT, USHORT, double *, double *); #ifdef EXPRESSION_INDICES -static BOOLEAN expression_equal(TDBB, NOD, NOD); +static BOOLEAN expression_equal(TDBB, JRD_NOD, JRD_NOD); #endif -static void find_best(TDBB, register OPT, USHORT, USHORT, UCHAR *, NOD, +static void find_best(TDBB, register OPT, USHORT, USHORT, UCHAR *, JRD_NOD, double, double); -static NOD find_dbkey(NOD, USHORT, SLONG *); -static USHORT find_order(TDBB, register OPT, UCHAR *, NOD); +static JRD_NOD find_dbkey(JRD_NOD, USHORT, SLONG *); +static USHORT find_order(TDBB, register OPT, UCHAR *, JRD_NOD); static void find_rsbs(RSB, LLS *, LLS *); -static void form_rivers(TDBB, OPT, UCHAR *, LLS *, NOD *, NOD *, NOD); -static BOOLEAN form_river(TDBB, OPT, USHORT, UCHAR *, UCHAR *, LLS *, NOD *, - NOD *, NOD); -static RSB gen_aggregate(TDBB, OPT, NOD); -static RSB gen_boolean(TDBB, register OPT, RSB, NOD); -static RSB gen_first(TDBB, register OPT, RSB, NOD); -static void gen_join(TDBB, OPT, UCHAR *, LLS *, NOD *, NOD *, NOD); -static RSB gen_navigation(TDBB, OPT, USHORT, REL, STR, IDX *, NOD *); +static void form_rivers(TDBB, OPT, UCHAR *, LLS *, JRD_NOD *, JRD_NOD *, JRD_NOD); +static BOOLEAN form_river(TDBB, OPT, USHORT, UCHAR *, UCHAR *, LLS *, JRD_NOD *, + JRD_NOD *, JRD_NOD); +static RSB gen_aggregate(TDBB, OPT, JRD_NOD); +static RSB gen_boolean(TDBB, register OPT, RSB, JRD_NOD); +static RSB gen_first(TDBB, register OPT, RSB, JRD_NOD); +static void gen_join(TDBB, OPT, UCHAR *, LLS *, JRD_NOD *, JRD_NOD *, JRD_NOD); +static RSB gen_navigation(TDBB, OPT, USHORT, REL, STR, IDX *, JRD_NOD *); #ifdef SCROLLABLE_CURSORS static RSB gen_nav_rsb(TDBB, OPT, USHORT, REL, STR, IDX *, RSE_GET_MODE); #else static RSB gen_nav_rsb(TDBB, OPT, USHORT, REL, STR, IDX *); #endif -static RSB gen_outer(TDBB, OPT, RSE, LLS, NOD *, NOD *); -static RSB gen_procedure(TDBB, OPT, NOD); +static RSB gen_outer(TDBB, OPT, RSE, LLS, JRD_NOD *, JRD_NOD *); +static RSB gen_procedure(TDBB, OPT, JRD_NOD); static RSB gen_residual_boolean(TDBB, register OPT, RSB); -static RSB gen_retrieval(TDBB, OPT, SSHORT, NOD *, NOD *, BOOLEAN, BOOLEAN, - NOD *); -static RSB gen_rsb(TDBB, OPT, RSB, NOD, SSHORT, REL, STR, NOD, float); -static RSB gen_skip (TDBB, OPT, RSB, NOD); -static RSB gen_sort(TDBB, OPT, UCHAR *, UCHAR *, RSB, NOD, USHORT); +static RSB gen_retrieval(TDBB, OPT, SSHORT, JRD_NOD *, JRD_NOD *, BOOLEAN, BOOLEAN, + JRD_NOD *); +static RSB gen_rsb(TDBB, OPT, RSB, JRD_NOD, SSHORT, REL, STR, JRD_NOD, float); +static RSB gen_skip (TDBB, OPT, RSB, JRD_NOD); +static RSB gen_sort(TDBB, OPT, UCHAR *, UCHAR *, RSB, JRD_NOD, USHORT); static BOOLEAN gen_sort_merge(TDBB, OPT, LLS *); -static RSB gen_union(TDBB, OPT, NOD, UCHAR *, USHORT); +static RSB gen_union(TDBB, OPT, JRD_NOD, UCHAR *, USHORT); static void get_inactivities(CSB, ULONG *); static IRL indexed_relationship(TDBB, OPT, USHORT); static STR make_alias(TDBB, CSB, csb_repeat *); -static NOD make_binary_node(NOD_T, NOD, NOD, USHORT); +static JRD_NOD make_binary_node(NOD_T, JRD_NOD, JRD_NOD, USHORT); static RSB make_cross(TDBB, OPT, LLS); -static NOD make_index_node(TDBB, REL, CSB, IDX *); -static NOD make_inference_node(CSB, NOD, NOD, NOD); -static NOD make_inversion(TDBB, register OPT, NOD, USHORT); -static NOD make_missing(TDBB, register OPT, REL, NOD, USHORT, IDX *); -static NOD make_starts(TDBB, register OPT, REL, NOD, USHORT, IDX *); -static BOOLEAN map_equal(NOD, NOD, NOD); +static JRD_NOD make_index_node(TDBB, REL, CSB, IDX *); +static JRD_NOD make_inference_node(CSB, JRD_NOD, JRD_NOD, JRD_NOD); +static JRD_NOD make_inversion(TDBB, register OPT, JRD_NOD, USHORT); +static JRD_NOD make_missing(TDBB, register OPT, REL, JRD_NOD, USHORT, IDX *); +static JRD_NOD make_starts(TDBB, register OPT, REL, JRD_NOD, USHORT, IDX *); +static BOOLEAN map_equal(JRD_NOD, JRD_NOD, JRD_NOD); static void mark_indices(csb_repeat *, SSHORT); -static SSHORT match_index(TDBB, register OPT, SSHORT, register NOD, IDX *); -static BOOLEAN match_indices(TDBB, register OPT, SSHORT, register NOD, IDX *); +static SSHORT match_index(TDBB, register OPT, SSHORT, register JRD_NOD, IDX *); +static BOOLEAN match_indices(TDBB, register OPT, SSHORT, register JRD_NOD, IDX *); static USHORT nav_rsb_size(RSB, USHORT, USHORT); -static BOOLEAN node_equality(NOD, NOD); -static NOD optimize_like(TDBB, NOD); +static BOOLEAN node_equality(JRD_NOD, JRD_NOD); +static JRD_NOD optimize_like(TDBB, JRD_NOD); static void print_order(OPT, USHORT, double, double); -static USHORT river_count(USHORT, NOD *); -static BOOLEAN river_reference(RIV, NOD); -static BOOLEAN search_stack(NOD, LLS); +static USHORT river_count(USHORT, JRD_NOD *); +static BOOLEAN river_reference(RIV, JRD_NOD); +static BOOLEAN search_stack(JRD_NOD, LLS); static void set_active(OPT, RIV); -static void set_direction(NOD, NOD); +static void set_direction(JRD_NOD, JRD_NOD); static void set_inactive(OPT, RIV); static void set_made_river(OPT, RIV); -static void set_position(NOD, NOD, NOD); +static void set_position(JRD_NOD, JRD_NOD, JRD_NOD); static void set_rse_inactive(CSB, RSE); static void sort_indices(csb_repeat *); @@ -289,7 +289,7 @@ RSB OPT_compile(TDBB tdbb, OPT opt_; IDX *idx; RIV river; - NOD node, *ptr, *end, sort, project, aggregate; + JRD_NOD node, *ptr, *end, sort, project, aggregate; LLS conjunct_stack, rivers_stack, *stack_end; RSB rsb; REL relation; @@ -530,7 +530,7 @@ RSB OPT_compile(TDBB tdbb, /* Msg442: size of optimizer block exceeded */ for (i = 0; i < conjunct_count; i++) { - opt_->opt_rpt[i].opt_conjunct = node = (NOD) LLS_POP(&conjunct_stack); + opt_->opt_rpt[i].opt_conjunct = node = (JRD_NOD) LLS_POP(&conjunct_stack); compute_dependencies(node, opt_->opt_rpt[i].opt_dependencies); } @@ -540,7 +540,7 @@ RSB OPT_compile(TDBB tdbb, for (; parent_stack && conjunct_count < MAX_CONJUNCTS; parent_stack = parent_stack->lls_next, conjunct_count++) { opt_->opt_rpt[conjunct_count].opt_conjunct = node = - (NOD) parent_stack->lls_object; + (JRD_NOD) parent_stack->lls_object; compute_dependencies(node, opt_->opt_rpt[conjunct_count].opt_dependencies); } @@ -693,7 +693,7 @@ RSB OPT_compile(TDBB tdbb, } -NOD OPT_make_dbkey(register OPT opt_, NOD boolean, USHORT stream) +JRD_NOD OPT_make_dbkey(register OPT opt_, JRD_NOD boolean, USHORT stream) { /************************************** * @@ -711,7 +711,7 @@ NOD OPT_make_dbkey(register OPT opt_, NOD boolean, USHORT stream) * **************************************/ CSB csb; - NOD value, dbkey; + JRD_NOD value, dbkey; SLONG n; TDBB tdbb; @@ -765,14 +765,14 @@ NOD OPT_make_dbkey(register OPT opt_, NOD boolean, USHORT stream) dbkey->nod_count = 1; dbkey->nod_type = nod_bit_dbkey; dbkey->nod_arg[0] = value; - dbkey->nod_arg[1] = (NOD) n; + dbkey->nod_arg[1] = (JRD_NOD) n; dbkey->nod_impure = CMP_impure(csb, sizeof(struct inv)); return dbkey; } -NOD OPT_make_index(TDBB tdbb, OPT opt_, REL relation, IDX * idx) +JRD_NOD OPT_make_index(TDBB tdbb, OPT opt_, REL relation, IDX * idx) { /************************************** * @@ -785,7 +785,7 @@ NOD OPT_make_index(TDBB tdbb, OPT opt_, REL relation, IDX * idx) * **************************************/ IRB retrieval; - NOD node, *lower, *upper, *end_node; + JRD_NOD node, *lower, *upper, *end_node; Opt::opt_repeat * tail, *end; SET_TDBB(tdbb); @@ -878,7 +878,7 @@ int OPT_match_index(OPT opt, USHORT stream, IDX * idx) **************************************/ TDBB tdbb; register CSB csb; - NOD node; + JRD_NOD node; USHORT n; register Opt::opt_repeat * tail, *opt_end; @@ -925,8 +925,8 @@ void OPT_set_index(TDBB tdbb, RSB old_rsb, new_rsb; USHORT index_id, i; OPT opt; - NOD inversion = NULL; - NOD index_node, new_index_node; + JRD_NOD inversion = NULL; + JRD_NOD index_node, new_index_node; IRB retrieval; IDL index; VEC vector; @@ -952,9 +952,9 @@ void OPT_set_index(TDBB tdbb, a boolean expression mapped to an index */ if (old_rsb->rsb_type == rsb_indexed) - inversion = (NOD) old_rsb->rsb_arg[0]; + inversion = (JRD_NOD) old_rsb->rsb_arg[0]; else if (old_rsb->rsb_type == rsb_navigate) - inversion = (NOD) old_rsb->rsb_arg[RSB_NAV_inversion]; + inversion = (JRD_NOD) old_rsb->rsb_arg[RSB_NAV_inversion]; /* set up a dummy optimizer block just for the purposes of the set index, to pass information to subroutines */ @@ -992,7 +992,7 @@ void OPT_set_index(TDBB tdbb, /* find index node if the old rsb was navigational */ if (old_rsb->rsb_type == rsb_navigate) - index_node = (NOD) old_rsb->rsb_arg[RSB_NAV_index]; + index_node = (JRD_NOD) old_rsb->rsb_arg[RSB_NAV_index]; else index_node = NULL; @@ -1002,7 +1002,7 @@ void OPT_set_index(TDBB tdbb, structure, and vice versa to convert the other way */ if (idx) { - new_index_node = (NOD) new_rsb->rsb_arg[RSB_NAV_index]; + new_index_node = (JRD_NOD) new_rsb->rsb_arg[RSB_NAV_index]; if (old_rsb->rsb_type == rsb_navigate) new_index_node->nod_impure = index_node->nod_impure; else { @@ -1055,7 +1055,7 @@ void OPT_set_index(TDBB tdbb, } -static BOOLEAN augment_stack(NOD node, LLS * stack) +static BOOLEAN augment_stack(JRD_NOD node, LLS * stack) { /************************************** * @@ -1073,7 +1073,7 @@ static BOOLEAN augment_stack(NOD node, LLS * stack) DEV_BLKCHK(*stack, type_lls); for (temp = *stack; temp; temp = temp->lls_next) - if (node_equality(node, (NOD) temp->lls_object)) + if (node_equality(node, (JRD_NOD) temp->lls_object)) return FALSE; LLS_PUSH(node, stack); @@ -1096,7 +1096,7 @@ static void check_indices(csb_repeat * csb_tail) * **************************************/ TEXT index_name[32]; - NOD plan, access_type; + JRD_NOD plan, access_type; REL relation; IDX *idx; USHORT i; @@ -1192,9 +1192,9 @@ static void check_sorts(RSE rse) * Try to optimize out unnecessary sorting. * **************************************/ - NOD sort, project, group, sub_rse; - NOD *group_ptr, *project_ptr, *sort_ptr; - NOD *group_end, *project_end, *sort_end; + JRD_NOD sort, project, group, sub_rse; + JRD_NOD *group_ptr, *project_ptr, *sort_ptr; + JRD_NOD *group_end, *project_end, *sort_end; DEV_BLKCHK(rse, type_nod); @@ -1301,7 +1301,7 @@ static void check_sorts(RSE rse) } -static void class_mask(USHORT count, NOD * class_, ULONG * mask) +static void class_mask(USHORT count, JRD_NOD * class_, ULONG * mask) { /************************************** * @@ -1364,7 +1364,7 @@ static void clear_bounds(OPT opt, IDX * idx) } -static NOD compose(NOD * node1, NOD node2, NOD_T node_type) +static JRD_NOD compose(JRD_NOD * node1, JRD_NOD node2, NOD_T node_type) { /************************************** * @@ -1391,7 +1391,7 @@ static NOD compose(NOD * node1, NOD node2, NOD_T node_type) static BOOLEAN computable(CSB csb, - register NOD node, SSHORT stream, BOOLEAN idx_use) + register JRD_NOD node, SSHORT stream, BOOLEAN idx_use) { /************************************** * @@ -1422,7 +1422,7 @@ static BOOLEAN computable(CSB csb, * **************************************/ RSE rse; - NOD *ptr, *end, sub, value; + JRD_NOD *ptr, *end, sub, value; USHORT n; BOOLEAN result; @@ -1543,7 +1543,7 @@ static BOOLEAN computable(CSB csb, } -static void compute_dependencies(NOD node, ULONG * dependencies) +static void compute_dependencies(JRD_NOD node, ULONG * dependencies) { /************************************** * @@ -1556,7 +1556,7 @@ static void compute_dependencies(NOD node, ULONG * dependencies) * **************************************/ RSE rse; - NOD *ptr, *end, sub, value; + JRD_NOD *ptr, *end, sub, value; USHORT n; DEV_BLKCHK(node, type_nod); @@ -1634,7 +1634,7 @@ static void compute_dependencies(NOD node, ULONG * dependencies) } -static void compute_dbkey_streams(CSB csb, NOD node, UCHAR * streams) +static void compute_dbkey_streams(CSB csb, JRD_NOD node, UCHAR * streams) { /************************************** * @@ -1647,7 +1647,7 @@ static void compute_dbkey_streams(CSB csb, NOD node, UCHAR * streams) * dbkey may need to be carried through a sort. * **************************************/ - NOD clauses, *ptr, *end; + JRD_NOD clauses, *ptr, *end; RSE rse; DEV_BLKCHK(csb, type_csb); @@ -1683,7 +1683,7 @@ static void compute_rse_streams(CSB csb, RSE rse, UCHAR * streams) * Identify the streams that make up an rse. * **************************************/ - NOD *ptr, *end, node; + JRD_NOD *ptr, *end, node; DEV_BLKCHK(csb, type_csb); DEV_BLKCHK(rse, type_nod); @@ -1700,7 +1700,7 @@ static void compute_rse_streams(CSB csb, RSE rse, UCHAR * streams) static SLONG decompose(TDBB tdbb, - register NOD boolean_node, LLS * stack, CSB csb) + register JRD_NOD boolean_node, LLS * stack, CSB csb) { /************************************** * @@ -1712,7 +1712,7 @@ static SLONG decompose(TDBB tdbb, * Decompose a boolean into a stack of conjuctions. * **************************************/ - NOD arg, node; + JRD_NOD arg, node; DEV_BLKCHK(boolean_node, type_nod); DEV_BLKCHK(*stack, type_lls); @@ -1780,7 +1780,7 @@ static USHORT distribute_equalities(LLS * org_stack, CSB csb) * **************************************/ LLS classes[MAX_OPT_ITEMS], *class_, *class2, *end, stack, temp; - NOD boolean, node1, node2, new_node, arg1, arg2; + JRD_NOD boolean, node1, node2, new_node, arg1, arg2; USHORT reverse, count, n; DEV_BLKCHK(*org_stack, type_lls); @@ -1791,7 +1791,7 @@ static USHORT distribute_equalities(LLS * org_stack, CSB csb) end = classes; for (stack = *org_stack; stack; stack = stack->lls_next) { - boolean = (NOD) stack->lls_object; + boolean = (JRD_NOD) stack->lls_object; if (boolean->nod_type != nod_eql) continue; node1 = boolean->nod_arg[0]; @@ -1827,10 +1827,10 @@ static USHORT distribute_equalities(LLS * org_stack, CSB csb) for (class_ = classes; class_ < end; class_++) for (stack = *class_; stack; stack = stack->lls_next) for (class2 = class_ + 1; class2 < end; class2++) - if (search_stack((NOD) stack->lls_object, *class2)) { + if (search_stack((JRD_NOD) stack->lls_object, *class2)) { DEBUG; while (*class2) - augment_stack((NOD) LLS_POP(class2), class_); + augment_stack((JRD_NOD) LLS_POP(class2), class_); } count = 0; @@ -1844,8 +1844,8 @@ static USHORT distribute_equalities(LLS * org_stack, CSB csb) for (stack = *class_; stack; stack = stack->lls_next) for (temp = stack->lls_next; temp; temp = temp->lls_next) { boolean = - make_binary_node(nod_eql, (NOD) stack->lls_object, - (NOD) temp->lls_object, TRUE); + make_binary_node(nod_eql, (JRD_NOD) stack->lls_object, + (JRD_NOD) temp->lls_object, TRUE); if (augment_stack(boolean, org_stack)) { DEBUG; count++; @@ -1858,7 +1858,7 @@ static USHORT distribute_equalities(LLS * org_stack, CSB csb) /* Now make a second pass looking for non-field equalities */ for (stack = *org_stack; stack; stack = stack->lls_next) { - boolean = (NOD) stack->lls_object; + boolean = (JRD_NOD) stack->lls_object; if (boolean->nod_type != nod_eql && boolean->nod_type != nod_gtr && boolean->nod_type != nod_geq && @@ -1884,13 +1884,13 @@ static USHORT distribute_equalities(LLS * org_stack, CSB csb) for (class_ = classes; class_ < end; class_++) if (search_stack(node1, *class_)) { for (temp = *class_; temp; temp = temp->lls_next) - if (!node_equality(node1, (NOD) temp->lls_object)) { + if (!node_equality(node1, (JRD_NOD) temp->lls_object)) { if (reverse) { arg1 = boolean->nod_arg[0]; - arg2 = (NOD) temp->lls_object; + arg2 = (JRD_NOD) temp->lls_object; } else { - arg1 = (NOD) temp->lls_object; + arg1 = (JRD_NOD) temp->lls_object; arg2 = boolean->nod_arg[1]; } @@ -1910,7 +1910,7 @@ static USHORT distribute_equalities(LLS * org_stack, CSB csb) } -static BOOLEAN dump_index(NOD node, +static BOOLEAN dump_index(JRD_NOD node, SCHAR ** buffer_ptr, SSHORT * buffer_length) { /************************************** @@ -2041,7 +2041,7 @@ static BOOLEAN dump_rsb(REQ request, switch (rsb->rsb_type) { case rsb_indexed: *buffer++ = gds_info_rsb_indexed; - if (!dump_index((NOD) rsb->rsb_arg[0], &buffer, buffer_length)) + if (!dump_index((JRD_NOD) rsb->rsb_arg[0], &buffer, buffer_length)) return FALSE; if (--(*buffer_length) < 0) return FALSE; @@ -2050,7 +2050,7 @@ static BOOLEAN dump_rsb(REQ request, case rsb_navigate: *buffer++ = gds_info_rsb_navigate; if (!dump_index - ((NOD) rsb->rsb_arg[RSB_NAV_index], &buffer, + ((JRD_NOD) rsb->rsb_arg[RSB_NAV_index], &buffer, buffer_length)) return FALSE; if (--(*buffer_length) < 0) return FALSE; @@ -2257,7 +2257,7 @@ static BOOLEAN estimate_cost(TDBB tdbb, **************************************/ CSB csb; IDX *idx; - NOD node; + JRD_NOD node; USHORT indexes, i, unique, equalities, inequalities, index_hits, count; SSHORT n; ULONG inactivities[OPT_BITS]; @@ -2367,7 +2367,7 @@ static BOOLEAN estimate_cost(TDBB tdbb, #ifdef EXPRESSION_INDICES -static BOOLEAN expression_equal(TDBB tdbb, NOD node1, NOD node2) +static BOOLEAN expression_equal(TDBB tdbb, JRD_NOD node1, JRD_NOD node2) { /************************************** * @@ -2505,7 +2505,7 @@ static void find_best(TDBB tdbb, USHORT stream, USHORT position, UCHAR * streams, - NOD plan_node, double cost, double cardinality) + JRD_NOD plan_node, double cost, double cardinality) { /************************************** * @@ -2679,7 +2679,7 @@ static void find_best(TDBB tdbb, } -static NOD find_dbkey(NOD dbkey, USHORT stream, SLONG * position) +static JRD_NOD find_dbkey(JRD_NOD dbkey, USHORT stream, SLONG * position) { /************************************** * @@ -2692,7 +2692,7 @@ static NOD find_dbkey(NOD dbkey, USHORT stream, SLONG * position) * a dbkey for specified stream. * **************************************/ - NOD dbkey_temp, *ptr, *end; + JRD_NOD dbkey_temp, *ptr, *end; DEV_BLKCHK(dbkey, type_nod); if (dbkey->nod_type == nod_dbkey) { if ((USHORT) dbkey->nod_arg[0] == stream) @@ -2712,7 +2712,7 @@ static NOD find_dbkey(NOD dbkey, USHORT stream, SLONG * position) static USHORT find_order(TDBB tdbb, - register OPT opt, UCHAR * streams, NOD plan_node) + register OPT opt, UCHAR * streams, JRD_NOD plan_node) { /************************************** * @@ -2831,8 +2831,8 @@ static void form_rivers(TDBB tdbb, OPT opt, UCHAR * streams, LLS * river_stack, - NOD * sort_clause, - NOD * project_clause, NOD plan_clause) + JRD_NOD * sort_clause, + JRD_NOD * project_clause, JRD_NOD plan_clause) { /************************************** * @@ -2845,7 +2845,7 @@ static void form_rivers(TDBB tdbb, * to the user-specified plan. * **************************************/ - NOD *ptr, *end, plan_node, relation_node; + JRD_NOD *ptr, *end, plan_node, relation_node; USHORT count; UCHAR temp[MAX_STREAMS]; SET_TDBB(tdbb); @@ -2896,8 +2896,8 @@ static BOOLEAN form_river(TDBB tdbb, UCHAR * streams, UCHAR * temp, LLS * river_stack, - NOD * sort_clause, - NOD * project_clause, NOD plan_clause) + JRD_NOD * sort_clause, + JRD_NOD * project_clause, JRD_NOD plan_clause) { /************************************** * @@ -2976,7 +2976,7 @@ static BOOLEAN form_river(TDBB tdbb, -static RSB gen_aggregate(TDBB tdbb, OPT opt, NOD node) +static RSB gen_aggregate(TDBB tdbb, OPT opt, JRD_NOD node) { /************************************** * @@ -2993,8 +2993,8 @@ static RSB gen_aggregate(TDBB tdbb, OPT opt, NOD node) RSB rsb; CSB csb; USHORT count; - NOD map, operator_, aggregate; - NOD *ptr, *end, from; + JRD_NOD map, operator_, aggregate; + JRD_NOD *ptr, *end, from; DSC descriptor, *desc; ASB asb; SKD *sort_key; @@ -3021,7 +3021,7 @@ static RSB gen_aggregate(TDBB tdbb, OPT opt, NOD node) aggregate->nod_arg[0] = operator_->nod_arg[e_asgn_from]; /* in the max case, flag the sort as descending */ if (operator_->nod_type == nod_agg_max) - aggregate->nod_arg[1] = (NOD) TRUE; + aggregate->nod_arg[1] = (JRD_NOD) TRUE; rse->rse_aggregate = aggregate; } @@ -3056,8 +3056,8 @@ static RSB gen_aggregate(TDBB tdbb, OPT opt, NOD node) || (from->nod_type == nod_agg_average_distinct2) || (from->nod_type == nod_agg_average_distinct)) { count = - asb_delta + 1 + (sizeof(SKD) + sizeof(NOD *) - - 1) / sizeof(NOD *); + asb_delta + 1 + (sizeof(SKD) + sizeof(JRD_NOD *) - + 1) / sizeof(JRD_NOD *); asb = (ASB) PAR_make_node(tdbb, count); asb->nod_type = nod_asb; asb->nod_count = 0; @@ -3089,7 +3089,7 @@ static RSB gen_aggregate(TDBB tdbb, OPT opt, NOD node) sort_key->skd_flags = SKD_ascending; asb->nod_impure = CMP_impure(csb, sizeof(struct iasb)); asb->asb_desc = *desc; - from->nod_arg[1] = (NOD) asb; + from->nod_arg[1] = (JRD_NOD) asb; from->nod_count = 2; } } @@ -3098,7 +3098,7 @@ static RSB gen_aggregate(TDBB tdbb, OPT opt, NOD node) } -static RSB gen_boolean(TDBB tdbb, register OPT opt, RSB prior_rsb, NOD node) +static RSB gen_boolean(TDBB tdbb, register OPT opt, RSB prior_rsb, JRD_NOD node) { /************************************** * @@ -3128,7 +3128,7 @@ static RSB gen_boolean(TDBB tdbb, register OPT opt, RSB prior_rsb, NOD node) } -static RSB gen_first(TDBB tdbb, register OPT opt, RSB prior_rsb, NOD node) +static RSB gen_first(TDBB tdbb, register OPT opt, RSB prior_rsb, JRD_NOD node) { /************************************** * @@ -3167,7 +3167,7 @@ static void gen_join(TDBB tdbb, OPT opt, UCHAR * streams, LLS * river_stack, - NOD * sort_clause, NOD * project_clause, NOD plan_clause) + JRD_NOD * sort_clause, JRD_NOD * project_clause, JRD_NOD plan_clause) { /************************************** * @@ -3301,7 +3301,7 @@ static void gen_join(TDBB tdbb, static RSB gen_navigation(TDBB tdbb, OPT opt, USHORT stream, - REL relation, STR alias, IDX * idx, NOD * sort_ptr) + REL relation, STR alias, IDX * idx, JRD_NOD * sort_ptr) { /************************************** * @@ -3316,7 +3316,7 @@ static RSB gen_navigation(TDBB tdbb, * the wrong place for ascending indices, so don't use them. * **************************************/ - NOD node, *ptr, *end, sort; + JRD_NOD node, *ptr, *end, sort; idx::idx_repeat * idx_tail; #ifdef SCROLLABLE_CURSORS RSE_GET_MODE last_mode, mode; @@ -3460,7 +3460,7 @@ static RSB gen_nav_rsb(TDBB tdbb, static RSB gen_outer(TDBB tdbb, OPT opt, RSE rse, - LLS river_stack, NOD * sort_clause, NOD * project_clause) + LLS river_stack, JRD_NOD * sort_clause, JRD_NOD * project_clause) { /************************************** * @@ -3483,7 +3483,7 @@ static RSB gen_outer(TDBB tdbb, USHORT stream_num; } stream_o, stream_i, *stream_ptr[2]; RIV river; - NOD node, boolean, inner_boolean; + JRD_NOD node, boolean, inner_boolean; SSHORT i; DEV_BLKCHK(opt, type_opt); DEV_BLKCHK(rse, type_nod); @@ -3568,7 +3568,7 @@ static RSB gen_outer(TDBB tdbb, } -static RSB gen_procedure(TDBB tdbb, OPT opt, NOD node) +static RSB gen_procedure(TDBB tdbb, OPT opt, JRD_NOD node) { /************************************** * @@ -3615,7 +3615,7 @@ static RSB gen_residual_boolean(TDBB tdbb, register OPT opt, RSB prior_rsb) * must still be applied to the result stream. * **************************************/ - NOD node, boolean; + JRD_NOD node, boolean; register Opt::opt_repeat * tail, *opt_end; SET_TDBB(tdbb); DEV_BLKCHK(opt, type_opt); @@ -3639,10 +3639,10 @@ static RSB gen_residual_boolean(TDBB tdbb, register OPT opt, RSB prior_rsb) static RSB gen_retrieval(TDBB tdbb, OPT opt, SSHORT stream, - NOD * sort_ptr, - NOD * project_ptr, + JRD_NOD * sort_ptr, + JRD_NOD * project_ptr, BOOLEAN outer_flag, - BOOLEAN inner_flag, NOD * return_boolean) + BOOLEAN inner_flag, JRD_NOD * return_boolean) { /************************************** * @@ -3660,7 +3660,7 @@ static RSB gen_retrieval(TDBB tdbb, STR alias; RSB rsb; IDX *idx, *idx_walk[MAX_INDICES], *idx_csb[MAX_INDICES]; - NOD node, opt_boolean, inversion; + JRD_NOD node, opt_boolean, inversion; SSHORT i, j, count, last_idx, idx_walk_count; SLONG idx_priority_level[MAX_INDICES], last_priority_level; USHORT idx_field_count, idx_eql_count; @@ -3994,9 +3994,9 @@ static RSB gen_retrieval(TDBB tdbb, static RSB gen_rsb(TDBB tdbb, OPT opt, RSB rsb, - NOD inversion, + JRD_NOD inversion, SSHORT stream, - REL relation, STR alias, NOD boolean, float cardinality) + REL relation, STR alias, JRD_NOD boolean, float cardinality) { /************************************** * @@ -4058,7 +4058,7 @@ static RSB gen_rsb(TDBB tdbb, return rsb; } -static RSB gen_skip (TDBB tdbb, register OPT opt, RSB prior_rsb, NOD node) +static RSB gen_skip (TDBB tdbb, register OPT opt, RSB prior_rsb, JRD_NOD node) { /************************************** * @@ -4100,7 +4100,7 @@ static RSB gen_sort(TDBB tdbb, OPT opt, UCHAR * streams, UCHAR * dbkey_streams, - RSB prior_rsb, NOD sort, USHORT project_flag) + RSB prior_rsb, JRD_NOD sort, USHORT project_flag) { /************************************** * @@ -4119,7 +4119,7 @@ static RSB gen_sort(TDBB tdbb, CSB csb; SLONG id; ULONG map_length = 0; - NOD node, *node_ptr, *end_node; + JRD_NOD node, *node_ptr, *end_node; UCHAR *ptr, *end_ptr; USHORT stream, items, count, flag_offset; SMB map; @@ -4377,7 +4377,7 @@ static BOOLEAN gen_sort_merge(TDBB tdbb, OPT opt, LLS * org_rivers) ULONG selected_rivers[OPT_BITS], selected_rivers2[OPT_BITS]; UCHAR *stream; VEC scratch; - NOD *classes, *class_, *selected_classes[MAX_OPT_ITEMS], + JRD_NOD *classes, *class_, *selected_classes[MAX_OPT_ITEMS], **selected_class, *last_class, node, node1, node2, sort, *ptr; RSB rsb, merge_rsb; RSB *rsb_tail; @@ -4395,8 +4395,8 @@ static BOOLEAN gen_sort_merge(TDBB tdbb, OPT opt, LLS * org_rivers) } scratch = vec::newVector(*dbb->dbb_permanent, opt->opt_count * cnt); - classes = (NOD *) &*(scratch->begin()); - // classes = (NOD *) &(scratch->[0]); + classes = (JRD_NOD *) &*(scratch->begin()); + // classes = (JRD_NOD *) &(scratch->[0]); /* Compute equivalence classes among streams. This involves finding groups of streams joined by field equalities. */ last_class = classes; @@ -4539,7 +4539,7 @@ static BOOLEAN gen_sort_merge(TDBB tdbb, OPT opt, LLS * org_rivers) static RSB gen_union(TDBB tdbb, OPT opt, - NOD union_node, UCHAR * streams, USHORT nstreams) + JRD_NOD union_node, UCHAR * streams, USHORT nstreams) { /************************************** * @@ -4553,7 +4553,7 @@ static RSB gen_union(TDBB tdbb, **************************************/ RSB rsb, *rsb_ptr; USHORT count; - NOD clauses, *ptr, *end; + JRD_NOD clauses, *ptr, *end; CSB csb; DEV_BLKCHK(opt, type_opt); DEV_BLKCHK(union_node, type_nod); @@ -4625,7 +4625,7 @@ static IRL indexed_relationship(TDBB tdbb, OPT opt, USHORT stream) **************************************/ CSB csb; IDX *idx; - NOD node; + JRD_NOD node; IRL relationship; USHORT i; register Opt::opt_repeat * tail, *opt_end; @@ -4752,7 +4752,7 @@ static STR make_alias(TDBB tdbb, CSB csb, csb_repeat * base_tail) } -static NOD make_binary_node(NOD_T type, NOD arg1, NOD arg2, USHORT flag) +static JRD_NOD make_binary_node(NOD_T type, JRD_NOD arg1, JRD_NOD arg2, USHORT flag) { /************************************** * @@ -4764,7 +4764,7 @@ static NOD make_binary_node(NOD_T type, NOD arg1, NOD arg2, USHORT flag) * Make a binary node. * **************************************/ - NOD node; + JRD_NOD node; TDBB tdbb; tdbb = GET_THREAD_DATA; DEV_BLKCHK(arg1, type_nod); @@ -4821,7 +4821,7 @@ static RSB make_cross(TDBB tdbb, OPT opt, LLS stack) } -static NOD make_index_node(TDBB tdbb, REL relation, CSB csb, IDX * idx) +static JRD_NOD make_index_node(TDBB tdbb, REL relation, CSB csb, IDX * idx) { /************************************** * @@ -4833,7 +4833,7 @@ static NOD make_index_node(TDBB tdbb, REL relation, CSB csb, IDX * idx) * Make an index node and an index retrieval block. * **************************************/ - NOD node; + JRD_NOD node; IRB retrieval; DEV_BLKCHK(relation, type_rel); DEV_BLKCHK(csb, type_csb); @@ -4852,7 +4852,7 @@ static NOD make_index_node(TDBB tdbb, REL relation, CSB csb, IDX * idx) node->nod_type = nod_index; node->nod_count = 0; retrieval = FB_NEW_RPT(*tdbb->tdbb_default, idx->idx_count * 2) irb(); - node->nod_arg[e_idx_retrieval] = (NOD) retrieval; + node->nod_arg[e_idx_retrieval] = (JRD_NOD) retrieval; retrieval->irb_index = idx->idx_id; MOVE_FAST(idx, &retrieval->irb_desc, sizeof(retrieval->irb_desc)); if (csb) @@ -4861,7 +4861,7 @@ static NOD make_index_node(TDBB tdbb, REL relation, CSB csb, IDX * idx) } -static NOD make_inference_node(CSB csb, NOD boolean, NOD arg1, NOD arg2) +static JRD_NOD make_inference_node(CSB csb, JRD_NOD boolean, JRD_NOD arg1, JRD_NOD arg2) { /************************************** * @@ -4898,7 +4898,7 @@ static NOD make_inference_node(CSB csb, NOD boolean, NOD arg1, NOD arg2) * * **************************************/ - NOD node; + JRD_NOD node; USHORT n; TDBB tdbb; tdbb = GET_THREAD_DATA; @@ -4921,8 +4921,8 @@ static NOD make_inference_node(CSB csb, NOD boolean, NOD arg1, NOD arg2) } -static NOD make_inversion(TDBB tdbb, - register OPT opt, NOD boolean, USHORT stream) +static JRD_NOD make_inversion(TDBB tdbb, + register OPT opt, JRD_NOD boolean, USHORT stream) { /************************************** * @@ -4939,7 +4939,7 @@ static NOD make_inversion(TDBB tdbb, **************************************/ REL relation; IDX *idx; - NOD inversion, inversion2, node; + JRD_NOD inversion, inversion2, node; SSHORT i; csb_repeat *csb_tail; float selectivity; @@ -5061,9 +5061,9 @@ static NOD make_inversion(TDBB tdbb, } -static NOD make_missing(TDBB tdbb, +static JRD_NOD make_missing(TDBB tdbb, register OPT opt, - REL relation, NOD boolean, USHORT stream, IDX * idx) + REL relation, JRD_NOD boolean, USHORT stream, IDX * idx) { /************************************** * @@ -5078,7 +5078,7 @@ static NOD make_missing(TDBB tdbb, * character string fields, so they won't be used. * **************************************/ - NOD field, node, value; + JRD_NOD field, node, value; IRB retrieval; SET_TDBB(tdbb); DEV_BLKCHK(opt, type_opt); @@ -5106,9 +5106,9 @@ static NOD make_missing(TDBB tdbb, } -static NOD make_starts(TDBB tdbb, +static JRD_NOD make_starts(TDBB tdbb, register OPT opt, - REL relation, NOD boolean, USHORT stream, IDX * idx) + REL relation, JRD_NOD boolean, USHORT stream, IDX * idx) { /************************************** * @@ -5121,7 +5121,7 @@ static NOD make_starts(TDBB tdbb, * return a inversion type node. * **************************************/ - NOD value, field, node; + JRD_NOD value, field, node; IRB retrieval; SET_TDBB(tdbb); DEV_BLKCHK(opt, type_opt); @@ -5173,7 +5173,7 @@ static NOD make_starts(TDBB tdbb, } -static BOOLEAN map_equal(NOD field1, NOD field2, NOD map) +static BOOLEAN map_equal(JRD_NOD field1, JRD_NOD field2, JRD_NOD map) { /************************************** * @@ -5187,7 +5187,7 @@ static BOOLEAN map_equal(NOD field1, NOD field2, NOD map) * Order of the input fields is important. * **************************************/ - NOD *map_ptr, *map_end, map_from, map_to; + JRD_NOD *map_ptr, *map_end, map_from, map_to; DEV_BLKCHK(field1, type_nod); DEV_BLKCHK(field2, type_nod); DEV_BLKCHK(map, type_nod); @@ -5229,7 +5229,7 @@ static void mark_indices(csb_repeat * csb_tail, SSHORT relation_id) * in the user-specified access plan. * **************************************/ - NOD access_type, plan, *arg, *end; + JRD_NOD access_type, plan, *arg, *end; IDX *idx; USHORT i, plan_count = 0; if (!(plan = csb_tail->csb_plan)) @@ -5270,7 +5270,7 @@ static void mark_indices(csb_repeat * csb_tail, SSHORT relation_id) static SSHORT match_index(TDBB tdbb, register OPT opt, - SSHORT stream, register NOD boolean, IDX * idx) + SSHORT stream, register JRD_NOD boolean, IDX * idx) { /************************************** * @@ -5285,7 +5285,7 @@ static SSHORT match_index(TDBB tdbb, * were not reliable and will not be used. * **************************************/ - NOD match, value; + JRD_NOD match, value; SSHORT i, forward, count; Opt::opt_repeat * ptr; DEV_BLKCHK(opt, type_opt); @@ -5389,7 +5389,7 @@ static SSHORT match_index(TDBB tdbb, static BOOLEAN match_indices(TDBB tdbb, register OPT opt, - SSHORT stream, register NOD boolean, IDX * idx) + SSHORT stream, register JRD_NOD boolean, IDX * idx) { /************************************** * @@ -5465,7 +5465,7 @@ static USHORT nav_rsb_size(RSB rsb, USHORT key_length, USHORT size) } -static BOOLEAN node_equality(NOD node1, NOD node2) +static BOOLEAN node_equality(JRD_NOD node1, JRD_NOD node2) { /************************************** * @@ -5513,7 +5513,7 @@ static BOOLEAN node_equality(NOD node1, NOD node2) } -static NOD optimize_like(TDBB tdbb, NOD like_node) +static JRD_NOD optimize_like(TDBB tdbb, JRD_NOD like_node) { /************************************** * @@ -5533,7 +5533,7 @@ static NOD optimize_like(TDBB tdbb, NOD like_node) * still needed. * **************************************/ - NOD search_node, escape_node, node; + JRD_NOD search_node, escape_node, node; DSC *search_desc, *escape_desc; UCHAR *p, *end, *q, *p_start; SSHORT count; @@ -5657,7 +5657,7 @@ static void print_order(OPT opt, #endif -static USHORT river_count(USHORT count, NOD * class_) +static USHORT river_count(USHORT count, JRD_NOD * class_) { /************************************** * @@ -5687,7 +5687,7 @@ static USHORT river_count(USHORT count, NOD * class_) } -static BOOLEAN river_reference(RIV river, NOD node) +static BOOLEAN river_reference(RIV river, JRD_NOD node) { /************************************** * @@ -5713,7 +5713,7 @@ static BOOLEAN river_reference(RIV river, NOD node) } -static BOOLEAN search_stack(NOD node, LLS stack) +static BOOLEAN search_stack(JRD_NOD node, LLS stack) { /************************************** * @@ -5729,7 +5729,7 @@ static BOOLEAN search_stack(NOD node, LLS stack) DEV_BLKCHK(node, type_nod); DEV_BLKCHK(stack, type_lls); for (; stack; stack = stack->lls_next) - if (node_equality(node, (NOD) stack->lls_object)) + if (node_equality(node, (JRD_NOD) stack->lls_object)) return TRUE; return FALSE; } @@ -5758,7 +5758,7 @@ static void set_active(OPT opt, RIV river) } -static void set_direction(NOD from_clause, NOD to_clause) +static void set_direction(JRD_NOD from_clause, JRD_NOD to_clause) { /************************************** * @@ -5771,7 +5771,7 @@ static void set_direction(NOD from_clause, NOD to_clause) * clause to the same direction as another clause. * **************************************/ - NOD *from_ptr, *to_ptr, *end; + JRD_NOD *from_ptr, *to_ptr, *end; DEV_BLKCHK(from_clause, type_nod); DEV_BLKCHK(to_clause, type_nod); /* all three clauses are allocated with twice the number of arguments to @@ -5839,7 +5839,7 @@ static void set_made_river(OPT opt, RIV river) } -static void set_position(NOD from_clause, NOD to_clause, NOD map) +static void set_position(JRD_NOD from_clause, JRD_NOD to_clause, JRD_NOD map) { /************************************** * @@ -5853,9 +5853,9 @@ static void set_position(NOD from_clause, NOD to_clause, NOD map) * using a mapping between the streams. * **************************************/ - NOD *from_ptr, *to_ptr; - NOD *from_end, *to_end; - NOD *to_swap, swap; + JRD_NOD *from_ptr, *to_ptr; + JRD_NOD *from_end, *to_end; + JRD_NOD *to_swap, swap; DEV_BLKCHK(from_clause, type_nod); DEV_BLKCHK(to_clause, type_nod); DEV_BLKCHK(map, type_nod); @@ -5897,7 +5897,7 @@ static void set_rse_inactive(CSB csb, RSE rse) * Set all the streams involved in an rse as inactive. Do it recursively. * ***************************************************/ - NOD node, *ptr, *end; + JRD_NOD node, *ptr, *end; SSHORT stream; for (ptr = rse->rse_relation, end = ptr + rse->rse_count; ptr < end; ptr++) { diff --git a/src/jrd/par.cpp b/src/jrd/par.cpp index f3af5fd59b..92594827b4 100644 --- a/src/jrd/par.cpp +++ b/src/jrd/par.cpp @@ -34,7 +34,7 @@ * */ /* -$Id: par.cpp,v 1.20 2002-11-06 20:26:59 skidder Exp $ +$Id: par.cpp,v 1.21 2002-11-11 19:42:46 hippoman Exp $ */ #include "firebird.h" @@ -93,31 +93,31 @@ static CONST struct { static void error(CSB, ...); static SSHORT find_proc_field(PRC, TEXT *); -static NOD par_args(TDBB, CSB *, USHORT); -static NOD par_cast(TDBB, CSB *); +static JRD_NOD par_args(TDBB, CSB *, USHORT); +static JRD_NOD par_cast(TDBB, CSB *); static XCP par_condition(TDBB, CSB *); static XCP par_conditions(TDBB, CSB *); static SSHORT par_context(CSB *, SSHORT *); static void par_dependency(TDBB, CSB *, SSHORT, SSHORT, TEXT *); -static NOD par_exec_proc(TDBB, CSB *, SSHORT); -static NOD par_fetch(TDBB, CSB *, NOD); -static NOD par_field(TDBB, CSB *, SSHORT); -static NOD par_function(TDBB, CSB *); -static NOD par_literal(TDBB, register CSB *); -static NOD par_map(TDBB, CSB *, USHORT); -static NOD par_message(TDBB, CSB *); -static NOD par_modify(TDBB, CSB *); +static JRD_NOD par_exec_proc(TDBB, CSB *, SSHORT); +static JRD_NOD par_fetch(TDBB, CSB *, JRD_NOD); +static JRD_NOD par_field(TDBB, CSB *, SSHORT); +static JRD_NOD par_function(TDBB, CSB *); +static JRD_NOD par_literal(TDBB, register CSB *); +static JRD_NOD par_map(TDBB, CSB *, USHORT); +static JRD_NOD par_message(TDBB, CSB *); +static JRD_NOD par_modify(TDBB, CSB *); static USHORT par_name(CSB *, TEXT *); -static NOD par_plan(TDBB, CSB *); -static NOD par_procedure(TDBB, CSB *, SSHORT); -static void par_procedure_parms(TDBB, CSB *, PRC, NOD *, NOD *, USHORT); -static NOD par_relation(TDBB, CSB *, SSHORT, BOOLEAN); -static NOD par_rse(TDBB, CSB *, SSHORT); -static NOD par_sort(TDBB, CSB *, BOOLEAN); -static NOD par_stream(TDBB, CSB *); -static NOD par_union(TDBB, CSB *); +static JRD_NOD par_plan(TDBB, CSB *); +static JRD_NOD par_procedure(TDBB, CSB *, SSHORT); +static void par_procedure_parms(TDBB, CSB *, PRC, JRD_NOD *, JRD_NOD *, USHORT); +static JRD_NOD par_relation(TDBB, CSB *, SSHORT, BOOLEAN); +static JRD_NOD par_rse(TDBB, CSB *, SSHORT); +static JRD_NOD par_sort(TDBB, CSB *, BOOLEAN); +static JRD_NOD par_stream(TDBB, CSB *); +static JRD_NOD par_union(TDBB, CSB *); static USHORT par_word(CSB *); -static NOD parse(TDBB, register CSB *, USHORT); +static JRD_NOD parse(TDBB, register CSB *, USHORT); static void syntax_error(CSB, CONST TEXT *); static void warning(CSB, ...); @@ -127,7 +127,7 @@ static void warning(CSB, ...); #define BLR_WORD par_word (csb) -NOD PAR_blr(TDBB tdbb, +JRD_NOD PAR_blr(TDBB tdbb, REL relation, UCHAR* blr, CSB view_csb, @@ -148,7 +148,7 @@ NOD PAR_blr(TDBB tdbb, * **************************************/ CSB csb; - NOD node; + JRD_NOD node; SSHORT version, stream, count; csb_repeat *t1, *t2; @@ -358,7 +358,7 @@ int PAR_desc(CSB * csb, DSC * desc) } -NOD PAR_gen_field(TDBB tdbb, USHORT stream, USHORT id) +JRD_NOD PAR_gen_field(TDBB tdbb, USHORT stream, USHORT id) { /************************************** * @@ -370,20 +370,20 @@ NOD PAR_gen_field(TDBB tdbb, USHORT stream, USHORT id) * Generate a field block. * **************************************/ - NOD node; + JRD_NOD node; SET_TDBB(tdbb); node = FB_NEW_RPT(*tdbb->tdbb_default, e_fld_length) nod(); node->nod_type = nod_field; - node->nod_arg[e_fld_id] = (NOD) (SLONG) id; - node->nod_arg[e_fld_stream] = (NOD) (SLONG) stream; + node->nod_arg[e_fld_id] = (JRD_NOD) (SLONG) id; + node->nod_arg[e_fld_stream] = (JRD_NOD) (SLONG) stream; return node; } -NOD PAR_make_field(TDBB tdbb, CSB csb, USHORT context, TEXT * base_field) +JRD_NOD PAR_make_field(TDBB tdbb, CSB csb, USHORT context, TEXT * base_field) { /************************************** * @@ -401,7 +401,7 @@ NOD PAR_make_field(TDBB tdbb, CSB csb, USHORT context, TEXT * base_field) TEXT name[32]; FLD field; REL temp_rel; - NOD temp_node; + JRD_NOD temp_node; SET_TDBB(tdbb); @@ -458,7 +458,7 @@ NOD PAR_make_field(TDBB tdbb, CSB csb, USHORT context, TEXT * base_field) } -NOD PAR_make_list(TDBB tdbb, LLS stack) +JRD_NOD PAR_make_list(TDBB tdbb, LLS stack) { /************************************** * @@ -470,7 +470,7 @@ NOD PAR_make_list(TDBB tdbb, LLS stack) * Make a list node out of a stack. * **************************************/ - NOD node, *ptr; + JRD_NOD node, *ptr; LLS temp; USHORT count; @@ -486,13 +486,13 @@ NOD PAR_make_list(TDBB tdbb, LLS stack) ptr = node->nod_arg + count; while (stack) - *--ptr = (NOD) LLS_POP(&stack); + *--ptr = (JRD_NOD) LLS_POP(&stack); return node; } -NOD PAR_make_node(TDBB tdbb, int size) +JRD_NOD PAR_make_node(TDBB tdbb, int size) { /************************************** * @@ -504,7 +504,7 @@ NOD PAR_make_node(TDBB tdbb, int size) * Make a node element and pass it back. * **************************************/ - NOD node; + JRD_NOD node; SET_TDBB(tdbb); @@ -527,7 +527,7 @@ CSB PAR_parse(TDBB tdbb, UCHAR* blr, USHORT internal_flag) * Parse blr, returning a compiler scratch block with the results. * **************************************/ - NOD node; + JRD_NOD node; CSB csb; SSHORT version; @@ -703,7 +703,7 @@ static SSHORT find_proc_field(PRC procedure, TEXT * name) } -static NOD par_args(TDBB tdbb, CSB * csb, USHORT expected) +static JRD_NOD par_args(TDBB tdbb, CSB * csb, USHORT expected) { /************************************** * @@ -715,7 +715,7 @@ static NOD par_args(TDBB tdbb, CSB * csb, USHORT expected) * Parse a counted argument list. * **************************************/ - NOD node, *ptr; + JRD_NOD node, *ptr; USHORT count; SET_TDBB(tdbb); @@ -735,7 +735,7 @@ static NOD par_args(TDBB tdbb, CSB * csb, USHORT expected) } -static NOD par_cast(TDBB tdbb, CSB * csb) +static JRD_NOD par_cast(TDBB tdbb, CSB * csb) { /************************************** * @@ -747,7 +747,7 @@ static NOD par_cast(TDBB tdbb, CSB * csb) * Parse a datatype cast * **************************************/ - NOD node; + JRD_NOD node; FMT format; DSC *desc; @@ -758,7 +758,7 @@ static NOD par_cast(TDBB tdbb, CSB * csb) format = fmt::newFmt(*tdbb->tdbb_default, 1); format->fmt_count = 1; - node->nod_arg[e_cast_fmt] = (NOD) format; + node->nod_arg[e_cast_fmt] = (JRD_NOD) format; desc = &format->fmt_desc[0]; PAR_desc(csb, desc); @@ -783,7 +783,7 @@ static XCP par_condition(TDBB tdbb, CSB * csb) * **************************************/ XCP exception_list; - NOD dep_node; + JRD_NOD dep_node; USHORT code_type; TEXT name[32], *p; SLONG code_number; @@ -832,8 +832,8 @@ static XCP par_condition(TDBB tdbb, CSB * csb) dep_node = PAR_make_node(tdbb, e_dep_length); dep_node->nod_type = nod_dependency; dep_node->nod_arg[e_dep_object] = - (NOD) exception_list->xcp_rpt[0].xcp_code; - dep_node->nod_arg[e_dep_object_type] = (NOD) obj_exception; + (JRD_NOD) exception_list->xcp_rpt[0].xcp_code; + dep_node->nod_arg[e_dep_object_type] = (JRD_NOD) obj_exception; LLS_PUSH(dep_node, &(*csb)->csb_dependencies); break; @@ -861,7 +861,7 @@ static XCP par_conditions(TDBB tdbb, CSB * csb) * **************************************/ XCP exception_list; - NOD dep_node; + JRD_NOD dep_node; USHORT n, i, code_type; TEXT name[32], *p; SLONG code_number; @@ -904,8 +904,8 @@ static XCP par_conditions(TDBB tdbb, CSB * csb) dep_node = PAR_make_node(tdbb, e_dep_length); dep_node->nod_type = nod_dependency; dep_node->nod_arg[e_dep_object] = - (NOD) exception_list->xcp_rpt[0].xcp_code; - dep_node->nod_arg[e_dep_object_type] = (NOD) obj_exception; + (JRD_NOD) exception_list->xcp_rpt[0].xcp_code; + dep_node->nod_arg[e_dep_object_type] = (JRD_NOD) obj_exception; LLS_PUSH(dep_node, &(*csb)->csb_dependencies); break; @@ -975,7 +975,7 @@ static void par_dependency( * as a dependency. * **************************************/ - NOD node, field_node; + JRD_NOD node, field_node; STR string; int length; @@ -985,13 +985,13 @@ static void par_dependency( node->nod_type = nod_dependency; if ((*csb)->csb_rpt[stream].csb_relation) { node->nod_arg[e_dep_object] = - (NOD) (*csb)->csb_rpt[stream].csb_relation; - node->nod_arg[e_dep_object_type] = (NOD) obj_relation; + (JRD_NOD) (*csb)->csb_rpt[stream].csb_relation; + node->nod_arg[e_dep_object_type] = (JRD_NOD) obj_relation; } else if ((*csb)->csb_rpt[stream].csb_procedure) { node->nod_arg[e_dep_object] = - (NOD) (*csb)->csb_rpt[stream].csb_procedure; - node->nod_arg[e_dep_object_type] = (NOD) obj_procedure; + (JRD_NOD) (*csb)->csb_rpt[stream].csb_procedure; + node->nod_arg[e_dep_object_type] = (JRD_NOD) obj_procedure; } if (field_name) { @@ -1001,19 +1001,19 @@ static void par_dependency( string = FB_NEW_RPT(*tdbb->tdbb_default, length) str(); string->str_length = length; strcpy(reinterpret_cast < char *>(string->str_data), field_name); - field_node->nod_arg[0] = (NOD) string->str_data; + field_node->nod_arg[0] = (JRD_NOD) string->str_data; } else if (id >= 0) { node->nod_arg[e_dep_field] = field_node = PAR_make_node(tdbb, 1); field_node->nod_type = nod_field; - field_node->nod_arg[0] = (NOD) (SLONG) id; + field_node->nod_arg[0] = (JRD_NOD) (SLONG) id; } LLS_PUSH(node, &(*csb)->csb_dependencies); } -static NOD par_exec_proc(TDBB tdbb, CSB * csb, SSHORT operator_) +static JRD_NOD par_exec_proc(TDBB tdbb, CSB * csb, SSHORT operator_) { /************************************** * @@ -1025,7 +1025,7 @@ static NOD par_exec_proc(TDBB tdbb, CSB * csb, SSHORT operator_) * Parse an execute procedure reference. * **************************************/ - NOD node, dep_node; + JRD_NOD node, dep_node; PRC procedure; SET_TDBB(tdbb); @@ -1051,7 +1051,7 @@ static NOD par_exec_proc(TDBB tdbb, CSB * csb, SSHORT operator_) node = PAR_make_node(tdbb, e_esp_length); node->nod_type = nod_exec_proc; node->nod_count = count_table[blr_exec_proc]; - node->nod_arg[e_esp_procedure] = (NOD) procedure; + node->nod_arg[e_esp_procedure] = (JRD_NOD) procedure; par_procedure_parms(tdbb, csb, procedure, &node->nod_arg[e_esp_in_msg], &node->nod_arg[e_esp_inputs], TRUE); @@ -1060,8 +1060,8 @@ static NOD par_exec_proc(TDBB tdbb, CSB * csb, SSHORT operator_) dep_node = PAR_make_node(tdbb, e_dep_length); dep_node->nod_type = nod_dependency; - dep_node->nod_arg[e_dep_object] = (NOD) procedure; - dep_node->nod_arg[e_dep_object_type] = (NOD) obj_procedure; + dep_node->nod_arg[e_dep_object] = (JRD_NOD) procedure; + dep_node->nod_arg[e_dep_object_type] = (JRD_NOD) obj_procedure; LLS_PUSH(dep_node, &(*csb)->csb_dependencies); @@ -1069,7 +1069,7 @@ static NOD par_exec_proc(TDBB tdbb, CSB * csb, SSHORT operator_) } -static NOD par_fetch(TDBB tdbb, CSB * csb, NOD for_node) +static JRD_NOD par_fetch(TDBB tdbb, CSB * csb, JRD_NOD for_node) { /************************************** * @@ -1084,7 +1084,7 @@ static NOD par_fetch(TDBB tdbb, CSB * csb, NOD for_node) * **************************************/ RSE rse; - NOD relation, node; + JRD_NOD relation, node; SET_TDBB(tdbb); @@ -1118,7 +1118,7 @@ static NOD par_fetch(TDBB tdbb, CSB * csb, NOD for_node) } -static NOD par_field(TDBB tdbb, CSB * csb, SSHORT operator_) +static JRD_NOD par_field(TDBB tdbb, CSB * csb, SSHORT operator_) { /************************************** * @@ -1133,7 +1133,7 @@ static NOD par_field(TDBB tdbb, CSB * csb, SSHORT operator_) REL relation; PRC procedure; TEXT name[32]; - NOD node; + JRD_NOD node; SSHORT stream, id, context, flags; csb_repeat *tail; PRC scan_proc; @@ -1239,7 +1239,7 @@ static NOD par_field(TDBB tdbb, CSB * csb, SSHORT operator_) } -static NOD par_function(TDBB tdbb, CSB * csb) +static JRD_NOD par_function(TDBB tdbb, CSB * csb) { /************************************** * @@ -1251,7 +1251,7 @@ static NOD par_function(TDBB tdbb, CSB * csb) * Parse a function reference. * **************************************/ - NOD node; + JRD_NOD node; FUN function, homonyms; TEXT name[32]; USHORT count; @@ -1267,7 +1267,7 @@ static NOD par_function(TDBB tdbb, CSB * csb) if (tdbb->tdbb_flags & TDBB_prc_being_dropped) { node = PAR_make_node(tdbb, e_fun_length); node->nod_count = 1; - node->nod_arg[e_fun_function] = (NOD) NULL; + node->nod_arg[e_fun_function] = (JRD_NOD) NULL; node->nod_arg[e_fun_args] = par_args(tdbb, csb, VALUE); return node; } @@ -1297,15 +1297,15 @@ static NOD par_function(TDBB tdbb, CSB * csb) node = PAR_make_node(tdbb, e_fun_length); node->nod_count = 1; - node->nod_arg[e_fun_function] = (NOD) function; + node->nod_arg[e_fun_function] = (JRD_NOD) function; node->nod_arg[e_fun_args] = par_args(tdbb, csb, VALUE); /* CVC: I will track ufds only if a proc is not being dropped. */ if ((*csb)->csb_g_flags & csb_get_dependencies) { - NOD dep_node = PAR_make_node (tdbb, e_dep_length); + JRD_NOD dep_node = PAR_make_node (tdbb, e_dep_length); dep_node->nod_type = nod_dependency; - dep_node->nod_arg [e_dep_object] = (NOD) function; - dep_node->nod_arg [e_dep_object_type] = (NOD) obj_udf; + dep_node->nod_arg [e_dep_object] = (JRD_NOD) function; + dep_node->nod_arg [e_dep_object_type] = (JRD_NOD) obj_udf; LLS_PUSH (dep_node, &(*csb)->csb_dependencies); } @@ -1313,7 +1313,7 @@ static NOD par_function(TDBB tdbb, CSB * csb) } -static NOD par_literal(TDBB tdbb, register CSB * csb) +static JRD_NOD par_literal(TDBB tdbb, register CSB * csb) { /************************************** * @@ -1326,7 +1326,7 @@ static NOD par_literal(TDBB tdbb, register CSB * csb) * **************************************/ register LIT literal; - NOD node; + JRD_NOD node; DSC desc; UCHAR *p, *q; SSHORT count, l, scale; @@ -1410,7 +1410,7 @@ static NOD par_literal(TDBB tdbb, register CSB * csb) } -static NOD par_map(TDBB tdbb, CSB * csb, USHORT stream) +static JRD_NOD par_map(TDBB tdbb, CSB * csb, USHORT stream) { /************************************** * @@ -1422,7 +1422,7 @@ static NOD par_map(TDBB tdbb, CSB * csb, USHORT stream) * Parse a MAP clause for a union or global aggregate expression. * **************************************/ - NOD assignment, node; + JRD_NOD assignment, node; SSHORT count; LLS map; @@ -1452,7 +1452,7 @@ static NOD par_map(TDBB tdbb, CSB * csb, USHORT stream) } -static NOD par_message(TDBB tdbb, CSB * csb) +static JRD_NOD par_message(TDBB tdbb, CSB * csb) { /************************************** * @@ -1464,7 +1464,7 @@ static NOD par_message(TDBB tdbb, CSB * csb) * Parse a message declaration, including operator byte. * **************************************/ - NOD node; + JRD_NOD node; FMT format; fmt::fmt_desc_iterator desc, end; USHORT n, alignment; @@ -1480,7 +1480,7 @@ static NOD par_message(TDBB tdbb, CSB * csb) tail = CMP_csb_element(csb, n); tail->csb_message = node = PAR_make_node(tdbb, e_msg_length); node->nod_count = 0; - node->nod_arg[e_msg_number] = (NOD) (SLONG) n; + node->nod_arg[e_msg_number] = (JRD_NOD) (SLONG) n; if (n > (*csb)->csb_msg_number) (*csb)->csb_msg_number = n; @@ -1489,7 +1489,7 @@ static NOD par_message(TDBB tdbb, CSB * csb) n = BLR_WORD; format = fmt::newFmt(*tdbb->tdbb_default, n); - node->nod_arg[e_msg_format] = (NOD) format; + node->nod_arg[e_msg_format] = (JRD_NOD) format; format->fmt_count = n; offset = 0; @@ -1510,7 +1510,7 @@ static NOD par_message(TDBB tdbb, CSB * csb) } -static NOD par_modify(TDBB tdbb, CSB * csb) +static JRD_NOD par_modify(TDBB tdbb, CSB * csb) { /************************************** * @@ -1522,7 +1522,7 @@ static NOD par_modify(TDBB tdbb, CSB * csb) * Parse a modify statement. * **************************************/ - NOD node; + JRD_NOD node; SSHORT context, new_stream, org_stream; csb_repeat *tail; @@ -1550,8 +1550,8 @@ static NOD par_modify(TDBB tdbb, CSB * csb) node = PAR_make_node(tdbb, e_mod_length); node->nod_count = 1; - node->nod_arg[e_mod_org_stream] = (NOD) (SLONG) org_stream; - node->nod_arg[e_mod_new_stream] = (NOD) (SLONG) new_stream; + node->nod_arg[e_mod_org_stream] = (JRD_NOD) (SLONG) org_stream; + node->nod_arg[e_mod_new_stream] = (JRD_NOD) (SLONG) new_stream; node->nod_arg[e_mod_statement] = parse(tdbb, csb, STATEMENT); return node; @@ -1583,7 +1583,7 @@ static USHORT par_name(CSB * csb, TEXT * string) } -static NOD par_plan(TDBB tdbb, CSB * csb) +static JRD_NOD par_plan(TDBB tdbb, CSB * csb) { /************************************** * @@ -1598,7 +1598,7 @@ static NOD par_plan(TDBB tdbb, CSB * csb) * and indices. * **************************************/ - NOD plan, access_type, relation_node, *arg; + JRD_NOD plan, access_type, relation_node, *arg; USHORT node_type, count; SET_TDBB(tdbb); @@ -1650,8 +1650,8 @@ static NOD par_plan(TDBB tdbb, CSB * csb) error(*csb, gds_ctxnotdef, 0); stream = (*csb)->csb_rpt[n].csb_stream; - relation_node->nod_arg[e_rel_stream] = (NOD) (SLONG) stream; - relation_node->nod_arg[e_rel_context] = (NOD) (SLONG) n; + relation_node->nod_arg[e_rel_stream] = (JRD_NOD) (SLONG) stream; + relation_node->nod_arg[e_rel_context] = (JRD_NOD) (SLONG) n; /* Access plan types (sequential is default) */ @@ -1688,9 +1688,9 @@ static NOD par_plan(TDBB tdbb, CSB * csb) the relation could be a base relation of a view; save the index name also, for convenience */ - access_type->nod_arg[0] = (NOD) relation_id; - access_type->nod_arg[1] = (NOD) index_id; - access_type->nod_arg[2] = (NOD) ALL_cstring(name); + access_type->nod_arg[0] = (JRD_NOD) relation_id; + access_type->nod_arg[1] = (JRD_NOD) index_id; + access_type->nod_arg[2] = (JRD_NOD) ALL_cstring(name); } else if (node_type == blr_indices) { SSHORT idx_status; @@ -1729,9 +1729,9 @@ static NOD par_plan(TDBB tdbb, CSB * csb) the relation could be a base relation of a view; save the index name also, for convenience */ - *arg++ = (NOD) relation_id; - *arg++ = (NOD) index_id; - *arg++ = (NOD) ALL_cstring(name); + *arg++ = (JRD_NOD) relation_id; + *arg++ = (JRD_NOD) index_id; + *arg++ = (JRD_NOD) ALL_cstring(name); } } else if (node_type != blr_sequential) @@ -1741,11 +1741,11 @@ static NOD par_plan(TDBB tdbb, CSB * csb) } syntax_error(*csb, "plan item"); - return ((NOD) 0); /* Added to remove compiler warning */ + return ((JRD_NOD) 0); /* Added to remove compiler warning */ } -static NOD par_procedure(TDBB tdbb, CSB * csb, SSHORT operator_) +static JRD_NOD par_procedure(TDBB tdbb, CSB * csb, SSHORT operator_) { /************************************** * @@ -1757,7 +1757,7 @@ static NOD par_procedure(TDBB tdbb, CSB * csb, SSHORT operator_) * Parse an procedural view reference. * **************************************/ - NOD node; + JRD_NOD node; PRC procedure; USHORT stream; @@ -1783,10 +1783,10 @@ static NOD par_procedure(TDBB tdbb, CSB * csb, SSHORT operator_) node = PAR_make_node(tdbb, e_prc_length); node->nod_type = nod_procedure; node->nod_count = count_table[blr_procedure]; - node->nod_arg[e_prc_procedure] = (NOD) procedure; + node->nod_arg[e_prc_procedure] = (JRD_NOD) procedure; stream = par_context(csb, 0); - node->nod_arg[e_prc_stream] = (NOD) (SLONG) stream; + node->nod_arg[e_prc_stream] = (JRD_NOD) (SLONG) stream; (*csb)->csb_rpt[stream].csb_procedure = procedure; par_procedure_parms(tdbb, csb, procedure, &node->nod_arg[e_prc_in_msg], @@ -1803,8 +1803,8 @@ static void par_procedure_parms( TDBB tdbb, CSB * csb, PRC procedure, - NOD * message_ptr, - NOD * parameter_ptr, USHORT input_flag) + JRD_NOD * message_ptr, + JRD_NOD * parameter_ptr, USHORT input_flag) { /************************************** * @@ -1816,7 +1816,7 @@ static void par_procedure_parms( * Parse some procedure parameters. * **************************************/ - NOD message, list, *ptr, asgn, prm, prm_f; + JRD_NOD message, list, *ptr, asgn, prm, prm_f; FMT format; USHORT count, n, i, asgn_arg1, asgn_arg2; csb_repeat *tail; @@ -1850,10 +1850,10 @@ static void par_procedure_parms( message->nod_count = count_table[blr_message]; *message_ptr = message; message->nod_count = 0; - message->nod_arg[e_msg_number] = (NOD) (SLONG) n; + message->nod_arg[e_msg_number] = (JRD_NOD) (SLONG) n; format = input_flag ? procedure->prc_input_fmt : procedure->prc_output_fmt; - message->nod_arg[e_msg_format] = (NOD) format; + message->nod_arg[e_msg_format] = (JRD_NOD) format; if (!mismatch) n = format->fmt_count / 2; else @@ -1884,13 +1884,13 @@ static void par_procedure_parms( prm->nod_type = nod_argument; prm->nod_count = 1; prm->nod_arg[e_arg_message] = message; - prm->nod_arg[e_arg_number] = (NOD) i++; + prm->nod_arg[e_arg_number] = (JRD_NOD) i++; prm_f = prm->nod_arg[e_arg_flag] = PAR_make_node(tdbb, e_arg_length); prm_f->nod_type = nod_argument; prm_f->nod_count = 0; prm_f->nod_arg[e_arg_message] = message; - prm_f->nod_arg[e_arg_number] = (NOD) i++; + prm_f->nod_arg[e_arg_number] = (JRD_NOD) i++; } } else if ((input_flag ? procedure->prc_inputs : procedure->prc_outputs) && @@ -1903,7 +1903,7 @@ static void par_procedure_parms( } -static NOD par_relation( +static JRD_NOD par_relation( TDBB tdbb, CSB * csb, SSHORT operator_, BOOLEAN parse_context) { @@ -1917,7 +1917,7 @@ static NOD par_relation( * Parse a relation reference. * **************************************/ - NOD node; + JRD_NOD node; REL relation; TEXT name[32]; STR alias_string = NULL; @@ -1960,7 +1960,7 @@ static NOD par_relation( /* if an alias was passed, store with the relation */ if (alias_string) - node->nod_arg[e_rel_alias] = (NOD) alias_string; + node->nod_arg[e_rel_alias] = (JRD_NOD) alias_string; /* Scan the relation if it hasn't already been scanned for meta data */ @@ -1981,8 +1981,8 @@ static NOD par_relation( if (parse_context) { stream = par_context(csb, &context); - node->nod_arg[e_rel_stream] = (NOD) (SLONG) stream; - node->nod_arg[e_rel_context] = (NOD) (SLONG) context; + node->nod_arg[e_rel_stream] = (JRD_NOD) (SLONG) stream; + node->nod_arg[e_rel_context] = (JRD_NOD) (SLONG) context; (*csb)->csb_rpt[stream].csb_relation = relation; (*csb)->csb_rpt[stream].csb_alias = alias_string; @@ -1991,13 +1991,13 @@ static NOD par_relation( par_dependency(tdbb, csb, stream, (SSHORT) - 1, 0); } - node->nod_arg[e_rel_relation] = (NOD) relation; + node->nod_arg[e_rel_relation] = (JRD_NOD) relation; return node; } -static NOD par_rse(TDBB tdbb, CSB * csb, SSHORT rse_op) +static JRD_NOD par_rse(TDBB tdbb, CSB * csb, SSHORT rse_op) { /************************************** * @@ -2010,7 +2010,7 @@ static NOD par_rse(TDBB tdbb, CSB * csb, SSHORT rse_op) * **************************************/ register RSE rse; - NOD *ptr; + JRD_NOD *ptr; register SSHORT count; USHORT jointype; UCHAR op; @@ -2087,7 +2087,7 @@ static NOD par_rse(TDBB tdbb, CSB * csb, SSHORT rse_op) if (!rse->rse_jointype || (rse->rse_count == 2 && rse->rse_boolean)) - return (NOD) rse; + return (JRD_NOD) rse; } syntax_error(*csb, (TEXT*)((rse_op == blr_rs_stream) ? "rse stream clause" : @@ -2096,7 +2096,7 @@ static NOD par_rse(TDBB tdbb, CSB * csb, SSHORT rse_op) } -static NOD par_sort(TDBB tdbb, CSB * csb, BOOLEAN flag) +static JRD_NOD par_sort(TDBB tdbb, CSB * csb, BOOLEAN flag) { /************************************** * @@ -2109,7 +2109,7 @@ static NOD par_sort(TDBB tdbb, CSB * csb, BOOLEAN flag) * BLR_SORT, BLR_PROJECT, and BLR_GROUP. * **************************************/ - NOD clause, *ptr, *ptr2, *ptr3; + JRD_NOD clause, *ptr, *ptr2, *ptr3; SSHORT count; SET_TDBB(tdbb); @@ -2126,13 +2126,13 @@ static NOD par_sort(TDBB tdbb, CSB * csb, BOOLEAN flag) if (flag) { UCHAR code = BLR_BYTE; if (code == blr_nullsfirst) { - *ptr3++ = (NOD) (SLONG) TRUE; + *ptr3++ = (JRD_NOD) (SLONG) TRUE; code = BLR_BYTE; } else - *ptr3++ = (NOD) (SLONG) FALSE; + *ptr3++ = (JRD_NOD) (SLONG) FALSE; *ptr2++ = - (NOD) (SLONG) ((code == blr_descending) ? TRUE : FALSE); + (JRD_NOD) (SLONG) ((code == blr_descending) ? TRUE : FALSE); } *ptr++ = parse(tdbb, csb, VALUE); } @@ -2141,7 +2141,7 @@ static NOD par_sort(TDBB tdbb, CSB * csb, BOOLEAN flag) } -static NOD par_stream(TDBB tdbb, CSB * csb) +static JRD_NOD par_stream(TDBB tdbb, CSB * csb) { /************************************** * @@ -2171,13 +2171,13 @@ static NOD par_stream(TDBB tdbb, CSB * csb) default: if (op == (UCHAR) blr_end) - return (NOD) rse; + return (JRD_NOD) rse; syntax_error(*csb, "stream_clause"); } } -static NOD par_union(TDBB tdbb, CSB * csb) +static JRD_NOD par_union(TDBB tdbb, CSB * csb) { /************************************** * @@ -2189,7 +2189,7 @@ static NOD par_union(TDBB tdbb, CSB * csb) * Parse a union reference. * **************************************/ - NOD node; + JRD_NOD node; SSHORT count; USHORT stream; LLS clauses; @@ -2202,7 +2202,7 @@ static NOD par_union(TDBB tdbb, CSB * csb) node = PAR_make_node(tdbb, e_uni_length); node->nod_count = 2; stream = par_context(csb, 0); - node->nod_arg[e_uni_stream] = (NOD) (SLONG) stream; + node->nod_arg[e_uni_stream] = (JRD_NOD) (SLONG) stream; count = (unsigned int) BLR_BYTE; /* Pick up the sub-rse's and maps */ @@ -2241,7 +2241,7 @@ static USHORT par_word(CSB * csb) } -static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) +static JRD_NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) { /************************************** * @@ -2253,7 +2253,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) * Parse a BLR expression. * **************************************/ - register NOD node, *arg; + register JRD_NOD node, *arg; SSHORT sub_type, operator_; USHORT n; TEXT name[32]; @@ -2370,7 +2370,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) case blr_user_savepoint: case blr_undo_savepoint: par_name(csb, name); - *arg++ = (NOD)ALL_cstring(name); + *arg++ = (JRD_NOD)ALL_cstring(name); break; case blr_store: @@ -2402,7 +2402,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) if (n >= (*csb)->csb_count) error(*csb, gds_ctxnotdef, 0); node->nod_arg[e_erase_stream] = - (NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; + (JRD_NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; break; case blr_writelock: @@ -2410,7 +2410,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) if (n >= (*csb)->csb_count) error(*csb, gds_ctxnotdef, 0); node->nod_arg[e_writelock_stream] = - (NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; + (JRD_NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; break; case blr_modify: @@ -2471,7 +2471,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) break; case blr_aggregate: - node->nod_arg[e_agg_stream] = (NOD) (SLONG) par_context(csb, 0); + node->nod_arg[e_agg_stream] = (JRD_NOD) (SLONG) par_context(csb, 0); node->nod_arg[e_agg_rse] = parse(tdbb, csb, TYPE_RSE); node->nod_arg[e_agg_group] = parse(tdbb, csb, OTHER); node->nod_arg[e_agg_map] = @@ -2500,7 +2500,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) if (tmp < 0) error(*csb, gds_gennotdef, gds_arg_string, ERR_cstring(name), 0); - node->nod_arg[e_gen_relation] = (NOD) tmp; + node->nod_arg[e_gen_relation] = (JRD_NOD) tmp; node->nod_arg[e_gen_value] = parse(tdbb, csb, VALUE); /* CVC: There're thousand ways to go wrong, but I don't see any value @@ -2508,10 +2508,10 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) track only gen_id() in both dialects. */ if ((operator_ == blr_gen_id || operator_ == blr_gen_id2) && ((*csb)->csb_g_flags & csb_get_dependencies)) { - NOD dep_node = PAR_make_node (tdbb, e_dep_length); + JRD_NOD dep_node = PAR_make_node (tdbb, e_dep_length); dep_node->nod_type = nod_dependency; - dep_node->nod_arg [e_dep_object] = (NOD) tmp; - dep_node->nod_arg [e_dep_object_type] = (NOD) obj_generator; + dep_node->nod_arg [e_dep_object] = (JRD_NOD) tmp; + dep_node->nod_arg [e_dep_object_type] = (JRD_NOD) obj_generator; LLS_PUSH (dep_node, &(*csb)->csb_dependencies); } @@ -2523,7 +2523,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) n = BLR_BYTE; if (n >= (*csb)->csb_count) error(*csb, gds_ctxnotdef, 0); - node->nod_arg[0] = (NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; + node->nod_arg[0] = (JRD_NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; break; case blr_fetch: @@ -2560,7 +2560,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) VEC vector; n = BLR_WORD; - node->nod_arg[e_dcl_id] = (NOD) (SLONG) n; + node->nod_arg[e_dcl_id] = (JRD_NOD) (SLONG) n; PAR_desc(csb, (DSC *) (node->nod_arg + e_dcl_desc)); vector = (*csb)->csb_variables; if (!vector) @@ -2581,11 +2581,11 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) VEC vector; n = BLR_WORD; - node->nod_arg[e_var_id] = (NOD) (SLONG) n; + node->nod_arg[e_var_id] = (JRD_NOD) (SLONG) n; if (!(vector = (*csb)->csb_variables) || n >= vector->count() || !(node->nod_arg[e_var_variable] = - (NOD) (*vector)[n])) syntax_error(*csb, + (JRD_NOD) (*vector)[n])) syntax_error(*csb, "variable identifier"); } break; @@ -2594,7 +2594,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) case blr_parameter2: case blr_parameter3: { - NOD message, temp; + JRD_NOD message, temp; FMT format; n = (USHORT) BLR_BYTE; @@ -2603,7 +2603,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) error(*csb, gds_badmsgnum, 0); node->nod_arg[e_arg_message] = message; n = BLR_WORD; - node->nod_arg[e_arg_number] = (NOD) (SLONG) n; + node->nod_arg[e_arg_number] = (JRD_NOD) (SLONG) n; format = (FMT) message->nod_arg[e_msg_format]; if (n >= format->fmt_count) error(*csb, gds_badparnum, 0); @@ -2615,7 +2615,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) temp->nod_type = nod_argument; temp->nod_arg[e_arg_message] = message; n = BLR_WORD; - temp->nod_arg[e_arg_number] = (NOD) (SLONG) n; + temp->nod_arg[e_arg_number] = (JRD_NOD) (SLONG) n; if (n >= format->fmt_count) error(*csb, gds_badparnum, 0); } @@ -2627,7 +2627,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) temp->nod_type = nod_argument; temp->nod_arg[e_arg_message] = message; n = BLR_WORD; - temp->nod_arg[e_arg_number] = (NOD) (SLONG) n; + temp->nod_arg[e_arg_number] = (JRD_NOD) (SLONG) n; if (n >= format->fmt_count) error(*csb, gds_badparnum, 0); } @@ -2665,14 +2665,14 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) break; case blr_error_handler: - node->nod_arg[e_err_conditions] = (NOD) par_conditions(tdbb, csb); + node->nod_arg[e_err_conditions] = (JRD_NOD) par_conditions(tdbb, csb); node->nod_arg[e_err_action] = parse(tdbb, csb, sub_type); break; case blr_abort: { bool flag = (BLR_PEEK == blr_exception_msg); - node->nod_arg[0] = (NOD) par_condition(tdbb, csb); + node->nod_arg[0] = (JRD_NOD) par_condition(tdbb, csb); if (flag) { node->nod_arg[1] = parse(tdbb, csb, sub_type); @@ -2692,12 +2692,12 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) break; case blr_label: - node->nod_arg[e_lbl_label] = (NOD) (SLONG) BLR_BYTE; + node->nod_arg[e_lbl_label] = (JRD_NOD) (SLONG) BLR_BYTE; node->nod_arg[e_lbl_statement] = parse(tdbb, csb, sub_type); break; case blr_leave: - node->nod_arg[0] = (NOD) (SLONG) BLR_BYTE; + node->nod_arg[0] = (JRD_NOD) (SLONG) BLR_BYTE; break; @@ -2737,7 +2737,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) if (n >= (*csb)->csb_count) error(*csb, gds_ctxnotdef, 0); node->nod_arg[e_index_stream] = - (NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; + (JRD_NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; node->nod_arg[e_index_index] = parse(tdbb, csb, VALUE); break; @@ -2746,7 +2746,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) if (n >= (*csb)->csb_count) error(*csb, gds_ctxnotdef, 0); node->nod_arg[e_find_stream] = - (NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; + (JRD_NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; node->nod_arg[e_find_operator] = parse(tdbb, csb, VALUE); node->nod_arg[e_find_direction] = parse(tdbb, csb, VALUE); node->nod_arg[e_find_args] = par_args(tdbb, csb, VALUE); @@ -2758,7 +2758,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) if (n >= (*csb)->csb_count) error(*csb, gds_ctxnotdef, 0); node->nod_arg[e_find_dbkey_stream] = - (NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; + (JRD_NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; node->nod_arg[e_find_dbkey_dbkey] = parse(tdbb, csb, VALUE); if (operator_ == blr_find_dbkey_version) @@ -2770,7 +2770,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) if (n >= (*csb)->csb_count) error(*csb, gds_ctxnotdef, 0); node->nod_arg[e_getmark_stream] = - (NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; + (JRD_NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; break; case blr_set_bookmark: @@ -2778,7 +2778,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) if (n >= (*csb)->csb_count) error(*csb, gds_ctxnotdef, 0); node->nod_arg[e_setmark_stream] = - (NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; + (JRD_NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; node->nod_arg[e_setmark_id] = parse(tdbb, csb, VALUE); break; @@ -2795,7 +2795,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) n = BLR_BYTE; if (n >= (*csb)->csb_count) error(*csb, gds_ctxnotdef, 0); - node->nod_arg[0] = (NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; + node->nod_arg[0] = (JRD_NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; break; case blr_reset_stream: @@ -2803,13 +2803,13 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) if (n >= (*csb)->csb_count) error(*csb, gds_ctxnotdef, 0); node->nod_arg[e_reset_from_stream] = - (NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; + (JRD_NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; n = BLR_BYTE; if (n >= (*csb)->csb_count) error(*csb, gds_ctxnotdef, 0); node->nod_arg[e_reset_to_stream] = - (NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; + (JRD_NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; break; case blr_release_lock: @@ -2830,7 +2830,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) if (n >= (*csb)->csb_count) error(*csb, gds_ctxnotdef, 0); node->nod_arg[e_lockrec_stream] = - (NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; + (JRD_NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; node->nod_arg[e_lockrec_level] = parse(tdbb, csb, VALUE); break; @@ -2867,7 +2867,7 @@ static NOD parse(TDBB tdbb, register CSB * csb, USHORT expected) if (n >= (*csb)->csb_count) error(*csb, gds_ctxnotdef, 0); node->nod_arg[e_card_stream] = - (NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; + (JRD_NOD) (SLONG) (*csb)->csb_rpt[n].csb_stream; break; #endif diff --git a/src/jrd/rng.cpp b/src/jrd/rng.cpp index 56dc3e51b4..6c6fdef6a1 100644 --- a/src/jrd/rng.cpp +++ b/src/jrd/rng.cpp @@ -206,7 +206,7 @@ void RNG_add_record(RPB * rpb) #ifdef PC_ENGINE -NOD RNG_add_relation(NOD node) +JRD_NOD RNG_add_relation(JRD_NOD node) { /************************************** * @@ -225,7 +225,7 @@ NOD RNG_add_relation(NOD node) USHORT range_number; VEC refresh_ranges; RNG refresh_range; - NOD relation_node; + JRD_NOD relation_node; REL relation; LCK relation_lock; VEC relation_locks; @@ -359,7 +359,7 @@ void RNG_add_uncommitted_record(RPB * rpb) #ifdef PC_ENGINE -DSC *RNG_begin(NOD node, VLU impure) +DSC *RNG_begin(JRD_NOD node, VLU impure) { /************************************** * @@ -464,7 +464,7 @@ DSC *RNG_begin(NOD node, VLU impure) #ifdef PC_ENGINE -NOD RNG_delete(NOD node) +JRD_NOD RNG_delete(JRD_NOD node) { /************************************** * @@ -538,7 +538,7 @@ void RNG_delete_ranges(REQ request) #ifdef PC_ENGINE -NOD RNG_end(NOD node) +JRD_NOD RNG_end(JRD_NOD node) { /************************************** * diff --git a/src/jrd/rse.cpp b/src/jrd/rse.cpp index 887294603a..fc5df1daad 100644 --- a/src/jrd/rse.cpp +++ b/src/jrd/rse.cpp @@ -20,7 +20,7 @@ * All Rights Reserved. * Contributor(s): ______________________________________. * - * $Id: rse.cpp,v 1.10 2002-10-31 05:05:57 seanleyne Exp $ + * $Id: rse.cpp,v 1.11 2002-11-11 19:42:47 hippoman Exp $ * * 2001.07.28: John Bellardo: Implemented rse_skip and made rse_first work with * seekable streams. @@ -82,7 +82,7 @@ static void close_merge(TDBB, RSB, IRSB_MRG); static void close_procedure(TDBB, RSB); -static SSHORT compare(TDBB, NOD, NOD); +static SSHORT compare(TDBB, JRD_NOD, JRD_NOD); static SSHORT compare_longs(SLONG *, SLONG *, USHORT); #ifdef SCROLLABLE_CURSORS static BOOLEAN fetch_record(TDBB, RSB, SSHORT, RSE_GET_MODE); @@ -236,7 +236,7 @@ void RSE_close(TDBB tdbb, RSB rsb) #ifdef PC_ENGINE -BOOLEAN RSE_find_dbkey(TDBB tdbb, RSB rsb, NOD find_key, NOD record_version) +BOOLEAN RSE_find_dbkey(TDBB tdbb, RSB rsb, JRD_NOD find_key, JRD_NOD record_version) { /************************************** * @@ -358,7 +358,7 @@ BOOLEAN RSE_find_dbkey(TDBB tdbb, RSB rsb, NOD find_key, NOD record_version) #ifdef PC_ENGINE BOOLEAN RSE_find_record(TDBB tdbb, RSB rsb, - USHORT operator, USHORT direction, NOD find_key) + USHORT operator, USHORT direction, JRD_NOD find_key) { /************************************** * @@ -598,7 +598,7 @@ void RSE_open(TDBB tdbb, RSB rsb) switch (rsb->rsb_type) { case rsb_indexed: - impure->irsb_bitmap = EVL_bitmap(tdbb, (NOD) rsb->rsb_arg[0]); + impure->irsb_bitmap = EVL_bitmap(tdbb, (JRD_NOD) rsb->rsb_arg[0]); impure->irsb_prefetch_number = -1; case rsb_navigate: @@ -667,7 +667,7 @@ void RSE_open(TDBB tdbb, RSB rsb) case rsb_first: ((IRSB_FIRST)impure)->irsb_count = - MOV_get_int64 (EVL_expr (tdbb, (NOD) rsb->rsb_arg [0]), 0); + MOV_get_int64 (EVL_expr (tdbb, (JRD_NOD) rsb->rsb_arg [0]), 0); if (((IRSB_FIRST)impure)->irsb_count < 1) ERR_post (gds_bad_limit_param, 0); @@ -677,7 +677,7 @@ void RSE_open(TDBB tdbb, RSB rsb) case rsb_skip: ((IRSB_SKIP)impure)->irsb_count = - MOV_get_int64 (EVL_expr (tdbb, (NOD) rsb->rsb_arg [0]), 0); + MOV_get_int64 (EVL_expr (tdbb, (JRD_NOD) rsb->rsb_arg [0]), 0); if (((IRSB_SKIP)impure)->irsb_count < 0) ERR_post (gds_bad_skip_param, 0); @@ -963,7 +963,7 @@ static void close_procedure(TDBB tdbb, RSB rsb) } -static SSHORT compare(TDBB tdbb, NOD node1, NOD node2) +static SSHORT compare(TDBB tdbb, JRD_NOD node1, JRD_NOD node2) { /************************************** * @@ -976,7 +976,7 @@ static SSHORT compare(TDBB tdbb, NOD node1, NOD node2) * sort merge join. * **************************************/ - NOD *ptr1, *ptr2, *end; + JRD_NOD *ptr1, *ptr2, *end; DSC *desc1, *desc2; REQ request; ULONG flags; @@ -1285,7 +1285,7 @@ static BOOLEAN fetch_left(TDBB tdbb, RSB rsb, IRSB impure) break; } if (rsb->rsb_arg[RSB_LEFT_boolean] && - !EVL_boolean(tdbb, (NOD) rsb->rsb_arg[RSB_LEFT_boolean])) { + !EVL_boolean(tdbb, (JRD_NOD) rsb->rsb_arg[RSB_LEFT_boolean])) { /* The boolean pertaining to the left sub-stream is false so just join sub-stream to a null valued right sub-stream */ join_to_nulls(tdbb, rsb, RSB_LEFT_streams); @@ -1301,7 +1301,7 @@ static BOOLEAN fetch_left(TDBB tdbb, RSB rsb, IRSB impure) RSE_get_forward)) if (!rsb->rsb_arg[RSB_LEFT_inner_boolean] || EVL_boolean(tdbb, - (NOD) + (JRD_NOD) rsb->rsb_arg[RSB_LEFT_inner_boolean])) { impure->irsb_flags |= irsb_joined; @@ -1340,15 +1340,15 @@ static BOOLEAN fetch_left(TDBB tdbb, RSB rsb, IRSB impure) if ( (!rsb->rsb_arg[RSB_LEFT_boolean] || EVL_boolean(tdbb, - (NOD) rsb->rsb_arg[RSB_LEFT_boolean])) + (JRD_NOD) rsb->rsb_arg[RSB_LEFT_boolean])) && (!rsb->rsb_arg[RSB_LEFT_inner_boolean] || EVL_boolean(tdbb, - (NOD) + (JRD_NOD) rsb->rsb_arg [RSB_LEFT_inner_boolean])) && (full == rsb->rsb_arg[RSB_LEFT_inner] || EVL_boolean(tdbb, - (NOD) + (JRD_NOD) rsb->rsb_arg [RSB_LEFT_inner]->rsb_arg[0]))) break; @@ -1814,7 +1814,7 @@ static BOOLEAN get_merge_join(TDBB tdbb, RSB rsb, IRSB_MRG impure) map_sort_data(request, map, get_merge_data(tdbb, mfb, record)); if (ptr != highest_ptr && - compare(tdbb, (NOD) highest_ptr[1], (NOD) ptr[1]) < 0) + compare(tdbb, (JRD_NOD) highest_ptr[1], (JRD_NOD) ptr[1]) < 0) highest_ptr = ptr; } @@ -1826,7 +1826,7 @@ static BOOLEAN get_merge_join(TDBB tdbb, RSB rsb, IRSB_MRG impure) ptr < end; ptr += 2, tail++) if (highest_ptr != ptr) while ( (result = - compare(tdbb, (NOD) highest_ptr[1], (NOD) ptr[1])) ) { + compare(tdbb, (JRD_NOD) highest_ptr[1], (JRD_NOD) ptr[1])) ) { if (result < 0) { highest_ptr = ptr; goto recycle; @@ -2216,8 +2216,8 @@ static BOOLEAN get_record(TDBB tdbb, { int result; SSHORT select_value; /* select for ANY/ALL processing */ - NOD select_node; /* ANY/ALL select node pointer */ - NOD column_node; /* ANY/ALL column node pointer */ + JRD_NOD select_node; /* ANY/ALL select node pointer */ + JRD_NOD column_node; /* ANY/ALL column node pointer */ /* For ANY and ALL clauses (ALL is handled as a negated ANY), we must first detect them, and then make sure that the returned @@ -2233,7 +2233,7 @@ static BOOLEAN get_record(TDBB tdbb, select expression on the left, and the column comparison on the right. */ - column_node = (NOD) rsb->rsb_any_boolean; + column_node = (JRD_NOD) rsb->rsb_any_boolean; if (column_node && (request->req_flags & (req_ansi_all | req_ansi_any))) { @@ -2247,7 +2247,7 @@ static BOOLEAN get_record(TDBB tdbb, } else { - select_node = (NOD) NULL; + select_node = (JRD_NOD) NULL; } } if (column_node && (request->req_flags & req_ansi_any)) @@ -2271,7 +2271,7 @@ static BOOLEAN get_record(TDBB tdbb, any_true = FALSE; while (get_record(tdbb, rsb->rsb_next, rsb, mode)) { - if (EVL_boolean(tdbb, (NOD) rsb->rsb_arg[0])) + if (EVL_boolean(tdbb, (JRD_NOD) rsb->rsb_arg[0])) { /* found a TRUE value */ @@ -2331,7 +2331,7 @@ static BOOLEAN get_record(TDBB tdbb, result = FALSE; while (get_record(tdbb, rsb->rsb_next, rsb, mode)) { - if (EVL_boolean(tdbb, (NOD) rsb->rsb_arg[0])) { + if (EVL_boolean(tdbb, (JRD_NOD) rsb->rsb_arg[0])) { result = TRUE; break; } @@ -2363,7 +2363,7 @@ static BOOLEAN get_record(TDBB tdbb, /* look for a FALSE (and not null either) */ - if (!EVL_boolean(tdbb, (NOD) rsb->rsb_arg[0]) && + if (!EVL_boolean(tdbb, (JRD_NOD) rsb->rsb_arg[0]) && !(request->req_flags & req_null)) { /* make sure it wasn't FALSE because there's @@ -2408,7 +2408,7 @@ static BOOLEAN get_record(TDBB tdbb, /* look for a FALSE or null */ - if (!EVL_boolean(tdbb, (NOD) rsb->rsb_arg[0])) { + if (!EVL_boolean(tdbb, (JRD_NOD) rsb->rsb_arg[0])) { /* make sure it wasn't FALSE because there's no select stream record */ @@ -2443,7 +2443,7 @@ static BOOLEAN get_record(TDBB tdbb, result = FALSE; while (get_record(tdbb, rsb->rsb_next, rsb, mode)) { - if (EVL_boolean(tdbb, (NOD) rsb->rsb_arg[0])) { + if (EVL_boolean(tdbb, (JRD_NOD) rsb->rsb_arg[0])) { result = TRUE; break; } @@ -2634,7 +2634,7 @@ static BOOLEAN get_record(TDBB tdbb, case rsb_aggregate: if ( (impure->irsb_count = EVL_group(tdbb, (BLK) rsb->rsb_next, - (NOD) rsb->rsb_arg[0], + (JRD_NOD) rsb->rsb_arg[0], impure->irsb_count)) ) break; return FALSE; @@ -2740,7 +2740,7 @@ static BOOLEAN get_union(TDBB tdbb, RSB rsb, IRSB impure) * **************************************/ RSB *rsb_ptr; - NOD map, *ptr, *end; + JRD_NOD map, *ptr, *end; SET_TDBB(tdbb); rsb_ptr = rsb->rsb_arg + impure->irsb_count; @@ -2758,7 +2758,7 @@ static BOOLEAN get_union(TDBB tdbb, RSB rsb, IRSB impure) /* We've got a record, map it into the target record */ - map = (NOD) rsb_ptr[1]; + map = (JRD_NOD) rsb_ptr[1]; for (ptr = map->nod_arg, end = ptr + map->nod_count; ptr < end; ptr++) EXE_assignment(tdbb, *ptr); @@ -2827,7 +2827,7 @@ static void map_sort_data(REQ request, SMB map, UCHAR * data) UCHAR flag; DSC from, to; RPB *rpb; - NOD node; + JRD_NOD node; REC record; smb_repeat * item, *end_item; @@ -2945,7 +2945,7 @@ static void open_procedure(TDBB tdbb, RSB rsb, IRSB_PROCEDURE impure) * Initialize a procedural view. * **************************************/ - NOD inputs, *ptr, *end, in_message; + JRD_NOD inputs, *ptr, *end, in_message; PRC procedure; REQ request, proc_request; FMT format; @@ -2955,7 +2955,7 @@ static void open_procedure(TDBB tdbb, RSB rsb, IRSB_PROCEDURE impure) SET_TDBB(tdbb); - inputs = (NOD) rsb->rsb_arg[RSB_PRC_inputs]; + inputs = (JRD_NOD) rsb->rsb_arg[RSB_PRC_inputs]; procedure = rsb->rsb_procedure; request = tdbb->tdbb_request; @@ -2977,7 +2977,7 @@ static void open_procedure(TDBB tdbb, RSB rsb, IRSB_PROCEDURE impure) EXE_assignment(tdbb, *ptr); request->req_operation = saved_state; - in_message = (NOD) rsb->rsb_arg[RSB_PRC_in_msg]; + in_message = (JRD_NOD) rsb->rsb_arg[RSB_PRC_in_msg]; format = (FMT) in_message->nod_arg[e_msg_format]; iml = format->fmt_length; im = (UCHAR *) request + in_message->nod_impure; @@ -3016,7 +3016,7 @@ static void open_sort(TDBB tdbb, RSB rsb, IRSB_SORT impure) DSC *from, to, temp; REQ request; RPB *rpb; - NOD node; + JRD_NOD node; int records; SSHORT stream; SCB handle;