mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 06:43:04 +01:00
-Remove GDS_VAL and GDS_REF (Final commit)
This commit is contained in:
parent
177e889687
commit
a86a19246d
213
src/jrd/alt.cpp
213
src/jrd/alt.cpp
@ -300,10 +300,8 @@ ISC_STATUS API_ROUTINE gds__attach_database(ISC_STATUS * status_vector,
|
||||
FRBRD **db_handle,
|
||||
SSHORT dpb_length, SCHAR * dpb)
|
||||
{
|
||||
return isc_attach_database(GDS_VAL(status_vector),
|
||||
file_length,
|
||||
GDS_VAL(file_name),
|
||||
GDS_VAL(db_handle), dpb_length, GDS_VAL(dpb));
|
||||
return isc_attach_database(status_vector, file_length, file_name,
|
||||
db_handle, dpb_length, dpb);
|
||||
}
|
||||
|
||||
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,
|
||||
SSHORT buffer_length, SCHAR * buffer)
|
||||
{
|
||||
return isc_blob_info(GDS_VAL(status_vector),
|
||||
GDS_VAL(blob_handle),
|
||||
msg_length,
|
||||
GDS_VAL(msg), buffer_length, GDS_VAL(buffer));
|
||||
return isc_blob_info(status_vector, blob_handle, msg_length,
|
||||
msg, buffer_length, buffer);
|
||||
}
|
||||
|
||||
ISC_STATUS API_ROUTINE gds__cancel_blob(ISC_STATUS * status_vector,
|
||||
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,
|
||||
FRBRD **db_handle, SLONG * event_id)
|
||||
{
|
||||
return isc_cancel_events(GDS_VAL(status_vector),
|
||||
GDS_VAL(db_handle), GDS_VAL(event_id));
|
||||
return isc_cancel_events(status_vector, db_handle, event_id);
|
||||
}
|
||||
|
||||
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,
|
||||
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,
|
||||
FRBRD **tra_handle)
|
||||
{
|
||||
return isc_commit_transaction(GDS_VAL(status_vector),
|
||||
GDS_VAL(tra_handle));
|
||||
return isc_commit_transaction(status_vector, tra_handle);
|
||||
}
|
||||
|
||||
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,
|
||||
SSHORT blr_length, SCHAR * blr)
|
||||
{
|
||||
return isc_compile_request(GDS_VAL(status_vector),
|
||||
GDS_VAL(db_handle),
|
||||
GDS_VAL(req_handle), blr_length, GDS_VAL(blr));
|
||||
return isc_compile_request(status_vector, db_handle, req_handle, blr_length,
|
||||
blr);
|
||||
}
|
||||
|
||||
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,
|
||||
SSHORT blr_length, SCHAR * blr)
|
||||
{
|
||||
return isc_compile_request2(GDS_VAL(status_vector),
|
||||
GDS_VAL(db_handle),
|
||||
GDS_VAL(req_handle),
|
||||
blr_length, GDS_VAL(blr));
|
||||
return isc_compile_request2(status_vector, db_handle, req_handle, blr_length,
|
||||
blr);
|
||||
}
|
||||
|
||||
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 **blob_handle, GDS_QUAD * blob_id)
|
||||
{
|
||||
return isc_create_blob(GDS_VAL(status_vector),
|
||||
GDS_VAL(db_handle),
|
||||
GDS_VAL(tra_handle),
|
||||
GDS_VAL(blob_handle), GDS_VAL(blob_id));
|
||||
return isc_create_blob(status_vector, db_handle, tra_handle, blob_handle,
|
||||
blob_id);
|
||||
}
|
||||
|
||||
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,
|
||||
SSHORT bpb_length, SCHAR * bpb)
|
||||
{
|
||||
return isc_create_blob2(GDS_VAL(status_vector),
|
||||
GDS_VAL(db_handle),
|
||||
GDS_VAL(tra_handle),
|
||||
GDS_VAL(blob_handle),
|
||||
GDS_VAL(blob_id), bpb_length, GDS_VAL(bpb));
|
||||
return isc_create_blob2(status_vector, db_handle, tra_handle, blob_handle,
|
||||
blob_id, bpb_length, bpb);
|
||||
}
|
||||
|
||||
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,
|
||||
SCHAR * dpb, SSHORT db_type)
|
||||
{
|
||||
return isc_create_database(GDS_VAL(status_vector),
|
||||
file_length,
|
||||
GDS_VAL(file_name),
|
||||
GDS_VAL(db_handle),
|
||||
dpb_length, GDS_VAL(dpb), db_type);
|
||||
return isc_create_database(status_vector, file_length, file_name, db_handle,
|
||||
dpb_length, dpb, db_type);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
return gds__database_cleanup(GDS_VAL(status_vector),
|
||||
(FRBRD **) db_handle,
|
||||
return gds__database_cleanup(status_vector, (FRBRD **) db_handle,
|
||||
routine, (SLONG) arg);
|
||||
}
|
||||
|
||||
@ -425,16 +407,14 @@ ISC_STATUS API_ROUTINE gds__database_info(ISC_STATUS * status_vector,
|
||||
SCHAR * msg,
|
||||
SSHORT buffer_length, SCHAR * buffer)
|
||||
{
|
||||
return isc_database_info(GDS_VAL(status_vector),
|
||||
GDS_VAL(db_handle),
|
||||
msg_length,
|
||||
GDS_VAL(msg), buffer_length, GDS_VAL(buffer));
|
||||
return isc_database_info(status_vector, db_handle, msg_length,
|
||||
msg, buffer_length, buffer);
|
||||
}
|
||||
|
||||
ISC_STATUS API_ROUTINE gds__detach_database(ISC_STATUS * status_vector,
|
||||
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,
|
||||
@ -442,10 +422,8 @@ ISC_STATUS API_ROUTINE gds__get_segment(ISC_STATUS * status_vector,
|
||||
USHORT * return_length,
|
||||
USHORT buffer_length, SCHAR * buffer)
|
||||
{
|
||||
return isc_get_segment(GDS_VAL(status_vector),
|
||||
GDS_VAL(blob_handle),
|
||||
GDS_VAL(return_length),
|
||||
buffer_length, GDS_VAL(buffer));
|
||||
return isc_get_segment(status_vector, blob_handle, return_length,
|
||||
buffer_length, buffer);
|
||||
}
|
||||
|
||||
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,
|
||||
void *slice, SLONG * return_length)
|
||||
{
|
||||
return isc_get_slice(GDS_VAL(status_vector),
|
||||
GDS_VAL(db_handle),
|
||||
GDS_VAL(tra_handle),
|
||||
GDS_VAL(array_id),
|
||||
sdl_length,
|
||||
GDS_VAL(sdl),
|
||||
parameters_leng,
|
||||
GDS_VAL(parameters),
|
||||
slice_length,
|
||||
GDS_VAL((SCHAR *) slice), GDS_VAL(return_length));
|
||||
return isc_get_slice(status_vector, db_handle, tra_handle, array_id,
|
||||
sdl_length, sdl, parameters_leng, parameters,
|
||||
slice_length, (SCHAR *) slice, return_length);
|
||||
}
|
||||
|
||||
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 **blob_handle, GDS_QUAD * blob_id)
|
||||
{
|
||||
return isc_open_blob(GDS_VAL(status_vector),
|
||||
GDS_VAL(db_handle),
|
||||
GDS_VAL(tra_handle),
|
||||
GDS_VAL(blob_handle), GDS_VAL(blob_id));
|
||||
return isc_open_blob(status_vector, db_handle, tra_handle, blob_handle,
|
||||
blob_id);
|
||||
}
|
||||
|
||||
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,
|
||||
SSHORT bpb_length, SCHAR * bpb)
|
||||
{
|
||||
return isc_open_blob2(GDS_VAL(status_vector),
|
||||
GDS_VAL(db_handle),
|
||||
GDS_VAL(tra_handle),
|
||||
GDS_VAL(blob_handle),
|
||||
GDS_VAL(blob_id),
|
||||
bpb_length,
|
||||
reinterpret_cast<UCHAR*>(GDS_VAL(bpb)));
|
||||
return isc_open_blob2(status_vector, db_handle, tra_handle, blob_handle,
|
||||
blob_id, bpb_length,
|
||||
reinterpret_cast<UCHAR*>(bpb));
|
||||
}
|
||||
|
||||
ISC_STATUS API_ROUTINE gds__prepare_transaction(ISC_STATUS * status_vector,
|
||||
FRBRD **tra_handle)
|
||||
{
|
||||
return isc_prepare_transaction(GDS_VAL(status_vector),
|
||||
GDS_VAL(tra_handle));
|
||||
return isc_prepare_transaction(status_vector, tra_handle);
|
||||
}
|
||||
|
||||
ISC_STATUS API_ROUTINE gds__prepare_transaction2(ISC_STATUS * status_vector,
|
||||
FRBRD **tra_handle,
|
||||
SSHORT msg_length, SCHAR * msg)
|
||||
{
|
||||
return isc_prepare_transaction2(GDS_VAL(status_vector),
|
||||
GDS_VAL(tra_handle),
|
||||
msg_length,
|
||||
reinterpret_cast<UCHAR*>(GDS_VAL(msg)));
|
||||
return isc_prepare_transaction2(status_vector, tra_handle, msg_length,
|
||||
reinterpret_cast<UCHAR*>(msg));
|
||||
}
|
||||
|
||||
ISC_STATUS API_ROUTINE gds__put_segment(ISC_STATUS * status_vector,
|
||||
FRBRD **blob_handle,
|
||||
USHORT segment_length, SCHAR * segment)
|
||||
{
|
||||
return isc_put_segment(GDS_VAL(status_vector),
|
||||
GDS_VAL(blob_handle),
|
||||
segment_length, GDS_VAL(segment));
|
||||
return isc_put_segment(status_vector, blob_handle, segment_length, segment);
|
||||
}
|
||||
|
||||
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 slice_length, void *slice)
|
||||
{
|
||||
return isc_put_slice(GDS_VAL(status_vector),
|
||||
GDS_VAL(db_handle),
|
||||
GDS_VAL(tra_handle),
|
||||
GDS_VAL(array_id),
|
||||
sdl_length,
|
||||
GDS_VAL(sdl),
|
||||
parameters_leng,
|
||||
GDS_VAL(parameters),
|
||||
slice_length, GDS_VAL((SCHAR *) slice));
|
||||
return isc_put_slice(status_vector, db_handle, tra_handle, array_id,
|
||||
sdl_length, sdl, parameters_leng, parameters,
|
||||
slice_length, (SCHAR *) slice);
|
||||
}
|
||||
|
||||
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,
|
||||
void (*ast_address) (), void *ast_argument)
|
||||
{
|
||||
return isc_que_events(GDS_VAL(status_vector),
|
||||
GDS_VAL(db_handle),
|
||||
GDS_VAL(event_id),
|
||||
events_length,
|
||||
GDS_VAL(events),
|
||||
GDS_VAL(ast_address),
|
||||
GDS_VAL((int *) ast_argument));
|
||||
return isc_que_events(status_vector, db_handle, event_id, events_length,
|
||||
events, ast_address, (int *) ast_argument);
|
||||
}
|
||||
|
||||
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,
|
||||
void *msg, SSHORT req_level)
|
||||
{
|
||||
return isc_receive(GDS_VAL(status_vector),
|
||||
GDS_VAL(req_handle),
|
||||
msg_type,
|
||||
msg_length, GDS_VAL((SCHAR *) msg), req_level);
|
||||
return isc_receive(status_vector, req_handle, msg_type,
|
||||
msg_length, (SCHAR *) msg, req_level);
|
||||
}
|
||||
|
||||
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,
|
||||
SSHORT msg_length, SCHAR * msg)
|
||||
{
|
||||
return isc_reconnect_transaction(GDS_VAL(status_vector),
|
||||
GDS_VAL(db_handle),
|
||||
GDS_VAL(tra_handle),
|
||||
msg_length, GDS_VAL(msg));
|
||||
return isc_reconnect_transaction(status_vector, db_handle, tra_handle,
|
||||
msg_length, msg);
|
||||
}
|
||||
|
||||
ISC_STATUS API_ROUTINE gds__release_request(ISC_STATUS * status_vector,
|
||||
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,
|
||||
@ -597,26 +542,21 @@ ISC_STATUS API_ROUTINE gds__request_info(ISC_STATUS * status_vector,
|
||||
SCHAR * msg,
|
||||
SSHORT buffer_length, SCHAR * buffer)
|
||||
{
|
||||
return isc_request_info(GDS_VAL(status_vector),
|
||||
GDS_VAL(req_handle),
|
||||
req_level,
|
||||
msg_length,
|
||||
GDS_VAL(msg), buffer_length, GDS_VAL(buffer));
|
||||
return isc_request_info(status_vector, req_handle, req_level, msg_length,
|
||||
msg, buffer_length, buffer);
|
||||
}
|
||||
|
||||
ISC_STATUS API_ROUTINE gds__rollback_transaction(ISC_STATUS * status_vector,
|
||||
FRBRD **tra_handle)
|
||||
{
|
||||
return isc_rollback_transaction(GDS_VAL(status_vector),
|
||||
GDS_VAL(tra_handle));
|
||||
return isc_rollback_transaction(status_vector, tra_handle);
|
||||
}
|
||||
|
||||
ISC_STATUS API_ROUTINE gds__seek_blob(ISC_STATUS * status_vector,
|
||||
FRBRD **blob_handle,
|
||||
SSHORT mode, SLONG offset, SLONG * result)
|
||||
{
|
||||
return isc_seek_blob(GDS_VAL(status_vector),
|
||||
GDS_VAL(blob_handle), mode, offset, GDS_VAL(result));
|
||||
return isc_seek_blob(status_vector, blob_handle, mode, offset, result);
|
||||
}
|
||||
|
||||
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_length, void *msg, SSHORT req_level)
|
||||
{
|
||||
return isc_send(GDS_VAL(status_vector),
|
||||
GDS_VAL(req_handle),
|
||||
msg_type, msg_length, GDS_VAL((SCHAR *) msg), req_level);
|
||||
return isc_send(status_vector, req_handle, msg_type, msg_length,
|
||||
(SCHAR *) msg, req_level);
|
||||
}
|
||||
|
||||
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,
|
||||
void *msg, SSHORT req_level)
|
||||
{
|
||||
return isc_start_and_send(GDS_VAL(status_vector),
|
||||
GDS_VAL(req_handle),
|
||||
GDS_VAL(tra_handle),
|
||||
msg_type,
|
||||
msg_length, GDS_VAL((SCHAR *) msg), req_level);
|
||||
return isc_start_and_send(status_vector, req_handle, tra_handle, msg_type,
|
||||
msg_length, (SCHAR *) msg, req_level);
|
||||
}
|
||||
|
||||
ISC_STATUS API_ROUTINE gds__start_multiple(ISC_STATUS * status_vector,
|
||||
FRBRD **tra_handle,
|
||||
SSHORT db_count, void *teb_vector)
|
||||
{
|
||||
return isc_start_multiple(GDS_VAL(status_vector),
|
||||
GDS_VAL(tra_handle),
|
||||
db_count, GDS_VAL((SCHAR *) teb_vector));
|
||||
return isc_start_multiple(status_vector, tra_handle, db_count,
|
||||
(SCHAR *) teb_vector);
|
||||
}
|
||||
|
||||
ISC_STATUS API_ROUTINE gds__start_request(ISC_STATUS * status_vector,
|
||||
FRBRD **req_handle,
|
||||
FRBRD **tra_handle, SSHORT req_level)
|
||||
{
|
||||
return isc_start_request(GDS_VAL(status_vector),
|
||||
GDS_VAL(req_handle),
|
||||
GDS_VAL(tra_handle), req_level);
|
||||
return isc_start_request(status_vector, req_handle, tra_handle, req_level);
|
||||
}
|
||||
|
||||
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,
|
||||
SSHORT buffer_length, SCHAR * buffer)
|
||||
{
|
||||
return isc_transaction_info(GDS_VAL(status_vector),
|
||||
GDS_VAL(tra_handle),
|
||||
msg_length,
|
||||
GDS_VAL(msg), buffer_length, GDS_VAL(buffer));
|
||||
return isc_transaction_info(status_vector, tra_handle, msg_length,
|
||||
msg, buffer_length, buffer);
|
||||
}
|
||||
|
||||
ISC_STATUS API_ROUTINE gds__unwind_request(ISC_STATUS * status_vector,
|
||||
FRBRD **req_handle, SSHORT req_level)
|
||||
{
|
||||
return isc_unwind_request(GDS_VAL(status_vector),
|
||||
GDS_VAL(req_handle), req_level);
|
||||
return isc_unwind_request(status_vector, req_handle, req_level);
|
||||
}
|
||||
|
||||
ISC_STATUS API_ROUTINE gds__ddl(ISC_STATUS * status_vector,
|
||||
FRBRD **db_handle,
|
||||
FRBRD **tra_handle, SSHORT ddl_length, SCHAR * ddl)
|
||||
{
|
||||
return isc_ddl(GDS_VAL(status_vector),
|
||||
GDS_VAL(db_handle),
|
||||
GDS_VAL(tra_handle), ddl_length, GDS_VAL(ddl));
|
||||
return isc_ddl(status_vector, db_handle, tra_handle, ddl_length, ddl);
|
||||
}
|
||||
|
||||
void API_ROUTINE isc_event_counts(
|
||||
@ -694,8 +622,7 @@ void API_ROUTINE isc_event_counts(
|
||||
SSHORT length,
|
||||
SCHAR * before, SCHAR * after)
|
||||
{
|
||||
gds__event_counts(GDS_VAL(result_vector),
|
||||
length, GDS_VAL(before), GDS_VAL(after));
|
||||
gds__event_counts(result_vector, length, before, after);
|
||||
}
|
||||
|
||||
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,
|
||||
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)
|
||||
{
|
||||
gds__get_client_version(GDS_VAL(buffer));
|
||||
gds__get_client_version(buffer);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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)
|
||||
@ -745,7 +672,7 @@ void API_ROUTINE isc_qtoq(GDS_QUAD * quad1, GDS_QUAD * quad2)
|
||||
|
||||
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)
|
||||
@ -785,10 +712,8 @@ ISC_STATUS API_ROUTINE isc_wait_for_event(ISC_STATUS * status_vector,
|
||||
SSHORT events_length,
|
||||
SCHAR * events, SCHAR * events_update)
|
||||
{
|
||||
return gds__event_wait(GDS_VAL(status_vector),
|
||||
GDS_VAL(db_handle),
|
||||
events_length,
|
||||
GDS_VAL(events), GDS_VAL(events_update));
|
||||
return gds__event_wait(status_vector, db_handle, events_length,
|
||||
events, events_update);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2063,9 +2063,9 @@ USHORT API_ROUTINE gds__parse_bpb2(USHORT bpb_length,
|
||||
|
||||
|
||||
SLONG API_ROUTINE gds__ftof(SCHAR * string,
|
||||
USHORT GDS_VAL(length1),
|
||||
USHORT length1,
|
||||
SCHAR * field,
|
||||
USHORT GDS_VAL(length2))
|
||||
USHORT length2)
|
||||
{
|
||||
/**************************************
|
||||
*
|
||||
@ -2081,9 +2081,9 @@ SLONG API_ROUTINE gds__ftof(SCHAR * string,
|
||||
**************************************/
|
||||
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
|
||||
*field++ = *string++;
|
||||
while (--l);
|
||||
|
@ -27,11 +27,6 @@
|
||||
#ifndef 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
|
||||
#define IB_PREFIX_TYPE 0
|
||||
#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_bpb2(USHORT, UCHAR*, SSHORT*, SSHORT*,
|
||||
USHORT*, USHORT*);
|
||||
SLONG API_ROUTINE gds__ftof(SCHAR*, USHORT GDS_VAL(length1), SCHAR*,
|
||||
USHORT GDS_VAL(length2));
|
||||
SLONG API_ROUTINE gds__ftof(SCHAR*, USHORT length1, SCHAR*,
|
||||
USHORT length2);
|
||||
int API_ROUTINE gds__print_blr(UCHAR*, FPTR_VOID, SCHAR*, SSHORT);
|
||||
void API_ROUTINE gds__put_error(TEXT*);
|
||||
void API_ROUTINE gds__qtoq(void*, void*);
|
||||
|
@ -31,11 +31,6 @@
|
||||
|
||||
#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_VARARG ISC_EXPORT_VARARG
|
||||
|
||||
|
@ -2904,20 +2904,16 @@ static void THREAD_ROUTINE sweep_database(UCHAR* database)
|
||||
}
|
||||
THREAD_EXIT;
|
||||
|
||||
gds__attach_database(status_vector,
|
||||
0,
|
||||
reinterpret_cast<char*>(GDS_VAL(database)),
|
||||
GDS_REF(db_handle),
|
||||
dpb_length,
|
||||
reinterpret_cast<char*>(GDS_VAL(sweep_dpb)));
|
||||
gds__attach_database(status_vector, 0, reinterpret_cast<char*>(database),
|
||||
&db_handle, dpb_length,
|
||||
reinterpret_cast<char*>(sweep_dpb));
|
||||
|
||||
assert (ihandle->ihndl_object == &db_handle);
|
||||
ihandle->ihndl_object = NULL;
|
||||
|
||||
if (db_handle)
|
||||
{
|
||||
gds__detach_database(status_vector,
|
||||
GDS_REF(db_handle));
|
||||
gds__detach_database(status_vector, &db_handle);
|
||||
}
|
||||
|
||||
gds__free(database);
|
||||
|
110
src/jrd/utl.cpp
110
src/jrd/utl.cpp
@ -355,9 +355,7 @@ int API_ROUTINE gds__blob_size(
|
||||
|
||||
#pragma FB_COMPILER_MESSAGE("Fix! Bad casts.")
|
||||
|
||||
if (gds__blob_info(status_vector,
|
||||
GDS_VAL(b),
|
||||
sizeof(blob_items),
|
||||
if (gds__blob_info(status_vector, b, sizeof(blob_items),
|
||||
const_cast < char *>(blob_items),
|
||||
sizeof(buffer), buffer)) {
|
||||
gds__print_status(status_vector);
|
||||
@ -768,7 +766,7 @@ SLONG API_ROUTINE gds__event_block(SCHAR ** event_buffer,
|
||||
and counts for each argument */
|
||||
|
||||
length = 1;
|
||||
i = GDS_VAL(count);
|
||||
i = count;
|
||||
while (i--) {
|
||||
q = va_arg(ptr, SCHAR *);
|
||||
length += strlen(q) + 5;
|
||||
@ -800,7 +798,7 @@ SLONG API_ROUTINE gds__event_block(SCHAR ** event_buffer,
|
||||
|
||||
VA_START(ptr, count);
|
||||
|
||||
i = GDS_VAL(count);
|
||||
i = count;
|
||||
while (i--) {
|
||||
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,
|
||||
SCHAR ** result_buffer,
|
||||
SSHORT GDS_VAL(count),
|
||||
SSHORT count,
|
||||
SCHAR ** name_buffer)
|
||||
{
|
||||
/**************************************
|
||||
@ -847,7 +845,7 @@ USHORT API_ROUTINE gds__event_block_a(SCHAR ** event_buffer,
|
||||
setting initial length to include version
|
||||
and counts for each argument */
|
||||
|
||||
i = GDS_VAL(count);
|
||||
i = count;
|
||||
nb = name_buffer;
|
||||
length = 0;
|
||||
while (i--) {
|
||||
@ -859,7 +857,7 @@ USHORT API_ROUTINE gds__event_block_a(SCHAR ** event_buffer,
|
||||
length += end - q + 1 + 5;
|
||||
}
|
||||
|
||||
i = GDS_VAL(count);
|
||||
i = count;
|
||||
p = *event_buffer =
|
||||
(SCHAR *) gds__alloc((SLONG) (sizeof(SCHAR) * length));
|
||||
/* FREE: unknown */
|
||||
@ -928,7 +926,7 @@ SCHAR ** name_buffer, SSHORT * return_count)
|
||||
|
||||
void API_ROUTINE gds__event_counts(
|
||||
ULONG * result_vector,
|
||||
SSHORT GDS_VAL(buffer_length),
|
||||
SSHORT buffer_length,
|
||||
SCHAR * event_buffer,
|
||||
SCHAR * result_buffer)
|
||||
{
|
||||
@ -952,7 +950,7 @@ SCHAR * result_buffer)
|
||||
vec = result_vector;
|
||||
p = event_buffer;
|
||||
q = result_buffer;
|
||||
length = GDS_VAL(buffer_length);
|
||||
length = buffer_length;
|
||||
end = p + length;
|
||||
|
||||
/* 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)
|
||||
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) {
|
||||
l = (bstream->bstr_ptr - bstream->bstr_buffer);
|
||||
if (l > 0)
|
||||
if (gds__put_segment(status_vector,
|
||||
GDS_REF(bstream->bstr_blob),
|
||||
l,
|
||||
GDS_VAL(bstream->bstr_buffer))) return FALSE;
|
||||
if (gds__put_segment(status_vector, &bstream->bstr_blob, l,
|
||||
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)
|
||||
gds__free(bstream->bstr_buffer);
|
||||
@ -1753,11 +1750,9 @@ int API_ROUTINE BLOB_get(BSTREAM * bstream)
|
||||
if (--bstream->bstr_cnt >= 0)
|
||||
return *bstream->bstr_ptr++ & 0377;
|
||||
|
||||
gds__get_segment(status_vector,
|
||||
GDS_REF(bstream->bstr_blob),
|
||||
reinterpret_cast <
|
||||
USHORT * >(GDS_REF(bstream->bstr_cnt)),
|
||||
bstream->bstr_length, GDS_VAL(bstream->bstr_buffer));
|
||||
gds__get_segment(status_vector, &bstream->bstr_blob,
|
||||
reinterpret_cast <USHORT *>(&bstream->bstr_cnt),
|
||||
bstream->bstr_length, bstream->bstr_buffer);
|
||||
if (status_vector[1] && status_vector[1] != gds_segment) {
|
||||
bstream->bstr_ptr = 0;
|
||||
bstream->bstr_cnt = 0;
|
||||
@ -1888,22 +1883,16 @@ BSTREAM *API_ROUTINE Bopen(GDS_QUAD * blob_id,
|
||||
blob = NULL;
|
||||
|
||||
if (*mode == 'w' || *mode == 'W') {
|
||||
if (gds__create_blob2(status_vector,
|
||||
GDS_REF(database),
|
||||
GDS_REF(transaction),
|
||||
GDS_REF(blob),
|
||||
GDS_VAL(blob_id),
|
||||
bpb_length,
|
||||
reinterpret_cast < char *>(bpb))) return NULL;
|
||||
if (gds__create_blob2(status_vector, &database, &transaction, &blob,
|
||||
blob_id, bpb_length,
|
||||
reinterpret_cast < char *>(bpb)))
|
||||
return NULL;
|
||||
}
|
||||
else if (*mode == 'r' || *mode == 'R') {
|
||||
if (gds__open_blob2(status_vector,
|
||||
GDS_REF(database),
|
||||
GDS_REF(transaction),
|
||||
GDS_REF(blob),
|
||||
GDS_VAL(blob_id),
|
||||
bpb_length,
|
||||
reinterpret_cast < char *>(bpb))) return NULL;
|
||||
if (gds__open_blob2(status_vector, &database, &transaction, &blob,
|
||||
blob_id, bpb_length,
|
||||
reinterpret_cast < char *>(bpb)))
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
@ -2005,9 +1994,8 @@ int API_ROUTINE BLOB_put(SCHAR x, BSTREAM * bstream)
|
||||
|
||||
*bstream->bstr_ptr++ = (x & 0377);
|
||||
l = (bstream->bstr_ptr - bstream->bstr_buffer);
|
||||
if (gds__put_segment(status_vector,
|
||||
GDS_REF(bstream->bstr_blob),
|
||||
l, GDS_VAL(bstream->bstr_buffer))) {
|
||||
if (gds__put_segment(status_vector, &bstream->bstr_blob,
|
||||
l, bstream->bstr_buffer)) {
|
||||
return FALSE;
|
||||
}
|
||||
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 */
|
||||
|
||||
blob = NULL;
|
||||
if (gds__open_blob(status_vector,
|
||||
GDS_REF(database),
|
||||
GDS_REF(transaction), GDS_REF(blob), GDS_VAL(blob_id))) {
|
||||
if (gds__open_blob(status_vector, &database, &transaction, &blob, blob_id)) {
|
||||
gds__print_status(status_vector);
|
||||
return FALSE;
|
||||
}
|
||||
@ -2050,8 +2036,7 @@ static display(GDS_QUAD * blob_id, void *database, void *transaction)
|
||||
short_length = sizeof(buffer);
|
||||
|
||||
for (;;) {
|
||||
gds__get_segment(status_vector,
|
||||
GDS_REF(blob), GDS_REF(l), short_length, buffer);
|
||||
gds__get_segment(status_vector, &blob, &l, short_length, buffer);
|
||||
if (status_vector[1] && status_vector[1] != gds_segment) {
|
||||
if (status_vector[1] != gds_segstr_eof)
|
||||
gds__print_status(status_vector);
|
||||
@ -2064,7 +2049,7 @@ static display(GDS_QUAD * blob_id, void *database, void *transaction)
|
||||
|
||||
/* Close the blob */
|
||||
|
||||
gds__close_blob(status_vector, GDS_REF(blob));
|
||||
gds__close_blob(status_vector, &blob);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -2098,11 +2083,7 @@ static int dump(
|
||||
/* Open the blob. If it failed, what the hell -- just return failure */
|
||||
|
||||
blob = NULL;
|
||||
if (gds__open_blob2(status_vector,
|
||||
GDS_REF(database),
|
||||
GDS_REF(transaction),
|
||||
GDS_REF(blob),
|
||||
GDS_VAL(blob_id),
|
||||
if (gds__open_blob2(status_vector, &database, &transaction, &blob, blob_id,
|
||||
bpb_length, reinterpret_cast < char *>(bpb))) {
|
||||
gds__print_status(status_vector);
|
||||
return FALSE;
|
||||
@ -2113,9 +2094,8 @@ static int dump(
|
||||
short_length = sizeof(buffer);
|
||||
|
||||
for (;;) {
|
||||
gds__get_segment(status_vector,
|
||||
GDS_REF(blob),
|
||||
reinterpret_cast < USHORT * >(GDS_REF(l)),
|
||||
gds__get_segment(status_vector, &blob,
|
||||
reinterpret_cast < USHORT * >(&l),
|
||||
short_length, buffer);
|
||||
if (status_vector[1] && status_vector[1] != gds_segment) {
|
||||
if (status_vector[1] != gds_segstr_eof)
|
||||
@ -2131,8 +2111,7 @@ static int dump(
|
||||
|
||||
/* Close the blob */
|
||||
|
||||
gds__close_blob(status_vector,
|
||||
GDS_REF(blob));
|
||||
gds__close_blob(status_vector, &blob);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -2306,11 +2285,8 @@ static int load(
|
||||
/* Open the blob. If it failed, what the hell -- just return failure */
|
||||
|
||||
blob = NULL;
|
||||
if (gds__create_blob(status_vector,
|
||||
GDS_REF(database),
|
||||
GDS_REF(transaction),
|
||||
GDS_REF(blob),
|
||||
GDS_VAL(blob_id))) {
|
||||
if (gds__create_blob(status_vector, &database, &transaction, &blob,
|
||||
blob_id)) {
|
||||
gds__print_status(status_vector);
|
||||
return FALSE;
|
||||
}
|
||||
@ -2328,28 +2304,22 @@ static int load(
|
||||
if ((c != '\n') && p < buffer_end)
|
||||
continue;
|
||||
l = p - buffer;
|
||||
if (gds__put_segment
|
||||
(status_vector, GDS_REF(blob), l,
|
||||
buffer)) {
|
||||
if (gds__put_segment(status_vector, &blob, l, buffer)) {
|
||||
gds__print_status(status_vector);
|
||||
gds__close_blob(status_vector,
|
||||
GDS_REF(blob));
|
||||
gds__close_blob(status_vector, &blob);
|
||||
return FALSE;
|
||||
}
|
||||
p = buffer;
|
||||
}
|
||||
|
||||
if ((l = p - buffer) != 0)
|
||||
if (gds__put_segment
|
||||
(status_vector, GDS_REF(blob), l,
|
||||
buffer)) {
|
||||
if (gds__put_segment(status_vector, &blob, l, buffer)) {
|
||||
gds__print_status(status_vector);
|
||||
gds__close_blob(status_vector, GDS_REF(blob));
|
||||
gds__close_blob(status_vector, &blob);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gds__close_blob(status_vector,
|
||||
GDS_REF(blob));
|
||||
gds__close_blob(status_vector, &blob);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
890
src/jrd/why.cpp
890
src/jrd/why.cpp
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user