EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

<20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  Index <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022 
<== Date ==> <== Thread ==>

Subject: Re: RISC_pad in dbr_time_double
From: Marty Kraimer <[email protected]>
To: "TYLER, Paul" <[email protected]>
Cc: "'Jeff Hill'" <[email protected]>, "'Andrew Johnson'" <[email protected]>, "'Janet Anderson'" <[email protected]>, [email protected], Marty Kraimer <[email protected]>
Date: Thu, 05 Dec 2002 10:20:20 -0600
In the following I have only looked at changes for long, unsigned long, and enums.

I have modified the following files (all in <base>/src)

ca/db_access.h

Just added some ifdefs so that db_access.c can get it's structure definitions from this file.
libCom/cvtFast/cvtFast.*

long => epicsInt32
unsigned long=> epicsUInt32

dbStatic/dbToRecordtypeH.c

In generated include files the following field definitions are changed

long => epicsInt32
unsigned long=> epicsUInt32
unsigned shot=> epicsEnum16 (for DBF_ENUM,DBF_MENU,DBF_DEVICE)

db/db_access.c

Get structure defs from db_access.h

short => dbr_short_t OR dbr_enum_t as necessary
float => dbr_float_t
char => dbr_char_t
long => dbr_long_t
double => dbr_double_t

dbAccessDefs.h

replace elementary types with epics types, e.g. long=>epicsInt32


dbConvert.c and dbFastLinkConv.c

replaced all enums from unsigned short to epicsEnum16
rplaced long by epicsInt32
replaced unsigned long by epicsUInt32


I am attaching a complete list of the diffs.

Questions

1) What about all the other defs like float=>epicsFloat32 ?
2) What about all the other uses of long in base?
3) What about long for no_elements in dbAddr.h
4) Have I already gone too far?

Marty



