ANSI C changes

This commit is contained in:
Janet B. Anderson
1992-02-28 17:51:33 +00:00
parent db2c5fd491
commit baeaa29fdb
12 changed files with 82 additions and 72 deletions

View File

@@ -47,13 +47,14 @@
* .13 10-24-91 jba Moved comment
* .14 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .15 02-05-92 jba Changed function arguments from paddr to precord
* .16 02-28-92 jba ANSI C changes
*/
#include <vxWorks.h>
#include <types.h>
#include <stdioLib.h>
#include <lstLib.h>
#include <strLib.h>
#include <string.h>
#include <alarm.h>
#include <dbDefs.h>
@@ -67,22 +68,22 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
long init_record();
long process();
static long init_record();
static long process();
#define special NULL
long get_value();
static long get_value();
#define cvt_dbaddr NULL
#define get_array_info NULL
#define put_array_info NULL
#define get_units NULL
#define get_precision NULL
long get_enum_str();
long get_enum_strs();
long put_enum_str();
static long get_enum_str();
static long get_enum_strs();
static long put_enum_str();
#define get_graphic_double NULL
#define get_control_double NULL
#define get_alarm_double NULL
struct rset biRSET={
static struct rset biRSET={
RSETNUMBER,
report,
initialize,
@@ -204,7 +205,7 @@ static long get_enum_strs(paddr,pes)
struct biRecord *pbi=(struct biRecord *)paddr->precord;
pes->no_str = 2;
bzero(pes->strs,sizeof(pes->strs));
memset(pes->strs,'\0',sizeof(pes->strs));
strncpy(pes->strs[0],pbi->znam,sizeof(pbi->znam));
strncpy(pes->strs[1],pbi->onam,sizeof(pbi->onam));
return(0);

View File

@@ -54,13 +54,15 @@
* .18 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .19 01-08-92 jba Added cast in call to wdStart to remove compile warning message
* .20 02-05-92 jba Changed function arguments from paddr to precord
* .21 02-28-92 jba ANSI C changes
*/
#include <vxWorks.h>
#include <types.h>
#include <stdioLib.h>
#include <lstLib.h>
#include <strLib.h>
#include <string.h>
#include <memLib.h>
#include <wdLib.h>
#include <alarm.h>
@@ -77,18 +79,18 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
long init_record();
long process();
static long init_record();
static long process();
#define special NULL
long get_value();
static long get_value();
#define cvt_dbaddr NULL
#define get_array_info NULL
#define put_array_info NULL
#define get_units NULL
#define get_precision NULL
long get_enum_str();
long get_enum_strs();
long put_enum_str();
static long get_enum_str();
static long get_enum_strs();
static long put_enum_str();
#define get_graphic_double NULL
#define get_control_double NULL
#define get_alarm_double NULL
@@ -140,7 +142,6 @@ void monitor();
static void myCallback(pcallback)
struct callback *pcallback;
{
short value=0;
struct boRecord *pbo = (struct boRecord *)(pcallback->dbAddr.precord);
dbScanLock((struct dbCommon *)pbo);
@@ -172,7 +173,7 @@ static long init_record(pbo)
pbo->udf = FALSE;
}
pcallback = (struct callback *)(calloc(1,sizeof(struct callback)));
pbo->dpvt = (caddr_t)pcallback;
pbo->dpvt = (void *)pcallback;
pcallback->callback = myCallback;
pcallback->priority = priorityMedium;
if(dbNameToAddr(pbo->name,&(pcallback->dbAddr))) {
@@ -285,7 +286,7 @@ static long get_enum_strs(paddr,pes)
struct boRecord *pbo=(struct boRecord *)paddr->precord;
pes->no_str = 2;
bzero(pes->strs,sizeof(pes->strs));
memset(pes->strs,'\0',sizeof(pes->strs));
strncpy(pes->strs[0],pbo->znam,sizeof(pbo->znam));
strncpy(pes->strs[1],pbo->onam,sizeof(pbo->onam));
return(0);

View File

@@ -29,7 +29,8 @@
*
* Modification Log:
* -----------------
* .00 12-13-91 jba Initial definition
4 .00 12-13-91 jba Initial definition
* .01 02-28-92 jba ANSI C changes
*/
#include <vxWorks.h>
@@ -51,10 +52,10 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
long init_record();
long process();
static long init_record();
static long process();
#define special NULL
long get_value();
static long get_value();
#define cvt_dbaddr NULL
#define get_array_info NULL
#define put_array_info NULL
@@ -142,7 +143,7 @@ static long get_value(pevent,pvdes)
{
pvdes->field_type = DBF_USHORT;
pvdes->no_elements=1;
pvdes->pvalue = (caddr_t)(&pevent->val);
pvdes->pvalue = (void *)(&pevent->val);
return(0);
}

View File

@@ -41,6 +41,7 @@
* .10 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .11 02-05-92 jba Changed function arguments from paddr to precord
* .12 02-05-92 jba Added FWD scan link
* .13 02-28-92 jba ANSI C changes
*/
#include <vxWorks.h>
@@ -59,8 +60,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
long init_record();
long process();
static long init_record();
static long process();
#define special NULL
#define get_value NULL
#define cvt_dbaddr NULL

View File

@@ -31,6 +31,7 @@
* -----------------
* .01 10-14-91 jba Added dev sup crtl fld and wd timer
* .02 02-05-92 jba Changed function arguments from paddr to precord
* .03 02-28-92 jba ANSI C changes
*/
#include <vxWorks.h>
@@ -41,6 +42,7 @@
#include <math.h>
#include <limits.h>
#include <wdLib.h>
#include <memLib.h>
#include <alarm.h>
#include <callback.h>
@@ -56,12 +58,12 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
long init_record();
static long init_record();
static long process();
long special();
long get_value();
long cvt_dbaddr();
long get_array_info();
static long special();
static long get_value();
static long cvt_dbaddr();
static long get_array_info();
#define put_array_info NULL
#define get_units NULL
#define get_precision NULL
@@ -158,7 +160,7 @@ static long init_record(phistogram)
if(phistogram->wdog==NULL && phistogram->sdel!=0) {
/* initialize a watchdog timer */
pcallback = (struct callback *)(calloc(1,sizeof(struct callback)));
phistogram->wdog = (caddr_t)pcallback;
phistogram->wdog = (void *)pcallback;
pcallback->callback = wdCallback;
pcallback->priority = priorityLow;
if(dbNameToAddr(phistogram->name,&(pcallback->dbAddr))) {
@@ -238,7 +240,6 @@ static long special(paddr,after)
int after;
{
struct histogramRecord *phistogram = (struct histogramRecord *)(paddr->precord);
struct histogramdset *pdset = (struct histogramdset *) (phistogram->dset);
int special_type = paddr->special;
if(!after) return(0);
@@ -274,7 +275,6 @@ static void monitor(phistogram)
{
unsigned short monitor_mask;
short stat,sevr,nsta,nsev;
struct callback *pcallback=(struct callback *)(phistogram->dpvt);
/* get previous stat and sevr and new stat and sevr*/
stat=phistogram->stat;
@@ -330,7 +330,7 @@ static long cvt_dbaddr(paddr)
/* This may get called before init_record. If so just call it*/
if(phistogram->bptr==NULL) init_record(phistogram);
paddr->pfield = (caddr_t)(phistogram->bptr);
paddr->pfield = (void *)(phistogram->bptr);
paddr->no_elements = phistogram->nelm;
paddr->field_type = DBF_ULONG;
paddr->field_size = sizeof(long);
@@ -356,7 +356,6 @@ static long add_count(phistogram)
double temp;
unsigned long *pdest;
int i;
double sgnl;
if(phistogram->csta==FALSE) return(0);

View File

@@ -48,13 +48,14 @@
* .13 10-31-90 mrk changes for new record and device support
* .14 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .15 02-05-92 jba Changed function arguments from paddr to precord
* .16 02-28-92 jba ANSI C changes
*/
#include <vxWorks.h>
#include <types.h>
#include <stdioLib.h>
#include <lstLib.h>
#include <strLib.h>
#include <string.h>
#include <alarm.h>
#include <dbDefs.h>
@@ -68,18 +69,18 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
long init_record();
long process();
long special();
long get_value();
static long init_record();
static long process();
static long special();
static long get_value();
#define cvt_dbaddr NULL
#define get_array_info NULL
#define put_array_info NULL
#define get_units NULL
#define get_precision NULL
long get_enum_str();
long get_enum_strs();
long put_enum_str();
static long get_enum_str();
static long get_enum_strs();
static long put_enum_str();
#define get_graphic_double NULL
#define get_control_double NULL
#define get_alarm_double NULL
@@ -275,7 +276,7 @@ static long get_enum_strs(paddr,pes)
short no_str;
no_str = 0;
bzero(pes->strs,sizeof(pes->strs));
memset(pes->strs,'\0',sizeof(pes->strs));
for(i=0,psource=(pmbbi->zrst); i<16; i++, psource += sizeof(pmbbi->zrst) ) {
strncpy(pes->strs[i],psource,sizeof(pmbbi->zrst));
if(*psource!=0) no_str=i+1;

View File

@@ -51,13 +51,14 @@
* .16 10-11-90 mrk make changes for new record and device support
* .17 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .18 02-05-92 jba Changed function arguments from paddr to precord
* .19 02-28-92 jba ANSI C changes
*/
#include <vxWorks.h>
#include <types.h>
#include <stdioLib.h>
#include <lstLib.h>
#include <strLib.h>
#include <string.h>
#include <alarm.h>
#include <dbDefs.h>
@@ -72,18 +73,18 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
long init_record();
long process();
long special();
long get_value();
static long init_record();
static long process();
static long special();
static long get_value();
#define cvt_dbaddr NULL
#define get_array_info NULL
#define put_array_info NULL
#define get_units NULL
#define get_precision NULL
long get_enum_str();
long get_enum_strs();
long put_enum_str();
static long get_enum_str();
static long get_enum_strs();
static long put_enum_str();
#define get_graphic_double NULL
#define get_control_double NULL
#define get_alarm_double NULL
@@ -204,7 +205,6 @@ static long process(pmbbo)
{
struct mbbodset *pdset = (struct mbbodset *)(pmbbo->dset);
long status=0;
unsigned short rbv;
if( (pdset==NULL) || (pdset->write_mbbo==NULL) ) {
pmbbo->pact=TRUE;
@@ -321,7 +321,7 @@ static long get_enum_strs(paddr,pes)
short no_str;
no_str=0;
bzero(pes->strs,sizeof(pes->strs));
memset(pes->strs,'\0',sizeof(pes->strs));
for(i=0,psource=(pmbbo->zrst); i<16; i++, psource += sizeof(pmbbo->zrst) ) {
strncpy(pes->strs[i],psource,sizeof(pmbbo->zrst));
if(*psource!=0)no_str=i+1;

View File

@@ -33,6 +33,7 @@
* .01 10-10-90 mrk extensible record and device support
* .02 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .03 02-05-92 jba Changed function arguments from paddr to precord
* .04 02-28-92 jba ANSI C changes
*/
#include <vxWorks.h>
@@ -51,9 +52,9 @@
#define report NULL
#define initialize NULL
#define init_record NULL
long process();
static long process();
#define special NULL
long get_value();
static long get_value();
#define cvt_dbaddr NULL
#define get_array_info NULL
#define put_array_info NULL

View File

@@ -33,12 +33,14 @@
* .01 10-10-90 mrk extensible record and device support
* .02 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .03 02-05-92 jba Changed function arguments from paddr to precord
* .04 02-28-92 jba ANSI C changes
*/
#include <vxWorks.h>
#include <types.h>
#include <stdioLib.h>
#include <lstLib.h>
#include <string.h>
#include <dbDefs.h>
#include <dbAccess.h>
@@ -52,9 +54,9 @@
#define report NULL
#define initialize NULL
#define init_record NULL
long process();
static long process();
#define special NULL
long get_value();
static long get_value();
#define cvt_dbaddr NULL
#define get_array_info NULL
#define put_array_info NULL
@@ -109,7 +111,7 @@ static long get_value(pstate,pvdes)
{
pvdes->field_type = DBF_STRING;
pvdes->no_elements=1;
pvdes->pvalue = (caddr_t)(&pstate->val[0]);
pvdes->pvalue = (void *)(&pstate->val[0]);
return(0);
}

View File

@@ -31,6 +31,7 @@
* -----------------
* .01 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .02 02-05-92 jba Changed function arguments from paddr to precord
* .03 02-28-92 jba ANSI C changes
*/
@@ -52,10 +53,10 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
long init_record();
long process();
static long init_record();
static long process();
#define special NULL
long get_value();
static long get_value();
#define cvt_dbaddr NULL
#define get_array_info NULL
#define put_array_info NULL
@@ -157,7 +158,7 @@ static long get_value(pstringin,pvdes)
{
pvdes->field_type = DBF_STRING;
pvdes->no_elements=1;
pvdes->pvalue = (caddr_t)(&pstringin->val[0]);
pvdes->pvalue = (void *)(&pstringin->val[0]);
return(0);
}

View File

@@ -32,6 +32,7 @@
* .01 10-24-91 jba Removed unused code
* .02 11-11-91 jba Moved set and reset of alarm stat and sevr to macros
* .03 02-05-92 jba Changed function arguments from paddr to precord
* .04 02-28-92 jba ANSI C changes
*/
@@ -53,10 +54,10 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
long init_record();
long process();
static long init_record();
static long process();
#define special NULL
long get_value();
static long get_value();
#define cvt_dbaddr NULL
#define get_array_info NULL
#define put_array_info NULL
@@ -181,7 +182,7 @@ static long get_value(pstringout,pvdes)
{
pvdes->field_type = DBF_STRING;
pvdes->no_elements=1;
pvdes->pvalue = (caddr_t)(&pstringout->val[0]);
pvdes->pvalue = (void *)(&pstringout->val[0]);
return(0);
}

View File

@@ -45,6 +45,7 @@
* .12 12-02-91 jba Added cmd control to io-interrupt processing
* .13 12-12-91 jba Set cmd to zero in io-interrupt processing
* .14 02-05-92 jba Changed function arguments from paddr to precord
* .15 02-28-92 jba ANSI C changes
*/
#include <vxWorks.h>
@@ -65,10 +66,10 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
long init_record();
long process();
static long init_record();
static long process();
#define special NULL
long get_value();
static long get_value();
#define cvt_dbaddr NULL
#define get_array_info NULL
#define put_array_info NULL
@@ -102,7 +103,7 @@ struct rset timerRSET={
get_alarm_double };
/* because the driver does all the work just declare device support here*/
long get_ioint_info();
static long get_ioint_info();
struct dset devTmMizar8310={4,NULL,NULL,NULL,get_ioint_info};
struct dset devTmDg535={4,NULL,NULL,NULL,get_ioint_info};
struct dset devTmVxiAt5={4,NULL,NULL,NULL,get_ioint_info};