EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: [Merge] lp:~ralph-lange/epics-base/fix-cpp-keywords into lp:epics-base
From: Ralph Lange <[email protected]>
To: [email protected]
Date: Wed, 16 Jun 2010 20:03:31 -0000
Ralph Lange has proposed merging lp:~ralph-lange/epics-base/fix-cpp-keywords into lp:epics-base.

Requested reviews:
  EPICS Core Developers (epics-core)
Related bugs:
  #595240 C code uses C++ keywords as variable names
  https://bugs.launchpad.net/bugs/595240
  #595242 C code uses C++ "//" style comments
  https://bugs.launchpad.net/bugs/595242


Replaced the C++ reserved word new where it was used as a variable name.
Replaced C++ "//" style comments with standard C comments where they were used in C code.
-- 
https://code.launchpad.net/~ralph-lange/epics-base/fix-cpp-keywords/+merge/27760
Your team EPICS Core Developers is requested to review the proposed merge of lp:~ralph-lange/epics-base/fix-cpp-keywords into lp:epics-base.
=== modified file 'src/db/db_access.c'
--- src/db/db_access.c	2009-03-10 18:51:03 +0000
+++ src/db/db_access.c	2010-06-16 20:03:31 +0000
@@ -246,15 +246,15 @@
             struct dbr_sts_string *pold = (struct dbr_sts_string *)pbuffer;
             struct {
                 DBRstatus
-            } new;
+            } newSt;
             DBSTRING *pvalue = (DBSTRING *)pold->value;
 
             options = DBR_STATUS;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_STRING, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_STRING, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_STRING, pold->value, &options,
@@ -268,15 +268,15 @@
             struct dbr_sts_int *pold = (struct dbr_sts_int *)pbuffer;
             struct {
                 DBRstatus
-            } new;
+            } newSt;
             dbr_short_t *pvalue = &pold->value;
 
             options = DBR_STATUS;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_SHORT, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_SHORT, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_SHORT, &pold->value, &options,
@@ -289,15 +289,15 @@
             struct dbr_sts_float *pold = (struct dbr_sts_float *)pbuffer;
             struct {
                 DBRstatus
-            } new;
+            } newSt;
             dbr_float_t *pvalue = &pold->value;
 
             options = DBR_STATUS;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_FLOAT, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_FLOAT, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_FLOAT, &pold->value, &options,
@@ -310,15 +310,15 @@
             struct dbr_sts_enum *pold = (struct dbr_sts_enum *)pbuffer;
             struct {
                 DBRstatus
-            } new;
+            } newSt;
             dbr_enum_t *pvalue = &pold->value;
 
             options = DBR_STATUS;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_ENUM, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_ENUM, &newSt, &options, &nRequest,
                     pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_ENUM, &pold->value, &options,
@@ -331,15 +331,15 @@
             struct dbr_sts_char *pold = (struct dbr_sts_char *)pbuffer;
             struct {
                 DBRstatus
-            } new;
+            } newSt;
             dbr_char_t *pvalue = &pold->value;
 
             options = DBR_STATUS;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_UCHAR, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_UCHAR, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_UCHAR, &pold->value, &options,
@@ -352,15 +352,15 @@
             struct dbr_sts_long *pold = (struct dbr_sts_long *)pbuffer;
             struct {
                 DBRstatus
-            } new;
+            } newSt;
             dbr_long_t *pvalue = &pold->value;
 
             options = DBR_STATUS;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_LONG, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_LONG, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_LONG, &pold->value, &options,
@@ -373,15 +373,15 @@
             struct dbr_sts_double *pold = (struct dbr_sts_double *)pbuffer;
             struct {
                 DBRstatus
-            } new;
+            } newSt;
             dbr_double_t *pvalue = &pold->value;
 
             options = DBR_STATUS;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_DOUBLE, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_DOUBLE, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_DOUBLE, &pold->value, &options,