Index: ca/db_access.h
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/ca/db_access.h,v
retrieving revision 1.13
diff -r1.13 db_access.h
62a63
> #ifndef db_accessHFORdb_accessC
180c181
< 
---
> #endif /*db_accessHFORdb_accessC*/
526a528
> #ifndef db_accessHFORdb_accessC
732a735
> #endif /*db_accessHFORdb_accessC*/
Index: db/dbAccessDefs.h
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/db/dbAccessDefs.h,v
retrieving revision 1.9
diff -r1.9 dbAccessDefs.h
15a16,21
> #ifdef epicsExportSharedSymbols
> #   define INCLdb_accessh_epicsExportSharedSymbols
> #   undef epicsExportSharedSymbols
> #endif
> 
> #include "epicsTypes.h"
17c23,28
< #include "shareLib.h"
---
> 
> #ifdef INCLdb_accessh_epicsExportSharedSymbols
> #   define epicsExportSharedSymbols
> #   include "shareLib.h"
> #endif
> 
48c59
<  *	float value[10]
---
>  *	epicsFloat32 value[10]
81c92
<  *	float value[10]
---
>  *	epicsFloat32 value[10]
92,95c103,106
< 	unsigned short	status;		/* alarm status */\
< 	unsigned short	severity;	/* alarm severity*/\
< 	unsigned short	acks;		/* alarm ack severity*/\
< 	unsigned short	ackt;		/* Acknowledge transient alarms?*/
---
> 	epicsUInt16	status;		/* alarm status */\
> 	epicsUInt16	severity;	/* alarm severity*/\
> 	epicsUInt16	acks;		/* alarm ack severity*/\
> 	epicsUInt16	ackt;		/* Acknowledge transient alarms?*/
100,101c111,112
<         long            precision;      /* number of decimal places*/\
<         long            field_width;    /* field width             */
---
>         epicsInt32      precision;      /* number of decimal places*/\
>         epicsInt32      field_width;    /* field width             */
105,106c116,117
< 	unsigned long	no_str;		/* number of strings*/\
< 	long		padenumStrs;	/*padding to force 8 byte align*/\
---
> 	epicsUInt32	no_str;		/* number of strings*/\
> 	epicsInt32	padenumStrs;	/*padding to force 8 byte align*/\
109,110c120,121
<         long            upper_disp_limit;       /*upper limit of graph*/\
<         long            lower_disp_limit;       /*lower limit of graph*/
---
>         epicsInt32      upper_disp_limit;       /*upper limit of graph*/\
>         epicsInt32      lower_disp_limit;       /*lower limit of graph*/
112,113c123,124
<         double          upper_disp_limit;       /*upper limit of graph*/\
<         double          lower_disp_limit;       /*lower limit of graph*/
---
>         epicsFloat64    upper_disp_limit;       /*upper limit of graph*/\
>         epicsFloat64    lower_disp_limit;       /*lower limit of graph*/
115,116c126,127
<         long            upper_ctrl_limit;       /*upper limit of graph*/\
<         long            lower_ctrl_limit;       /*lower limit of graph*/
---
>         epicsInt32      upper_ctrl_limit;       /*upper limit of graph*/\
>         epicsInt32      lower_ctrl_limit;       /*lower limit of graph*/
118,119c129,130
<         double          upper_ctrl_limit;       /*upper limit of graph*/\
<         double          lower_ctrl_limit;       /*lower limit of graph*/
---
>         epicsFloat64    upper_ctrl_limit;       /*upper limit of graph*/\
>         epicsFloat64    lower_ctrl_limit;       /*lower limit of graph*/
121,124c132,135
<         long            upper_alarm_limit;\
<         long            upper_warning_limit;\
<         long            lower_warning_limit;\
<         long            lower_alarm_limit;
---
>         epicsInt32      upper_alarm_limit;\
>         epicsInt32      upper_warning_limit;\
>         epicsInt32      lower_warning_limit;\
>         epicsInt32      lower_alarm_limit;
126,129c137,140
<         double          upper_alarm_limit;\
<         double          upper_warning_limit;\
<         double          lower_warning_limit;\
<         double          lower_alarm_limit;
---
>         epicsFloat64    upper_alarm_limit;\
>         epicsFloat64    upper_warning_limit;\
>         epicsFloat64    lower_warning_limit;\
>         epicsFloat64    lower_alarm_limit;
Index: db/dbConvert.c
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/db/dbConvert.c,v
retrieving revision 1.17
diff -r1.17 dbConvert.c
238c238
<     long   *pbuffer = (long *)pto;
---
>     epicsInt32   *pbuffer = (epicsInt32 *)pto;
240c240
<     long  value;
---
>     epicsInt32  value;
243c243
< 	if(sscanf(psrc,"%ld",&value) == 1) {
---
> 	if(sscanf(psrc,"%d",&value) == 1) {
255c255
< 	if(sscanf(psrc,"%ld",&value) == 1) {
---
> 	if(sscanf(psrc,"%d",&value) == 1) {
275,277c275,277
<     unsigned long	*pbuffer = (unsigned long *)pto;
<     char   		*psrc=(char *)paddr->pfield;
<     double  		value;
---
>     epicsUInt32	*pbuffer = (epicsUInt32 *)pto;
>     char   	*psrc=(char *)paddr->pfield;
>     double  	value;
283c283
< 		*pbuffer = (unsigned long)value;
---
> 		*pbuffer = (epicsUInt32)value;
295c295
< 	    *pbuffer = (unsigned long)value;
---
> 	    *pbuffer = (epicsUInt32)value;
493c493
<     long *pbuffer = (long *)pto;
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pto;
512c512
<     unsigned long *pbuffer = (unsigned long *)pto;
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pto;
569c569
<     unsigned short *pbuffer = (unsigned short *)pto;
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pto;
687c687
<     long *pbuffer = (long *)pto;
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pto;
706c706
<     unsigned long *pbuffer = (unsigned long *)pto;
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pto;
763c763
<     unsigned short *pbuffer = (unsigned short *)pto;
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pto;
880c880
<     long *pbuffer = (long *)pto;
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pto;
899c899
<     unsigned long *pbuffer = (unsigned long *)pto;
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pto;
956c956
<     unsigned short *pbuffer = (unsigned short *)pto;
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pto;
1073c1073
<     long *pbuffer = (long *)pto;
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pto;
1092c1092
<     unsigned long *pbuffer = (unsigned long *)pto;
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pto;
1149c1149
<     unsigned short *pbuffer = (unsigned short *)pto;
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pto;
1169c1169
<     long *psrc=(long *)(paddr->pfield);
---
>     epicsInt32 *psrc=(epicsInt32 *)(paddr->pfield);
1180c1180
< 		psrc=(long *)paddr->pfield;
---
> 		psrc=(epicsInt32 *)paddr->pfield;
1192c1192
<     long *psrc=(long *)(paddr->pfield);
---
>     epicsInt32 *psrc=(epicsInt32 *)(paddr->pfield);
1201c1201
< 	if(++offset==no_elements) psrc=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsInt32 *)paddr->pfield;
1211c1211
<     long *psrc=(long *)(paddr->pfield);
---
>     epicsInt32 *psrc=(epicsInt32 *)(paddr->pfield);
1220c1220
< 	if(++offset==no_elements) psrc=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsInt32 *)paddr->pfield;
1230c1230
<     long *psrc=(long *)(paddr->pfield);
---
>     epicsInt32 *psrc=(epicsInt32 *)(paddr->pfield);
1239c1239
< 	if(++offset==no_elements) psrc=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsInt32 *)paddr->pfield;
1249c1249
<     long *psrc=(long *)(paddr->pfield);
---
>     epicsInt32 *psrc=(epicsInt32 *)(paddr->pfield);
1258c1258
< 	if(++offset==no_elements) psrc=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsInt32 *)paddr->pfield;
1267,1268c1267,1268
<     long *pbuffer = (long *)pto;
<     long *psrc=(long *)(paddr->pfield);
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pto;
>     epicsInt32 *psrc=(epicsInt32 *)(paddr->pfield);
1277c1277
< 	if(++offset==no_elements) psrc=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsInt32 *)paddr->pfield;
1286,1287c1286,1287
<     unsigned long *pbuffer = (unsigned long *)pto;
<     long *psrc=(long *)(paddr->pfield);
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pto;
>     epicsInt32 *psrc=(epicsInt32 *)(paddr->pfield);
1296c1296
< 	if(++offset==no_elements) psrc=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsInt32 *)paddr->pfield;
1306c1306
<     long *psrc=(long *)(paddr->pfield);
---
>     epicsInt32 *psrc=(epicsInt32 *)(paddr->pfield);
1315c1315
< 	if(++offset==no_elements) psrc=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsInt32 *)paddr->pfield;
1325c1325
<     long *psrc=(long *)(paddr->pfield);
---
>     epicsInt32 *psrc=(epicsInt32 *)(paddr->pfield);
1334c1334
< 	if(++offset==no_elements) psrc=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsInt32 *)paddr->pfield;
1343,1344c1343,1344
<     unsigned short  *pbuffer = (unsigned short  *)pto;
<     long *psrc=(long *)(paddr->pfield);
---
>     epicsEnum16  *pbuffer = (epicsEnum16  *)pto;
>     epicsInt32 *psrc=(epicsInt32 *)(paddr->pfield);
1353c1353
< 	if(++offset==no_elements) psrc=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsInt32 *)paddr->pfield;
1363c1363
<     unsigned long *psrc=(unsigned long *)(paddr->pfield);
---
>     epicsUInt32 *psrc=(epicsUInt32 *)(paddr->pfield);
1374c1374
< 		psrc=(unsigned long *)paddr->pfield;
---
> 		psrc=(epicsUInt32 *)paddr->pfield;
1386c1386
<     unsigned long *psrc=(unsigned long *)(paddr->pfield);
---
>     epicsUInt32 *psrc=(epicsUInt32 *)(paddr->pfield);
1395c1395
< 	if(++offset==no_elements) psrc=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsUInt32 *)paddr->pfield;
1405c1405
<     unsigned long *psrc=(unsigned long *)(paddr->pfield);
---
>     epicsUInt32 *psrc=(epicsUInt32 *)(paddr->pfield);
1414c1414
< 	if(++offset==no_elements) psrc=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsUInt32 *)paddr->pfield;
1424c1424
<     unsigned long *psrc=(unsigned long *)(paddr->pfield);
---
>     epicsUInt32 *psrc=(epicsUInt32 *)(paddr->pfield);
1433c1433
< 	if(++offset==no_elements) psrc=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsUInt32 *)paddr->pfield;
1443c1443
<     unsigned long *psrc=(unsigned long *)(paddr->pfield);
---
>     epicsUInt32 *psrc=(epicsUInt32 *)(paddr->pfield);
1452c1452
< 	if(++offset==no_elements) psrc=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsUInt32 *)paddr->pfield;
1461,1462c1461,1462
<     long  *pbuffer = (long  *)pto;
<     unsigned long *psrc=(unsigned long *)(paddr->pfield);
---
>     epicsInt32  *pbuffer = (epicsInt32  *)pto;
>     epicsUInt32 *psrc=(epicsUInt32 *)(paddr->pfield);
1471c1471
< 	if(++offset==no_elements) psrc=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsUInt32 *)paddr->pfield;
1480,1481c1480,1481
<     unsigned long  *pbuffer = (unsigned long  *)pto;
<     unsigned long *psrc=(unsigned long *)(paddr->pfield);
---
>     epicsUInt32  *pbuffer = (epicsUInt32  *)pto;
>     epicsUInt32 *psrc=(epicsUInt32 *)(paddr->pfield);
1490c1490
< 	if(++offset==no_elements) psrc=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsUInt32 *)paddr->pfield;
1500c1500
<     unsigned long *psrc=(unsigned long *)(paddr->pfield);
---
>     epicsUInt32 *psrc=(epicsUInt32 *)(paddr->pfield);
1509c1509
< 	if(++offset==no_elements) psrc=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsUInt32 *)paddr->pfield;
1519c1519
<     unsigned long *psrc=(unsigned long *)(paddr->pfield);
---
>     epicsUInt32 *psrc=(epicsUInt32 *)(paddr->pfield);
1528c1528
< 	if(++offset==no_elements) psrc=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsUInt32 *)paddr->pfield;
1537,1538c1537,1538
<     unsigned short *pbuffer = (unsigned short *)pto;
<     unsigned long *psrc=(unsigned long *)(paddr->pfield);
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pto;
>     epicsUInt32 *psrc=(epicsUInt32 *)(paddr->pfield);
1547c1547
< 	if(++offset==no_elements) psrc=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsUInt32 *)paddr->pfield;
1661c1661
<     long *pbuffer = (long *)pto;
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pto;
1680c1680
<     unsigned long *pbuffer = (unsigned long *)pto;
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pto;
1737c1737
<     unsigned short *pbuffer = (unsigned short *)pto;
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pto;
1861c1861
<     long *pbuffer = (long *)pto;
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pto;
1880c1880
<     unsigned long *pbuffer = (unsigned long *)pto;
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pto;
1938c1938
<     unsigned short *pbuffer = (unsigned short *)pto;
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pto;
1972c1972
<     unsigned short *psrc=(unsigned short *)(paddr->pfield);
---
>     epicsEnum16 *psrc=(epicsEnum16 *)(paddr->pfield);
1981c1981
< 	if(++offset==no_elements) psrc=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsEnum16 *)paddr->pfield;
1991c1991
<     unsigned short *psrc=(unsigned short *)(paddr->pfield);
---
>     epicsEnum16 *psrc=(epicsEnum16 *)(paddr->pfield);
2000c2000
< 	if(++offset==no_elements) psrc=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsEnum16 *)paddr->pfield;
2010c2010
<     unsigned short *psrc=(unsigned short *)(paddr->pfield);
---
>     epicsEnum16 *psrc=(epicsEnum16 *)(paddr->pfield);
2019c2019
< 	if(++offset==no_elements) psrc=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsEnum16 *)paddr->pfield;
2029c2029
<     unsigned short *psrc=(unsigned short *)(paddr->pfield);
---
>     epicsEnum16 *psrc=(epicsEnum16 *)(paddr->pfield);
2038c2038
< 	if(++offset==no_elements) psrc=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsEnum16 *)paddr->pfield;
2047,2048c2047,2048
<     long *pbuffer = (long *)pto;
<     unsigned short *psrc=(unsigned short *)(paddr->pfield);
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pto;
>     epicsEnum16 *psrc=(epicsEnum16 *)(paddr->pfield);
2057c2057
< 	if(++offset==no_elements) psrc=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsEnum16 *)paddr->pfield;
2066,2067c2066,2067
<     unsigned long *pbuffer = (unsigned long *)pto;
<     unsigned short *psrc=(unsigned short *)(paddr->pfield);
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pto;
>     epicsEnum16 *psrc=(epicsEnum16 *)(paddr->pfield);
2076c2076
< 	if(++offset==no_elements) psrc=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsEnum16 *)paddr->pfield;
2086c2086
<     unsigned short *psrc=(unsigned short *)(paddr->pfield);
---
>     epicsEnum16 *psrc=(epicsEnum16 *)(paddr->pfield);
2095c2095
< 	if(++offset==no_elements) psrc=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsEnum16 *)paddr->pfield;
2105c2105
<     unsigned short *psrc=(unsigned short *)(paddr->pfield);
---
>     epicsEnum16 *psrc=(epicsEnum16 *)(paddr->pfield);
2114c2114
< 	if(++offset==no_elements) psrc=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsEnum16 *)paddr->pfield;
2123,2124c2123,2124
<     unsigned short *pbuffer = (unsigned short *)pto;
<     unsigned short *psrc=(unsigned short *)(paddr->pfield);
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pto;
>     epicsEnum16 *psrc=(epicsEnum16 *)(paddr->pfield);
2133c2133
< 	if(++offset==no_elements) psrc=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) psrc=(epicsEnum16 *)paddr->pfield;
2147c2147
<     unsigned short	choice_ind= *((unsigned short*)paddr->pfield);
---
>     epicsEnum16	choice_ind= *((epicsEnum16*)paddr->pfield);
2173c2173
<     unsigned short	choice_ind= *((unsigned short*)paddr->pfield);
---
>     epicsEnum16	choice_ind= *((epicsEnum16*)paddr->pfield);
2476c2476
<     unsigned short      *pfield= (unsigned short*)(paddr->pfield);
---
>     epicsEnum16      *pfield= (epicsEnum16*)(paddr->pfield);
2519c2519
<     unsigned short      *pfield= (unsigned short*)(paddr->pfield);
---
>     epicsEnum16      *pfield= (epicsEnum16*)(paddr->pfield);
2556c2556
<     unsigned short      *pfield= (unsigned short*)(paddr->pfield);
---
>     epicsEnum16      *pfield= (epicsEnum16*)(paddr->pfield);
2766c2766
<     unsigned short  *pdest=(unsigned short *)(paddr->pfield);
---
>     epicsEnum16  *pdest=(epicsEnum16 *)(paddr->pfield);
2775c2775
< 	if(++offset==no_elements) pdest=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsEnum16 *)paddr->pfield;
2962c2962
<     unsigned short  *pdest=(unsigned short *)(paddr->pfield);
---
>     epicsEnum16  *pdest=(epicsEnum16 *)(paddr->pfield);
2971c2971
< 	if(++offset==no_elements) pdest=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsEnum16 *)paddr->pfield;
3158c3158
<     unsigned short  *pdest=(unsigned short *)(paddr->pfield);
---
>     epicsEnum16  *pdest=(epicsEnum16 *)(paddr->pfield);
3167c3167
< 	if(++offset==no_elements) pdest=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsEnum16 *)paddr->pfield;
3278c3278
<     long  *pdest=(long *)(paddr->pfield);
---
>     epicsInt32  *pdest=(epicsInt32 *)(paddr->pfield);
3287c3287
< 	if(++offset==no_elements) pdest=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsInt32 *)paddr->pfield;
3297c3297
<     unsigned long  *pdest=(unsigned long *)(paddr->pfield);
---
>     epicsUInt32  *pdest=(epicsUInt32 *)(paddr->pfield);
3306c3306
< 	if(++offset==no_elements) pdest=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsUInt32 *)paddr->pfield;
3354c3354
<     unsigned short  *pdest=(unsigned short *)(paddr->pfield);
---
>     epicsEnum16  *pdest=(epicsEnum16 *)(paddr->pfield);
3363c3363
< 	if(++offset==no_elements) pdest=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsEnum16 *)paddr->pfield;
3372c3372
<     long *pbuffer = (long *)pfrom;
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pfrom;
3397c3397
<     long *pbuffer = (long *)pfrom;
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pfrom;
3416c3416
<     long *pbuffer = (long *)pfrom;
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pfrom;
3435c3435
<     long *pbuffer = (long *)pfrom;
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pfrom;
3454c3454
<     long *pbuffer = (long *)pfrom;
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pfrom;
3473,3474c3473,3474
<     long *pbuffer = (long *)pfrom;
<     long  *pdest=(long *)(paddr->pfield);
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pfrom;
>     epicsInt32  *pdest=(epicsInt32 *)(paddr->pfield);
3483c3483
< 	if(++offset==no_elements) pdest=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsInt32 *)paddr->pfield;
3492,3493c3492,3493
<     long *pbuffer = (long *)pfrom;
<     unsigned long  *pdest=(unsigned long *)(paddr->pfield);
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pfrom;
>     epicsUInt32  *pdest=(epicsUInt32 *)(paddr->pfield);
3502c3502
< 	if(++offset==no_elements) pdest=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsUInt32 *)paddr->pfield;
3511c3511
<     long *pbuffer = (long *)pfrom;
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pfrom;
3530c3530
<     long *pbuffer = (long *)pfrom;
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pfrom;
3549,3550c3549,3550
<     long *pbuffer = (long *)pfrom;
<     unsigned short  *pdest=(unsigned short *)(paddr->pfield);
---
>     epicsInt32 *pbuffer = (epicsInt32 *)pfrom;
>     epicsEnum16  *pdest=(epicsEnum16 *)(paddr->pfield);
3559c3559
< 	if(++offset==no_elements) pdest=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsEnum16 *)paddr->pfield;
3568c3568
<     unsigned long *pbuffer = (unsigned long *)pfrom;
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pfrom;
3593c3593
<     unsigned long *pbuffer = (unsigned long *)pfrom;
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pfrom;
3612c3612
<     unsigned long *pbuffer = (unsigned long *)pfrom;
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pfrom;
3631c3631
<     unsigned long *pbuffer = (unsigned long *)pfrom;
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pfrom;
3650c3650
<     unsigned long *pbuffer = (unsigned long *)pfrom;
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pfrom;
3669,3670c3669,3670
<     unsigned long *pbuffer = (unsigned long *)pfrom;
<     long  *pdest=(long *)(paddr->pfield);
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pfrom;
>     epicsInt32  *pdest=(epicsInt32 *)(paddr->pfield);
3679c3679
< 	if(++offset==no_elements) pdest=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsInt32 *)paddr->pfield;
3688,3689c3688,3689
<     unsigned long *pbuffer = (unsigned long *)pfrom;
<     unsigned long  *pdest=(unsigned long *)(paddr->pfield);
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pfrom;
>     epicsUInt32  *pdest=(epicsUInt32 *)(paddr->pfield);
3698c3698
< 	if(++offset==no_elements) pdest=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsUInt32 *)paddr->pfield;
3707c3707
<     unsigned long *pbuffer = (unsigned long *)pfrom;
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pfrom;
3726c3726
<     unsigned long *pbuffer = (unsigned long *)pfrom;
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pfrom;
3745,3746c3745,3746
<     unsigned long *pbuffer = (unsigned long *)pfrom;
<     unsigned short  *pdest=(unsigned short *)(paddr->pfield);
---
>     epicsUInt32 *pbuffer = (epicsUInt32 *)pfrom;
>     epicsEnum16  *pdest=(epicsEnum16 *)(paddr->pfield);
3755c3755
< 	if(++offset==no_elements) pdest=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsEnum16 *)paddr->pfield;
3871c3871
<     long  *pdest=(long *)(paddr->pfield);
---
>     epicsInt32  *pdest=(epicsInt32 *)(paddr->pfield);
3880c3880
< 	if(++offset==no_elements) pdest=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsInt32 *)paddr->pfield;
3890c3890
<     unsigned long  *pdest=(unsigned long *)(paddr->pfield);
---
>     epicsUInt32  *pdest=(epicsUInt32 *)(paddr->pfield);
3899c3899
< 	if(++offset==no_elements) pdest=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsUInt32 *)paddr->pfield;
3947c3947
<     unsigned short  *pdest=(unsigned short *)(paddr->pfield);
---
>     epicsEnum16  *pdest=(epicsEnum16 *)(paddr->pfield);
3956c3956
< 	if(++offset==no_elements) pdest=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsEnum16 *)paddr->pfield;
4072c4072
<     long  *pdest=(long *)(paddr->pfield);
---
>     epicsInt32  *pdest=(epicsInt32 *)(paddr->pfield);
4081c4081
< 	if(++offset==no_elements) pdest=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsInt32 *)paddr->pfield;
4091c4091
<     unsigned long  *pdest=(unsigned long *)(paddr->pfield);
---
>     epicsUInt32  *pdest=(epicsUInt32 *)(paddr->pfield);
4100c4100
< 	if(++offset==no_elements) pdest=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsUInt32 *)paddr->pfield;
4149c4149
<     unsigned short  *pdest=(unsigned short *)(paddr->pfield);
---
>     epicsEnum16  *pdest=(epicsEnum16 *)(paddr->pfield);
4158c4158
< 	if(++offset==no_elements) pdest=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsEnum16 *)paddr->pfield;
4167c4167
<     unsigned short *pbuffer = (unsigned short *)pfrom;
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pfrom;
4192c4192
<     unsigned short *pbuffer = (unsigned short *)pfrom;
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pfrom;
4211c4211
<     unsigned short *pbuffer = (unsigned short *)pfrom;
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pfrom;
4230c4230
<     unsigned short *pbuffer = (unsigned short *)pfrom;
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pfrom;
4249c4249
<     unsigned short *pbuffer = (unsigned short *)pfrom;
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pfrom;
4268,4269c4268,4269
<     unsigned short *pbuffer = (unsigned short *)pfrom;
<     long  *pdest=(long *)(paddr->pfield);
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pfrom;
>     epicsInt32  *pdest=(epicsInt32 *)(paddr->pfield);
4278c4278
< 	if(++offset==no_elements) pdest=(long *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsInt32 *)paddr->pfield;
4287,4288c4287,4288
<     unsigned short *pbuffer = (unsigned short *)pfrom;
<     unsigned long  *pdest=(unsigned long *)(paddr->pfield);
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pfrom;
>     epicsUInt32  *pdest=(epicsUInt32 *)(paddr->pfield);
4297c4297
< 	if(++offset==no_elements) pdest=(unsigned long *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsUInt32 *)paddr->pfield;
4306c4306
<     unsigned short *pbuffer = (unsigned short *)pfrom;
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pfrom;
4325c4325
<     unsigned short *pbuffer = (unsigned short *)pfrom;
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pfrom;
4344,4345c4344,4345
<     unsigned short *pbuffer = (unsigned short *)pfrom;
<     unsigned short  *pdest=(unsigned short *)(paddr->pfield);
---
>     epicsEnum16 *pbuffer = (epicsEnum16 *)pfrom;
>     epicsEnum16  *pdest=(epicsEnum16 *)(paddr->pfield);
4354c4354
< 	if(++offset==no_elements) pdest=(unsigned short *)paddr->pfield;
---
> 	if(++offset==no_elements) pdest=(epicsEnum16 *)paddr->pfield;
Index: db/dbFastLinkConv.c
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/db/dbFastLinkConv.c,v
retrieving revision 1.22
diff -r1.22 dbFastLinkConv.c
171c171
<      long *to,
---
>      epicsInt32 *to,
174c174
<    long value;
---
>    epicsInt32 value;
176c176
<    if (sscanf(from, "%ld", &value) == 1) {
---
>    if (sscanf(from, "%d", &value) == 1) {
191c191
<      unsigned long *to,
---
>      epicsUInt32 *to,
199c199
<       *to = (unsigned long)value;
---
>       *to = (epicsUInt32)value;
253c253
<      unsigned short *to,
---
>      epicsEnum16 *to,
258c258
<    unsigned short	*pfield= (unsigned short*)(paddr->pfield);
---
>    epicsEnum16	*pfield= (epicsEnum16*)(paddr->pfield);
295c295
<      unsigned short *to,
---
>      epicsEnum16 *to,
327c327
<      unsigned short *to,
---
>      epicsEnum16 *to,
394c394
<      long *to,
---
>      epicsInt32 *to,
401c401
<      unsigned long *to,
---
>      epicsUInt32 *to,
422c422
<      unsigned short *to,
---
>      epicsEnum16 *to,
464c464
<      long *to,
---
>      epicsInt32 *to,
471c471
<      unsigned long *to,
---
>      epicsUInt32 *to,
492c492
<      unsigned short *to,
---
>      epicsEnum16 *to,
534c534
<      long *to,
---
>      epicsInt32 *to,
541c541
<      unsigned long *to,
---
>      epicsUInt32 *to,
562c562
<      unsigned short *to,
---
>      epicsEnum16 *to,
604c604
<      long *to,
---
>      epicsInt32 *to,
611c611
<      unsigned long *to,
---
>      epicsUInt32 *to,
638c638
<      long *from,
---
>      epicsInt32 *from,
645c645
<      long *from,
---
>      epicsInt32 *from,
652c652
<      long *from,
---
>      epicsInt32 *from,
659c659
<      long *from,
---
>      epicsInt32 *from,
666c666
<      long *from,
---
>      epicsInt32 *from,
673,674c673,674
<      long *from,
<      long *to,
---
>      epicsInt32 *from,
>      epicsInt32 *to,
680,681c680,681
<      long *from,
<      unsigned long *to,
---
>      epicsInt32 *from,
>      epicsUInt32 *to,
687c687
<      long *from,
---
>      epicsInt32 *from,
694c694
<      long *from,
---
>      epicsInt32 *from,
701,702c701,702
<      long *from,
<      unsigned short *to,
---
>      epicsInt32 *from,
>      epicsEnum16 *to,
708c708
<      unsigned long *from,
---
>      epicsUInt32 *from,
715c715
<      unsigned long *from,
---
>      epicsUInt32 *from,
722c722
<      unsigned long *from,
---
>      epicsUInt32 *from,
729c729
<      unsigned long *from,
---
>      epicsUInt32 *from,
736c736
<      unsigned long *from,
---
>      epicsUInt32 *from,
743,744c743,744
<      unsigned long *from,
<      long *to,
---
>      epicsUInt32 *from,
>      epicsInt32 *to,
750,751c750,751
<      unsigned long *from,
<      unsigned long *to,
---
>      epicsUInt32 *from,
>      epicsUInt32 *to,
757c757
<      unsigned long *from,
---
>      epicsUInt32 *from,
764c764
<      unsigned long *from,
---
>      epicsUInt32 *from,
771,772c771,772
<      unsigned long *from,
<      unsigned short *to,
---
>      epicsUInt32 *from,
>      epicsEnum16 *to,
825c825
<      long *to,
---
>      epicsInt32 *to,
832c832
<      unsigned long *to,
---
>      epicsUInt32 *to,
853c853
<      unsigned short *to,
---
>      epicsEnum16 *to,
906c906
<      long *to,
---
>      epicsInt32 *to,
913c913
<      unsigned long *to,
---
>      epicsUInt32 *to,
946c946
<      unsigned short *to,
---
>      epicsEnum16 *to,
952c952
<      unsigned short *from,
---
>      epicsEnum16 *from,
959c959
<      unsigned short *from,
---
>      epicsEnum16 *from,
966c966
<      unsigned short *from,
---
>      epicsEnum16 *from,
973c973
<      unsigned short *from,
---
>      epicsEnum16 *from,
980,981c980,981
<      unsigned short *from,
<      long *to,
---
>      epicsEnum16 *from,
>      epicsInt32 *to,
987,988c987,988
<      unsigned short *from,
<      unsigned long *to,
---
>      epicsEnum16 *from,
>      epicsUInt32 *to,
994c994
<      unsigned short *from,
---
>      epicsEnum16 *from,
1001c1001
<      unsigned short *from,
---
>      epicsEnum16 *from,
1008,1009c1008,1009
<      unsigned short *from,
<      unsigned short *to,
---
>      epicsEnum16 *from,
>      epicsEnum16 *to,
1017c1017
<      unsigned short *from,
---
>      epicsEnum16 *from,
1037c1037
<      unsigned short *from,
---
>      epicsEnum16 *from,
1044c1044
<      unsigned short *from,
---
>      epicsEnum16 *from,
1069c1069
<      unsigned short *from,
---
>      epicsEnum16 *from,
Index: db/dbTest.c
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/db/dbTest.c,v
retrieving revision 1.83
diff -r1.83 dbTest.c
802c802
< 	    printf("precision=%ld\n", pdbr_precision->precision);
---
> 	    printf("precision=%d\n", pdbr_precision->precision);
823c823
< 	    printf("no_strs=%lu\n", pdbr_enumStrs->no_str);
---
> 	    printf("no_strs=%u\n", pdbr_enumStrs->no_str);
834c834
< 	    printf("grLong: %ld %ld\n",pdbr_grLong->upper_disp_limit,
---
> 	    printf("grLong: %d %d\n",pdbr_grLong->upper_disp_limit,
856c856
< 	    printf("ctrlLong: %ld %ld\n",pdbr_ctrlLong->upper_ctrl_limit,
---
> 	    printf("ctrlLong: %d %d\n",pdbr_ctrlLong->upper_ctrl_limit,
878c878
< 	    printf("alLong: %ld %ld %ld %ld\n",
---
> 	    printf("alLong: %d %d %d %d\n",
Index: db/db_access.c
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/db/db_access.c,v
retrieving revision 1.46
diff -r1.46 db_access.c
41a42,44
> #define db_accessHFORdb_accessC
> #include "db_access.h"
> #undef db_accessHFORdb_accessC
108c111
< /*Following is defined in db_access.h*/
---
> /*Following is defined in dbConvert.h*/
118,465d120
< #ifndef MAX_UNITS_SIZE
< #define MAX_UNITS_SIZE 8
< #endif
< 
< /* VALUES WITH STATUS STRUCTURES */
< 
< /* structure for a  string status field */
< struct dbr_sts_string{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	char	value[MAX_STRING_SIZE];	/* current value */
< };
< 
< /* structure for a  string status field */
< struct dbr_stsack_string{
< 	unsigned short	status;	 	/* status of value */
< 	unsigned short	severity;	/* severity of alarm */
< 	unsigned short	ackt;		/* ack transient? */
< 	unsigned short	acks;		/* ack severity */
< 	char	value[MAX_STRING_SIZE];	/* current value */
< };
< 
< /* structure for an short status field */
< struct dbr_sts_int{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	short	value;			/* current value */
< };
< struct dbr_sts_short{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	short	value;			/* current value */
< };
< 
< /* structure for a  float status field */
< struct dbr_sts_float{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	float	value;			/* current value */
< };
< 
< /* structure for a  enum status field */
< struct dbr_sts_enum{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	short	value;			/* current value */
< };
< 
< /* structure for a char status field */
< struct dbr_sts_char{
< 	short		status;	 	/* status of value */
< 	short		severity;	/* severity of alarm */
< 	char		RISC_pad;	/* RISC alignment */
< 	unsigned char	value;		/* current value */
< };
< 
< /* structure for a long status field */
< struct dbr_sts_long{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	long	value;			/* current value */
< };
< 
< /* structure for a double status field */
< struct dbr_sts_double{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	long	RISC_pad;		/* RISC alignment */
< 	double	value;			/* current value */
< };
< 
< /* VALUES WITH STATUS AND TIME STRUCTURES */
< 
< /* structure for a  string time field */
< struct dbr_time_string{
< 	short		status;	 		/* status of value */
< 	short		severity;		/* severity of alarm */
< 	epicsTimeStamp	stamp;			/* time stamp */
< 	char		value[MAX_STRING_SIZE];	/* current value */
< };
< 
< /* structure for an short time field */
< struct dbr_time_short{
< 	short		status;	 		/* status of value */
< 	short		severity;		/* severity of alarm */
< 	epicsTimeStamp	stamp;			/* time stamp */
< 	short		RISC_pad;		/* RISC alignment */
< 	short		value;			/* current value */
< };
< 
< /* structure for a  float time field */
< struct dbr_time_float{
< 	short		status;	 		/* status of value */
< 	short		severity;		/* severity of alarm */
< 	epicsTimeStamp	stamp;			/* time stamp */
< 	float		value;			/* current value */
< };
< 
< /* structure for a  enum time field */
< struct dbr_time_enum{
< 	short		status;	 		/* status of value */
< 	short		severity;		/* severity of alarm */
< 	epicsTimeStamp	stamp;			/* time stamp */
< 	short		RISC_pad;		/* RISC alignment */
< 	short		value;			/* current value */
< };
< 
< /* structure for a char time field */
< struct dbr_time_char{
< 	short			status;	 		/* status of value */
< 	short			severity;		/* severity of alarm */
< 	epicsTimeStamp		stamp;			/* time stamp */
< 	short			RISC_pad0;		/* RISC alignment */
< 	char			RISC_pad1;		/* RISC alignment */
< 	unsigned char		value;			/* current value */
< };
< 
< /* structure for a long time field */
< struct dbr_time_long{
< 	short		status;	 		/* status of value */
< 	short		severity;		/* severity of alarm */
< 	epicsTimeStamp	stamp;			/* time stamp */
< 	long		value;			/* current value */
< };
< 
< /* structure for a double time field */
< struct dbr_time_double{
< 	short		status;	 		/* status of value */
< 	short		severity;		/* severity of alarm */
< 	epicsTimeStamp	stamp;			/* time stamp */
< 	long		RISC_pad;		/* RISC alignment */
< 	double		value;			/* current value */
< };
< 
< /* VALUES WITH STATUS AND GRAPHIC STRUCTURES */
< 
< /* structure for a graphic string */
< 	/* not implemented; use struct_dbr_sts_string */
< 
< /* structure for a graphic short field */
< struct dbr_gr_int{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	char	units[MAX_UNITS_SIZE];		/* units of value */
< 	short	upper_disp_limit;	/* upper limit of graph */
< 	short	lower_disp_limit;	/* lower limit of graph */
< 	short	upper_alarm_limit;	
< 	short	upper_warning_limit;
< 	short	lower_warning_limit;
< 	short	lower_alarm_limit;
< 	short	value;			/* current value */
< };
< struct dbr_gr_short{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	char	units[MAX_UNITS_SIZE];		/* units of value */
< 	short	upper_disp_limit;	/* upper limit of graph */
< 	short	lower_disp_limit;	/* lower limit of graph */
< 	short	upper_alarm_limit;	
< 	short	upper_warning_limit;
< 	short	lower_warning_limit;
< 	short	lower_alarm_limit;
< 	short	value;			/* current value */
< };
< 
< /* structure for a graphic floating point field */
< struct dbr_gr_float{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	short	precision;		/* number of decimal places */
< 	short	RISC_pad0;		/* RISC alignment */
< 	char	units[MAX_UNITS_SIZE];		/* units of value */
< 	float	upper_disp_limit;	/* upper limit of graph */
< 	float	lower_disp_limit;	/* lower limit of graph */
< 	float	upper_alarm_limit;	
< 	float	upper_warning_limit;
< 	float	lower_warning_limit;
< 	float	lower_alarm_limit;
< 	float	value;			/* current value */
< };
< 
< /* structure for a graphic enumeration field */
< struct dbr_gr_enum{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	short	no_str;			/* number of strings */
< 	char	strs[16][26];		/* state strings */
< 	short	value;			/* current value */
< };
< 
< /* structure for a graphic char field */
< struct dbr_gr_char{
< 	short			status;	 		/* status of value */
< 	short			severity;		/* severity of alarm */
< 	char			units[MAX_UNITS_SIZE];		/* units of value */
< 	unsigned char		upper_disp_limit;	/* upper limit of graph */
< 	unsigned char		lower_disp_limit;	/* lower limit of graph */
< 	unsigned char		upper_alarm_limit;	
< 	unsigned char		upper_warning_limit;
< 	unsigned char		lower_warning_limit;
< 	unsigned char		lower_alarm_limit;
< 	char			RISC_pad;		/* RISC alignment */
< 	unsigned char		value;			/* current value */
< };
< 
< /* structure for a graphic long field */
< struct dbr_gr_long{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	char	units[MAX_UNITS_SIZE];		/* units of value */
< 	long	upper_disp_limit;	/* upper limit of graph */
< 	long	lower_disp_limit;	/* lower limit of graph */
< 	long	upper_alarm_limit;	
< 	long	upper_warning_limit;
< 	long	lower_warning_limit;
< 	long	lower_alarm_limit;
< 	long	value;			/* current value */
< };
< 
< /* structure for a graphic double field */
< struct dbr_gr_double{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	short	precision;		/* number of decimal places */
< 	short	RISC_pad0;		/* RISC alignment */
< 	char	units[MAX_UNITS_SIZE];		/* units of value */
< 	double	upper_disp_limit;	/* upper limit of graph */
< 	double	lower_disp_limit;	/* lower limit of graph */
< 	double	upper_alarm_limit;	
< 	double	upper_warning_limit;
< 	double	lower_warning_limit;
< 	double	lower_alarm_limit;
< 	double	value;			/* current value */
< };
< 
< /* VALUES WITH STATUS, GRAPHIC and CONTROL STRUCTURES */
< 
< /* structure for a control string */
< 	/* not implemented; use struct_dbr_sts_string */
< 
< /* structure for a control integer */
< struct dbr_ctrl_int{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	char	units[MAX_UNITS_SIZE];		/* units of value */
< 	short	upper_disp_limit;	/* upper limit of graph */
< 	short	lower_disp_limit;	/* lower limit of graph */
< 	short	upper_alarm_limit;	
< 	short	upper_warning_limit;
< 	short	lower_warning_limit;
< 	short	lower_alarm_limit;
< 	short	upper_ctrl_limit;	/* upper control limit */
< 	short	lower_ctrl_limit;	/* lower control limit */
< 	short	value;			/* current value */
< };
< struct dbr_ctrl_short{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	char	units[MAX_UNITS_SIZE];		/* units of value */
< 	short	upper_disp_limit;	/* upper limit of graph */
< 	short	lower_disp_limit;	/* lower limit of graph */
< 	short	upper_alarm_limit;	
< 	short	upper_warning_limit;
< 	short	lower_warning_limit;
< 	short	lower_alarm_limit;
< 	short	upper_ctrl_limit;	/* upper control limit */
< 	short	lower_ctrl_limit;	/* lower control limit */
< 	short	value;			/* current value */
< };
< 
< /* structure for a control floating point field */
< struct dbr_ctrl_float{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	short	precision;		/* number of decimal places */
< 	short	RISC_pad;		/* RISC alignment */
< 	char	units[MAX_UNITS_SIZE];		/* units of value */
< 	float	upper_disp_limit;	/* upper limit of graph */
< 	float	lower_disp_limit;	/* lower limit of graph */
< 	float	upper_alarm_limit;	
< 	float	upper_warning_limit;
< 	float	lower_warning_limit;
< 	float	lower_alarm_limit;
<  	float	upper_ctrl_limit;	/* upper control limit */
< 	float	lower_ctrl_limit;	/* lower control limit */
< 	float	value;			/* current value */
< };
< 
< /* structure for a control enumeration field */
< struct dbr_ctrl_enum{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	short	no_str;			/* number of strings */
< 	char	strs[16][26];		/* state strings */
< 	short	value;			/* current value */
< };
< 
< /* structure for a control char field */
< struct dbr_ctrl_char{
< 	short		status;	 		/* status of value */
< 	short		severity;		/* severity of alarm */
< 	char		units[MAX_UNITS_SIZE];		/* units of value */
< 	unsigned char	upper_disp_limit;	/* upper limit of graph */
< 	unsigned char	lower_disp_limit;	/* lower limit of graph */
< 	unsigned char	upper_alarm_limit;	
< 	unsigned char	upper_warning_limit;
< 	unsigned char	lower_warning_limit;
< 	unsigned char	lower_alarm_limit;
< 	unsigned char	upper_ctrl_limit;	/* upper control limit */
< 	unsigned char	lower_ctrl_limit;	/* lower control limit */
< 	char		RISC_pad;		/* RISC alignment */
< 	unsigned char	value;			/* current value */
< };
< 
< /* structure for a control long field */
< struct dbr_ctrl_long{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	char	units[MAX_UNITS_SIZE];		/* units of value */
< 	long	upper_disp_limit;	/* upper limit of graph */
< 	long	lower_disp_limit;	/* lower limit of graph */
< 	long	upper_alarm_limit;	
< 	long	upper_warning_limit;
< 	long	lower_warning_limit;
< 	long	lower_alarm_limit;
< 	long	upper_ctrl_limit;	/* upper control limit */
< 	long	lower_ctrl_limit;	/* lower control limit */
< 	long	value;			/* current value */
< };
< 
< /* structure for a control double field */
< struct dbr_ctrl_double{
< 	short	status;	 		/* status of value */
< 	short	severity;		/* severity of alarm */
< 	short	precision;		/* number of decimal places */
< 	short	RISC_pad0;		/* RISC alignment */
< 	char	units[MAX_UNITS_SIZE];		/* units of value */
< 	double	upper_disp_limit;	/* upper limit of graph */
< 	double	lower_disp_limit;	/* lower limit of graph */
< 	double	upper_alarm_limit;	
< 	double	upper_warning_limit;
< 	double	lower_warning_limit;
< 	double	lower_alarm_limit;
< 	double	upper_ctrl_limit;	/* upper control limit */
< 	double	lower_ctrl_limit;	/* lower control limit */
< 	double	value;			/* current value */
< };
< 
619c274
< 		short *pvalue = (short *)pbuffer;
---
> 		dbr_short_t *pvalue = (dbr_short_t *)pbuffer;
630c285
< 		float *pvalue = (float *)pbuffer;
---
> 		dbr_float_t *pvalue = (dbr_float_t *)pbuffer;
641c296
< 		short *pvalue = (short *)pbuffer;
---
> 		dbr_enum_t *pvalue = (dbr_enum_t *)pbuffer;
652c307
< 		char *pvalue = (char *)pbuffer;
---
> 		dbr_char_t *pvalue = (dbr_char_t *)pbuffer;
663c318
< 		long *pvalue = (long *)pbuffer;
---
> 		dbr_long_t *pvalue = (dbr_long_t *)pbuffer;
674c329
< 		double *pvalue = (double *)pbuffer;
---
> 		dbr_double_t *pvalue = (dbr_double_t *)pbuffer;
713c368
< 		short *pvalue = &pold->value;
---
> 		dbr_short_t *pvalue = &pold->value;
734c389
< 		float *pvalue = &pold->value;
---
> 		dbr_float_t *pvalue = &pold->value;
755c410
< 		short *pvalue = &pold->value;
---
> 		dbr_enum_t *pvalue = &pold->value;
776c431
< 		unsigned char *pvalue = &pold->value;
---
> 		dbr_char_t *pvalue = &pold->value;
797c452
< 		long *pvalue = &pold->value;
---
> 		dbr_long_t *pvalue = &pold->value;
818c473
< 		double *pvalue = &pold->value;
---
> 		dbr_double_t *pvalue = &pold->value;
864c519
< 		short *pvalue = &pold->value;
---
> 		dbr_short_t *pvalue = &pold->value;
887c542
< 		float *pvalue = &pold->value;
---
> 		dbr_float_t *pvalue = &pold->value;
910c565
< 		short *pvalue = &pold->value;
---
> 		dbr_enum_t *pvalue = &pold->value;
933c588
< 		unsigned char *pvalue = &pold->value;
---
> 		dbr_char_t *pvalue = &pold->value;
956c611
< 		long *pvalue = &pold->value;
---
> 		dbr_long_t *pvalue = &pold->value;
979c634
< 		double *pvalue = &pold->value;
---
> 		dbr_double_t *pvalue = &pold->value;
1006c661
< 		short *pvalue = &pold->value;
---
> 		dbr_short_t *pvalue = &pold->value;
1039c694
< 		float *pvalue = &pold->value;
---
> 		dbr_float_t *pvalue = &pold->value;
1074c729
< 		unsigned char *pvalue = &pold->value;
---
> 		dbr_char_t *pvalue = &pold->value;
1106c761
< 		long *pvalue = &pold->value;
---
> 		dbr_long_t *pvalue = &pold->value;
1139c794
< 		double *pvalue = &pold->value;
---
> 		dbr_double_t *pvalue = &pold->value;
1175c830
< 		short *pvalue = &pold->value;
---
> 		dbr_short_t *pvalue = &pold->value;
1212c867
< 		float *pvalue = &pold->value;
---
> 		dbr_float_t *pvalue = &pold->value;
1248c903
< 		short *pvalue = &pold->value;
---
> 		dbr_enum_t *pvalue = &pold->value;
1281c936
< 		unsigned char *pvalue = &pold->value;
---
> 		dbr_char_t *pvalue = &pold->value;
1317c972
< 		long *pvalue = &pold->value;
---
> 		dbr_long_t *pvalue = &pold->value;
1353c1008
< 		double *pvalue = &pold->value;
---
> 		dbr_double_t *pvalue = &pold->value;
Index: dbStatic/dbToRecordtypeH.c
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/dbStatic/dbToRecordtypeH.c,v
retrieving revision 1.22
diff -r1.22 dbToRecordtypeH.c
123a124
>     fprintf(outFile,"#include \"epicsTypes.h\"\n");
175c176
< 		    fprintf(outFile,"\tlong\t\t%s;\t/*%s*/\n",
---
> 		    fprintf(outFile,"\ttepicsInt32\t\t%s;\t/*%s*/\n",
193c194
< 		    fprintf(outFile,"\tunsigned short\t%s;\t/*%s*/\n",
---
> 		    fprintf(outFile,"\tepicsEnum16\t%s;\t/*%s*/\n",
Index: libCom/cvtFast/cvtFast.c
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/libCom/cvtFast/cvtFast.c,v
retrieving revision 1.32
diff -r1.32 cvtFast.c
38c38
< static long	frac_multiplier[] =
---
> static epicsInt32	frac_multiplier[] =
47c47
< 	long		whole,iplace,number,fraction,fplace;
---
> 	epicsInt32		whole,iplace,number,fraction,fplace;
65c65
< 	whole = (long)flt_value;
---
> 	whole = (epicsInt32)flt_value;
70c70
< 	fraction = (long)(ftemp * fplace * 10);	
---
> 	fraction = (epicsInt32)(ftemp * fplace * 10);	
121c121
< 	long		whole,iplace,number,fraction,fplace;
---
> 	epicsInt32		whole,iplace,number,fraction,fplace;
146c146
< 	whole = (long)flt_value;
---
> 	whole = (epicsInt32)flt_value;
151c151
< 	fraction = (long)(ftemp * fplace * 10);	
---
> 	fraction = (epicsInt32)(ftemp * fplace * 10);	
404c404
<     long source,
---
>     epicsInt32 source,
407c407
<     long  val,temp;
---
>     epicsInt32  val,temp;
418,419c418,419
< 	if(source == LONG_MIN) {
< 	    sprintf(pdest,"%ld",source);
---
> 	if(source == INT_MIN) {
> 	    sprintf(pdest,"%d",source);
440c440
<     unsigned long source,
---
>     epicsUInt32 source,
443c443
<     unsigned long val,temp;
---
>     epicsUInt32 val,temp;
474c474
<     long source,
---
>     epicsInt32 source,
477c477
<     long  val,temp;
---
>     epicsInt32  val,temp;
488,489c488,489
< 	if(source == LONG_MIN) {
< 	    sprintf(pdest,"-0x%lx",source);
---
> 	if(source == INT_MIN) {
> 	    sprintf(pdest,"-0x%x",source);
511c511
<     long source,
---
>     epicsInt32 source,
514c514
<     long  val,temp;
---
>     epicsInt32  val,temp;
525,526c525,526
< 	if(source == LONG_MIN) {
< 	    sprintf(pdest,"-0%lo",source);
---
> 	if(source == INT_MIN) {
> 	    sprintf(pdest,"-0%o",source);
554c554
<  * extract a bit field from the source unsigend long
---
>  * extract a bit field from the source epicsUInt32
556,557c556,557
< unsigned long epicsShareAPI cvtBitsToUlong(
< unsigned long   src,
---
> epicsUInt32 epicsShareAPI cvtBitsToUlong(
> epicsUInt32   src,
561c561
<         unsigned long   mask;
---
>         epicsUInt32   mask;
578,579c578,579
<  * insert a bit field from the source unsigend long
<  * into the destination unsigned long
---
>  * insert a bit field from the source epicsUInt32
>  * into the destination epicsUInt32
581,583c581,583
< unsigned long epicsShareAPI cvtUlongToBits(
< unsigned long   src,
< unsigned long   dest,
---
> epicsUInt32 epicsShareAPI cvtUlongToBits(
> epicsUInt32   src,
> epicsUInt32   dest,
587c587
<         unsigned long   mask;
---
>         epicsUInt32   mask;
Index: libCom/cvtFast/cvtFast.h
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/libCom/cvtFast/cvtFast.h,v
retrieving revision 1.6
diff -r1.6 cvtFast.h
28a29
> #include "epicsTypes.h"
60c61
< 	cvtLongToString(long value, char *pstring);
---
> 	cvtLongToString(epicsInt32 value, char *pstring);
62c63
< 	cvtUlongToString(unsigned long value, char *pstring);
---
> 	cvtUlongToString(epicsUInt32 value, char *pstring);
64c65
< 	cvtLongToHexString(long value, char *pstring);
---
> 	cvtLongToHexString(epicsInt32 value, char *pstring);
66,68c67,69
< 	cvtLongToOctalString(long value, char *pstring);
< epicsShareFunc unsigned long epicsShareAPI cvtBitsToUlong(
< 	unsigned long  src,
---
> 	cvtLongToOctalString(epicsInt32 value, char *pstring);
> epicsShareFunc epicsUInt32 epicsShareAPI cvtBitsToUlong(
> 	epicsUInt32  src,
71,73c72,74
< epicsShareFunc unsigned long epicsShareAPI cvtUlongToBits(
< 	unsigned long src,
< 	unsigned long dest,
---
> epicsShareFunc epicsUInt32 epicsShareAPI cvtUlongToBits(
> 	epicsUInt32 src,
> 	epicsUInt32 dest,

Replies:
RE: RISC_pad in dbr_time_double Jeff Hill

Navigate by Date:
Prev: Re: RISC_pad in dbr_time_double Marty Kraimer
Next: RE: RISC_pad in dbr_time_double Jeff Hill
Index: <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022 
Navigate by Thread:
Prev: RE: RISC_pad in dbr_time_double Jeff Hill
Next: RE: RISC_pad in dbr_time_double Jeff Hill
Index: <20022003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·