From 13b7753cf49f7fea4ede079cbea2b3ab853cb5ec Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Thu, 21 May 1998 21:53:20 +0000 Subject: [PATCH] more changes to allow traditional C --- src/ca/cadef.h | 39 ++++++++++++++++++--------------------- src/include/cadef.h | 39 ++++++++++++++++++--------------------- 2 files changed, 36 insertions(+), 42 deletions(-) diff --git a/src/ca/cadef.h b/src/ca/cadef.h index 057114f90..0fc97f865 100644 --- a/src/ca/cadef.h +++ b/src/ca/cadef.h @@ -235,7 +235,7 @@ typedef double ca_real; /* argument passed to event handlers and callback handlers */ -struct event_handler_args{ +typedef struct event_handler_args{ void *usr; /* User argument supplied when event added */ struct channel_in_use *chid; /* Channel id */ @@ -243,7 +243,7 @@ struct event_handler_args{ long count; /* the element count of the item returned */ READONLY void *dbr; /* Pointer to the value returned */ int status; /* CA Status of the op from server - CA V4.1 */ -}; +}evargs; struct pending_event{ ELLNODE node; /* list ptrs */ @@ -289,8 +289,7 @@ struct exception_handler_args{ unsigned lineNo; /* source file line number */ }; - - +typedef unsigned CA_SYNC_GID; /* * @@ -306,6 +305,20 @@ struct exception_handler_args{ #define CA_OP_CONN_UP 6 #define CA_OP_CONN_DOWN 7 +/* + * provides efficient test and display of channel access errors + */ +#define SEVCHK(CA_ERROR_CODE, MESSAGE_STRING) \ +{ \ + int ca_unique_status_name = (CA_ERROR_CODE); \ + if(!(ca_unique_status_name & CA_M_SUCCESS)) \ + ca_signal_with_file_and_lineno( \ + ca_unique_status_name, \ + (MESSAGE_STRING), \ + __FILE__, \ + __LINE__); \ +} + #ifdef CAC_ANSI_FUNC_PROTO epicsShareFunc short epicsShareAPI ca_get_field_type (chid chan); @@ -641,10 +654,9 @@ epicsShareFunc int epicsShareAPI ca_array_get_callback /* NOTES: */ /* 1) Evid may be omited by passing a NULL pointer */ /* */ -/* 2) AN array count of zero specifies the native db count */ +/* 2) An array count of zero specifies the native db count */ /* */ /************************************************************************/ -typedef struct event_handler_args evargs; /* * ca_add_event () @@ -827,20 +839,6 @@ epicsShareFunc void epicsShareAPI ca_signal_with_file_and_lineno int lineNo ); -/* - * provides efficient test and display of channel access errors - */ -#define SEVCHK(CA_ERROR_CODE, MESSAGE_STRING) \ -{ \ - int ca_unique_status_name = (CA_ERROR_CODE); \ - if(!(ca_unique_status_name & CA_M_SUCCESS)) \ - ca_signal_with_file_and_lineno( \ - ca_unique_status_name, \ - (MESSAGE_STRING), \ - __FILE__, \ - __LINE__); \ -} - /* * ca_host_name_function() * @@ -910,7 +908,6 @@ int ca_import_cancel(int tid); * IO operations are initiated then the programmer is free to * block for IO completion within any one of the groups as needed. */ -typedef unsigned CA_SYNC_GID; /* * ca_sg_create() diff --git a/src/include/cadef.h b/src/include/cadef.h index 057114f90..0fc97f865 100644 --- a/src/include/cadef.h +++ b/src/include/cadef.h @@ -235,7 +235,7 @@ typedef double ca_real; /* argument passed to event handlers and callback handlers */ -struct event_handler_args{ +typedef struct event_handler_args{ void *usr; /* User argument supplied when event added */ struct channel_in_use *chid; /* Channel id */ @@ -243,7 +243,7 @@ struct event_handler_args{ long count; /* the element count of the item returned */ READONLY void *dbr; /* Pointer to the value returned */ int status; /* CA Status of the op from server - CA V4.1 */ -}; +}evargs; struct pending_event{ ELLNODE node; /* list ptrs */ @@ -289,8 +289,7 @@ struct exception_handler_args{ unsigned lineNo; /* source file line number */ }; - - +typedef unsigned CA_SYNC_GID; /* * @@ -306,6 +305,20 @@ struct exception_handler_args{ #define CA_OP_CONN_UP 6 #define CA_OP_CONN_DOWN 7 +/* + * provides efficient test and display of channel access errors + */ +#define SEVCHK(CA_ERROR_CODE, MESSAGE_STRING) \ +{ \ + int ca_unique_status_name = (CA_ERROR_CODE); \ + if(!(ca_unique_status_name & CA_M_SUCCESS)) \ + ca_signal_with_file_and_lineno( \ + ca_unique_status_name, \ + (MESSAGE_STRING), \ + __FILE__, \ + __LINE__); \ +} + #ifdef CAC_ANSI_FUNC_PROTO epicsShareFunc short epicsShareAPI ca_get_field_type (chid chan); @@ -641,10 +654,9 @@ epicsShareFunc int epicsShareAPI ca_array_get_callback /* NOTES: */ /* 1) Evid may be omited by passing a NULL pointer */ /* */ -/* 2) AN array count of zero specifies the native db count */ +/* 2) An array count of zero specifies the native db count */ /* */ /************************************************************************/ -typedef struct event_handler_args evargs; /* * ca_add_event () @@ -827,20 +839,6 @@ epicsShareFunc void epicsShareAPI ca_signal_with_file_and_lineno int lineNo ); -/* - * provides efficient test and display of channel access errors - */ -#define SEVCHK(CA_ERROR_CODE, MESSAGE_STRING) \ -{ \ - int ca_unique_status_name = (CA_ERROR_CODE); \ - if(!(ca_unique_status_name & CA_M_SUCCESS)) \ - ca_signal_with_file_and_lineno( \ - ca_unique_status_name, \ - (MESSAGE_STRING), \ - __FILE__, \ - __LINE__); \ -} - /* * ca_host_name_function() * @@ -910,7 +908,6 @@ int ca_import_cancel(int tid); * IO operations are initiated then the programmer is free to * block for IO completion within any one of the groups as needed. */ -typedef unsigned CA_SYNC_GID; /* * ca_sg_create()