@@ -396,16 +396,16 @@
             struct {
                 DBRstatus
                 DBRtime
-            } new;
+            } newSt;
             DBSTRING *pvalue = (DBSTRING *)(pold->value);
 
             options = DBR_STATUS | DBR_TIME;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_STRING, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_STRING, &newSt, &options, &nRequest,
                     pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            pold->stamp = new.time;         /* structure copy */
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            pold->stamp = newSt.time;         /* structure copy */
             options = 0;
             nRequest = no_elements;
                 status = dbGetField(paddr, DBR_STRING, pold->value, &options,
@@ -420,16 +420,16 @@
             struct {
                 DBRstatus
                 DBRtime
-            } new;
+            } newSt;
             dbr_short_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_TIME;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_SHORT, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_SHORT, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            pold->stamp = new.time;         /* structure copy */
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            pold->stamp = newSt.time;         /* structure copy */
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_SHORT, &pold->value, &options,
@@ -443,16 +443,16 @@
             struct {
                 DBRstatus
                 DBRtime
-            } new;
+            } newSt;
             dbr_float_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_TIME;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_FLOAT, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_FLOAT, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            pold->stamp = new.time;         /* structure copy */
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            pold->stamp = newSt.time;         /* structure copy */
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_FLOAT, &pold->value, &options,
@@ -466,16 +466,16 @@
             struct {
                 DBRstatus
                 DBRtime
-            } new;
+            } newSt;
             dbr_enum_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_TIME;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_ENUM, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_ENUM, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            pold->stamp = new.time;         /* structure copy */
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            pold->stamp = newSt.time;         /* structure copy */
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_ENUM, &pold->value, &options,
@@ -489,16 +489,16 @@
             struct {
                 DBRstatus
                 DBRtime
-            } new;
+            } newSt;
             dbr_char_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_TIME;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_CHAR, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_CHAR, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            pold->stamp = new.time;         /* structure copy */
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            pold->stamp = newSt.time;         /* structure copy */
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_CHAR, &pold->value, &options,
@@ -512,16 +512,16 @@
             struct {
                 DBRstatus
                 DBRtime
-            } new;
+            } newSt;
             dbr_long_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_TIME;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_LONG, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_LONG, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            pold->stamp = new.time;         /* structure copy */
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            pold->stamp = newSt.time;         /* structure copy */
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_LONG, &pold->value, &options,
@@ -535,16 +535,16 @@
             struct {
                 DBRstatus
                 DBRtime
-            } new;
+            } newSt;
             dbr_double_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_TIME;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_DOUBLE, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_DOUBLE, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            pold->stamp = new.time;         /* structure copy */
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            pold->stamp = newSt.time;         /* structure copy */
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_DOUBLE, &pold->value, &options,
@@ -563,23 +563,23 @@
                 DBRunits
                 DBRgrLong
                 DBRalLong
-            } new;
+            } newSt;
             dbr_short_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_UNITS | DBR_GR_LONG | DBR_AL_LONG;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_SHORT, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_SHORT, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            strncpy(pold->units, new.units, MAX_UNITS_SIZE);
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            strncpy(pold->units, newSt.units, MAX_UNITS_SIZE);
             pold->units[MAX_UNITS_SIZE-1] = '\0';
-            pold->upper_disp_limit = new.upper_disp_limit;
-            pold->lower_disp_limit = new.lower_disp_limit;
-            pold->upper_alarm_limit = new.upper_alarm_limit;
-            pold->upper_warning_limit = new.upper_warning_limit;
-            pold->lower_warning_limit = new.lower_warning_limit;
-            pold->lower_alarm_limit = new.lower_alarm_limit;
+            pold->upper_disp_limit = newSt.upper_disp_limit;
+            pold->lower_disp_limit = newSt.lower_disp_limit;
+            pold->upper_alarm_limit = newSt.upper_alarm_limit;
+            pold->upper_warning_limit = newSt.upper_warning_limit;
+            pold->lower_warning_limit = newSt.lower_warning_limit;
+            pold->lower_alarm_limit = newSt.lower_alarm_limit;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_SHORT, &pold->value, &options,
@@ -596,25 +596,25 @@
                 DBRprecision
                 DBRgrDouble
                 DBRalDouble
