From 2cdb8d2cbb2a9d2e97ad5c7c2ca65a652d35da9e Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Fri, 28 May 2004 11:00:25 +0000 Subject: [PATCH] Cosmetic changes (misleading var name). --- src/catools/caget.c | 6 +++--- src/catools/camonitor.c | 4 ++-- src/catools/tool_lib.c | 2 +- src/catools/tool_lib.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/catools/caget.c b/src/catools/caget.c index fccaac11b..21c23643e 100644 --- a/src/catools/caget.c +++ b/src/catools/caget.c @@ -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" " -# : Print first 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) diff --git a/src/catools/camonitor.c b/src/catools/camonitor.c index 32e3a1f87..f48bdacd7 100644 --- a/src/catools/camonitor.c +++ b/src/catools/camonitor.c @@ -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; diff --git a/src/catools/tool_lib.c b/src/catools/tool_lib.c index d34fa4e0d..234e328fc 100644 --- a/src/catools/tool_lib.c +++ b/src/catools/tool_lib.c @@ -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 */ diff --git a/src/catools/tool_lib.h b/src/catools/tool_lib.h index 5be989b21..0804f0186 100644 --- a/src/catools/tool_lib.h +++ b/src/catools/tool_lib.h @@ -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) */