diff --git a/src/gpre/gpre.h b/src/gpre/gpre.h index 9276e4b5df..181f0bea31 100644 --- a/src/gpre/gpre.h +++ b/src/gpre/gpre.h @@ -19,7 +19,7 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. - * $Id: gpre.h,v 1.32 2003-07-02 12:57:41 brodsom Exp $ + * $Id: gpre.h,v 1.33 2003-07-02 18:58:41 brodsom Exp $ * Revision 1.3 2000/11/27 09:26:13 fsg * Fixed bugs in gpre to handle PYXIS forms * and allow edit.e and fred.e to go through @@ -236,6 +236,7 @@ typedef enum act_t { ACT_endfor, ACT_endmodify, ACT_endstore, + ACT_endstore_special, ACT_erase, ACT_event_init, ACT_event_wait, diff --git a/src/gpre/hsh.h b/src/gpre/hsh.h index dad0252bcc..58715e6e2c 100644 --- a/src/gpre/hsh.h +++ b/src/gpre/hsh.h @@ -153,6 +153,7 @@ #endif {"END_MODIFY", KW_END_MODIFY}, {"END_STORE", KW_END_STORE}, + {"END_STORE_SPECIAL", KW_END_STORE_SPECIAL}, {"END_STREAM", KW_END_STREAM}, #ifdef PYXIS {"ENTREE_LENGTH", KW_ENTREE_LENGTH}, diff --git a/src/gpre/int.cpp b/src/gpre/int.cpp index a35f93f65c..7c19a4f75b 100644 --- a/src/gpre/int.cpp +++ b/src/gpre/int.cpp @@ -25,7 +25,7 @@ // //____________________________________________________________ // -// $Id: int.cpp,v 1.12 2003-03-27 17:15:44 brodsom Exp $ +// $Id: int.cpp,v 1.13 2003-07-02 18:58:41 brodsom Exp $ // #include "firebird.h" @@ -48,7 +48,7 @@ static int gen_blr(int *, int, TEXT *); static void gen_compile(GPRE_REQ, int); static void gen_database(ACT, int); static void gen_emodify(ACT, int); -static void gen_estore(ACT, int); +static void gen_estore(ACT, int, bool); static void gen_endfor(ACT, int); static void gen_erase(ACT, int); static void gen_for(ACT, int); @@ -60,8 +60,8 @@ static void gen_routine(ACT, int); static void gen_s_end(ACT, int); static void gen_s_fetch(ACT, int); static void gen_s_start(ACT, int); -static void gen_send(GPRE_REQ, POR, int); -static void gen_start(GPRE_REQ, POR, int); +static void gen_send(GPRE_REQ, POR, int, bool); +static void gen_start(GPRE_REQ, POR, int, bool); static void gen_type(ACT, int); static void gen_variable(ACT, int); static void make_port(POR, int); @@ -113,7 +113,10 @@ void INT_action( ACT action, int column) gen_emodify(action, column); break; case ACT_endstore: - gen_estore(action, column); + gen_estore(action, column, false); + break; + case ACT_endstore_special: + gen_estore(action, column, true); break; case ACT_erase: gen_erase(action, column); @@ -349,7 +352,7 @@ static void gen_emodify( ACT action, int column) gen_name(s1, reference), gen_name(s2, source)); } - gen_send(action->act_request, modify->upd_port, column); + gen_send(action->act_request, modify->upd_port, column, false); } @@ -358,14 +361,14 @@ static void gen_emodify( ACT action, int column) // Generate substitution text for END_STORE. // -static void gen_estore( ACT action, int column) +static void gen_estore( ACT action, int column, bool special) { GPRE_REQ request; request = action->act_request; align(column); gen_compile(request, column); - gen_start(request, request->req_primary, column); + gen_start(request, request->req_primary, column, special); } @@ -382,7 +385,7 @@ static void gen_endfor( ACT action, int column) column += INDENT; if (request->req_sync) - gen_send(request, request->req_sync, column); + gen_send(request, request->req_sync, column, false); END; } @@ -398,7 +401,7 @@ static void gen_erase( ACT action, int column) UPD erase; erase = (UPD) action->act_object; - gen_send(erase->upd_request, erase->upd_port, column); + gen_send(erase->upd_request, erase->upd_port, column, false); } @@ -561,7 +564,7 @@ static void gen_s_fetch( ACT action, int column) request = action->act_request; if (request->req_sync) - gen_send(request, request->req_sync, column); + gen_send(request, request->req_sync, column, false); gen_receive(action->act_request, request->req_primary); } @@ -584,7 +587,7 @@ static void gen_s_start( ACT action, int column) if (port = request->req_vport) asgn_from(port->por_references, column); - gen_start(request, port, column); + gen_start(request, port, column, false); } @@ -593,9 +596,17 @@ static void gen_s_start( ACT action, int column) // Generate a send or receive call for a port. // -static void gen_send( GPRE_REQ request, POR port, int column) +static void gen_send( GPRE_REQ request, POR port, int column, bool special) { + + if (special) { + align(column); + ib_fprintf(out_file, "if (ignore_perm)"); + align(column); + ib_fprintf(out_file, "\t((JRD_REQ)request)->req_flags |= req_ignore_perm;"); + } align(column); + ib_fprintf(out_file, "EXE_send (tdbb, (JRD_REQ)%s, %d, %d, (UCHAR*)&jrd_%d);", request->req_handle, port->por_msg_number, port->por_length, port->por_ident); @@ -607,7 +618,7 @@ static void gen_send( GPRE_REQ request, POR port, int column) // Generate a START. // -static void gen_start( GPRE_REQ request, POR port, int column) +static void gen_start( GPRE_REQ request, POR port, int column, bool special) { align(column); @@ -615,7 +626,7 @@ static void gen_start( GPRE_REQ request, POR port, int column) request->req_handle, request->req_trans); if (port) - gen_send(request, port, column); + gen_send(request, port, column, special); } @@ -627,7 +638,7 @@ static void gen_start( GPRE_REQ request, POR port, int column) static void gen_type( ACT action, int column) { - printa(column, "%ld", action->act_object); + printa(column, "%ld", (SLONG) action->act_object); } diff --git a/src/gpre/int_cxx.cpp b/src/gpre/int_cxx.cpp index 7edaba6d05..9e3bc54af7 100644 --- a/src/gpre/int_cxx.cpp +++ b/src/gpre/int_cxx.cpp @@ -25,7 +25,7 @@ // //____________________________________________________________ // -// $Id: int_cxx.cpp,v 1.10 2003-03-27 17:15:43 brodsom Exp $ +// $Id: int_cxx.cpp,v 1.11 2003-07-02 18:58:41 brodsom Exp $ // #include "firebird.h" @@ -48,7 +48,7 @@ static int gen_blr(int *, int, TEXT *); static void gen_compile(GPRE_REQ, int); static void gen_database(ACT, int); static void gen_emodify(ACT, int); -static void gen_estore(ACT, int); +static void gen_estore(ACT, int, bool); static void gen_endfor(ACT, int); static void gen_erase(ACT, int); static void gen_for(ACT, int); @@ -60,8 +60,8 @@ static void gen_routine(ACT, int); static void gen_s_end(ACT, int); static void gen_s_fetch(ACT, int); static void gen_s_start(ACT, int); -static void gen_send(GPRE_REQ, POR, int); -static void gen_start(GPRE_REQ, POR, int); +static void gen_send(GPRE_REQ, POR, int, bool); +static void gen_start(GPRE_REQ, POR, int, bool); static void gen_type(ACT, int); static void gen_variable(ACT, int); static void make_port(POR, int); @@ -113,7 +113,10 @@ void INT_CXX_action( ACT action, int column) gen_emodify(action, column); break; case ACT_endstore: - gen_estore(action, column); + gen_estore(action, column,false); + break; + case ACT_endstore_special: + gen_estore(action, column,true); break; case ACT_erase: gen_erase(action, column); @@ -355,7 +358,7 @@ static void gen_emodify( ACT action, int column) gen_name(s1, reference), gen_name(s2, source)); } - gen_send(action->act_request, modify->upd_port, column); + gen_send(action->act_request, modify->upd_port, column, false); } @@ -364,14 +367,14 @@ static void gen_emodify( ACT action, int column) // Generate substitution text for END_STORE. // -static void gen_estore( ACT action, int column) +static void gen_estore( ACT action, int column, bool special) { GPRE_REQ request; request = action->act_request; align(column); gen_compile(request, column); - gen_start(request, request->req_primary, column); + gen_start(request, request->req_primary, column, special); } @@ -388,7 +391,7 @@ static void gen_endfor( ACT action, int column) column += INDENT; if (request->req_sync) - gen_send(request, request->req_sync, column); + gen_send(request, request->req_sync, column, false); END; } @@ -404,7 +407,7 @@ static void gen_erase( ACT action, int column) UPD erase; erase = (UPD) action->act_object; - gen_send(erase->upd_request, erase->upd_port, column); + gen_send(erase->upd_request, erase->upd_port, column, false); } @@ -536,8 +539,8 @@ static void gen_routine( ACT action, int column) POR port; for (request = (GPRE_REQ) action->act_object; request; - request = request->req_routine) for (port = request->req_ports; port; - port = port->por_next) + request = request->req_routine) + for (port = request->req_ports; port; port = port->por_next) make_port(port, column + INDENT); } @@ -567,7 +570,7 @@ static void gen_s_fetch( ACT action, int column) request = action->act_request; if (request->req_sync) - gen_send(request, request->req_sync, column); + gen_send(request, request->req_sync, column, false); gen_receive(action->act_request, request->req_primary); } @@ -590,7 +593,7 @@ static void gen_s_start( ACT action, int column) if (port = request->req_vport) asgn_from(port->por_references, column); - gen_start(request, port, column); + gen_start(request, port, column, false); } @@ -599,9 +602,16 @@ static void gen_s_start( ACT action, int column) // Generate a send or receive call for a port. // -static void gen_send( GPRE_REQ request, POR port, int column) +static void gen_send( GPRE_REQ request, POR port, int column, bool special) { + if (special) { + align(column); + ib_fprintf(out_file, "if (ignore_perm)"); + align(column); + ib_fprintf(out_file, "\t((JRD_REQ)request)->req_flags |= req_ignore_perm;"); + } align(column); + ib_fprintf(out_file, "EXE_send (tdbb, (JRD_REQ)%s, %d, %d, (UCHAR*)&jrd_%d);", request->req_handle, port->por_msg_number, port->por_length, port->por_ident); @@ -613,7 +623,7 @@ static void gen_send( GPRE_REQ request, POR port, int column) // Generate a START. // -static void gen_start( GPRE_REQ request, POR port, int column) +static void gen_start( GPRE_REQ request, POR port, int column, bool special) { align(column); @@ -621,7 +631,7 @@ static void gen_start( GPRE_REQ request, POR port, int column) request->req_handle, request->req_trans); if (port) - gen_send(request, port, column); + gen_send(request, port, column, special); } diff --git a/src/gpre/par.cpp b/src/gpre/par.cpp index 7dc42c69d8..fa04abba49 100644 --- a/src/gpre/par.cpp +++ b/src/gpre/par.cpp @@ -20,7 +20,7 @@ // // All Rights Reserved. // Contributor(s): ______________________________________. -// $Id: par.cpp,v 1.19 2003-07-02 12:57:41 brodsom Exp $ +// $Id: par.cpp,v 1.20 2003-07-02 18:58:41 brodsom Exp $ // Revision 1.2 2000/11/27 09:26:13 fsg // Fixed bugs in gpre to handle PYXIS forms // and allow edit.e and fred.e to go through @@ -37,7 +37,7 @@ // //____________________________________________________________ // -// $Id: par.cpp,v 1.19 2003-07-02 12:57:41 brodsom Exp $ +// $Id: par.cpp,v 1.20 2003-07-02 18:58:41 brodsom Exp $ // #include "firebird.h" @@ -93,7 +93,7 @@ static ACT par_end_menu(); #endif static ACT par_end_modify(); static ACT par_end_stream(); -static ACT par_end_store(); +static ACT par_end_store(bool); #ifdef PYXIS static ACT par_entree(); #endif @@ -281,7 +281,9 @@ ACT PAR_action(TEXT* base_dir) case KW_END_STREAM: return cur_statement = par_end_stream(); case KW_END_STORE: - return cur_statement = par_end_store(); + return cur_statement = par_end_store(false); + case KW_END_STORE_SPECIAL: + return cur_statement = par_end_store(true); #ifdef PYXIS case KW_MENU_ENTREE: return par_entree(); @@ -2022,7 +2024,7 @@ static ACT par_end_stream() // Process an END_STORE. // -static ACT par_end_store() +static ACT par_end_store(bool special) { ACT begin_action, action2, action; GPRE_REQ request; @@ -2110,7 +2112,10 @@ static ACT par_end_store() if ((context = request->req_contexts)) HSH_remove(context->ctx_symbol); - action = MAKE_ACTION(request, ACT_endstore); + if (special) + action = MAKE_ACTION(request, ACT_endstore_special); + else + action = MAKE_ACTION(request, ACT_endstore); begin_action->act_pair = action; action->act_pair = begin_action; return action; diff --git a/src/gpre/words.h b/src/gpre/words.h index 13e7ede279..ed49e104b5 100644 --- a/src/gpre/words.h +++ b/src/gpre/words.h @@ -63,6 +63,7 @@ KW_start_actions, #endif KW_END_MODIFY, KW_END_STORE, + KW_END_STORE_SPECIAL, KW_END_STREAM, KW_ERASE, KW_ESCAPE,