-            } new;
+            } newSt;
             dbr_float_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_UNITS | DBR_PRECISION | DBR_GR_DOUBLE |
                 DBR_AL_DOUBLE;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_FLOAT, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_FLOAT, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            pold->precision = new.precision.dp;
-            strncpy(pold->units, new.units, MAX_UNITS_SIZE);
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            pold->precision = newSt.precision.dp;
+            strncpy(pold->units, newSt.units, MAX_UNITS_SIZE);
             pold->units[MAX_UNITS_SIZE-1] = '\0';
-            pold->upper_disp_limit = epicsConvertDoubleToFloat(new.upper_disp_limit);
-            pold->lower_disp_limit = epicsConvertDoubleToFloat(new.lower_disp_limit);
-            pold->upper_alarm_limit = epicsConvertDoubleToFloat(new.upper_alarm_limit);
-            pold->lower_alarm_limit = epicsConvertDoubleToFloat(new.lower_alarm_limit);
-            pold->upper_warning_limit = epicsConvertDoubleToFloat(new.upper_warning_limit);
-            pold->lower_warning_limit = epicsConvertDoubleToFloat(new.lower_warning_limit);
+            pold->upper_disp_limit = epicsConvertDoubleToFloat(newSt.upper_disp_limit);
+            pold->lower_disp_limit = epicsConvertDoubleToFloat(newSt.lower_disp_limit);
+            pold->upper_alarm_limit = epicsConvertDoubleToFloat(newSt.upper_alarm_limit);
+            pold->lower_alarm_limit = epicsConvertDoubleToFloat(newSt.lower_alarm_limit);
+            pold->upper_warning_limit = epicsConvertDoubleToFloat(newSt.upper_warning_limit);
+            pold->lower_warning_limit = epicsConvertDoubleToFloat(newSt.lower_warning_limit);
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_FLOAT, &pold->value, &options,
@@ -631,23 +631,23 @@
                 DBRunits
                 DBRgrLong
                 DBRalLong
-            } new;
+            } newSt;
             dbr_char_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_UNITS | DBR_GR_LONG | DBR_AL_LONG;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_UCHAR, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_UCHAR, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            strncpy(pold->units, new.units, MAX_UNITS_SIZE);
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            strncpy(pold->units, newSt.units, MAX_UNITS_SIZE);
             pold->units[MAX_UNITS_SIZE-1] = '\0';
-            pold->upper_disp_limit = new.upper_disp_limit;
-            pold->lower_disp_limit = new.lower_disp_limit;
-            pold->upper_alarm_limit = new.upper_alarm_limit;
-            pold->upper_warning_limit = new.upper_warning_limit;
-            pold->lower_warning_limit = new.lower_warning_limit;
-            pold->lower_alarm_limit = new.lower_alarm_limit;
+            pold->upper_disp_limit = newSt.upper_disp_limit;
+            pold->lower_disp_limit = newSt.lower_disp_limit;
+            pold->upper_alarm_limit = newSt.upper_alarm_limit;
+            pold->upper_warning_limit = newSt.upper_warning_limit;
+            pold->lower_warning_limit = newSt.lower_warning_limit;
+            pold->lower_alarm_limit = newSt.lower_alarm_limit;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_UCHAR, &pold->value, &options,
@@ -663,23 +663,23 @@
                 DBRunits
                 DBRgrLong
                 DBRalLong
-            } new;
+            } newSt;
             dbr_long_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_UNITS | DBR_GR_LONG | DBR_AL_LONG;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_LONG, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_LONG, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            strncpy(pold->units, new.units, MAX_UNITS_SIZE);
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            strncpy(pold->units, newSt.units, MAX_UNITS_SIZE);
             pold->units[MAX_UNITS_SIZE-1] = '\0';
