diff --git a/src/isql/extract.epp b/src/isql/extract.epp index 626e45309c..71a8d29700 100644 --- a/src/isql/extract.epp +++ b/src/isql/extract.epp @@ -19,7 +19,7 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. - * $Id: extract.epp,v 1.6 2002-07-09 14:41:37 dimitr Exp $ + * $Id: extract.epp,v 1.7 2002-12-16 16:05:14 alexpeshkoff Exp $ * Revision 1.3 2000/11/22 17:07:25 patrickgriffin * In get_procedure_args change comment style from // to c style * @@ -417,7 +417,7 @@ SSHORT EXTRACT_list_table(SCHAR * relation_name, { ISQL_printf (Out, "COMPUTED BY "); if (!FLD.RDB$COMPUTED_SOURCE.NULL) - ISQL_print_validation (Out, &FLD.RDB$COMPUTED_SOURCE, 1, (SLONG*) gds_trans); + ISQL_print_validation (Out, &FLD.RDB$COMPUTED_SOURCE, 1, gds_trans); } else if (!((strncmp(FLD.RDB$FIELD_NAME, "RDB$", 4) == 0) && isdigit (FLD.RDB$FIELD_NAME[4]) && @@ -1594,7 +1594,7 @@ static void list_create_db(void) ISQL_printf(Out, Print_buffer); /* Get the page size from db_info call */ - if (!SHOW_dbb_parameters((SLONG*) DB, info_buf, const_cast(page_items), sizeof(page_items), + if (!SHOW_dbb_parameters(DB, info_buf, const_cast(page_items), sizeof(page_items), translate)) { sprintf(Print_buffer, " %s", info_buf); ISQL_printf(Out, Print_buffer); @@ -2051,7 +2051,7 @@ static void list_domain_table( SCHAR * table_name, SSHORT default_char_set_id) { sprintf (Print_buffer, "%s%s ", NEWLINE, TAB_AS_SPACES); ISQL_printf (Out, Print_buffer); - ISQL_print_validation (Out, &FLD.RDB$VALIDATION_SOURCE, 0, (SLONG*) gds_trans); + ISQL_print_validation (Out, &FLD.RDB$VALIDATION_SOURCE, 0, gds_trans); } if (FLD.RDB$NULL_FLAG == 1) ISQL_printf (Out, " NOT NULL"); @@ -2242,7 +2242,7 @@ static void list_domains( SSHORT default_char_set_id) { sprintf (Print_buffer, "%s%s ", NEWLINE, TAB_AS_SPACES); ISQL_printf (Out, Print_buffer); - ISQL_print_validation (Out, &FLD.RDB$VALIDATION_SOURCE, 0, (SLONG*) gds_trans); + ISQL_print_validation (Out, &FLD.RDB$VALIDATION_SOURCE, 0, gds_trans); } if (FLD.RDB$NULL_FLAG == 1) ISQL_printf (Out, " NOT NULL"); diff --git a/src/isql/isql.epp b/src/isql/isql.epp index 8c94c84210..12b32954f8 100644 --- a/src/isql/isql.epp +++ b/src/isql/isql.epp @@ -24,7 +24,7 @@ * */ /* - $Id: isql.epp,v 1.18 2002-12-10 11:53:48 eku Exp $ + $Id: isql.epp,v 1.19 2002-12-16 16:05:24 alexpeshkoff Exp $ Revision 1.5 2000/11/18 16:49:24 fsg Increased PRINT_BUFFER_LENGTH to 2048 to show larger plans Fixed Bug #122563 in extract.e get_procedure_args @@ -183,7 +183,7 @@ static SSHORT newsize(TEXT *, TEXT *); static SSHORT newtrans(TEXT *); static SSHORT parse_arg(int, SCHAR **, SCHAR *, IB_FILE **); static SSHORT print_item(TEXT **, XSQLVAR *, SLONG); -static int print_item_blob(IB_FILE *, XSQLVAR *, void *); +static int print_item_blob(IB_FILE *, XSQLVAR *, FRBRD *); static void print_item_numeric(SINT64, SSHORT, SSHORT, TEXT *); static int print_line(XSQLDA *, SLONG *, TEXT *); static int process_statement(TEXT *, XSQLDA **); @@ -2200,7 +2200,7 @@ void ISQL_msg_get(USHORT number, void ISQL_print_validation(IB_FILE * fp, - ISC_QUAD * blobid, SSHORT flag, SLONG * trans) + ISC_QUAD * blobid, SSHORT flag, FRBRD * trans) { /************************************** * @@ -2217,7 +2217,7 @@ void ISQL_print_validation(IB_FILE * fp, * if flag == 1, this is a computed field * **************************************/ - SLONG *blob; + FRBRD *blob; USHORT length; TEXT *buffer, *p; SSHORT issql = FALSE, firsttime = TRUE; @@ -2230,14 +2230,14 @@ void ISQL_print_validation(IB_FILE * fp, buffer = (TEXT *) ISQL_ALLOC(BUFFER_LENGTH512); blob = NULL; - if (isc_open_blob(isc_status, &DB, (void**) &trans, (void**) &blob, blobid)) { + if (isc_open_blob(isc_status, &DB, &trans, &blob, blobid)) { ISQL_errmsg(isc_status); if (buffer) ISQL_FREE(buffer); return; } - while (!isc_get_segment(isc_status, (void**) &blob, &length, + while (!isc_get_segment(isc_status, &blob, &length, (USHORT) (BUFFER_LENGTH512 - 1), buffer) || isc_status[1] == isc_segment) { buffer[length] = 0; @@ -2273,7 +2273,7 @@ void ISQL_print_validation(IB_FILE * fp, ISQL_printf(fp, Print_buffer); } - isc_close_blob(isc_status, (void**) &blob); + isc_close_blob(isc_status, &blob); if (isc_status[1]) ISQL_errmsg(isc_status); @@ -6831,7 +6831,7 @@ static SSHORT print_item( TEXT ** s, XSQLVAR * var, SLONG printlength) } -static int print_item_blob( IB_FILE * fp, XSQLVAR * var, void *trans) +static int print_item_blob( IB_FILE * fp, XSQLVAR * var, FRBRD *trans) { /************************************** * @@ -6844,7 +6844,7 @@ static int print_item_blob( IB_FILE * fp, XSQLVAR * var, void *trans) * any BLOB selected in a show or extract command) * **************************************/ - void *blob; + FRBRD *blob; USHORT length, bpb_length; UCHAR *buffer, *b; UCHAR bpb_buffer[64]; @@ -6911,7 +6911,7 @@ static int print_item_blob( IB_FILE * fp, XSQLVAR * var, void *trans) } blob = NULL; - if (isc_open_blob2(isc_status, &DB, (void**) &trans, (void**) &blob, blobid, bpb_length, + if (isc_open_blob2(isc_status, &DB, &trans, &blob, blobid, bpb_length, bpb)) { ISQL_errmsg(isc_status); if (buffer) @@ -6921,7 +6921,7 @@ static int print_item_blob( IB_FILE * fp, XSQLVAR * var, void *trans) return ERR; } - while (!isc_get_segment(isc_status, (void**) &blob, &length, + while (!isc_get_segment(isc_status, &blob, &length, (USHORT) (BUFFER_LENGTH512 - 1), (SCHAR*) buffer) || isc_status[1] == isc_segment) { /* Special displays for blr or acl subtypes */ @@ -6944,7 +6944,7 @@ static int print_item_blob( IB_FILE * fp, XSQLVAR * var, void *trans) } if (isc_status[1] == isc_segstr_eof) - isc_close_blob(isc_status, (void**) &blob); + isc_close_blob(isc_status, &blob); else if (isc_status[1]) { ISQL_errmsg(isc_status); if (buffer) @@ -7130,7 +7130,7 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) SLONG count; XSQLDA *sqlda; XSQLVAR *var, *end; - void *prepare_trans; + FRBRD *prepare_trans; int ret = CONT; static SCHAR sqlda_info[] = { isc_info_sql_stmt_type }; static SCHAR plan_info[] = { isc_info_sql_get_plan }; @@ -7156,7 +7156,7 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) /* If statistics are requested, then reserve them here */ if (Stats) - perf_get_info((int**) &DB, &perf_before); + perf_get_info(&DB, &perf_before); /* Prepare the dynamic query stored in string. But put this on the DDL transaction to get maximum visibility of @@ -7384,7 +7384,7 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) } if (Stats) { - perf_get_info((int**) &DB, &perf_after); + perf_get_info(&DB, &perf_after); if (!have_report) { ISQL_msg_get(REPORT1, report_1, NULL, NULL, NULL, NULL, NULL); /* Current memory = !c\nDelta memory = !d\nMax memory = !x\nElapsed time= !e sec\n */ @@ -7833,7 +7833,7 @@ static int process_statement( TEXT * string, XSQLDA ** sqldap) /* Statistics printed here upon request */ if (Stats) { - perf_get_info((int**) &DB, &perf_after); + perf_get_info(&DB, &perf_after); if (!have_report) { ISQL_msg_get(REPORT1, report_1, NULL, NULL, NULL, NULL, NULL); /* Current memory = !c\nDelta memory = !d\nMax memory = !x\nElapsed time= !e sec\n */ diff --git a/src/isql/isql_proto.h b/src/isql/isql_proto.h index 4dec96f89d..110b526b0e 100644 --- a/src/isql/isql_proto.h +++ b/src/isql/isql_proto.h @@ -55,7 +55,7 @@ extern SSHORT ISQL_main(int, char **); extern void ISQL_make_upper(UCHAR *); extern void ISQL_msg_get(USHORT, TEXT *, TEXT *, TEXT *, TEXT *, TEXT *, TEXT *); -extern void ISQL_print_validation(IB_FILE *, GDS__QUAD *, SSHORT, SLONG *); +extern void ISQL_print_validation(IB_FILE *, GDS__QUAD *, SSHORT, FRBRD *); extern void ISQL_printf(IB_FILE *, TEXT *); extern void ISQL_query_database(SSHORT *, IB_FILE *, IB_FILE *, IB_FILE *); extern void ISQL_reset_settings(void); diff --git a/src/isql/show.epp b/src/isql/show.epp index 0c05f2eb40..8ac3156ce3 100644 --- a/src/isql/show.epp +++ b/src/isql/show.epp @@ -19,7 +19,7 @@ * * All Rights Reserved. * Contributor(s): ______________________________________. - * $Id: show.epp,v 1.8 2002-12-10 11:53:48 eku Exp $ + * $Id: show.epp,v 1.9 2002-12-16 16:06:01 alexpeshkoff Exp $ * Revision 1.2 2000/11/19 07:02:49 fsg * Change in show.e to use CHARACTER_LENGTH instead of FIELD_LENGTH in * SHOW PROCEDURE @@ -262,7 +262,7 @@ static CONST UCHAR metadata_text_bpb[] = { -BOOLEAN SHOW_dbb_parameters(SLONG * db_handle, +BOOLEAN SHOW_dbb_parameters(FRBRD * db_handle, SCHAR * info_buf, SCHAR * db_items, USHORT item_length, USHORT translate) @@ -306,7 +306,7 @@ BOOLEAN SHOW_dbb_parameters(SLONG * db_handle, return FALSE; } - if (isc_database_info(status_vector, (void**) &db_handle, item_length, + if (isc_database_info(status_vector, &db_handle, item_length, db_items, BUFFER_LENGTH128, buffer)) { ISQL_errmsg(status_vector); ISQL_FREE (buffer); @@ -2116,7 +2116,7 @@ static void show_db(void) /* First general database parameters */ - if (SHOW_dbb_parameters((SLONG*) DB, info_buf, const_cast(db_items), sizeof(db_items), translate)) { + if (SHOW_dbb_parameters(DB, info_buf, const_cast(db_items), sizeof(db_items), translate)) { ISQL_printf(Out, info_buf); } @@ -2179,7 +2179,7 @@ static void show_db(void) /* And now for Rich's show db parameters */ if (is_wal - && SHOW_dbb_parameters((SLONG*) DB, info_buf, const_cast(wal_items), + && SHOW_dbb_parameters(DB, info_buf, const_cast(wal_items), sizeof(wal_items), translate)) { ISQL_printf(Out, info_buf); } diff --git a/src/isql/show_proto.h b/src/isql/show_proto.h index 7be5c2cbdf..ab8ffae2e0 100644 --- a/src/isql/show_proto.h +++ b/src/isql/show_proto.h @@ -32,7 +32,7 @@ extern void SHOW_build_table_namelist(TBLLIST **); extern void SHOW_build_view_namelist(VIEWLIST **); #endif /* GUI_TOOLS */ -extern BOOLEAN SHOW_dbb_parameters (SLONG *, SCHAR *, SCHAR *, USHORT, USHORT); +extern BOOLEAN SHOW_dbb_parameters (FRBRD *, SCHAR *, SCHAR *, USHORT, USHORT); extern int SHOW_grants (SCHAR *, SCHAR *, USHORT); extern int SHOW_grants2 (SCHAR *, SCHAR *, USHORT, TEXT *); extern void SHOW_grant_roles (SCHAR *, SSHORT *);