Cosmetic changes (misleading var name).

This commit is contained in:
Ralph Lange
2004-05-28 11:00:25 +00:00
parent ae5c8365d2
commit 2cdb8d2cbb
4 changed files with 7 additions and 7 deletions

View File

@@ -64,7 +64,7 @@ void usage (void)
" DBR_STS_SHORT 8 DBR_TIME_ENUM 17 DBR_GR_DOUBLE 27\n"
" DBR_STS_INT 8 DBR_TIME_CHAR 18 DBR_CTRL_STRING 28\n"
"Enum format:\n"
" -n: Print DBF_ENUM values as number (default are enum string values)\n"
" -n: Print DBF_ENUM values as numbers (default are enum strings)\n"
"Arrays: Value format: print number of requested values, then list of values\n"
" Default: Print all values\n"
" -# <count>: Print first <count> elements of an array\n"
@@ -151,7 +151,7 @@ int caget (pv *pvs, int nPvs, RequestT request, OutputT format,
dbrType = dbf_type_to_DBR_TIME(pvs[n].dbfType); /* Use native type */
if (dbr_type_is_ENUM(dbrType)) /* Enums honour -n option */
{
if (charAsNr) dbrType = DBR_TIME_INT;
if (enumAsNr) dbrType = DBR_TIME_INT;
else dbrType = DBR_TIME_STRING;
}
}
@@ -355,7 +355,7 @@ int main (int argc, char *argv[])
}
break;
case 'n': /* Print ENUM as index numbers */
charAsNr=1;
enumAsNr=1;
break;
case 'w': /* Set CA timeout value */
if(sscanf(optarg,"%lf", &caTimeout) != 1)

View File

@@ -126,7 +126,7 @@ int camonitor (pv *pvs, int nPvs, unsigned long reqElems)
dbrType = dbf_type_to_DBR_TIME(pvs[n].dbfType); /* Use native type */
if (dbr_type_is_ENUM(dbrType)) /* Enums honour -n option */
{
if (charAsNr) dbrType = DBR_TIME_INT;
if (enumAsNr) dbrType = DBR_TIME_INT;
else dbrType = DBR_TIME_STRING;
}
/* Adjust array count */
@@ -204,7 +204,7 @@ int main (int argc, char *argv[])
usage();
return 0;
case 'n': /* Print ENUM as index numbers */
charAsNr=1;
enumAsNr=1;
break;
case 'r': /* Select relative timestamps */
tsType = relative;

View File

@@ -40,7 +40,7 @@ IntFormatT outType = dec; /* For -0.. output format option */
char dblFormatStr[30] = "%g"; /* Format string to print doubles (-efg options) */
char timeFormatStr[30] = "%Y-%m-%d %H:%M:%S.%06f"; /* Time format string */
int charAsNr = 0; /* used for -n option - get DBF_CHAR as number */
int enumAsNr = 0; /* used for -n option - get DBF_ENUM as number */
double caTimeout = 1.0; /* wait time default (see -w option) */
#define TIMETEXTLEN 28 /* Length of timestamp text buffer */

View File

@@ -72,7 +72,7 @@ typedef struct
extern TimeT tsType; /* Timestamp type flag (-r -i -I options) */
extern IntFormatT outType; /* Flag used for -0.. output format option */
extern int charAsNr; /* Used for -n option (get DBF_CHAR as number) */
extern int enumAsNr; /* Used for -n option (get DBF_ENUM as number) */
extern double caTimeout; /* Wait time default (see -w option) */
extern char dblFormatStr[]; /* Format string to print doubles (see -e -f option) */