-            pold->upper_disp_limit = new.upper_disp_limit;
-            pold->lower_disp_limit = new.lower_disp_limit;
-            pold->upper_alarm_limit = new.upper_alarm_limit;
-            pold->upper_warning_limit = new.upper_warning_limit;
-            pold->lower_warning_limit = new.lower_warning_limit;
-            pold->lower_alarm_limit = new.lower_alarm_limit;
+            pold->upper_disp_limit = newSt.upper_disp_limit;
+            pold->lower_disp_limit = newSt.lower_disp_limit;
+            pold->upper_alarm_limit = newSt.upper_alarm_limit;
+            pold->upper_warning_limit = newSt.upper_warning_limit;
+            pold->lower_warning_limit = newSt.lower_warning_limit;
+            pold->lower_alarm_limit = newSt.lower_alarm_limit;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_LONG, &pold->value, &options,
@@ -696,25 +696,25 @@
                 DBRprecision
                 DBRgrDouble
                 DBRalDouble
-            } new;
+            } newSt;
             dbr_double_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_UNITS | DBR_PRECISION | DBR_GR_DOUBLE |
                 DBR_AL_DOUBLE;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_DOUBLE, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_DOUBLE, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            pold->precision = new.precision.dp;
-            strncpy(pold->units, new.units, MAX_UNITS_SIZE);
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            pold->precision = newSt.precision.dp;
+            strncpy(pold->units, newSt.units, MAX_UNITS_SIZE);
             pold->units[MAX_UNITS_SIZE-1] = '\0';
-            pold->upper_disp_limit = new.upper_disp_limit;
-            pold->lower_disp_limit = new.lower_disp_limit;
-            pold->upper_alarm_limit = new.upper_alarm_limit;
-            pold->upper_warning_limit = new.upper_warning_limit;
-            pold->lower_warning_limit = new.lower_warning_limit;
-            pold->lower_alarm_limit = new.lower_alarm_limit;
+            pold->upper_disp_limit = newSt.upper_disp_limit;
+            pold->lower_disp_limit = newSt.lower_disp_limit;
+            pold->upper_alarm_limit = newSt.upper_alarm_limit;
+            pold->upper_warning_limit = newSt.upper_warning_limit;
+            pold->lower_warning_limit = newSt.lower_warning_limit;
+            pold->lower_alarm_limit = newSt.lower_alarm_limit;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_DOUBLE, &pold->value, &options,
@@ -733,26 +733,26 @@
                 DBRgrLong
                 DBRctrlLong
                 DBRalLong
-            } new;
+            } newSt;
             dbr_short_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_UNITS | DBR_GR_LONG | DBR_CTRL_LONG |
                 DBR_AL_LONG;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_SHORT, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_SHORT, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            strncpy(pold->units, new.units, MAX_UNITS_SIZE);
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            strncpy(pold->units, newSt.units, MAX_UNITS_SIZE);
             pold->units[MAX_UNITS_SIZE-1] = '\0';
-            pold->upper_disp_limit = new.upper_disp_limit;
-            pold->lower_disp_limit = new.lower_disp_limit;
-            pold->upper_alarm_limit = new.upper_alarm_limit;
-            pold->upper_warning_limit = new.upper_warning_limit;
-            pold->lower_warning_limit = new.lower_warning_limit;
-            pold->lower_alarm_limit = new.lower_alarm_limit;
-            pold->upper_ctrl_limit = new.upper_ctrl_limit;
-            pold->lower_ctrl_limit = new.lower_ctrl_limit;
+            pold->upper_disp_limit = newSt.upper_disp_limit;
+            pold->lower_disp_limit = newSt.lower_disp_limit;
+            pold->upper_alarm_limit = newSt.upper_alarm_limit;
+            pold->upper_warning_limit = newSt.upper_warning_limit;
+            pold->lower_warning_limit = newSt.lower_warning_limit;
+            pold->lower_alarm_limit = newSt.lower_alarm_limit;
+            pold->upper_ctrl_limit = newSt.upper_ctrl_limit;
+            pold->lower_ctrl_limit = newSt.lower_ctrl_limit;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_SHORT, &pold->value, &options,
@@ -770,27 +770,27 @@
                 DBRgrDouble
                 DBRctrlDouble
                 DBRalDouble
