From 08c57376502af8030697dacda95627d9f727d4a9 Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Thu, 3 Jun 1993 16:27:38 +0000 Subject: [PATCH] Changed to work with vxWorks 5.1 and GCC 2.2.3. --- src/dev/devBoSoft.c | 2 +- src/drv/drvAt5Vxi.c | 14 +++--- src/drv/drvBb902.c | 4 +- src/drv/drvBb910.c | 2 +- src/drv/drvComet.c | 6 ++- src/drv/drvCompuSm.c | 6 +-- src/drv/drvEpvxi.c | 106 +++++++++++++++++++++--------------------- src/drv/drvEpvxiMsg.c | 32 ++++++------- src/drv/drvFp.c | 31 ++++++------ src/drv/drvFpm.c | 12 ++--- src/drv/drvHp1404a.c | 12 ++--- src/drv/drvHpe1368a.c | 13 +++--- src/drv/drvHpe1445a.c | 21 +++++---- src/drv/drvJgvtr1.c | 17 ++++--- src/drv/drvKscV215.c | 13 +++--- src/drv/drvMz8310.c | 8 ++-- src/drv/drvXy010.c | 8 ++-- src/drv/drvXy240.c | 60 ++++++++++++------------ src/drv/drvXy566.c | 26 +++++------ 19 files changed, 195 insertions(+), 198 deletions(-) diff --git a/src/dev/devBoSoft.c b/src/dev/devBoSoft.c index 81b8ec165..c11b95892 100644 --- a/src/dev/devBoSoft.c +++ b/src/dev/devBoSoft.c @@ -57,7 +57,7 @@ long dbCaPutLink(); static long init_record(); /* Create the dset for devBoSoft */ -long write_bo(); +static long write_bo(); struct { long number; diff --git a/src/drv/drvAt5Vxi.c b/src/drv/drvAt5Vxi.c index e109515b1..e74f34ec0 100644 --- a/src/drv/drvAt5Vxi.c +++ b/src/drv/drvAt5Vxi.c @@ -122,28 +122,28 @@ static char SccsId[] = "$Id$\t$Date$"; typedef long (*DRVSUPFUN) (); /* ptr to driver support function*/ -void at5vxi_int_service( +static void at5vxi_int_service( int addr ); -void at5vxi_init_card( +static void at5vxi_init_card( unsigned addr ); -void at5vxi_shutdown( +static void at5vxi_shutdown( void ); -void at5vxi_shutdown_card( +static void at5vxi_shutdown_card( unsigned la ); -int at5vxi_report_timing( +static int at5vxi_report_timing( unsigned card, unsigned channel ); -void at5vxi_stat( +static void at5vxi_stat( unsigned card, int level ); @@ -151,7 +151,7 @@ void at5vxi_stat( /* * these should be in a header file */ -long at5vxi_init( +static long at5vxi_init( void ); diff --git a/src/drv/drvBb902.c b/src/drv/drvBb902.c index b0459d0d1..9843d74da 100644 --- a/src/drv/drvBb902.c +++ b/src/drv/drvBb902.c @@ -149,7 +149,7 @@ register unsigned int mask; register unsigned int work; /* verify card exists */ - if (card < 0 || !pbo_bb902s[card]) + if (!pbo_bb902s[card]) return (-1); /* use structure to handle high and low short swap */ /* get current output */ @@ -178,7 +178,7 @@ register unsigned int *pval; register unsigned int work; /* verify card exists */ - if (card < 0 || !pbo_bb902s[card]) + if (!pbo_bb902s[card]) return (-1); /* readback */ *pval = (pbo_bb902s[card]->high_value << 16) /* high */ diff --git a/src/drv/drvBb910.c b/src/drv/drvBb910.c index eb18059fe..f497aa19b 100644 --- a/src/drv/drvBb910.c +++ b/src/drv/drvBb910.c @@ -154,7 +154,7 @@ bb910_driver(card,mask,prval) { register unsigned int work; - if (card < 0 || !pbi_bb910s[card]) + if (!pbi_bb910s[card]) return (-1); /* read */ diff --git a/src/drv/drvComet.c b/src/drv/drvComet.c index 897c7a646..fb0ba1fa0 100644 --- a/src/drv/drvComet.c +++ b/src/drv/drvComet.c @@ -400,7 +400,8 @@ static long init() * */ comet_driver(card, signal, pcbroutine, parg, nelements) -register unsigned short card,signal; +register short card; +register unsigned short signal; unsigned int *pcbroutine; unsigned int *parg; /* pointer to the waveform record */ unsigned long nelements; @@ -565,7 +566,8 @@ unsigned n; * */ comet_mode(card,mode,arg,val) - unsigned short card, mode, arg, val; +short card; +unsigned short mode, arg, val; { unsigned char *cptr; int i; diff --git a/src/drv/drvCompuSm.c b/src/drv/drvCompuSm.c index 0eecd4a0f..9034073e2 100644 --- a/src/drv/drvCompuSm.c +++ b/src/drv/drvCompuSm.c @@ -568,7 +568,7 @@ compu_driver_init(){ status = sysBusToLocalAdrs( VME_AM_SUP_SHORT_IO, (char *)sm_addrs[CM57_83E], - (char **)&compu_addr); + (int **)&compu_addr); if (status != OK){ printf("%s: failed to map A16 base\n", __FILE__); return ERROR; @@ -657,7 +657,7 @@ register int arg2; case (SM_MOVE): if (compu_motor_array[card].mode == VELOCITY_MODE) - return; + return(0); i = 0; switch (trigger){ case (0): @@ -829,7 +829,7 @@ printf("%x ",compu_msg[j]); case (SM_SET_HOME): if (compu_motor_array[card].mode == VELOCITY_MODE) - return; + return(OK); /* set the motor and encoder position to zero */ compu_msg[0] = SM_DEF_ABS_ZERO; diff --git a/src/drv/drvEpvxi.c b/src/drv/drvEpvxi.c index 2d1f890ab..9c28a56ce 100644 --- a/src/drv/drvEpvxi.c +++ b/src/drv/drvEpvxi.c @@ -261,124 +261,124 @@ char epvxiSymbolTableMakeIdString[] = "%03x"; #define TRIG_LINE_FPOUT (41) /* forward references */ -int vxi_find_slot0( +static int vxi_find_slot0( VXIE *pvxie ); -int vxi_find_offset( +static int vxi_find_offset( unsigned base_la, unsigned count, unsigned *poffset ); -int vxi_find_slot( +static int vxi_find_slot( struct vxi_csr *pcsr, unsigned *pslot, unsigned *pcrate ); -int vxi_self_test( +static int vxi_self_test( void ); -int vxi_init_ignore_list( +static int vxi_init_ignore_list( void ); -int vxi_vec_inuse( +static int vxi_vec_inuse( unsigned la ); -int mxi_map( +static int mxi_map( VXIE *pvxie, unsigned base_la ); -int map_mxi_inward( +static int map_mxi_inward( VXIE *pvxie, unsigned base_la ); -int open_vxi_device( +static int open_vxi_device( VXIE *pvxie, unsigned la ); -int vxi_begin_normal_operation( +static int vxi_begin_normal_operation( void ); -void vxi_allocate_int_lines( +static void vxi_allocate_int_lines( void ); -int epvxiSymbolTableInit( +static int epvxiSymbolTableInit( void ); -void nicpu030_init( +static void nicpu030_init( VXIE *pvxie ); -void vxi_find_sc_devices( +static void vxi_find_sc_devices( VXIE *pvxie ); -void vxi_find_dc_devices( +static void vxi_find_dc_devices( VXIE *pvxie, unsigned base_la ); -void set_reg_modid( +static void set_reg_modid( unsigned crate, unsigned slot ); -void clr_all_reg_modid( +static void clr_all_reg_modid( unsigned crate ); -void nivxi_cpu030_set_modid( +static void nivxi_cpu030_set_modid( unsigned crate, unsigned slot ); -void nivxi_cpu030_clr_all_modid( +static void nivxi_cpu030_clr_all_modid( unsigned crate ); -void open_slot0_device( +static void open_slot0_device( VXIE *pvxie, unsigned la ); -void vxi_configure_hierarchies( +static void vxi_configure_hierarchies( unsigned commander_la, unsigned servant_area ); -void vxi_find_mxi_devices( +static void vxi_find_mxi_devices( VXIE *pvxie, unsigned base_la ); -void vxi_unmap_mxi_devices( +static void vxi_unmap_mxi_devices( void ); -void vxi_address_config( +static void vxi_address_config( void ); -void vxi_record_topology( +static void vxi_record_topology( void ); -void epvxiExtenderPrint( +static void epvxiExtenderPrint( VXIE *pvxie ); -void epvxiSelfTestDelay( +static void epvxiSelfTestDelay( void ); -void epvxiRegisterCommonMakeNames( +static void epvxiRegisterCommonMakeNames( void ); -VXIE *open_mxi_device( +static VXIE *open_mxi_device( unsigned la, VXIE *pvxie, enum ext_type type ); -int epvxiSetDeviceOffline( +static int epvxiSetDeviceOffline( int la ); -void vxi_allocate_address_block( +static void vxi_allocate_address_block( VXIE *pvxie ); -int symbol_value_fetch( +static int symbol_value_fetch( char *pname, void *pdest, unsigned dest_size ); -int report_one_device( +static int report_one_device( int la, int level ); -void mxi_io_report( +static void mxi_io_report( struct vxi_csr *pmxi, int level ); @@ -437,13 +437,13 @@ epvxiResman(void) * (if we are running under EPICS) */ { - UTINY type; - unsigned char *pEPICS_VXI_LA_COUNT; + UINT8 type; + unsigned char *pEPICS_VXI_LA_COUNT = 0; status = symFindByName( sysSymTbl, "_EPICS_VXI_LA_COUNT", - &(char *)pEPICS_VXI_LA_COUNT, + pEPICS_VXI_LA_COUNT, &type); if(status == OK){ EPICS_VXI_LA_COUNT = *pEPICS_VXI_LA_COUNT; @@ -1351,9 +1351,9 @@ VXIE *pvxie ) { int i; - int status; + int status = -1; short model; - UTINY type; + UINT8 type; if(vxislot0[0].present){ return; @@ -1368,7 +1368,7 @@ VXIE *pvxie status = symFindByName( sysSymTbl, nivxi_func_names[i], - & (char *) pnivxi_func[i], + (char **) &pnivxi_func[i], &type); if(status != OK){ return; @@ -2243,7 +2243,7 @@ unsigned dest_size ) { int status; - UTINY type; + UINT8 type; char *pvalue; status = symFindByName( @@ -2271,14 +2271,14 @@ LOCAL int vxi_init_ignore_list(void) { int i; - UTINY type; + UINT8 type; int status; for(i=0; idir.w.dd.mxi.a24_window_low; - b = (void *) pmxi->dir.w.dd.mxi.a24_window_high; + a = pmxi->dir.w.dd.mxi.a24_window_low; + b = pmxi->dir.w.dd.mxi.a24_window_high; printf(", A24 window 0x%X-0x%X", a, b); - a = (void *) pmxi->dir.w.dd.mxi.a32_window_low; - b = (void *) pmxi->dir.w.dd.mxi.a32_window_high; + a = pmxi->dir.w.dd.mxi.a32_window_low; + b = pmxi->dir.w.dd.mxi.a32_window_high; printf(", A32 window 0x%X-0x%X", a, b); @@ -3476,7 +3476,7 @@ char *pmodel_name status = symAdd(epvxiSymbolTable, name, pcopy, EPVXI_MODEL_NAME_SYMBOL); if(status < 0){ char *pold_model_name; - UTINY type; + UINT8 type; status = symFindByNameAndType( epvxiSymbolTable, @@ -3531,7 +3531,7 @@ char *pmake_name status = symAdd(epvxiSymbolTable, name, pcopy, EPVXI_MAKE_NAME_SYMBOL); if(status<0){ char *pold_make_name; - UTINY type; + UINT8 type; status = symFindByNameAndType( epvxiSymbolTable, @@ -3567,7 +3567,7 @@ epuxiLookupMakeName( { char name[EPVXI_MAX_SYMBOL_LENGTH]; char *pmake_name; - UTINY type; + UINT8 type; int status; if(!epvxiSymbolTable){ /* initialize table at 1st call */ @@ -3614,7 +3614,7 @@ epuxiLookupModelName( { char name[EPVXI_MAX_SYMBOL_LENGTH]; char *pmodel_name; - UTINY type; + UINT8 type; int status; if(!epvxiSymbolTable){ /* initialize table at 1st call */ diff --git a/src/drv/drvEpvxiMsg.c b/src/drv/drvEpvxiMsg.c index 115acb3b4..7cebd7a5e 100644 --- a/src/drv/drvEpvxiMsg.c +++ b/src/drv/drvEpvxiMsg.c @@ -98,20 +98,20 @@ char vxiMsgSignalInit; /* * local functions */ -void set_la( +void static set_la( int la, int *pla ); -void vxiMsgInt( +static void vxiMsgInt( unsigned la ); -void signalHandler( +static void signalHandler( unsigned short signal ); -int epvxiReadSlowHandshake( +static int epvxiReadSlowHandshake( unsigned la, char *pbuf, unsigned long count, @@ -119,7 +119,7 @@ int epvxiReadSlowHandshake( unsigned long option ); -int epvxiReadFastHandshake( +static int epvxiReadFastHandshake( unsigned la, char *pbuf, unsigned long count, @@ -127,39 +127,39 @@ int epvxiReadFastHandshake( unsigned long option ); -int vxiMsgClose( +static int vxiMsgClose( unsigned la ); -int vxiMsgOpen( +static int vxiMsgOpen( unsigned la ); -void vxiMsgSignalSetup( +static void vxiMsgSignalSetup( void ); -void vxiCPU030MsgSignalSetup( +static void vxiCPU030MsgSignalSetup( void ); -void vxiHP1404MsgSignalSetup( +static void vxiHP1404MsgSignalSetup( void ); -int vxiAttemptAsyncModeControl( +static int vxiAttemptAsyncModeControl( unsigned la, unsigned long cmd ); -int vxiMsgSync( +static int vxiMsgSync( unsigned la, unsigned resp_mask, unsigned resp_state, int override_err ); -int fetch_protocol_error( +static int fetch_protocol_error( unsigned la ); @@ -167,15 +167,15 @@ int fetch_protocol_error( /* * should be in a header */ -int vxi_msg_test( +static int vxi_msg_test( unsigned la ); -int vxi_msg_print_id( +static int vxi_msg_print_id( unsigned la ); -int vxi_msg_test_protocol_error( +static int vxi_msg_test_protocol_error( unsigned la ); diff --git a/src/drv/drvFp.c b/src/drv/drvFp.c index 98b14a019..60f9636a9 100644 --- a/src/drv/drvFp.c +++ b/src/drv/drvFp.c @@ -104,8 +104,8 @@ static char *sccsId = "$Id$\t$Date$"; #include #endif -long report(); -long init(); +static long report(); +static long init(); struct { long number; DRVSUPFUN report; @@ -191,14 +191,11 @@ struct fp_rec #endif }; -LOCAL -struct fp_rec *fp; /* fast protect control structure */ -LOCAL -int fp_num; /* # of fast protect cards found -1 */ -LOCAL -SEM_ID fp_semid; /* semaphore for monitor task */ +static struct fp_rec *fp; /* fast protect control structure */ +static int fp_num; /* # of fast protect cards found -1 */ +static SEM_ID fp_semid; /* semaphore for monitor task */ -void fp_reboot(); +static void fp_reboot(); /* * fp_int @@ -333,7 +330,8 @@ fp_init(addr) #endif } fp_num = i - 1; /* record max card # */ - if (!(fp_semid = semCreate())) /* abort if can't create semaphore */ + fp_semid = semCreate(); /* abort if can't create semaphore */ + if ((int)fp_semid == 0) /* abort if can't create semaphore */ return -3; return i; /* return # found */ } @@ -408,10 +406,10 @@ fp_mode(card,mode) * */ fp_srd(card,option) - short card; + short card; + short option; { - if (card < 0 || (card > fp_num)) - return -1; + if (card > fp_num) return -1; if (!option) printf("local inputs = %x enable switches = %x\n",fp[card].fptr->srd & 0xff, fp[card].fptr->srd>>8); @@ -456,8 +454,7 @@ fp_driver(card,mask,prval) { register unsigned int temp; - if (card < 0 || (card > fp_num)) - return -1; + if (card > fp_num) return -1; temp = fp[card].drvstat & 0xffff0000; /* latched status info */ temp |= fp[card].fptr->srd; /* current switches & inputs */ *prval = temp & mask; @@ -538,8 +535,8 @@ int level; #ifndef EPICS_V2 fp_getioscanpvt(card,scanpvt) -unsigned short card; -IOSCANPVT *scanpvt; +short card; +IOSCANPVT *scanpvt; { if ((card >= bi_num_cards[AT8_FP10S_BI])) return(0); *scanpvt = fp[card].ioscanpvt; diff --git a/src/drv/drvFpm.c b/src/drv/drvFpm.c index d634f8d82..bf2ab676e 100644 --- a/src/drv/drvFpm.c +++ b/src/drv/drvFpm.c @@ -94,8 +94,8 @@ static char *sccsId = "$Id$\t$Date$"; #include #include -long report(); -long init(); +static long report(); +static long init(); struct { long number; DRVSUPFUN report; @@ -165,13 +165,11 @@ struct fpm_rec unsigned int int_num; /* interrupt number */ }; -LOCAL -struct fpm_rec *fpm; /* fast protect control structure */ +static struct fpm_rec *fpm; /* fast protect control structure */ -LOCAL -int fpm_num; /* # cards found - 1 */ +static int fpm_num; /* # cards found - 1 */ -void fpm_reboot(); +static void fpm_reboot(); /* * fpm_int diff --git a/src/drv/drvHp1404a.c b/src/drv/drvHp1404a.c index a182306f0..e93d2a998 100644 --- a/src/drv/drvHp1404a.c +++ b/src/drv/drvHp1404a.c @@ -81,27 +81,27 @@ struct hpE1404_config{ #define hpE1404PConfig(LA) \ epvxiPConfig((LA), hpE1404DriverID, struct hpE1404_config *) -void hpE1404InitLA( +static void hpE1404InitLA( unsigned la ); -void hpE1404ShutDown( +static void hpE1404ShutDown( void ); -void hpE1404ShutDownLA( +static void hpE1404ShutDownLA( unsigned la ); /* * these should be in a header file */ -int hpE1404SignalConnect( +static int hpE1404SignalConnect( unsigned la, void (*pSignalCallback)() ); -void hpE1404Int( +static void hpE1404Int( unsigned la ); @@ -125,7 +125,7 @@ unsigned io_map /* bits 0-5 correspond to trig 0-5 */ /* a 0 sources the back plane */ ); -void hpE1404IOReport( +static void hpE1404IOReport( unsigned la, unsigned level ); diff --git a/src/drv/drvHpe1368a.c b/src/drv/drvHpe1368a.c index 2b4b8cdb3..8e6ba5299 100644 --- a/src/drv/drvHpe1368a.c +++ b/src/drv/drvHpe1368a.c @@ -57,7 +57,7 @@ static char *sccsId = "$Id$\t$Date$"; #include #endif -long init(); +static long init(); struct { long number; @@ -97,12 +97,11 @@ struct hpe1368a_config{ #define HPE1368A_INT_LEVEL 1 -LOCAL -int hpe1368aDriverId; +static int hpe1368aDriverId; -void hpe1368a_int_service(); -void hpe1368a_init_card(); -void hpe1368a_stat(); +static void hpe1368a_int_service(); +static void hpe1368a_init_card(); +static void hpe1368a_stat(); /* @@ -187,7 +186,7 @@ unsigned la; #endif r0 = intConnect( - (unsigned char) INUM_TO_IVEC(la), + INUM_TO_IVEC(la), hpe1368a_int_service, (void *) la); if(r0 == ERROR) diff --git a/src/drv/drvHpe1445a.c b/src/drv/drvHpe1445a.c index a7322d1c2..7396c9b78 100644 --- a/src/drv/drvHpe1445a.c +++ b/src/drv/drvHpe1445a.c @@ -40,6 +40,7 @@ static char *sccsId = "$Id$\t$Date$"; #include #include +#include #include #include #include @@ -94,16 +95,16 @@ void hpe1445aLogErrorsWithLineno(unsigned la, int lineno); * For Driver Internal Use * */ -void hpe1445aInitCard(unsigned la); -long hpe1445aReset(unsigned la); -long logEntireError(unsigned la, int lineno); -long hpe1445aActivateWaveformLocked(unsigned la, char *pWaveformName, +static void hpe1445aInitCard(unsigned la); +static long hpe1445aReset(unsigned la); +static long logEntireError(unsigned la, int lineno); +static long hpe1445aActivateWaveformLocked(unsigned la, char *pWaveformName, struct hpe1445aConfig *pc); -long hpe1445aSetupFunction(unsigned la); -long hpe1445aSetupOutput(unsigned la); -long hpe1445aArm(unsigned la); -long hpe1445aUnloadWaveformLocked(unsigned la, char *pWaveformName); -long hpe1445aLoadWaveformLocked(unsigned la, struct hpe1445aConfig *pc, +static long hpe1445aSetupFunction(unsigned la); +static long hpe1445aSetupOutput(unsigned la); +static long hpe1445aArm(unsigned la); +static long hpe1445aUnloadWaveformLocked(unsigned la, char *pWaveformName); +static long hpe1445aLoadWaveformLocked(unsigned la, struct hpe1445aConfig *pc, char *pWaveformName, double *pdata, unsigned long npoints); @@ -898,7 +899,7 @@ unsigned long npoints */ LOCAL long hpe1445aLoadWaveformLocked( -unsigned short la, +unsigned la, struct hpe1445aConfig *pc, char *pWaveformName, double *pdata, diff --git a/src/drv/drvJgvtr1.c b/src/drv/drvJgvtr1.c index 0d379e8c8..47a70ab57 100644 --- a/src/drv/drvJgvtr1.c +++ b/src/drv/drvJgvtr1.c @@ -86,23 +86,23 @@ static char *sccsID = "@(#)drvJgvtr1.c 1.9\t8/27/92"; # endif -long jgvtr1_io_report( +static long jgvtr1_io_report( unsigned level ); -long jgvtr1_init( +static long jgvtr1_init( void ); -void jgvtr1_int_service( +static void jgvtr1_int_service( void ); -void jgvtr1DoneTask( +static void jgvtr1DoneTask( void ); -int jgvtr1_dump( +static int jgvtr1_dump( unsigned card, unsigned n ); @@ -110,13 +110,13 @@ int jgvtr1_dump( /* * should be in a header file */ -int jgvtr1_driver( +static int jgvtr1_driver( unsigned short card, unsigned int *pcbroutine, unsigned int *parg /* number of values read */ ); -int jgvtr1_stat( +static int jgvtr1_stat( unsigned card, short int level ); @@ -228,8 +228,7 @@ long jgvtr1_init( if(pjgvtr1_config){ if(FASTLOCKFREE(&pjgvtr1_config->lock)<0) return ERROR; - if(free(pjgvtr1_config)<0) - return ERROR; + free(pjgvtr1_config); } pjgvtr1_config = diff --git a/src/drv/drvKscV215.c b/src/drv/drvKscV215.c index 998bca8f7..add85101f 100644 --- a/src/drv/drvKscV215.c +++ b/src/drv/drvKscV215.c @@ -57,7 +57,7 @@ #include #endif -long init(); +static long init(); struct { long number; @@ -98,13 +98,12 @@ struct KscV215_config{ #define KscV215Handshake (0x0040) #define KscV215csrInit (0x9000) -LOCAL -int KscV215DriverId; +static int KscV215DriverId; -void KscV215_int_service(); -void KscV215_init_card(); -void KscV215_stat(); -int KscV215WriteSync(); +static void KscV215_int_service(); +static void KscV215_init_card(); +static void KscV215_stat(); +static int KscV215WriteSync(); struct KscV215_A24{ diff --git a/src/drv/drvMz8310.c b/src/drv/drvMz8310.c index 59a55a2cd..e127647af 100644 --- a/src/drv/drvMz8310.c +++ b/src/drv/drvMz8310.c @@ -67,8 +67,8 @@ /* If any of the following does not exist replace it with #define <> NULL */ -long mz8310_io_report(); -long mz8310_init(); +static long mz8310_io_report(); +static long mz8310_init(); struct { long number; @@ -174,8 +174,8 @@ static struct mz8310_strap_info mz8310_strap[MZ8310CHANCNT] = /* forward reference. */ -void mz8310_reset(); -int mz8310_io_report_card(int card, int level); +static void mz8310_reset(); +static int mz8310_io_report_card(int card, int level); long mz8310_io_report(level) diff --git a/src/drv/drvXy010.c b/src/drv/drvXy010.c index 601e63a17..542861656 100644 --- a/src/drv/drvXy010.c +++ b/src/drv/drvXy010.c @@ -51,10 +51,10 @@ static char *sccsID = "$Id$\t$Date$"; * as the drivers become more autonomous */ -long xy010_id_check(char *); -long xy010_io_report(int); -long xy010_init(void); -long xy010_map(void); +static long xy010_id_check(char *); +static long xy010_io_report(int); +static long xy010_init(void); +static long xy010_map(void); struct { long number; diff --git a/src/drv/drvXy240.c b/src/drv/drvXy240.c index 24d6204e6..a2efe5a8a 100644 --- a/src/drv/drvXy240.c +++ b/src/drv/drvXy240.c @@ -269,8 +269,8 @@ xy240_init() #ifndef EPICS_V2 xy240_getioscanpvt(card,scanpvt) -unsigned short card; -IOSCANPVT *scanpvt; +short card; +IOSCANPVT *scanpvt; { if ((card >= XY240_MAX_CARDS) || (!dio[card].dptr)) return(0); *scanpvt = dio[card].ioscanpvt; @@ -286,18 +286,19 @@ IOSCANPVT *scanpvt; */ xy240_bi_driver(card,mask,prval) - register unsigned short card; - unsigned int mask; - register unsigned int *prval; +register short card; +unsigned int mask; +register unsigned int *prval; { register unsigned int work; - if ((card >= XY240_MAX_CARDS) || (!dio[card].dptr)) - return -1; -/* printf("%d\n",dio[card].num);*/ - work = (dio[card].dptr->port0_1 << 16) - + dio[card].dptr->port2_3; - *prval = work & mask; - return(0); + + if ((card >= XY240_MAX_CARDS) || (!dio[card].dptr)) + return -1; + work = (dio[card].dptr->port0_1 << 16) + + dio[card].dptr->port2_3; + *prval = work & mask; + + return(0); } /* @@ -308,20 +309,22 @@ xy240_bi_driver(card,mask,prval) */ xy240_bo_read(card,mask,prval) - register unsigned short card; - unsigned int mask; - register unsigned int *prval; - { +register short card; +unsigned int mask; +register unsigned int *prval; +{ register unsigned int work; - if ((card >= XY240_MAX_CARDS) || (!dio[card].dptr)){ - return -1; - } + + if ((card >= XY240_MAX_CARDS) || (!dio[card].dptr)){ + return -1; + } - /* printf("%d\n",dio[card].num); */ - work = (dio[card].dptr->port4_5 << 16) - + dio[card].dptr->port6_7; + /* printf("%d\n",dio[card].num); */ + work = (dio[card].dptr->port4_5 << 16) + + dio[card].dptr->port6_7; - *prval = work &= mask; + *prval = work &= mask; + return(0); } @@ -331,10 +334,10 @@ xy240_bo_read(card,mask,prval) */ xy240_bo_driver(card,val,mask) - register unsigned short card; - unsigned int mask; - register unsigned int val; - { +register short card; +unsigned int mask; +register unsigned int val; +{ register unsigned int work; if ((card >= XY240_MAX_CARDS) || (!dio[card].dptr)) @@ -360,8 +363,7 @@ xy240_bo_driver(card,val,mask) *test routine for xy240 output */ dio_out(card,port,val) - unsigned short card,port,val; - +short card,port,val; { if ((card > XY240_MAX_CARDS-1)) /*test to see if card# is allowable*/ diff --git a/src/drv/drvXy566.c b/src/drv/drvXy566.c index 307cf5d76..46ebc258d 100644 --- a/src/drv/drvXy566.c +++ b/src/drv/drvXy566.c @@ -107,12 +107,12 @@ static char SccsId[] = "$Id$\t$Date$ "; /* If any of the following does not exist replace it with #define <> NULL */ -long report(); -long init(); +static long report(); +static long init(); #if 0 -long xy566_io_report(); -long ai_566_init(); +static long xy566_io_report(); +static long ai_566_init(); #endif struct { @@ -254,12 +254,12 @@ unsigned int **proutine; int wfDoneId; /* waveform done task ID */ /* forward references */ -void senw(); -VOID xy566_reset(); -int ai_xy566_init(); -int ai_xy566l_init(); -VOID rval_convert(); -VOID xy566_rval_report(); +static void senw(); +static VOID xy566_reset(); +static int ai_xy566_init(); +static int ai_xy566l_init(); +static VOID rval_convert(); +static VOID xy566_rval_report(); static acro_intr(ap) @@ -637,14 +637,14 @@ ai_xy566_getioscanpvt(card,scanpvt) unsigned short card; IOSCANPVT *scanpvt; { - if((card<=MAX_DIL_CARDS) && paioscanpvt[card]) *scanpvt = paioscanpvt[card]; + if((card<=(unsigned short)MAX_DIL_CARDS) && paioscanpvt[card]) *scanpvt = paioscanpvt[card]; return(0); } #endif ai_xy566_driver(card,chan,type,prval) -register unsigned short card; -unsigned short chan; +register short card; +short chan; register unsigned int type; register unsigned short *prval; {