8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 12:43:03 +01:00

-Remove GDS_VAL and GDS_REF (Final commit)

This commit is contained in:
brodsom 2003-09-12 23:37:06 +00:00
parent 177e889687
commit a86a19246d
7 changed files with 586 additions and 661 deletions

View File

@ -300,10 +300,8 @@ ISC_STATUS API_ROUTINE gds__attach_database(ISC_STATUS * status_vector,
FRBRD **db_handle, FRBRD **db_handle,
SSHORT dpb_length, SCHAR * dpb) SSHORT dpb_length, SCHAR * dpb)
{ {
return isc_attach_database(GDS_VAL(status_vector), return isc_attach_database(status_vector, file_length, file_name,
file_length, db_handle, dpb_length, dpb);
GDS_VAL(file_name),
GDS_VAL(db_handle), dpb_length, GDS_VAL(dpb));
} }
ISC_STATUS API_ROUTINE gds__blob_info(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__blob_info(ISC_STATUS * status_vector,
@ -312,41 +310,37 @@ ISC_STATUS API_ROUTINE gds__blob_info(ISC_STATUS * status_vector,
SCHAR * msg, SCHAR * msg,
SSHORT buffer_length, SCHAR * buffer) SSHORT buffer_length, SCHAR * buffer)
{ {
return isc_blob_info(GDS_VAL(status_vector), return isc_blob_info(status_vector, blob_handle, msg_length,
GDS_VAL(blob_handle), msg, buffer_length, buffer);
msg_length,
GDS_VAL(msg), buffer_length, GDS_VAL(buffer));
} }
ISC_STATUS API_ROUTINE gds__cancel_blob(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__cancel_blob(ISC_STATUS * status_vector,
FRBRD **blob_handle) FRBRD **blob_handle)
{ {
return isc_cancel_blob(GDS_VAL(status_vector), GDS_VAL(blob_handle)); return isc_cancel_blob(status_vector, blob_handle);
} }
ISC_STATUS API_ROUTINE gds__cancel_events(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__cancel_events(ISC_STATUS * status_vector,
FRBRD **db_handle, SLONG * event_id) FRBRD **db_handle, SLONG * event_id)
{ {
return isc_cancel_events(GDS_VAL(status_vector), return isc_cancel_events(status_vector, db_handle, event_id);
GDS_VAL(db_handle), GDS_VAL(event_id));
} }
ISC_STATUS API_ROUTINE gds__close_blob(ISC_STATUS * status_vector, FRBRD **blob_handle) ISC_STATUS API_ROUTINE gds__close_blob(ISC_STATUS * status_vector, FRBRD **blob_handle)
{ {
return isc_close_blob(GDS_VAL(status_vector), GDS_VAL(blob_handle)); return isc_close_blob(status_vector, blob_handle);
} }
ISC_STATUS API_ROUTINE gds__commit_retaining(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__commit_retaining(ISC_STATUS * status_vector,
FRBRD **tra_handle) FRBRD **tra_handle)
{ {
return isc_commit_retaining(GDS_VAL(status_vector), GDS_VAL(tra_handle)); return isc_commit_retaining(status_vector, tra_handle);
} }
ISC_STATUS API_ROUTINE gds__commit_transaction(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__commit_transaction(ISC_STATUS * status_vector,
FRBRD **tra_handle) FRBRD **tra_handle)
{ {
return isc_commit_transaction(GDS_VAL(status_vector), return isc_commit_transaction(status_vector, tra_handle);
GDS_VAL(tra_handle));
} }
ISC_STATUS API_ROUTINE gds__compile_request(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__compile_request(ISC_STATUS * status_vector,
@ -354,9 +348,8 @@ ISC_STATUS API_ROUTINE gds__compile_request(ISC_STATUS * status_vector,
FRBRD **req_handle, FRBRD **req_handle,
SSHORT blr_length, SCHAR * blr) SSHORT blr_length, SCHAR * blr)
{ {
return isc_compile_request(GDS_VAL(status_vector), return isc_compile_request(status_vector, db_handle, req_handle, blr_length,
GDS_VAL(db_handle), blr);
GDS_VAL(req_handle), blr_length, GDS_VAL(blr));
} }
ISC_STATUS API_ROUTINE gds__compile_request2(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__compile_request2(ISC_STATUS * status_vector,
@ -364,10 +357,8 @@ ISC_STATUS API_ROUTINE gds__compile_request2(ISC_STATUS * status_vector,
FRBRD **req_handle, FRBRD **req_handle,
SSHORT blr_length, SCHAR * blr) SSHORT blr_length, SCHAR * blr)
{ {
return isc_compile_request2(GDS_VAL(status_vector), return isc_compile_request2(status_vector, db_handle, req_handle, blr_length,
GDS_VAL(db_handle), blr);
GDS_VAL(req_handle),
blr_length, GDS_VAL(blr));
} }
ISC_STATUS API_ROUTINE gds__create_blob(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__create_blob(ISC_STATUS * status_vector,
@ -375,10 +366,8 @@ ISC_STATUS API_ROUTINE gds__create_blob(ISC_STATUS * status_vector,
FRBRD **tra_handle, FRBRD **tra_handle,
FRBRD **blob_handle, GDS_QUAD * blob_id) FRBRD **blob_handle, GDS_QUAD * blob_id)
{ {
return isc_create_blob(GDS_VAL(status_vector), return isc_create_blob(status_vector, db_handle, tra_handle, blob_handle,
GDS_VAL(db_handle), blob_id);
GDS_VAL(tra_handle),
GDS_VAL(blob_handle), GDS_VAL(blob_id));
} }
ISC_STATUS API_ROUTINE gds__create_blob2(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__create_blob2(ISC_STATUS * status_vector,
@ -388,11 +377,8 @@ ISC_STATUS API_ROUTINE gds__create_blob2(ISC_STATUS * status_vector,
GDS_QUAD * blob_id, GDS_QUAD * blob_id,
SSHORT bpb_length, SCHAR * bpb) SSHORT bpb_length, SCHAR * bpb)
{ {
return isc_create_blob2(GDS_VAL(status_vector), return isc_create_blob2(status_vector, db_handle, tra_handle, blob_handle,
GDS_VAL(db_handle), blob_id, bpb_length, bpb);
GDS_VAL(tra_handle),
GDS_VAL(blob_handle),
GDS_VAL(blob_id), bpb_length, GDS_VAL(bpb));
} }
ISC_STATUS API_ROUTINE gds__create_database(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__create_database(ISC_STATUS * status_vector,
@ -402,11 +388,8 @@ ISC_STATUS API_ROUTINE gds__create_database(ISC_STATUS * status_vector,
SSHORT dpb_length, SSHORT dpb_length,
SCHAR * dpb, SSHORT db_type) SCHAR * dpb, SSHORT db_type)
{ {
return isc_create_database(GDS_VAL(status_vector), return isc_create_database(status_vector, file_length, file_name, db_handle,
file_length, dpb_length, dpb, db_type);
GDS_VAL(file_name),
GDS_VAL(db_handle),
dpb_length, GDS_VAL(dpb), db_type);
} }
ISC_STATUS API_ROUTINE isc_database_cleanup(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE isc_database_cleanup(ISC_STATUS * status_vector,
@ -414,8 +397,7 @@ ISC_STATUS API_ROUTINE isc_database_cleanup(ISC_STATUS * status_vector,
DatabaseCleanupRoutine *routine, SCHAR * arg) DatabaseCleanupRoutine *routine, SCHAR * arg)
{ {
return gds__database_cleanup(GDS_VAL(status_vector), return gds__database_cleanup(status_vector, (FRBRD **) db_handle,
(FRBRD **) db_handle,
routine, (SLONG) arg); routine, (SLONG) arg);
} }
@ -425,16 +407,14 @@ ISC_STATUS API_ROUTINE gds__database_info(ISC_STATUS * status_vector,
SCHAR * msg, SCHAR * msg,
SSHORT buffer_length, SCHAR * buffer) SSHORT buffer_length, SCHAR * buffer)
{ {
return isc_database_info(GDS_VAL(status_vector), return isc_database_info(status_vector, db_handle, msg_length,
GDS_VAL(db_handle), msg, buffer_length, buffer);
msg_length,
GDS_VAL(msg), buffer_length, GDS_VAL(buffer));
} }
ISC_STATUS API_ROUTINE gds__detach_database(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__detach_database(ISC_STATUS * status_vector,
FRBRD **db_handle) FRBRD **db_handle)
{ {
return isc_detach_database(GDS_VAL(status_vector), GDS_VAL(db_handle)); return isc_detach_database(status_vector, db_handle);
} }
ISC_STATUS API_ROUTINE gds__get_segment(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__get_segment(ISC_STATUS * status_vector,
@ -442,10 +422,8 @@ ISC_STATUS API_ROUTINE gds__get_segment(ISC_STATUS * status_vector,
USHORT * return_length, USHORT * return_length,
USHORT buffer_length, SCHAR * buffer) USHORT buffer_length, SCHAR * buffer)
{ {
return isc_get_segment(GDS_VAL(status_vector), return isc_get_segment(status_vector, blob_handle, return_length,
GDS_VAL(blob_handle), buffer_length, buffer);
GDS_VAL(return_length),
buffer_length, GDS_VAL(buffer));
} }
ISC_STATUS API_ROUTINE gds__get_slice(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__get_slice(ISC_STATUS * status_vector,
@ -459,16 +437,9 @@ ISC_STATUS API_ROUTINE gds__get_slice(ISC_STATUS * status_vector,
SLONG slice_length, SLONG slice_length,
void *slice, SLONG * return_length) void *slice, SLONG * return_length)
{ {
return isc_get_slice(GDS_VAL(status_vector), return isc_get_slice(status_vector, db_handle, tra_handle, array_id,
GDS_VAL(db_handle), sdl_length, sdl, parameters_leng, parameters,
GDS_VAL(tra_handle), slice_length, (SCHAR *) slice, return_length);
GDS_VAL(array_id),
sdl_length,
GDS_VAL(sdl),
parameters_leng,
GDS_VAL(parameters),
slice_length,
GDS_VAL((SCHAR *) slice), GDS_VAL(return_length));
} }
ISC_STATUS API_ROUTINE gds__open_blob(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__open_blob(ISC_STATUS * status_vector,
@ -476,10 +447,8 @@ ISC_STATUS API_ROUTINE gds__open_blob(ISC_STATUS * status_vector,
FRBRD **tra_handle, FRBRD **tra_handle,
FRBRD **blob_handle, GDS_QUAD * blob_id) FRBRD **blob_handle, GDS_QUAD * blob_id)
{ {
return isc_open_blob(GDS_VAL(status_vector), return isc_open_blob(status_vector, db_handle, tra_handle, blob_handle,
GDS_VAL(db_handle), blob_id);
GDS_VAL(tra_handle),
GDS_VAL(blob_handle), GDS_VAL(blob_id));
} }
ISC_STATUS API_ROUTINE gds__open_blob2(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__open_blob2(ISC_STATUS * status_vector,
@ -489,39 +458,30 @@ ISC_STATUS API_ROUTINE gds__open_blob2(ISC_STATUS * status_vector,
GDS_QUAD * blob_id, GDS_QUAD * blob_id,
SSHORT bpb_length, SCHAR * bpb) SSHORT bpb_length, SCHAR * bpb)
{ {
return isc_open_blob2(GDS_VAL(status_vector), return isc_open_blob2(status_vector, db_handle, tra_handle, blob_handle,
GDS_VAL(db_handle), blob_id, bpb_length,
GDS_VAL(tra_handle), reinterpret_cast<UCHAR*>(bpb));
GDS_VAL(blob_handle),
GDS_VAL(blob_id),
bpb_length,
reinterpret_cast<UCHAR*>(GDS_VAL(bpb)));
} }
ISC_STATUS API_ROUTINE gds__prepare_transaction(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__prepare_transaction(ISC_STATUS * status_vector,
FRBRD **tra_handle) FRBRD **tra_handle)
{ {
return isc_prepare_transaction(GDS_VAL(status_vector), return isc_prepare_transaction(status_vector, tra_handle);
GDS_VAL(tra_handle));
} }
ISC_STATUS API_ROUTINE gds__prepare_transaction2(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__prepare_transaction2(ISC_STATUS * status_vector,
FRBRD **tra_handle, FRBRD **tra_handle,
SSHORT msg_length, SCHAR * msg) SSHORT msg_length, SCHAR * msg)
{ {
return isc_prepare_transaction2(GDS_VAL(status_vector), return isc_prepare_transaction2(status_vector, tra_handle, msg_length,
GDS_VAL(tra_handle), reinterpret_cast<UCHAR*>(msg));
msg_length,
reinterpret_cast<UCHAR*>(GDS_VAL(msg)));
} }
ISC_STATUS API_ROUTINE gds__put_segment(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__put_segment(ISC_STATUS * status_vector,
FRBRD **blob_handle, FRBRD **blob_handle,
USHORT segment_length, SCHAR * segment) USHORT segment_length, SCHAR * segment)
{ {
return isc_put_segment(GDS_VAL(status_vector), return isc_put_segment(status_vector, blob_handle, segment_length, segment);
GDS_VAL(blob_handle),
segment_length, GDS_VAL(segment));
} }
ISC_STATUS API_ROUTINE gds__put_slice(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__put_slice(ISC_STATUS * status_vector,
@ -534,15 +494,9 @@ ISC_STATUS API_ROUTINE gds__put_slice(ISC_STATUS * status_vector,
SLONG * parameters, SLONG * parameters,
SLONG slice_length, void *slice) SLONG slice_length, void *slice)
{ {
return isc_put_slice(GDS_VAL(status_vector), return isc_put_slice(status_vector, db_handle, tra_handle, array_id,
GDS_VAL(db_handle), sdl_length, sdl, parameters_leng, parameters,
GDS_VAL(tra_handle), slice_length, (SCHAR *) slice);
GDS_VAL(array_id),
sdl_length,
GDS_VAL(sdl),
parameters_leng,
GDS_VAL(parameters),
slice_length, GDS_VAL((SCHAR *) slice));
} }
ISC_STATUS API_ROUTINE gds__que_events(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__que_events(ISC_STATUS * status_vector,
@ -552,13 +506,8 @@ ISC_STATUS API_ROUTINE gds__que_events(ISC_STATUS * status_vector,
SCHAR * events, SCHAR * events,
void (*ast_address) (), void *ast_argument) void (*ast_address) (), void *ast_argument)
{ {
return isc_que_events(GDS_VAL(status_vector), return isc_que_events(status_vector, db_handle, event_id, events_length,
GDS_VAL(db_handle), events, ast_address, (int *) ast_argument);
GDS_VAL(event_id),
events_length,
GDS_VAL(events),
GDS_VAL(ast_address),
GDS_VAL((int *) ast_argument));
} }
ISC_STATUS API_ROUTINE gds__receive(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__receive(ISC_STATUS * status_vector,
@ -567,10 +516,8 @@ ISC_STATUS API_ROUTINE gds__receive(ISC_STATUS * status_vector,
SSHORT msg_length, SSHORT msg_length,
void *msg, SSHORT req_level) void *msg, SSHORT req_level)
{ {
return isc_receive(GDS_VAL(status_vector), return isc_receive(status_vector, req_handle, msg_type,
GDS_VAL(req_handle), msg_length, (SCHAR *) msg, req_level);
msg_type,
msg_length, GDS_VAL((SCHAR *) msg), req_level);
} }
ISC_STATUS API_ROUTINE gds__reconnect_transaction(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__reconnect_transaction(ISC_STATUS * status_vector,
@ -578,16 +525,14 @@ ISC_STATUS API_ROUTINE gds__reconnect_transaction(ISC_STATUS * status_vector,
FRBRD **tra_handle, FRBRD **tra_handle,
SSHORT msg_length, SCHAR * msg) SSHORT msg_length, SCHAR * msg)
{ {
return isc_reconnect_transaction(GDS_VAL(status_vector), return isc_reconnect_transaction(status_vector, db_handle, tra_handle,
GDS_VAL(db_handle), msg_length, msg);
GDS_VAL(tra_handle),
msg_length, GDS_VAL(msg));
} }
ISC_STATUS API_ROUTINE gds__release_request(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__release_request(ISC_STATUS * status_vector,
FRBRD **req_handle) FRBRD **req_handle)
{ {
return isc_release_request(GDS_VAL(status_vector), GDS_VAL(req_handle)); return isc_release_request(status_vector, req_handle);
} }
ISC_STATUS API_ROUTINE gds__request_info(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__request_info(ISC_STATUS * status_vector,
@ -597,26 +542,21 @@ ISC_STATUS API_ROUTINE gds__request_info(ISC_STATUS * status_vector,
SCHAR * msg, SCHAR * msg,
SSHORT buffer_length, SCHAR * buffer) SSHORT buffer_length, SCHAR * buffer)
{ {
return isc_request_info(GDS_VAL(status_vector), return isc_request_info(status_vector, req_handle, req_level, msg_length,
GDS_VAL(req_handle), msg, buffer_length, buffer);
req_level,
msg_length,
GDS_VAL(msg), buffer_length, GDS_VAL(buffer));
} }
ISC_STATUS API_ROUTINE gds__rollback_transaction(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__rollback_transaction(ISC_STATUS * status_vector,
FRBRD **tra_handle) FRBRD **tra_handle)
{ {
return isc_rollback_transaction(GDS_VAL(status_vector), return isc_rollback_transaction(status_vector, tra_handle);
GDS_VAL(tra_handle));
} }
ISC_STATUS API_ROUTINE gds__seek_blob(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__seek_blob(ISC_STATUS * status_vector,
FRBRD **blob_handle, FRBRD **blob_handle,
SSHORT mode, SLONG offset, SLONG * result) SSHORT mode, SLONG offset, SLONG * result)
{ {
return isc_seek_blob(GDS_VAL(status_vector), return isc_seek_blob(status_vector, blob_handle, mode, offset, result);
GDS_VAL(blob_handle), mode, offset, GDS_VAL(result));
} }
ISC_STATUS API_ROUTINE gds__send(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__send(ISC_STATUS * status_vector,
@ -624,9 +564,8 @@ ISC_STATUS API_ROUTINE gds__send(ISC_STATUS * status_vector,
SSHORT msg_type, SSHORT msg_type,
SSHORT msg_length, void *msg, SSHORT req_level) SSHORT msg_length, void *msg, SSHORT req_level)
{ {
return isc_send(GDS_VAL(status_vector), return isc_send(status_vector, req_handle, msg_type, msg_length,
GDS_VAL(req_handle), (SCHAR *) msg, req_level);
msg_type, msg_length, GDS_VAL((SCHAR *) msg), req_level);
} }
ISC_STATUS API_ROUTINE gds__start_and_send(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__start_and_send(ISC_STATUS * status_vector,
@ -636,29 +575,23 @@ ISC_STATUS API_ROUTINE gds__start_and_send(ISC_STATUS * status_vector,
SSHORT msg_length, SSHORT msg_length,
void *msg, SSHORT req_level) void *msg, SSHORT req_level)
{ {
return isc_start_and_send(GDS_VAL(status_vector), return isc_start_and_send(status_vector, req_handle, tra_handle, msg_type,
GDS_VAL(req_handle), msg_length, (SCHAR *) msg, req_level);
GDS_VAL(tra_handle),
msg_type,
msg_length, GDS_VAL((SCHAR *) msg), req_level);
} }
ISC_STATUS API_ROUTINE gds__start_multiple(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__start_multiple(ISC_STATUS * status_vector,
FRBRD **tra_handle, FRBRD **tra_handle,
SSHORT db_count, void *teb_vector) SSHORT db_count, void *teb_vector)
{ {
return isc_start_multiple(GDS_VAL(status_vector), return isc_start_multiple(status_vector, tra_handle, db_count,
GDS_VAL(tra_handle), (SCHAR *) teb_vector);
db_count, GDS_VAL((SCHAR *) teb_vector));
} }
ISC_STATUS API_ROUTINE gds__start_request(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__start_request(ISC_STATUS * status_vector,
FRBRD **req_handle, FRBRD **req_handle,
FRBRD **tra_handle, SSHORT req_level) FRBRD **tra_handle, SSHORT req_level)
{ {
return isc_start_request(GDS_VAL(status_vector), return isc_start_request(status_vector, req_handle, tra_handle, req_level);
GDS_VAL(req_handle),
GDS_VAL(tra_handle), req_level);
} }
ISC_STATUS API_ROUTINE gds__transaction_info(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__transaction_info(ISC_STATUS * status_vector,
@ -667,26 +600,21 @@ ISC_STATUS API_ROUTINE gds__transaction_info(ISC_STATUS * status_vector,
SCHAR * msg, SCHAR * msg,
SSHORT buffer_length, SCHAR * buffer) SSHORT buffer_length, SCHAR * buffer)
{ {
return isc_transaction_info(GDS_VAL(status_vector), return isc_transaction_info(status_vector, tra_handle, msg_length,
GDS_VAL(tra_handle), msg, buffer_length, buffer);
msg_length,
GDS_VAL(msg), buffer_length, GDS_VAL(buffer));
} }
ISC_STATUS API_ROUTINE gds__unwind_request(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__unwind_request(ISC_STATUS * status_vector,
FRBRD **req_handle, SSHORT req_level) FRBRD **req_handle, SSHORT req_level)
{ {
return isc_unwind_request(GDS_VAL(status_vector), return isc_unwind_request(status_vector, req_handle, req_level);
GDS_VAL(req_handle), req_level);
} }
ISC_STATUS API_ROUTINE gds__ddl(ISC_STATUS * status_vector, ISC_STATUS API_ROUTINE gds__ddl(ISC_STATUS * status_vector,
FRBRD **db_handle, FRBRD **db_handle,
FRBRD **tra_handle, SSHORT ddl_length, SCHAR * ddl) FRBRD **tra_handle, SSHORT ddl_length, SCHAR * ddl)
{ {
return isc_ddl(GDS_VAL(status_vector), return isc_ddl(status_vector, db_handle, tra_handle, ddl_length, ddl);
GDS_VAL(db_handle),
GDS_VAL(tra_handle), ddl_length, GDS_VAL(ddl));
} }
void API_ROUTINE isc_event_counts( void API_ROUTINE isc_event_counts(
@ -694,8 +622,7 @@ void API_ROUTINE isc_event_counts(
SSHORT length, SSHORT length,
SCHAR * before, SCHAR * after) SCHAR * before, SCHAR * after)
{ {
gds__event_counts(GDS_VAL(result_vector), gds__event_counts(result_vector, length, before, after);
length, GDS_VAL(before), GDS_VAL(after));
} }
SLONG API_ROUTINE isc_free(SCHAR * blk) SLONG API_ROUTINE isc_free(SCHAR * blk)
@ -707,12 +634,12 @@ SLONG API_ROUTINE isc_free(SCHAR * blk)
SLONG API_ROUTINE isc_ftof(SCHAR * string1, SLONG API_ROUTINE isc_ftof(SCHAR * string1,
USHORT length1, SCHAR * string2, USHORT length2) USHORT length1, SCHAR * string2, USHORT length2)
{ {
return gds__ftof(GDS_VAL(string1), length1, GDS_VAL(string2), length2); return gds__ftof(string1, length1, string2, length2);
} }
void API_ROUTINE isc_get_client_version(SCHAR * buffer) void API_ROUTINE isc_get_client_version(SCHAR * buffer)
{ {
gds__get_client_version(GDS_VAL(buffer)); gds__get_client_version(buffer);
} }
int API_ROUTINE isc_get_client_major_version() int API_ROUTINE isc_get_client_major_version()
@ -735,7 +662,7 @@ ISC_STATUS API_ROUTINE isc_print_blr(SCHAR * blr,
ISC_STATUS API_ROUTINE isc_print_status(ISC_STATUS * status_vector) ISC_STATUS API_ROUTINE isc_print_status(ISC_STATUS * status_vector)
{ {
return gds__print_status(GDS_VAL(status_vector)); return gds__print_status(status_vector);
} }
void API_ROUTINE isc_qtoq(GDS_QUAD * quad1, GDS_QUAD * quad2) void API_ROUTINE isc_qtoq(GDS_QUAD * quad1, GDS_QUAD * quad2)
@ -745,7 +672,7 @@ void API_ROUTINE isc_qtoq(GDS_QUAD * quad1, GDS_QUAD * quad2)
SLONG API_ROUTINE isc_sqlcode(ISC_STATUS * status_vector) SLONG API_ROUTINE isc_sqlcode(ISC_STATUS * status_vector)
{ {
return gds__sqlcode(GDS_VAL(status_vector)); return gds__sqlcode(status_vector);
} }
void API_ROUTINE isc_sqlcode_s(ISC_STATUS * status_vector, ULONG * sqlcode) void API_ROUTINE isc_sqlcode_s(ISC_STATUS * status_vector, ULONG * sqlcode)
@ -785,10 +712,8 @@ ISC_STATUS API_ROUTINE isc_wait_for_event(ISC_STATUS * status_vector,
SSHORT events_length, SSHORT events_length,
SCHAR * events, SCHAR * events_update) SCHAR * events, SCHAR * events_update)
{ {
return gds__event_wait(GDS_VAL(status_vector), return gds__event_wait(status_vector, db_handle, events_length,
GDS_VAL(db_handle), events, events_update);
events_length,
GDS_VAL(events), GDS_VAL(events_update));
} }
#endif #endif

View File

@ -2063,9 +2063,9 @@ USHORT API_ROUTINE gds__parse_bpb2(USHORT bpb_length,
SLONG API_ROUTINE gds__ftof(SCHAR * string, SLONG API_ROUTINE gds__ftof(SCHAR * string,
USHORT GDS_VAL(length1), USHORT length1,
SCHAR * field, SCHAR * field,
USHORT GDS_VAL(length2)) USHORT length2)
{ {
/************************************** /**************************************
* *
@ -2081,9 +2081,9 @@ SLONG API_ROUTINE gds__ftof(SCHAR * string,
**************************************/ **************************************/
USHORT l, fill; USHORT l, fill;
fill = GDS_VAL(length2) - GDS_VAL(length1); fill = length2 - length1;
if ((l = MIN(GDS_VAL(length1), GDS_VAL(length2))) > 0) if ((l = MIN(length1, length2)) > 0)
do do
*field++ = *string++; *field++ = *string++;
while (--l); while (--l);

View File

@ -27,11 +27,6 @@
#ifndef JRD_GDS_PROTO_H #ifndef JRD_GDS_PROTO_H
#define JRD_GDS_PROTO_H #define JRD_GDS_PROTO_H
#ifndef GDS_VAL
#define GDS_VAL(val) (val)
#define GDS_REF(val) (&val)
#endif
#ifndef IB_PREFIX_TYPE #ifndef IB_PREFIX_TYPE
#define IB_PREFIX_TYPE 0 #define IB_PREFIX_TYPE 0
#define IB_PREFIX_LOCK_TYPE 1 #define IB_PREFIX_LOCK_TYPE 1
@ -114,8 +109,8 @@ ISC_STATUS API_ROUTINE gds__print_status(ISC_STATUS*);
USHORT API_ROUTINE gds__parse_bpb(USHORT, UCHAR*, USHORT*, USHORT*); USHORT API_ROUTINE gds__parse_bpb(USHORT, UCHAR*, USHORT*, USHORT*);
USHORT API_ROUTINE gds__parse_bpb2(USHORT, UCHAR*, SSHORT*, SSHORT*, USHORT API_ROUTINE gds__parse_bpb2(USHORT, UCHAR*, SSHORT*, SSHORT*,
USHORT*, USHORT*); USHORT*, USHORT*);
SLONG API_ROUTINE gds__ftof(SCHAR*, USHORT GDS_VAL(length1), SCHAR*, SLONG API_ROUTINE gds__ftof(SCHAR*, USHORT length1, SCHAR*,
USHORT GDS_VAL(length2)); USHORT length2);
int API_ROUTINE gds__print_blr(UCHAR*, FPTR_VOID, SCHAR*, SSHORT); int API_ROUTINE gds__print_blr(UCHAR*, FPTR_VOID, SCHAR*, SSHORT);
void API_ROUTINE gds__put_error(TEXT*); void API_ROUTINE gds__put_error(TEXT*);
void API_ROUTINE gds__qtoq(void*, void*); void API_ROUTINE gds__qtoq(void*, void*);

View File

@ -31,11 +31,6 @@
#include "fb_types.h" #include "fb_types.h"
#ifndef GDS_VAL /* duplicate definition in gds_proto.h */
#define GDS_VAL(val) val
#define GDS_REF(val) &val
#endif
#define GDS_EXPORT ISC_EXPORT #define GDS_EXPORT ISC_EXPORT
#define GDS_EXPORT_VARARG ISC_EXPORT_VARARG #define GDS_EXPORT_VARARG ISC_EXPORT_VARARG

View File

@ -2904,20 +2904,16 @@ static void THREAD_ROUTINE sweep_database(UCHAR* database)
} }
THREAD_EXIT; THREAD_EXIT;
gds__attach_database(status_vector, gds__attach_database(status_vector, 0, reinterpret_cast<char*>(database),
0, &db_handle, dpb_length,
reinterpret_cast<char*>(GDS_VAL(database)), reinterpret_cast<char*>(sweep_dpb));
GDS_REF(db_handle),
dpb_length,
reinterpret_cast<char*>(GDS_VAL(sweep_dpb)));
assert (ihandle->ihndl_object == &db_handle); assert (ihandle->ihndl_object == &db_handle);
ihandle->ihndl_object = NULL; ihandle->ihndl_object = NULL;
if (db_handle) if (db_handle)
{ {
gds__detach_database(status_vector, gds__detach_database(status_vector, &db_handle);
GDS_REF(db_handle));
} }
gds__free(database); gds__free(database);

View File

@ -355,9 +355,7 @@ int API_ROUTINE gds__blob_size(
#pragma FB_COMPILER_MESSAGE("Fix! Bad casts.") #pragma FB_COMPILER_MESSAGE("Fix! Bad casts.")
if (gds__blob_info(status_vector, if (gds__blob_info(status_vector, b, sizeof(blob_items),
GDS_VAL(b),
sizeof(blob_items),
const_cast < char *>(blob_items), const_cast < char *>(blob_items),
sizeof(buffer), buffer)) { sizeof(buffer), buffer)) {
gds__print_status(status_vector); gds__print_status(status_vector);
@ -768,7 +766,7 @@ SLONG API_ROUTINE gds__event_block(SCHAR ** event_buffer,
and counts for each argument */ and counts for each argument */
length = 1; length = 1;
i = GDS_VAL(count); i = count;
while (i--) { while (i--) {
q = va_arg(ptr, SCHAR *); q = va_arg(ptr, SCHAR *);
length += strlen(q) + 5; length += strlen(q) + 5;
@ -800,7 +798,7 @@ SLONG API_ROUTINE gds__event_block(SCHAR ** event_buffer,
VA_START(ptr, count); VA_START(ptr, count);
i = GDS_VAL(count); i = count;
while (i--) { while (i--) {
q = va_arg(ptr, SCHAR *); q = va_arg(ptr, SCHAR *);
@ -822,7 +820,7 @@ SLONG API_ROUTINE gds__event_block(SCHAR ** event_buffer,
USHORT API_ROUTINE gds__event_block_a(SCHAR ** event_buffer, USHORT API_ROUTINE gds__event_block_a(SCHAR ** event_buffer,
SCHAR ** result_buffer, SCHAR ** result_buffer,
SSHORT GDS_VAL(count), SSHORT count,
SCHAR ** name_buffer) SCHAR ** name_buffer)
{ {
/************************************** /**************************************
@ -847,7 +845,7 @@ USHORT API_ROUTINE gds__event_block_a(SCHAR ** event_buffer,
setting initial length to include version setting initial length to include version
and counts for each argument */ and counts for each argument */
i = GDS_VAL(count); i = count;
nb = name_buffer; nb = name_buffer;
length = 0; length = 0;
while (i--) { while (i--) {
@ -859,7 +857,7 @@ USHORT API_ROUTINE gds__event_block_a(SCHAR ** event_buffer,
length += end - q + 1 + 5; length += end - q + 1 + 5;
} }
i = GDS_VAL(count); i = count;
p = *event_buffer = p = *event_buffer =
(SCHAR *) gds__alloc((SLONG) (sizeof(SCHAR) * length)); (SCHAR *) gds__alloc((SLONG) (sizeof(SCHAR) * length));
/* FREE: unknown */ /* FREE: unknown */
@ -928,7 +926,7 @@ SCHAR ** name_buffer, SSHORT * return_count)
void API_ROUTINE gds__event_counts( void API_ROUTINE gds__event_counts(
ULONG * result_vector, ULONG * result_vector,
SSHORT GDS_VAL(buffer_length), SSHORT buffer_length,
SCHAR * event_buffer, SCHAR * event_buffer,
SCHAR * result_buffer) SCHAR * result_buffer)
{ {
@ -952,7 +950,7 @@ SCHAR * result_buffer)
vec = result_vector; vec = result_vector;
p = event_buffer; p = event_buffer;
q = result_buffer; q = result_buffer;
length = GDS_VAL(buffer_length); length = buffer_length;
end = p + length; end = p + length;
/* analyze the event blocks, getting the delta for each event */ /* analyze the event blocks, getting the delta for each event */
@ -1068,7 +1066,7 @@ void API_ROUTINE gds__map_blobs(int *handle1, int *handle2)
#if !(defined REQUESTER) #if !(defined REQUESTER)
void API_ROUTINE gds__set_debug(int GDS_VAL(value)) void API_ROUTINE gds__set_debug(int value)
{ {
/************************************** /**************************************
* *
@ -1503,13 +1501,12 @@ int API_ROUTINE BLOB_close(BSTREAM * bstream)
if (bstream->bstr_mode & BSTR_output) { if (bstream->bstr_mode & BSTR_output) {
l = (bstream->bstr_ptr - bstream->bstr_buffer); l = (bstream->bstr_ptr - bstream->bstr_buffer);
if (l > 0) if (l > 0)
if (gds__put_segment(status_vector, if (gds__put_segment(status_vector, &bstream->bstr_blob, l,
GDS_REF(bstream->bstr_blob), bstream->bstr_buffer))
l, return FALSE;
GDS_VAL(bstream->bstr_buffer))) return FALSE;
} }
gds__close_blob(status_vector, GDS_REF(bstream->bstr_blob)); gds__close_blob(status_vector, &bstream->bstr_blob);
if (bstream->bstr_mode & BSTR_alloc) if (bstream->bstr_mode & BSTR_alloc)
gds__free(bstream->bstr_buffer); gds__free(bstream->bstr_buffer);
@ -1753,11 +1750,9 @@ int API_ROUTINE BLOB_get(BSTREAM * bstream)
if (--bstream->bstr_cnt >= 0) if (--bstream->bstr_cnt >= 0)
return *bstream->bstr_ptr++ & 0377; return *bstream->bstr_ptr++ & 0377;
gds__get_segment(status_vector, gds__get_segment(status_vector, &bstream->bstr_blob,
GDS_REF(bstream->bstr_blob), reinterpret_cast <USHORT *>(&bstream->bstr_cnt),
reinterpret_cast < bstream->bstr_length, bstream->bstr_buffer);
USHORT * >(GDS_REF(bstream->bstr_cnt)),
bstream->bstr_length, GDS_VAL(bstream->bstr_buffer));
if (status_vector[1] && status_vector[1] != gds_segment) { if (status_vector[1] && status_vector[1] != gds_segment) {
bstream->bstr_ptr = 0; bstream->bstr_ptr = 0;
bstream->bstr_cnt = 0; bstream->bstr_cnt = 0;
@ -1888,22 +1883,16 @@ BSTREAM *API_ROUTINE Bopen(GDS_QUAD * blob_id,
blob = NULL; blob = NULL;
if (*mode == 'w' || *mode == 'W') { if (*mode == 'w' || *mode == 'W') {
if (gds__create_blob2(status_vector, if (gds__create_blob2(status_vector, &database, &transaction, &blob,
GDS_REF(database), blob_id, bpb_length,
GDS_REF(transaction), reinterpret_cast < char *>(bpb)))
GDS_REF(blob), return NULL;
GDS_VAL(blob_id),
bpb_length,
reinterpret_cast < char *>(bpb))) return NULL;
} }
else if (*mode == 'r' || *mode == 'R') { else if (*mode == 'r' || *mode == 'R') {
if (gds__open_blob2(status_vector, if (gds__open_blob2(status_vector, &database, &transaction, &blob,
GDS_REF(database), blob_id, bpb_length,
GDS_REF(transaction), reinterpret_cast < char *>(bpb)))
GDS_REF(blob), return NULL;
GDS_VAL(blob_id),
bpb_length,
reinterpret_cast < char *>(bpb))) return NULL;
} }
else else
return NULL; return NULL;
@ -2005,9 +1994,8 @@ int API_ROUTINE BLOB_put(SCHAR x, BSTREAM * bstream)
*bstream->bstr_ptr++ = (x & 0377); *bstream->bstr_ptr++ = (x & 0377);
l = (bstream->bstr_ptr - bstream->bstr_buffer); l = (bstream->bstr_ptr - bstream->bstr_buffer);
if (gds__put_segment(status_vector, if (gds__put_segment(status_vector, &bstream->bstr_blob,
GDS_REF(bstream->bstr_blob), l, bstream->bstr_buffer)) {
l, GDS_VAL(bstream->bstr_buffer))) {
return FALSE; return FALSE;
} }
bstream->bstr_cnt = bstream->bstr_length; bstream->bstr_cnt = bstream->bstr_length;
@ -2038,9 +2026,7 @@ static display(GDS_QUAD * blob_id, void *database, void *transaction)
/* Open the blob. If it failed, what the hell -- just return failure */ /* Open the blob. If it failed, what the hell -- just return failure */
blob = NULL; blob = NULL;
if (gds__open_blob(status_vector, if (gds__open_blob(status_vector, &database, &transaction, &blob, blob_id)) {
GDS_REF(database),
GDS_REF(transaction), GDS_REF(blob), GDS_VAL(blob_id))) {
gds__print_status(status_vector); gds__print_status(status_vector);
return FALSE; return FALSE;
} }
@ -2050,8 +2036,7 @@ static display(GDS_QUAD * blob_id, void *database, void *transaction)
short_length = sizeof(buffer); short_length = sizeof(buffer);
for (;;) { for (;;) {
gds__get_segment(status_vector, gds__get_segment(status_vector, &blob, &l, short_length, buffer);
GDS_REF(blob), GDS_REF(l), short_length, buffer);
if (status_vector[1] && status_vector[1] != gds_segment) { if (status_vector[1] && status_vector[1] != gds_segment) {
if (status_vector[1] != gds_segstr_eof) if (status_vector[1] != gds_segstr_eof)
gds__print_status(status_vector); gds__print_status(status_vector);
@ -2064,7 +2049,7 @@ static display(GDS_QUAD * blob_id, void *database, void *transaction)
/* Close the blob */ /* Close the blob */
gds__close_blob(status_vector, GDS_REF(blob)); gds__close_blob(status_vector, &blob);
return TRUE; return TRUE;
} }
@ -2098,11 +2083,7 @@ static int dump(
/* Open the blob. If it failed, what the hell -- just return failure */ /* Open the blob. If it failed, what the hell -- just return failure */
blob = NULL; blob = NULL;
if (gds__open_blob2(status_vector, if (gds__open_blob2(status_vector, &database, &transaction, &blob, blob_id,
GDS_REF(database),
GDS_REF(transaction),
GDS_REF(blob),
GDS_VAL(blob_id),
bpb_length, reinterpret_cast < char *>(bpb))) { bpb_length, reinterpret_cast < char *>(bpb))) {
gds__print_status(status_vector); gds__print_status(status_vector);
return FALSE; return FALSE;
@ -2113,9 +2094,8 @@ static int dump(
short_length = sizeof(buffer); short_length = sizeof(buffer);
for (;;) { for (;;) {
gds__get_segment(status_vector, gds__get_segment(status_vector, &blob,
GDS_REF(blob), reinterpret_cast < USHORT * >(&l),
reinterpret_cast < USHORT * >(GDS_REF(l)),
short_length, buffer); short_length, buffer);
if (status_vector[1] && status_vector[1] != gds_segment) { if (status_vector[1] && status_vector[1] != gds_segment) {
if (status_vector[1] != gds_segstr_eof) if (status_vector[1] != gds_segstr_eof)
@ -2131,8 +2111,7 @@ static int dump(
/* Close the blob */ /* Close the blob */
gds__close_blob(status_vector, gds__close_blob(status_vector, &blob);
GDS_REF(blob));
return TRUE; return TRUE;
} }
@ -2306,11 +2285,8 @@ static int load(
/* Open the blob. If it failed, what the hell -- just return failure */ /* Open the blob. If it failed, what the hell -- just return failure */
blob = NULL; blob = NULL;
if (gds__create_blob(status_vector, if (gds__create_blob(status_vector, &database, &transaction, &blob,
GDS_REF(database), blob_id)) {
GDS_REF(transaction),
GDS_REF(blob),
GDS_VAL(blob_id))) {
gds__print_status(status_vector); gds__print_status(status_vector);
return FALSE; return FALSE;
} }
@ -2328,28 +2304,22 @@ static int load(
if ((c != '\n') && p < buffer_end) if ((c != '\n') && p < buffer_end)
continue; continue;
l = p - buffer; l = p - buffer;
if (gds__put_segment if (gds__put_segment(status_vector, &blob, l, buffer)) {
(status_vector, GDS_REF(blob), l,
buffer)) {
gds__print_status(status_vector); gds__print_status(status_vector);
gds__close_blob(status_vector, gds__close_blob(status_vector, &blob);
GDS_REF(blob));
return FALSE; return FALSE;
} }
p = buffer; p = buffer;
} }
if ((l = p - buffer) != 0) if ((l = p - buffer) != 0)
if (gds__put_segment if (gds__put_segment(status_vector, &blob, l, buffer)) {
(status_vector, GDS_REF(blob), l,
buffer)) {
gds__print_status(status_vector); gds__print_status(status_vector);
gds__close_blob(status_vector, GDS_REF(blob)); gds__close_blob(status_vector, &blob);
return FALSE; return FALSE;
} }
gds__close_blob(status_vector, gds__close_blob(status_vector, &blob);
GDS_REF(blob));
return TRUE; return TRUE;
} }

File diff suppressed because it is too large Load Diff