-            } new;
+            } newSt;
             dbr_float_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_UNITS | DBR_PRECISION | DBR_GR_DOUBLE |
                 DBR_CTRL_DOUBLE | DBR_AL_DOUBLE;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_FLOAT, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_FLOAT, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            pold->precision = new.precision.dp;
-            strncpy(pold->units, new.units, MAX_UNITS_SIZE);
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            pold->precision = newSt.precision.dp;
+            strncpy(pold->units, newSt.units, MAX_UNITS_SIZE);
             pold->units[MAX_UNITS_SIZE-1] = '\0';
-            pold->upper_disp_limit = epicsConvertDoubleToFloat(new.upper_disp_limit);
-            pold->lower_disp_limit = epicsConvertDoubleToFloat(new.lower_disp_limit);
-            pold->upper_alarm_limit = epicsConvertDoubleToFloat(new.upper_alarm_limit);
-            pold->lower_alarm_limit = epicsConvertDoubleToFloat(new.lower_alarm_limit);
-            pold->upper_warning_limit = epicsConvertDoubleToFloat(new.upper_warning_limit);
-            pold->lower_warning_limit = epicsConvertDoubleToFloat(new.lower_warning_limit);
-            pold->upper_ctrl_limit = epicsConvertDoubleToFloat(new.upper_ctrl_limit);
-            pold->lower_ctrl_limit = epicsConvertDoubleToFloat(new.lower_ctrl_limit);
+            pold->upper_disp_limit = epicsConvertDoubleToFloat(newSt.upper_disp_limit);
+            pold->lower_disp_limit = epicsConvertDoubleToFloat(newSt.lower_disp_limit);
+            pold->upper_alarm_limit = epicsConvertDoubleToFloat(newSt.upper_alarm_limit);
+            pold->lower_alarm_limit = epicsConvertDoubleToFloat(newSt.lower_alarm_limit);
+            pold->upper_warning_limit = epicsConvertDoubleToFloat(newSt.upper_warning_limit);
+            pold->lower_warning_limit = epicsConvertDoubleToFloat(newSt.lower_warning_limit);
+            pold->upper_ctrl_limit = epicsConvertDoubleToFloat(newSt.upper_ctrl_limit);
+            pold->lower_ctrl_limit = epicsConvertDoubleToFloat(newSt.lower_ctrl_limit);
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_FLOAT, &pold->value, &options,
@@ -805,7 +805,7 @@
             struct {
                 DBRstatus
                 DBRenumStrs
-            } new;
+            } newSt;
             short no_str;
             dbr_enum_t *pvalue = &pold->value;
 
@@ -813,15 +813,15 @@
             /* first get status and severity */
             options = DBR_STATUS | DBR_ENUM_STRS;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_ENUM, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_ENUM, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            no_str = new.no_str;
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            no_str = newSt.no_str;
             if (no_str>16) no_str=16;
             pold->no_str = no_str;
             for (i = 0; i < no_str; i++)
-                strncpy(pold->strs[i], new.strs[i], sizeof(pold->strs[i]));
+                strncpy(pold->strs[i], newSt.strs[i], sizeof(pold->strs[i]));
             /*now get values*/
             options = 0;
             nRequest = no_elements;
@@ -839,26 +839,26 @@
                 DBRgrLong
                 DBRctrlLong
                 DBRalLong
-            } new;
+            } newSt;
             dbr_char_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_UNITS | DBR_GR_LONG | DBR_CTRL_LONG |
                 DBR_AL_LONG;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_UCHAR, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_UCHAR, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            strncpy(pold->units, new.units, MAX_UNITS_SIZE);
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            strncpy(pold->units, newSt.units, MAX_UNITS_SIZE);
             pold->units[MAX_UNITS_SIZE-1] = '\0';
-            pold->upper_disp_limit = new.upper_disp_limit;
-            pold->lower_disp_limit = new.lower_disp_limit;
-            pold->upper_alarm_limit = new.upper_alarm_limit;
-            pold->upper_warning_limit = new.upper_warning_limit;
-            pold->lower_warning_limit = new.lower_warning_limit;
-            pold->lower_alarm_limit = new.lower_alarm_limit;
-            pold->upper_ctrl_limit = new.upper_ctrl_limit;
-            pold->lower_ctrl_limit = new.lower_ctrl_limit;
+            pold->upper_disp_limit = newSt.upper_disp_limit;
+            pold->lower_disp_limit = newSt.lower_disp_limit;
+            pold->upper_alarm_limit = newSt.upper_alarm_limit;
+            pold->upper_warning_limit = newSt.upper_warning_limit;
+            pold->lower_warning_limit = newSt.lower_warning_limit;
+            pold->lower_alarm_limit = newSt.lower_alarm_limit;
+            pold->upper_ctrl_limit = newSt.upper_ctrl_limit;
+            pold->lower_ctrl_limit = newSt.lower_ctrl_limit;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_UCHAR, &pold->value, &options,
@@ -875,26 +875,26 @@
                 DBRgrLong
                 DBRctrlLong
                 DBRalLong
-            } new;
+            } newSt;
             dbr_long_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_UNITS | DBR_GR_LONG | DBR_CTRL_LONG |
                 DBR_AL_LONG;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_LONG, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_LONG, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            strncpy(pold->units, new.units, MAX_UNITS_SIZE);
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            strncpy(pold->units, newSt.units, MAX_UNITS_SIZE);
             pold->units[MAX_UNITS_SIZE-1] = '\0';
-            pold->upper_disp_limit = new.upper_disp_limit;
-            pold->lower_disp_limit = new.lower_disp_limit;
-            pold->upper_alarm_limit = new.upper_alarm_limit;
-            pold->upper_warning_limit = new.upper_warning_limit;
-            pold->lower_warning_limit = new.lower_warning_limit;
-            pold->lower_alarm_limit = new.lower_alarm_limit;
-            pold->upper_ctrl_limit = new.upper_ctrl_limit;
-            pold->lower_ctrl_limit = new.lower_ctrl_limit;
+            pold->upper_disp_limit = newSt.upper_disp_limit;
+            pold->lower_disp_limit = newSt.lower_disp_limit;
+            pold->upper_alarm_limit = newSt.upper_alarm_limit;
+            pold->upper_warning_limit = newSt.upper_warning_limit;
+            pold->lower_warning_limit = newSt.lower_warning_limit;
+            pold->lower_alarm_limit = newSt.lower_alarm_limit;
+            pold->upper_ctrl_limit = newSt.upper_ctrl_limit;
+            pold->lower_ctrl_limit = newSt.lower_ctrl_limit;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_LONG, &pold->value, &options,
@@ -912,27 +912,27 @@
                 DBRgrDouble
                 DBRctrlDouble
                 DBRalDouble
-            } new;
+            } newSt;
             dbr_double_t *pvalue = &pold->value;
 
             options = DBR_STATUS | DBR_UNITS | DBR_PRECISION | DBR_GR_DOUBLE |
                 DBR_CTRL_DOUBLE | DBR_AL_DOUBLE;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_DOUBLE, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_DOUBLE, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            pold->precision = new.precision.dp;
-            strncpy(pold->units, new.units, MAX_UNITS_SIZE);
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            pold->precision = newSt.precision.dp;
+            strncpy(pold->units, newSt.units, MAX_UNITS_SIZE);
             pold->units[MAX_UNITS_SIZE-1] = '\0';
-            pold->upper_disp_limit = new.upper_disp_limit;
-            pold->lower_disp_limit = new.lower_disp_limit;
-            pold->upper_alarm_limit = new.upper_alarm_limit;
-            pold->upper_warning_limit = new.upper_warning_limit;
-            pold->lower_warning_limit = new.lower_warning_limit;
-            pold->lower_alarm_limit = new.lower_alarm_limit;
-            pold->upper_ctrl_limit = new.upper_ctrl_limit;
-            pold->lower_ctrl_limit = new.lower_ctrl_limit;
+            pold->upper_disp_limit = newSt.upper_disp_limit;
+            pold->lower_disp_limit = newSt.lower_disp_limit;
+            pold->upper_alarm_limit = newSt.upper_alarm_limit;
+            pold->upper_warning_limit = newSt.upper_warning_limit;
+            pold->lower_warning_limit = newSt.lower_warning_limit;
+            pold->lower_alarm_limit = newSt.lower_alarm_limit;
+            pold->upper_ctrl_limit = newSt.upper_ctrl_limit;
+            pold->lower_ctrl_limit = newSt.lower_ctrl_limit;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_DOUBLE, &pold->value, &options,
@@ -946,17 +946,17 @@
             struct dbr_stsack_string *pold = (struct dbr_stsack_string *)pbuffer;
             struct {
                 DBRstatus
-            } new;
+            } newSt;
             DBSTRING *pvalue = (DBSTRING *)(pold->value);
 
             options = DBR_STATUS;
             nRequest = 0;
-            status = dbGetField(paddr, DBR_STRING, &new, &options, &nRequest,
+            status = dbGetField(paddr, DBR_STRING, &newSt, &options, &nRequest,
                 pfl);
-            pold->status = new.status;
-            pold->severity = new.severity;
-            pold->ackt = new.ackt;
-            pold->acks = new.acks;
+            pold->status = newSt.status;
+            pold->severity = newSt.severity;
+            pold->ackt = newSt.ackt;
+            pold->acks = newSt.acks;
             options = 0;
             nRequest = no_elements;
             status = dbGetField(paddr, DBR_STRING, pold->value,

=== modified file 'src/dbStatic/dbStaticLib.c'
--- src/dbStatic/dbStaticLib.c	2009-08-03 22:22:45 +0000
+++ src/dbStatic/dbStaticLib.c	2010-06-16 20:03:31 +0000
@@ -516,14 +516,14 @@
 /* Beginning of Public Routines */
 
 #define INC_SIZE	256
-void epicsShareAPI dbCatString(char **string,int *stringLength,char *new,char *separator)
+void epicsShareAPI dbCatString(char **string,int *stringLength,char *src,char *separator)
 {
     if((*string==NULL)
-    || ((strlen(*string)+strlen(new)+2) > (size_t)*stringLength)) {
+    || ((strlen(*string)+strlen(src)+2) > (size_t)*stringLength)) {
 	char	*newString;
 	size_t	size;
 
-	size = strlen(new);
+        size = strlen(src);
 	if(*string) size += strlen(*string);
 	/*Make size multiple of INC_SIZE*/
 	size = ((size + 2 + INC_SIZE)/INC_SIZE) * INC_SIZE;
@@ -538,8 +538,8 @@
 	strcat(*string,separator);
 	*stringLength += strlen(separator);
     }
-    strcat(*string,new);
-    *stringLength += strlen(new);
+    strcat(*string,src);
+    *stringLength += strlen(src);
 }
 
 dbBase * epicsShareAPI dbAllocBase(void)

=== modified file 'src/libCom/osi/os/WIN32/osdProcess.c'
--- src/libCom/osi/os/WIN32/osdProcess.c	2002-11-26 23:24:16 +0000
+++ src/libCom/osi/os/WIN32/osdProcess.c	2010-06-16 20:03:31 +0000
@@ -64,16 +64,16 @@
 	startupInfo.wShowWindow = SW_SHOWMINNOACTIVE;
 	
 	status =  CreateProcess ( 
-		            NULL, // pointer to name of executable module (not required if command line is specified)
-		            (char *) pBaseExecutableName, // pointer to command line string 
-		            NULL, // pointer to process security attributes 
-		            NULL, // pointer to thread security attributes 
-		            FALSE, // handle inheritance flag 
-		            CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS, // creation flags 
-		            NULL, // pointer to new environment block (defaults to caller's environement)
-		            NULL, // pointer to current directory name  (defaults to caller's current directory)
-		            &startupInfo, // pointer to STARTUPINFO 
-		            &processInfo // pointer to PROCESS_INFORMATION 
+                            NULL, /* pointer to name of executable module (not required if command line is specified) */
+                            (char *) pBaseExecutableName, /* pointer to command line string */
+                            NULL, /* pointer to process security attributes */
+                            NULL, /* pointer to thread security attributes */
+                            FALSE, /* handle inheritance flag */
+                            CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS, /* creation flags */
+                            NULL, /* pointer to new environment block (defaults to caller's environement) */
+                            NULL, /* pointer to current directory name  (defaults to caller's current directory) */
+                            &startupInfo, /* pointer to STARTUPINFO */
+                            &processInfo /* pointer to PROCESS_INFORMATION */
 	); 
 	if ( status == 0 ) {
 		DWORD W32status;
@@ -84,7 +84,7 @@
 			FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
 			NULL,
 			GetLastError (),
-			MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
+                        MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */
 				(LPTSTR) &errStrMsgBuf,
 			0,
 			NULL 
@@ -107,24 +107,24 @@
 					FORMAT_MESSAGE_ARGUMENT_ARRAY | 80,
 				"%1 \"%2\". %3 %4 %5 \"%6\"",
 				0,
-				MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
+                                MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */
 				(LPTSTR) &complteMsgBuf,
 				0,
 				pFmtArgs 
 			);
 			if (W32status) {
-				// Display the string.
+                                /* Display the string. */
 				MessageBox (NULL, complteMsgBuf, "Configuration Problem", 
 					MB_OK | MB_ICONINFORMATION);
 				LocalFree (complteMsgBuf);
 			}
 			else {
-				// Display the string.
+                                /* Display the string. */
 				MessageBox (NULL, errStrMsgBuf, "Failed to start executable", 
 					MB_OK | MB_ICONINFORMATION);
 			}
 
-			// Free the buffer.
+                        /* Free the buffer. */
 			LocalFree (errStrMsgBuf);
 		}
 		else {
@@ -137,16 +137,17 @@
 
     return osiSpawnDetachedProcessSuccess;
 
-	//
-	// use of spawn here causes problems when the ca repeater
-	// inherits open files (and sockets) from the spawning
-	// process
-	//
-	//status = _spawnlp (_P_DETACH, pBaseExecutableName, pBaseExecutableName, NULL);
-	//if (status<0) {
-	//	errlogPrintf ("!!WARNING!!\n");
-	//	errlogPrintf ("Unable to locate the EPICS executable \"%s\".\n",
-	//		pBaseExecutableName);
-	//	errlogPrintf ("You may need to modify your environment.\n");
-	//}
+        /*
+          use of spawn here causes problems when the ca repeater
+          inherits open files (and sockets) from the spawning
+          process
+
+          status = _spawnlp (_P_DETACH, pBaseExecutableName, pBaseExecutableName, NULL);
+          if (status<0) {
+                errlogPrintf ("!!WARNING!!\n");
+                errlogPrintf ("Unable to locate the EPICS executable \"%s\".\n",
+                        pBaseExecutableName);
+                errlogPrintf ("You may need to modify your environment.\n");
+          }
+         */
 }


Replies:
Re: [Merge] lp:~ralph-lange/epics-base/fix-cpp-keywords into lp:epics-base Nick Rees
Re: [Merge] lp:~ralph-lange/epics-base/fix-cpp-keywords into lp:epics-base Michael Abbott

Navigate by Date:
Prev: RE: Using C++ keywords as variable names in C code Jeff Hill
Next: Re: [Merge] lp:~ralph-lange/epics-base/fix-cpp-keywords into lp:epics-base Nick Rees
Index: 2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Using C++ keywords as variable names in C code Jeff Hill
Next: Re: [Merge] lp:~ralph-lange/epics-base/fix-cpp-keywords into lp:epics-base Nick Rees
Index: 2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
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 ·