diff --git a/.bzrignore b/.bzrignore deleted file mode 100644 index df0e03ed6..000000000 --- a/.bzrignore +++ /dev/null @@ -1,9 +0,0 @@ -./bin -./lib -./db -./dbd -./html -./include -./templates -**/O.* -./QtC-* diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..c3040f162 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +/cfg/ +/bin/ +/lib/ +/db/ +/dbd/ +/html/ +/include/ +/templates/ +O.*/ +/QtC-* +*.orig +*.log diff --git a/Makefile b/Makefile index e733d8c99..d058e8fbe 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,6 @@ # EPICS BASE is distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* -# -# $Revision-Id$ -# TOP = . include $(TOP)/configure/CONFIG diff --git a/configure/CONFIG b/configure/CONFIG index 4371d4e1a..17440a39e 100644 --- a/configure/CONFIG +++ b/configure/CONFIG @@ -6,8 +6,6 @@ # EPICS BASE is distributed subject to a Software License Agreement found # in the file LICENSE that is included with this distribution. #************************************************************************* -# -# $Revision-Id$ # # Common build definitions diff --git a/configure/CONFIG.CrossCommon b/configure/CONFIG.CrossCommon index 167ba490f..2fa6460d7 100644 --- a/configure/CONFIG.CrossCommon +++ b/configure/CONFIG.CrossCommon @@ -3,9 +3,8 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. #************************************************************************* # Cross compiler default definitions @@ -27,6 +26,6 @@ CROSS_LDFLAGS = $(addprefix -L,$(GNU_TARGET_LIB_DIR)) CMPLR_PREFIX_CROSS=$(addsuffix -,$(GNU_TARGET)) CMPLR_PREFIX=$(CMPLR_PREFIX_$(BUILD_CLASS)) -# All cross builds use the gnu compiler +# Cross builds usually use the gnu compiler include $(CONFIG)/CONFIG.gnuCommon diff --git a/configure/CONFIG.gnuCommon b/configure/CONFIG.gnuCommon index 8e99e9c54..025391548 100644 --- a/configure/CONFIG.gnuCommon +++ b/configure/CONFIG.gnuCommon @@ -7,7 +7,7 @@ # and higher are distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* -#-------------------------------------------------- + # GNU compiler defaults GNU = YES diff --git a/configure/CONFIG_ADDONS b/configure/CONFIG_ADDONS index f6b6b8481..29a33c415 100644 --- a/configure/CONFIG_ADDONS +++ b/configure/CONFIG_ADDONS @@ -6,7 +6,6 @@ # EPICS BASE is distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* -# $Revision-Id$ # # check for add-on CFLAGS and CXXFLAGS # diff --git a/configure/CONFIG_APP_INCLUDE b/configure/CONFIG_APP_INCLUDE index 2d00b52c4..8b4bd7d08 100644 --- a/configure/CONFIG_APP_INCLUDE +++ b/configure/CONFIG_APP_INCLUDE @@ -6,9 +6,6 @@ # EPICS BASE is distributed subject to a Software License Agreement found # in the file LICENSE that is included with this distribution. #************************************************************************* -# -# $Revision-Id$ -# export TOP diff --git a/configure/CONFIG_BASE b/configure/CONFIG_BASE index 1957a8f56..70d68bb32 100644 --- a/configure/CONFIG_BASE +++ b/configure/CONFIG_BASE @@ -36,6 +36,7 @@ ifdef BASE_TOP SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION) # Windows only allows 2 levels of version numbering PROD_VERSION = $(EPICS_VERSION).$(EPICS_REVISION) + BASE_CPPFLAGS += -DUSE_TYPED_RSET endif # BASE_TOP #--------------------------------------------------------------- @@ -45,7 +46,7 @@ endif # BASE_TOP OSITHREAD_USE_DEFAULT_STACK = NO OSITHREAD_DEFAULT_STACK_FLAGS_YES = -DOSITHREAD_USE_DEFAULT_STACK -BASE_CPPFLAGS = $(OSITHREAD_DEFAULT_STACK_FLAGS_$(OSITHREAD_USE_DEFAULT_STACK)) +BASE_CPPFLAGS += $(OSITHREAD_DEFAULT_STACK_FLAGS_$(OSITHREAD_USE_DEFAULT_STACK)) #--------------------------------------------------------------- # Where to find the installed build tools diff --git a/configure/CONFIG_BASE_VERSION b/configure/CONFIG_BASE_VERSION index d41fe95e2..e9f632391 100644 --- a/configure/CONFIG_BASE_VERSION +++ b/configure/CONFIG_BASE_VERSION @@ -4,11 +4,9 @@ # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. # EPICS BASE is distributed subject to a Software License Agreement found -# in the file LICENSE that is included with this distribution. +# in the file LICENSE that is included with this distribution. #************************************************************************* # -# $Revision-Id$ -# # EPICS Version information # # Only the person making an official EPICS release should make changes in @@ -36,10 +34,10 @@ BASE_3_16 = YES # EPICS_VERSION must be a number >0 and <256 EPICS_VERSION = 3 -# EPICS_REVISION must be a number >=0 and <256 +# EPICS_REVISION must be a number >=0 and <256 EPICS_REVISION = 16 -# EPICS_MODIFICATION must be a number >=0 and <256 +# EPICS_MODIFICATION must be a number >=0 and <256 EPICS_MODIFICATION = 0 # EPICS_PATCH_LEVEL must be a number (win32 resource file requirement) @@ -72,4 +70,5 @@ EPICS_SHORT_VERSION=$(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION)$(EP EPICS_VERSION_NUMBER=$(EPICS_SHORT_VERSION)$(EPICS_DEV_SNAPSHOT)$(EPICS_SITE_VSTRING) EPICS_VERSION_STRING="EPICS Version $(EPICS_VERSION_NUMBER)" -COMMIT_DATE="\$$Date$$" +# Provide this in case anyone is still using the old name +COMMIT_DATE="-no-date-" diff --git a/configure/CONFIG_COMMON b/configure/CONFIG_COMMON index 2df341581..79807c2f2 100644 --- a/configure/CONFIG_COMMON +++ b/configure/CONFIG_COMMON @@ -7,8 +7,6 @@ # in file LICENSE that is included with this distribution. #************************************************************************* # -# $Revision-Id$ -# # CONFIG_COMMON # # This file is to be maintained by the community. @@ -344,7 +342,7 @@ GENVERSIONDEFAULT = HDEPENDS_METHOD = MKMF -HDEPENDS_MKMFFLAGS = -m $*$(DEP) $(INCLUDES) $@ +HDEPENDS_MKMFFLAGS = -m $@ $(INCLUDES) $*$(OBJ) HDEPENDS_MKMF.c = $(MKMF) $(HDEPENDS_FLAGS) $(HDEPENDS_MKMFFLAGS) HDEPENDS_MKMF.cpp = $(MKMF) $(HDEPENDS_FLAGS) $(HDEPENDS_MKMFFLAGS) diff --git a/configure/CONFIG_ENV b/configure/CONFIG_ENV index 5fe70eab1..173dceaca 100644 --- a/configure/CONFIG_ENV +++ b/configure/CONFIG_ENV @@ -7,7 +7,6 @@ # and higher are distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* -# $Revision-Id$ # Author: Andrew Johnson # Date: 20 April 1995 # diff --git a/configure/CONFIG_FILE_TYPE b/configure/CONFIG_FILE_TYPE index c15f4b783..b7870d7e5 100644 --- a/configure/CONFIG_FILE_TYPE +++ b/configure/CONFIG_FILE_TYPE @@ -6,7 +6,6 @@ # EPICS BASE is distributed subject to a Software License Agreement found # in the file LICENSE that is included with this distribution. #************************************************************************* -# $Revision-Id$ # # Macros and rules to create a new installation file type # diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE index 6c7f08239..d4edb948a 100644 --- a/configure/CONFIG_SITE +++ b/configure/CONFIG_SITE @@ -6,8 +6,7 @@ # EPICS BASE is distributed subject to a Software License Agreement found # in the file LICENSE that is included with this distribution. #************************************************************************* -# -# $Revision-Id$ + # # CONFIG_SITE - Global site configuration file # @@ -118,6 +117,13 @@ CROSS_COMPILER_TARGET_ARCHS= # configure/os/CONFIG_SITE..Common files instead. CROSS_COMPILER_HOST_ARCHS= +# The 'make runtests' and 'make tapfiles' build targets normally only run +# self-tests for the EPICS_HOST_ARCH architecture. If the host can execute +# the self-test programs for any other cross-built architectures such as +# a -debug architecture, those architectures can be named here. +# +CROSS_COMPILER_RUNTEST_ARCHS= + # Build shared libraries (DLLs on Windows). # Must be either YES or NO. Definitions in the target-specific # os/CONFIG.Common. and os/CONFIG_SITE.Common. files may diff --git a/configure/CONFIG_SITE_ENV b/configure/CONFIG_SITE_ENV index efe2560e0..3a38d68de 100644 --- a/configure/CONFIG_SITE_ENV +++ b/configure/CONFIG_SITE_ENV @@ -6,7 +6,6 @@ # EPICS BASE is distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* -# $Revision-Id$ # Author: Andrew Johnson # Date: 1 May 1995 # @@ -30,10 +29,8 @@ # local timezone info for vxWorks and RTEMS IOCs. The format is # :::: # where the start and end are mmddhh - that is month,day,hour -# e.g. for ANL in 2015: EPICS_TIMEZONE=CST/CDT::360:030802:110102 +# e.g. for ANL in 2016: EPICS_TIMEZONE=CST/CDT::360:031302:110602 # -# DST for 2015 US: Mar 08 - Nov 01 -# EU: Mar 29 - Oct 25 # DST for 2016 US: Mar 13 - Nov 06 # EU: Mar 27 - Oct 30 # DST for 2017 US: Mar 12 - Nov 05 @@ -42,11 +39,15 @@ # EU: Mar 25 - Oct 28 # DST for 2019 US: Mar 10 - Nov 03 # EU: Mar 31 - Oct 27 -# (see: http://www.timeanddate.com/time/map/) +# DST for 2020 US: Mar 08 - Nov 01 +# EU: Mar 29 - Oct 25 +# DST for 2021 US: Mar 14 - Nov 07 +# EU: Mar 28 - Oct 31 +# (see: http://www.timeanddate.com/time/dst/2016.html etc. ) # -# These values are for 2015: -EPICS_TIMEZONE=CST/CDT::360:030802:110102 -#EPICS_TIMEZONE=CET/CEST::-60:032902:102502 +# These values are for 2016: +EPICS_TIMEZONE=CST/CDT::360:031302:110602 +#EPICS_TIMEZONE=CET/CEST::-60:032702:103002 # EPICS_TS_NTP_INET # NTP time server ip address. Uses boot host if not set. diff --git a/configure/Makefile b/configure/Makefile index 86c59048e..377879766 100644 --- a/configure/Makefile +++ b/configure/Makefile @@ -6,9 +6,6 @@ # EPICS BASE is distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* -# -# $Revision-Id$ -# TOP=.. diff --git a/configure/RULES b/configure/RULES index 74b33fdd9..bdc895a4d 100644 --- a/configure/RULES +++ b/configure/RULES @@ -7,7 +7,6 @@ # and higher are distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* -# $Revision-Id$ ifndef T_A diff --git a/configure/RULES.ioc b/configure/RULES.ioc index 1024fcb22..fa0482ec0 100644 --- a/configure/RULES.ioc +++ b/configure/RULES.ioc @@ -14,7 +14,7 @@ build$(DIVIDER)$(ARCH) build: buildInstall install$(DIVIDER)$(ARCH) install: buildInstall $(ARCH): buildInstall -ifeq ($(filter $(ARCH),$(BUILD_ARCHS)),$(ARCH)) +ifeq ($(filter $(ARCH),$(BUILD_ARCHS)),$(strip $(ARCH))) buildInstall$(DIVIDER)$(ARCH) buildInstall: $(TARGETS) clean$(DIVIDER)$(ARCH) clean: @@ -24,11 +24,14 @@ else clean$(DIVIDER)$(ARCH) clean: endif -cdCommands envPaths dllPath.bat relPaths.sh: \ +cdCommands dllPath.bat relPaths.sh: \ $(wildcard $(TOP)/configure/RELEASE*) \ - $(wildcard $(TOP)/configure/CONFIG_SITE*) $(INSTALL_BIN) + $(wildcard $(TOP)/configure/CONFIG_SITE*) | $(INSTALL_BIN) $(CONVERTRELEASE) -a $(ARCH) -t $(IOCS_APPL_TOP) $@ +envPaths: $(wildcard $(TOP)/configure/RELEASE*) \ + $(wildcard $(TOP)/configure/CONFIG_SITE*) | $(INSTALL_BIN) + $(CONVERTRELEASE) -t $(IOCS_APPL_TOP) $@ + realclean: $(RM) cdCommands envPaths dllPath.bat relPaths.sh - diff --git a/configure/RULES_ARCHS b/configure/RULES_ARCHS index b14318ed0..6d1808266 100644 --- a/configure/RULES_ARCHS +++ b/configure/RULES_ARCHS @@ -6,9 +6,6 @@ # EPICS BASE is distributed subject to a Software License Agreement found # in the file LICENSE that is included with this distribution. #************************************************************************* -# -# $Revision-Id$ -# all: install host: install$(DIVIDER)$(EPICS_HOST_ARCH) diff --git a/configure/RULES_BUILD b/configure/RULES_BUILD index e7b8d8d27..f81f8eb39 100644 --- a/configure/RULES_BUILD +++ b/configure/RULES_BUILD @@ -4,9 +4,8 @@ # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. # EPICS BASE is distributed subject to a Software License Agreement found -# in the file LICENSE that is included with this distribution. +# in the file LICENSE that is included with this distribution. #************************************************************************* -# $Revision-Id$ # # Rules for making things specified in Makefile # @@ -106,16 +105,20 @@ endif PRODTARGETS += $(PRODNAME) $(MUNCHNAME) $(CTDT_SRCS) $(CTDT_OBJS) $(NMS) #--------------------------------------------------------------- -# Generate a test specification if any tests are defined. +# Test specifications and test result files # ifneq (,$(strip $(TESTS))) TARGETS += testspec endif +# Enable testing if this host can run tests on the current target +ifneq (,$(findstring $(T_A),$(EPICS_HOST_ARCH) $(CROSS_COMPILER_RUNTEST_ARCHS))) +RUNTESTS_ENABLED = YES TAPFILES += $(TESTSCRIPTS:.t=.tap) +endif #--------------------------------------------------------------- -# Libraries +# Libraries # LIBTARGETS += $(LIBNAME) $(INSTALL_LIBS) $(TESTLIBNAME) \ @@ -126,16 +129,16 @@ LIBTARGETS += $(LIBNAME) $(INSTALL_LIBS) $(TESTLIBNAME) \ # Main targets -install: buildInstall +install: buildInstall -buildInstall : build +buildInstall: build # Allows rebuild to work with parallel builds option, -j. install: $(patsubst rebuild,clean,$(filter rebuild,$(MAKECMDGOALS))) rebuild: clean install -build : inc +build: inc build: $(OBJSNAME) $(LIBTARGETS) $(PRODTARGETS) $(TESTPRODNAME) \ $(TARGETS) $(TESTSCRIPTS) $(INSTALL_LIB_INSTALLS) @@ -170,7 +173,13 @@ endif $(DIRECTORY_TARGETS) : $(MKDIR) $@ -$(PRODNAME): $(INSTALL_LIB_INSTALLS) +# Install LIB_INSTALLS libraries before linking executables +$(TESTPRODNAME) $(PRODNAME): | $(INSTALL_LIB_INSTALLS) + +# Install built libraries too, unless Makefile says to wait +ifneq ($(DELAY_INSTALL_LIBS),YES) +$(TESTPRODNAME) $(PRODNAME): | $(INSTALL_LIBS) $(INSTALL_DLLSTUB_LIBS) +endif # RELEASE file consistency checking checkRelease: @@ -179,7 +188,7 @@ warnRelease: -$(CONVERTRELEASE) checkRelease noCheckRelease: ifeq ($(EPICS_HOST_ARCH),$(T_A)) - @echo "Warning: RELEASE file consistency checks have been disabled" + $(info Warning: RELEASE file consistency checks have been disabled) endif #--------------------------------------------------------------- @@ -270,13 +279,17 @@ endif # RANLIB $(SHRLIBNAME) $(DLLSTUB_LIBNAME) $(TESTSHRLIBNAME) $(TESTDLLSTUB_LIBNAME): \ $(LIBRARY_OBJS) $(LIBRARY_RESS) $(SHRLIB_DEPLIBS) -$(DLLSTUB_LIBNAME): $(SHRLIBNAME); +# Stub library timestamps may be earlier than the DLL itself. +# This order-only prerequisite resolves any related problems. +# The $(LINK.shrlib) command must build both library files if +# the target requires a separate stub library file. +$(DLLSTUB_LIBNAME): | $(SHRLIBNAME); $(SHRLIBNAME): $(SHRLIB_PREFIX)%$(SHRLIB_SUFFIX): @$(RM) $@ $(LINK.shrlib) $(MT_DLL_COMMAND) -$(TESTDLLSTUB_LIBNAME): $(TESTSHRLIBNAME); +$(TESTDLLSTUB_LIBNAME): | $(TESTSHRLIBNAME); $(TESTSHRLIBNAME): $(SHRLIB_PREFIX)%$(SHRLIB_SUFFIX): @$(RM) $@ $(LINK.shrlib) @@ -319,7 +332,9 @@ $(MODNAME): %$(MODEXT): %$(EXE) # Automated testing runtests: $(TESTSCRIPTS) +ifdef RUNTESTS_ENABLED -$(PERL) -MTest::Harness -e 'runtests @ARGV if @ARGV;' $^ +endif testspec: $(TESTSCRIPTS) @$(RM) $@ @@ -333,7 +348,9 @@ tapfiles: $(TESTSCRIPTS) $(TAPFILES) # A .tap file is the output from running the associated test script %.tap: %.t +ifdef RUNTESTS_ENABLED -$(PERL) $< -tap > $@ +endif # If there's a perl test script (.plt) available, use it %.t: ../%.plt diff --git a/configure/RULES_DIRS b/configure/RULES_DIRS index 69cf356b1..755c0cccf 100644 --- a/configure/RULES_DIRS +++ b/configure/RULES_DIRS @@ -6,10 +6,6 @@ # EPICS BASE is distributed subject to a Software License Agreement found # in the file LICENSE that is included with this distribution. #************************************************************************* -# -# $Revision-Id$ -# - ARCHS += $(BUILD_ARCHS) ACTIONS += inc build install buildInstall clean realclean archclean diff --git a/configure/RULES_EXPAND b/configure/RULES_EXPAND index 0f43db347..51657ebd8 100644 --- a/configure/RULES_EXPAND +++ b/configure/RULES_EXPAND @@ -14,8 +14,6 @@ EXPANDFLAGS += $(addprefix -D ,$(EXPAND_VARS)) # The names of files to be expanded must end with '@' EXPANDED = $(EXPAND:%@=%) -buildInstall: $(EXPANDED) - $(EXPANDED): %: %@ $(ECHO) "Expanding $< to $@" @$(RM) $@ @@ -26,7 +24,8 @@ clean: expand_clean expand_clean: @$(RM) $(EXPANDED) -.PHONY : expand_clean +.PRECIOUS: $(EXPANDED) +.PHONY: expand_clean #--------------------------------------------------------------- # Assemblies (files assembled from snippets) diff --git a/configure/RULES_FILE_TYPE b/configure/RULES_FILE_TYPE index 6fc6f61a5..28cc74bd4 100644 --- a/configure/RULES_FILE_TYPE +++ b/configure/RULES_FILE_TYPE @@ -6,9 +6,6 @@ # EPICS BASE is distributed subject to a Software License Agreement found # in the file LICENSE that is included with this distribution. #************************************************************************* -# -# $Revision-Id$ -# # Include /configure/RULES_BUILD from tops defined in RELEASE* files # diff --git a/configure/RULES_OCTAVE b/configure/RULES_OCTAVE index 6ac170984..a06fb075a 100644 --- a/configure/RULES_OCTAVE +++ b/configure/RULES_OCTAVE @@ -7,9 +7,7 @@ # and higher are distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* -# $Revision-Id$ -# -#------------------------------------------------------- + # Octave definitions and rules ifeq ($(findstring Host,$(VALID_BUILDS)),Host) diff --git a/configure/RULES_TARGET b/configure/RULES_TARGET index 8e7a1db8e..f8e44db76 100644 --- a/configure/RULES_TARGET +++ b/configure/RULES_TARGET @@ -8,8 +8,6 @@ # in file LICENSE that is included with this distribution. #************************************************************************* # -# $Revision-Id$ -# # RULES_TARGET # # This file is to be maintained by the community. diff --git a/configure/RULES_TOP b/configure/RULES_TOP index 6b21a6673..2aa2e1f33 100644 --- a/configure/RULES_TOP +++ b/configure/RULES_TOP @@ -6,9 +6,6 @@ # EPICS BASE is distributed subject to a Software License Agreement found # in the file LICENSE that is included with this distribution. #************************************************************************* -# -# $Revision-Id$ -# include $(CONFIG)/RULES_DIRS diff --git a/configure/os/CONFIG.Common.RTEMS b/configure/os/CONFIG.Common.RTEMS index 2c4f1e62c..9650ae255 100644 --- a/configure/os/CONFIG.Common.RTEMS +++ b/configure/os/CONFIG.Common.RTEMS @@ -1,7 +1,6 @@ # # This file contains definitions for RTEMS builds # -# $Revision-Id$ # Author: W. Eric Norum # University of Saskatchewan # eric.norum@usask.ca diff --git a/configure/os/CONFIG.Common.RTEMS-beatnik b/configure/os/CONFIG.Common.RTEMS-beatnik index 714bb3782..00080e7fd 100644 --- a/configure/os/CONFIG.Common.RTEMS-beatnik +++ b/configure/os/CONFIG.Common.RTEMS-beatnik @@ -1,6 +1,5 @@ # # CONFIG.Common.RTEMS-beatnik -# $Revision-Id$ # Author: Dayle Kotturi # # All RTEMS targets use the same Makefile fragment diff --git a/configure/os/CONFIG.Common.RTEMS-gen68360 b/configure/os/CONFIG.Common.RTEMS-gen68360 index 3db935e9f..a6663afc2 100644 --- a/configure/os/CONFIG.Common.RTEMS-gen68360 +++ b/configure/os/CONFIG.Common.RTEMS-gen68360 @@ -1,5 +1,4 @@ # -# $Revision-Id$ # Author: W. Eric Norum # Canadian Light Source # eric@cls.usask.ca diff --git a/configure/os/CONFIG.Common.RTEMS-mcp750 b/configure/os/CONFIG.Common.RTEMS-mcp750 index 4d662a7e3..d834ad9ec 100644 --- a/configure/os/CONFIG.Common.RTEMS-mcp750 +++ b/configure/os/CONFIG.Common.RTEMS-mcp750 @@ -1,5 +1,4 @@ # -# $Revision-Id$ # Author: W. Eric Norum # Canadian Light Source # eric@cls.usask.ca diff --git a/configure/os/CONFIG.Common.RTEMS-mvme167 b/configure/os/CONFIG.Common.RTEMS-mvme167 index 3db935e9f..a6663afc2 100644 --- a/configure/os/CONFIG.Common.RTEMS-mvme167 +++ b/configure/os/CONFIG.Common.RTEMS-mvme167 @@ -1,5 +1,4 @@ # -# $Revision-Id$ # Author: W. Eric Norum # Canadian Light Source # eric@cls.usask.ca diff --git a/configure/os/CONFIG.Common.RTEMS-mvme2100 b/configure/os/CONFIG.Common.RTEMS-mvme2100 index aac3650fd..687af2374 100644 --- a/configure/os/CONFIG.Common.RTEMS-mvme2100 +++ b/configure/os/CONFIG.Common.RTEMS-mvme2100 @@ -1,6 +1,5 @@ # # CONFIG.Common.RTEMS-mvme2100 -# $Revision-Id$ # Author: W. Eric Norum # # All RTEMS targets use the same Makefile fragment diff --git a/configure/os/CONFIG.Common.RTEMS-mvme3100 b/configure/os/CONFIG.Common.RTEMS-mvme3100 index 5ee0757e5..cd9416ce7 100644 --- a/configure/os/CONFIG.Common.RTEMS-mvme3100 +++ b/configure/os/CONFIG.Common.RTEMS-mvme3100 @@ -1,6 +1,5 @@ # # CONFIG.Common.RTEMS-mvme3100 -# $Revision-Id$ # Author: W. Eric Norum # # All RTEMS targets use the same Makefile fragment diff --git a/configure/os/CONFIG.Common.RTEMS-mvme5500 b/configure/os/CONFIG.Common.RTEMS-mvme5500 index 39be35635..0c05b76a8 100644 --- a/configure/os/CONFIG.Common.RTEMS-mvme5500 +++ b/configure/os/CONFIG.Common.RTEMS-mvme5500 @@ -1,6 +1,5 @@ # # CONFIG.Common.RTEMS-mvme5500 -# $Revision-Id$ # Author: W. Eric Norum # # All RTEMS targets use the same Makefile fragment diff --git a/configure/os/CONFIG.Common.RTEMS-pc386 b/configure/os/CONFIG.Common.RTEMS-pc386 index 2b20b974a..b3150cc66 100644 --- a/configure/os/CONFIG.Common.RTEMS-pc386 +++ b/configure/os/CONFIG.Common.RTEMS-pc386 @@ -1,5 +1,4 @@ # -# $Revision-Id$ # Author: W. Eric Norum # Canadian Light Source # eric@cls.usask.ca diff --git a/configure/os/CONFIG.Common.RTEMS-psim b/configure/os/CONFIG.Common.RTEMS-psim index df0cb3687..230d72e1f 100644 --- a/configure/os/CONFIG.Common.RTEMS-psim +++ b/configure/os/CONFIG.Common.RTEMS-psim @@ -1,5 +1,4 @@ # -# $Revision-Id$ # Author: W. Eric Norum # University of Saskatchewan # eric.norum@usask.ca diff --git a/configure/os/CONFIG.Common.RTEMS-uC5282 b/configure/os/CONFIG.Common.RTEMS-uC5282 index 7dbc9d8fd..9c6a58d33 100644 --- a/configure/os/CONFIG.Common.RTEMS-uC5282 +++ b/configure/os/CONFIG.Common.RTEMS-uC5282 @@ -1,5 +1,4 @@ # -# $Revision-Id$ # Author: W. Eric Norum # Canadian Light Source # eric@cls.usask.ca diff --git a/configure/os/CONFIG.Common.UnixCommon b/configure/os/CONFIG.Common.UnixCommon index 816744fd8..add84873e 100644 --- a/configure/os/CONFIG.Common.UnixCommon +++ b/configure/os/CONFIG.Common.UnixCommon @@ -1,7 +1,5 @@ # CONFIG.Common.UnixCommon # -# $Revision-Id$ -# # Contains definitions common to all Unix target archs # # This file is maintained by the build community. @@ -57,7 +55,7 @@ SHRLIB_LDLIBS = $(addprefix -l, $($*_LDLIBS) $(LIB_LIBS) $(USR_LIBS)) \ $(LDLIBS) SHRLIB_DEPLIB_DIRS = $(foreach word, \ - $(sort $(dir $($*_DEPLIBS) $(SHRLIB_DEPLIBS))), \ + $(sort $(INSTALL_LIB)/ $(dir $($*_DEPLIBS) $(SHRLIB_DEPLIBS))), \ $(shell $(FULLPATHNAME) $(word))) SHRLIBDIR_LDFLAGS += $(SHRLIB_DEPLIB_DIRS:%=-L%) @@ -86,7 +84,7 @@ PROD_LDLIBS += $($(firstword $(LDLIBS_STATIC_$(STATIC_BUILD)) \ $(LDLIBS_SHARED_$(SHARED_LIBRARIES)))) PROD_DEPLIB_DIRS = $(foreach word, \ - $(sort $(dir $($*_DEPLIBS) $(PROD_DEPLIBS))), \ + $(sort $(INSTALL_LIB)/ $(dir $($*_DEPLIBS) $(PROD_DEPLIBS))), \ $(shell $(FULLPATHNAME) $(word))) PRODDIR_LDFLAGS += $(PROD_DEPLIB_DIRS:%=-L%) diff --git a/configure/os/CONFIG.Common.cygwin-x86 b/configure/os/CONFIG.Common.cygwin-x86 index 4bd4e63a3..02dab10db 100644 --- a/configure/os/CONFIG.Common.cygwin-x86 +++ b/configure/os/CONFIG.Common.cygwin-x86 @@ -1,6 +1,5 @@ # CONFIG.Common.cygwin-x86 # -# $Revision-Id$ # This file is maintained by the build community. # # Definitions for cygwin-x86 target builds diff --git a/configure/os/CONFIG.Common.cygwin-x86_64 b/configure/os/CONFIG.Common.cygwin-x86_64 index 380e686be..b2b18dbfa 100644 --- a/configure/os/CONFIG.Common.cygwin-x86_64 +++ b/configure/os/CONFIG.Common.cygwin-x86_64 @@ -1,14 +1,13 @@ -# CONFIG.Common.cygwin-x86_64 -# -# $Revision-Id$ -# This file is maintained by the build community. -# -# Definitions for cygwin-x86_64 target builds -# Sites may override these definitions in CONFIG_SITE.Common.cygwin-x86_64 -#------------------------------------------------------- - -include $(CONFIG)/os/CONFIG.Common.cygwin-x86 - -ARCH_DEP_CFLAGS = -m64 -ARCH_DEP_LDFLAGS = -m64 - +# CONFIG.Common.cygwin-x86_64 +# +# This file is maintained by the build community. +# +# Definitions for cygwin-x86_64 target builds +# Sites may override these definitions in CONFIG_SITE.Common.cygwin-x86_64 +#------------------------------------------------------- + +include $(CONFIG)/os/CONFIG.Common.cygwin-x86 + +ARCH_DEP_CFLAGS = -m64 +ARCH_DEP_LDFLAGS = -m64 + diff --git a/configure/os/CONFIG.Common.darwin-ppc b/configure/os/CONFIG.Common.darwin-ppc index 18a8ee4f4..7ac704314 100644 --- a/configure/os/CONFIG.Common.darwin-ppc +++ b/configure/os/CONFIG.Common.darwin-ppc @@ -1,6 +1,5 @@ # CONFIG.Common.darwin-ppc # -# $Revision-Id$ # This file is maintained by the build community. # # Definitions for darwin-ppc target builds diff --git a/configure/os/CONFIG.Common.darwin-ppcx86 b/configure/os/CONFIG.Common.darwin-ppcx86 index 94236e2ef..12107944f 100644 --- a/configure/os/CONFIG.Common.darwin-ppcx86 +++ b/configure/os/CONFIG.Common.darwin-ppcx86 @@ -1,6 +1,5 @@ # CONFIG.Common.darwin-ppcx86 # -# $Revision-Id$ # This file is maintained by the build community. # # Definitions for Darwin universal PowerPC + x86 target builds diff --git a/configure/os/CONFIG.Common.darwin-x86 b/configure/os/CONFIG.Common.darwin-x86 index f20de7607..89650ea7d 100644 --- a/configure/os/CONFIG.Common.darwin-x86 +++ b/configure/os/CONFIG.Common.darwin-x86 @@ -1,6 +1,5 @@ # CONFIG.Common.darwin-x86 # -# $Revision-Id$ # This file is maintained by the build community. # # Definitions for darwin-x86 target builds diff --git a/configure/os/CONFIG.Common.freebsd-x86 b/configure/os/CONFIG.Common.freebsd-x86 index bf4945390..f0f18851f 100644 --- a/configure/os/CONFIG.Common.freebsd-x86 +++ b/configure/os/CONFIG.Common.freebsd-x86 @@ -1,4 +1,3 @@ -# $Revision-Id$ # # This file is maintained by the build community. # diff --git a/configure/os/CONFIG.Common.freebsd-x86_64 b/configure/os/CONFIG.Common.freebsd-x86_64 index 92b99bd8e..f10be1058 100644 --- a/configure/os/CONFIG.Common.freebsd-x86_64 +++ b/configure/os/CONFIG.Common.freebsd-x86_64 @@ -1,4 +1,3 @@ -# $Revision-Id$ # # This file is maintained by the build community. # diff --git a/configure/os/CONFIG.Common.freebsdCommon b/configure/os/CONFIG.Common.freebsdCommon index 0eafd7511..36796b758 100644 --- a/configure/os/CONFIG.Common.freebsdCommon +++ b/configure/os/CONFIG.Common.freebsdCommon @@ -1,4 +1,3 @@ -# $Revision-Id$ # # This file is maintained by the build community. # diff --git a/configure/os/CONFIG.Common.ios-arm b/configure/os/CONFIG.Common.ios-arm index cc297b627..acca27d8c 100644 --- a/configure/os/CONFIG.Common.ios-arm +++ b/configure/os/CONFIG.Common.ios-arm @@ -1,6 +1,5 @@ # CONFIG.Common.ios-arm # -# $Revision-Id$ # This file is maintained by the build community. # # Definitions for ios-arm target builds diff --git a/configure/os/CONFIG.Common.ios-x86 b/configure/os/CONFIG.Common.ios-x86 index a8175a34e..6031629c5 100644 --- a/configure/os/CONFIG.Common.ios-x86 +++ b/configure/os/CONFIG.Common.ios-x86 @@ -1,6 +1,5 @@ # CONFIG.Common.ios-x86 # -# $Revision-Id$ # This file is maintained by the build community. # # Definitions for ios-x86 target builds diff --git a/configure/os/CONFIG.Common.iosCommon b/configure/os/CONFIG.Common.iosCommon index 0b22ec89a..f9e5750e3 100644 --- a/configure/os/CONFIG.Common.iosCommon +++ b/configure/os/CONFIG.Common.iosCommon @@ -1,6 +1,5 @@ # CONFIG.Common.iosCommon # -# $Revision-Id$ # This file is maintained by the build community. # # Definitions for all Apple iOS builds diff --git a/configure/os/CONFIG.Common.linux-386 b/configure/os/CONFIG.Common.linux-386 index 3fa40381a..8549a8ab6 100644 --- a/configure/os/CONFIG.Common.linux-386 +++ b/configure/os/CONFIG.Common.linux-386 @@ -1,6 +1,5 @@ # CONFIG.Common.linux-386 # -# $Revision-Id$ # This file is maintained by the build community. # # Definitions for linux-386 target builds diff --git a/configure/os/CONFIG.Common.linux-486 b/configure/os/CONFIG.Common.linux-486 index a5af47992..cf39b92d2 100644 --- a/configure/os/CONFIG.Common.linux-486 +++ b/configure/os/CONFIG.Common.linux-486 @@ -1,8 +1,5 @@ # CONFIG.Common.linux-486 # -# $Id -# This file is maintained by the build community. -# # Definitions for linux-486 target builds # Sites may override these definitions in CONFIG_SITE.Common.linux-486 #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.linux-586 b/configure/os/CONFIG.Common.linux-586 index 048d3aa8e..9b2fa466b 100644 --- a/configure/os/CONFIG.Common.linux-586 +++ b/configure/os/CONFIG.Common.linux-586 @@ -1,8 +1,5 @@ # CONFIG.Common.linux-586 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-586 target builds # Sites may override these definitions in CONFIG_SITE.Common.linux-586 #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.linux-686 b/configure/os/CONFIG.Common.linux-686 index f19bcb6c7..5a2e0ef5f 100644 --- a/configure/os/CONFIG.Common.linux-686 +++ b/configure/os/CONFIG.Common.linux-686 @@ -1,8 +1,5 @@ # CONFIG.Common.linux-686 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-686 target builds # Sites may override these definitions in CONFIG_SITE.Common.linux-686 #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.linux-arm-debug b/configure/os/CONFIG.Common.linux-arm-debug index 3f4b40102..c2a0e99eb 100644 --- a/configure/os/CONFIG.Common.linux-arm-debug +++ b/configure/os/CONFIG.Common.linux-arm-debug @@ -1,8 +1,5 @@ # CONFIG.Common.linux-arm-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-arm with debug compiler flags # Override these settings in CONFIG_SITE.Common.linux-arm-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.linux-arm_eb b/configure/os/CONFIG.Common.linux-arm_eb index c02f6392e..69a255020 100644 --- a/configure/os/CONFIG.Common.linux-arm_eb +++ b/configure/os/CONFIG.Common.linux-arm_eb @@ -1,7 +1,5 @@ # CONFIG.Common.linux-arm_eb # -# This file is maintained by the build community. -# # Definitions for linux-arm_eb (big endian) target builds # Sites may override these definitions in CONFIG_SITE.Common.linux-arm_eb #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.linux-arm_el b/configure/os/CONFIG.Common.linux-arm_el index e076f92ad..40701b616 100644 --- a/configure/os/CONFIG.Common.linux-arm_el +++ b/configure/os/CONFIG.Common.linux-arm_el @@ -1,7 +1,5 @@ # CONFIG.Common.linux-arm_el # -# This file is maintained by the build community. -# # Definitions for linux-arm_el (little endian) target builds # Sites may override these definitions in CONFIG_SITE.Common.linux-arm_el #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.linux-athlon b/configure/os/CONFIG.Common.linux-athlon index e392d27cc..69f20a81d 100644 --- a/configure/os/CONFIG.Common.linux-athlon +++ b/configure/os/CONFIG.Common.linux-athlon @@ -1,8 +1,5 @@ # CONFIG.Common.linux-athlon # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-athlon target builds # Sites may override these definitions in CONFIG_SITE.Common.linux-athlon #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.linux-ppc b/configure/os/CONFIG.Common.linux-ppc index 5fb9d9fb3..8eddca06e 100644 --- a/configure/os/CONFIG.Common.linux-ppc +++ b/configure/os/CONFIG.Common.linux-ppc @@ -1,7 +1,5 @@ # CONFIG.Common.linux-ppc # -# This file is maintained by the build community. -# # Definitions for linux-ppc target builds # Sites may override these definitions in CONFIG_SITE.Common.linux-ppc #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.linux-ppc64 b/configure/os/CONFIG.Common.linux-ppc64 index b2a1c8280..b2c754bad 100644 --- a/configure/os/CONFIG.Common.linux-ppc64 +++ b/configure/os/CONFIG.Common.linux-ppc64 @@ -1,8 +1,5 @@ # CONFIG.Common.linux-ppc64 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-ppc64 target builds # Sites may override these definitions in CONFIG_SITE.Common.linux-ppc64 #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.linux-x86 b/configure/os/CONFIG.Common.linux-x86 index 22b9048e3..f2b94efae 100644 --- a/configure/os/CONFIG.Common.linux-x86 +++ b/configure/os/CONFIG.Common.linux-x86 @@ -1,8 +1,5 @@ # CONFIG.Common.linux-x86 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-x86 target builds # Sites may override these definitions in CONFIG_SITE.Common.linux-x86 #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.linux-x86-debug b/configure/os/CONFIG.Common.linux-x86-debug index 9435e2f65..1a7eb09d6 100644 --- a/configure/os/CONFIG.Common.linux-x86-debug +++ b/configure/os/CONFIG.Common.linux-x86-debug @@ -1,8 +1,5 @@ # CONFIG.Common.linux-x86-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-x86 with debug compiler flags # Sites may override these definitions in CONFIG_SITE.Common.linux-x86-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.linux-x86_64 b/configure/os/CONFIG.Common.linux-x86_64 index 8bc88efb3..46b6231d4 100644 --- a/configure/os/CONFIG.Common.linux-x86_64 +++ b/configure/os/CONFIG.Common.linux-x86_64 @@ -1,8 +1,5 @@ # CONFIG.Common.linux-x86_64 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-x86_64 target builds # Sites may override these definitions in CONFIG_SITE.Common.linux-x86_64 #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.linux-x86_64-debug b/configure/os/CONFIG.Common.linux-x86_64-debug index e3145e0f3..b0a382b52 100644 --- a/configure/os/CONFIG.Common.linux-x86_64-debug +++ b/configure/os/CONFIG.Common.linux-x86_64-debug @@ -1,8 +1,5 @@ # CONFIG.Common.linux-x86_64-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-x86_64 with debug compiler flags # Sites may override these definitions in CONFIG_SITE.Common.linux-x86_64-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.linux-xscale_be b/configure/os/CONFIG.Common.linux-xscale_be index f5c9ea8ee..8597aa208 100644 --- a/configure/os/CONFIG.Common.linux-xscale_be +++ b/configure/os/CONFIG.Common.linux-xscale_be @@ -1,7 +1,5 @@ # CONFIG.Common.linux-xscale_be # -# This file is maintained by the build community. -# # Definitions for linux-xscale_be (big-endian) target builds. # This target has been tested with the MOXA UC-7408-LX Plus. diff --git a/configure/os/CONFIG.Common.linuxCommon b/configure/os/CONFIG.Common.linuxCommon index 38ed453cb..d50ce60d9 100644 --- a/configure/os/CONFIG.Common.linuxCommon +++ b/configure/os/CONFIG.Common.linuxCommon @@ -1,8 +1,5 @@ # CONFIG.Common.linuxCommon # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux target builds # Sites may override these definitions in CONFIG_SITE.Common.linuxCommon #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.solaris-sparc b/configure/os/CONFIG.Common.solaris-sparc index eff24fca5..af26b8680 100644 --- a/configure/os/CONFIG.Common.solaris-sparc +++ b/configure/os/CONFIG.Common.solaris-sparc @@ -1,8 +1,5 @@ # CONFIG.Common.solaris-sparc # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc target archs # Sites may override these definitions in CONFIG_SITE.Common.solaris-sparc #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.solaris-sparc-debug b/configure/os/CONFIG.Common.solaris-sparc-debug index 5d6a554ae..d2d58f33e 100644 --- a/configure/os/CONFIG.Common.solaris-sparc-debug +++ b/configure/os/CONFIG.Common.solaris-sparc-debug @@ -1,8 +1,5 @@ # CONFIG.Common.solaris-sparc-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc with debug compiler flags # Sites may override these definitions in CONFIG_SITE.Common.solaris-sparc-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.solaris-sparc-gnu b/configure/os/CONFIG.Common.solaris-sparc-gnu index 83427e995..d600ff391 100644 --- a/configure/os/CONFIG.Common.solaris-sparc-gnu +++ b/configure/os/CONFIG.Common.solaris-sparc-gnu @@ -1,8 +1,5 @@ # CONFIG.Common.solaris-sparc-gnu # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc gnu compiler target archs # Sites may override these definitions in CONFIG_SITE.Common.solaris-sparc-gnu #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.solaris-sparc64 b/configure/os/CONFIG.Common.solaris-sparc64 index 399e9e29a..f6da3be3f 100644 --- a/configure/os/CONFIG.Common.solaris-sparc64 +++ b/configure/os/CONFIG.Common.solaris-sparc64 @@ -1,8 +1,5 @@ # CONFIG.Common.solaris-sparc64 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc64 compiler target archs # Sites may override these definitions in CONFIG_SITE.Common.solaris-sparc64 #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.solaris-sparc64-gnu b/configure/os/CONFIG.Common.solaris-sparc64-gnu index 9e65f7c33..d82f91273 100644 --- a/configure/os/CONFIG.Common.solaris-sparc64-gnu +++ b/configure/os/CONFIG.Common.solaris-sparc64-gnu @@ -1,8 +1,5 @@ # CONFIG.Common.solaris-sparc64-gnu # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc64 gnu compiler target archs # Sites may override these definitions in CONFIG_SITE.Common.solaris-sparc64-gnu #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.solaris-x86 b/configure/os/CONFIG.Common.solaris-x86 index 3c78b0631..087cd40b2 100644 --- a/configure/os/CONFIG.Common.solaris-x86 +++ b/configure/os/CONFIG.Common.solaris-x86 @@ -1,8 +1,5 @@ # CONFIG.Common.solaris-x86 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-x86 target archs # Sites may override these definitions in CONFIG_SITE.Common.solaris-x86 #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.solaris-x86-gnu b/configure/os/CONFIG.Common.solaris-x86-gnu index 6f024289c..ea5df2b5e 100644 --- a/configure/os/CONFIG.Common.solaris-x86-gnu +++ b/configure/os/CONFIG.Common.solaris-x86-gnu @@ -1,8 +1,5 @@ # CONFIG.Common.solaris-x86-gnu # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-x86 gnu compiler target archs # Sites may override these definitions in CONFIG_SITE.Common.solaris-x86-gnu #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.solaris-x86_64 b/configure/os/CONFIG.Common.solaris-x86_64 index c6c6fa996..509fc8e7c 100644 --- a/configure/os/CONFIG.Common.solaris-x86_64 +++ b/configure/os/CONFIG.Common.solaris-x86_64 @@ -1,8 +1,5 @@ # CONFIG.Common.solaris-x86_64 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-x86_64 compiler target archs # Sites may override these definitions in CONFIG_SITE.Common.solaris-x86_64 #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.solaris-x86_64-gnu b/configure/os/CONFIG.Common.solaris-x86_64-gnu index 39b2f27ad..5bae0cee9 100644 --- a/configure/os/CONFIG.Common.solaris-x86_64-gnu +++ b/configure/os/CONFIG.Common.solaris-x86_64-gnu @@ -1,8 +1,5 @@ # CONFIG.Common.solaris-x86_64-gnu # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-x86_64 gnu compiler target archs # Sites may override these definitions in CONFIG_SITE.Common.solaris-x86_64-gnu #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-486 b/configure/os/CONFIG.Common.vxWorks-486 index b048a2be4..eaf66581a 100644 --- a/configure/os/CONFIG.Common.vxWorks-486 +++ b/configure/os/CONFIG.Common.vxWorks-486 @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-486 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-486 target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-486 #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-486-debug b/configure/os/CONFIG.Common.vxWorks-486-debug index ad0fc1b6f..3caefe1e5 100644 --- a/configure/os/CONFIG.Common.vxWorks-486-debug +++ b/configure/os/CONFIG.Common.vxWorks-486-debug @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-486-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-486-debug target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-486-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-68040 b/configure/os/CONFIG.Common.vxWorks-68040 index 025b3d87d..a41c74647 100644 --- a/configure/os/CONFIG.Common.vxWorks-68040 +++ b/configure/os/CONFIG.Common.vxWorks-68040 @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-68040 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-68040 target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-68040 #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-68040-debug b/configure/os/CONFIG.Common.vxWorks-68040-debug index dc864deef..c30a49730 100644 --- a/configure/os/CONFIG.Common.vxWorks-68040-debug +++ b/configure/os/CONFIG.Common.vxWorks-68040-debug @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-68040-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-68040-debug target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-68040-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-68040lc b/configure/os/CONFIG.Common.vxWorks-68040lc index ce26bca4d..9df4abd51 100644 --- a/configure/os/CONFIG.Common.vxWorks-68040lc +++ b/configure/os/CONFIG.Common.vxWorks-68040lc @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-68040lc # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-68040lc target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-68040lc #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-68040lc-debug b/configure/os/CONFIG.Common.vxWorks-68040lc-debug index a3478b714..149b01dcd 100644 --- a/configure/os/CONFIG.Common.vxWorks-68040lc-debug +++ b/configure/os/CONFIG.Common.vxWorks-68040lc-debug @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-68040lc-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-68040lc-debug target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-68040lc-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-68060 b/configure/os/CONFIG.Common.vxWorks-68060 index 25cd88cd2..312ab61bd 100644 --- a/configure/os/CONFIG.Common.vxWorks-68060 +++ b/configure/os/CONFIG.Common.vxWorks-68060 @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-68060 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-68060 target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-68060 #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-68060-debug b/configure/os/CONFIG.Common.vxWorks-68060-debug index 8c9b79728..282538457 100644 --- a/configure/os/CONFIG.Common.vxWorks-68060-debug +++ b/configure/os/CONFIG.Common.vxWorks-68060-debug @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-68060-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-68060-debug target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-68060-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-mpc8540 b/configure/os/CONFIG.Common.vxWorks-mpc8540 index 2b684417b..451145bde 100644 --- a/configure/os/CONFIG.Common.vxWorks-mpc8540 +++ b/configure/os/CONFIG.Common.vxWorks-mpc8540 @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-mpc8540 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-mpc8540 target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-mpc8540 #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-mpc8540-debug b/configure/os/CONFIG.Common.vxWorks-mpc8540-debug index 2f87b5365..800478729 100644 --- a/configure/os/CONFIG.Common.vxWorks-mpc8540-debug +++ b/configure/os/CONFIG.Common.vxWorks-mpc8540-debug @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-mpc8540-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-mpc8540-debug target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-mpc8540-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-mpc8548 b/configure/os/CONFIG.Common.vxWorks-mpc8548 index 1dd6a1c3b..d7a759136 100644 --- a/configure/os/CONFIG.Common.vxWorks-mpc8548 +++ b/configure/os/CONFIG.Common.vxWorks-mpc8548 @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-mpc8548 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-mpc8548 target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-mpc8548 #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-mpc8548-debug b/configure/os/CONFIG.Common.vxWorks-mpc8548-debug index d258a16e8..37ae1fa35 100644 --- a/configure/os/CONFIG.Common.vxWorks-mpc8548-debug +++ b/configure/os/CONFIG.Common.vxWorks-mpc8548-debug @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-mpc8548-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-mpc8548-debug targets. # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-mpc8548-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-pentium b/configure/os/CONFIG.Common.vxWorks-pentium index abec33c6a..9aee09ca8 100644 --- a/configure/os/CONFIG.Common.vxWorks-pentium +++ b/configure/os/CONFIG.Common.vxWorks-pentium @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-pentium # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-pentium target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-pentium #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-pentium-debug b/configure/os/CONFIG.Common.vxWorks-pentium-debug index c1e40efb9..f01fe4ce2 100644 --- a/configure/os/CONFIG.Common.vxWorks-pentium-debug +++ b/configure/os/CONFIG.Common.vxWorks-pentium-debug @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-pentium-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-pentium-debug target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-pentium-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-ppc32 b/configure/os/CONFIG.Common.vxWorks-ppc32 index a8508758b..4e208b59b 100644 --- a/configure/os/CONFIG.Common.vxWorks-ppc32 +++ b/configure/os/CONFIG.Common.vxWorks-ppc32 @@ -1,9 +1,7 @@ -# $Revision-Id$ # # Definitions for vxWorks-ppc603 targets with >32MB of RAM # Site-specific overrides go in CONFIG_SITE.Common.vxWorks-ppc603_long # -# This file is maintained by the EPICS build community. #------------------------------------------------------- # Include definitions common to all vxWorks target archs diff --git a/configure/os/CONFIG.Common.vxWorks-ppc32-debug b/configure/os/CONFIG.Common.vxWorks-ppc32-debug index bb46c7aba..5c7907f25 100644 --- a/configure/os/CONFIG.Common.vxWorks-ppc32-debug +++ b/configure/os/CONFIG.Common.vxWorks-ppc32-debug @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-ppc32-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-ppc32-debug target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-ppc32-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-ppc32sf b/configure/os/CONFIG.Common.vxWorks-ppc32sf index 0c1dccd84..26e0cc218 100644 --- a/configure/os/CONFIG.Common.vxWorks-ppc32sf +++ b/configure/os/CONFIG.Common.vxWorks-ppc32sf @@ -1,9 +1,7 @@ -# $Revision-Id$ # # Definitions for vxWorks-ppc32sf targets # Site-specific overrides go in CONFIG_SITE.Common.vxWorks-ppc32sf # -# This file is maintained by the EPICS build community. #------------------------------------------------------- # Inherit the settings from vxWorks-ppc32 diff --git a/configure/os/CONFIG.Common.vxWorks-ppc32sf-debug b/configure/os/CONFIG.Common.vxWorks-ppc32sf-debug index dd2a350bb..e8d5aea3f 100644 --- a/configure/os/CONFIG.Common.vxWorks-ppc32sf-debug +++ b/configure/os/CONFIG.Common.vxWorks-ppc32sf-debug @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-ppc32sf-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-ppc32sf-debug target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-ppc32sf-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-ppc603 b/configure/os/CONFIG.Common.vxWorks-ppc603 index 020c3ec24..3b0e73b3d 100644 --- a/configure/os/CONFIG.Common.vxWorks-ppc603 +++ b/configure/os/CONFIG.Common.vxWorks-ppc603 @@ -1,9 +1,7 @@ -# $Revision-Id$ # # Definitions for vxWorks-ppc603 targets: PPC603 and PMC8240 CPUs # Site-specific overrides go in CONFIG_SITE.Common.vxWorks-ppc603 # -# This file is maintained by the EPICS build community. #------------------------------------------------------- # Include definitions common to all vxWorks target archs diff --git a/configure/os/CONFIG.Common.vxWorks-ppc603-debug b/configure/os/CONFIG.Common.vxWorks-ppc603-debug index 6a11c5489..0e4157955 100644 --- a/configure/os/CONFIG.Common.vxWorks-ppc603-debug +++ b/configure/os/CONFIG.Common.vxWorks-ppc603-debug @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-ppc603-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-ppc603-debug target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-ppc603-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-ppc603_long b/configure/os/CONFIG.Common.vxWorks-ppc603_long index 71a9374dd..4a61eef14 100644 --- a/configure/os/CONFIG.Common.vxWorks-ppc603_long +++ b/configure/os/CONFIG.Common.vxWorks-ppc603_long @@ -1,9 +1,7 @@ -# $Revision-Id$ # # Definitions for vxWorks-ppc603 targets with >32MB of RAM # Site-specific overrides go in CONFIG_SITE.Common.vxWorks-ppc603_long # -# This file is maintained by the EPICS build community. #------------------------------------------------------- # Inherit the settings from vxWorks-ppc603 diff --git a/configure/os/CONFIG.Common.vxWorks-ppc603_long-debug b/configure/os/CONFIG.Common.vxWorks-ppc603_long-debug index 20d60a43a..7eab4376f 100644 --- a/configure/os/CONFIG.Common.vxWorks-ppc603_long-debug +++ b/configure/os/CONFIG.Common.vxWorks-ppc603_long-debug @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-ppc603_long-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-ppc603_long-debug target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-ppc603_long-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-ppc604 b/configure/os/CONFIG.Common.vxWorks-ppc604 index 7bb94300f..45115a876 100644 --- a/configure/os/CONFIG.Common.vxWorks-ppc604 +++ b/configure/os/CONFIG.Common.vxWorks-ppc604 @@ -1,9 +1,7 @@ -# $Revision-Id$ # # Definitions for vxWorks-ppc604 targets: PPC604, MPC7xx and MPC74xx CPUs # Site-specific overrides go in CONFIG_SITE.Common.vxWorks-ppc604 # -# This file is maintained by the EPICS build community. #------------------------------------------------------- # Include definitions common to all vxWorks target archs diff --git a/configure/os/CONFIG.Common.vxWorks-ppc604-debug b/configure/os/CONFIG.Common.vxWorks-ppc604-debug index b476071c4..ac66b68aa 100644 --- a/configure/os/CONFIG.Common.vxWorks-ppc604-debug +++ b/configure/os/CONFIG.Common.vxWorks-ppc604-debug @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-ppc604-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-ppc604-debug target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-ppc604-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-ppc604_altivec b/configure/os/CONFIG.Common.vxWorks-ppc604_altivec index 540b4528a..d0becf2f7 100644 --- a/configure/os/CONFIG.Common.vxWorks-ppc604_altivec +++ b/configure/os/CONFIG.Common.vxWorks-ppc604_altivec @@ -1,9 +1,7 @@ -# $Revision-Id$ # # Definitions for vxWorks-ppc604 targets with an Altivec and >32MB of RAM. # Site-specific overrides go in CONFIG_SITE.Common.vxWorks-ppc604_altivec # -# This file is maintained by the EPICS build community. #------------------------------------------------------- # Inherit the settings from vxWorks-ppc604_long diff --git a/configure/os/CONFIG.Common.vxWorks-ppc604_altivec-debug b/configure/os/CONFIG.Common.vxWorks-ppc604_altivec-debug index 0a74858fd..b7e1307a5 100644 --- a/configure/os/CONFIG.Common.vxWorks-ppc604_altivec-debug +++ b/configure/os/CONFIG.Common.vxWorks-ppc604_altivec-debug @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-ppc604_altivec-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-ppc604_altivec-debug target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-ppc604_altivec-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorks-ppc604_long b/configure/os/CONFIG.Common.vxWorks-ppc604_long index 41261381f..a90cc897b 100644 --- a/configure/os/CONFIG.Common.vxWorks-ppc604_long +++ b/configure/os/CONFIG.Common.vxWorks-ppc604_long @@ -1,9 +1,7 @@ -# $Revision-Id$ # # Definitions for vxWorks-ppc604 targets with >32MB of RAM # Site-specific overrides go in CONFIG_SITE.Common.vxWorks-ppc604_long # -# This file is maintained by the EPICS build community. #------------------------------------------------------- # Inherit the settings from vxWorks-ppc604 diff --git a/configure/os/CONFIG.Common.vxWorks-ppc604_long-debug b/configure/os/CONFIG.Common.vxWorks-ppc604_long-debug index 7831bb8b5..fa6bfe8f8 100644 --- a/configure/os/CONFIG.Common.vxWorks-ppc604_long-debug +++ b/configure/os/CONFIG.Common.vxWorks-ppc604_long-debug @@ -1,8 +1,5 @@ # CONFIG.Common.vxWorks-ppc604_long-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for vxWorks-ppc604_long-debug target archs # Sites may override these definitions in CONFIG_SITE.Common.vxWorks-ppc604_long-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.vxWorksCommon b/configure/os/CONFIG.Common.vxWorksCommon index b5cea700c..1ad5b5808 100644 --- a/configure/os/CONFIG.Common.vxWorksCommon +++ b/configure/os/CONFIG.Common.vxWorksCommon @@ -1,7 +1,5 @@ # CONFIG.Common.vxWorksCommon # -# $Revision-Id$ -# # Definitions for vxWorks target archs # Override these definitions in CONFIG_SITE.Common.vxWorksCommon # or CONFIG_SITE..vxWorksCommon diff --git a/configure/os/CONFIG.Common.win32-x86-mingw b/configure/os/CONFIG.Common.win32-x86-mingw index 2ed409c23..936b1d954 100644 --- a/configure/os/CONFIG.Common.win32-x86-mingw +++ b/configure/os/CONFIG.Common.win32-x86-mingw @@ -1,8 +1,5 @@ # CONFIG.Common.win32-x86-mingw # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for win32-x86-mingw target builds # Sites may override these definitions in CONFIG_SITE.Common.win32-x86-mingw #------------------------------------------------------- diff --git a/configure/os/CONFIG.Common.windows-x64-mingw b/configure/os/CONFIG.Common.windows-x64-mingw index b2943af16..c2623bd39 100644 --- a/configure/os/CONFIG.Common.windows-x64-mingw +++ b/configure/os/CONFIG.Common.windows-x64-mingw @@ -1,8 +1,5 @@ # CONFIG.Common.windows-x64-mingw # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for windows-x64-mingw target builds # Sites may override these definitions in CONFIG_SITE.Common.windows-x64-mingw #------------------------------------------------------- diff --git a/configure/os/CONFIG.UnixCommon.Common b/configure/os/CONFIG.UnixCommon.Common index 4f02604ee..026a5234d 100644 --- a/configure/os/CONFIG.UnixCommon.Common +++ b/configure/os/CONFIG.UnixCommon.Common @@ -1,8 +1,5 @@ # CONFIG.UnixCommon.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions common to unix hosts # Sites may override these definitions in CONFIG_SITE.UnixCommon.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.cygwin-x86.Common b/configure/os/CONFIG.cygwin-x86.Common index d0e59a618..1fffc7b4c 100644 --- a/configure/os/CONFIG.cygwin-x86.Common +++ b/configure/os/CONFIG.cygwin-x86.Common @@ -1,8 +1,5 @@ # CONFIG.cygwin-x86.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for cygwin-x86 host archs # Sites may override these definitions in CONFIG_SITE.cygwin-x86.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.cygwin-x86.cygwin-x86 b/configure/os/CONFIG.cygwin-x86.cygwin-x86 index 37f365249..965a524aa 100644 --- a/configure/os/CONFIG.cygwin-x86.cygwin-x86 +++ b/configure/os/CONFIG.cygwin-x86.cygwin-x86 @@ -1,7 +1,5 @@ # CONFIG.cygwin-x86.cygwin-x86 # -# $Revision-Id$ -# # Definitions for cygwin-x86 host - cygwin-x86 target builds # Sites may override these definitions in CONFIG_SITE.cygwin-x86.cygwin-x86 #------------------------------------------------------- diff --git a/configure/os/CONFIG.cygwin-x86.cygwin-x86-debug b/configure/os/CONFIG.cygwin-x86.cygwin-x86-debug index 67f380a9d..d51734542 100644 --- a/configure/os/CONFIG.cygwin-x86.cygwin-x86-debug +++ b/configure/os/CONFIG.cygwin-x86.cygwin-x86-debug @@ -1,8 +1,5 @@ # CONFIG.cygwin-x86.cygwin-x86-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for cygwin-x86 host - cygwin-x86-debug target build # Sites may override these definitions in CONFIG_SITE.cygwin-x86.cygwin-x86-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.cygwin-x86_64.Common b/configure/os/CONFIG.cygwin-x86_64.Common index ff6c3e2c8..de43b592e 100644 --- a/configure/os/CONFIG.cygwin-x86_64.Common +++ b/configure/os/CONFIG.cygwin-x86_64.Common @@ -1,10 +1,7 @@ -# CONFIG.cygwin-x86_64.Common -# -# $Revision-Id$ -# This file is maintained by the build community. -# -# Definitions for cygwin-x86_64 host archs -# Sites may override these definitions in CONFIG_SITE.cygwin-x86_64.Common -#------------------------------------------------------- - -include $(CONFIG)/os/CONFIG.cygwin-x86.Common +# CONFIG.cygwin-x86_64.Common +# +# Definitions for cygwin-x86_64 host archs +# Sites may override these definitions in CONFIG_SITE.cygwin-x86_64.Common +#------------------------------------------------------- + +include $(CONFIG)/os/CONFIG.cygwin-x86.Common diff --git a/configure/os/CONFIG.cygwin-x86_64.cygwin-x86_64 b/configure/os/CONFIG.cygwin-x86_64.cygwin-x86_64 index 20a52a6d8..0e9a96f01 100644 --- a/configure/os/CONFIG.cygwin-x86_64.cygwin-x86_64 +++ b/configure/os/CONFIG.cygwin-x86_64.cygwin-x86_64 @@ -1,11 +1,9 @@ -# CONFIG.cygwin-x86_64.cygwin-x86_64 -# -# $Revision-Id$ -# -# Definitions for cygwin-x86_64 host - cygwin-x86_64 target builds -# Sites may override these definitions in CONFIG_SITE.cygwin-x86_64.cygwin-x86_64 -#------------------------------------------------------- - -# Include common gnu compiler definitions -include $(CONFIG)/os/CONFIG.cygwin-x86.cygwin-x86 - +# CONFIG.cygwin-x86_64.cygwin-x86_64 +# +# Definitions for cygwin-x86_64 host - cygwin-x86_64 target builds +# Sites may override these definitions in CONFIG_SITE.cygwin-x86_64.cygwin-x86_64 +#------------------------------------------------------- + +# Include common gnu compiler definitions +include $(CONFIG)/os/CONFIG.cygwin-x86.cygwin-x86 + diff --git a/configure/os/CONFIG.darwin-ppc.Common b/configure/os/CONFIG.darwin-ppc.Common index 925d381f2..ac176878f 100644 --- a/configure/os/CONFIG.darwin-ppc.Common +++ b/configure/os/CONFIG.darwin-ppc.Common @@ -1,8 +1,5 @@ # CONFIG.darwin-ppc.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for darwin-ppc host builds # Sites may override these definitions in CONFIG_SITE.darwin-ppc.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.darwin-ppc.darwin-ppc-debug b/configure/os/CONFIG.darwin-ppc.darwin-ppc-debug index 47ad7f818..985052031 100644 --- a/configure/os/CONFIG.darwin-ppc.darwin-ppc-debug +++ b/configure/os/CONFIG.darwin-ppc.darwin-ppc-debug @@ -1,8 +1,5 @@ # CONFIG.darwin-ppc.darwin-ppc-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for darwin-ppc host - darwin-ppc-debug target build with debug compiler flags # Sites may override these definitions in CONFIG_SITE.darwin-ppc.darwin-ppc-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.darwin-ppcx86.Common b/configure/os/CONFIG.darwin-ppcx86.Common index f4155c76d..749835ced 100644 --- a/configure/os/CONFIG.darwin-ppcx86.Common +++ b/configure/os/CONFIG.darwin-ppcx86.Common @@ -1,8 +1,5 @@ # CONFIG.darwin-ppcx86.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for Darwin universal PowerPC + x86 host builds # Sites may override these definitions in CONFIG_SITE.darwin-ppcx86.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.darwin-x86.Common b/configure/os/CONFIG.darwin-x86.Common index 1e02a0b2b..e779f7dc1 100644 --- a/configure/os/CONFIG.darwin-x86.Common +++ b/configure/os/CONFIG.darwin-x86.Common @@ -1,8 +1,5 @@ # CONFIG.darwin-x86.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for darwin-x86 host builds # Sites may override these definitions in CONFIG_SITE.darwin-x86.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.darwin-x86.darwin-x86-debug b/configure/os/CONFIG.darwin-x86.darwin-x86-debug index 9a551540a..3bf4db63f 100644 --- a/configure/os/CONFIG.darwin-x86.darwin-x86-debug +++ b/configure/os/CONFIG.darwin-x86.darwin-x86-debug @@ -1,8 +1,5 @@ # CONFIG.darwin-x86.darwin-x86-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for darwin-x86 host - darwin-x86-debug target build with debug compiler flags # Sites may override these definitions in CONFIG_SITE.darwin-x86.darwin-x86-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.darwinCommon.darwinCommon b/configure/os/CONFIG.darwinCommon.darwinCommon index fc760c0f2..56b539545 100644 --- a/configure/os/CONFIG.darwinCommon.darwinCommon +++ b/configure/os/CONFIG.darwinCommon.darwinCommon @@ -1,8 +1,5 @@ # CONFIG.darwinCommon.darwinCommon # -# $Revision-Id$ -# This file is maintained by the build community. -# # Common definitions for darwin builds # Sites may override these definitions in CONFIG_SITE.darwinCommon.darwinCommon #------------------------------------------------------- diff --git a/configure/os/CONFIG.freebsd-x86.Common b/configure/os/CONFIG.freebsd-x86.Common index d9b2ff892..1bd10de2d 100644 --- a/configure/os/CONFIG.freebsd-x86.Common +++ b/configure/os/CONFIG.freebsd-x86.Common @@ -1,6 +1,3 @@ -# $Revision-Id$ -# -# This file is maintained by the build community. # # Definitions for freebsd host builds # Sites may override these definitions in CONFIG_SITE.freebsd-x86.Common diff --git a/configure/os/CONFIG.freebsd-x86.freebsd-x86 b/configure/os/CONFIG.freebsd-x86.freebsd-x86 index b70c48388..b5e2bcff4 100644 --- a/configure/os/CONFIG.freebsd-x86.freebsd-x86 +++ b/configure/os/CONFIG.freebsd-x86.freebsd-x86 @@ -1,4 +1,3 @@ -# $Revision-Id$ # # Definitions for freebsd-x86 host - freebsd-x86 target builds # Sites may override these definitions in CONFIG_SITE.freebsd-x86.freebsd-x86 diff --git a/configure/os/CONFIG.freebsd-x86_64.Common b/configure/os/CONFIG.freebsd-x86_64.Common index 9e3ecac5c..397bf12f6 100644 --- a/configure/os/CONFIG.freebsd-x86_64.Common +++ b/configure/os/CONFIG.freebsd-x86_64.Common @@ -1,6 +1,3 @@ -# $Revision-Id$ -# -# This file is maintained by the build community. # # Definitions for freebsd host builds # Sites may override these definitions in CONFIG_SITE.freebsd-x86_64.Common diff --git a/configure/os/CONFIG.freebsd-x86_64.freebsd-x86_64 b/configure/os/CONFIG.freebsd-x86_64.freebsd-x86_64 index dde69899a..dcc8888ce 100644 --- a/configure/os/CONFIG.freebsd-x86_64.freebsd-x86_64 +++ b/configure/os/CONFIG.freebsd-x86_64.freebsd-x86_64 @@ -1,4 +1,3 @@ -# $Revision-Id$ # # Definitions for freebsd-x86_64 host - freebsd-x86_64 target builds # Sites may override these definitions in CONFIG_SITE.freebsd-x86_64.freebsd-x86_64 diff --git a/configure/os/CONFIG.linux-386.Common b/configure/os/CONFIG.linux-386.Common index e37483163..9a3633bdf 100644 --- a/configure/os/CONFIG.linux-386.Common +++ b/configure/os/CONFIG.linux-386.Common @@ -1,8 +1,5 @@ # CONFIG.linux-386.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-386 host builds # Sites may override these definitions in CONFIG_SITE.linux-386.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-386.linux-386 b/configure/os/CONFIG.linux-386.linux-386 index c71e4c136..f65ac46b7 100644 --- a/configure/os/CONFIG.linux-386.linux-386 +++ b/configure/os/CONFIG.linux-386.linux-386 @@ -1,7 +1,5 @@ # CONFIG.linux-386.linux-386 # -# $Revision-Id$ -# # Definitions for linux-386 host - linux-386 target builds # Sites may override these definitions in CONFIG_SITE.linux-386.linux-386 #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-486.Common b/configure/os/CONFIG.linux-486.Common index f2aa5bd0f..c151b3218 100644 --- a/configure/os/CONFIG.linux-486.Common +++ b/configure/os/CONFIG.linux-486.Common @@ -1,8 +1,5 @@ # CONFIG.linux-486.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-486 host builds # Sites may override these definitions in CONFIG_SITE.linux-486.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-486.linux-486 b/configure/os/CONFIG.linux-486.linux-486 index 84f28d1fc..551cacc29 100644 --- a/configure/os/CONFIG.linux-486.linux-486 +++ b/configure/os/CONFIG.linux-486.linux-486 @@ -1,7 +1,5 @@ # CONFIG.linux-486.linux-486 # -# $Revision-Id$ -# # Definitions for linux-486 host - linux-486 target builds # Sites may override these definitions in CONFIG_SITE.linux-486.linux-486 #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-586.Common b/configure/os/CONFIG.linux-586.Common index 3c0e5e1a6..43463e8a0 100644 --- a/configure/os/CONFIG.linux-586.Common +++ b/configure/os/CONFIG.linux-586.Common @@ -1,8 +1,5 @@ # CONFIG.linux-586.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-586 host builds # Sites may override these definitions in CONFIG_SITE.linux-586.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-586.linux-586 b/configure/os/CONFIG.linux-586.linux-586 index 882ef580f..990bfad74 100644 --- a/configure/os/CONFIG.linux-586.linux-586 +++ b/configure/os/CONFIG.linux-586.linux-586 @@ -1,7 +1,5 @@ # CONFIG.linux-586.linux-586 # -# $Revision-Id$ -# # Definitions for linux-586 host - linux-586 target builds # Sites may override these definitions in CONFIG_SITE.linux-586.linux-586 #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-686.Common b/configure/os/CONFIG.linux-686.Common index b17268457..f36cddeac 100644 --- a/configure/os/CONFIG.linux-686.Common +++ b/configure/os/CONFIG.linux-686.Common @@ -1,8 +1,5 @@ # CONFIG.linux-686.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-686 host builds # Sites may override these definitions in CONFIG_SITE.linux-686.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-686.linux-686 b/configure/os/CONFIG.linux-686.linux-686 index 602db2522..e4195a40a 100644 --- a/configure/os/CONFIG.linux-686.linux-686 +++ b/configure/os/CONFIG.linux-686.linux-686 @@ -1,7 +1,5 @@ # CONFIG.linux-686.linux-686 # -# $Revision-Id$ -# # Definitions for linux-686 host - linux-686 target builds # Sites may override these definitions in CONFIG_SITE.linux-686.linux-686 #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-arm-debug.Common b/configure/os/CONFIG.linux-arm-debug.Common index 16ea60420..66dd0c89e 100644 --- a/configure/os/CONFIG.linux-arm-debug.Common +++ b/configure/os/CONFIG.linux-arm-debug.Common @@ -1,8 +1,5 @@ # CONFIG.linux-arm-debug.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-arm-debug host builds # Override these settings in CONFIG_SITE.linux-arm-debug.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-arm-debug.linux-arm-debug b/configure/os/CONFIG.linux-arm-debug.linux-arm-debug index 2567008aa..6e38378ee 100644 --- a/configure/os/CONFIG.linux-arm-debug.linux-arm-debug +++ b/configure/os/CONFIG.linux-arm-debug.linux-arm-debug @@ -1,8 +1,5 @@ # CONFIG.linux-arm-debug.linux-arm-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-arm-debug host and target build # Override these settings in CONFIG_SITE.linux-arm-debug.linux-arm-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-arm.Common b/configure/os/CONFIG.linux-arm.Common index 788f594d7..9ad637827 100644 --- a/configure/os/CONFIG.linux-arm.Common +++ b/configure/os/CONFIG.linux-arm.Common @@ -1,7 +1,5 @@ # CONFIG.linux-arm.Common # -# $Revision-Id$ -# # Definitions for linux-arm host builds # Sites may override these definitions in CONFIG_SITE.linux-arm.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-arm.linux-arm b/configure/os/CONFIG.linux-arm.linux-arm index e52660f14..2e7687d0a 100644 --- a/configure/os/CONFIG.linux-arm.linux-arm +++ b/configure/os/CONFIG.linux-arm.linux-arm @@ -1,7 +1,5 @@ # CONFIG.linux-arm.linux-arm # -# $Revision-Id$ -# # Definitions for native linux-arm builds # Sites may override these definitions in CONFIG_SITE.linux-arm.linux-arm #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-arm.linux-arm-debug b/configure/os/CONFIG.linux-arm.linux-arm-debug index d6e86be18..0fb2fca27 100644 --- a/configure/os/CONFIG.linux-arm.linux-arm-debug +++ b/configure/os/CONFIG.linux-arm.linux-arm-debug @@ -1,8 +1,5 @@ # CONFIG.linux-arm.linux-arm-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-arm host - linux-arm-debug target build # Override these settings in CONFIG_SITE.linux-arm.linux-arm-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-ppc.Common b/configure/os/CONFIG.linux-ppc.Common index f93334210..377a25f08 100644 --- a/configure/os/CONFIG.linux-ppc.Common +++ b/configure/os/CONFIG.linux-ppc.Common @@ -1,7 +1,5 @@ # CONFIG.linux-ppc.Common # -# This file is maintained by the build community. -# # Definitions for linux-ppc host builds # Sites may override these definitions in CONFIG_SITE.linux-ppc.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-ppc.linux-ppc b/configure/os/CONFIG.linux-ppc.linux-ppc index 3c437df59..5010d1bc3 100644 --- a/configure/os/CONFIG.linux-ppc.linux-ppc +++ b/configure/os/CONFIG.linux-ppc.linux-ppc @@ -1,6 +1,5 @@ # CONFIG.linux-ppc.linux-ppc # -# # Definitions for linux-ppc host - linux-ppc target builds # Sites may override these definitions in CONFIG_SITE.linux-ppc.linux-ppc #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-ppc64.Common b/configure/os/CONFIG.linux-ppc64.Common index 6d1977184..516cc4ffe 100644 --- a/configure/os/CONFIG.linux-ppc64.Common +++ b/configure/os/CONFIG.linux-ppc64.Common @@ -1,8 +1,5 @@ # CONFIG.linux-ppc64.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-ppc64 host builds # Sites may override these definitions in CONFIG_SITE.linux-ppc64.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-ppc64.linux-ppc64 b/configure/os/CONFIG.linux-ppc64.linux-ppc64 index a866f5a74..cfd00a88f 100644 --- a/configure/os/CONFIG.linux-ppc64.linux-ppc64 +++ b/configure/os/CONFIG.linux-ppc64.linux-ppc64 @@ -1,7 +1,5 @@ # CONFIG.linux-ppc64.linux-ppc64 # -# $Revision-Id$ -# # Definitions for linux-ppc64 host - linux-ppc64 target builds # Sites may override these definitions in CONFIG_SITE.linux-ppc64.linux-ppc64 #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-x86-debug.Common b/configure/os/CONFIG.linux-x86-debug.Common index b16b70287..800edb394 100644 --- a/configure/os/CONFIG.linux-x86-debug.Common +++ b/configure/os/CONFIG.linux-x86-debug.Common @@ -1,8 +1,5 @@ # CONFIG.linux-x86-debug.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-x86 debug with debug compiler flags # Sites may override these definitions in CONFIG_SITE.linux-x86-debug.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-x86-debug.linux-x86-debug b/configure/os/CONFIG.linux-x86-debug.linux-x86-debug index 0b0e0f4e8..737a116f3 100644 --- a/configure/os/CONFIG.linux-x86-debug.linux-x86-debug +++ b/configure/os/CONFIG.linux-x86-debug.linux-x86-debug @@ -1,8 +1,5 @@ # CONFIG.linux-x86-debug.linux-x86-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-x86 host - linux-x86 target build with debug compiler flags # Sites may override these definitions in CONFIG_SITE.linux-x86-debug.linux-x86-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-x86.Common b/configure/os/CONFIG.linux-x86.Common index 16aa54986..4a525551e 100644 --- a/configure/os/CONFIG.linux-x86.Common +++ b/configure/os/CONFIG.linux-x86.Common @@ -1,8 +1,5 @@ # CONFIG.linux-x86.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-x86 host builds # Sites may override these definitions in CONFIG_SITE.linux-x86.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-x86.linux-x86 b/configure/os/CONFIG.linux-x86.linux-x86 index 6414b5ab0..f6a79241a 100644 --- a/configure/os/CONFIG.linux-x86.linux-x86 +++ b/configure/os/CONFIG.linux-x86.linux-x86 @@ -1,7 +1,5 @@ # CONFIG.linux-x86.linux-x86 # -# $Revision-Id$ -# # Definitions for linux-x86 host - linux-x86 target builds # Sites may override these definitions in CONFIG_SITE.linux-x86.linux-x86 #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-x86.linux-x86-debug b/configure/os/CONFIG.linux-x86.linux-x86-debug index 17b4f176e..dc71572d3 100644 --- a/configure/os/CONFIG.linux-x86.linux-x86-debug +++ b/configure/os/CONFIG.linux-x86.linux-x86-debug @@ -1,8 +1,5 @@ # CONFIG.linux-x86.linux-x86-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-x86 host - linux-x86-debug target build with debug compiler flags # Sites may override these definitions in CONFIG_SITE.linux-x86.linux-x86-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-x86.win32-x86-mingw b/configure/os/CONFIG.linux-x86.win32-x86-mingw index 297030765..150f13864 100644 --- a/configure/os/CONFIG.linux-x86.win32-x86-mingw +++ b/configure/os/CONFIG.linux-x86.win32-x86-mingw @@ -20,5 +20,5 @@ LOADABLE_SHRLIB_LDFLAGS = -shared \ # Don't link with gcc library GNU_LDLIBS_YES = -# Link with winsock2 -OP_SYS_LDLIBS = -lws2_32 +# Link with system libraries +OP_SYS_LDLIBS = -lws2_32 -ladvapi32 -luser32 -lkernel32 -lwinmm diff --git a/configure/os/CONFIG.linux-x86.windows-x64-mingw b/configure/os/CONFIG.linux-x86.windows-x64-mingw index 3b5ba18b4..3becd0045 100644 --- a/configure/os/CONFIG.linux-x86.windows-x64-mingw +++ b/configure/os/CONFIG.linux-x86.windows-x64-mingw @@ -22,7 +22,3 @@ GNU_LDLIBS_YES = # Link with winsock2 OP_SYS_LDLIBS = -lws2_32 - -# Use static compiler-support libraries -OP_SYS_LDFLAGS += -static-libgcc -static-libstdc++ -# There is no compiler flag for static libwinpthread diff --git a/configure/os/CONFIG.linux-x86_64-debug.Common b/configure/os/CONFIG.linux-x86_64-debug.Common index da7348ad1..70bdf4e4b 100644 --- a/configure/os/CONFIG.linux-x86_64-debug.Common +++ b/configure/os/CONFIG.linux-x86_64-debug.Common @@ -1,8 +1,5 @@ # CONFIG.linux-x86_64-debug.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-x86_64 debug with debug compiler flags # Sites may override these definitions in CONFIG_SITE.linux-x86_64-debug.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-x86_64-debug.linux-x86_64-debug b/configure/os/CONFIG.linux-x86_64-debug.linux-x86_64-debug index 8a935237d..6f7980235 100644 --- a/configure/os/CONFIG.linux-x86_64-debug.linux-x86_64-debug +++ b/configure/os/CONFIG.linux-x86_64-debug.linux-x86_64-debug @@ -1,8 +1,5 @@ # CONFIG.linux-x86_64-debug.linux-x86_64-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-x86_64 host - linux-x86_64 target build with debug compiler flags # Sites may override these definitions in CONFIG_SITE.linux-x86_64-debug.linux-x86_64-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-x86_64.Common b/configure/os/CONFIG.linux-x86_64.Common index 6973d95bb..22cab92ef 100644 --- a/configure/os/CONFIG.linux-x86_64.Common +++ b/configure/os/CONFIG.linux-x86_64.Common @@ -1,8 +1,5 @@ # CONFIG.linux-x86_64.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-x86_64 host builds # Sites may override these definitions in CONFIG_SITE.linux-x86_64.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-x86_64.linux-x86_64 b/configure/os/CONFIG.linux-x86_64.linux-x86_64 index 34e4a2eef..4466a7edb 100644 --- a/configure/os/CONFIG.linux-x86_64.linux-x86_64 +++ b/configure/os/CONFIG.linux-x86_64.linux-x86_64 @@ -1,7 +1,5 @@ # CONFIG.linux-x86_64.linux-x86_64 # -# $Revision-Id$ -# # Definitions for linux-x86_64 host - linux-x86_64 target builds # Sites may override these definitions in CONFIG_SITE.linux-x86_64.linux-x86_64 #------------------------------------------------------- diff --git a/configure/os/CONFIG.linux-x86_64.linux-x86_64-debug b/configure/os/CONFIG.linux-x86_64.linux-x86_64-debug index 220b1d2de..8c804ee08 100644 --- a/configure/os/CONFIG.linux-x86_64.linux-x86_64-debug +++ b/configure/os/CONFIG.linux-x86_64.linux-x86_64-debug @@ -1,8 +1,5 @@ # CONFIG.linux-x86_64.linux-x86_64-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for linux-x86_64 host - linux-x86_64-debug target build with debug compiler flags # Sites may override these definitions in CONFIG_SITE.linux-x86_64.linux-x86_64-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc-debug.Common b/configure/os/CONFIG.solaris-sparc-debug.Common index d148a238f..256a72118 100644 --- a/configure/os/CONFIG.solaris-sparc-debug.Common +++ b/configure/os/CONFIG.solaris-sparc-debug.Common @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc-debug.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc debug with debug compiler flags # Sites may override these definitions in CONFIG_SITE.solaris-sparc-debug.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc-debug.solaris-sparc-debug b/configure/os/CONFIG.solaris-sparc-debug.solaris-sparc-debug index c2c309174..9510bc6fa 100644 --- a/configure/os/CONFIG.solaris-sparc-debug.solaris-sparc-debug +++ b/configure/os/CONFIG.solaris-sparc-debug.solaris-sparc-debug @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc-debug.solaris-sparc-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc host - solaris-sparc target build with debug compiler flags # Sites may override these definitions in CONFIG_SITE.solaris-sparc-debug.solaris-sparc-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc-gnu.Common b/configure/os/CONFIG.solaris-sparc-gnu.Common index d8dd3d0d5..1ec37610f 100644 --- a/configure/os/CONFIG.solaris-sparc-gnu.Common +++ b/configure/os/CONFIG.solaris-sparc-gnu.Common @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc-gnu.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc gnu compiler host builds # Sites may override these definitions in CONFIG_SITE.solaris-sparc-gnu.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc-gnu.solaris-sparc-gnu b/configure/os/CONFIG.solaris-sparc-gnu.solaris-sparc-gnu index ebdc042a8..03476b833 100644 --- a/configure/os/CONFIG.solaris-sparc-gnu.solaris-sparc-gnu +++ b/configure/os/CONFIG.solaris-sparc-gnu.solaris-sparc-gnu @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc-gnu.solaris-sparc-gnu # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc gnu compiler host - solaris-sparc gnu compiler target builds # Sites may override these definitions in CONFIG_SITE.solaris-sparc-gnu.solaris-sparc-gnu #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc.Common b/configure/os/CONFIG.solaris-sparc.Common index 73208c3b8..3c5fb044d 100644 --- a/configure/os/CONFIG.solaris-sparc.Common +++ b/configure/os/CONFIG.solaris-sparc.Common @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc host archs # Sites may override these definitions in CONFIG_SITE.solaris-sparc.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc.solaris-sparc b/configure/os/CONFIG.solaris-sparc.solaris-sparc index 99b08ef3c..de625aed1 100644 --- a/configure/os/CONFIG.solaris-sparc.solaris-sparc +++ b/configure/os/CONFIG.solaris-sparc.solaris-sparc @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc.solaris-sparc # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc host - solaris-sparc target build # Sites may override these definitions in CONFIG_SITE.solaris-sparc.solaris-sparc #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc.solaris-sparc-debug b/configure/os/CONFIG.solaris-sparc.solaris-sparc-debug index 433b4aea4..5578bcd66 100644 --- a/configure/os/CONFIG.solaris-sparc.solaris-sparc-debug +++ b/configure/os/CONFIG.solaris-sparc.solaris-sparc-debug @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc.solaris-sparc-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc host - solaris-sparc-debug target build with debug compiler flags # Sites may override these definitions in CONFIG_SITE.solaris-sparc.solaris-sparc-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc.solaris-sparc-gnu b/configure/os/CONFIG.solaris-sparc.solaris-sparc-gnu index 0b886af65..423d3dc4b 100644 --- a/configure/os/CONFIG.solaris-sparc.solaris-sparc-gnu +++ b/configure/os/CONFIG.solaris-sparc.solaris-sparc-gnu @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc.solaris-sparc-gnu # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc host - solaris-sparc-gnu target build with gnu compiler # Sites may override these definitions in CONFIG_SITE.solaris-sparc.solaris-sparc-gnu #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc.solaris-sparc64 b/configure/os/CONFIG.solaris-sparc.solaris-sparc64 index 7c0929786..06c9ffa17 100644 --- a/configure/os/CONFIG.solaris-sparc.solaris-sparc64 +++ b/configure/os/CONFIG.solaris-sparc.solaris-sparc64 @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc.solaris-sparc64 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc host - solaris-sparc64 target build with Sun compiler # Sites may override these definitions in CONFIG_SITE.solaris-sparc.solaris-sparc64 #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc.solaris-sparc64-gnu b/configure/os/CONFIG.solaris-sparc.solaris-sparc64-gnu index 4a4b1352c..12c33de2b 100644 --- a/configure/os/CONFIG.solaris-sparc.solaris-sparc64-gnu +++ b/configure/os/CONFIG.solaris-sparc.solaris-sparc64-gnu @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc.solaris-sparc64-gnu # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc host - solaris-sparc64-gnu target build with gnu compiler # Sites may override these definitions in CONFIG_SITE.solaris-sparc.solaris-sparc64-gnu #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc64-gnu.Common b/configure/os/CONFIG.solaris-sparc64-gnu.Common index 7e004f5c0..a8e281af2 100644 --- a/configure/os/CONFIG.solaris-sparc64-gnu.Common +++ b/configure/os/CONFIG.solaris-sparc64-gnu.Common @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc64-gnu.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc64 gnu compiler host builds # Sites may override these definitions in CONFIG_SITE.solaris-sparc64-gnu.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc64-gnu.solaris-sparc64-gnu b/configure/os/CONFIG.solaris-sparc64-gnu.solaris-sparc64-gnu index 26a30d1a2..cbc921cd1 100644 --- a/configure/os/CONFIG.solaris-sparc64-gnu.solaris-sparc64-gnu +++ b/configure/os/CONFIG.solaris-sparc64-gnu.solaris-sparc64-gnu @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc64-gnu.solaris-sparc64-gnu # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc64 gnu compiler host - solaris-sparc64 gnu compiler target builds # Sites may override these definitions in CONFIG_SITE.solaris-sparc64-gnu.solaris-sparc64-gnu #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc64.Common b/configure/os/CONFIG.solaris-sparc64.Common index e62d51750..f87e58156 100644 --- a/configure/os/CONFIG.solaris-sparc64.Common +++ b/configure/os/CONFIG.solaris-sparc64.Common @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc64.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc64 Sun compiler host builds # Sites may override these definitions in CONFIG_SITE.solaris-sparc64.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc64.solaris-sparc64 b/configure/os/CONFIG.solaris-sparc64.solaris-sparc64 index 451ecde08..b862a3153 100644 --- a/configure/os/CONFIG.solaris-sparc64.solaris-sparc64 +++ b/configure/os/CONFIG.solaris-sparc64.solaris-sparc64 @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc64.solaris-sparc64 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc64 compiler host - solaris-sparc64 compiler target builds # Sites may override these definitions in CONFIG_SITE.solaris-sparc64.solaris-sparc64 #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-sparc64.solaris-sparc64-debug b/configure/os/CONFIG.solaris-sparc64.solaris-sparc64-debug index ca32026e1..edbb733fc 100644 --- a/configure/os/CONFIG.solaris-sparc64.solaris-sparc64-debug +++ b/configure/os/CONFIG.solaris-sparc64.solaris-sparc64-debug @@ -1,8 +1,5 @@ # CONFIG.solaris-sparc64.solaris-sparc64-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-sparc64 host - solaris-sparc64-debug target build with debug compiler flags # Sites may override these definitions in CONFIG_SITE.solaris-sparc64.solaris-sparc64-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-x86-gnu.Common b/configure/os/CONFIG.solaris-x86-gnu.Common index d6c0749dc..e8111548f 100644 --- a/configure/os/CONFIG.solaris-x86-gnu.Common +++ b/configure/os/CONFIG.solaris-x86-gnu.Common @@ -1,8 +1,5 @@ # CONFIG.solaris-x86-gnu.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-x86 gnu compiler host builds # Sites may override these definitions in CONFIG_SITE.solaris-x86-gnu.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-x86-gnu.solaris-x86-gnu b/configure/os/CONFIG.solaris-x86-gnu.solaris-x86-gnu index 208c596a0..1c2c43826 100644 --- a/configure/os/CONFIG.solaris-x86-gnu.solaris-x86-gnu +++ b/configure/os/CONFIG.solaris-x86-gnu.solaris-x86-gnu @@ -1,8 +1,5 @@ # CONFIG.solaris-x86-gnu.solaris-x86-gnu # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-x86 gnu compiler host - solaris-x86 gnu compiler target builds # Sites may override these definitions in CONFIG_SITE.solaris-x86-gnu.solaris-x86-gnu #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-x86.Common b/configure/os/CONFIG.solaris-x86.Common index faea62005..9ae62e5ef 100644 --- a/configure/os/CONFIG.solaris-x86.Common +++ b/configure/os/CONFIG.solaris-x86.Common @@ -1,8 +1,5 @@ # CONFIG.solaris-x86.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-x86 host builds # Sites may override these definitions in CONFIG_SITE.solaris-x86.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-x86.solaris-x86 b/configure/os/CONFIG.solaris-x86.solaris-x86 index 7a815235e..2e4bb23e2 100644 --- a/configure/os/CONFIG.solaris-x86.solaris-x86 +++ b/configure/os/CONFIG.solaris-x86.solaris-x86 @@ -1,8 +1,5 @@ # CONFIG.solaris-x86.solaris-x86 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-x86 host - solaris-x86 target builds # Sites may override these definitions in CONFIG_SITE.solaris-x86.solaris-x86 #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-x86.solaris-x86-debug b/configure/os/CONFIG.solaris-x86.solaris-x86-debug index 5840ce2c7..505080310 100644 --- a/configure/os/CONFIG.solaris-x86.solaris-x86-debug +++ b/configure/os/CONFIG.solaris-x86.solaris-x86-debug @@ -1,8 +1,5 @@ # CONFIG.solaris-x86.solaris-x86-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-x86 host - solaris-x86-debug target build with debug compiler flags # Sites may override these definitions in CONFIG_SITE.solaris-x86.solaris-x86-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-x86.solaris-x86_64 b/configure/os/CONFIG.solaris-x86.solaris-x86_64 index 8fb45c39b..e1ef93afe 100644 --- a/configure/os/CONFIG.solaris-x86.solaris-x86_64 +++ b/configure/os/CONFIG.solaris-x86.solaris-x86_64 @@ -1,8 +1,5 @@ # CONFIG.solaris-x86.solaris-x86_64 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-x86 host - solaris-x86_64 target build with Sun compiler # Sites may override these definitions in CONFIG_SITE.solaris-x86.solaris-x86_64 #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-x86_64-gnu.Common b/configure/os/CONFIG.solaris-x86_64-gnu.Common index 180f9d03e..9c0296d3d 100644 --- a/configure/os/CONFIG.solaris-x86_64-gnu.Common +++ b/configure/os/CONFIG.solaris-x86_64-gnu.Common @@ -1,8 +1,5 @@ # CONFIG.solaris-x86_64-gnu.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-x86_64 gnu compiler host builds # Sites may override these definitions in CONFIG_SITE.solaris-sparc64-gnu.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-x86_64-gnu.solaris-x86_64-gnu b/configure/os/CONFIG.solaris-x86_64-gnu.solaris-x86_64-gnu index 8e1f4789f..8ff61b8a8 100644 --- a/configure/os/CONFIG.solaris-x86_64-gnu.solaris-x86_64-gnu +++ b/configure/os/CONFIG.solaris-x86_64-gnu.solaris-x86_64-gnu @@ -1,8 +1,5 @@ # CONFIG.solaris-x86_64-gnu.solaris-x86_64-gnu # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-x86_64 gnu compiler host - solaris-sx86_64 gnu compiler target builds # Sites may override these definitions in CONFIG_SITE.solaris-x86_64-gnu.solaris-x86_64-gnu #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-x86_64.Common b/configure/os/CONFIG.solaris-x86_64.Common index 6d650f660..a8b6c17ec 100644 --- a/configure/os/CONFIG.solaris-x86_64.Common +++ b/configure/os/CONFIG.solaris-x86_64.Common @@ -1,8 +1,5 @@ # CONFIG.solaris-x86_64.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-x86_64 Sun compiler host builds # Sites may override these definitions in CONFIG_SITE.solaris-x86_64.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-x86_64.solaris-x86_64 b/configure/os/CONFIG.solaris-x86_64.solaris-x86_64 index 21deb353d..7e2111e76 100644 --- a/configure/os/CONFIG.solaris-x86_64.solaris-x86_64 +++ b/configure/os/CONFIG.solaris-x86_64.solaris-x86_64 @@ -1,8 +1,5 @@ # CONFIG.solaris-x86_64.solaris-x86_64 # -# $Id -# This file is maintained by the build community. -# # Definitions for solaris-x86_64 Sun compiler host - solaris-x86_64 Sun compiler target builds # Sites may override these definitions in CONFIG_SITE.solaris-x86_64.solaris-x86_64 #------------------------------------------------------- diff --git a/configure/os/CONFIG.solaris-x86_64.solaris-x86_64-debug b/configure/os/CONFIG.solaris-x86_64.solaris-x86_64-debug index c3e5dbd5f..fb375157d 100644 --- a/configure/os/CONFIG.solaris-x86_64.solaris-x86_64-debug +++ b/configure/os/CONFIG.solaris-x86_64.solaris-x86_64-debug @@ -1,8 +1,5 @@ # CONFIG.solaris-x86_64.solaris-x86_64-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris-x86_64 host - solaris-x86_64-debug target build with debug compiler flags # Sites may override these definitions in CONFIG_SITE.solaris-x86_64.solaris-x86_64-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.solarisCommon.solarisCommon b/configure/os/CONFIG.solarisCommon.solarisCommon index aa5e035d0..2b04f53bd 100644 --- a/configure/os/CONFIG.solarisCommon.solarisCommon +++ b/configure/os/CONFIG.solarisCommon.solarisCommon @@ -1,8 +1,5 @@ # CONFIG.solarisCommon.solarisCommon # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for solaris host - solaris target build # Sites may override these definitions in CONFIG_SITE.solarisCommon.solarisCommon #------------------------------------------------------- diff --git a/configure/os/CONFIG.win32-x86-debug.Common b/configure/os/CONFIG.win32-x86-debug.Common index 5c3376e9e..602fb9038 100644 --- a/configure/os/CONFIG.win32-x86-debug.Common +++ b/configure/os/CONFIG.win32-x86-debug.Common @@ -1,10 +1,7 @@ # CONFIG.win32-x86-debug.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# -# Definitions for win32-x86 debug with debug compiler flags -# Sites may override these definitions in CONFIG_SITE.win32-x86-debug.Common +# Definitions for win32-x86-debug host arch +# Override these definitions in CONFIG_SITE.win32-x86-debug.Common #------------------------------------------------------- #Include definitions common to win32-x86 hosts diff --git a/configure/os/CONFIG.win32-x86-debug.win32-x86-debug b/configure/os/CONFIG.win32-x86-debug.win32-x86-debug index 92f025c49..8ee66ff8f 100644 --- a/configure/os/CONFIG.win32-x86-debug.win32-x86-debug +++ b/configure/os/CONFIG.win32-x86-debug.win32-x86-debug @@ -1,12 +1,12 @@ # CONFIG.win32-x86-debug.win32-x86-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# -# Definitions for win32-x86 debug compiler host - win32-x86 debug compiler target builds -# Sites may override these definitions in CONFIG_SITE.win32-x86-debug.win32-x86-debug +# Definitions for win32-x86-debug host - win32-x86-debug target build +# Override these definitions in CONFIG_SITE.win32-x86-debug.win32-x86-debug #------------------------------------------------------- +#Include definitions common to win32-x86 builds include $(CONFIG)/os/CONFIG.win32-x86.win32-x86 +-include $(CONFIG)/os/CONFIG_SITE.win32-x86.win32-x86 +# Override CONFIG_SITE settings: HOST_OPT=NO diff --git a/configure/os/CONFIG.win32-x86-mingw.Common b/configure/os/CONFIG.win32-x86-mingw.Common index a488c6647..ebe195a7c 100644 --- a/configure/os/CONFIG.win32-x86-mingw.Common +++ b/configure/os/CONFIG.win32-x86-mingw.Common @@ -1,8 +1,5 @@ # CONFIG.win32-x86-mingw.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for win32-x86-mingw host archs # Sites may override these definitions in CONFIG_SITE.win32-x86-mingw.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.win32-x86-mingw.win32-x86-mingw b/configure/os/CONFIG.win32-x86-mingw.win32-x86-mingw index 3f1cb2fd7..2a7827ccd 100644 --- a/configure/os/CONFIG.win32-x86-mingw.win32-x86-mingw +++ b/configure/os/CONFIG.win32-x86-mingw.win32-x86-mingw @@ -1,7 +1,5 @@ # CONFIG.win32-x86-mingw.win32-x86-mingw # -# $Revision-Id$ -# # Definitions for win32-x86-mingw host - win32-x86-mingw target builds # Sites may override these definitions in CONFIG_SITE.win32-x86-mingw.win32-x86-mingw #------------------------------------------------------- @@ -33,5 +31,5 @@ LOADABLE_SHRLIB_LDFLAGS = -shared \ # Don't link with gcc library GNU_LDLIBS_YES = -# Link with winsock2 -OP_SYS_LDLIBS = -lws2_32 +# Link with system libraries +OP_SYS_LDLIBS = -lws2_32 -ladvapi32 -luser32 -lkernel32 -lwinmm diff --git a/configure/os/CONFIG.win32-x86-mingw.win32-x86-mingw-debug b/configure/os/CONFIG.win32-x86-mingw.win32-x86-mingw-debug index 304eec53a..33148a819 100644 --- a/configure/os/CONFIG.win32-x86-mingw.win32-x86-mingw-debug +++ b/configure/os/CONFIG.win32-x86-mingw.win32-x86-mingw-debug @@ -1,8 +1,5 @@ # CONFIG.win32-x86-mingw.win32-x86-mingw-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for win32-x86-mingw compiler host - win32-x86-mingw debug compiler target builds # Sites may override these definitions in CONFIG_SITE.win32-x86-mingw.win32-x86-mingw-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.win32-x86-static.Common b/configure/os/CONFIG.win32-x86-static.Common index 7c4508ca6..d302e4614 100644 --- a/configure/os/CONFIG.win32-x86-static.Common +++ b/configure/os/CONFIG.win32-x86-static.Common @@ -1,8 +1,5 @@ # CONFIG.win32-x86-static.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for win32-x86-static host archs # Sites may override these definitions in CONFIG_SITE.win32-x86-static.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.win32-x86-static.win32-x86-static b/configure/os/CONFIG.win32-x86-static.win32-x86-static index 0bb18a6d0..da90f992a 100644 --- a/configure/os/CONFIG.win32-x86-static.win32-x86-static +++ b/configure/os/CONFIG.win32-x86-static.win32-x86-static @@ -1,13 +1,13 @@ # CONFIG.win32-x86-static.win32-x86.static # -# $Revision-Id$ -# This file is maintained by the build community. -# -# Definitions for win32-x86-static target archs when host arch is win32-x86-static -# Sites may override these definitions in CONFIG_SITE.win32-x86-static.win32-x86-static +# Definitions for win32-x86-static host - win32-x86-static target build +# Override these definitions in CONFIG_SITE.win32-x86-static.win32-x86-static #------------------------------------------------------- +#Include definitions common to win32-x86 builds include $(CONFIG)/os/CONFIG.win32-x86.win32-x86 +-include $(CONFIG)/os/CONFIG_SITE.win32-x86.win32-x86 +# Override CONFIG_SITE settings: SHARED_LIBRARIES = NO STATIC_BUILD = YES diff --git a/configure/os/CONFIG.win32-x86.Common b/configure/os/CONFIG.win32-x86.Common index f2c75b055..be328cc19 100644 --- a/configure/os/CONFIG.win32-x86.Common +++ b/configure/os/CONFIG.win32-x86.Common @@ -1,10 +1,7 @@ # CONFIG.win32-x86.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for win32-x86 host archs -# Sites may override these definitions in CONFIG_SITE.win32-x86.Common +# Override these definitions in CONFIG_SITE.win32-x86.Common #------------------------------------------------------- CP = $(PERL) -MExtUtils::Command -e cp diff --git a/configure/os/CONFIG.win32-x86.win32-x86 b/configure/os/CONFIG.win32-x86.win32-x86 index d36093d53..29c15d3be 100644 --- a/configure/os/CONFIG.win32-x86.win32-x86 +++ b/configure/os/CONFIG.win32-x86.win32-x86 @@ -1,10 +1,7 @@ # CONFIG.win32-x86.win32-x86 # -# $Revision-Id$ -# This file is maintained by the build community. -# -# Definitions for win32-x86 target archs when host arch is win32-x86 -# Sites may override these definitions in CONFIG_SITE.win32-x86.win32-x86 +# Definitions for win32-x86 host - win32-x86 target build +# Override these definitions in CONFIG_SITE.win32-x86.win32-x86 #------------------------------------------------------- # Win32 valid build types and include directory suffixes @@ -13,6 +10,8 @@ VALID_BUILDS = Host Ioc CMPLR_CLASS = msvc +OPT_WHOLE_PROGRAM = YES + #------------------------------------------------------- WINLINK = link @@ -25,26 +24,33 @@ ARCMD = lib -nologo -verbose -out:$@ $(LIB_OPT_LDFLAGS) $(LIBRARY_LD_OBJS) # Configure OS vendor C compiler CC = cl -# Override CONFIG.gnuCommon for cross builds. +# Override CONFIG.gnuCommon settings for cross builds. GNU = NO HDEPENDS_METHOD = MKMF +# Compiler flags for C files (C++ is below) + # -# -W use warning level N -# (maximum (lint type) warnings at level 4) -# -w44355 set "'this' used in the base initializer list" to be level 4 -WARN_CFLAGS_YES = -W3 -w44355 -WARN_CFLAGS_NO = -W1 +# -W display warnings at level d +# -W4 is for maximum (lint type) warnings +# -W3 is for production quality warnings +# -W2 displays significant warnings +# -W1 is the default and shows severe warnings only +# -w Set warning C to be shown at level +WARN_CFLAGS_YES = -W3 +WARN_CFLAGS_NO = -W1 # # -Ox maximum optimizations # -GL whole program optimization # -Oy- re-enable creation of frame pointers -OPT_CFLAGS_YES = -Ox -GL -Oy- +OPT_CFLAGS_YES_YES = -Ox -GL -Oy- +OPT_CFLAGS_YES_NO = -Ox -Oy- +OPT_CFLAGS_YES = $(OPT_CFLAGS_YES_$(OPT_WHOLE_PROGRAM)) # # -Zi generate program database for debugging information -# -RTCsu catch bugs occuring only inoptimized code +# -RTCsu enable run-time error checks OPT_CFLAGS_NO = -Zi -RTCsu # specify object file name and location @@ -69,7 +75,7 @@ STATIC_CFLAGS_YES= -MT$(VISC_CFLAGS_DEBUG) $(BUILD_DLL_CFLAGS) STATIC_CFLAGS_NO= -MD$(VISC_CFLAGS_DEBUG) $(BUILD_DLL_CFLAGS) -DEPICS_CALL_DLL # OS vendor c preprocessor -CPP = cl -C -E +CPP = cl -nologo -C -E # Configure OS vendor C++ compiler # @@ -85,22 +91,29 @@ CCC = cl -EHsc -GR CODE_CPPFLAGS += -nologo -D__STDC__=0 CODE_CPPFLAGS += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE + +# Compiler flags for C++ files + # -# -W use warning level N -# (maximum lint level warnings at level 4) -# -w44355 set "'this' used in the base initializer list" to be level 4 -WARN_CXXFLAGS_YES = -W3 -w44355 -WARN_CXXFLAGS_NO = -W1 +# -W disable warnings from levels > n +# -w set warning m to level n +# -w44355 "'this' used in the base initializer list" +# -w44344 "behavior change: use of explicit template arguments results in ..." +# -w44251 "class needs to have dll-interface to be used by clients of ..." +WARN_CXXFLAGS_YES = -W3 -w44355 -w44344 -w44251 +WARN_CXXFLAGS_NO = -W1 # # -Ox maximum optimizations # -GL whole program optimization # -Oy- re-enable creation of frame pointers -OPT_CXXFLAGS_YES = -Ox -GL -Oy- +OPT_CXXFLAGS_YES_YES = -Ox -GL -Oy- +OPT_CXXFLAGS_YES_NO = -Ox -Oy- +OPT_CXXFLAGS_YES = $(OPT_CXXFLAGS_YES_$(OPT_WHOLE_PROGRAM)) # # -Zi generate program database for debugging information -# -RTCsu catch bugs occurring only in optimized code +# -RTCsu enable run-time error checks OPT_CXXFLAGS_NO = -RTCsu -Zi # specify object file name and location @@ -130,11 +143,14 @@ RANLIB= # -fixed:no generate relocatable code # -version:. - only 2 components allowed, 0-65535 each # -debug generate debugging info -LINK_OPT_FLAGS_YES = -LTCG -incremental:no -opt:ref \ - -release $(PROD_VERSION:%=-version:%) +LINK_OPT_FLAGS_WHOLE_YES = -LTCG +LINK_OPT_FLAGS_YES = $(LINK_OPT_FLAGS_WHOLE_$(OPT_WHOLE_PROGRAM)) +LINK_OPT_FLAGS_YES += -incremental:no -opt:ref +LINK_OPT_FLAGS_YES += -release $(PROD_VERSION:%=-version:%) LINK_OPT_FLAGS_NO = -debug -incremental:no -fixed:no OPT_LDFLAGS = $(LINK_OPT_FLAGS_$(HOST_OPT)) -LIB_OPT_FLAGS_YES = -LTCG + +LIB_OPT_FLAGS_YES = $(LINK_OPT_FLAGS_WHOLE_$(OPT_WHOLE_PROGRAM)) LIB_OPT_LDFLAGS = $(LIB_OPT_FLAGS_$(HOST_OPT)) ARCH_DEP_CFLAGS= @@ -150,48 +166,38 @@ EXE=.exe OBJ=.obj RES=.res -# Problem: MS Visual C++ does not recognize *.cc as C++ source, -# so we do C++ compiles using the global flag -TP +# MS Visual C++ doesn't recognize *.cc as a C++ source file, +# so C++ compiles get the flag -TP COMPILER_CXXFLAGS = -TP -# Operating system flags +# Operating system flags OP_SYS_CFLAGS = OP_SYS_CXXFLAGS = $(COMPILER_CXXFLAGS) -# -# Files and flags needed to link DLLs (used in RULES_BUILD) -# -WIN32_DLLFLAGS = /subsystem:windows /dll $(OPT_LDFLAGS) \ +# Files and flags needed to link DLLs (used in RULES_BUILD) +WIN32_DLLFLAGS = -subsystem:windows -dll $(OPT_LDFLAGS) \ $(USR_LDFLAGS) $(CMD_LDFLAGS) $(TARGET_LDFLAGS) $(LIB_LDFLAGS) -# -# specify dll .def file only if it exists -# +# Specify dll .def file only if it exists DLL_DEF_FLAG = $(addprefix -def:,$(wildcard ../$(addsuffix .def,$*))) -# -# A WIN32 dll has three parts: +# A WIN32 dll has three parts: # x.dll: the real dll (SHRLIBNAME) # x.lib: what you link to progs that use the dll (DLLSTUB_LIBNAME) # x.exp: what you need to build the dll (in no variable) -# LINK.shrlib = $(WINLINK) -nologo $(WIN32_DLLFLAGS) -out:$@ \ -implib:$(@:%$(SHRLIB_SUFFIX)=%$(LIB_SUFFIX)) \ $(DLL_DEF_FLAG) $(LIBRARY_LD_OBJS) $(LIBRARY_LD_RESS) $(SHRLIB_LDLIBS) - -# adjust names of libraries to build -# +# Adjust names of libraries to build SHRLIB_SUFFIX_BASE = .dll SHRLIB_SUFFIX = $(SHRLIB_SUFFIX_BASE) SHRLIBNAME_YES = $(BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX)) LOADABLE_SHRLIBNAME = $(LOADABLE_BUILD_LIBRARY:%=%$(SHRLIB_SUFFIX)) TESTSHRLIBNAME_YES = $(TESTBUILD_LIBRARY:%=%$(SHRLIB_SUFFIX_BASE)) -# -# When SHARED_LIBRARIES is YES we are building a DLL link library -# and when SHARED_LIBRARIES is NO we are building an object library -# +# When SHARED_LIBRARIES is YES we are building a DLL shared library. +# When SHARED_LIBRARIES is NO we are building an object library DLLSTUB_SUFFIX = .lib DLLSTUB_LIBNAME_YES = $(BUILD_LIBRARY:%=%.lib) DLLSTUB_LIBNAME = $(DLLSTUB_LIBNAME_$(SHARED_LIBRARIES)) @@ -205,7 +211,7 @@ LIBNAME = $(LIBNAME_$(SHARED_LIBRARIES)) TESTLIBNAME_NO = $(TESTBUILD_LIBRARY:%=%.lib) TESTLIBNAME = $(TESTLIBNAME_$(SHARED_LIBRARIES)) -# dll install location +# dll install location INSTALL_SHRLIB = $(INSTALL_BIN) @@ -265,7 +271,7 @@ LINK.cpp = $(WINLINK) -nologo $(STATIC_LDFLAGS) $(LDFLAGS) $(PROD_LDFLAGS) \ #-------------------------------------------------- # UseManifestTool.pl checks MS Visual c++ compiler version number to # decide whether or not to use the Manifest Tool command to embed the -# linker created .manifest file into a library or product target. +# linker created .manifest file into a library or product target. # useManifestTool.pl returns 0(don't use) or 1(use). # MT.exe = mt.exe -nologo -manifest $@.manifest @@ -275,4 +281,3 @@ MT_EXE_COMMAND_NO = $(MT.exe) "-outputresource:$@;\#1" MT_EXE_COMMAND1 = $(MT_EXE_COMMAND_$(STATIC_BUILD)) MT_DLL_COMMAND = $(MT_DLL_COMMAND$(shell $(PERL) $(TOOLS)/useManifestTool.pl)) MT_EXE_COMMAND = $(MT_EXE_COMMAND$(shell $(PERL) $(TOOLS)/useManifestTool.pl)) - diff --git a/configure/os/CONFIG.win32-x86.win32-x86-debug b/configure/os/CONFIG.win32-x86.win32-x86-debug index a4949dde7..a71c9957a 100644 --- a/configure/os/CONFIG.win32-x86.win32-x86-debug +++ b/configure/os/CONFIG.win32-x86.win32-x86-debug @@ -1,20 +1,15 @@ # CONFIG.win32-x86.win32-x86-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for win32-x86 host - win32-x86-debug target build -# Sites may override these definitions in CONFIG_SITE.win32-x86.win32-x86-debug +# Override these definitions in CONFIG_SITE.win32-x86.win32-x86-debug #------------------------------------------------------- --include $(CONFIG)/os/CONFIG.Common.win32-x86 --include $(CONFIG)/os/CONFIG.win32-x86.win32-x86 --include $(CONFIG)/os/CONFIG_SITE.Common.win32-x86 +#Include definitions common to win32-x86 builds +include $(CONFIG)/os/CONFIG.win32-x86.win32-x86 -include $(CONFIG)/os/CONFIG_SITE.win32-x86.win32-x86 -GNU = NO - -HDEPENDS_METHOD = MKMF +# Override CONFIG.CrossCommon settings: BUILD_CLASS = HOST +# Override CONFIG_SITE settings: HOST_OPT = NO diff --git a/configure/os/CONFIG.win32-x86.win32-x86-static b/configure/os/CONFIG.win32-x86.win32-x86-static index a23431744..ae5313a5c 100644 --- a/configure/os/CONFIG.win32-x86.win32-x86-static +++ b/configure/os/CONFIG.win32-x86.win32-x86-static @@ -1,14 +1,16 @@ # CONFIG.win32-x86.win32-x86-static # -# $Revision-Id$ -# This file is maintained by the build community. -# -# Definitions for win32-x86-static target archs when host arch is win32-x86 -# Sites may override these definitions in CONFIG_SITE.win32-x86.win32-x86-static +# Definitions for win32-x86 host - win32-x86-static target build +# Override these definitions in CONFIG_SITE.win32-x86.win32-x86-static #------------------------------------------------------- +#Include definitions common to win32-x86 builds include $(CONFIG)/os/CONFIG.win32-x86.win32-x86 +-include $(CONFIG)/os/CONFIG_SITE.win32-x86.win32-x86 +# Override CONFIG.CrossCommon settings: BUILD_CLASS = HOST + +# Override CONFIG_SITE settings: SHARED_LIBRARIES = NO STATIC_BUILD = YES diff --git a/configure/os/CONFIG.win32-x86.windows-x64 b/configure/os/CONFIG.win32-x86.windows-x64 deleted file mode 100644 index d0bcbd4cf..000000000 --- a/configure/os/CONFIG.win32-x86.windows-x64 +++ /dev/null @@ -1,18 +0,0 @@ -# CONFIG.win-x86.windows-x64 -# -# $Revision-Id$ -# This file is maintained by the build community. -# -# Definitions for windows-x64 target archs when host arch is win32-x86 -# Sites may override these definitions in CONFIG_SITE.win32-x86.windows-x64 -#------------------------------------------------------- - --include $(CONFIG)/os/CONFIG.Common.win32-x86 --include $(CONFIG)/os/CONFIG.win32-x86.win32-x86 - -OPT_LDFLAGS += /MACHINE:X64 - -# /MACHINE:X64 -# /MACHINE:IA64 (Itanium) -# /MACHINE:X86 - diff --git a/configure/os/CONFIG.windows-x64-debug.Common b/configure/os/CONFIG.windows-x64-debug.Common index e030eb265..ad433bc8f 100644 --- a/configure/os/CONFIG.windows-x64-debug.Common +++ b/configure/os/CONFIG.windows-x64-debug.Common @@ -1,10 +1,7 @@ # CONFIG.windows-x64-debug.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# -# Definitions for windows-x64 debug with debug compiler flags -# Sites may override these definitions in CONFIG_SITE.windows-x64-debug.Common +# Definitions for windows-x64-debug host arch +# Override these definitions in CONFIG_SITE.windows-x64-debug.Common #------------------------------------------------------- #Include definitions common to windows-x64 hosts diff --git a/configure/os/CONFIG.windows-x64-debug.windows-x64-debug b/configure/os/CONFIG.windows-x64-debug.windows-x64-debug index d15b9a3aa..0a2c88d4f 100644 --- a/configure/os/CONFIG.windows-x64-debug.windows-x64-debug +++ b/configure/os/CONFIG.windows-x64-debug.windows-x64-debug @@ -1,8 +1,5 @@ # CONFIG.windows-x64-debug.windows-x64-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for windows-x64 debug compiler host - windows-x64 debug compiler target builds # Sites may override these definitions in CONFIG_SITE.windows-x64-debug.windows-x64-debug #------------------------------------------------------- diff --git a/configure/os/CONFIG.windows-x64-mingw.Common b/configure/os/CONFIG.windows-x64-mingw.Common index c467a3a51..812168480 100644 --- a/configure/os/CONFIG.windows-x64-mingw.Common +++ b/configure/os/CONFIG.windows-x64-mingw.Common @@ -1,8 +1,5 @@ # CONFIG.windows-x64-mingw.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for windows-x64-mingw host archs # Sites may override these definitions in CONFIG_SITE.windows-x64-mingw.Common #------------------------------------------------------- diff --git a/configure/os/CONFIG.windows-x64-mingw.windows-x64-mingw b/configure/os/CONFIG.windows-x64-mingw.windows-x64-mingw index 9e42784aa..d8e49637e 100644 --- a/configure/os/CONFIG.windows-x64-mingw.windows-x64-mingw +++ b/configure/os/CONFIG.windows-x64-mingw.windows-x64-mingw @@ -1,8 +1,5 @@ # CONFIG.windows-x64-mingw.windows-x64-mingw # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for windows-x64-mingw target archs # Sites may override these definitions in CONFIG_SITE.windows-x64-mingw.windows-x64-mingw #------------------------------------------------------- diff --git a/configure/os/CONFIG.windows-x64-static.Common b/configure/os/CONFIG.windows-x64-static.Common index be61abad0..88bef64ff 100644 --- a/configure/os/CONFIG.windows-x64-static.Common +++ b/configure/os/CONFIG.windows-x64-static.Common @@ -1,11 +1,9 @@ # CONFIG.windows-x64-static.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Definitions for windows-x64-static host archs -# Sites may override these definitions in CONFIG_SITE.windows-x64-static.Common +# Override these definitions in CONFIG_SITE.windows-x64-static.Common #------------------------------------------------------- +#Include definitions common to windows-x64 hosts include $(CONFIG)/os/CONFIG.windows-x64.Common diff --git a/configure/os/CONFIG.windows-x64-static.windows-x64-static b/configure/os/CONFIG.windows-x64-static.windows-x64-static index e5e152411..097e65558 100644 --- a/configure/os/CONFIG.windows-x64-static.windows-x64-static +++ b/configure/os/CONFIG.windows-x64-static.windows-x64-static @@ -1,13 +1,12 @@ # CONFIG.windows-x64-static.windows-x64-static # -# $Revision-Id$ -# This file is maintained by the build community. -# -# Definitions for windows-x64-static target archs when host arch is windows-x64-static -# Sites may override these definitions in CONFIG_SITE.windows-x64-static.windows-x64-static +# Definitions for windows-x64-static host - windows-x64-static target build +# Override these definitions in CONFIG_SITE.windows-x64-static.windows-x64-static #------------------------------------------------------- +#Include definitions common to windows-x64 builds include $(CONFIG)/os/CONFIG.windows-x64.windows-x64 +# Override CONFIG_SITE settings: SHARED_LIBRARIES = NO STATIC_BUILD= YES diff --git a/configure/os/CONFIG.windows-x64.Common b/configure/os/CONFIG.windows-x64.Common index 252b46436..de2fa3f57 100644 --- a/configure/os/CONFIG.windows-x64.Common +++ b/configure/os/CONFIG.windows-x64.Common @@ -1,13 +1,9 @@ # CONFIG.windows-x64.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# -# Definitions for windows-x64 host archs -# Sites may override these definitions in CONFIG_SITE.windows-x64.Common +# Definitions for windows-x64 host arch +# Override these definitions in CONFIG_SITE.windows-x64.Common #------------------------------------------------------- --include $(CONFIG)/os/CONFIG.win32-x86.Common - -WIND_HOST_TYPE = x86-win32 +#Include definitions common to win32-x86 hosts +include $(CONFIG)/os/CONFIG.win32-x86.Common diff --git a/configure/os/CONFIG.windows-x64.windows-x64 b/configure/os/CONFIG.windows-x64.windows-x64 index baa1ba945..dcb6e82de 100644 --- a/configure/os/CONFIG.windows-x64.windows-x64 +++ b/configure/os/CONFIG.windows-x64.windows-x64 @@ -1,17 +1,14 @@ # CONFIG.windows-x64.windows-x64 # -# $Revision-Id$ -# This file is maintained by the build community. -# -# Definitions for windows-x64 target archs when host arch is windows-x64 -# Sites may override these definitions in CONFIG_SITE.windows-x64.windows-x64 +# Definitions for windows-x64 host - windows-x64 target build +# Override these definitions in CONFIG_SITE.windows-x64.windows-x64 #------------------------------------------------------- --include $(CONFIG)/os/CONFIG.win32-x86.win32-x86 - -OPT_LDFLAGS += /MACHINE:X64 - -# /MACHINE:X64 -# /MACHINE:IA64 (Itanium) -# /MACHINE:X86 +#Include definitions common to win32-x86 builds +include $(CONFIG)/os/CONFIG.win32-x86.win32-x86 +-include $(CONFIG)/os/CONFIG_SITE.win32-x86.win32-x86 +OPT_LDFLAGS += -MACHINE:X64 +# -MACHINE:X64 +# -MACHINE:IA64 (Itanium) +# -MACHINE:X86 diff --git a/configure/os/CONFIG.windows-x64.windows-x64-debug b/configure/os/CONFIG.windows-x64.windows-x64-debug index d9f675aac..8c97ac343 100644 --- a/configure/os/CONFIG.windows-x64.windows-x64-debug +++ b/configure/os/CONFIG.windows-x64.windows-x64-debug @@ -1,12 +1,14 @@ # CONFIG.windows-x64.windows-x64-debug # -# $Revision-Id$ -# This file is maintained by the build community. -# -# Definitions for windows-x64 compiler host - windows-x64 debug compiler target builds -# Sites may override these definitions in CONFIG_SITE.windows-x64.windows-x64-debug +# Definitions for windows-x64 host - windows-x64-debug target build +# Override these definitions in CONFIG_SITE.windows-x64.windows-x64-debug #------------------------------------------------------- +#Include definitions common to windows-x64 builds include $(CONFIG)/os/CONFIG.windows-x64.windows-x64 +# Override CONFIG.CrossCommon settings: +BUILD_CLASS = HOST + +# Override CONFIG_SITE settings: HOST_OPT=NO diff --git a/configure/os/CONFIG.windows-x64.windows-x64-static b/configure/os/CONFIG.windows-x64.windows-x64-static index 8a6fd20f9..49bf2e0f6 100644 --- a/configure/os/CONFIG.windows-x64.windows-x64-static +++ b/configure/os/CONFIG.windows-x64.windows-x64-static @@ -1,14 +1,15 @@ -# CONFIG.windows-x86.windows-x86-static +# CONFIG.windows-x64.windows-x64-static # -# $Revision-Id$ -# This file is maintained by the build community. -# -# Definitions for windows-x64-static target archs when host arch is windows-x64 -# Sites may override these definitions in CONFIG_SITE.windows-x64.windows-x64-static +# Definitions for windows-x64 host - windows-x64-static target build +# Override these definitions in CONFIG_SITE.windows-x64.windows-x64-static #------------------------------------------------------- +#Include definitions common to windows-x64 builds include $(CONFIG)/os/CONFIG.windows-x64.windows-x64 +# Override CONFIG.CrossCommon settings: BUILD_CLASS = HOST + +# Override CONFIG_SITE settings: SHARED_LIBRARIES = NO STATIC_BUILD = YES diff --git a/configure/os/CONFIG_SITE.Common.RTEMS b/configure/os/CONFIG_SITE.Common.RTEMS index d2cccea67..0b5d227ee 100644 --- a/configure/os/CONFIG_SITE.Common.RTEMS +++ b/configure/os/CONFIG_SITE.Common.RTEMS @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.RTEMS # -# $Revision-Id$ -# # Site-specific information for all RTEMS targets #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.Common.cygwin-x86 b/configure/os/CONFIG_SITE.Common.cygwin-x86 index fdb014bd3..eae9ee5dd 100644 --- a/configure/os/CONFIG_SITE.Common.cygwin-x86 +++ b/configure/os/CONFIG_SITE.Common.cygwin-x86 @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.cygwin-x86 # -# $Revision-Id$ -# # Site Specific definitions for cygwin-x86 target # Depending on your version of Cygwin you'll want one of the following diff --git a/configure/os/CONFIG_SITE.Common.cygwin-x86_64 b/configure/os/CONFIG_SITE.Common.cygwin-x86_64 index 9b2ccdd3b..8d318e04e 100644 --- a/configure/os/CONFIG_SITE.Common.cygwin-x86_64 +++ b/configure/os/CONFIG_SITE.Common.cygwin-x86_64 @@ -1,22 +1,20 @@ -# CONFIG_SITE.Common.cygwin-x86_64 -# -# $Revision-Id$ -# -# Site Specific definitions for cygwin-x86_64 target -# Only the local epics system manager should modify this file - -# If readline is installed uncomment the following line -# to add command-line editing and history support -#COMMANDLINE_LIBRARY = READLINE - -# Uncomment the following line if readline has problems -#LDLIBS_READLINE = -lreadline -lcurses - - -# It makes sense to include debugging symbols even in optimized builds -# in case you want to attach gdb to the process or examine a core-dump. -# This does cost disk space, but not memory as debug symbols are not -# loaded into RAM when the binary is loaded. -OPT_CFLAGS_YES += -g -OPT_CXXFLAGS_YES += -g - +# CONFIG_SITE.Common.cygwin-x86_64 +# +# Site Specific definitions for cygwin-x86_64 target +# Only the local epics system manager should modify this file + +# If readline is installed uncomment the following line +# to add command-line editing and history support +#COMMANDLINE_LIBRARY = READLINE + +# Uncomment the following line if readline has problems +#LDLIBS_READLINE = -lreadline -lcurses + + +# It makes sense to include debugging symbols even in optimized builds +# in case you want to attach gdb to the process or examine a core-dump. +# This does cost disk space, but not memory as debug symbols are not +# loaded into RAM when the binary is loaded. +OPT_CFLAGS_YES += -g +OPT_CXXFLAGS_YES += -g + diff --git a/configure/os/CONFIG_SITE.Common.darwin-ppc b/configure/os/CONFIG_SITE.Common.darwin-ppc index 659ac782d..a2550147f 100644 --- a/configure/os/CONFIG_SITE.Common.darwin-ppc +++ b/configure/os/CONFIG_SITE.Common.darwin-ppc @@ -1,8 +1,5 @@ # CONFIG_SITE.Common.darwin-ppc # -# $Revision-Id$ -# This file is maintained by the build community. -# # Site override definitions for darwin-ppc target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.Common.darwin-ppcx86 b/configure/os/CONFIG_SITE.Common.darwin-ppcx86 index e4c32e968..2191d54f8 100644 --- a/configure/os/CONFIG_SITE.Common.darwin-ppcx86 +++ b/configure/os/CONFIG_SITE.Common.darwin-ppcx86 @@ -1,8 +1,5 @@ # CONFIG_SITE.Common.darwin-ppcx86 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Site override definitions for darwin-ppcx86 target builds #---------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.Common.darwin-x86 b/configure/os/CONFIG_SITE.Common.darwin-x86 index e8f36c4bc..1c5c93696 100644 --- a/configure/os/CONFIG_SITE.Common.darwin-x86 +++ b/configure/os/CONFIG_SITE.Common.darwin-x86 @@ -1,8 +1,5 @@ # CONFIG_SITE.Common.darwin-x86 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Site override definitions for darwin-x86 target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.Common.ios-arm b/configure/os/CONFIG_SITE.Common.ios-arm index 1262b4372..f406007d1 100644 --- a/configure/os/CONFIG_SITE.Common.ios-arm +++ b/configure/os/CONFIG_SITE.Common.ios-arm @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.ios-arm # -# $Revision-Id$ -# # Site-specific settings for ios-arm target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.Common.ios-x86 b/configure/os/CONFIG_SITE.Common.ios-x86 index 8c59187c7..e97c8b778 100644 --- a/configure/os/CONFIG_SITE.Common.ios-x86 +++ b/configure/os/CONFIG_SITE.Common.ios-x86 @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.ios-x86 # -# $Revision-Id$ -# # Site-specific settings for ios-x86 target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.Common.iosCommon b/configure/os/CONFIG_SITE.Common.iosCommon index a964c5bca..573d855ae 100644 --- a/configure/os/CONFIG_SITE.Common.iosCommon +++ b/configure/os/CONFIG_SITE.Common.iosCommon @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.iosCommon # -# $Revision-Id$ -# # Site-specific settings for Apple iOS builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.Common.linux-arm b/configure/os/CONFIG_SITE.Common.linux-arm index 0e78404cc..556ac6f09 100644 --- a/configure/os/CONFIG_SITE.Common.linux-arm +++ b/configure/os/CONFIG_SITE.Common.linux-arm @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.linux-arm # -# $Revision-Id$ -# # Site Specific definitions for all linux-arm targets #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.Common.linux-cris b/configure/os/CONFIG_SITE.Common.linux-cris index c748c1368..b17cb0ee5 100644 --- a/configure/os/CONFIG_SITE.Common.linux-cris +++ b/configure/os/CONFIG_SITE.Common.linux-cris @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.linux-cris # -# $Revision-Id$ -# # Site Specific definitions for linux-cris target # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.Common.linux-x86 b/configure/os/CONFIG_SITE.Common.linux-x86 index a1d64726c..07182820d 100644 --- a/configure/os/CONFIG_SITE.Common.linux-x86 +++ b/configure/os/CONFIG_SITE.Common.linux-x86 @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.linux-x86 # -# $Revision-Id$ -# # Site Specific definitions for linux-x86 target # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.Common.linux-x86_64 b/configure/os/CONFIG_SITE.Common.linux-x86_64 index 5e31809c0..18fb2974d 100644 --- a/configure/os/CONFIG_SITE.Common.linux-x86_64 +++ b/configure/os/CONFIG_SITE.Common.linux-x86_64 @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.linux-x86_64 # -# $Revision-Id$ -# # Site Specific definitions for linux-x86_64 target # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.Common.linux-xscale_be b/configure/os/CONFIG_SITE.Common.linux-xscale_be index 226aebac6..69efd6ffa 100644 --- a/configure/os/CONFIG_SITE.Common.linux-xscale_be +++ b/configure/os/CONFIG_SITE.Common.linux-xscale_be @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.linux-xscale_be # -# $Revision-Id$ -# # Site specific definitions for linux-xscale_be target builds. #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.Common.solaris-sparc b/configure/os/CONFIG_SITE.Common.solaris-sparc index 851254203..e8a6c875a 100644 --- a/configure/os/CONFIG_SITE.Common.solaris-sparc +++ b/configure/os/CONFIG_SITE.Common.solaris-sparc @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.solaris-sparc # -# $Revision-Id$ -# # Site Specific definitions for solaris-sparc target # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.Common.solaris-sparc-gnu b/configure/os/CONFIG_SITE.Common.solaris-sparc-gnu index 782275437..6e9c00f65 100644 --- a/configure/os/CONFIG_SITE.Common.solaris-sparc-gnu +++ b/configure/os/CONFIG_SITE.Common.solaris-sparc-gnu @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.solaris-sparc-gnu # -# $Revision-Id$ -# # Site Specific definitions for solaris-sparc-gnu target # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.Common.solaris-sparc64 b/configure/os/CONFIG_SITE.Common.solaris-sparc64 index 3af199b04..5a6bf8d82 100644 --- a/configure/os/CONFIG_SITE.Common.solaris-sparc64 +++ b/configure/os/CONFIG_SITE.Common.solaris-sparc64 @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.solaris-sparc64 # -# $Revision-Id$ -# # Site Specific definitions for solaris-sparc64 target # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.Common.solaris-sparc64-gnu b/configure/os/CONFIG_SITE.Common.solaris-sparc64-gnu index 5b52b8507..d7e1d726d 100644 --- a/configure/os/CONFIG_SITE.Common.solaris-sparc64-gnu +++ b/configure/os/CONFIG_SITE.Common.solaris-sparc64-gnu @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.solaris-sparc64-gnu # -# $Revision-Id$ -# # Site Specific definitions for solaris-sparc64-gnu target # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.Common.solaris-x86 b/configure/os/CONFIG_SITE.Common.solaris-x86 index 2a972d9cb..77bb8d45c 100644 --- a/configure/os/CONFIG_SITE.Common.solaris-x86 +++ b/configure/os/CONFIG_SITE.Common.solaris-x86 @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.solaris-x86 # -# $Revision-Id$ -# # Site Specific definitions for solaris-x86 targets # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.Common.solaris-x86-gnu b/configure/os/CONFIG_SITE.Common.solaris-x86-gnu index 2f6b3b7cd..0f93f0f18 100644 --- a/configure/os/CONFIG_SITE.Common.solaris-x86-gnu +++ b/configure/os/CONFIG_SITE.Common.solaris-x86-gnu @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.solaris-x86-gnu # -# $Revision-Id$ -# # Site Specific definitions for solaris-x86-gnu target # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.Common.solaris-x86_64 b/configure/os/CONFIG_SITE.Common.solaris-x86_64 index ce173608d..e54ec4f94 100644 --- a/configure/os/CONFIG_SITE.Common.solaris-x86_64 +++ b/configure/os/CONFIG_SITE.Common.solaris-x86_64 @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.solaris-x86_64 # -# $Revision-Id$ -# # Site Specific definitions for solaris-x86_64 target # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.Common.solaris-x86_64-gnu b/configure/os/CONFIG_SITE.Common.solaris-x86_64-gnu index f1f72c980..2b13215fb 100644 --- a/configure/os/CONFIG_SITE.Common.solaris-x86_64-gnu +++ b/configure/os/CONFIG_SITE.Common.solaris-x86_64-gnu @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.solaris-x86_64-gnu # -# $Revision-Id$ -# # Site Specific definitions for solaris-x86_64-gnu target # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.Common.vxWorks-mpc8540 b/configure/os/CONFIG_SITE.Common.vxWorks-mpc8540 index d742df3fe..ea9d9651e 100644 --- a/configure/os/CONFIG_SITE.Common.vxWorks-mpc8540 +++ b/configure/os/CONFIG_SITE.Common.vxWorks-mpc8540 @@ -1,4 +1,3 @@ -# $Revision-Id$ # # Site Specific definitions for the vxWorks-mpc8540 target # diff --git a/configure/os/CONFIG_SITE.Common.vxWorks-mpc8548 b/configure/os/CONFIG_SITE.Common.vxWorks-mpc8548 index da8671436..6f84ac0a8 100644 --- a/configure/os/CONFIG_SITE.Common.vxWorks-mpc8548 +++ b/configure/os/CONFIG_SITE.Common.vxWorks-mpc8548 @@ -1,4 +1,3 @@ -# $Revision-Id$ # # Site Specific definitions for the vxWorks-mpc8548 target # diff --git a/configure/os/CONFIG_SITE.Common.vxWorks-ppc603 b/configure/os/CONFIG_SITE.Common.vxWorks-ppc603 index 6a5d91fe0..aa59245c2 100644 --- a/configure/os/CONFIG_SITE.Common.vxWorks-ppc603 +++ b/configure/os/CONFIG_SITE.Common.vxWorks-ppc603 @@ -1,4 +1,3 @@ -# $Revision-Id$ # # Site Specific definitions for the vxWorks-ppc603 target # diff --git a/configure/os/CONFIG_SITE.Common.vxWorks-ppc603_long b/configure/os/CONFIG_SITE.Common.vxWorks-ppc603_long index 554647566..1e18ad1e9 100644 --- a/configure/os/CONFIG_SITE.Common.vxWorks-ppc603_long +++ b/configure/os/CONFIG_SITE.Common.vxWorks-ppc603_long @@ -1,4 +1,3 @@ -# $Revision-Id$ # # Site Specific definitions for the vxWorks-ppc603_long target # diff --git a/configure/os/CONFIG_SITE.Common.vxWorks-ppc604 b/configure/os/CONFIG_SITE.Common.vxWorks-ppc604 index c92b532ed..5b89bb342 100644 --- a/configure/os/CONFIG_SITE.Common.vxWorks-ppc604 +++ b/configure/os/CONFIG_SITE.Common.vxWorks-ppc604 @@ -1,4 +1,3 @@ -# $Revision-Id$ # # Site Specific definitions for the vxWorks-ppc604 target # diff --git a/configure/os/CONFIG_SITE.Common.vxWorks-ppc604_altivec b/configure/os/CONFIG_SITE.Common.vxWorks-ppc604_altivec index 437e4ddc9..6790a8955 100644 --- a/configure/os/CONFIG_SITE.Common.vxWorks-ppc604_altivec +++ b/configure/os/CONFIG_SITE.Common.vxWorks-ppc604_altivec @@ -1,4 +1,3 @@ -# $Revision-Id$ # # Site Specific definitions for the vxWorks-ppc604_altivec target # diff --git a/configure/os/CONFIG_SITE.Common.vxWorks-ppc604_long b/configure/os/CONFIG_SITE.Common.vxWorks-ppc604_long index be404fcfb..74a581b31 100644 --- a/configure/os/CONFIG_SITE.Common.vxWorks-ppc604_long +++ b/configure/os/CONFIG_SITE.Common.vxWorks-ppc604_long @@ -1,4 +1,3 @@ -# $Revision-Id$ # # Site Specific definitions for the vxWorks-ppc604_long target # diff --git a/configure/os/CONFIG_SITE.Common.win32-x86-mingw b/configure/os/CONFIG_SITE.Common.win32-x86-mingw index 39f219b19..ba19ac65a 100644 --- a/configure/os/CONFIG_SITE.Common.win32-x86-mingw +++ b/configure/os/CONFIG_SITE.Common.win32-x86-mingw @@ -1,7 +1,5 @@ # CONFIG_SITE.Common.win32-x86-mingw # -# $Revision-Id$ -# # Site Specific definitions for win32-x86-mingw target # If readline is available uncomment the following line diff --git a/configure/os/CONFIG_SITE.Common.win32-x86-static b/configure/os/CONFIG_SITE.Common.win32-x86-static new file mode 100644 index 000000000..de4e61760 --- /dev/null +++ b/configure/os/CONFIG_SITE.Common.win32-x86-static @@ -0,0 +1,8 @@ +# CONFIG_SITE.Common.win32-x86-static +# +# Site-specific settings for the win32-x86-static target + +# Whole-program optimization doesn't work with Visual Studio 2010 when +# building static binaries. Newer versions of Visual Studio than 2010 +# may work though, comment out or set this to YES to try. +OPT_WHOLE_PROGRAM = NO diff --git a/configure/os/CONFIG_SITE.Common.windows-x64-static b/configure/os/CONFIG_SITE.Common.windows-x64-static index 5da06c053..5db619b11 100644 --- a/configure/os/CONFIG_SITE.Common.windows-x64-static +++ b/configure/os/CONFIG_SITE.Common.windows-x64-static @@ -1,11 +1,8 @@ # CONFIG_SITE.Common.windows-x64-static # -# $Revision-Id$ -# -# Site Specific definitions for windows-x64-static target -# Only the local epics system manager should modify this file - -# 64-bit Visual Studio 2010 builds fail when built optimized. -# If you are using a newer version you can try removing this: -HOST_OPT = NO +# Site-specific settings for the windows-x64-static target +# Whole-program optimization doesn't work with Visual Studio 2010 when +# building static binaries. Newer versions of Visual Studio than 2010 +# may work though, comment out or set this to YES to try. +OPT_WHOLE_PROGRAM = NO diff --git a/configure/os/CONFIG_SITE.cygwin-x86.Common b/configure/os/CONFIG_SITE.cygwin-x86.Common index d81e414ad..7d132051c 100644 --- a/configure/os/CONFIG_SITE.cygwin-x86.Common +++ b/configure/os/CONFIG_SITE.cygwin-x86.Common @@ -1,8 +1,5 @@ # CONFIG_SITE.cygwin-x86.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Site override definitions for cygwin-x86 host builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86 b/configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86 index 97e3cb1f3..3125c7a64 100644 --- a/configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86 +++ b/configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86 @@ -1,8 +1,5 @@ # CONFIG_SITE.cygwin-x86.cygwin-x86 # -# $Revision-Id$ -# This file is maintained by the build community. -# # Site override definitions for cygwin-x86 host - cygwin-x86 target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.cygwin-x86.linux-arm b/configure/os/CONFIG_SITE.cygwin-x86.linux-arm index 7630864f8..75829c36d 100644 --- a/configure/os/CONFIG_SITE.cygwin-x86.linux-arm +++ b/configure/os/CONFIG_SITE.cygwin-x86.linux-arm @@ -1,7 +1,5 @@ # CONFIG_SITE.cygwin-x86.linux-arm # -# $Revision-Id$ -# # Site specific definitions for cygwin-x86 host - linux-arm target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.cygwin-x86_64.linux-arm b/configure/os/CONFIG_SITE.cygwin-x86_64.linux-arm index bf48209cc..93ec7c878 100644 --- a/configure/os/CONFIG_SITE.cygwin-x86_64.linux-arm +++ b/configure/os/CONFIG_SITE.cygwin-x86_64.linux-arm @@ -1,7 +1,5 @@ # CONFIG_SITE.cygwin-x86_64.linux-arm # -# $Revision-Id$ -# # Site specific definitions for cygwin-x86_64 host - linux-arm target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.darwin-ppc.Common b/configure/os/CONFIG_SITE.darwin-ppc.Common index b02dddc06..05417e1f9 100644 --- a/configure/os/CONFIG_SITE.darwin-ppc.Common +++ b/configure/os/CONFIG_SITE.darwin-ppc.Common @@ -1,7 +1,4 @@ # CONFIG_SITE.darwin-ppc.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Site override definitions for darwin-ppc host builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.darwin-ppcx86.Common b/configure/os/CONFIG_SITE.darwin-ppcx86.Common index 79330e215..42bd00531 100644 --- a/configure/os/CONFIG_SITE.darwin-ppcx86.Common +++ b/configure/os/CONFIG_SITE.darwin-ppcx86.Common @@ -1,7 +1,4 @@ # CONFIG_SITE.darwin-ppcx86.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Site override definitions for darwin-ppcx86 host builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.darwin-x86.Common b/configure/os/CONFIG_SITE.darwin-x86.Common index 53757afce..8a894104f 100644 --- a/configure/os/CONFIG_SITE.darwin-x86.Common +++ b/configure/os/CONFIG_SITE.darwin-x86.Common @@ -1,8 +1,5 @@ # CONFIG_SITE.darwin-x86.Common # -# This file is maintained by the build community. -# -# $Revision-Id$ # Site override definitions for darwin-x86 host builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.darwinCommon.darwinCommon b/configure/os/CONFIG_SITE.darwinCommon.darwinCommon index e1690ba09..297fd8e4f 100644 --- a/configure/os/CONFIG_SITE.darwinCommon.darwinCommon +++ b/configure/os/CONFIG_SITE.darwinCommon.darwinCommon @@ -1,20 +1,23 @@ # CONFIG_SITE.darwinCommon.darwinCommon # -# $Revision-Id$ -# This file is maintained by the build community. -# # Site specific definitions for darwin builds #------------------------------------------------------- -# Uncomment the following two definitions to enable the use of DarwinPorts packages. -# +# Note the dir/firstword/wildcard functions below are used +# to avoid warnings about missing directories. + +# Mix-and-match of different package systems is probably not advisable, +# but you can try that if you like... + +# Uncomment these definitions when using Homebrew packages: +#OP_SYS_INCLUDES += -I/usr/local/include +#OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /usr/local/lib/*)))) + +# Uncomment these definitions when using DarwinPorts packages: #OP_SYS_INCLUDES += -I/opt/local/include -# dir/firstword/wildcard used to avoid warning -L: directory name (...) does not exist -#OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /opt/local/lib/*)))) +#OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /opt/local/lib/*)))) -# Uncomment the following two definitions to enable the use of Fink packages. -# +# Uncomment these definitions when using Fink packages: #OP_SYS_INCLUDES += -I/sw/include -# dir/firstword/wildcard used to avoid warning -L: directory name (...) does not exist -#OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /sw/lib/*)))) +#OP_SYS_LDFLAGS += $(addprefix -L,$(dir $(firstword $(wildcard /sw/lib/*)))) diff --git a/configure/os/CONFIG_SITE.linux-arm-debug.linux-arm-debug b/configure/os/CONFIG_SITE.linux-arm-debug.linux-arm-debug index fc4a9f2a9..972f7d6c8 100644 --- a/configure/os/CONFIG_SITE.linux-arm-debug.linux-arm-debug +++ b/configure/os/CONFIG_SITE.linux-arm-debug.linux-arm-debug @@ -1,7 +1,5 @@ # CONFIG_SITE.linux-arm-debug.linux-arm-debug # -# $Revision-Id$ -# # Site specific overrides for linux-arm-debug host and target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-arm.linux-arm b/configure/os/CONFIG_SITE.linux-arm.linux-arm index a8cc0ff9f..a5e56eaa1 100644 --- a/configure/os/CONFIG_SITE.linux-arm.linux-arm +++ b/configure/os/CONFIG_SITE.linux-arm.linux-arm @@ -1,7 +1,5 @@ # CONFIG_SITE.linux-arm.linux-arm # -# $Revision-Id$ -# # Site specific definitions for native linux-arm builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86-debug.linux-x86-debug b/configure/os/CONFIG_SITE.linux-x86-debug.linux-x86-debug index 7e6cd3768..b3fccda81 100644 --- a/configure/os/CONFIG_SITE.linux-x86-debug.linux-x86-debug +++ b/configure/os/CONFIG_SITE.linux-x86-debug.linux-x86-debug @@ -1,7 +1,5 @@ # CONFIG_SITE.linux-x86-debug.linux-x86-debug # -# $Revision-Id$ -# # Site specific overrides for linux-x86-debug host and target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86.Common b/configure/os/CONFIG_SITE.linux-x86.Common index f5a3e910b..dc29e8f0d 100644 --- a/configure/os/CONFIG_SITE.linux-x86.Common +++ b/configure/os/CONFIG_SITE.linux-x86.Common @@ -1,8 +1,5 @@ # CONFIG_SITE.linux-x86.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Site override definitions for linux-x86 host builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86.UnixCommon b/configure/os/CONFIG_SITE.linux-x86.UnixCommon index c7c9b9c35..fcf81cb14 100644 --- a/configure/os/CONFIG_SITE.linux-x86.UnixCommon +++ b/configure/os/CONFIG_SITE.linux-x86.UnixCommon @@ -1,5 +1,4 @@ # -# $Revision-Id$ # # Site Specific Configuration Information # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.linux-x86.linux-arm b/configure/os/CONFIG_SITE.linux-x86.linux-arm index 528c9bc6c..1500c4526 100644 --- a/configure/os/CONFIG_SITE.linux-x86.linux-arm +++ b/configure/os/CONFIG_SITE.linux-x86.linux-arm @@ -1,15 +1,14 @@ # CONFIG_SITE.linux-x86.linux-arm # -# $Revision-Id$ -# # Site specific definitions for linux-x86 host - linux-arm target builds #------------------------------------------------------- -# Tools install path -#GNU_DIR = /home/targetOS/linux-arm/host/x86-linux/gcc_3.3.3 +# Set GNU crosscompiler target name +GNU_TARGET = arm-xilinx-linux-gnueabi -# APS: +# Set GNU tools install path +# This is the install path at APS: GNU_DIR = /usr/local/vw/zynq-2011.09 -# GNU crosscompiler target name -GNU_TARGET = arm-xilinx-linux-gnueabi +# With a Xilinx SDK, it'll be something like +#GNU_DIR = /usr/local/zynq/Xilinx/SDK/2015.4/gnu/arm/lin diff --git a/configure/os/CONFIG_SITE.linux-x86.linux-arm-debug b/configure/os/CONFIG_SITE.linux-x86.linux-arm-debug index 461c44290..57aff03b7 100644 --- a/configure/os/CONFIG_SITE.linux-x86.linux-arm-debug +++ b/configure/os/CONFIG_SITE.linux-x86.linux-arm-debug @@ -1,7 +1,5 @@ # CONFIG_SITE.linux-x86.linux-arm-debug # -# $Revision-Id$ -# # Site specific settings for linux-x86 host - linux-arm-debug target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86.linux-arm_eb b/configure/os/CONFIG_SITE.linux-x86.linux-arm_eb index 18309ae7f..0bc2a4e5a 100644 --- a/configure/os/CONFIG_SITE.linux-x86.linux-arm_eb +++ b/configure/os/CONFIG_SITE.linux-x86.linux-arm_eb @@ -1,7 +1,5 @@ # CONFIG_SITE.linux-x86.linux-arm_eb # -# $Revision-Id$ -# # Site specific definitions for linux-x86 host - linux-arm_eb target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86.linux-arm_el b/configure/os/CONFIG_SITE.linux-x86.linux-arm_el index 3195c0c5b..b82bc13bf 100644 --- a/configure/os/CONFIG_SITE.linux-x86.linux-arm_el +++ b/configure/os/CONFIG_SITE.linux-x86.linux-arm_el @@ -1,7 +1,5 @@ # CONFIG_SITE.linux-x86.linux-arm_el # -# $Revision-Id$ -# # Site specific definitions for linux-x86 host - linux-arm_el target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86.linux-x86 b/configure/os/CONFIG_SITE.linux-x86.linux-x86 index b7090cf6b..d359d174f 100644 --- a/configure/os/CONFIG_SITE.linux-x86.linux-x86 +++ b/configure/os/CONFIG_SITE.linux-x86.linux-x86 @@ -1,7 +1,5 @@ # CONFIG_SITE.linux-x86.linux-x86 # -# $Revision-Id$ -# # Site specific definitions for linux-x86 host - linux-x86 target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86.solaris-sparc b/configure/os/CONFIG_SITE.linux-x86.solaris-sparc index 7bd401330..156c748bd 100644 --- a/configure/os/CONFIG_SITE.linux-x86.solaris-sparc +++ b/configure/os/CONFIG_SITE.linux-x86.solaris-sparc @@ -1,8 +1,5 @@ # CONFIG_SITE.linux-x86.solaris-sparc # -# $Revision-Id$ -# This file is maintained by the build community. -# # Site specific definitions for linux-x86 host - solaris-sparc target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86.vxWorks-68040 b/configure/os/CONFIG_SITE.linux-x86.vxWorks-68040 index 95ff59130..4515d8b4c 100644 --- a/configure/os/CONFIG_SITE.linux-x86.vxWorks-68040 +++ b/configure/os/CONFIG_SITE.linux-x86.vxWorks-68040 @@ -1,7 +1,5 @@ # CONFIG_SITE.linux-x86.vxWorks-68040 # -# $Revision-Id$ -# # Site specific definitions for linux-x86 host - vxWorks-68040 target builds # Only the local epics system manager should modify this file #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86.vxWorks-ppc603 b/configure/os/CONFIG_SITE.linux-x86.vxWorks-ppc603 index 5c68d52eb..de1f98c35 100644 --- a/configure/os/CONFIG_SITE.linux-x86.vxWorks-ppc603 +++ b/configure/os/CONFIG_SITE.linux-x86.vxWorks-ppc603 @@ -1,4 +1,3 @@ -# $Revision-Id$ # # Site-specific definitions for linux-x86 builds of vxWorks-ppc603 # diff --git a/configure/os/CONFIG_SITE.linux-x86.vxWorks-ppc603_long b/configure/os/CONFIG_SITE.linux-x86.vxWorks-ppc603_long index 9109e98d1..4cc5c6e81 100644 --- a/configure/os/CONFIG_SITE.linux-x86.vxWorks-ppc603_long +++ b/configure/os/CONFIG_SITE.linux-x86.vxWorks-ppc603_long @@ -1,4 +1,3 @@ -# $Revision-Id$ # # Site-specific definitions for linux-x86 builds of vxWorks-ppc603_long # diff --git a/configure/os/CONFIG_SITE.linux-x86.vxWorksCommon b/configure/os/CONFIG_SITE.linux-x86.vxWorksCommon index 3fce09ec5..4c7d044f5 100644 --- a/configure/os/CONFIG_SITE.linux-x86.vxWorksCommon +++ b/configure/os/CONFIG_SITE.linux-x86.vxWorksCommon @@ -1,6 +1,5 @@ # CONFIG_SITE.linux-x86.vxWorksCommon # -# $Revision-Id$ # This file is maintained by the build community. # # Definitions for linux-x86 host - vxWorks target builds diff --git a/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw b/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw index 7df172901..363664f26 100644 --- a/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw +++ b/configure/os/CONFIG_SITE.linux-x86.win32-x86-mingw @@ -4,19 +4,22 @@ #------------------------------------------------------- # Early versions of the MinGW cross-build tools can only build -# static (non-DLL) libraries. For example RHEL's cross-gcc 4.4.6 -# needs these uncommented, cross-gcc 4.6.3 for Ubuntu does not: -SHARED_LIBRARIES = NO -STATIC_BUILD = YES +# static (non-DLL) libraries. RHEL's cross-build of gcc 4.4.6 +# needs these uncommented, cross-gcc 4.6.3 from Ubuntu does not: +#SHARED_LIBRARIES = NO +#STATIC_BUILD = YES # The cross-build tools are in $(GNU_DIR)/bin # Default is /usr #GNU_DIR = /usr/local # Different distribution cross-build packages use different prefixes: -# Ubuntu: -#CMPLR_PREFIX = i686-w64-mingw32- -# RHEL: -CMPLR_PREFIX = i686-pc-mingw32- +# Ubuntu, RHEL7: +CMPLR_PREFIX = i686-w64-mingw32- +# RHEL6: +#CMPLR_PREFIX = i686-pc-mingw32- # Debian? #CMPLR_PREFIX = i586-mingw32msvc- + +# Use static compiler-support libraries +OP_SYS_LDFLAGS += -static-libgcc -static-libstdc++ diff --git a/configure/os/CONFIG_SITE.linux-x86.windows-x64-mingw b/configure/os/CONFIG_SITE.linux-x86.windows-x64-mingw index 42cdc353b..026410cfe 100644 --- a/configure/os/CONFIG_SITE.linux-x86.windows-x64-mingw +++ b/configure/os/CONFIG_SITE.linux-x86.windows-x64-mingw @@ -18,3 +18,6 @@ #CMPLR_PREFIX = i686-w64-mingw32- # RHEL: CMPLR_PREFIX = x86_64-w64-mingw32- + +# Use static compiler-support libraries +OP_SYS_LDFLAGS += -static-libgcc -static-libstdc++ diff --git a/configure/os/CONFIG_SITE.linux-x86_64-debug.linux-x86_64-debug b/configure/os/CONFIG_SITE.linux-x86_64-debug.linux-x86_64-debug index 3685bc811..8ff68471a 100644 --- a/configure/os/CONFIG_SITE.linux-x86_64-debug.linux-x86_64-debug +++ b/configure/os/CONFIG_SITE.linux-x86_64-debug.linux-x86_64-debug @@ -1,7 +1,5 @@ # CONFIG_SITE.linux-x86_64-debug.linux-x86_64-debug # -# $Revision-Id$ -# # Site specific overrides for linux-x86_64 host and target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86_64.Common b/configure/os/CONFIG_SITE.linux-x86_64.Common index 3604f4d90..244e163b4 100644 --- a/configure/os/CONFIG_SITE.linux-x86_64.Common +++ b/configure/os/CONFIG_SITE.linux-x86_64.Common @@ -1,8 +1,5 @@ # CONFIG_SITE.linux-x86_64.Common # -# $Revision-Id$ -# This file is maintained by the build community. -# # Site override definitions for linux-x86_64 host builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86_64.UnixCommon b/configure/os/CONFIG_SITE.linux-x86_64.UnixCommon index 811e698ae..fa67bd3b8 100644 --- a/configure/os/CONFIG_SITE.linux-x86_64.UnixCommon +++ b/configure/os/CONFIG_SITE.linux-x86_64.UnixCommon @@ -1,6 +1,4 @@ # CONFIG_SITE.linux-x86_64.UnixCommon -$ -# $Revision-Id$ # # Site Specific configure override definitions # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.linux-x86_64.linux-arm b/configure/os/CONFIG_SITE.linux-x86_64.linux-arm index 95d64e108..9fcf3452a 100644 --- a/configure/os/CONFIG_SITE.linux-x86_64.linux-arm +++ b/configure/os/CONFIG_SITE.linux-x86_64.linux-arm @@ -1,7 +1,5 @@ # CONFIG_SITE.linux-x86_64.linux-arm # -# $Revision-Id$ -# # Site specific settings for linux-x86_64 host - linux-arm target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86_64.linux-arm-debug b/configure/os/CONFIG_SITE.linux-x86_64.linux-arm-debug index 98e644671..4f1e89a1b 100644 --- a/configure/os/CONFIG_SITE.linux-x86_64.linux-arm-debug +++ b/configure/os/CONFIG_SITE.linux-x86_64.linux-arm-debug @@ -1,7 +1,5 @@ # CONFIG_SITE.linux-x86_64.linux-arm-debug # -# $Revision-Id$ -# # Site specific settings for linux-x86_64 host - linux-arm-debug target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 b/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 index 8fccd7612..7a19d0dfe 100644 --- a/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 +++ b/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 @@ -1,7 +1,5 @@ # CONFIG_SITE.linux-x86_64.linux-x86_64 # -# $Revision-Id$ -# # Site specific definitions for linux-x86_64 host - linux-x86_64 target builds #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86_64.vxWorks-68040 b/configure/os/CONFIG_SITE.linux-x86_64.vxWorks-68040 index 4773d8d2b..63ca76f2d 100644 --- a/configure/os/CONFIG_SITE.linux-x86_64.vxWorks-68040 +++ b/configure/os/CONFIG_SITE.linux-x86_64.vxWorks-68040 @@ -1,7 +1,5 @@ # CONFIG_SITE.linux-x86_64.vxWorks-68040 # -# $Revision-Id$ -# # Site specific definitions for linux-x86_64 host - vxWorks-68040 target builds # Only the local epics system manager should modify this file #------------------------------------------------------- diff --git a/configure/os/CONFIG_SITE.linux-x86_64.vxWorks-ppc603 b/configure/os/CONFIG_SITE.linux-x86_64.vxWorks-ppc603 index cc05608cf..dfcc96f42 100644 --- a/configure/os/CONFIG_SITE.linux-x86_64.vxWorks-ppc603 +++ b/configure/os/CONFIG_SITE.linux-x86_64.vxWorks-ppc603 @@ -1,4 +1,3 @@ -# $Revision-Id$ # # Site-specific definitions for linux-x86_64 builds of vxWorks-ppc603 # diff --git a/configure/os/CONFIG_SITE.linux-x86_64.vxWorks-ppc603_long b/configure/os/CONFIG_SITE.linux-x86_64.vxWorks-ppc603_long index 2346ece4e..729bb80d4 100644 --- a/configure/os/CONFIG_SITE.linux-x86_64.vxWorks-ppc603_long +++ b/configure/os/CONFIG_SITE.linux-x86_64.vxWorks-ppc603_long @@ -1,4 +1,3 @@ -# $Revision-Id$ # # Site-specific definitions for linux-x86 builds of vxWorks-ppc603_long # diff --git a/configure/os/CONFIG_SITE.solaris-sparc.Common b/configure/os/CONFIG_SITE.solaris-sparc.Common index a7398dbcf..eaa42044c 100644 --- a/configure/os/CONFIG_SITE.solaris-sparc.Common +++ b/configure/os/CONFIG_SITE.solaris-sparc.Common @@ -1,7 +1,5 @@ # CONFIG_SITE.solaris-sparc.Common # -# $Revision-Id$ -# # Site specific override definitions for solaris-sparc host builds # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.win32-x86-mingw.win32-x86-mingw b/configure/os/CONFIG_SITE.win32-x86-mingw.win32-x86-mingw index 9022b8e2b..1f0e83d61 100644 --- a/configure/os/CONFIG_SITE.win32-x86-mingw.win32-x86-mingw +++ b/configure/os/CONFIG_SITE.win32-x86-mingw.win32-x86-mingw @@ -1,7 +1,5 @@ # CONFIG_SITE.win32-x86-mingw.win32-x86-mingw # -# $Revision-Id$ -# # Site Specific definitions for win32-x86-mingw target # The MinGW bin directory must be in your path. diff --git a/configure/os/CONFIG_SITE.win32-x86.Common b/configure/os/CONFIG_SITE.win32-x86.Common index 9bcd14d2d..9141333d0 100644 --- a/configure/os/CONFIG_SITE.win32-x86.Common +++ b/configure/os/CONFIG_SITE.win32-x86.Common @@ -1,7 +1,5 @@ # CONFIG_SITE.win32-x86.Common # -# $Revision-Id$ -# # Site specific definitions for win32-x86 host # Only the local epics system manager should modify this file diff --git a/configure/os/CONFIG_SITE.win32-x86.win32-x86 b/configure/os/CONFIG_SITE.win32-x86.win32-x86 deleted file mode 100644 index 84f6870b8..000000000 --- a/configure/os/CONFIG_SITE.win32-x86.win32-x86 +++ /dev/null @@ -1,17 +0,0 @@ -# $Revision-Id$ - -# If you have Visual C++ 6.0, uncomment the following override lines -# This will to eliminate warnings about unknown options /GL, /LTCG, and /w44355. -#OPT_CFLAGS_YES = /Ox -#OPT_CXXFLAGS_YES = /Ox -#OPT_CFLAGS_NO = /Zi -#OPT_CXXFLAGS_NO = /Zi -#LINK_OPT_FLAGS_YES = /incremental:no /opt:ref /release $(PROD_VERSION:%=/version:%) -#WARN_CFLAGS_YES = /W3 -#WARN_CXXFLAGS_YES = /W3 - - -# If you have Visual C++ 8.0 or 8.0 express, uncomment the following override. -# This will eliminate warnings about /GX being deprecated. -#CCC = cl /nologo /EHsc /GR - diff --git a/configure/os/CONFIG_SITE.windows-x64-mingw.windows-x64-mingw b/configure/os/CONFIG_SITE.windows-x64-mingw.windows-x64-mingw index bdb8c995e..63b559769 100644 --- a/configure/os/CONFIG_SITE.windows-x64-mingw.windows-x64-mingw +++ b/configure/os/CONFIG_SITE.windows-x64-mingw.windows-x64-mingw @@ -1,7 +1,5 @@ # CONFIG_SITE.windows-x64-mingw.windows-x64-mingw # -# $Revision-Id$ -# # Site Specific definitions for windows-x64-mingw target # Only the local epics system manager should modify this file diff --git a/documentation/KnownProblems.html b/documentation/KnownProblems.html index 2f8a61883..fe9045d03 100644 --- a/documentation/KnownProblems.html +++ b/documentation/KnownProblems.html @@ -4,17 +4,17 @@ - Known Problems in R3.16.0.1 + Known Problems in R3.16.1 -

EPICS Base R3.16.0.1: Known Problems

+

EPICS Base R3.16.1: Known Problems

Any patch files linked below should be applied at the root of the -base-3.16.0.1 tree. Download them, then use the GNU Patch program as +base-3.16.1 tree. Download them, then use the GNU Patch program as follows:

-
% cd /path/to/base-3.16.0.1
+
% cd /path/to/base-3.16.1
 % patch -p0 < /path/to/file.patch

The following problems were known by the developers at the time of this diff --git a/documentation/README.1st b/documentation/README.1st index b74f6ae92..ee56e542f 100644 --- a/documentation/README.1st +++ b/documentation/README.1st @@ -1,24 +1,24 @@ Installation Instructions - EPICS Base Release 3.16.0 + EPICS Base Release 3.16.1 -------------------------------------------------------------------------- Table of Contents - * What is EPICS base? - * What is new in this release? - * Copyright - * Supported platforms - * Supported compilers - * Software requirements - * Host system storage requirements - * Documentation - * Directory Structure - * Build related components - * Building EPICS base (Unix and Win32) - * Example application and extension - * Multiple host platforms + *�What is EPICS base? + *�What is new in this release? + *�Copyright + *�Supported platforms + *�Supported compilers + *�Software requirements + *�Host system storage requirements + *�Documentation + *�Directory Structure + *�Build related components + *�Building EPICS base (Unix and Win32) + *�Example application and extension + *�Multiple host platforms -------------------------------------------------------------------------- diff --git a/documentation/README.darwin.html b/documentation/README.darwin.html index 68e86171b..cbc290178 100644 --- a/documentation/README.darwin.html +++ b/documentation/README.darwin.html @@ -179,8 +179,6 @@ runAppleScript(const char *format, ...) [pool release]; return ret; } -

-
-$Revision-Id$ +
diff --git a/documentation/README.html b/documentation/README.html index f717c3d47..8917fa2e7 100644 --- a/documentation/README.html +++ b/documentation/README.html @@ -9,7 +9,7 @@

Installation Instructions

-

EPICS Base Release 3.16.0


+

EPICS Base Release 3.16.1



Table of Contents

@@ -190,12 +190,12 @@ CONFIG.CrossCommon Cross build definitions CONFIG.gnuCommon Gnu compiler build definitions for all archs CONFIG_ADDONS Definitions for <osclass> and DEFAULT options - CONFIG_APP_INCLUDE + CONFIG_APP_INCLUDE CONFIG_BASE EPICS base tool and location definitions CONFIG_BASE_VERSION Definitions for EPICS base version number CONFIG_COMMON Definitions common to all builds CONFIG_ENV Definitions of EPICS environment variables - CONFIG_FILE_TYPE + CONFIG_FILE_TYPE CONFIG_SITE Site specific make definitions CONFIG_SITE_ENV Site defaults for EPICS environment variables MAKEFILE Installs CONFIG* RULES* creates @@ -206,9 +206,9 @@ RULES_ARCHS Definitions and rules for building architectures RULES_BUILD Build and install rules and definitions RULES_DIRS Definitions and rules for building subdirectories - RULES_EXPAND - RULES_FILE_TYPE - RULES_TARGET + RULES_EXPAND + RULES_FILE_TYPE + RULES_TARGET RULES_TOP Rules specific to a <top> dir (uninstall and tar) Sample.Makefile Sample makefile with comments
@@ -340,7 +340,7 @@ Files in the base/startup directory have been provided to

Example application and extension

A perl tool, makeBaseApp.pl is included in the distribution file. This script will create a sample application that can be built - and then executed to try out this release of base. + and then executed to try out this release of base.

Instructions for building and executing the 3.15 example application @@ -350,8 +350,8 @@ Files in the base/startup directory have been provided to create and build an example application in a user created <top> directory. It also explains how to run the example application on a vxWorks ioc or as a process on the host system. - By running the example application as a host-based IOC, you will be - able to quickly implement a complete EPICS system and be able to run channel + By running the example application as a host-based IOC, you will be + able to quickly implement a complete EPICS system and be able to run channel access clients on the host system.

diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index 4da494f4a..0da4a7b4f 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -3,15 +3,16 @@ - EPICS Base R3.16.0.2 Release Notes + EPICS Base R3.16.1 Release Notes -

EPICS Base Release 3.16.0.2

+

EPICS Base Release 3.16.1

This version of EPICS Base has not been released yet.

-

Changes made on the 3.16 branch since 3.15.3

+ +

Changes made on the 3.16 branch since 3.16.0.1

+ +

Changes from the 3.14 branch since 3.15.5

+ + + +

Fix DNS related crash on exit

+ +

The attempt to fix DNS related delays for short lived CLI programs (eg. caget) +in lp:1527636 introduced a bug which cased these short lived clients to crash on exit. +This bug should now be fixed.

+ +

Server bind issue on Windows

+ +

When a National Instruments network variables CA server is already running on +a Windows system and an IOC or PCAS server is started, the IOC's attempt to +bind a TCP socket to the CA server port number fails, but Windows returns a +different error status value than the IOC is expecting in that circumstance +(because the National Instruments code requests exclusive use of that port, +unlike the EPICS code) so the IOC fails to start properly. The relevent EPICS +bind() checks have now been updated so the IOC will request that a dynamic port +number be allocated for this TCP socket instead when this happens.

+ +

Checking Periodic Scan Rates

+ +

Code has been added to the IOC startup to better protect it against bad +periodic scan rates, including against locales where . is not +accepted as a decimal separator character. If the scan period in a menuScan +choice string cannot be parsed, the associated periodic scan thread will no +longer be started by the IOC and a warning message will be displayed at iocInit +time. The scanppl command will also flag the faulty menuScan value.

+ + +

Changes made between 3.15.4 and 3.15.5

+ +

dbStatic Library Speedup and Cleanup

+ +

Loading of database files has been optimized to avoid overproportionally +long loading times for large databases. As a part of this, the alphabetical +ordering of records instances (within a record type) has been dropped. In the +unexpected case that applications were relying on the alphabetic order, setting +dbRecordsAbcSorted = 1 before loading the databases will retain the +old behavior.

+ +

The routine dbRenameRecord() has been removed, as it was intended +to be used by database configuration tools linked against a host side version +of the dbStatic library that is not being built anymore.

+ +

Launchpad Bug-fixes

+ +

In addition to the more detailed change descriptions below, the following +Launchpad bugs have also been fixed in this release:

+ +
    +
  • + #1440186 Crash due to a too small buffer being provided in + dbContextReadNotifyCache
  • +
  • + #1479316 Some data races found using Helgrind
  • +
  • + #1495833 biRecord prompt groups are nonsensical
  • +
  • + #1606848 WSAIoctl SIO_GET_INTERFACE_LIST failed in Windows
  • +
+ +

Whole-Program Optimization for MS Visual Studio Targets

+ +

When using the Microsoft compilers a new build system variable is provided +that controls whether whole program optimization is used or not. For static +builds using Visual Studio 2010 this optimization must be disabled. This is +controlled in the files configure/os/CONFIG_SITE.Common.windows-x64-static and +configure/os/CONFIG_SITE.Common.win32-x86-static by setting the variable +OPT_WHOLE_PROGRAM = NO to override the default value +YES that would otherwise be used.

+ +

Note that enabling this optimization slows down the build process. It is not +possible to selectively disable this optimization, when building a particular +module say; Microsoft's linker will restart itself automatically with the +-LTCG flag set and display a warning if it is asked to link any object +files that were compiled with the -GL flag.

+ +

Add dynamic (variable length) array support to PCAS

+ +

Dynamic array sizing support was added to the IOC server (RSRV) in the +Base-3.14.12 release, but has not until now been supported in the Portable +Channel Access Server (PCAS). Channel Access server applications using the +PCAS may not need to be modified at all; if they already push monitors with +different gdd array lengths, those variable sizes will be forwarded to any CA +clients who have requested variable length updates. The example CAS server +application has been modified to demonstrate this feature.

+ +

In implementing the above, the gdd method gdd::put(const gdd *) now +copies the full-sized array from the source gdd if the destination gdd is of +type array, has no allocated memory and a boundary size of 0.

+ +

Additional epicsTime conversion

+ +

The EPICS timestamp library (epicsTime) inside libCom's OSI layer has +been extended by routines that convert from struct tm to the EPICS +internal epicsTime type, assuming UTC - i.e. without going through +the timezone mechanism. This solves issues with converting from the structured +type to the EPICS timestamp at driver level from multiple threads at a high +repetition rate, where the timezone mechanism was blocking on file access.

+ +

MinGW Cross-builds from Linux

+ +

The build configuration files that allow cross-building of the 32-bit +win32-x86-mingw cross-target have been adjusted to default to building shared +libraries (DLLs) as this is now supported by recent MinGW compilers. The 64-bit +windows-x64-mingw cross-target was already being built that way by default. The +configuration options to tell the minGW cross-compiler to link programs with +static versions of the compiler support libraries have now been moved into the +CONFIG_SITE.linux-x86.target files.

+ +

General Time updates

+ +

The iocInit code now performs a sanity check of the current time +returned by the generalTime subsystem and will print a warning if the wall-clock +time returned has not been initialized yet. This is just a warning message; when +a time provider does synchonize the IOC will subsequently pick up and use the +correct time. This check code also primes the registered event system provider +if there is one so the epicsTimeGetEventInt() routine will work on IOCs +that ask for event time within an interrupt service routine.

+ +

The osiClockTime provider's synchronization thread (which is only used on +some embedded targets) will now poll the other time providers at 1Hz until the +first time it manages to get a successful timestamp, after which it will poll +for updates every 60 seconds as before.

+ +

The routine generalTimeGetExceptPriority() was designed for use by +backup (lower priority) time providers like the osiClockTime provider which do +not have their own absolute time reference and rely on other providers for an +absolute time source. This routine no longer implements the ratchet mechanism +that prevented the time it returned from going backwards. If the backup clock's +tick-timer runs fast the synchronization of the backup time provider would never +allow it to be corrected backwards when the ratchet was in place. The regular +epicsTimeGetCurrent() API still uses the ratchet mechanism, so this +change will not cause the IOC to see time going backwards.

+ +

Microsoft Visual Studio builds

+ +

The build configuration files for builds using the Microsoft compilers have +been updated, although there should be no noticable difference at most sites. +One extra compiler warning is now being suppressed for C++ code, C4344: +behavior change: use of explicit template arguments results in ... which is +gratuitous and was appearing frequently in builds of the EPICS V4 modules.

+ +

Cross-builds of the windows-x64 target from a win32-x86 host have been +removed as they don't actually work within the context of a single make +run. Significant changes to the build configuration files would be necessary for +these kinds of cross-builds to work properly, which could be done if someone +needs them (email Andrew Johnson before working on this, and see + +this stack-overflow answer for a starting point).

+ +

Bazaar keywords such as 'Revision-Id' removed

+ +

In preparation for moving to git in place of the Bazaar revision control +system we have removed all the keywords from the Base source code.

+ +

Linux systemd service file for CA Repeater

+ +

Building this version of Base on a Linux system creates a systemd service +file suitable for starting the Channel Access Repeater under systemd. The file +will be installed into the target bin directory, from where it can be copied +into the appropriate systemd location and modified as necessary. Installation +instructions are included as comments in the file.

+ + +

Changes made between 3.15.3 and 3.15.4

+ +

New string input device support "getenv"

+ +

A new "getenv" device support for both the stringin and lsi (long string +input) record types can be used to read the value of an environment variable +from the IOC at runtime. See base/db/softIocExit.db for sample usage.

+ +

Build rules and DELAY_INSTALL_LIBS

+ +

A new order-only prerequisite build rule has been added to ensure that +library files (and DLL stubs on Windows) get installed before linking any +executables, which resolves parallel build problems on high-powered CPUs. There +are some (rare) cases though where a Makefile has to build an executable and run +it to be able to compile code for a library built by the same Makefile. With +this new build rule GNUmake will complain about a circular dependency and the +build will probably fail in those cases. To avoid this problem the failing +Makefile should set DELAY_INSTALL_LIBS = YES before including the +$(TOP)/configure/RULES file, disabling the new build rule.

+ +

IOC environment variables and build parameters

+ +

The IOC now sets a number of environment variables at startup that provide +the version of EPICS Base it was built against (EPICS_VERSION_...) and its build +architecture (ARCH). In some cases this allows a single iocBoot/ioc directory to +be used to run the same IOC on several different architectures without any +changes.

+ +

There are also 3 new environment parameters (EPICS_BUILD_...) available that +C/C++ code can use to find out the target architecture, OS class and compiler +class it was built with. These may be useful when writing interfaces to other +languages.

+ +

New implementation of promptgroup/gui_group field property

+ +

The mechanism behind the "promptgroup()" field property inside a record type +definition has been changed. Instead of using a fixed set of choices, +the static database access library now collects the used gui group names +while parsing DBD information. Group names should start with a two-digit number +plus space-dash-space to allow proper sorting of groups.

+ +

The include file guigroup.h that defined the fixed set of choices +has been deprecated. Instead, use the conversion functions between index number +and group string that have been added to dbStaticLib.

+ +

When a DBD file containing record-type descriptions is expanded, any +old-style GUI_xxx group names will be replaced by a new-style +string for use by the IOC. This permits an older record type to be used with +the 3.15.4 release, although eventually record types should be converted by +hand with better group names used.

CA server configuration changes

@@ -351,7 +622,76 @@ dbQuietMacroWarnings=1 VxWorks 541119.

-

Changes pulled from the 3.14 branch since 3.15.3

+

Changes from the 3.14 branch between 3.15.3 and 3.15.4

+ +

NTP Time Provider adjusts to OS tick rate changes

+ +

Dirk Zimoch provided code that allows the NTP Time provider (used on VxWorks +and RTEMS only) to adapt to changes in the OS clock tick rate after the provider +has been initialized. Note that changing the tick rate after iocInit() is not +advisable, and that other software might still misbehave if initialized before +an OS tick rate change. This change was back-ported from the 3.15 branch.

+ +

Making IOC ca_get operations atomic

+ +

When a CA client gets data from an IOC record using a compound data type such +as DBR_TIME_DOUBLE the value field is fetched from the database in a +separate call than the other metadata, without keeping the record locked. This +allows some other thread such as a periodic scan thread a chance to interrupt +the get operation and process the record in between. CA monitors have always +been atomic as long as the value data isn't a string or an array, but this race +condition in the CA get path has now been fixed so the record will stay locked +between the two fetch operations.

+ +

This fixes +Launchpad bug #1581212, thanks to Till Strauman and Dehong Zhang.

+ +

New CONFIG_SITE variable for running self-tests

+ +

The 'make runtests' and 'make tapfiles' build targets normally only run the +self-tests for the main EPICS_HOST_ARCH architecture. If the host is +able to execute self-test programs for other target architectures that are being +built by the host, such as when building a -debug version of the host +architecture for example, the names of those other architectures can be added to +the new CROSS_COMPILER_RUNTEST_ARCHS variable in either the +configure/CONFIG_SITE file or in an appropriate +configure/os/CONFIG_SITE.<host>.Common file to have the test +programs for those targets be run as well.

+ +

Additional RELEASE file checks

+ +

An additional check has been added at build-time for the contents of the +configure/RELEASE file(s), which will mostly only affect users of the Debian +EPICS packages published by NSLS-2. Support modules may share an install path, +but all such modules must be listed adjacent to each other in any RELEASE files +that point to them. For example the following will fail the new checks:

+ +
+AUTOSAVE = /usr/lib/epics
+ASYN = /home/mdavidsaver/asyn
+EPICS_BASE = /usr/lib/epics
+
+ +

giving the compile-time error

+ +
+This application's RELEASE file(s) define
+	EPICS_BASE = /usr/lib/epics
+after but not adjacent to
+	AUTOSAVE = /usr/lib/epics
+Module definitions that share paths must be grouped together.
+Either remove a definition, or move it to a line immediately
+above or below the other(s).
+Any non-module definitions belong in configure/CONFIG_SITE.
+
+ + +

In many cases such as the one above the order of the AUTOSAVE and +ASYN lines can be swapped to let the checks pass, but if the +AUTOSAVE module depended on ASYN and hence had to appear +before it in the list this error indicates that AUTOSAVE should also be +built in its own private area; a shared copy would likely be incompatible with +the version of ASYN built in the home directory.

String field buffer overflows

diff --git a/documentation/ReleaseChecklist.html b/documentation/ReleaseChecklist.html index 62b1b9d0e..1cc67794c 100644 --- a/documentation/ReleaseChecklist.html +++ b/documentation/ReleaseChecklist.html @@ -32,37 +32,30 @@

EPICS Base Release Procedures & Checklist

-
-

$Date$
- $Authors$
- $Revision-Id$

-
-

This document describes the procedures and provides a checklist of tasks that should be performed when creating production releases of EPICS Base.

The Release Process

The version released on the Feature Freeze date is designated the first -pre-release, -pre1. The first Release Candidate -rc1 is the +pre-release, -pre1. The first release candidate -rc1 is the first version that has undergone widespread testing and which has no known problems in it that are slated to be fixed in this release. New versions should be made at about weekly intervals during the testing and debugging period, and -will be designated as either pre-release versions or Release Candidates by the -Release Manager. A Release Candidate that has received widespread testing for a -week without any additional problems being discovered or significant changes -being committed can be designated as the final release version.

+will be designated as either pre-release or release candidate versions by the +Release Manager. After a release candidate has been available to the whole +community for testing for at least a week without any additional problems being +reported or significant changes being committed, the branch can be designated as +the final release version.

Roles

-

The following roles are required. The individuals named here have have been -responsible for these tasks in the past and are expected to continue in the -relevent roles unless the Release Manager designates otherwise:

+

The following roles are used below:

-
Release Manager (Ralph Lange)
+
Release Manager ()
Responsible for managing and tagging the release
-
Platform Developers
+
Platform Developers (optional)
Responsible for individual operating system platforms
Application Developers
Responsible for support modules that depend on EPICS Base.
@@ -146,12 +139,12 @@ relevent roles unless the Release Manager designates otherwise:

  • R3.16.1-rcn - — release candidate tag, note the rc is now - lower-case
  • + — release candidate tag +
    cd ~/base/mirror-3.16
    - bzr tag R3.16.1-rcn + bzr tag R3.16.1-rc1
    @@ -162,14 +155,16 @@ relevent roles unless the Release Manager designates otherwise:

    generates a gzipped tarfile directly from the repository:
    cd ~/base
    - bzr export --keywords=publish - --root=base-3.16.1-rcn - -r tag:R3.16.1-rcn - base-3.16.1-rcn.tar.gz + bzr export + --root=base-3.16.1-rc1 + -r tag:R3.16.1-rc1 + base-3.16.1-rc1.tar.gz mirror-3.16
    - This requires that the Bazaar keywords plugin is installed and - configured properly. + Create a GPG signature file of the tarfile as follows: +
    + gpg --armor --sign --detach-sig base-3.16.1-rc1.tar.gz +
    @@ -262,7 +257,7 @@ relevent roles unless the Release Manager designates otherwise:

      Release Manager Obtain a positive Ok to release from all platform developers - once a Release Candidate version has gone a whole week without any + once a release candidate version has gone a whole week without any issues being reported. @@ -291,14 +286,16 @@ relevent roles unless the Release Manager designates otherwise:

    generates a gzipped tarfile directly from the repository:
    cd ~/base
    - bzr export --keywords=publish + bzr export --root=base-3.16.1 -r tag:R3.16.1 base-3.16.1.tar.gz mirror-3.16
    - This requires that the Bazaar keywords plugin is installed and - configured properly. + Create a GPG signature file of the tarfile as follows: +
    + gpg --armor --sign --detach-sig base-3.16.1.tar.gz +
    @@ -307,14 +304,25 @@ relevent roles unless the Release Manager designates otherwise:

    Test the tar file by extracting its contents and building it on at least one supported platform + +   + Release Manager + Upload the release tar file to the Launchpad download area. + + +   + Release Manager + Find all Launchpad bug reports with the status Fix Committed which + have been fixed in this release and mark them Fix Released. + Publish and Announce it   Website Manager - If necessary recreate the tarfile following the instructions above. - Copy the tar file to the Base download area of the website + Copy the tar file and its .asc signature file to the Base + download area of the website.   @@ -344,24 +352,13 @@ relevent roles unless the Release Manager designates otherwise:

      Website Manager - Upload the release tar file to the Launchpad download area. - - -   - Website Manager - Find all Launchpad bug reports with the status Fix Committed which - have been fixed in this release and mark them Fix Released. + Add an entry to the website News page, linking to the new version + webpage.   Release Manager - Email tech-talk - - -   - Website Manager - Add an entry to the website News page, linking to the new version - webpage. + Announce the release on the tech-talk mailing list. diff --git a/src/Makefile b/src/Makefile index 74dfc172a..257099840 100644 --- a/src/Makefile +++ b/src/Makefile @@ -6,9 +6,6 @@ # EPICS BASE is distributed subject to a Software License Agreement found # in the file LICENSE that is included with this distribution. #************************************************************************* -# -# $Revision-Id$ -# TOP = .. include $(TOP)/configure/CONFIG diff --git a/src/ca/client/CAref.html b/src/ca/client/CAref.html index 56b5a5c01..2bdd0b452 100644 --- a/src/ca/client/CAref.html +++ b/src/ca/client/CAref.html @@ -51,8 +51,6 @@ width="88"> Valid HTML 4.01!

    -

    Modified on -$Date$


    Table of Contents

    @@ -1148,16 +1146,10 @@ the output.

    Wide mode "name timestamp value stat sevr" (read PVs as DBR_TIME_xxx) - - -n - Print DBF_ENUM values as number (default are enum strings) - -d <type> - Request specific dbr type; use string (DBR_ prefix may be omitted) - -

    or number of one of the following types:

    - + Request specific dbr type; use string (DBR_ prefix may be omitted)
    + or number of one of the following types:
    @@ -1274,6 +1266,14 @@ the output.

    + + + Enum format: + + + -n + Print DBF_ENUM value as number (default is enum string) + Arrays: @@ -1305,15 +1305,15 @@ the output.

    -e <nr> - Use %e format, with <nr> digits after the decimal point + Use %e format, with a precision of <nr> digits -f <nr> - Use %f format, with <nr> digits after the decimal point + Use %f format, with a precision of <nr> digits -g <nr> - Use %g format, with <nr> digits after the decimal point + Use %g format, with a precision of <nr> digits -s @@ -1351,6 +1351,14 @@ the output.

    -0b Print as binary number + + + Alternate output field separator: + + + -F <ofs> + Use <ofs> as an alternate output field separator + @@ -1383,9 +1391,10 @@ the output.

    Wait time, specifies longer CA timeout, default is 1.0 second - -m <mask> - Specify CA event mask to use, with <mask> being any combination - of 'v' (value), 'a' (alarm), 'l' (log), 'p' (property). Default: va + -m <msk> + Specify CA event mask to use. <msk> is any combination of
    + 'v' (value), 'a' (alarm), 'l' (log/archive), 'p' (property).
    + Default event mask is 'va' -p <prio> @@ -1407,8 +1416,8 @@ the output.

    'n' = no timestamps
    'r' = relative timestamps (time elapsed since start of program)
    'i' = incremental timestamps (time elapsed since last update)
    - 'I' = incremental timestamps (time elapsed since last update, by - channel) + 'I' = incremental timestamps (time since last update, by channel)
    + 'r', 'i' or 'I' require 's' or 'c' to select the time source @@ -1416,7 +1425,7 @@ the output.

    -n - Print DBF_ENUM values as number (default are enum strings) + Print DBF_ENUM values as number (default is enum string) @@ -1424,16 +1433,15 @@ the output.

    - Value format: Print number of requested values, then list of - values + Array values: Print number of elements, then list of values Default: - Print all values + Default: Request and print all elements (dynamic arrays supported) - -# <count> - Print first <count> elements of an array + -# <num> + Request and print up to <num> elements -S @@ -1441,23 +1449,23 @@ the output.

    - Floating point type format: + Floating point format: Default: Use %g format - -e <nr> - Use %e format, with <nr> digits after the decimal point + -e <num> + Use %e format, with a precision of <num> digits - -f <nr> - Use %f format, with <nr> digits after the decimal point + -f <num> + Use %f format, with a precision of <num> digits - -g <nr> - Use %g format, with <nr> digits after the decimal point + -g <num> + Use %g format, with a precision of <num> digits -s @@ -1499,21 +1507,27 @@ the output.

    caput

    -
    caput [options] <PV name> <value>
    +
    caput [options] <PV name> <value> ...
     caput -a [options] <PV name> <no of elements> <value> ...

    Description

    Put value to a PV.

    -

    The specified value is written to the PV (as a string). The PV value is read -before and after the write operation and printed as "Old" and "new" values on -stdout.

    +

    The specified value is written to the PV (as a string). The PV's value is +read before and after the write operation and printed as "Old" and "New" values +on stdout.

    -

    The array variant writes an array to the specified PV. The first numeric -argument specifying the number of array elements is kept for compatibility with -the array data format of caget - the actual number of values specified on the -command line is used.

    +

    There are two variants to the arguments for this command. For the scalar +variant without the -a flag, all the value arguments provided after +the PV name are concatenated with a single space character between them, and the +resulting string (up to 40 characters long unless the -S flag is +given) is written to the specified PV.

    + +

    The array variant with the -a flag writes an array of string +values to the specified PV. The numeric argument giving the number of array +elements is actually ignored, the array length to be written is actually +controlled by the number of values provided on the command line.

    @@ -1552,12 +1566,16 @@ command line is used.

    + + + + - + @@ -1573,17 +1591,24 @@ command line is used.

    - - + + - + - + + + + + + + + +
    -t Terse mode - print only successfully written value, without name
    -lLong mode "name timestamp value stat sevr" (read PVs as DBR_TIME_xxx)
    Enum Format:
    Default: Auto - try value as ENUM string, then as index number
    Arrays:
    -aPut array dataDefault:Put scalar
    Value format: Print number of requested values, then list of - valuesValue format: all value arguments concatenated with spaces
    -SPut string as an array of char (long string)Put string as an array of chars (long string)
    -aPut array
    Value format: number of values, then list of values
    diff --git a/src/ca/client/Makefile b/src/ca/client/Makefile index fcbc574cf..358552b46 100644 --- a/src/ca/client/Makefile +++ b/src/ca/client/Makefile @@ -69,7 +69,6 @@ LIBSRCS += comQueSend.cpp LIBSRCS += comBuf.cpp LIBSRCS += hostNameCache.cpp LIBSRCS += msgForMultiplyDefinedPV.cpp -LIBSRCS_vxWorks += templateInstances.cpp LIBRARY=ca @@ -100,8 +99,12 @@ caConnTest_SRCS = caConnTestMain.cpp caConnTest.cpp casw_SYS_LIBS_solaris = socket -SCRIPTS_solaris := S99caRepeater -SCRIPTS_Linux := S99caRepeater +SCRIPTS_HOST = S99caRepeater +SCRIPTS_Linux = caRepeater.service + +EXPAND += S99caRepeater@ +EXPAND += caRepeater.service@ +EXPAND_VARS = INSTALL_BIN=$(abspath $(INSTALL_BIN)) SRC_DIRS += $(TOP)/src/ca/client/test PROD_HOST += ca_test @@ -112,6 +115,3 @@ ca_test_SYS_LIBS_WIN32 = ws2_32 advapi32 user32 OBJS_vxWorks += ca_test include $(TOP)/configure/RULES - -S99%: ../rc2.% - sed -e s%:INSTALL_BIN:%`cd $(INSTALL_BIN); pwd`% $< >$@ diff --git a/src/ca/client/rc2.caRepeater b/src/ca/client/S99caRepeater@ similarity index 96% rename from src/ca/client/rc2.caRepeater rename to src/ca/client/S99caRepeater@ index 4db37b49a..aabefb72c 100644 --- a/src/ca/client/rc2.caRepeater +++ b/src/ca/client/S99caRepeater@ @@ -3,7 +3,7 @@ # System-V init script for the EPICS CA Repeater. # -INSTALL_BIN=:INSTALL_BIN: +INSTALL_BIN=@INSTALL_BIN@ # To change the default values for the EPICS environment parameters, # uncomment and modify the relevant lines below. These are the only diff --git a/src/ca/client/autoPtrDestroy.h b/src/ca/client/autoPtrDestroy.h deleted file mode 100644 index ef7360736..000000000 --- a/src/ca/client/autoPtrDestroy.h +++ /dev/null @@ -1,94 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -/* - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, The Regents of the University of California. - * - * - * Author Jeffrey O. Hill - * johill@lanl.gov - * 505 665 1831 - */ - -#ifndef autoPtrDestroyh -#define autoPtrDestroyh - -template < class T > -class autoPtrDestroy { -public: - autoPtrDestroy ( T * ); - ~autoPtrDestroy (); - T & operator * () const; - T * operator -> () const; - autoPtrDestroy & operator = ( T * ); - T * get () const; - T * release (); -private: - T * p; - // not implemented - autoPtrDestroy & operator = ( const autoPtrDestroy & ); - autoPtrDestroy ( const autoPtrDestroy & ); -}; - -template < class T > -inline autoPtrDestroy::autoPtrDestroy ( T *pIn ) : - p ( pIn ) {} - -template < class T > -inline autoPtrDestroy::~autoPtrDestroy () -{ - if ( this->p ) { - this->p->destroy (); - } -} - -template < class T > -inline T & autoPtrDestroy::operator * () const -{ - return * this->p; -} - -template < class T > -inline T * autoPtrDestroy::operator -> () const -{ - return this->p; -} - -template < class T > -inline autoPtrDestroy & autoPtrDestroy::operator = ( T * pIn ) -{ - if ( this->p ) { - this->p->destroy (); - } - this->p = pIn; - return *this; -} - -template < class T > -inline T * autoPtrDestroy::get () const -{ - return this->p; -} - -template < class T > -inline T * autoPtrDestroy::release () -{ - T *pTmp = this->p; - this->p = 0; - return pTmp; -} - -#endif // #ifdef autoPtrDestroyh diff --git a/src/ca/client/caRepeater.service@ b/src/ca/client/caRepeater.service@ new file mode 100644 index 000000000..ee50305a1 --- /dev/null +++ b/src/ca/client/caRepeater.service@ @@ -0,0 +1,25 @@ +# +# Linux systemd service file for the EPICS CA Repeater +# +# To install this file, as root: +# cp caRepeater.service /etc/systemd/system +# chmod 664 /etc/systemd/system/caRepeater.service +# systemctl daemon-reload +# systemctl enable caRepeater +# systemctl start caRepeater +# +# To check the status: +# systemctl status caRepeater + +[Unit] +Description=EPICS CA Repeater +Requires=network.target +After=network.target + +[Service] +ExecStart=@INSTALL_BIN@/caRepeater +Restart=always +User=daemon + +[Install] +WantedBy=multi-user.target diff --git a/src/ca/client/ca_client_context.cpp b/src/ca/client/ca_client_context.cpp index 20a6e84c8..2bb3e24a8 100644 --- a/src/ca/client/ca_client_context.cpp +++ b/src/ca/client/ca_client_context.cpp @@ -159,7 +159,7 @@ ca_client_context::ca_client_context ( bool enablePreemptiveCallback ) : this->localPort = htons ( tmpAddr.ia.sin_port ); } - epics_auto_ptr < CallbackGuard > pCBGuard; + std::auto_ptr < CallbackGuard > pCBGuard; if ( ! enablePreemptiveCallback ) { pCBGuard.reset ( new CallbackGuard ( this->cbMutex ) ); } diff --git a/src/ca/client/cac.cpp b/src/ca/client/cac.cpp index 9d23cce62..bdfc68c73 100644 --- a/src/ca/client/cac.cpp +++ b/src/ca/client/cac.cpp @@ -149,9 +149,9 @@ cac::cac ( iiuExistenceCount ( 0u ), cacShutdownInProgress ( false ) { - if ( ! osiSockAttach () ) { - throwWithLocation ( caErrorCode (ECA_INTERNAL) ); - } + if ( ! osiSockAttach () ) { + throwWithLocation ( udpiiu :: noSocket () ); + } try { long status; @@ -333,6 +333,12 @@ cac::~cac () this->ipToAEngine.release (); + // clean-up the list of un-notified msg objects + while ( msgForMultiplyDefinedPV * msg = this->msgMultiPVList.get() ) { + msg->~msgForMultiplyDefinedPV (); + this->mdpvFreeList.release ( msg ); + } + errlogFlush (); osiSockRelease (); @@ -606,6 +612,8 @@ void cac::transferChanToVirtCircuit ( msgForMultiplyDefinedPV * pMsg = new ( this->mdpvFreeList ) msgForMultiplyDefinedPV ( this->ipToAEngine, *this, pChan->pName ( guard ), acc ); + // cac keeps a list of these objects for proper clean-up in ~cac + this->msgMultiPVList.add ( *pMsg ); // It is possible for the ioInitiate call below to // call the callback directly if queue quota is exceeded. // This callback takes the callback lock and therefore we @@ -627,11 +635,13 @@ void cac::transferChanToVirtCircuit ( // must occur before moving to new iiu pChan->getPIIU(guard)->uninstallChanDueToSuccessfulSearchResponse ( guard, *pChan, currentTime ); - piiu->installChannel ( - guard, *pChan, sid, typeCode, count ); + if ( piiu ) { + piiu->installChannel ( + guard, *pChan, sid, typeCode, count ); - if ( newIIU ) { - piiu->start ( guard ); + if ( newIIU ) { + piiu->start ( guard ); + } } } @@ -1296,7 +1306,11 @@ void cac::pvMultiplyDefinedNotify ( msgForMultiplyDefinedPV & mfmdpv, callbackManager mgr ( this->notify, this->cbMutex ); epicsGuard < epicsMutex > guard ( this->mutex ); this->exception ( mgr.cbGuard, guard, ECA_DBLCHNL, buf, __FILE__, __LINE__ ); + + // remove from the list under lock + this->msgMultiPVList.remove ( mfmdpv ); } + // delete msg object mfmdpv.~msgForMultiplyDefinedPV (); this->mdpvFreeList.release ( & mfmdpv ); } diff --git a/src/ca/client/cac.h b/src/ca/client/cac.h index 9f9d45a65..99c3d3d27 100644 --- a/src/ca/client/cac.h +++ b/src/ca/client/cac.h @@ -237,6 +237,7 @@ private: resTable < tcpiiu, caServerID > serverTable; tsDLList < tcpiiu > circuitList; tsDLList < SearchDest > searchDestList; + tsDLList < msgForMultiplyDefinedPV > msgMultiPVList; tsFreeList < class tcpiiu, 32, epicsMutexNOOP > freeListVirtualCircuit; diff --git a/src/ca/client/iocinf.h b/src/ca/client/iocinf.h index c0c33d6c2..0d3b57db1 100644 --- a/src/ca/client/iocinf.h +++ b/src/ca/client/iocinf.h @@ -61,11 +61,6 @@ static const double CA_CONN_VERIFY_PERIOD = 30.0; /* (sec) how often to request */ static const unsigned contiguousMsgCountWhichTriggersFlowControl = 10u; -class caErrorCode { -public: - caErrorCode ( int ) {}; -}; - /* * CA internal functions */ diff --git a/src/ca/client/msgForMultiplyDefinedPV.cpp b/src/ca/client/msgForMultiplyDefinedPV.cpp index 2f1a45cde..7002dd4b9 100644 --- a/src/ca/client/msgForMultiplyDefinedPV.cpp +++ b/src/ca/client/msgForMultiplyDefinedPV.cpp @@ -55,8 +55,10 @@ msgForMultiplyDefinedPV::~msgForMultiplyDefinedPV () void msgForMultiplyDefinedPV::transactionComplete ( const char * pHostNameRej ) { + // calls into cac for the notification + // the msg object (= this) is being deleted as part of the notification this->cb.pvMultiplyDefinedNotify ( *this, this->channel, this->acc, pHostNameRej ); - // !! dont touch this pointer after this point because object has been deleted !! + // !! dont touch 'this' pointer after this point because object has been deleted !! } void * msgForMultiplyDefinedPV::operator new ( size_t size, diff --git a/src/ca/client/msgForMultiplyDefinedPV.h b/src/ca/client/msgForMultiplyDefinedPV.h index 45d3453ac..3f1e771c0 100644 --- a/src/ca/client/msgForMultiplyDefinedPV.h +++ b/src/ca/client/msgForMultiplyDefinedPV.h @@ -33,6 +33,7 @@ #include "ipAddrToAsciiAsynchronous.h" #include "tsFreeList.h" +#include "tsDLList.h" #include "compilerDependencies.h" #ifdef msgForMultiplyDefinedPVh_epicsExportSharedSymbols @@ -47,7 +48,9 @@ public: const char * pAcc, const char * pRej ) = 0; }; -class msgForMultiplyDefinedPV : public ipAddrToAsciiCallBack { +class msgForMultiplyDefinedPV : + public ipAddrToAsciiCallBack, + public tsDLNode < msgForMultiplyDefinedPV > { public: msgForMultiplyDefinedPV ( ipAddrToAsciiEngine & engine, callbackForMultiplyDefinedPV &, const char * pChannelName, @@ -62,8 +65,8 @@ private: ipAddrToAsciiTransaction & dnsTransaction; callbackForMultiplyDefinedPV & cb; void transactionComplete ( const char * pHostName ); - msgForMultiplyDefinedPV ( const msgForMultiplyDefinedPV & ); - msgForMultiplyDefinedPV & operator = ( const msgForMultiplyDefinedPV & ); + msgForMultiplyDefinedPV ( const msgForMultiplyDefinedPV & ); + msgForMultiplyDefinedPV & operator = ( const msgForMultiplyDefinedPV & ); void operator delete ( void * ); }; diff --git a/src/ca/client/nciu.h b/src/ca/client/nciu.h index 4994465a8..7cba6e82b 100644 --- a/src/ca/client/nciu.h +++ b/src/ca/client/nciu.h @@ -58,6 +58,7 @@ protected: channelNode (); bool isInstalledInServer ( epicsGuard < epicsMutex > & ) const; bool isConnected ( epicsGuard < epicsMutex > & ) const; +public: static unsigned getMaxSearchTimerCount (); private: enum channelState { diff --git a/src/ca/client/oldAccess.h b/src/ca/client/oldAccess.h index 04f551839..c893eeb68 100644 --- a/src/ca/client/oldAccess.h +++ b/src/ca/client/oldAccess.h @@ -26,13 +26,14 @@ #ifndef oldAccessh #define oldAccessh +#include + #ifdef epicsExportSharedSymbols # define oldAccessh_restore_epicsExportSharedSymbols # undef epicsExportSharedSymbols #endif #include "tsFreeList.h" -#include "epicsMemory.h" #include "compilerDependencies.h" #include "osiSock.h" @@ -402,8 +403,8 @@ private: epicsEvent ioDone; epicsEvent callbackThreadActivityComplete; epicsThreadId createdByThread; - epics_auto_ptr < CallbackGuard > pCallbackGuard; - epics_auto_ptr < cacContext > pServiceContext; + std::auto_ptr < CallbackGuard > pCallbackGuard; + std::auto_ptr < cacContext > pServiceContext; caExceptionHandler * ca_exception_func; void * ca_exception_arg; caPrintfFunc * pVPrintfFunc; diff --git a/src/ca/client/perl/Cap5.xs b/src/ca/client/perl/Cap5.xs index 287c1826c..e519198ec 100644 --- a/src/ca/client/perl/Cap5.xs +++ b/src/ca/client/perl/Cap5.xs @@ -1138,6 +1138,20 @@ void CA_add_exception_event(const char *class, SV *sub) { static SV * printf_sub = NULL; +#ifndef va_copy +# ifdef __GNUC__ +# define va_copy(d, s) __va_copy(d, s) +# else +# define va_copy(d, s) ((d) = (s)) +/* The above macro is NOT PORTABLE but works on Windows when + * stdarg.h doesn't provide va_copy(). Some architectures need + * define va_copy(d, s) ((*d) = (*s)) + * while others may be even more complicated, but hopefully the + * system stdarg.h header defines va_copy() in those cases. + */ +# endif +#endif + static int printf_handler(const char *format, va_list args) { if (! printf_sub) @@ -1152,11 +1166,7 @@ int printf_handler(const char *format, va_list args) { ENTER; SAVETMPS; -#ifdef __GNUC__ - __va_copy(argcopy, args); -#else va_copy(argcopy, args); -#endif printf_str = NEWSV(0, strlen(format) + 32); sv_vsetpvf(printf_str, format, &argcopy); diff --git a/src/ca/client/perl/Makefile b/src/ca/client/perl/Makefile index bac6e347a..fb0fc96ff 100644 --- a/src/ca/client/perl/Makefile +++ b/src/ca/client/perl/Makefile @@ -20,10 +20,19 @@ ifeq ($(OS_CLASS),Darwin) LOADABLE_SHRLIB_SUFFIX = .$(shell $(PERL) ../perlConfig.pl dlext) endif -PERL_VERSION = $(shell $(PERL) ../perlConfig.pl version) -PERL_ARCHNAME = $(shell $(PERL) ../perlConfig.pl archname) -PERL_ARCHPATH = $(PERL_VERSION)/$(PERL_ARCHNAME) +ifdef T_A + PERL_VERSION = $(shell $(PERL) ../perlConfig.pl version) + PERL_ARCHNAME = $(shell $(PERL) ../perlConfig.pl archname) + PERL_ARCHPATH := $(PERL_VERSION)/$(PERL_ARCHNAME) + EXTUTILS := $(shell $(PERL) ../perlConfig.pl privlib)/ExtUtils + PERLBIN := $(shell $(PERL) ../perlConfig.pl bin) + XSUBPP := $(firstword $(wildcard $(PERLBIN)/xsubpp $(EXTUTILS)/xsubpp)) + +ifeq ($(strip $(XSUBPP)),) + $(warning Perl's xsubpp program was not found.) + $(warning The Perl CA module will not be built.) +else ifeq ($(T_A),$(EPICS_HOST_ARCH)) # No cross-builds (wrong Perl!) ifeq ($(findstring $(OS_CLASS),WIN32 cygwin32),) # Doesn't build on WIN32 LOADABLE_LIBRARY_HOST = Cap5 @@ -41,6 +50,8 @@ ifeq ($(findstring $(OS_CLASS),WIN32 cygwin32),) # Doesn't build on WIN32 HTMLS = CA.html endif endif +endif +endif Cap5_SRCS = Cap5.xs Cap5_LIBS = ca Com @@ -52,10 +63,6 @@ CLEANS += Cap5.c pod2htmd.tmp pod2htmi.tmp include $(TOP)/configure/RULES ifdef T_A - EXTUTILS = $(shell $(PERL) ../perlConfig.pl privlib)/ExtUtils - PERLBIN = $(shell $(PERL) ../perlConfig.pl bin) - XSUBPP = $(firstword $(wildcard $(PERLBIN)/xsubpp $(EXTUTILS)/xsubpp)) - %.c: ../%.xs $(RM) $@ $@_new $(PERL) $(XSUBPP) -typemap $(EXTUTILS)/typemap $< > $@_new && $(MV) $@_new $@ diff --git a/src/ca/client/perl/perlConfig.pl b/src/ca/client/perl/perlConfig.pl index 01b9b9fdd..5292041d1 100644 --- a/src/ca/client/perl/perlConfig.pl +++ b/src/ca/client/perl/perlConfig.pl @@ -3,7 +3,13 @@ # This script is used to extract information about the Perl build # configuration, so the EPICS build system uses the same settings. +use strict; use Config; my $arg = shift; -print $Config{$arg}; +my $val = $Config{$arg}; + +$val =~ s{\\}{/}go + if $^O eq 'MSWin32'; + +print $val; diff --git a/src/ca/client/repeater.cpp b/src/ca/client/repeater.cpp index 5e123ee2d..61ba33fc5 100644 --- a/src/ca/client/repeater.cpp +++ b/src/ca/client/repeater.cpp @@ -504,6 +504,7 @@ void ca_repeater () if ( sockerrno == SOCK_EADDRINUSE ) { osiSockRelease (); debugPrintf ( ( "CA Repeater: exiting because a repeater is already running\n" ) ); + delete [] pBuf; return; } char sockErrBuf[64]; diff --git a/src/ca/client/searchTimer.cpp b/src/ca/client/searchTimer.cpp index e5a8d1c54..e55e49eab 100644 --- a/src/ca/client/searchTimer.cpp +++ b/src/ca/client/searchTimer.cpp @@ -24,7 +24,6 @@ #define epicsAssertAuthor "Jeff Hill johill@lanl.gov" -#include "tsMinMax.h" #include "envDefs.h" #define epicsExportSharedSymbols diff --git a/src/ca/client/tcpiiu.cpp b/src/ca/client/tcpiiu.cpp index 58b1b0c0f..7fd848b20 100644 --- a/src/ca/client/tcpiiu.cpp +++ b/src/ca/client/tcpiiu.cpp @@ -44,12 +44,7 @@ using namespace std; -#if 0 -const unsigned mSecPerSec = 1000u; -const unsigned uSecPerSec = 1000u * mSecPerSec; -#endif - -tcpSendThread::tcpSendThread ( +tcpSendThread::tcpSendThread ( class tcpiiu & iiuIn, const char * pName, unsigned stackSize, unsigned priority ) : thread ( *this, pName, stackSize, priority ), iiu ( iiuIn ) @@ -807,28 +802,6 @@ tcpiiu::tcpiiu ( } } -# if 0 - // - // windows has a really strange implementation of thess options - // and we can avoid the need for this by using pthread_kill on unix - // - { - struct timeval timeout; - double pollInterval = connectionTimeout / 8.0; - timeout.tv_sec = static_cast < long > ( pollInterval ); - timeout.tv_usec = static_cast < long > - ( ( pollInterval - timeout.tv_sec ) * uSecPerSec ); - // intentionally ignore status as we dont expect that all systems - // will accept this request - setsockopt ( this->sock, SOL_SOCKET, SO_SNDTIMEO, - ( char * ) & timeout, sizeof ( timeout ) ); - // intentionally ignore status as we dont expect that all systems - // will accept this request - setsockopt ( this->sock, SOL_SOCKET, SO_RCVTIMEO, - ( char * ) & timeout, sizeof ( timeout ) ); - } -# endif - if ( isNameService() ) { pSearchDest->setCircuit ( this ); } diff --git a/src/ca/client/templateInstances.cpp b/src/ca/client/templateInstances.cpp deleted file mode 100644 index dd8b5113e..000000000 --- a/src/ca/client/templateInstances.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -/* - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * - * Author Jeffrey O. Hill - * johill@lanl.gov - * 505 665 1831 - */ - -#define epicsExportSharedSymbols -#include "virtualCircuit.h" -#include "bhe.h" -#include "cac.h" -#include "syncGroup.h" -#include "nciu.h" -#include "udpiiu.h" -#include "oldAccess.h" -#include "msgForMultiplyDefinedPV.h" -#include "repeaterClient.h" -#include "hostNameCache.h" -#include "comBuf.h" - -#ifdef _MSC_VER -# pragma warning ( push ) -# pragma warning ( disable:4660 ) -#endif - -template class resTable < nciu, chronIntId >; -template class chronIntIdResTable < nciu >; -template class resTable < baseNMIU, chronIntId >; -template class chronIntIdResTable < baseNMIU >; -template class resTable < CASG, chronIntId >; -template class chronIntIdResTable < CASG >; -template class resTable < bhe, inetAddrID >; -template class resTable < tcpiiu, caServerID >; -template class tsFreeList < bhe, 0x100 >; -template class tsFreeList < tcpiiu, 32, epicsMutexNOOP >; -template class tsFreeList < netReadNotifyIO, 1024, epicsMutexNOOP >; -template class tsFreeList < netWriteNotifyIO, 1024, epicsMutexNOOP >; -template class tsFreeList < netSubscription, 1024, epicsMutexNOOP >; -template class tsFreeList < CASG, 128, epicsMutexNOOP >; -template class tsFreeList < syncGroupReadNotify, 128, epicsMutexNOOP >; -template class tsFreeList < syncGroupWriteNotify, 128, epicsMutexNOOP >; -template class tsFreeList < comBuf, 0x20 >; -template class tsFreeList < getCallback, 1024, epicsMutexNOOP >; -template class tsFreeList < getCopy, 1024, epicsMutexNOOP >; -template class tsFreeList < msgForMultiplyDefinedPV, 16 >; -template class tsFreeList < nciu, 1024, epicsMutexNOOP>; -template class tsFreeList < oldChannelNotify, 1024, epicsMutexNOOP >; -template class tsFreeList < oldSubscription, 1024, epicsMutexNOOP >; -template class tsFreeList < putCallback, 1024, epicsMutexNOOP >; -template class tsFreeList < repeaterClient, 0x20 >; -template class epicsSingleton < localHostName >; -template class epics_auto_ptr < epics_auto_ptr < class searchTimer >, eapt_array >; -template unsigned comBuf :: push ( const double * pValue, unsigned nElem ); -template unsigned comBuf :: push ( const float * pValue, unsigned nElem ); -template unsigned comBuf :: push ( const int * pValue, unsigned nElem ); -template unsigned comBuf :: push ( const short * pValue, unsigned nElem ); -template comBuf :: popStatus comBuf :: pop ( unsigned int & returnVal ); -template comBuf :: popStatus comBuf :: pop ( unsigned short & returnVal ); -template comBuf :: popStatus comBuf :: pop ( unsigned char & returnVal ); -template void WireSet ( float const &, unsigned char * ); -template void WireSet ( int const &, unsigned char * ); -template void WireSet ( short const &, unsigned char * ); -template void ca_client_context :: whenThereIsAnExceptionDestroySyncGroupIO - (epicsGuard < epicsMutex > &, syncGroupWriteNotify & ); -template void ca_client_context :: whenThereIsAnExceptionDestroySyncGroupIO - ( epicsGuard < epicsMutex > &, syncGroupReadNotify & ); - - -#ifdef _MSC_VER -# pragma warning ( pop ) -#endif diff --git a/src/ca/client/test/ca_test.c b/src/ca/client/test/ca_test.c index f4954797f..998536843 100644 --- a/src/ca/client/test/ca_test.c +++ b/src/ca/client/test/ca_test.c @@ -7,12 +7,9 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* @(#)ca_test.c $Revision-Id$ +/* * Author: Jeff Hill * Date: 07-01-91 - * - * make options - * -DvxWorks makes a version for VxWorks */ /* diff --git a/src/ca/client/test/ca_test.h b/src/ca/client/test/ca_test.h index f14fea600..076f8936a 100644 --- a/src/ca/client/test/ca_test.h +++ b/src/ca/client/test/ca_test.h @@ -7,7 +7,7 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* @(#)ca_test.k $Revision-Id$ +/* * Author: Jeff Hill * Date: 21JAN2000 */ diff --git a/src/ca/client/test/ca_test_main.c b/src/ca/client/test/ca_test_main.c index ae41f40ef..85fd7ea19 100644 --- a/src/ca/client/test/ca_test_main.c +++ b/src/ca/client/test/ca_test_main.c @@ -7,7 +7,7 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* @(#)ca_test_main.c $Revision-Id$ +/* * Author: Jeff Hill * Date: 21JAN2000 */ diff --git a/src/ca/client/tools/caput.c b/src/ca/client/tools/caput.c index fbd4ef79e..9c50cd9df 100644 --- a/src/ca/client/tools/caput.c +++ b/src/ca/client/tools/caput.c @@ -56,7 +56,7 @@ static epicsEventId epId; void usage (void) { - fprintf (stderr, "\nUsage: caput [options] \n" + fprintf (stderr, "\nUsage: caput [options] ...\n" " caput -a [options] ...\n\n" " -h: Help: Print this message\n" "Channel Access options:\n" @@ -71,9 +71,11 @@ void usage (void) " -n: Force interpretation of values as numbers\n" " -s: Force interpretation of values as strings\n" "Arrays:\n" + " Default: Put scalar\n" + " Value format: all value arguments concatenated with spaces\n" + " -S: Put string as an array of chars (long string)\n" " -a: Put array\n" - " Value format: number of requested values, then list of values\n" - " -S: Put string as an array of char (long string)\n" + " Value format: number of values, then list of values\n" "Alternate output field separator:\n" " -F : Use as an alternate output field separator\n" "\nExample: caput my_channel 1.2\n" @@ -492,14 +494,13 @@ int main (int argc, char *argv[]) } else { /* Not an ENUM */ if (charArrAsStr) { - count = len; dbrType = DBR_CHAR; - ebuf = calloc(strlen(cbuf)+1, sizeof(char)); + ebuf = calloc(len, sizeof(char)); if(!ebuf) { fprintf(stderr, "Memory allocation failed\n"); return 1; } - epicsStrnRawFromEscaped(ebuf, strlen(cbuf)+1, cbuf, strlen(cbuf)); + count = epicsStrnRawFromEscaped(ebuf, len, cbuf, len-1) + 1; } else { for (i = 0; i < count; ++i) { epicsStrnRawFromEscaped(sbuf[i], sizeof(EpicsStr), *(argv+optind+i), sizeof(EpicsStr)); diff --git a/src/ca/client/udpiiu.cpp b/src/ca/client/udpiiu.cpp index adf2ba949..8bd3b5831 100644 --- a/src/ca/client/udpiiu.cpp +++ b/src/ca/client/udpiiu.cpp @@ -64,6 +64,52 @@ const udpiiu::pProtoStubUDP udpiiu::udpJumpTableCAC [] = &udpiiu::repeaterAckAction, }; + +static +double getMaxPeriod() +{ + double maxPeriod = maxSearchPeriodDefault; + + if ( envGetConfigParamPtr ( & EPICS_CA_MAX_SEARCH_PERIOD ) ) { + long longStatus = envGetDoubleConfigParam ( + & EPICS_CA_MAX_SEARCH_PERIOD, & maxPeriod ); + if ( ! longStatus ) { + if ( maxPeriod < maxSearchPeriodLowerLimit ) { + epicsPrintf ( "\"%s\" out of range (low)\n", + EPICS_CA_MAX_SEARCH_PERIOD.name ); + maxPeriod = maxSearchPeriodLowerLimit; + epicsPrintf ( "Setting \"%s\" = %f seconds\n", + EPICS_CA_MAX_SEARCH_PERIOD.name, maxPeriod ); + } + } + else { + epicsPrintf ( "EPICS \"%s\" wasnt a real number\n", + EPICS_CA_MAX_SEARCH_PERIOD.name ); + epicsPrintf ( "Setting \"%s\" = %f seconds\n", + EPICS_CA_MAX_SEARCH_PERIOD.name, maxPeriod ); + } + } + + return maxPeriod; +} + +static +unsigned getNTimers(double maxPeriod) +{ + unsigned nTimers = static_cast < unsigned > ( 1.0 + log ( maxPeriod / minRoundTripEstimate ) / log ( 2.0 ) ); + + if ( nTimers > channelNode::getMaxSearchTimerCount () ) { + nTimers = channelNode::getMaxSearchTimerCount (); + epicsPrintf ( "\"%s\" out of range (high)\n", + EPICS_CA_MAX_SEARCH_PERIOD.name ); + epicsPrintf ( "Setting \"%s\" = %f seconds\n", + EPICS_CA_MAX_SEARCH_PERIOD.name, + (1<<(nTimers-1)) * minRoundTripEstimate ); + } + + return nTimers; +} + // // udpiiu::udpiiu () // @@ -85,14 +131,15 @@ udpiiu::udpiiu ( repeaterSubscribeTmr ( m_repeaterTimerNotify, timerQueue, cbMutexIn, ctxNotifyIn ), govTmr ( *this, timerQueue, cacMutexIn ), - maxPeriod ( maxSearchPeriodDefault ), + maxPeriod ( getMaxPeriod() ), rtteMean ( minRoundTripEstimate ), rtteMeanDev ( 0 ), cacRef ( cac ), cbMutex ( cbMutexIn ), cacMutex ( cacMutexIn ), + nTimers ( getNTimers(maxPeriod) ), + ppSearchTmr ( nTimers ), nBytesInXmitBuf ( 0 ), - nTimers ( 0 ), beaconAnomalyTimerIndex ( 0 ), sequenceNumber ( 0 ), lastReceivedSeqNo ( 0 ), @@ -104,45 +151,13 @@ udpiiu::udpiiu ( lastReceivedSeqNoIsValid ( false ) { cacGuard.assertIdenticalMutex ( cacMutex ); - - if ( envGetConfigParamPtr ( & EPICS_CA_MAX_SEARCH_PERIOD ) ) { - long longStatus = envGetDoubleConfigParam ( - & EPICS_CA_MAX_SEARCH_PERIOD, & this->maxPeriod ); - if ( ! longStatus ) { - if ( this->maxPeriod < maxSearchPeriodLowerLimit ) { - epicsPrintf ( "\"%s\" out of range (low)\n", - EPICS_CA_MAX_SEARCH_PERIOD.name ); - this->maxPeriod = maxSearchPeriodLowerLimit; - epicsPrintf ( "Setting \"%s\" = %f seconds\n", - EPICS_CA_MAX_SEARCH_PERIOD.name, this->maxPeriod ); - } - } - else { - epicsPrintf ( "EPICS \"%s\" wasnt a real number\n", - EPICS_CA_MAX_SEARCH_PERIOD.name ); - epicsPrintf ( "Setting \"%s\" = %f seconds\n", - EPICS_CA_MAX_SEARCH_PERIOD.name, this->maxPeriod ); - } - } - double powerOfTwo = log ( this->maxPeriod / minRoundTripEstimate ) / log ( 2.0 ); - this->nTimers = static_cast < unsigned > ( powerOfTwo + 1.0 ); - if ( this->nTimers > channelNode::getMaxSearchTimerCount () ) { - this->nTimers = channelNode::getMaxSearchTimerCount (); - epicsPrintf ( "\"%s\" out of range (high)\n", - EPICS_CA_MAX_SEARCH_PERIOD.name ); - epicsPrintf ( "Setting \"%s\" = %f seconds\n", - EPICS_CA_MAX_SEARCH_PERIOD.name, - (1<<(this->nTimers-1)) * minRoundTripEstimate ); - } - - powerOfTwo = log ( beaconAnomalySearchPeriod / minRoundTripEstimate ) / log ( 2.0 ); + double powerOfTwo = log ( beaconAnomalySearchPeriod / minRoundTripEstimate ) / log ( 2.0 ); this->beaconAnomalyTimerIndex = static_cast < unsigned > ( powerOfTwo + 1.0 ); if ( this->beaconAnomalyTimerIndex >= this->nTimers ) { this->beaconAnomalyTimerIndex = this->nTimers - 1; } - this->ppSearchTmr.reset ( new epics_auto_ptr < class searchTimer > [ this->nTimers ] ); for ( unsigned i = 0; i < this->nTimers; i++ ) { this->ppSearchTmr[i].reset ( new searchTimer ( *this, timerQueue, i, cacMutexIn, @@ -915,10 +930,12 @@ bool udpiiu::pushDatagramMsg ( epicsGuard < epicsMutex > & guard, caHdr * pbufmsg = ( caHdr * ) &this->xmitBuf[this->nBytesInXmitBuf]; *pbufmsg = msg; - memcpy ( pbufmsg + 1, pExt, extsize ); - if ( extsize != alignedExtSize ) { - char *pDest = (char *) ( pbufmsg + 1 ); - memset ( pDest + extsize, '\0', alignedExtSize - extsize ); + if ( extsize ) { + memcpy ( pbufmsg + 1, pExt, extsize ); + if ( extsize != alignedExtSize ) { + char *pDest = (char *) ( pbufmsg + 1 ); + memset ( pDest + extsize, '\0', alignedExtSize - extsize ); + } } AlignedWireRef < epicsUInt16 > ( pbufmsg->m_postsize ) = alignedExtSize; this->nBytesInXmitBuf += msgsize; diff --git a/src/ca/client/udpiiu.h b/src/ca/client/udpiiu.h index 103547919..6b41e38ed 100644 --- a/src/ca/client/udpiiu.h +++ b/src/ca/client/udpiiu.h @@ -25,6 +25,8 @@ #ifndef udpiiuh #define udpiiuh +#include + #ifdef epicsExportSharedSymbols # define udpiiuh_accessh_epicsExportSharedSymbols # undef epicsExportSharedSymbols @@ -32,9 +34,7 @@ #include "osiSock.h" #include "epicsThread.h" -#include "epicsMemory.h" #include "epicsTime.h" -#include "tsMinMax.h" #include "tsDLList.h" #ifdef udpiiuh_accessh_epicsExportSharedSymbols @@ -160,15 +160,24 @@ private: repeaterSubscribeTimer repeaterSubscribeTmr; disconnectGovernorTimer govTmr; tsDLList < SearchDest > _searchDestList; - double maxPeriod; + const double maxPeriod; double rtteMean; double rtteMeanDev; cac & cacRef; epicsMutex & cbMutex; epicsMutex & cacMutex; - epics_auto_ptr < epics_auto_ptr < class searchTimer >, eapt_array > ppSearchTmr; + const unsigned nTimers; + struct SearchArray { + typedef std::auto_ptr value_type; + value_type *arr; + SearchArray(size_t n) : arr(new value_type[n]) {} + ~SearchArray() { delete[] arr; } + value_type& operator[](size_t i) const { return arr[i]; } + private: + SearchArray(const SearchArray&); + SearchArray& operator=(const SearchArray&); + } ppSearchTmr; unsigned nBytesInXmitBuf; - unsigned nTimers; unsigned beaconAnomalyTimerIndex; ca_uint32_t sequenceNumber; ca_uint32_t lastReceivedSeqNo; diff --git a/src/ca/client/virtualCircuit.h b/src/ca/client/virtualCircuit.h index 017b99d0e..d06d87c60 100644 --- a/src/ca/client/virtualCircuit.h +++ b/src/ca/client/virtualCircuit.h @@ -25,9 +25,7 @@ #ifndef virtualCircuith #define virtualCircuith -#include "epicsMemory.h" #include "tsDLList.h" -#include "tsMinMax.h" #include "comBuf.h" #include "caServerID.h" diff --git a/src/ca/legacy/gdd/Makefile b/src/ca/legacy/gdd/Makefile index b1e8fceaa..9c5638eb4 100644 --- a/src/ca/legacy/gdd/Makefile +++ b/src/ca/legacy/gdd/Makefile @@ -69,6 +69,11 @@ CLEANS += $(COMMON_DIR)/aitConvertGenerated.cc USR_CXXFLAGS_Linux = -fno-strict-aliasing USR_CXXFLAGS_RTEMS = -fno-strict-aliasing +ifeq ($(T_A),$(EPICS_HOST_ARCH)) + # genApps and aitGen are needed to finish libgdd + DELAY_INSTALL_LIBS = YES +endif + include $(TOP)/configure/RULES # Manual dependencies diff --git a/src/ca/legacy/gdd/README b/src/ca/legacy/gdd/README index d7ab4b9c2..4c5dd4094 100644 --- a/src/ca/legacy/gdd/README +++ b/src/ca/legacy/gdd/README @@ -2,8 +2,6 @@ # Author: Jim Kowalkowski # Date: 2/96 # -# $Revision-Id$ -# Some Notes: diff --git a/src/ca/legacy/gdd/aitConvert.cc b/src/ca/legacy/gdd/aitConvert.cc index 5839756c2..b2a4e42e3 100644 --- a/src/ca/legacy/gdd/aitConvert.cc +++ b/src/ca/legacy/gdd/aitConvert.cc @@ -11,8 +11,6 @@ // Author: Jim Kowalkowski // Date: 2/96 // -// $Revision-Id$ -// #define AIT_CONVERT_SOURCE 1 diff --git a/src/ca/legacy/gdd/aitConvert.h b/src/ca/legacy/gdd/aitConvert.h index f75fdb1ba..6571df44e 100644 --- a/src/ca/legacy/gdd/aitConvert.h +++ b/src/ca/legacy/gdd/aitConvert.h @@ -13,9 +13,6 @@ /* * Author: Jim Kowalkowski * Date: 2/96 - * - * $Revision-Id$ - * */ #include diff --git a/src/ca/legacy/gdd/aitGen.c b/src/ca/legacy/gdd/aitGen.c index 37861af4e..39f885531 100644 --- a/src/ca/legacy/gdd/aitGen.c +++ b/src/ca/legacy/gdd/aitGen.c @@ -10,9 +10,6 @@ /* * Author: Jim Kowalkowski * Date: 2/96 - * - * $Revision-Id$ - * */ #include diff --git a/src/ca/legacy/gdd/aitHelpers.cc b/src/ca/legacy/gdd/aitHelpers.cc index 6fc7f24b9..5d95a899c 100644 --- a/src/ca/legacy/gdd/aitHelpers.cc +++ b/src/ca/legacy/gdd/aitHelpers.cc @@ -10,9 +10,6 @@ // Author: Jim Kowalkowski // Date: 6/20/96 -// -// $Revision-Id$ -// #include diff --git a/src/ca/legacy/gdd/aitHelpers.h b/src/ca/legacy/gdd/aitHelpers.h index bfd4069f1..aa66a38e7 100644 --- a/src/ca/legacy/gdd/aitHelpers.h +++ b/src/ca/legacy/gdd/aitHelpers.h @@ -13,9 +13,6 @@ /* * Authors: Jeff Hill and Jim Kowalkowski * Date: 6/20/96 - * - * $Revision-Id$ - * */ #include diff --git a/src/ca/legacy/gdd/aitTypes.c b/src/ca/legacy/gdd/aitTypes.c index 8f3cb179f..35a87ce1e 100644 --- a/src/ca/legacy/gdd/aitTypes.c +++ b/src/ca/legacy/gdd/aitTypes.c @@ -10,9 +10,6 @@ /* * Author: Jim Kowalkowski * Date: 2/96 - * - * $Revision-Id$ - * */ #include diff --git a/src/ca/legacy/gdd/aitTypes.h b/src/ca/legacy/gdd/aitTypes.h index b8c1a45c8..135abc3c6 100644 --- a/src/ca/legacy/gdd/aitTypes.h +++ b/src/ca/legacy/gdd/aitTypes.h @@ -13,9 +13,6 @@ /* * Author: Jim Kowalkowski * Date: 2/96 - * - * $Revision-Id$ - * */ /* This is the file the user sets up for a given architecture */ diff --git a/src/ca/legacy/gdd/dbMapper.cc b/src/ca/legacy/gdd/dbMapper.cc index b075b34df..c15c26110 100644 --- a/src/ca/legacy/gdd/dbMapper.cc +++ b/src/ca/legacy/gdd/dbMapper.cc @@ -9,9 +9,6 @@ \*************************************************************************/ // Author: Jim Kowalkowski // Date: 2/96 -// -// $Revision-Id$ -// #define DB_MAPPER_SOURCE 1 diff --git a/src/ca/legacy/gdd/dbMapper.h b/src/ca/legacy/gdd/dbMapper.h index 7be845612..c059c8386 100644 --- a/src/ca/legacy/gdd/dbMapper.h +++ b/src/ca/legacy/gdd/dbMapper.h @@ -13,9 +13,6 @@ /* * Author: Jim Kowalkowski * Date: 2/96 - * - * $Revision-Id$ - * */ #include "shareLib.h" diff --git a/src/ca/legacy/gdd/gdd.cc b/src/ca/legacy/gdd/gdd.cc index 26f71d739..acb53da4e 100644 --- a/src/ca/legacy/gdd/gdd.cc +++ b/src/ca/legacy/gdd/gdd.cc @@ -9,9 +9,6 @@ \*************************************************************************/ // Author: Jim Kowalkowski // Date: 2/96 -// -// $Revision-Id$ -// #include #include @@ -1358,8 +1355,9 @@ gddStatus gdd::put ( const gdd * dd ) } aitUint32 srcAvailSize = srcElemCount - unusedSrcBelow; - if ( srcAvailSize > this->getBounds()->size() ) { - srcCopySize = this->getBounds()->size(); + aitUint32 destSize = this->getBounds()->size(); + if ( destSize > 0 && srcAvailSize > destSize ) { + srcCopySize = destSize; } else { srcCopySize = srcAvailSize; diff --git a/src/ca/legacy/gdd/gdd.h b/src/ca/legacy/gdd/gdd.h index e05dd3cc8..b713c2204 100644 --- a/src/ca/legacy/gdd/gdd.h +++ b/src/ca/legacy/gdd/gdd.h @@ -13,9 +13,6 @@ /* * Author: Jim Kowalkowski * Date: 2/96 - * - * $Revision-Id$ - * */ // Still need to handle to network byte order stuff. diff --git a/src/ca/legacy/gdd/gddAppDefs.cc b/src/ca/legacy/gdd/gddAppDefs.cc index 67b0aea62..2da4058b5 100644 --- a/src/ca/legacy/gdd/gddAppDefs.cc +++ b/src/ca/legacy/gdd/gddAppDefs.cc @@ -9,9 +9,6 @@ \*************************************************************************/ // Author: Jim Kowalkowski // Date: 2/96 -// -// $Revision-Id$ -// #define epicsExportSharedSymbols #include "gddAppTable.h" diff --git a/src/ca/legacy/gdd/gddAppFuncTable.h b/src/ca/legacy/gdd/gddAppFuncTable.h index 43a7b24f7..fca158d27 100644 --- a/src/ca/legacy/gdd/gddAppFuncTable.h +++ b/src/ca/legacy/gdd/gddAppFuncTable.h @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/gdd/gddAppTable.cc b/src/ca/legacy/gdd/gddAppTable.cc index 80238f015..2315516fe 100644 --- a/src/ca/legacy/gdd/gddAppTable.cc +++ b/src/ca/legacy/gdd/gddAppTable.cc @@ -9,9 +9,6 @@ \*************************************************************************/ // Author: Jim Kowalkowski // Date: 2/96 -// -// $Revision-Id$ -// #define epicsExportSharedSymbols #include "gddAppTable.h" @@ -421,8 +418,10 @@ gddStatus gddApplicationTypeTable::freeDD(gdd* dd) } // fprintf(stderr,"Adding DD to free_list %d\n",app); + attr_table[group][app].sem.lock (); dd->setNext(attr_table[group][app].free_list); attr_table[group][app].free_list=dd; + attr_table[group][app].sem.unlock (); } else if (attr_table[group][app].type==gddApplicationTypeNormal) { diff --git a/src/ca/legacy/gdd/gddAppTable.h b/src/ca/legacy/gdd/gddAppTable.h index a7b30e7a0..fe67c6577 100644 --- a/src/ca/legacy/gdd/gddAppTable.h +++ b/src/ca/legacy/gdd/gddAppTable.h @@ -13,9 +13,6 @@ /* * Author: Jim Kowalkowski * Date: 2/96 - * - * $Revision-Id$ - * */ #include "gdd.h" diff --git a/src/ca/legacy/gdd/gddArray.cc b/src/ca/legacy/gdd/gddArray.cc index cd0e566ff..8c9df0835 100644 --- a/src/ca/legacy/gdd/gddArray.cc +++ b/src/ca/legacy/gdd/gddArray.cc @@ -13,8 +13,6 @@ // Author: Jim Kowalkowski // Date: 3/97 -// -// $Revision-Id$ #define epicsExportSharedSymbols #include "gdd.h" diff --git a/src/ca/legacy/gdd/gddArray.h b/src/ca/legacy/gdd/gddArray.h index 8ca9c9017..10d1e4ed0 100644 --- a/src/ca/legacy/gdd/gddArray.h +++ b/src/ca/legacy/gdd/gddArray.h @@ -14,8 +14,6 @@ * Author: Jim Kowalkowski * Date: 3/97 * - * $Revision-Id$ - * * *********************************************************************** * Adds ability to put array data into a DD, get it out, and adjust it * *********************************************************************** diff --git a/src/ca/legacy/gdd/gddContainer.cc b/src/ca/legacy/gdd/gddContainer.cc index 77266e1cc..a5bea0298 100644 --- a/src/ca/legacy/gdd/gddContainer.cc +++ b/src/ca/legacy/gdd/gddContainer.cc @@ -14,9 +14,7 @@ // Author: Jim Kowalkowski // Date: 3/97 -// -// $Revision-Id$ -// + #define epicsExportSharedSymbols #include "gdd.h" diff --git a/src/ca/legacy/gdd/gddContainer.h b/src/ca/legacy/gdd/gddContainer.h index 070f978d9..7830eb641 100644 --- a/src/ca/legacy/gdd/gddContainer.h +++ b/src/ca/legacy/gdd/gddContainer.h @@ -13,8 +13,6 @@ /* * Author: Jim Kowalkowski * Date: 3/97 - * - * $Revision-Id$ */ #include "shareLib.h" diff --git a/src/ca/legacy/gdd/gddContainerI.h b/src/ca/legacy/gdd/gddContainerI.h index 8903ad825..55f306342 100644 --- a/src/ca/legacy/gdd/gddContainerI.h +++ b/src/ca/legacy/gdd/gddContainerI.h @@ -13,9 +13,6 @@ /* * Author: Jim Kowalkowski * Date: 3/97 - * - * $Revision-Id$ - * */ inline gddContainer::gddContainer(int,int,int,int*) { } diff --git a/src/ca/legacy/gdd/gddErrorCodes.cc b/src/ca/legacy/gdd/gddErrorCodes.cc index d5e34ffeb..7c20292be 100644 --- a/src/ca/legacy/gdd/gddErrorCodes.cc +++ b/src/ca/legacy/gdd/gddErrorCodes.cc @@ -10,9 +10,6 @@ // Author: Jim Kowalkowski // Date: 3/97 -// -// $Revision-Id$ -// // -------------------------- Error messages ------------------------- diff --git a/src/ca/legacy/gdd/gddErrorCodes.h b/src/ca/legacy/gdd/gddErrorCodes.h index af7523a7a..061fbab71 100644 --- a/src/ca/legacy/gdd/gddErrorCodes.h +++ b/src/ca/legacy/gdd/gddErrorCodes.h @@ -13,9 +13,6 @@ /* * Author: Jim Kowalkowski * Date: 2/96 - * - * $Revision-Id$ - * */ #include "shareLib.h" diff --git a/src/ca/legacy/gdd/gddI.h b/src/ca/legacy/gdd/gddI.h index 09679343c..ef13f66bd 100644 --- a/src/ca/legacy/gdd/gddI.h +++ b/src/ca/legacy/gdd/gddI.h @@ -13,9 +13,6 @@ /* * Author: Jim Kowalkowski * Date: 3/97 - * - * $Revision-Id$ - * */ inline void gdd::setData(void* d) { data.Pointer=d; } diff --git a/src/ca/legacy/gdd/gddNewDel.cc b/src/ca/legacy/gdd/gddNewDel.cc index 6859bec48..4e6f3c05f 100644 --- a/src/ca/legacy/gdd/gddNewDel.cc +++ b/src/ca/legacy/gdd/gddNewDel.cc @@ -9,9 +9,6 @@ \*************************************************************************/ // Author: Jim Kowalkowski // Date: 2/96 -// -// $Revision-Id$ -// #define epicsExportSharedSymbols #include "gddNewDel.h" diff --git a/src/ca/legacy/gdd/gddNewDel.h b/src/ca/legacy/gdd/gddNewDel.h index ce10d8cc1..2bd88598e 100644 --- a/src/ca/legacy/gdd/gddNewDel.h +++ b/src/ca/legacy/gdd/gddNewDel.h @@ -13,9 +13,6 @@ /* * Author: Jim Kowalkowski * Date: 2/96 - * - * $Revision-Id$ - * */ // this file if formatted with tab stop = 4 diff --git a/src/ca/legacy/gdd/gddTest.cc b/src/ca/legacy/gdd/gddTest.cc index 0d6868666..881a55df9 100644 --- a/src/ca/legacy/gdd/gddTest.cc +++ b/src/ca/legacy/gdd/gddTest.cc @@ -9,9 +9,6 @@ \*************************************************************************/ // Author: Jim Kowalkowski // Date: 2/96 -// -// $Revision-Id$ -// #include #define epicsExportSharedSymbols @@ -311,7 +308,7 @@ void gdd::test() pdd->convertOffsetsToAddress(); pdd->dump(); pdd->unreference(); - delete buf; + delete [] buf; } #endif @@ -513,7 +510,7 @@ void gddContainer::test(void) fprintf(stderr,"=====RE-DUMP OF ORIGINAL CONTAINER:\n"); dump(); cdd1->unreference(); - delete buf; + delete [] buf; // test copy(), Dup(), copyInfo() fprintf(stderr,"=======CREATING TEST CONTAINER FOR *COPY* TEST:\n"); diff --git a/src/ca/legacy/gdd/gddUtils.cc b/src/ca/legacy/gdd/gddUtils.cc index 3ddab8bfd..b0f5a5a0e 100644 --- a/src/ca/legacy/gdd/gddUtils.cc +++ b/src/ca/legacy/gdd/gddUtils.cc @@ -10,9 +10,6 @@ // Author: Jim Kowalkowski // Date: 3/97 -// -// $Revision-Id$ -// #include #include diff --git a/src/ca/legacy/gdd/gddUtils.h b/src/ca/legacy/gdd/gddUtils.h index c486738bc..ef45bf74c 100644 --- a/src/ca/legacy/gdd/gddUtils.h +++ b/src/ca/legacy/gdd/gddUtils.h @@ -13,9 +13,6 @@ /* * Author: Jim Kowalkowski * Date: 2/96 - * - * $Revision-Id$ - * */ #ifdef vxWorks diff --git a/src/ca/legacy/gdd/gddUtilsI.h b/src/ca/legacy/gdd/gddUtilsI.h index 5caec8414..c2eaf90ac 100644 --- a/src/ca/legacy/gdd/gddUtilsI.h +++ b/src/ca/legacy/gdd/gddUtilsI.h @@ -13,9 +13,6 @@ /* * Author: Jim Kowalkowski * Date: 3/97 - * - * $Revision-Id$ - * */ // inline gddBounds::gddBounds(aitIndex c) { start=0; count=c; } diff --git a/src/ca/legacy/gdd/gddref.html b/src/ca/legacy/gdd/gddref.html index 2a0bf9ba8..80aac6778 100644 --- a/src/ca/legacy/gdd/gddref.html +++ b/src/ca/legacy/gdd/gddref.html @@ -1,14 +1,9 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ + + GDD Reference Manual -

    GDD Reference Manual

    + + +

    GDD Reference Manual

    gdd
    gddAtomic
    @@ -511,8 +506,6 @@ methods. Convenience methods so casting can be done from this GDD to any supported ait_xxxxx pointer variable. Same as getRef(...) and get(...) methods. -
    Argonne National Laboratory -Copyright -Information
    -
    Jim Kowalkowski (jbk@aps.anl.gov)
    updated 4/12/95 + + diff --git a/src/ca/legacy/gdd/gddref2.html b/src/ca/legacy/gdd/gddref2.html index 672dfebc7..928696208 100644 --- a/src/ca/legacy/gdd/gddref2.html +++ b/src/ca/legacy/gdd/gddref2.html @@ -1,14 +1,9 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ + + GDD Reference Manual -

    GDD Reference Manual

    + + +

    GDD Reference Manual

    gdd
    gddAtomic
    @@ -658,8 +653,6 @@ gdd* to_gdd(void* dbr_data_structure, aitIndex dbr_element_count); int to_dbr(void* dbr_data_structure, gdd* gdd_instance);
    -
    Argonne National Laboratory -Copyright -Information
    -
    Jim Kowalkowski (jbk@aps.anl.gov)
    updated 4/12/95 + + diff --git a/src/ca/legacy/gdd/genApps.cc b/src/ca/legacy/gdd/genApps.cc index 9657ace3b..c8b934a76 100644 --- a/src/ca/legacy/gdd/genApps.cc +++ b/src/ca/legacy/gdd/genApps.cc @@ -9,9 +9,6 @@ \*************************************************************************/ // Author: Jim Kowalkowski // Date: 2/96 -// -// $Revision-Id$ -// #define epicsExportSharedSymbols #include "gddAppTable.h" diff --git a/src/ca/legacy/pcas/README b/src/ca/legacy/pcas/README index cf44c0513..b016c6737 100644 --- a/src/ca/legacy/pcas/README +++ b/src/ca/legacy/pcas/README @@ -1,6 +1,3 @@ - -$Revision-Id$ - README file for the EPICS Channel Access Server Author Jeff Hill johill@lanl.gov diff --git a/src/ca/legacy/pcas/build/Makefile b/src/ca/legacy/pcas/build/Makefile index 0cb91fbea..707344d02 100644 --- a/src/ca/legacy/pcas/build/Makefile +++ b/src/ca/legacy/pcas/build/Makefile @@ -80,8 +80,6 @@ ifeq ($(VX_GNU_VERSION), 4.1.2) casStreamOS_CXXFLAGS_vxWorks-ppc604 = -O0 endif -LIBSRCS_vxWorks += templateInstances.cpp - LIBRARY = cas cas_LIBS = ca gdd Com cas_SYS_LIBS_WIN32 = ws2_32 diff --git a/src/ca/legacy/pcas/example/directoryService/directoryServer.cc b/src/ca/legacy/pcas/example/directoryService/directoryServer.cc index 45f04b4d6..4d43b0943 100644 --- a/src/ca/legacy/pcas/example/directoryService/directoryServer.cc +++ b/src/ca/legacy/pcas/example/directoryService/directoryServer.cc @@ -13,7 +13,7 @@ // #include "directoryServer.h" -#include "tsMinMax.h" +#include "epicsAlgorithm.h" const pvInfo *pvInfo::pFirst; @@ -128,7 +128,7 @@ pvExistReturn directoryServer::pvExistTest } else { size_t diff = pLastStr-pPVName; - diff = tsMin (diff, sizeof(pvNameBuf)-1); + diff = epicsMin (diff, sizeof(pvNameBuf)-1); memcpy (pvNameBuf, pPVName, diff); pvNameBuf[diff] = '\0'; pLastStr = pvNameBuf; diff --git a/src/ca/legacy/pcas/example/directoryService/main.cc b/src/ca/legacy/pcas/example/directoryService/main.cc index cb8c43901..76f27e75d 100644 --- a/src/ca/legacy/pcas/example/directoryService/main.cc +++ b/src/ca/legacy/pcas/example/directoryService/main.cc @@ -170,7 +170,7 @@ static int parseDirectoryFP (FILE *pf, const char *pFileName) status = aToIPAddr (hostNameStr, 0u, &ipa); if (status) { - fprintf (pf, "Unknown host name=\"%s\" (or bad dotted ip addr) in \"%s\" with PV=\"%s\"?\n", + fprintf (stderr, "Unknown host name=\"%s\" (or bad dotted ip addr) in \"%s\" with PV=\"%s\"?\n", hostNameStr, pFileName, pvNameStr); return -1; } diff --git a/src/ca/legacy/pcas/example/directoryService/vxEntry.cc b/src/ca/legacy/pcas/example/directoryService/vxEntry.cc index 2cbf68e3a..1cb240723 100644 --- a/src/ca/legacy/pcas/example/directoryService/vxEntry.cc +++ b/src/ca/legacy/pcas/example/directoryService/vxEntry.cc @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ // -// $Revision-Id$ // Author: Jeff HIll (LANL) // diff --git a/src/ca/legacy/pcas/generic/beaconAnomalyGovernor.cc b/src/ca/legacy/pcas/generic/beaconAnomalyGovernor.cc index e0a4f4cf4..df22e5301 100644 --- a/src/ca/legacy/pcas/generic/beaconAnomalyGovernor.cc +++ b/src/ca/legacy/pcas/generic/beaconAnomalyGovernor.cc @@ -9,8 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/beaconAnomalyGovernor.h b/src/ca/legacy/pcas/generic/beaconAnomalyGovernor.h index 6d063c5ee..cb520b6f1 100644 --- a/src/ca/legacy/pcas/generic/beaconAnomalyGovernor.h +++ b/src/ca/legacy/pcas/generic/beaconAnomalyGovernor.h @@ -9,8 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/beaconTimer.cc b/src/ca/legacy/pcas/generic/beaconTimer.cc index b4fe82689..71124fac6 100644 --- a/src/ca/legacy/pcas/generic/beaconTimer.cc +++ b/src/ca/legacy/pcas/generic/beaconTimer.cc @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/beaconTimer.h b/src/ca/legacy/pcas/generic/beaconTimer.h index bb516a9af..7b6a5654c 100644 --- a/src/ca/legacy/pcas/generic/beaconTimer.h +++ b/src/ca/legacy/pcas/generic/beaconTimer.h @@ -9,8 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/caHdrLargeArray.h b/src/ca/legacy/pcas/generic/caHdrLargeArray.h index feae270e6..7bda002e9 100644 --- a/src/ca/legacy/pcas/generic/caHdrLargeArray.h +++ b/src/ca/legacy/pcas/generic/caHdrLargeArray.h @@ -9,8 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 @@ -32,7 +30,7 @@ # include "shareLib.h" #endif -static const unsigned char CA_MINOR_PROTOCOL_REVISION = 12; +static const unsigned char CA_MINOR_PROTOCOL_REVISION = 13; typedef ca_uint32_t caResId; diff --git a/src/ca/legacy/pcas/generic/caNetAddr.cc b/src/ca/legacy/pcas/generic/caNetAddr.cc index 1f2ca244e..0c831be88 100644 --- a/src/ca/legacy/pcas/generic/caNetAddr.cc +++ b/src/ca/legacy/pcas/generic/caNetAddr.cc @@ -9,8 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ // // Author: Jeffrey O. Hill // johill@lanl.gov diff --git a/src/ca/legacy/pcas/generic/caServer.cc b/src/ca/legacy/pcas/generic/caServer.cc index c4d91558d..f992eb56d 100644 --- a/src/ca/legacy/pcas/generic/caServer.cc +++ b/src/ca/legacy/pcas/generic/caServer.cc @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/caServerI.cc b/src/ca/legacy/pcas/generic/caServerI.cc index 1d7097610..e8609eb8a 100644 --- a/src/ca/legacy/pcas/generic/caServerI.cc +++ b/src/ca/legacy/pcas/generic/caServerI.cc @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 @@ -35,8 +33,7 @@ // include a version string for POSIX systems static const char pVersionCAS[] = "@(#) " EPICS_VERSION_STRING - ", CA Portable Server Library " - "$Date$"; + ", CA Portable Server Library "; caServerI::caServerI ( caServer & tool ) : adapter (tool), diff --git a/src/ca/legacy/pcas/generic/caServerI.h b/src/ca/legacy/pcas/generic/caServerI.h index 344f6393b..012233693 100644 --- a/src/ca/legacy/pcas/generic/caServerI.h +++ b/src/ca/legacy/pcas/generic/caServerI.h @@ -40,8 +40,13 @@ class casIntfOS; class casMonitor; class casChannelI; -caStatus convertContainerMemberToAtomic ( class gdd & dd, - aitUint32 appType, aitUint32 elemCount ); +caStatus convertContainerMemberToAtomic (class gdd & dd, + aitUint32 appType, aitUint32 requestedCount, aitUint32 nativeCount); + +// Keep the old signature for backward compatibility +inline caStatus convertContainerMemberToAtomic (class gdd & dd, + aitUint32 appType, aitUint32 elemCount) +{ return convertContainerMemberToAtomic(dd, appType, elemCount, elemCount); } class caServerI : public caServerIO, diff --git a/src/ca/legacy/pcas/generic/casAsyncIOI.cc b/src/ca/legacy/pcas/generic/casAsyncIOI.cc index 7c79a28f8..e90247a6a 100644 --- a/src/ca/legacy/pcas/generic/casAsyncIOI.cc +++ b/src/ca/legacy/pcas/generic/casAsyncIOI.cc @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casAsyncIOI.h b/src/ca/legacy/pcas/generic/casAsyncIOI.h index 9bdabde9f..24a48512d 100644 --- a/src/ca/legacy/pcas/generic/casAsyncIOI.h +++ b/src/ca/legacy/pcas/generic/casAsyncIOI.h @@ -9,8 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casAsyncPVAttachIO.cc b/src/ca/legacy/pcas/generic/casAsyncPVAttachIO.cc index 09ff6976a..0098c13ba 100644 --- a/src/ca/legacy/pcas/generic/casAsyncPVAttachIO.cc +++ b/src/ca/legacy/pcas/generic/casAsyncPVAttachIO.cc @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casAsyncPVAttachIOI.cpp b/src/ca/legacy/pcas/generic/casAsyncPVAttachIOI.cpp index 728de843d..1543c74cb 100644 --- a/src/ca/legacy/pcas/generic/casAsyncPVAttachIOI.cpp +++ b/src/ca/legacy/pcas/generic/casAsyncPVAttachIOI.cpp @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casAsyncPVAttachIOI.h b/src/ca/legacy/pcas/generic/casAsyncPVAttachIOI.h index a73871f6d..d8c5d5943 100644 --- a/src/ca/legacy/pcas/generic/casAsyncPVAttachIOI.h +++ b/src/ca/legacy/pcas/generic/casAsyncPVAttachIOI.h @@ -9,8 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casAsyncPVExistIO.cc b/src/ca/legacy/pcas/generic/casAsyncPVExistIO.cc index 517121d1c..34f827b34 100644 --- a/src/ca/legacy/pcas/generic/casAsyncPVExistIO.cc +++ b/src/ca/legacy/pcas/generic/casAsyncPVExistIO.cc @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casAsyncPVExistIOI.cpp b/src/ca/legacy/pcas/generic/casAsyncPVExistIOI.cpp index 9b6808bd1..f03a9deb6 100644 --- a/src/ca/legacy/pcas/generic/casAsyncPVExistIOI.cpp +++ b/src/ca/legacy/pcas/generic/casAsyncPVExistIOI.cpp @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casAsyncPVExistIOI.h b/src/ca/legacy/pcas/generic/casAsyncPVExistIOI.h index 6712d619e..d436c23cb 100644 --- a/src/ca/legacy/pcas/generic/casAsyncPVExistIOI.h +++ b/src/ca/legacy/pcas/generic/casAsyncPVExistIOI.h @@ -9,8 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casAsyncReadIO.cc b/src/ca/legacy/pcas/generic/casAsyncReadIO.cc index a9ca5ee2a..e235e3ebe 100644 --- a/src/ca/legacy/pcas/generic/casAsyncReadIO.cc +++ b/src/ca/legacy/pcas/generic/casAsyncReadIO.cc @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casAsyncReadIOI.cc b/src/ca/legacy/pcas/generic/casAsyncReadIOI.cc index 45248d31d..4bf01b546 100644 --- a/src/ca/legacy/pcas/generic/casAsyncReadIOI.cc +++ b/src/ca/legacy/pcas/generic/casAsyncReadIOI.cc @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casAsyncReadIOI.h b/src/ca/legacy/pcas/generic/casAsyncReadIOI.h index a1ce60ce4..6f8b7d6c5 100644 --- a/src/ca/legacy/pcas/generic/casAsyncReadIOI.h +++ b/src/ca/legacy/pcas/generic/casAsyncReadIOI.h @@ -9,8 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casAsyncWriteIO.cc b/src/ca/legacy/pcas/generic/casAsyncWriteIO.cc index abd0bb965..0366eb59b 100644 --- a/src/ca/legacy/pcas/generic/casAsyncWriteIO.cc +++ b/src/ca/legacy/pcas/generic/casAsyncWriteIO.cc @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casAsyncWriteIOI.cpp b/src/ca/legacy/pcas/generic/casAsyncWriteIOI.cpp index 2d505679f..0b8c0a2cd 100644 --- a/src/ca/legacy/pcas/generic/casAsyncWriteIOI.cpp +++ b/src/ca/legacy/pcas/generic/casAsyncWriteIOI.cpp @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casAsyncWriteIOI.h b/src/ca/legacy/pcas/generic/casAsyncWriteIOI.h index f9ad3aa28..86b9c4add 100644 --- a/src/ca/legacy/pcas/generic/casAsyncWriteIOI.h +++ b/src/ca/legacy/pcas/generic/casAsyncWriteIOI.h @@ -9,8 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casBufferFactory.cpp b/src/ca/legacy/pcas/generic/casBufferFactory.cpp index 41d4ca742..9f311a091 100644 --- a/src/ca/legacy/pcas/generic/casBufferFactory.cpp +++ b/src/ca/legacy/pcas/generic/casBufferFactory.cpp @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casChannel.cc b/src/ca/legacy/pcas/generic/casChannel.cc index 81351eb0d..2d9d97796 100644 --- a/src/ca/legacy/pcas/generic/casChannel.cc +++ b/src/ca/legacy/pcas/generic/casChannel.cc @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casChannelI.cc b/src/ca/legacy/pcas/generic/casChannelI.cc index a44ef6f40..376f62f8c 100644 --- a/src/ca/legacy/pcas/generic/casChannelI.cc +++ b/src/ca/legacy/pcas/generic/casChannelI.cc @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 @@ -23,6 +21,7 @@ casChannelI::casChannelI ( casCoreClient & clientIn, casChannel & chanIn, casPVI & pvIn, ca_uint32_t cidIn ) : privateForPV ( clientIn, *this ), pv ( pvIn ), + maxElem( pvIn.nativeCount() ), chan ( chanIn ), cid ( cidIn ), serverDeletePending ( false ), @@ -31,7 +30,7 @@ casChannelI::casChannelI ( casCoreClient & clientIn, } casChannelI::~casChannelI () -{ +{ this->privateForPV.client().removeFromEventQueue ( *this, this->accessRightsEvPending ); @@ -50,7 +49,7 @@ void casChannelI::uninstallFromPV ( casEventSys & eventSys ) this->privateForPV.removeSelfFromPV ( this->pv, dest ); while ( casMonitor * pMon = dest.get () ) { eventSys.prepareMonitorForDestroy ( *pMon ); - } + } } void casChannelI::show ( unsigned level ) const @@ -70,13 +69,13 @@ caStatus casChannelI::cbFunc ( { caStatus stat = S_cas_success; { - stat = this->privateForPV.client().accessRightsResponse ( + stat = this->privateForPV.client().accessRightsResponse ( clientGuard, this ); } - if ( stat == S_cas_success ) { - this->accessRightsEvPending = false; - } - return stat; + if ( stat == S_cas_success ) { + this->accessRightsEvPending = false; + } + return stat; } caStatus casChannelI::read ( const casCtx & ctx, gdd & prototype ) diff --git a/src/ca/legacy/pcas/generic/casChannelI.h b/src/ca/legacy/pcas/generic/casChannelI.h index 76eec5e7f..a0f74a1df 100644 --- a/src/ca/legacy/pcas/generic/casChannelI.h +++ b/src/ca/legacy/pcas/generic/casChannelI.h @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -9,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 @@ -33,55 +30,62 @@ class casChannelI : public tsDLNode < casChannelI >, public: casChannelI ( casCoreClient & clientIn, casChannel & chanIn, casPVI & pvIn, ca_uint32_t cidIn ); - ~casChannelI (); + ~casChannelI (); void casChannelDestroyFromInterfaceNotify (); - const caResId getCID (); - const caResId getSID (); + const caResId getCID (); + const caResId getSID (); void uninstallFromPV ( casEventSys & eventSys ); void installIntoPV (); void installIO ( casAsyncIOI & ); void uninstallIO ( casAsyncIOI & ); void installMonitor ( casMonitor & mon ); casMonitor * removeMonitor ( ca_uint32_t clientIdIn ); - casPVI & getPVI () const; - void clearOutstandingReads (); - void postAccessRightsEvent (); + casPVI & getPVI () const; + void clearOutstandingReads (); + void postAccessRightsEvent (); const gddEnumStringTable & enumStringTable () const; - void setOwner ( const char * const pUserName, - const char * const pHostName ); - bool readAccess () const; + ca_uint32_t getMaxElem () const; + void setOwner ( const char * const pUserName, + const char * const pHostName ); + bool readAccess () const; bool writeAccess () const; - bool confirmationRequested () const; + bool confirmationRequested () const; caStatus read ( const casCtx & ctx, gdd & prototype ); caStatus write ( const casCtx & ctx, const gdd & value ); caStatus writeNotify ( const casCtx & ctx, const gdd & value ); - void show ( unsigned level ) const; + void show ( unsigned level ) const; private: chanIntfForPV privateForPV; - tsDLList < casAsyncIOI > ioList; - casPVI & pv; + tsDLList < casAsyncIOI > ioList; + casPVI & pv; + ca_uint32_t maxElem; casChannel & chan; - caResId cid; // client id + caResId cid; // client id bool serverDeletePending; - bool accessRightsEvPending; - //epicsShareFunc virtual void destroy (); - caStatus cbFunc ( + bool accessRightsEvPending; + //epicsShareFunc virtual void destroy (); + caStatus cbFunc ( casCoreClient &, epicsGuard < casClientMutex > &, epicsGuard < evSysMutex > & ); void postDestroyEvent (); - casChannelI ( const casChannelI & ); - casChannelI & operator = ( const casChannelI & ); + casChannelI ( const casChannelI & ); + casChannelI & operator = ( const casChannelI & ); }; inline casPVI & casChannelI::getPVI () const { - return this->pv; + return this->pv; +} + +inline ca_uint32_t casChannelI::getMaxElem () const +{ + return this->maxElem; } inline const caResId casChannelI::getCID () { - return this->cid; + return this->cid; } inline const caResId casChannelI::getSID () @@ -91,7 +95,7 @@ inline const caResId casChannelI::getSID () inline void casChannelI::postAccessRightsEvent () { - this->privateForPV.client().addToEventQueue ( *this, this->accessRightsEvPending ); + this->privateForPV.client().addToEventQueue ( *this, this->accessRightsEvPending ); } inline const gddEnumStringTable & casChannelI::enumStringTable () const @@ -110,7 +114,7 @@ inline void casChannelI::clearOutstandingReads () } inline void casChannelI::setOwner ( const char * const pUserName, - const char * const pHostName ) + const char * const pHostName ) { this->chan.setOwner ( pUserName, pHostName ); } diff --git a/src/ca/legacy/pcas/generic/casCoreClient.cc b/src/ca/legacy/pcas/generic/casCoreClient.cc index a1514a1df..9c384776e 100644 --- a/src/ca/legacy/pcas/generic/casCoreClient.cc +++ b/src/ca/legacy/pcas/generic/casCoreClient.cc @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casCoreClient.h b/src/ca/legacy/pcas/generic/casCoreClient.h index aad5e0030..f19f282a9 100644 --- a/src/ca/legacy/pcas/generic/casCoreClient.h +++ b/src/ca/legacy/pcas/generic/casCoreClient.h @@ -9,8 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casCtx.h b/src/ca/legacy/pcas/generic/casCtx.h index a505299c0..eab644685 100644 --- a/src/ca/legacy/pcas/generic/casCtx.h +++ b/src/ca/legacy/pcas/generic/casCtx.h @@ -1,5 +1,3 @@ - - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -10,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 @@ -22,6 +18,8 @@ #include "caHdrLargeArray.h" +class casStrmClient; + class casCtx { public: casCtx(); @@ -45,6 +43,7 @@ private: casChannelI * pChannel; casPVI * pPV; unsigned nAsyncIO; // checks for improper use of async io + friend class casStrmClient; }; inline const caHdrLargeArray * casCtx::getMsg() const diff --git a/src/ca/legacy/pcas/generic/casDGClient.cc b/src/ca/legacy/pcas/generic/casDGClient.cc index ce0d6e1ba..4fca74dbd 100644 --- a/src/ca/legacy/pcas/generic/casDGClient.cc +++ b/src/ca/legacy/pcas/generic/casDGClient.cc @@ -5,11 +5,9 @@ * Operator of Los Alamos National Laboratory. * EPICS BASE Versions 3.13.7 * and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 @@ -26,39 +24,39 @@ casDGClient::pCASMsgHandler const casDGClient::msgHandlers[] = { - & casDGClient::versionAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, + & casDGClient::versionAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::searchAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::searchAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::echoAction, - & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::echoAction, + & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction, - & casDGClient::uknownMessageAction + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction, + & casDGClient::uknownMessageAction }; // @@ -66,9 +64,9 @@ casDGClient::pCASMsgHandler const casDGClient::msgHandlers[] = // casDGClient::casDGClient ( caServerI & serverIn, clientBufMemoryManager & mgrIn ) : casCoreClient ( serverIn ), - in ( *this, mgrIn, MAX_UDP_RECV + sizeof ( cadg ) ), + in ( *this, mgrIn, MAX_UDP_RECV + sizeof ( cadg ) ), out ( *this, mgrIn ), - seqNoOfReq ( 0 ), + seqNoOfReq ( 0 ), minor_version_number ( 0 ) { } @@ -86,7 +84,7 @@ casDGClient::~casDGClient() // void casDGClient::destroy() { - printf("Attempt to destroy the DG client was ignored\n"); + printf("Attempt to destroy the DG client was ignored\n"); } // @@ -94,16 +92,16 @@ void casDGClient::destroy() // void casDGClient::show (unsigned level) const { - printf ( "casDGClient at %p\n", - static_cast ( this ) ); - if (level>=1u) { - char buf[64]; - this->hostName (buf, sizeof(buf)); - printf ("Client Host=%s\n", buf); + printf ( "casDGClient at %p\n", + static_cast ( this ) ); + if (level>=1u) { + char buf[64]; + this->hostName (buf, sizeof(buf)); + printf ("Client Host=%s\n", buf); this->casCoreClient::show ( level - 1u ); this->in.show ( level - 1u ); this->out.show ( level - 1u ); - } + } } // @@ -111,15 +109,15 @@ void casDGClient::show (unsigned level) const // caStatus casDGClient::uknownMessageAction () { - const caHdrLargeArray * mp = this->ctx.getMsg(); + const caHdrLargeArray * mp = this->ctx.getMsg(); char pHostName[64u]; this->lastRecvAddr.stringConvert ( pHostName, sizeof ( pHostName ) ); - caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(), + caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(), "bad request code=%u in DG\n", mp->m_cmmd ); - return S_cas_badProtocol; + return S_cas_badProtocol; } // @@ -127,9 +125,9 @@ caStatus casDGClient::uknownMessageAction () // caStatus casDGClient::searchAction() { - const caHdrLargeArray *mp = this->ctx.getMsg(); + const caHdrLargeArray *mp = this->ctx.getMsg(); const char *pChanName = static_cast ( this->ctx.getData() ); - caStatus status; + caStatus status; // // check the sanity of the message @@ -137,7 +135,7 @@ caStatus casDGClient::searchAction() if ( mp->m_postsize <= 1 ) { char pHostName[64u]; this->lastRecvAddr.stringConvert ( pHostName, sizeof ( pHostName ) ); - caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(), + caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(), "empty PV name extension in UDP search request?\n" ); return S_cas_success; } @@ -145,68 +143,68 @@ caStatus casDGClient::searchAction() if ( pChanName[0] == '\0' ) { char pHostName[64u]; this->lastRecvAddr.stringConvert ( pHostName, sizeof ( pHostName ) ); - caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(), + caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(), "zero length PV name in UDP search request?\n" ); return S_cas_success; } // check for an unterminated string before calling server tool - // by searching backwards through the string (some early versions + // by searching backwards through the string (some early versions // of the client library might not be setting the pad bytes to nill) for ( unsigned i = mp->m_postsize-1; pChanName[i] != '\0'; i-- ) { if ( i <= 1 ) { char pHostName[64u]; this->lastRecvAddr.stringConvert ( pHostName, sizeof ( pHostName ) ); - caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(), + caServerI::dumpMsg ( pHostName, "?", mp, this->ctx.getData(), "unterminated PV name in UDP search request?\n" ); return S_cas_success; } } - if ( this->getCAS().getDebugLevel() > 6u ) { - char pHostName[64u]; - this->hostName ( pHostName, sizeof ( pHostName ) ); - printf ( "\"%s\" is searching for \"%s\"\n", + if ( this->getCAS().getDebugLevel() > 6u ) { + char pHostName[64u]; + this->hostName ( pHostName, sizeof ( pHostName ) ); + printf ( "\"%s\" is searching for \"%s\"\n", pHostName, pChanName ); - } + } - // - // verify that we have sufficent memory for a PV and a - // monitor prior to calling PV exist test so that when - // the server runs out of memory we dont reply to - // search requests, and therefore dont thrash through - // caServer::pvExistTest() and casCreatePV::pvAttach() - // + // + // verify that we have sufficent memory for a PV and a + // monitor prior to calling PV exist test so that when + // the server runs out of memory we dont reply to + // search requests, and therefore dont thrash through + // caServer::pvExistTest() and casCreatePV::pvAttach() + // if ( ! osiSufficentSpaceInPool ( 0 ) ) { return S_cas_success; } - // - // ask the server tool if this PV exists - // - this->userStartedAsyncIO = false; - pvExistReturn pver = - this->getCAS()->pvExistTest ( this->ctx, this->lastRecvAddr, pChanName ); + // + // ask the server tool if this PV exists + // + this->userStartedAsyncIO = false; + pvExistReturn pver = + this->getCAS()->pvExistTest ( this->ctx, this->lastRecvAddr, pChanName ); - // - // prevent problems when they initiate - // async IO but dont return status - // indicating so (and vise versa) - // - if ( this->userStartedAsyncIO ) { + // + // prevent problems when they initiate + // async IO but dont return status + // indicating so (and vise versa) + // + if ( this->userStartedAsyncIO ) { if ( pver.getStatus() != pverAsyncCompletion ) { - errMessage (S_cas_badParameter, - "- assuming asynch IO status from caServer::pvExistTest()"); + errMessage (S_cas_badParameter, + "- assuming asynch IO status from caServer::pvExistTest()"); } status = S_cas_success; - } - else { - // - // otherwise we assume sync IO operation was initiated - // + } + else { + // + // otherwise we assume sync IO operation was initiated + // switch ( pver.getStatus() ) { case pverExistsHere: - status = this->searchResponse (*mp, pver); + status = this->searchResponse (*mp, pver); break; case pverDoesNotExistHere: @@ -214,36 +212,36 @@ caStatus casDGClient::searchAction() break; case pverAsyncCompletion: - errMessage (S_cas_badParameter, - "- unexpected asynch IO status from caServer::pvExistTest() ignored"); + errMessage (S_cas_badParameter, + "- unexpected asynch IO status from caServer::pvExistTest() ignored"); status = S_cas_success; break; default: - errMessage (S_cas_badParameter, - "- invalid return from caServer::pvExistTest() ignored"); + errMessage (S_cas_badParameter, + "- invalid return from caServer::pvExistTest() ignored"); status = S_cas_success; break; - } - } + } + } return status; } // // caStatus casDGClient::searchResponse() // -caStatus casDGClient::searchResponse ( const caHdrLargeArray & msg, +caStatus casDGClient::searchResponse ( const caHdrLargeArray & msg, const pvExistReturn & retVal ) { caStatus status; - + if ( retVal.getStatus() != pverExistsHere ) { return S_cas_success; } - + // // starting with V4.1 the count field is used (abused) - // by the client to store the minor version number of + // by the client to store the minor version number of // the client. // // Old versions expect alloc of channel in response @@ -252,8 +250,8 @@ caStatus casDGClient::searchResponse ( const caHdrLargeArray & msg, if ( !CA_V44(msg.m_count) ) { char pName[64u]; this->hostName (pName, sizeof (pName)); - errlogPrintf ( - "client \"%s\" using EPICS R3.11 CA connect protocol was ignored\n", + errlogPrintf ( + "client \"%s\" using EPICS R3.11 CA connect protocol was ignored\n", pName); // // old connect protocol was dropped when the @@ -266,19 +264,19 @@ caStatus casDGClient::searchResponse ( const caHdrLargeArray & msg, } // - // cid field is abused to carry the IP + // cid field is abused to carry the IP // address in CA_V48 or higher // (this allows a CA servers to serve // as a directory service) // - // data type field is abused to carry the IP + // data type field is abused to carry the IP // port number here CA_V44 or higher // (this allows multiple CA servers on one // host) // ca_uint32_t serverAddr; ca_uint16_t serverPort; - if ( CA_V48( msg.m_count ) ) { + if ( CA_V48( msg.m_count ) ) { struct sockaddr_in ina; if ( retVal.addrIsValid() ) { caNetAddr addr = retVal.getAddr(); @@ -298,7 +296,7 @@ caStatus casDGClient::searchResponse ( const caHdrLargeArray & msg, ina = addr.getSockIP(); // // We dont fill in the servers address here - // because the server was not bound to a particular + // because the server was not bound to a particular // interface, and we would need to waste CPU performing // the following steps to determine the interface that // will be used: @@ -320,43 +318,39 @@ caStatus casDGClient::searchResponse ( const caHdrLargeArray & msg, serverAddr = ~0U; serverPort = ntohs ( inetAddr.sin_port ); } - + ca_uint16_t * pMinorVersion; epicsGuard < epicsMutex > guard ( this->mutex ); - status = this->out.copyInHeader ( CA_PROTO_SEARCH, - sizeof ( *pMinorVersion ), serverPort, 0, - serverAddr, msg.m_available, + status = this->out.copyInHeader ( CA_PROTO_SEARCH, + sizeof ( *pMinorVersion ), serverPort, 0, + serverAddr, msg.m_available, reinterpret_cast ( &pMinorVersion ) ); // // Starting with CA V4.1 the minor version number // is appended to the end of each search reply. - // This value is ignored by earlier clients. + // This value is ignored by earlier clients. // if ( status == S_cas_success ) { AlignedWireRef < epicsUInt16 > tmp ( *pMinorVersion ); tmp = CA_MINOR_PROTOCOL_REVISION; this->out.commitMsg (); } - + return status; } // -// casDGClient::searchFailResponse() -// (only when requested by the client -// - when it isnt a reply to a broadcast) +// casDGClient::searchFailResponse() +// (only when requested by the client +// - when it isnt a reply to a broadcast) // caStatus casDGClient::searchFailResponse ( const caHdrLargeArray * mp ) { - int status; - epicsGuard < epicsMutex > guard ( this->mutex ); - status = this->out.copyInHeader ( CA_PROTO_NOT_FOUND, 0, + this->out.copyInHeader ( CA_PROTO_NOT_FOUND, 0, mp->m_dataType, mp->m_count, mp->m_cid, mp->m_available, 0 ); - if ( status == S_cas_success ) { - this->out.commitMsg (); - } + this->out.commitMsg (); return S_cas_success; } @@ -366,7 +360,7 @@ caStatus casDGClient::searchFailResponse ( const caHdrLargeArray * mp ) */ caStatus casDGClient::versionAction () { - const caHdrLargeArray * mp = this->ctx.getMsg(); + const caHdrLargeArray * mp = this->ctx.getMsg(); if ( mp->m_count != 0 ) { this->minor_version_number = static_cast ( mp->m_count ); @@ -377,7 +371,7 @@ caStatus casDGClient::versionAction () this->seqNoOfReq = 0; } } - return S_cas_success; + return S_cas_success; } // @@ -386,32 +380,32 @@ caStatus casDGClient::versionAction () // void casDGClient::sendBeacon ( ca_uint32_t beaconNumber ) { - union { - caHdr msg; - char buf; - }; + union { + caHdr msg; + char buf; + }; - // - // create the message - // - memset ( & buf, 0, sizeof ( msg ) ); + // + // create the message + // + memset ( & buf, 0, sizeof ( msg ) ); AlignedWireRef < epicsUInt16 > ( msg.m_cmmd ) = CA_PROTO_RSRV_IS_UP; AlignedWireRef < epicsUInt16 > ( msg.m_dataType ) = CA_MINOR_PROTOCOL_REVISION; AlignedWireRef < epicsUInt32 > ( msg.m_cid ) = beaconNumber; - // - // send it to all addresses on the beacon list, + // + // send it to all addresses on the beacon list, // but let the IO specific code set the address // field and the port field - // - this->sendBeaconIO ( buf, sizeof (msg), msg.m_count, msg.m_available ); + // + this->sendBeaconIO ( buf, sizeof (msg), msg.m_count, msg.m_available ); } // // casDGClient::xSend() // -outBufClient::flushCondition casDGClient::xSend ( char *pBufIn, - bufSizeT nBytesToSend, bufSizeT & nBytesSent ) +outBufClient::flushCondition casDGClient::xSend ( char *pBufIn, + bufSizeT nBytesToSend, bufSizeT & nBytesSent ) { bufSizeT totalBytes = 0; while ( totalBytes < nBytesToSend ) { @@ -424,9 +418,9 @@ outBufClient::flushCondition casDGClient::xSend ( char *pBufIn, unsigned sizeDG = pHdr->cadg_nBytes - sizeof ( *pHdr ); if ( pHdr->cadg_addr.isValid() ) { - outBufClient::flushCondition stat = - this->osdSend ( pDG, sizeDG, pHdr->cadg_addr ); - if ( stat != outBufClient::flushProgress ) { + outBufClient::flushCondition stat = + this->osdSend ( pDG, sizeDG, pHdr->cadg_addr ); + if ( stat != outBufClient::flushProgress ) { break; } } @@ -435,10 +429,10 @@ outBufClient::flushCondition casDGClient::xSend ( char *pBufIn, } if ( totalBytes ) { - // - // !! this time fetch may be slowing things down !! - // - //this->lastSendTS = epicsTime::getCurrent(); + // + // !! this time fetch may be slowing things down !! + // + //this->lastSendTS = epicsTime::getCurrent(); nBytesSent = totalBytes; return outBufClient::flushProgress; } @@ -461,16 +455,16 @@ inBufClient::fillCondition casDGClient::xRecv (char *pBufIn, bufSizeT nBytesToRe while (pAfter-pCurBuf >= static_cast(MAX_UDP_RECV+sizeof(cadg))) { pHdr = reinterpret_cast < cadg * > ( pCurBuf ); - stat = this->osdRecv ( reinterpret_cast < char * > ( pHdr + 1 ), + stat = this->osdRecv ( reinterpret_cast < char * > ( pHdr + 1 ), MAX_UDP_RECV, parm, nDGBytesRecv, pHdr->cadg_addr); - if (stat==casFillProgress) { + if (stat==casFillProgress) { pHdr->cadg_nBytes = nDGBytesRecv + sizeof(*pHdr); pCurBuf += pHdr->cadg_nBytes; - // - // !! this time fetch may be slowing things down !! - // - //this->lastRecvTS = epicsTime::getCurrent(); - } + // + // !! this time fetch may be slowing things down !! + // + //this->lastRecvTS = epicsTime::getCurrent(); + } else { break; } @@ -493,9 +487,9 @@ inBufClient::fillCondition casDGClient::xRecv (char *pBufIn, bufSizeT nBytesToRe // this results in many small UDP frames which unfortunately // isnt particularly efficient // -caStatus casDGClient::asyncSearchResponse ( +caStatus casDGClient::asyncSearchResponse ( epicsGuard < casClientMutex > &, const caNetAddr & outAddr, - const caHdrLargeArray & msg, const pvExistReturn & retVal, + const caHdrLargeArray & msg, const pvExistReturn & retVal, ca_uint16_t protocolRevision, ca_uint32_t sequenceNumber ) { if ( retVal.getStatus() != pverExistsHere ) { @@ -503,7 +497,7 @@ caStatus casDGClient::asyncSearchResponse ( } void * pRaw; - const outBufCtx outctx = this->out.pushCtx + const outBufCtx outctx = this->out.pushCtx ( sizeof(cadg), MAX_UDP_SEND, pRaw ); if ( outctx.pushResult() != outBufCtx::pushCtxSuccess ) { return S_cas_sendBlocked; @@ -521,7 +515,7 @@ caStatus casDGClient::asyncSearchResponse ( pMsg->m_dataType = htons ( sequenceNoIsValid ); } - caStatus stat = this->searchResponse ( msg, retVal ); + caStatus stat = this->searchResponse ( msg, retVal ); pRespHdr->cadg_nBytes = this->out.popCtx (outctx) + sizeof ( *pRespHdr ); if ( pRespHdr->cadg_nBytes > sizeof ( *pRespHdr ) + sizeof (caHdr) ) { @@ -529,7 +523,7 @@ caStatus casDGClient::asyncSearchResponse ( this->out.commitRawMsg ( pRespHdr->cadg_nBytes ); } - return stat; + return stat; } // @@ -539,8 +533,8 @@ caStatus casDGClient::processDG () { bufSizeT bytesLeft; caStatus status; - - status = S_cas_success; + + status = S_cas_success; while ( ( bytesLeft = this->in.bytesPresent() ) ) { bufSizeT dgInBytesConsumed; const cadg * pReqHdr = reinterpret_cast < cadg * > ( this->in.msgPtr () ); @@ -567,9 +561,9 @@ caStatus casDGClient::processDG () // insert version header at the start of the reply message this->sendVersion (); - + cadg * pRespHdr = static_cast < cadg * > ( pRaw ); - + // // select the next DG in the input stream and start processing it // @@ -599,7 +593,7 @@ caStatus casDGClient::processDG () // a) it used all of the incoming DG or // b) it used all of the outgoing DG // - // In either case commit the DG to the protocol stream and + // In either case commit the DG to the protocol stream and // release the send lock // // if there are not additional messages passed the version header @@ -659,7 +653,7 @@ caStatus casDGClient::processDG () // unsigned casDGClient::getDebugLevel() const { - return this->getCAS().getDebugLevel(); + return this->getCAS().getDebugLevel(); } // @@ -667,7 +661,7 @@ unsigned casDGClient::getDebugLevel() const // caNetAddr casDGClient::fetchLastRecvAddr () const { - return this->lastRecvAddr; + return this->lastRecvAddr; } // @@ -675,7 +669,7 @@ caNetAddr casDGClient::fetchLastRecvAddr () const // ca_uint32_t casDGClient::datagramSequenceNumber () const { - return this->seqNoOfReq; + return this->seqNoOfReq; } // @@ -690,7 +684,7 @@ void casDGClient::hostName ( char *pBufIn, unsigned bufSizeIn ) const void casDGClient::sendVersion () { epicsGuard < epicsMutex > guard ( this->mutex ); - caStatus status = this->out.copyInHeader ( CA_PROTO_VERSION, 0, + caStatus status = this->out.copyInHeader ( CA_PROTO_VERSION, 0, 0, CA_MINOR_PROTOCOL_REVISION, 0, 0, 0 ); if ( ! status ) { this->out.commitMsg (); @@ -735,27 +729,27 @@ outBufClient::flushCondition casDGClient::flush () // caStatus casDGClient::processMsg () { - int status = S_cas_success; + int status = S_cas_success; try { - unsigned bytesLeft; - while ( ( bytesLeft = this->in.bytesPresent() ) ) { + unsigned bytesLeft; + while ( ( bytesLeft = this->in.bytesPresent() ) ) { caHdrLargeArray msgTmp; unsigned msgSize; ca_uint32_t hdrSize; char * rawMP; { - // - // copy as raw bytes in order to avoid - // alignment problems - // + // + // copy as raw bytes in order to avoid + // alignment problems + // caHdr smallHdr; if ( bytesLeft < sizeof ( smallHdr ) ) { break; } rawMP = this->in.msgPtr (); - memcpy ( & smallHdr, rawMP, sizeof ( smallHdr ) ); + memcpy ( & smallHdr, rawMP, sizeof ( smallHdr ) ); ca_uint32_t payloadSize = AlignedWireRef < epicsUInt16 > ( smallHdr.m_postsize ); ca_uint32_t nElem = AlignedWireRef < epicsUInt16 > ( smallHdr.m_count ); @@ -785,8 +779,8 @@ caStatus casDGClient::processMsg () msgTmp.m_available = AlignedWireRef < epicsUInt32 > ( smallHdr.m_available ); if ( payloadSize & 0x7 ) { - status = this->sendErr ( - & msgTmp, invalidResID, ECA_INTERNAL, + status = this->sendErr ( + & msgTmp, invalidResID, ECA_INTERNAL, "CAS: Datagram request wasn't 8 byte aligned" ); this->in.removeMsg ( bytesLeft ); break; @@ -795,7 +789,7 @@ caStatus casDGClient::processMsg () msgSize = hdrSize + payloadSize; if ( bytesLeft < msgSize ) { if ( msgSize > this->in.bufferSize() ) { - status = this->sendErr ( & msgTmp, invalidResID, ECA_TOLARGE, + status = this->sendErr ( & msgTmp, invalidResID, ECA_TOLARGE, "client's request didnt fit within the CA server's message buffer" ); this->in.removeMsg ( bytesLeft ); } @@ -804,95 +798,96 @@ caStatus casDGClient::processMsg () this->ctx.setMsg ( msgTmp, rawMP + hdrSize ); - if ( this->getCAS().getDebugLevel() > 5u ) { + if ( this->getCAS().getDebugLevel() > 5u ) { char pHostName[64u]; this->lastRecvAddr.stringConvert ( pHostName, sizeof ( pHostName ) ); - caServerI::dumpMsg ( pHostName, "?", + caServerI::dumpMsg ( pHostName, "?", & msgTmp, rawMP + hdrSize, 0 ); - } + } } - // - // Reset the context to the default - // (guarantees that previous message does not get mixed - // up with the current message) - // - this->ctx.setChannel ( NULL ); - this->ctx.setPV ( NULL ); + // + // Reset the context to the default + // (guarantees that previous message does not get mixed + // up with the current message) + // + this->ctx.setChannel ( NULL ); + this->ctx.setPV ( NULL ); - // - // Call protocol stub - // + // + // Call protocol stub + // casDGClient::pCASMsgHandler pHandler; - if ( msgTmp.m_cmmd < NELEMENTS ( casDGClient::msgHandlers ) ) { + if ( msgTmp.m_cmmd < NELEMENTS ( casDGClient::msgHandlers ) ) { pHandler = this->casDGClient::msgHandlers[msgTmp.m_cmmd]; - } + } else { pHandler = & casDGClient::uknownMessageAction; } - status = ( this->*pHandler ) (); - if ( status ) { + status = ( this->*pHandler ) (); + if ( status ) { this->in.removeMsg ( this->in.bytesPresent() ); - break; - } + break; + } this->in.removeMsg ( msgSize ); - } + } } catch ( std::exception & except ) { this->in.removeMsg ( this->in.bytesPresent() ); - status = this->sendErr ( - this->ctx.getMsg(), invalidResID, ECA_INTERNAL, + this->sendErr ( + this->ctx.getMsg(), invalidResID, ECA_INTERNAL, "C++ exception \"%s\" in CA circuit server", except.what () ); status = S_cas_internal; } catch (...) { this->in.removeMsg ( this->in.bytesPresent() ); - status = this->sendErr ( - this->ctx.getMsg(), invalidResID, ECA_INTERNAL, + this->sendErr ( + this->ctx.getMsg(), invalidResID, ECA_INTERNAL, "unexpected C++ exception in CA datagram server" ); status = S_cas_internal; } - return status; + return status; } // -// casDGClient::sendErr() +// casDGClient::sendErr() // -caStatus casDGClient::sendErr ( const caHdrLargeArray *curp, +caStatus casDGClient::sendErr ( const caHdrLargeArray *curp, ca_uint32_t cid, const int reportedStatus, const char *pformat, ... ) { - unsigned stringSize; - char msgBuf[1024]; /* allocate plenty of space for the message string */ - if ( pformat ) { - va_list args; - va_start ( args, pformat ); - int status = vsprintf ( msgBuf, pformat, args ); - if ( status < 0 ) { - errPrintf (S_cas_internal, __FILE__, __LINE__, - "bad sendErr(%s)", pformat); - stringSize = 0u; - } - else { - stringSize = 1u + (unsigned) status; - } - } - else { - stringSize = 0u; - } + unsigned stringSize; + char msgBuf[1024]; /* allocate plenty of space for the message string */ + if ( pformat ) { + va_list args; + va_start ( args, pformat ); + int status = vsprintf ( msgBuf, pformat, args ); + if ( status < 0 ) { + errPrintf (S_cas_internal, __FILE__, __LINE__, + "bad sendErr(%s)", pformat); + stringSize = 0u; + } + else { + stringSize = 1u + (unsigned) status; + } + va_end ( args ); + } + else { + stringSize = 0u; + } unsigned hdrSize = sizeof ( caHdr ); - if ( ( curp->m_postsize >= 0xffff || curp->m_count >= 0xffff ) && + if ( ( curp->m_postsize >= 0xffff || curp->m_count >= 0xffff ) && CA_V49( this->minor_version_number ) ) { hdrSize += 2 * sizeof ( ca_uint32_t ); } caHdr * pReqOut; epicsGuard < epicsMutex > guard ( this->mutex ); - caStatus status = this->out.copyInHeader ( CA_PROTO_ERROR, + caStatus status = this->out.copyInHeader ( CA_PROTO_ERROR, hdrSize + stringSize, 0, 0, cid, reportedStatus, reinterpret_cast ( & pReqOut ) ); if ( ! status ) { @@ -902,7 +897,7 @@ caStatus casDGClient::sendErr ( const caHdrLargeArray *curp, * copy back the request protocol * (in network byte order) */ - if ( ( curp->m_postsize >= 0xffff || curp->m_count >= 0xffff ) && + if ( ( curp->m_postsize >= 0xffff || curp->m_count >= 0xffff ) && CA_V49( this->minor_version_number ) ) { ca_uint32_t *pLW = ( ca_uint32_t * ) ( pReqOut + 1 ); pReqOut->m_cmmd = htons ( curp->m_cmmd ); @@ -933,7 +928,7 @@ caStatus casDGClient::sendErr ( const caHdrLargeArray *curp, this->out.commitMsg (); } - return S_cas_success; + return S_cas_success; } @@ -942,17 +937,17 @@ caStatus casDGClient::sendErr ( const caHdrLargeArray *curp, // caStatus casDGClient::echoAction () { - const caHdrLargeArray * mp = this->ctx.getMsg(); - const void * dp = this->ctx.getData(); + const caHdrLargeArray * mp = this->ctx.getMsg(); + const void * dp = this->ctx.getData(); void * pPayloadOut; epicsGuard < epicsMutex > guard ( this->mutex ); - caStatus status = this->out.copyInHeader ( mp->m_cmmd, mp->m_postsize, + caStatus status = this->out.copyInHeader ( mp->m_cmmd, mp->m_postsize, mp->m_dataType, mp->m_count, mp->m_cid, mp->m_available, & pPayloadOut ); if ( ! status ) { memcpy ( pPayloadOut, dp, mp->m_postsize ); this->out.commitMsg (); } - return S_cas_success; + return S_cas_success; } diff --git a/src/ca/legacy/pcas/generic/casDGClient.h b/src/ca/legacy/pcas/generic/casDGClient.h index 334af2043..cac093380 100644 --- a/src/ca/legacy/pcas/generic/casDGClient.h +++ b/src/ca/legacy/pcas/generic/casDGClient.h @@ -1,5 +1,3 @@ - - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. diff --git a/src/ca/legacy/pcas/generic/casEvent.h b/src/ca/legacy/pcas/generic/casEvent.h index a4ba0424c..efe62b5b7 100644 --- a/src/ca/legacy/pcas/generic/casEvent.h +++ b/src/ca/legacy/pcas/generic/casEvent.h @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -9,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casEventMask.cc b/src/ca/legacy/pcas/generic/casEventMask.cc index 062d41043..a72ced06d 100644 --- a/src/ca/legacy/pcas/generic/casEventMask.cc +++ b/src/ca/legacy/pcas/generic/casEventMask.cc @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casEventMask.h b/src/ca/legacy/pcas/generic/casEventMask.h index 27d805f6b..d166ca918 100644 --- a/src/ca/legacy/pcas/generic/casEventMask.h +++ b/src/ca/legacy/pcas/generic/casEventMask.h @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casEventRegistry.h b/src/ca/legacy/pcas/generic/casEventRegistry.h index 12c3a62e4..c10f982e3 100644 --- a/src/ca/legacy/pcas/generic/casEventRegistry.h +++ b/src/ca/legacy/pcas/generic/casEventRegistry.h @@ -1,6 +1,3 @@ - - - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -11,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casEventSys.cc b/src/ca/legacy/pcas/generic/casEventSys.cc index 46a75a051..8783f36f3 100644 --- a/src/ca/legacy/pcas/generic/casEventSys.cc +++ b/src/ca/legacy/pcas/generic/casEventSys.cc @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casEventSys.h b/src/ca/legacy/pcas/generic/casEventSys.h index bde07f2f8..d194eedc0 100644 --- a/src/ca/legacy/pcas/generic/casEventSys.h +++ b/src/ca/legacy/pcas/generic/casEventSys.h @@ -1,5 +1,3 @@ - - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -10,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casMonEvent.cc b/src/ca/legacy/pcas/generic/casMonEvent.cc index 09b0131a0..bcba9f92e 100644 --- a/src/ca/legacy/pcas/generic/casMonEvent.cc +++ b/src/ca/legacy/pcas/generic/casMonEvent.cc @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casMonEvent.h b/src/ca/legacy/pcas/generic/casMonEvent.h index 23db817e7..d31200cc0 100644 --- a/src/ca/legacy/pcas/generic/casMonEvent.h +++ b/src/ca/legacy/pcas/generic/casMonEvent.h @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -9,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casMonitor.cc b/src/ca/legacy/pcas/generic/casMonitor.cc index 93a036648..05deb4a82 100644 --- a/src/ca/legacy/pcas/generic/casMonitor.cc +++ b/src/ca/legacy/pcas/generic/casMonitor.cc @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casMonitor.h b/src/ca/legacy/pcas/generic/casMonitor.h index aa4ef090e..1c59dfbdf 100644 --- a/src/ca/legacy/pcas/generic/casMonitor.h +++ b/src/ca/legacy/pcas/generic/casMonitor.h @@ -1,5 +1,3 @@ - - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -10,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casPV.cc b/src/ca/legacy/pcas/generic/casPV.cc index 33d21d08e..317200121 100644 --- a/src/ca/legacy/pcas/generic/casPV.cc +++ b/src/ca/legacy/pcas/generic/casPV.cc @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casPVI.cc b/src/ca/legacy/pcas/generic/casPVI.cc index 8702614be..50e5d27a7 100644 --- a/src/ca/legacy/pcas/generic/casPVI.cc +++ b/src/ca/legacy/pcas/generic/casPVI.cc @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 @@ -225,8 +223,9 @@ void casPVI::updateEnumStringTableAsyncCompletion ( const gdd & resp ) assert ( gdd_status == 0 ); // - // preallocate the correct amount + // clear and preallocate the correct amount // + this->enumStrTbl.clear (); this->enumStrTbl.reserve ( count ); if ( resp.primitiveType() == aitEnumString ) { @@ -264,6 +263,18 @@ void casPVI::updateEnumStringTableAsyncCompletion ( const gdd & resp ) void casPVI::postEvent ( const casEventMask & select, const gdd & event ) { epicsGuard < epicsMutex > guard ( this->mutex ); + // if this is a DBE_PROPERTY event for an enum type + // update the enum string table + if ( (select & this->pCAS->propertyEventMask()).eventsSelected() ) { + const gdd *menu = NULL; + if ( event.applicationType() == gddAppType_dbr_gr_enum ) + menu = event.getDD( gddAppTypeIndex_dbr_gr_enum_enums ); + else if ( event.applicationType() == gddAppType_dbr_ctrl_enum ) + menu = event.getDD( gddAppTypeIndex_dbr_ctrl_enum_enums ); + if ( menu ) + updateEnumStringTableAsyncCompletion( *menu ); + } + if ( this->nMonAttached ) { // we are paying some significant locking overhead for // these diagnostic counters diff --git a/src/ca/legacy/pcas/generic/casPVI.h b/src/ca/legacy/pcas/generic/casPVI.h index 1939144db..feea79d23 100644 --- a/src/ca/legacy/pcas/generic/casPVI.h +++ b/src/ca/legacy/pcas/generic/casPVI.h @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -9,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/casStrmClient.cc b/src/ca/legacy/pcas/generic/casStrmClient.cc index 6b1de3629..ff12e889e 100644 --- a/src/ca/legacy/pcas/generic/casStrmClient.cc +++ b/src/ca/legacy/pcas/generic/casStrmClient.cc @@ -388,14 +388,12 @@ caStatus casStrmClient::echoAction ( epicsGuard < casClientMutex > & ) // // casStrmClient::verifyRequest() // -caStatus casStrmClient::verifyRequest ( casChannelI * & pChan ) +caStatus casStrmClient::verifyRequest (casChannelI * & pChan , bool allowdyn) { - const caHdrLargeArray * mp = this->ctx.getMsg(); - // // channel exists for this resource id ? // - chronIntId tmpId ( mp->m_cid ); + chronIntId tmpId ( ctx.msg.m_cid ); pChan = this->chanTable.lookup ( tmpId ); if ( ! pChan ) { return ECA_BADCHID; @@ -404,14 +402,15 @@ caStatus casStrmClient::verifyRequest ( casChannelI * & pChan ) // // data type out of range ? // - if ( mp->m_dataType > ((unsigned)LAST_BUFFER_TYPE) ) { + if ( ctx.msg.m_dataType > ((unsigned)LAST_BUFFER_TYPE) ) { return ECA_BADTYPE; } // // element count out of range ? // - if ( mp->m_count > pChan->getPVI().nativeCount() || mp->m_count == 0u ) { + if ( ctx.msg.m_count > pChan->getMaxElem() || + ( !allowdyn && ctx.msg.m_count == 0u ) ) { return ECA_BADCOUNT; } @@ -444,7 +443,7 @@ caStatus casStrmClient::readAction ( epicsGuard < casClientMutex > & guard ) casChannelI * pChan; { - caStatus status = this->verifyRequest ( pChan ); + caStatus status = this->verifyRequest ( pChan, CA_V413 ( this->minor_version_number ) ); if ( status != ECA_NORMAL ) { if ( pChan ) { return this->sendErr ( guard, mp, pChan->getCID(), @@ -531,11 +530,15 @@ caStatus casStrmClient::readResponse ( epicsGuard < casClientMutex > & guard, pChan->getCID(), status, ECA_GETFAIL ); } + ca_uint32_t count = (msg.m_count == 0) ? + (ca_uint32_t)desc.getDataSizeElements() : + msg.m_count; + void * pPayload; { - unsigned payloadSize = dbr_size_n ( msg.m_dataType, msg.m_count ); + unsigned payloadSize = dbr_size_n ( msg.m_dataType, count ); caStatus localStatus = this->out.copyInHeader ( msg.m_cmmd, payloadSize, - msg.m_dataType, msg.m_count, pChan->getCID (), + msg.m_dataType, count, pChan->getCID (), msg.m_available, & pPayload ); if ( localStatus ) { if ( localStatus==S_cas_hugeRequest ) { @@ -551,21 +554,21 @@ caStatus casStrmClient::readResponse ( epicsGuard < casClientMutex > & guard, // (places the data in network format) // int mapDBRStatus = gddMapDbr[msg.m_dataType].conv_dbr( - pPayload, msg.m_count, desc, pChan->enumStringTable() ); + pPayload, count, desc, pChan->enumStringTable() ); if ( mapDBRStatus < 0 ) { desc.dump (); errPrintf ( S_cas_badBounds, __FILE__, __LINE__, "- get with PV=%s type=%u count=%u", - pChan->getPVI().getName(), msg.m_dataType, msg.m_count ); + pChan->getPVI().getName(), msg.m_dataType, count ); return this->sendErrWithEpicsStatus ( guard, & msg, pChan->getCID(), S_cas_badBounds, ECA_GETFAIL ); } int cacStatus = caNetConvert ( - msg.m_dataType, pPayload, pPayload, true, msg.m_count ); + msg.m_dataType, pPayload, pPayload, true, count ); if ( cacStatus != ECA_NORMAL ) { return this->sendErrWithEpicsStatus ( guard, & msg, pChan->getCID(), S_cas_internal, cacStatus ); } - if ( msg.m_dataType == DBR_STRING && msg.m_count == 1u ) { + if ( msg.m_dataType == DBR_STRING && count == 1u ) { unsigned reducedPayloadSize = strlen ( static_cast < char * > ( pPayload ) ) + 1u; this->out.commitMsg ( reducedPayloadSize ); } @@ -585,7 +588,7 @@ caStatus casStrmClient::readNotifyAction ( epicsGuard < casClientMutex > & guard casChannelI * pChan; { - caStatus status = this->verifyRequest ( pChan ); + caStatus status = this->verifyRequest ( pChan, CA_V413 ( this->minor_version_number ) ); if ( status != ECA_NORMAL ) { return this->readNotifyFailureResponse ( guard, * mp, status ); } @@ -656,11 +659,15 @@ caStatus casStrmClient::readNotifyResponse ( epicsGuard < casClientMutex > & gua return ecaStatus; } + ca_uint32_t count = (msg.m_count == 0) ? + (ca_uint32_t)desc.getDataSizeElements() : + msg.m_count; + void *pPayload; { - unsigned size = dbr_size_n ( msg.m_dataType, msg.m_count ); + unsigned size = dbr_size_n ( msg.m_dataType, count ); caStatus status = this->out.copyInHeader ( msg.m_cmmd, size, - msg.m_dataType, msg.m_count, ECA_NORMAL, + msg.m_dataType, count, ECA_NORMAL, msg.m_available, & pPayload ); if ( status ) { if ( status == S_cas_hugeRequest ) { @@ -675,23 +682,23 @@ caStatus casStrmClient::readNotifyResponse ( epicsGuard < casClientMutex > & gua // convert gdd to db_access type // int mapDBRStatus = gddMapDbr[msg.m_dataType].conv_dbr ( pPayload, - msg.m_count, desc, pChan->enumStringTable() ); + count, desc, pChan->enumStringTable() ); if ( mapDBRStatus < 0 ) { desc.dump(); errPrintf ( S_cas_badBounds, __FILE__, __LINE__, "- get notify with PV=%s type=%u count=%u", - pChan->getPVI().getName(), msg.m_dataType, msg.m_count ); + pChan->getPVI().getName(), msg.m_dataType, count ); return this->readNotifyFailureResponse ( guard, msg, ECA_NOCONVERT ); } int cacStatus = caNetConvert ( - msg.m_dataType, pPayload, pPayload, true, msg.m_count ); + msg.m_dataType, pPayload, pPayload, true, count ); if ( cacStatus != ECA_NORMAL ) { return this->sendErrWithEpicsStatus ( guard, & msg, pChan->getCID(), S_cas_internal, cacStatus ); } - if ( msg.m_dataType == DBR_STRING && msg.m_count == 1u ) { + if ( msg.m_dataType == DBR_STRING && count == 1u ) { unsigned reducedPayloadSize = strlen ( static_cast < char * > ( pPayload ) ) + 1u; this->out.commitMsg ( reducedPayloadSize ); } @@ -727,8 +734,8 @@ caStatus casStrmClient::readNotifyFailureResponse ( // to be more efficent if it discovers that the source has less data // than the destination) // -caStatus convertContainerMemberToAtomic ( gdd & dd, - aitUint32 appType, aitUint32 elemCount ) +caStatus convertContainerMemberToAtomic ( gdd & dd, + aitUint32 appType, aitUint32 requestedCount, aitUint32 nativeCount ) { gdd * pVal; if ( dd.isContainer() ) { @@ -755,13 +762,13 @@ caStatus convertContainerMemberToAtomic ( gdd & dd, return S_cas_badType; } - if ( elemCount <= 1 ) { + if ( nativeCount <= 1 ) { return S_cas_success; } // convert to atomic gddBounds bds; - bds.setSize ( elemCount ); + bds.setSize ( requestedCount ); bds.setFirst ( 0u ); pVal->setDimension ( 1u, & bds ); return S_cas_success; @@ -770,9 +777,9 @@ caStatus convertContainerMemberToAtomic ( gdd & dd, // // createDBRDD () // -static caStatus createDBRDD ( unsigned dbrType, - unsigned elemCount, gdd * & pDD ) -{ +static caStatus createDBRDD ( unsigned dbrType, + unsigned requestedCount, unsigned nativeCount, gdd * & pDD ) +{ /* * DBR type has already been checked, but it is possible * that "gddDbrToAit" will not track with changes in @@ -799,7 +806,7 @@ static caStatus createDBRDD ( unsigned dbrType, // fix the value element count caStatus status = convertContainerMemberToAtomic ( - *pDescRet, gddAppType_value, elemCount ); + *pDescRet, gddAppType_value, requestedCount, nativeCount ); if ( status != S_cas_success ) { pDescRet->unreference (); return status; @@ -849,11 +856,27 @@ caStatus casStrmClient::monitorResponse ( casChannelI & chan, const caHdrLargeArray & msg, const gdd & desc, const caStatus completionStatus ) { + aitUint32 elementCount = 0; + if (desc.isContainer()) { + aitUint32 index; + int gdds = gddApplicationTypeTable::app_table.mapAppToIndex + ( desc.applicationType(), gddAppType_value, index ); + if ( gdds ) { + return S_cas_badType; + } + elementCount = desc.getDD(index)->getDataSizeElements(); + } else { + elementCount = desc.getDataSizeElements(); + } + ca_uint32_t count = (msg.m_count == 0) ? + (ca_uint32_t)elementCount : + msg.m_count; + void * pPayload = 0; { - ca_uint32_t size = dbr_size_n ( msg.m_dataType, msg.m_count ); + ca_uint32_t size = dbr_size_n ( msg.m_dataType, count ); caStatus status = out.copyInHeader ( msg.m_cmmd, size, - msg.m_dataType, msg.m_count, ECA_NORMAL, + msg.m_dataType, count, ECA_NORMAL, msg.m_available, & pPayload ); if ( status ) { if ( status == S_cas_hugeRequest ) { @@ -871,7 +894,8 @@ caStatus casStrmClient::monitorResponse ( gdd * pDBRDD = 0; if ( completionStatus == S_cas_success ) { - caStatus status = createDBRDD ( msg.m_dataType, msg.m_count, pDBRDD ); + caStatus status = createDBRDD ( msg.m_dataType, count, + chan.getMaxElem(), pDBRDD ); if ( status != S_cas_success ) { caStatus ecaStatus; if ( status == S_cas_badType ) { @@ -892,7 +916,7 @@ caStatus casStrmClient::monitorResponse ( pDBRDD->unreference (); errPrintf ( S_cas_noConvert, __FILE__, __LINE__, "no conversion between event app type=%d and DBR type=%d Element count=%d", - desc.applicationType (), msg.m_dataType, msg.m_count); + desc.applicationType (), msg.m_dataType, count); return monitorFailureResponse ( guard, msg, ECA_NOCONVERT ); } } @@ -915,14 +939,14 @@ caStatus casStrmClient::monitorResponse ( } int mapDBRStatus = gddMapDbr[msg.m_dataType].conv_dbr ( - pPayload, msg.m_count, *pDBRDD, chan.enumStringTable() ); + pPayload, count, *pDBRDD, chan.enumStringTable() ); if ( mapDBRStatus < 0 ) { pDBRDD->unreference (); return monitorFailureResponse ( guard, msg, ECA_NOCONVERT ); } int cacStatus = caNetConvert ( - msg.m_dataType, pPayload, pPayload, true, msg.m_count ); + msg.m_dataType, pPayload, pPayload, true, count ); if ( cacStatus != ECA_NORMAL ) { pDBRDD->unreference (); return this->sendErrWithEpicsStatus ( @@ -932,7 +956,7 @@ caStatus casStrmClient::monitorResponse ( // // force string message size to be the true size // - if ( msg.m_dataType == DBR_STRING && msg.m_count == 1u ) { + if ( msg.m_dataType == DBR_STRING && count == 1u ) { ca_uint32_t reducedPayloadSize = strlen ( static_cast < char * > ( pPayload ) ) + 1u; this->out.commitMsg ( reducedPayloadSize ); } @@ -1842,7 +1866,7 @@ caStatus casStrmClient::privateCreateChanResponse ( // the protocol buffer. // assert ( nativeTypeDBR <= 0xffff ); - aitIndex nativeCount = chan.getPVI().nativeCount(); + aitIndex nativeCount = chan.getMaxElem(); assert ( nativeCount <= 0xffffffff ); assert ( hdr.m_cid == chan.getCID() ); status = this->out.copyInHeader ( CA_PROTO_CREATE_CHAN, 0, @@ -1940,7 +1964,7 @@ caStatus casStrmClient::eventAddAction ( casChannelI *pciu; { - caStatus status = casStrmClient::verifyRequest ( pciu ); + caStatus status = casStrmClient::verifyRequest ( pciu, CA_V413 ( this->minor_version_number ) ); if ( status != ECA_NORMAL ) { if ( pciu ) { return this->sendErr ( guard, mp, @@ -2601,8 +2625,8 @@ caStatus casStrmClient::read () { gdd * pDD = 0; - caStatus status = createDBRDD ( pHdr->m_dataType, - pHdr->m_count, pDD ); + caStatus status = createDBRDD ( pHdr->m_dataType, pHdr->m_count, + this->ctx.getChannel()->getMaxElem(), pDD ); if ( status != S_cas_success ) { return status; } @@ -2749,6 +2773,7 @@ caStatus casStrmClient::sendErr ( epicsGuard &, else { stringSize = 1u + (unsigned) status; } + va_end ( args ); } else { stringSize = 0u; diff --git a/src/ca/legacy/pcas/generic/casStrmClient.h b/src/ca/legacy/pcas/generic/casStrmClient.h index 3f6c0a51b..0fdd36bb4 100644 --- a/src/ca/legacy/pcas/generic/casStrmClient.h +++ b/src/ca/legacy/pcas/generic/casStrmClient.h @@ -69,7 +69,7 @@ private: bool responseIsPending; caStatus createChannel ( const char * pName ); - caStatus verifyRequest ( casChannelI * & pChan ); + caStatus verifyRequest ( casChannelI * & pChan, bool allowdyn = false ); typedef caStatus ( casStrmClient :: * pCASMsgHandler ) ( epicsGuard < casClientMutex > & ); static pCASMsgHandler const msgHandlers[CA_PROTO_LAST_CMMD+1u]; diff --git a/src/ca/legacy/pcas/generic/chanIntfForPV.cc b/src/ca/legacy/pcas/generic/chanIntfForPV.cc index 2ea2da606..4c983df60 100644 --- a/src/ca/legacy/pcas/generic/chanIntfForPV.cc +++ b/src/ca/legacy/pcas/generic/chanIntfForPV.cc @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/chanIntfForPV.h b/src/ca/legacy/pcas/generic/chanIntfForPV.h index 10a2216a7..c61a97bab 100644 --- a/src/ca/legacy/pcas/generic/chanIntfForPV.h +++ b/src/ca/legacy/pcas/generic/chanIntfForPV.h @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -9,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/channelDestroyEvent.cpp b/src/ca/legacy/pcas/generic/channelDestroyEvent.cpp index 6256e75b3..33c64938a 100644 --- a/src/ca/legacy/pcas/generic/channelDestroyEvent.cpp +++ b/src/ca/legacy/pcas/generic/channelDestroyEvent.cpp @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/channelDestroyEvent.h b/src/ca/legacy/pcas/generic/channelDestroyEvent.h index 7c8b5821c..17b32f72a 100644 --- a/src/ca/legacy/pcas/generic/channelDestroyEvent.h +++ b/src/ca/legacy/pcas/generic/channelDestroyEvent.h @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/clientBufMemoryManager.cpp b/src/ca/legacy/pcas/generic/clientBufMemoryManager.cpp index bde66a28c..2f5fc128b 100644 --- a/src/ca/legacy/pcas/generic/clientBufMemoryManager.cpp +++ b/src/ca/legacy/pcas/generic/clientBufMemoryManager.cpp @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -9,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/inBuf.cc b/src/ca/legacy/pcas/generic/inBuf.cc index f75a68df7..db97a082c 100644 --- a/src/ca/legacy/pcas/generic/inBuf.cc +++ b/src/ca/legacy/pcas/generic/inBuf.cc @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/ioBlocked.h b/src/ca/legacy/pcas/generic/ioBlocked.h index 51429f8ce..000292eaf 100644 --- a/src/ca/legacy/pcas/generic/ioBlocked.h +++ b/src/ca/legacy/pcas/generic/ioBlocked.h @@ -9,8 +9,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/mt/ioBlocked.cc b/src/ca/legacy/pcas/generic/mt/ioBlocked.cc index 7d43af575..974d113e2 100644 --- a/src/ca/legacy/pcas/generic/mt/ioBlocked.cc +++ b/src/ca/legacy/pcas/generic/mt/ioBlocked.cc @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ // -// $Revision-Id$ // Author: Jeff Hill // This file implements a IO blocked list NOOP for multi-threaded systems // diff --git a/src/ca/legacy/pcas/generic/outBuf.cc b/src/ca/legacy/pcas/generic/outBuf.cc index a4f4d3eac..e755753e8 100644 --- a/src/ca/legacy/pcas/generic/outBuf.cc +++ b/src/ca/legacy/pcas/generic/outBuf.cc @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ca/legacy/pcas/generic/pvAttachReturn.cc b/src/ca/legacy/pcas/generic/pvAttachReturn.cc index 11167ea1b..0b70fef8c 100644 --- a/src/ca/legacy/pcas/generic/pvAttachReturn.cc +++ b/src/ca/legacy/pcas/generic/pvAttachReturn.cc @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -9,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ // // Author: Jeffrey O. Hill // johill@lanl.gov diff --git a/src/ca/legacy/pcas/generic/pvExistReturn.cc b/src/ca/legacy/pcas/generic/pvExistReturn.cc index 8d200eb0b..46fd7eb65 100644 --- a/src/ca/legacy/pcas/generic/pvExistReturn.cc +++ b/src/ca/legacy/pcas/generic/pvExistReturn.cc @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -9,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ // // Author: Jeffrey O. Hill // johill@lanl.gov diff --git a/src/ca/legacy/pcas/generic/st/casDGEvWakeup.h b/src/ca/legacy/pcas/generic/st/casDGEvWakeup.h index ff41d6b62..9676bad1c 100644 --- a/src/ca/legacy/pcas/generic/st/casDGEvWakeup.h +++ b/src/ca/legacy/pcas/generic/st/casDGEvWakeup.h @@ -1,5 +1,3 @@ - - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -9,9 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ -// #ifndef casDGEvWakeuph #define casDGEvWakeuph diff --git a/src/ca/legacy/pcas/generic/st/casDGIOWakeup.h b/src/ca/legacy/pcas/generic/st/casDGIOWakeup.h index d9ffb8f79..0f71ce607 100644 --- a/src/ca/legacy/pcas/generic/st/casDGIOWakeup.h +++ b/src/ca/legacy/pcas/generic/st/casDGIOWakeup.h @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -8,9 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ -// #ifndef casDGIOWakeuph #define casDGIOWakeuph diff --git a/src/ca/legacy/pcas/generic/st/casDGIntfOS.cc b/src/ca/legacy/pcas/generic/st/casDGIntfOS.cc index 92e26ff4e..0ce4258d1 100644 --- a/src/ca/legacy/pcas/generic/st/casDGIntfOS.cc +++ b/src/ca/legacy/pcas/generic/st/casDGIntfOS.cc @@ -9,7 +9,6 @@ // // casDGIntfOS.cc -// $Revision-Id$ // #include "fdManager.h" diff --git a/src/ca/legacy/pcas/generic/st/casDGIntfOS.h b/src/ca/legacy/pcas/generic/st/casDGIntfOS.h index 4919daa46..38d4b46ac 100644 --- a/src/ca/legacy/pcas/generic/st/casDGIntfOS.h +++ b/src/ca/legacy/pcas/generic/st/casDGIntfOS.h @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -8,9 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ -// #ifndef casDGIntfOSh #define casDGIntfOSh diff --git a/src/ca/legacy/pcas/generic/st/casIntfOS.cc b/src/ca/legacy/pcas/generic/st/casIntfOS.cc index 4f86db965..87d24a0a4 100644 --- a/src/ca/legacy/pcas/generic/st/casIntfOS.cc +++ b/src/ca/legacy/pcas/generic/st/casIntfOS.cc @@ -9,11 +9,7 @@ \*************************************************************************/ /* - * * casIntfOS.cc - * $Revision-Id$ - * - * */ #include "fdManager.h" diff --git a/src/ca/legacy/pcas/generic/st/casIntfOS.h b/src/ca/legacy/pcas/generic/st/casIntfOS.h index 68c21bded..40d077bb0 100644 --- a/src/ca/legacy/pcas/generic/st/casIntfOS.h +++ b/src/ca/legacy/pcas/generic/st/casIntfOS.h @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -9,12 +8,8 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ // -// $Revision-Id$ -// // casOSD.h - Channel Access Server OS dependent wrapper // -// -// #ifndef casIntfOSh #define casIntfOSh diff --git a/src/ca/legacy/pcas/generic/st/casOSD.h b/src/ca/legacy/pcas/generic/st/casOSD.h index 980c7b560..0fb8baf46 100644 --- a/src/ca/legacy/pcas/generic/st/casOSD.h +++ b/src/ca/legacy/pcas/generic/st/casOSD.h @@ -8,12 +8,8 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ // -// $Revision-Id$ -// // casOSD.h - Channel Access Server OS dependent wrapper // -// -// #ifndef includeCASOSDH #define includeCASOSDH diff --git a/src/ca/legacy/pcas/generic/st/casStreamOS.cc b/src/ca/legacy/pcas/generic/st/casStreamOS.cc index e1fedb38a..1b6c4e2c2 100644 --- a/src/ca/legacy/pcas/generic/st/casStreamOS.cc +++ b/src/ca/legacy/pcas/generic/st/casStreamOS.cc @@ -8,7 +8,6 @@ \*************************************************************************/ // // casStreamOS.cc -// $Revision-Id$ // // TO DO: // o armRecv() and armSend() should return bad status when diff --git a/src/ca/legacy/pcas/generic/st/casStreamOS.h b/src/ca/legacy/pcas/generic/st/casStreamOS.h index 294cfcb5e..7d0612c18 100644 --- a/src/ca/legacy/pcas/generic/st/casStreamOS.h +++ b/src/ca/legacy/pcas/generic/st/casStreamOS.h @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -8,9 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ -// #ifndef casStreamOSh #define casStreamOSh diff --git a/src/ca/legacy/pcas/generic/st/ioBlocked.cc b/src/ca/legacy/pcas/generic/st/ioBlocked.cc index b05f0ba26..4d5856f6a 100644 --- a/src/ca/legacy/pcas/generic/st/ioBlocked.cc +++ b/src/ca/legacy/pcas/generic/st/ioBlocked.cc @@ -9,7 +9,6 @@ \*************************************************************************/ // -// $Revision-Id$ // Author Jeff Hill // // IO Blocked list class diff --git a/src/ca/legacy/pcas/generic/templateInstances.cpp b/src/ca/legacy/pcas/generic/templateInstances.cpp deleted file mode 100644 index e1df222dc..000000000 --- a/src/ca/legacy/pcas/generic/templateInstances.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -#define epicsExportSharedSymbols -#include "ipIgnoreEntry.h" -#include "casChannelI.h" - -#ifdef _MSC_VER -# pragma warning ( push ) -# pragma warning ( disable:4660 ) -#endif - -template class resTable < ipIgnoreEntry, ipIgnoreEntry >; -template class resTable < casChannelI, chronIntId >; -template class resTable < casEventMaskEntry, stringId >; -template class chronIntIdResTable < casChannelI >; -template class tsFreeList < casMonEvent, 1024, epicsMutexNOOP >; -template class tsFreeList < casMonitor, 1024, epicsMutex >; - - -#ifdef _MSC_VER -# pragma warning ( pop ) -#endif diff --git a/src/ca/legacy/pcas/io/bsdSocket/caServerIO.cc b/src/ca/legacy/pcas/io/bsdSocket/caServerIO.cc index 8e5c356a6..04c729654 100644 --- a/src/ca/legacy/pcas/io/bsdSocket/caServerIO.cc +++ b/src/ca/legacy/pcas/io/bsdSocket/caServerIO.cc @@ -7,11 +7,8 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ // -// $Revision-Id$ -// // verify connection state prior to doing anything in this file // -// #include #include diff --git a/src/ca/legacy/pcas/io/bsdSocket/caServerIO.h b/src/ca/legacy/pcas/io/bsdSocket/caServerIO.h index b45903cff..980549c3e 100644 --- a/src/ca/legacy/pcas/io/bsdSocket/caServerIO.h +++ b/src/ca/legacy/pcas/io/bsdSocket/caServerIO.h @@ -1,5 +1,3 @@ - - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -9,9 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ -// #ifndef caServerIOh #define caServerIOh diff --git a/src/ca/legacy/pcas/io/bsdSocket/casDGIntfIO.h b/src/ca/legacy/pcas/io/bsdSocket/casDGIntfIO.h index 370bfe1d1..f84190cab 100644 --- a/src/ca/legacy/pcas/io/bsdSocket/casDGIntfIO.h +++ b/src/ca/legacy/pcas/io/bsdSocket/casDGIntfIO.h @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -8,9 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ -// #ifndef casDGIntfIOh #define casDGIntfIOh diff --git a/src/ca/legacy/pcas/io/bsdSocket/casIOD.h b/src/ca/legacy/pcas/io/bsdSocket/casIOD.h index 2940874fd..318efb81b 100644 --- a/src/ca/legacy/pcas/io/bsdSocket/casIOD.h +++ b/src/ca/legacy/pcas/io/bsdSocket/casIOD.h @@ -7,9 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ -// #ifndef includeCASIODH #define includeCASIODH diff --git a/src/ca/legacy/pcas/io/bsdSocket/casIntfIO.cc b/src/ca/legacy/pcas/io/bsdSocket/casIntfIO.cc index 41ce6de8d..2c2cb5bef 100644 --- a/src/ca/legacy/pcas/io/bsdSocket/casIntfIO.cc +++ b/src/ca/legacy/pcas/io/bsdSocket/casIntfIO.cc @@ -4,7 +4,7 @@ * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. * EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ // @@ -32,7 +32,7 @@ const unsigned caServerConnectPendQueueSize = 5u; // // casIntfIO::casIntfIO() // -casIntfIO::casIntfIO ( const caNetAddr & addrIn ) : +casIntfIO::casIntfIO ( const caNetAddr & addrIn ) : sock ( INVALID_SOCKET ), addr ( addrIn.getSockIP() ) { @@ -40,80 +40,79 @@ casIntfIO::casIntfIO ( const caNetAddr & addrIn ) : osiSocklen_t addrSize; bool portChange; - if ( ! osiSockAttach () ) { - throw S_cas_internal; - } + if ( ! osiSockAttach () ) { + throw S_cas_internal; + } - /* - * Setup the server socket - */ - this->sock = epicsSocketCreate ( AF_INET, SOCK_STREAM, IPPROTO_TCP ); - if (this->sock==INVALID_SOCKET) { + /* + * Setup the server socket + */ + this->sock = epicsSocketCreate ( AF_INET, SOCK_STREAM, IPPROTO_TCP ); + if (this->sock == INVALID_SOCKET) { char sockErrBuf[64]; epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) ); - printf ( "No socket error was %s\n", sockErrBuf ); - throw S_cas_noFD; - } + printf ( "No socket error was %s\n", sockErrBuf ); + throw S_cas_noFD; + } epicsSocketEnableAddressReuseDuringTimeWaitState ( this->sock ); - status = bind ( this->sock, - reinterpret_cast (&this->addr), - sizeof(this->addr) ); - if (status<0) { - if (SOCKERRNO == SOCK_EADDRINUSE) { - // - // enable assignment of a default port - // (so the getsockname() call below will - // work correctly) - // - this->addr.sin_port = ntohs (0); - status = bind( + status = bind ( this->sock, + reinterpret_cast (&this->addr), + sizeof(this->addr) ); + if (status < 0) { + if (SOCKERRNO == SOCK_EADDRINUSE || + SOCKERRNO == SOCK_EACCES) { + // + // enable assignment of a default port + // (so the getsockname() call below will + // work correctly) + // + this->addr.sin_port = ntohs (0); + status = bind( this->sock, reinterpret_cast (&this->addr), sizeof(this->addr) ); - } - if (status<0) { + } + if (status < 0) { char sockErrBuf[64]; epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) ); - char buf[64]; - ipAddrToA (&this->addr, buf, sizeof(buf)); - errPrintf ( S_cas_bindFail, - __FILE__, __LINE__, - "- bind TCP IP addr=%s failed because %s", - buf, sockErrBuf ); + char buf[64]; + ipAddrToA (&this->addr, buf, sizeof(buf)); + errlogPrintf ( "CAS: Socket bind TCP to %s failed with %s", + buf, sockErrBuf ); epicsSocketDestroy (this->sock); - throw S_cas_bindFail; - } + throw S_cas_bindFail; + } portChange = true; - } + } else { portChange = false; } - addrSize = ( osiSocklen_t ) sizeof (this->addr); - status = getsockname ( - this->sock, - reinterpret_cast ( &this->addr ), + addrSize = ( osiSocklen_t ) sizeof (this->addr); + status = getsockname ( + this->sock, + reinterpret_cast ( &this->addr ), &addrSize ); - if (status) { + if (status) { char sockErrBuf[64]; epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) ); - errlogPrintf ( "CAS: getsockname() error %s\n", - sockErrBuf ); + errlogPrintf ( "CAS: getsockname() error %s\n", + sockErrBuf ); epicsSocketDestroy (this->sock); - throw S_cas_internal; - } + throw S_cas_internal; + } - // - // be sure of this now so that we can fetch the IP - // address and port number later - // + // + // be sure of this now so that we can fetch the IP + // address and port number later + // assert (this->addr.sin_family == AF_INET); if ( portChange ) { errlogPrintf ( "cas warning: Configured TCP port was unavailable.\n"); - errlogPrintf ( "cas warning: Using dynamically assigned TCP port %hu,\n", + errlogPrintf ( "cas warning: Using dynamically assigned TCP port %hu,\n", ntohs (this->addr.sin_port) ); errlogPrintf ( "cas warning: but now two or more servers share the same UDP port.\n"); errlogPrintf ( "cas warning: Depending on your IP kernel this server may not be\n" ); @@ -121,12 +120,12 @@ casIntfIO::casIntfIO ( const caNetAddr & addrIn ) : } status = listen(this->sock, caServerConnectPendQueueSize); - if(status < 0) { + if (status < 0) { char sockErrBuf[64]; epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) ); - errlogPrintf ( "CAS: listen() error %s\n", sockErrBuf ); + errlogPrintf ( "CAS: listen() error %s\n", sockErrBuf ); epicsSocketDestroy (this->sock); - throw S_cas_internal; + throw S_cas_internal; } } @@ -135,17 +134,17 @@ casIntfIO::casIntfIO ( const caNetAddr & addrIn ) : // casIntfIO::~casIntfIO() { - if (this->sock != INVALID_SOCKET) { - epicsSocketDestroy (this->sock); - } + if (this->sock != INVALID_SOCKET) { + epicsSocketDestroy (this->sock); + } - osiSockRelease (); + osiSockRelease (); } // // newStreamIO::newStreamClient() // -casStreamOS *casIntfIO::newStreamClient ( caServerI & cas, +casStreamOS *casIntfIO::newStreamClient ( caServerI & cas, clientBufMemoryManager & bufMgr ) const { static bool oneMsgFlag = false; @@ -175,14 +174,14 @@ casStreamOS *casIntfIO::newStreamClient ( caServerI & cas, args.sock = newSock; casStreamOS * pOS = new casStreamOS ( cas, bufMgr, args ); if ( ! pOS ) { - errMessage ( S_cas_noMemory, + errMessage ( S_cas_noMemory, "unable to create data structures for a new client" ); epicsSocketDestroy ( newSock ); } else { if ( cas.getDebugLevel() > 0u ) { char pName[64u]; - + pOS->hostName ( pName, sizeof ( pName ) ); errlogPrintf ( "CAS: allocated client object for \"%s\"\n", pName ); } @@ -197,7 +196,7 @@ void casIntfIO::setNonBlocking() { int status; osiSockIoctl_t yes = true; - + status = socket_ioctl(this->sock, FIONBIO, &yes); if ( status < 0 ) { char sockErrBuf[64]; diff --git a/src/ca/legacy/pcas/io/bsdSocket/casIntfIO.h b/src/ca/legacy/pcas/io/bsdSocket/casIntfIO.h index 833533d5e..dd9f333b3 100644 --- a/src/ca/legacy/pcas/io/bsdSocket/casIntfIO.h +++ b/src/ca/legacy/pcas/io/bsdSocket/casIntfIO.h @@ -1,4 +1,3 @@ - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -8,9 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ -// #ifndef casIntfIOh #define casIntfIOh diff --git a/src/ca/legacy/pcas/io/bsdSocket/casStreamIO.h b/src/ca/legacy/pcas/io/bsdSocket/casStreamIO.h index e1ac52580..6d25ea3bf 100644 --- a/src/ca/legacy/pcas/io/bsdSocket/casStreamIO.h +++ b/src/ca/legacy/pcas/io/bsdSocket/casStreamIO.h @@ -7,10 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ -// - #ifndef casStreamIOh #define casStreamIOh diff --git a/src/ca/legacy/pcas/io/bsdSocket/ipIgnoreEntry.cpp b/src/ca/legacy/pcas/io/bsdSocket/ipIgnoreEntry.cpp index 9c7f06336..79fba2c79 100644 --- a/src/ca/legacy/pcas/io/bsdSocket/ipIgnoreEntry.cpp +++ b/src/ca/legacy/pcas/io/bsdSocket/ipIgnoreEntry.cpp @@ -7,8 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ - -// // // Author: Jeffrey O. Hill // johill@lanl.gov diff --git a/src/ca/legacy/pcas/io/bsdSocket/ipIgnoreEntry.h b/src/ca/legacy/pcas/io/bsdSocket/ipIgnoreEntry.h index bf9ee4791..d27a77f18 100644 --- a/src/ca/legacy/pcas/io/bsdSocket/ipIgnoreEntry.h +++ b/src/ca/legacy/pcas/io/bsdSocket/ipIgnoreEntry.h @@ -1,5 +1,3 @@ - - /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. @@ -9,9 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -// -// $Revision-Id$ -// #ifndef ipIgnoreEntryh #define ipIgnoreEntryh diff --git a/src/ioc/as/asDbLib.h b/src/ioc/as/asDbLib.h index b0c3516f6..65c4c6f59 100644 --- a/src/ioc/as/asDbLib.h +++ b/src/ioc/as/asDbLib.h @@ -7,8 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* share/epicsH/dbAsLib.h */ -/* $Revision-Id$ */ /* Author: Marty Kraimer Date: 02-23-94*/ #ifndef INCdbAsLibh diff --git a/src/ioc/as/ascheck.c b/src/ioc/as/ascheck.c index e7303f87f..7272ef4ae 100644 --- a/src/ioc/as/ascheck.c +++ b/src/ioc/as/ascheck.c @@ -7,9 +7,8 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Author: Marty Kraimer Date: 03-24-94 */ - + #include #include #include diff --git a/src/ioc/bpt/cvtTable.h b/src/ioc/bpt/cvtTable.h index 3147db934..374666450 100644 --- a/src/ioc/bpt/cvtTable.h +++ b/src/ioc/bpt/cvtTable.h @@ -7,7 +7,7 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ +/* * Breakpoint Tables * * Author: Marty Kraimer diff --git a/src/ioc/bpt/makeBpt.c b/src/ioc/bpt/makeBpt.c index 9ea334362..93095f1c2 100644 --- a/src/ioc/bpt/makeBpt.c +++ b/src/ioc/bpt/makeBpt.c @@ -7,7 +7,7 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ +/* * Author: Marty Kraimer * Date: 9/28/95 * Replacement for old bldCvtTable diff --git a/src/ioc/db/Makefile b/src/ioc/db/Makefile index e758b6a5a..d28119ff7 100644 --- a/src/ioc/db/Makefile +++ b/src/ioc/db/Makefile @@ -93,7 +93,6 @@ dbCore_SRCS += dbChannelIO.cpp dbCore_SRCS += dbSubscriptionIO.cpp dbCore_SRCS += dbPutNotifyBlocker.cpp dbCore_SRCS += dbContextReadNotifyCache.cpp -dbCore_SRCS += templateInstances.cpp dbCore_SRCS += dbIocRegister.c dbCore_SRCS += chfPlugin.c dbCore_SRCS += dbState.c diff --git a/src/ioc/db/callback.h b/src/ioc/db/callback.h index d306f2ab9..d25b782c9 100644 --- a/src/ioc/db/callback.h +++ b/src/ioc/db/callback.h @@ -7,7 +7,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* includes for general purpose callback tasks */ /* diff --git a/src/ioc/db/cvtBpt.c b/src/ioc/db/cvtBpt.c index 21d6938b0..2689483ee 100644 --- a/src/ioc/db/cvtBpt.c +++ b/src/ioc/db/cvtBpt.c @@ -7,7 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* cvtBpt.c - Convert using breakpoint table * diff --git a/src/ioc/db/dbAccess.c b/src/ioc/db/dbAccess.c index a4ba42b89..46b47fb04 100644 --- a/src/ioc/db/dbAccess.c +++ b/src/ioc/db/dbAccess.c @@ -9,7 +9,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ - +/* dbAccess.c */ /* * Original Author: Bob Dalesio * Current Author: Marty Kraimer @@ -107,7 +107,7 @@ void dbSpcAsRegisterCallback(SPC_ASCALLBACK func) long dbPutSpecial(DBADDR *paddr,int pass) { long int (*pspecial)()=NULL; - struct rset *prset; + rset *prset; dbCommon *precord = paddr->precord; long status=0; long special=paddr->special; @@ -139,7 +139,7 @@ long dbPutSpecial(DBADDR *paddr,int pass) } static void get_enum_strs(DBADDR *paddr, char **ppbuffer, - struct rset *prset,long *options) + rset *prset,long *options) { short field_type=paddr->field_type; dbFldDes *pdbFldDes = paddr->pfldDes; @@ -199,7 +199,7 @@ choice_common: } static void get_graphics(DBADDR *paddr, char **ppbuffer, - struct rset *prset,long *options) + rset *prset,long *options) { struct dbr_grDouble grd; int got_data=FALSE; @@ -239,7 +239,7 @@ static void get_graphics(DBADDR *paddr, char **ppbuffer, } static void get_control(DBADDR *paddr, char **ppbuffer, - struct rset *prset,long *options) + rset *prset,long *options) { struct dbr_ctrlDouble ctrld; int got_data=FALSE; @@ -279,7 +279,7 @@ static void get_control(DBADDR *paddr, char **ppbuffer, } static void get_alarm(DBADDR *paddr, char **ppbuffer, - struct rset *prset, long *options) + rset *prset, long *options) { char *pbuffer = *ppbuffer; struct dbr_alDouble ald = {epicsNAN, epicsNAN, epicsNAN, epicsNAN}; @@ -324,7 +324,7 @@ static void getOptions(DBADDR *paddr, char **poriginal, long *options, void *pflin) { db_field_log *pfl= (db_field_log *)pflin; - struct rset *prset; + rset *prset; short field_type; dbCommon *pcommon; char *pbuffer = *poriginal; @@ -364,7 +364,7 @@ static void getOptions(DBADDR *paddr, char **poriginal, long *options, memset(pbuffer, '\0', dbr_precision_size); if((field_type==DBF_FLOAT || field_type==DBF_DOUBLE) && prset && prset->get_precision ){ - (*prset->get_precision)(paddr,pbuffer); + (*prset->get_precision)(paddr,(long *)pbuffer); } else { *options ^= DBR_PRECISION; /*Turn off DBR_PRECISION*/ } @@ -393,7 +393,7 @@ static void getOptions(DBADDR *paddr, char **poriginal, long *options, *poriginal = pbuffer; } -struct rset * dbGetRset(const struct dbAddr *paddr) +rset * dbGetRset(const struct dbAddr *paddr) { struct dbFldDes *pfldDes = paddr->pfldDes; @@ -402,19 +402,29 @@ struct rset * dbGetRset(const struct dbAddr *paddr) } long dbPutAttribute( - const char *recordTypename,const char *name,const char*value) + const char *recordTypename, const char *name, const char *value) { - DBENTRY dbEntry; - DBENTRY *pdbEntry = &dbEntry; - long status=0; + DBENTRY dbEntry; + DBENTRY *pdbEntry = &dbEntry; + long status = 0; - if(!pdbbase) return(S_db_notFound); - dbInitEntry(pdbbase,pdbEntry); - status = dbFindRecordType(pdbEntry,recordTypename); - if(!status) status = dbPutRecordAttribute(pdbEntry,name,value); - dbFinishEntry(pdbEntry); - if(status) errMessage(status,"dbPutAttribute failure"); - return(status); + if (!pdbbase) + return S_db_notFound; + if (!name) { + status = S_db_badField; + goto done; + } + if (!value) + value = ""; + dbInitEntry(pdbbase, pdbEntry); + status = dbFindRecordType(pdbEntry, recordTypename); + if (!status) + status = dbPutRecordAttribute(pdbEntry, name, value); + dbFinishEntry(pdbEntry); +done: + if (status) + errMessage(status, "dbPutAttribute failure"); + return status; } int dbIsValueField(const struct dbFldDes *pdbFldDes) @@ -457,7 +467,7 @@ long dbScanPassive(dbCommon *pfrom, dbCommon *pto) */ long dbProcess(dbCommon *precord) { - struct rset *prset = precord->rset; + rset *prset = precord->rset; dbRecordType *pdbRecordType = precord->rdes; unsigned char tpro = precord->tpro; char context[40] = ""; @@ -636,7 +646,7 @@ long dbNameToAddr(const char *pname, DBADDR *paddr) paddr->dbr_field_type = mapDBFToDBR[dbfType]; if (paddr->special == SPC_DBADDR) { - struct rset *prset = dbGetRset(paddr); + rset *prset = dbGetRset(paddr); /* Let record type modify paddr */ if (prset && prset->cvt_dbaddr) { @@ -728,28 +738,34 @@ static long getLinkValue(DBADDR *paddr, short dbrType, { dbCommon *precord = paddr->precord; dbFldDes *pfldDes = paddr->pfldDes; + /* size of pbuf storage in bytes, including space for trailing nil */ int maxlen; DBENTRY dbEntry; long status; + long nReq = nRequest ? *nRequest : 1; + + /* dbFindRecord() below will always succeed as we have a + * valid DBADDR, so no point to check again. + * Request for zero elements always succeeds + */ + if(!nReq) + return 0; switch (dbrType) { case DBR_STRING: - maxlen = MAX_STRING_SIZE - 1; - if (nRequest && *nRequest > 1) *nRequest = 1; + maxlen = MAX_STRING_SIZE; + nReq = 1; break; case DBR_DOUBLE: /* Needed for dbCa links */ - if (nRequest && *nRequest) *nRequest = 1; + if (nRequest) *nRequest = 1; *(double *)pbuf = epicsNAN; return 0; case DBR_CHAR: case DBR_UCHAR: - if (nRequest && *nRequest > 0) { - maxlen = *nRequest - 1; - break; - } - /* else fall through ... */ + maxlen = nReq; + break; default: return S_db_badDbrtype; } @@ -758,10 +774,13 @@ static long getLinkValue(DBADDR *paddr, short dbrType, status = dbFindRecord(&dbEntry, precord->name); if (!status) status = dbFindField(&dbEntry, pfldDes->name); if (!status) { - char *rtnString = dbGetString(&dbEntry); + const char *rtnString = dbGetString(&dbEntry); - strncpy(pbuf, rtnString, --maxlen); - pbuf[maxlen] = 0; + strncpy(pbuf, rtnString, maxlen-1); + pbuf[maxlen-1] = 0; + if(dbrType!=DBR_STRING) + nReq = strlen(pbuf)+1; + if(nRequest) *nRequest = nReq; } dbFinishEntry(&dbEntry); return status; @@ -771,28 +790,31 @@ static long getAttrValue(DBADDR *paddr, short dbrType, char *pbuf, long *nRequest) { int maxlen; + long nReq = nRequest ? *nRequest : 1; if (!paddr->pfield) return S_db_badField; switch (dbrType) { case DBR_STRING: - maxlen = MAX_STRING_SIZE - 1; - if (nRequest && *nRequest > 1) *nRequest = 1; + maxlen = MAX_STRING_SIZE; + nReq = 1; break; case DBR_CHAR: case DBR_UCHAR: - if (nRequest && *nRequest > 0) { - maxlen = *nRequest - 1; - break; - } + maxlen = nReq; + break; + /* else fall through ... */ default: return S_db_badDbrtype; } - strncpy(pbuf, paddr->pfield, --maxlen); - pbuf[maxlen] = 0; + strncpy(pbuf, paddr->pfield, maxlen-1); + pbuf[maxlen-1] = 0; + if(dbrType!=DBR_STRING) + nReq = strlen(pbuf)+1; + if(nRequest) *nRequest = nReq; return 0; } @@ -816,7 +838,7 @@ long dbGet(DBADDR *paddr, short dbrType, db_field_log *pfl = (db_field_log *)pflin; short field_type; long capacity, no_elements, offset; - struct rset *prset; + rset *prset; long status = 0; if (options && *options) @@ -920,6 +942,15 @@ long dbGet(DBADDR *paddr, short dbrType, localAddr.pfield = (char *) pfl->u.r.field; status = convert(&localAddr, pbuf, n, capacity, offset); } + + if(!status && dbrType==DBF_CHAR && nRequest && + paddr->pfldDes && paddr->pfldDes->field_type==DBF_STRING) + { + /* long string ensure nil and truncate to actual length */ + long nReq = *nRequest; + pbuf[nReq-1] = '\0'; + *nRequest = strlen(pbuf)+1; + } } done: paddr->pfield = pfieldsave; @@ -1203,7 +1234,7 @@ long dbPut(DBADDR *paddr, short dbrType, long no_elements = paddr->no_elements; long special = paddr->special; void *pfieldsave = paddr->pfield; - struct rset *prset = dbGetRset(paddr); + rset *prset = dbGetRset(paddr); long status = 0; long offset; dbFldDes *pfldDes; diff --git a/src/ioc/db/dbAccessDefs.h b/src/ioc/db/dbAccessDefs.h index 67b529d39..cc45b17fe 100644 --- a/src/ioc/db/dbAccessDefs.h +++ b/src/ioc/db/dbAccessDefs.h @@ -7,7 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* dbAccessDefs.h */ -/* $Revision-Id$ */ #ifndef INCdbAccessDefsh #define INCdbAccessDefsh @@ -21,6 +20,7 @@ #include "epicsTime.h" #include "dbBase.h" #include "dbAddr.h" +#include "recSup.h" #ifdef INCLdb_accessh_epicsExportSharedSymbols # define epicsExportSharedSymbols @@ -204,7 +204,7 @@ struct dbr_alDouble {DBRalDouble}; #define S_db_bufFull (M_dbAccess|68) /*Buffer full*/ epicsShareFunc long dbPutSpecial(struct dbAddr *paddr,int pass); -epicsShareFunc struct rset * dbGetRset(const struct dbAddr *paddr); +epicsShareFunc rset * dbGetRset(const struct dbAddr *paddr); epicsShareFunc long dbPutAttribute( const char *recordTypename,const char *name,const char*value); epicsShareFunc int dbIsValueField(const struct dbFldDes *pdbFldDes); diff --git a/src/ioc/db/dbBkpt.c b/src/ioc/db/dbBkpt.c index 4059dd2d3..347e28cd4 100644 --- a/src/ioc/db/dbBkpt.c +++ b/src/ioc/db/dbBkpt.c @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* dbBkpt.c */ -/* base/src/db $Revision-Id$ */ /* * Author: Matthew Needes * Date: 8-30-93 diff --git a/src/ioc/db/dbBkpt.h b/src/ioc/db/dbBkpt.h index 49c905289..7240b701c 100644 --- a/src/ioc/db/dbBkpt.h +++ b/src/ioc/db/dbBkpt.h @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* dbBkpt.h */ -/* base/include $Revision-Id$ */ /* * Author: Matthew Needes * Date: 8-30-93 diff --git a/src/ioc/db/dbCAC.h b/src/ioc/db/dbCAC.h index 70d9e205b..2d97fac35 100644 --- a/src/ioc/db/dbCAC.h +++ b/src/ioc/db/dbCAC.h @@ -8,16 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 @@ -36,12 +26,13 @@ #include "stdlib.h" +#include // std::auto_ptr + #include "tsDLList.h" #include "tsFreeList.h" #include "resourceLib.h" #include "cacIO.h" #include "compilerDependencies.h" -#include "epicsMemory.h" #ifdef dbCACh_restore_epicsExportSharedSymbols # define epicsExportSharedSymbols @@ -203,7 +194,7 @@ private: epicsMutex & mutex; epicsMutex & cbMutex; cacContextNotify & notify; - epics_auto_ptr < cacContext > pNetContext; + std::auto_ptr < cacContext > pNetContext; char * pStateNotifyCache; bool isolated; diff --git a/src/ioc/db/dbCa.c b/src/ioc/db/dbCa.c index be954be12..2875bb54a 100644 --- a/src/ioc/db/dbCa.c +++ b/src/ioc/db/dbCa.c @@ -6,11 +6,10 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* dbCa.c - * + +/* * Original Authors: Bob Dalesio and Marty Kraimer * Date: 26MAR96 - * */ #define EPICS_DBCA_PRIVATE_API #include diff --git a/src/ioc/db/dbCaTest.c b/src/ioc/db/dbCaTest.c index 450eb9463..18ef393ca 100644 --- a/src/ioc/db/dbCaTest.c +++ b/src/ioc/db/dbCaTest.c @@ -130,8 +130,8 @@ long dbcar(char *precordname, int level) precord->name, pdbFldDes->name, plink->value.pv_link.pvname, - pca->nDisconnect, - pca->nNoWrite); + pca ? pca->nDisconnect : 0, + pca ? pca->nNoWrite : 0); } } } diff --git a/src/ioc/db/dbChannel.c b/src/ioc/db/dbChannel.c index bf2b3d438..a790fc22f 100644 --- a/src/ioc/db/dbChannel.c +++ b/src/ioc/db/dbChannel.c @@ -509,7 +509,7 @@ dbChannel * dbChannelCreate(const char *name) paddr->dbr_field_type = mapDBFToDBR[dbfType]; if (paddr->special == SPC_DBADDR) { - struct rset *prset = dbGetRset(paddr); + rset *prset = dbGetRset(paddr); /* Let record type modify paddr */ if (prset && prset->cvt_dbaddr) { diff --git a/src/ioc/db/dbChannelIO.cpp b/src/ioc/db/dbChannelIO.cpp index 6ac1efbdb..a086d3e56 100644 --- a/src/ioc/db/dbChannelIO.cpp +++ b/src/ioc/db/dbChannelIO.cpp @@ -7,17 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * +/* * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ioc/db/dbChannelIO.h b/src/ioc/db/dbChannelIO.h index e1b63d760..5eb7c4eb2 100644 --- a/src/ioc/db/dbChannelIO.h +++ b/src/ioc/db/dbChannelIO.h @@ -9,16 +9,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 @@ -36,7 +26,6 @@ #endif #include "compilerDependencies.h" -#include "epicsMemory.h" #ifdef dbChannelIOh_restore_epicsExportSharedSymbols # define epicsExportSharedSymbols diff --git a/src/ioc/db/dbCommon.dbd b/src/ioc/db/dbCommon.dbd index f58d8d78c..1b093e6a8 100644 --- a/src/ioc/db/dbCommon.dbd +++ b/src/ioc/db/dbCommon.dbd @@ -4,7 +4,7 @@ # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. # EPICS BASE is distributed subject to a Software License Agreement found -# in file LICENSE that is included with this distribution. +# in file LICENSE that is included with this distribution. #************************************************************************* %#include "epicsTypes.h" %#include "link.h" @@ -15,59 +15,59 @@ } field(DESC,DBF_STRING) { prompt("Descriptor") - promptgroup(GUI_COMMON) + promptgroup("10 - Common") size(41) } field(ASG,DBF_STRING) { prompt("Access Security Group") - promptgroup(GUI_COMMON) + promptgroup("10 - Common") special(SPC_AS) size(29) } field(SCAN,DBF_MENU) { prompt("Scan Mechanism") - promptgroup(GUI_SCAN) + promptgroup("20 - Scan") special(SPC_SCAN) interest(1) menu(menuScan) } field(PINI,DBF_MENU) { prompt("Process at iocInit") - promptgroup(GUI_SCAN) + promptgroup("20 - Scan") interest(1) menu(menuPini) } field(PHAS,DBF_SHORT) { prompt("Scan Phase") - promptgroup(GUI_SCAN) + promptgroup("20 - Scan") special(SPC_SCAN) interest(1) } field(EVNT,DBF_STRING) { prompt("Event Name") - promptgroup(GUI_SCAN) + promptgroup("20 - Scan") special(SPC_SCAN) size(40) interest(1) } field(TSE,DBF_SHORT) { prompt("Time Stamp Event") - promptgroup(GUI_SCAN) + promptgroup("20 - Scan") interest(1) } field(TSEL,DBF_INLINK) { prompt("Time Stamp Link") - promptgroup(GUI_SCAN) + promptgroup("20 - Scan") interest(1) } field(DTYP,DBF_DEVICE) { prompt("Device Type") - promptgroup(GUI_LINKS) + promptgroup("10 - Common") interest(1) } field(DISV,DBF_SHORT) { prompt("Disable Value") - promptgroup(GUI_SCAN) + promptgroup("20 - Scan") initial("1") } field(DISA,DBF_SHORT) { @@ -75,7 +75,7 @@ } field(SDIS,DBF_INLINK) { prompt("Scanning Disable") - promptgroup(GUI_SCAN) + promptgroup("20 - Scan") interest(1) } %#include "epicsMutex.h" @@ -137,7 +137,7 @@ } field(ACKT,DBF_MENU) { prompt("Alarm Ack Transient") - promptgroup(GUI_ALARMS) + promptgroup("70 - Alarm") special(SPC_NOMOD) interest(2) menu(menuYesNo) @@ -145,7 +145,7 @@ } field(DISS,DBF_MENU) { prompt("Disable Alarm Sevrty") - promptgroup(GUI_SCAN) + promptgroup("70 - Alarm") interest(1) menu(menuAlarmSevr) } @@ -197,7 +197,7 @@ prompt("Address of RSET") special(SPC_NOMOD) interest(4) - extra("struct rset *rset") + extra("struct typed_rset *rset") } field(DSET,DBF_NOACCESS) { prompt("DSET address") @@ -225,7 +225,7 @@ } field(PRIO,DBF_MENU) { prompt("Scheduling Priority") - promptgroup(GUI_SCAN) + promptgroup("20 - Scan") special(SPC_SCAN) interest(1) menu(menuPriority) @@ -241,14 +241,14 @@ } field(UDF,DBF_UCHAR) { prompt("Undefined") - promptgroup(GUI_COMMON) + promptgroup("10 - Common") pp(TRUE) interest(1) initial("1") } field(UDFS,DBF_MENU) { prompt("Undefined Alarm Sevrty") - promptgroup(GUI_COMMON) + promptgroup("70 - Alarm") interest(1) menu(menuAlarmSevr) initial("INVALID") @@ -262,6 +262,6 @@ } field(FLNK,DBF_FWDLINK) { prompt("Forward Process Link") - promptgroup(GUI_LINKS) + promptgroup("20 - Scan") interest(1) } diff --git a/src/ioc/db/dbContext.cpp b/src/ioc/db/dbContext.cpp index c0f57b759..832820206 100644 --- a/src/ioc/db/dbContext.cpp +++ b/src/ioc/db/dbContext.cpp @@ -6,17 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * +/* * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ioc/db/dbContextReadNotifyCache.cpp b/src/ioc/db/dbContextReadNotifyCache.cpp index b172068be..e3196b25d 100644 --- a/src/ioc/db/dbContextReadNotifyCache.cpp +++ b/src/ioc/db/dbContextReadNotifyCache.cpp @@ -9,7 +9,6 @@ \*************************************************************************/ /* - * $Revision-Id$ * Auther Jeff Hill */ diff --git a/src/ioc/db/dbConvert.c b/src/ioc/db/dbConvert.c index 8d3a54c82..9c2964811 100644 --- a/src/ioc/db/dbConvert.c +++ b/src/ioc/db/dbConvert.c @@ -5,7 +5,7 @@ * Operator of Los Alamos National Laboratory. * EPICS BASE Versions 3.13.7 * and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* dbConvert.c */ /* @@ -582,7 +582,7 @@ static long getCharFloat( } return 0; } - + static long getCharDouble( const dbAddr *paddr, void *pto, long nRequest, long no_elements, long offset) @@ -783,7 +783,7 @@ static long getUcharFloat( } return 0; } - + static long getUcharDouble( const dbAddr *paddr, void *pto, long nRequest, long no_elements, long offset) @@ -984,7 +984,7 @@ static long getShortFloat( } return 0; } - + static long getShortDouble( const dbAddr *paddr, void *pto, long nRequest, long no_elements, long offset) @@ -1184,7 +1184,7 @@ static long getUshortFloat( } return 0; } - + static long getUshortDouble( const dbAddr *paddr, void *pto, long nRequest, long no_elements, long offset) @@ -1385,7 +1385,7 @@ static long getLongFloat( } return 0; } - + static long getLongDouble( const dbAddr *paddr, void *pto, long nRequest, long no_elements, long offset) @@ -1586,7 +1586,7 @@ static long getUlongFloat( } return 0; } - + static long getUlongDouble( const dbAddr *paddr, void *pto, long nRequest, long no_elements, long offset) @@ -1636,8 +1636,8 @@ static long getFloatString( char *pbuffer = (char *) pto; float *psrc = (float *) paddr->pfield; long status = 0; - int precision = 6; - struct rset *prset = 0; + long precision = 6; + rset *prset = 0; if (paddr) prset = dbGetRset(paddr); if (prset && (prset->get_precision)) @@ -1799,7 +1799,7 @@ static long getFloatFloat( COPYNOCONVERT(sizeof(float), paddr->pfield, pto, nRequest, no_elements, offset); return 0; } - + static long getFloatDouble( const dbAddr *paddr, void *pto, long nRequest, long no_elements, long offset) @@ -1848,9 +1848,9 @@ static long getDoubleString( { char *pbuffer = (char *) pto; double *psrc = (double *) paddr->pfield; - long status = 0; - int precision = 6; - struct rset *prset = 0; + long status = 0; + long precision = 6; + rset *prset = 0; if (paddr) prset = dbGetRset(paddr); if (prset && (prset->get_precision)) @@ -2019,7 +2019,7 @@ static long getDoubleFloat( } return 0; } - + static long getDoubleDouble( const dbAddr *paddr, void *pto, long nRequest, long no_elements, long offset) @@ -2061,7 +2061,7 @@ static long getEnumString( void *pto, long nRequest, long no_elements, long offset) { char *pbuffer = (char *) pto; - struct rset *prset; + rset *prset; long status; if ((prset=dbGetRset(paddr)) && (prset->get_enum_str)) @@ -2217,7 +2217,7 @@ static long getEnumFloat( } return 0; } - + static long getEnumDouble( const dbAddr *paddr, void *pto, long nRequest, long no_elements, long offset) @@ -2602,7 +2602,7 @@ static long putStringEnum( const void *pfrom, long nRequest, long no_elements, long offset) { const char *pbuffer = (const char *) pfrom; - struct rset *prset; + rset *prset; epicsEnum16 *pfield = (epicsEnum16*) paddr->pfield; long status; unsigned int nchoices,ind; @@ -2874,7 +2874,7 @@ static long putCharFloat( } return 0; } - + static long putCharDouble( dbAddr *paddr, const void *pfrom, long nRequest, long no_elements, long offset) @@ -3077,7 +3077,7 @@ static long putUcharFloat( } return 0; } - + static long putUcharDouble( dbAddr *paddr, const void *pfrom, long nRequest, long no_elements, long offset) @@ -3280,7 +3280,7 @@ static long putShortFloat( } return 0; } - + static long putShortDouble( dbAddr *paddr, const void *pfrom, long nRequest, long no_elements, long offset) @@ -3483,7 +3483,7 @@ static long putUshortFloat( } return 0; } - + static long putUshortDouble( dbAddr *paddr, const void *pfrom, long nRequest, long no_elements, long offset) @@ -3686,7 +3686,7 @@ static long putLongFloat( } return 0; } - + static long putLongDouble( dbAddr *paddr, const void *pfrom, long nRequest, long no_elements, long offset) @@ -3889,7 +3889,7 @@ static long putUlongFloat( } return 0; } - + static long putUlongDouble( dbAddr *paddr, const void *pfrom, long nRequest, long no_elements, long offset) @@ -3937,13 +3937,12 @@ static long putFloatString( const void *pfrom, long nRequest, long no_elements, long offset) { const float *pbuffer = (const float *) pfrom; - char *pdest = (char *) paddr->pfield; - long status = 0; - int precision = 6; - struct rset *prset = 0; + char *pdest = (char *) paddr->pfield; + long status = 0; + long precision = 6; + rset *prset = dbGetRset(paddr); short size = paddr->field_size; - if (paddr) prset = dbGetRset(paddr); if (prset && (prset->get_precision)) status = (*prset->get_precision)(paddr,&precision); if (nRequest==1 && offset==0) { @@ -4103,7 +4102,7 @@ static long putFloatFloat( COPYNOCONVERT(sizeof(float), pfrom, paddr->pfield, nRequest, no_elements, offset); return 0; } - + static long putFloatDouble( dbAddr *paddr, const void *pfrom, long nRequest, long no_elements, long offset) @@ -4151,13 +4150,12 @@ static long putDoubleString( const void *pfrom, long nRequest, long no_elements, long offset) { const double *pbuffer = (const double *) pfrom; - char *pdest = (char *) paddr->pfield; - long status = 0; - int precision = 6; - struct rset *prset = 0; + char *pdest = (char *) paddr->pfield; + long status = 0; + long precision = 6; + rset *prset = dbGetRset(paddr); short size = paddr->field_size; - if (paddr) prset = dbGetRset(paddr); if (prset && (prset->get_precision)) status = (*prset->get_precision)(paddr,&precision); if (nRequest==1 && offset==0) { @@ -4324,7 +4322,7 @@ static long putDoubleFloat( } return 0; } - + static long putDoubleDouble( dbAddr *paddr, const void *pfrom, long nRequest, long no_elements, long offset) @@ -4533,7 +4531,7 @@ static long putEnumFloat( } return 0; } - + static long putEnumDouble( dbAddr *paddr, const void *pfrom, long nRequest, long no_elements, long offset) diff --git a/src/ioc/db/dbDbLink.c b/src/ioc/db/dbDbLink.c index 8263293e9..8f0e3ed03 100644 --- a/src/ioc/db/dbDbLink.c +++ b/src/ioc/db/dbDbLink.c @@ -156,6 +156,7 @@ static long dbDbGetValue(struct link *plink, short dbrType, void *pbuffer, return S_db_badDbrtype; if (paddr->no_elements == 1 && (!pnRequest || *pnRequest == 1) + && paddr->special != SPC_DBADDR && paddr->special != SPC_ATTRIBUTE) { ppv_link->getCvt = dbFastGetConvertRoutine[dbfType][dbrType]; status = ppv_link->getCvt(paddr->pfield, pbuffer, paddr); diff --git a/src/ioc/db/dbEvent.c b/src/ioc/db/dbEvent.c index b3fce746a..5e386dd5c 100644 --- a/src/ioc/db/dbEvent.c +++ b/src/ioc/db/dbEvent.c @@ -9,6 +9,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ +/* dbEvent.c */ /* * Author: Jeffrey O. Hill diff --git a/src/ioc/db/dbFastLinkConv.c b/src/ioc/db/dbFastLinkConv.c index e358eaa2e..637e2122c 100644 --- a/src/ioc/db/dbFastLinkConv.c +++ b/src/ioc/db/dbFastLinkConv.c @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* dbFastLinkConv.c */ -/* base/src/db $Revision-Id$ */ /* * Author: Matthew Needes * Date: 12-9-93 @@ -257,7 +256,7 @@ static long cvt_st_e( epicsEnum16 *to, const dbAddr *paddr) { - struct rset *prset = 0; + rset *prset = 0; long status; epicsEnum16 *pfield= (epicsEnum16*)(paddr->pfield); unsigned int nchoices,ind; @@ -783,7 +782,7 @@ static long cvt_f_st( char *to, const dbAddr *paddr) { - struct rset *prset = 0; + rset *prset = 0; long status = 0; long precision = 6; @@ -864,7 +863,7 @@ static long cvt_d_st( char *to, const dbAddr *paddr) { - struct rset *prset = 0; + rset *prset = 0; long status = 0; long precision = 6; @@ -1010,7 +1009,7 @@ static long cvt_e_st_get( char *to, const dbAddr *paddr) { - struct rset *prset = 0; + rset *prset = 0; long status; if(paddr) prset = dbGetRset(paddr); diff --git a/src/ioc/db/dbLink.c b/src/ioc/db/dbLink.c index d383a3cbe..a8b7f62ad 100644 --- a/src/ioc/db/dbLink.c +++ b/src/ioc/db/dbLink.c @@ -1,13 +1,13 @@ /*************************************************************************\ * Copyright (c) 2010 UChicago Argonne LLC, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE is distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ -/* dbLink.c - * + * National Laboratory. + * Copyright (c) 2002 The Regents of the University of California, as + * Operator of Los Alamos National Laboratory. + * EPICS BASE is distributed subject to a Software License Agreement found + * in file LICENSE that is included with this distribution. + \*************************************************************************/ +/* dbLink.c */ +/* * Original Authors: Bob Dalesio, Marty Kraimer * Current Author: Andrew Johnson */ diff --git a/src/ioc/db/dbNotify.c b/src/ioc/db/dbNotify.c index c322bc65f..c718d3740 100644 --- a/src/ioc/db/dbNotify.c +++ b/src/ioc/db/dbNotify.c @@ -6,7 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ - +/* dbNotify.c */ /* * Author: Marty Kraimer * Andrew Johnson diff --git a/src/ioc/db/dbPutNotifyBlocker.cpp b/src/ioc/db/dbPutNotifyBlocker.cpp index 54cdec9fe..1a796cdbd 100644 --- a/src/ioc/db/dbPutNotifyBlocker.cpp +++ b/src/ioc/db/dbPutNotifyBlocker.cpp @@ -7,18 +7,8 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * - * Author: +/* + * Author: * Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ioc/db/dbPutNotifyBlocker.h b/src/ioc/db/dbPutNotifyBlocker.h index 78acc0a13..6ca11cc5d 100644 --- a/src/ioc/db/dbPutNotifyBlocker.h +++ b/src/ioc/db/dbPutNotifyBlocker.h @@ -8,17 +8,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * +/* * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ioc/db/dbScan.c b/src/ioc/db/dbScan.c index 180118091..9f7df4c17 100644 --- a/src/ioc/db/dbScan.c +++ b/src/ioc/db/dbScan.c @@ -159,8 +159,11 @@ void scanStop(void) interruptAccept = FALSE; for (i = 0; i < nPeriodic; i++) { - papPeriodic[i]->scanCtl = ctlExit; - epicsEventSignal(papPeriodic[i]->loopEvent); + periodic_scan_list *ppsl = papPeriodic[i]; + + if (!ppsl) continue; + ppsl->scanCtl = ctlExit; + epicsEventSignal(ppsl->loopEvent); epicsEventWait(startStopEvent); } @@ -205,16 +208,24 @@ void scanRun(void) interruptAccept = TRUE; scanCtl = ctlRun; - for (i = 0; i < nPeriodic; i++) - papPeriodic[i]->scanCtl = ctlRun; + for (i = 0; i < nPeriodic; i++) { + periodic_scan_list *ppsl = papPeriodic[i]; + + if (!ppsl) continue; + ppsl->scanCtl = ctlRun; + } } void scanPause(void) { int i; - for (i = nPeriodic - 1; i >= 0; --i) - papPeriodic[i]->scanCtl = ctlPause; + for (i = nPeriodic - 1; i >= 0; --i) { + periodic_scan_list *ppsl = papPeriodic[i]; + + if (!ppsl) continue; + ppsl->scanCtl = ctlPause; + } scanCtl = ctlPause; interruptAccept = FALSE; @@ -286,9 +297,11 @@ void scanAdd(struct dbCommon *precord) } addToList(precord, &piosh->iosl[prio].scan_list); } else if (scan >= SCAN_1ST_PERIODIC) { - addToList(precord, &papPeriodic[scan - SCAN_1ST_PERIODIC]->scan_list); + periodic_scan_list *ppsl = papPeriodic[scan - SCAN_1ST_PERIODIC]; + + if (ppsl) + addToList(precord, &ppsl->scan_list); } - return; } void scanDelete(struct dbCommon *precord) @@ -352,28 +365,48 @@ void scanDelete(struct dbCommon *precord) } deleteFromList(precord, &piosh->iosl[prio].scan_list); } else if (scan >= SCAN_1ST_PERIODIC) { - deleteFromList(precord, &papPeriodic[scan - SCAN_1ST_PERIODIC]->scan_list); + periodic_scan_list *ppsl = papPeriodic[scan - SCAN_1ST_PERIODIC]; + + if (ppsl) + deleteFromList(precord, &ppsl->scan_list); } - return; } double scanPeriod(int scan) { + periodic_scan_list *ppsl; + scan -= SCAN_1ST_PERIODIC; if (scan < 0 || scan >= nPeriodic) return 0.0; - return papPeriodic[scan]->period; + ppsl = papPeriodic[scan]; + return ppsl ? ppsl->period : 0.0; } - -int scanppl(double period) /* print periodic list */ + +int scanppl(double period) /* print periodic scan list(s) */ { - periodic_scan_list *ppsl; + dbMenu *pmenu = dbFindMenu(pdbbase, "menuScan"); char message[80]; int i; + if (!pmenu || !papPeriodic) { + printf("scanppl: dbScan subsystem not initialized\n"); + return -1; + } + for (i = 0; i < nPeriodic; i++) { - ppsl = papPeriodic[i]; - if (ppsl == NULL) continue; - if (period > 0.0 && (fabs(period - ppsl->period) >.05)) continue; + periodic_scan_list *ppsl = papPeriodic[i]; + + if (!ppsl) { + const char *choice = pmenu->papChoiceValue[i + SCAN_1ST_PERIODIC]; + + printf("Periodic scan list for SCAN = '%s' not initialized\n", + choice); + continue; + } + if (period > 0.0 && + (fabs(period - ppsl->period) > 0.05)) + continue; + sprintf(message, "Records with SCAN = '%s' (%lu over-runs):", ppsl->name, ppsl->overruns); printList(&ppsl->scan_list, message); @@ -741,7 +774,7 @@ static void periodicTask(void *arg) if (++overruns >= 10 && epicsTimeDiffInSeconds(&now, &reported) > report_delay) { errlogPrintf("\ndbScan warning from '%s' scan thread:\n" - "\tScan processing averages %.2f seconds (%.2f .. %.2f).\n" + "\tScan processing averages %.3f seconds (%.3f .. %.3f).\n" "\tOver-runs have now happened %u times in a row.\n" "\tTo fix this, move some records to a slower scan rate.\n", ppsl->name, ppsl->period + overtime / overruns, @@ -788,12 +821,8 @@ static void initPeriodic(void) char *unit; int status = epicsParseDouble(choice, &number, &unit); - ppsl->scan_list.lock = epicsMutexMustCreate(); - ellInit(&ppsl->scan_list.list); - ppsl->name = choice; - if (status || number == 0) { + if (status || number <= 0) { errlogPrintf("initPeriodic: Bad menuScan choice '%s'\n", choice); - ppsl->period = i; } else if (!*unit || !epicsStrCaseCmp(unit, "second") || @@ -814,16 +843,24 @@ static void initPeriodic(void) } else { errlogPrintf("initPeriodic: Bad menuScan choice '%s'\n", choice); - ppsl->period = i; } + if (ppsl->period == 0) { + free(ppsl); + continue; + } + + ppsl->scan_list.lock = epicsMutexMustCreate(); + ellInit(&ppsl->scan_list.list); + ppsl->name = choice; + ppsl->scanCtl = ctlPause; + ppsl->loopEvent = epicsEventMustCreate(epicsEventEmpty); + number = ppsl->period / quantum; if ((ppsl->period < 2 * quantum) || (number / floor(number) > 1.1)) { errlogPrintf("initPeriodic: Scan rate '%s' is not achievable.\n", choice); } - ppsl->scanCtl = ctlPause; - ppsl->loopEvent = epicsEventMustCreate(epicsEventEmpty); papPeriodic[i] = ppsl; } @@ -835,6 +872,8 @@ static void deletePeriodic(void) for (i = 0; i < nPeriodic; i++) { periodic_scan_list *ppsl = papPeriodic[i]; + + if (!ppsl) continue; ellFree(&ppsl->scan_list.list); epicsEventDestroy(ppsl->loopEvent); epicsMutexDestroy(ppsl->scan_list.lock); @@ -847,10 +886,11 @@ static void deletePeriodic(void) static void spawnPeriodic(int ind) { - periodic_scan_list *ppsl; + periodic_scan_list *ppsl = papPeriodic[ind]; char taskName[20]; - ppsl = papPeriodic[ind]; + if (!ppsl) return; + sprintf(taskName, "scan-%g", ppsl->period); periodicTaskId[ind] = epicsThreadCreate( taskName, epicsThreadPriorityScanLow + ind, @@ -989,13 +1029,13 @@ static void addToList(struct dbCommon *precord, scan_list *psl) pse->precord = precord; } pse->pscan_list = psl; - ptemp = (scan_element *)ellFirst(&psl->list); + ptemp = (scan_element *)ellLast(&psl->list); while (ptemp) { - if (ptemp->precord->phas > precord->phas) { - ellInsert(&psl->list, ellPrevious(&ptemp->node), &pse->node); + if (ptemp->precord->phas <= precord->phas) { + ellInsert(&psl->list, &ptemp->node, &pse->node); break; } - ptemp = (scan_element *)ellNext(&ptemp->node); + ptemp = (scan_element *)ellPrevious(&ptemp->node); } if (ptemp == NULL) ellAdd(&psl->list, (void *)pse); psl->modified = TRUE; diff --git a/src/ioc/db/dbScan.h b/src/ioc/db/dbScan.h index 83ff550d5..4ec6dda60 100644 --- a/src/ioc/db/dbScan.h +++ b/src/ioc/db/dbScan.h @@ -6,8 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Author: Marty Kraimer * Date: 07-17-91 */ diff --git a/src/ioc/db/dbSubscriptionIO.cpp b/src/ioc/db/dbSubscriptionIO.cpp index 70864b2dd..5b9b85ef5 100644 --- a/src/ioc/db/dbSubscriptionIO.cpp +++ b/src/ioc/db/dbSubscriptionIO.cpp @@ -7,17 +7,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * +/* * Author Jeffrey O. Hill * johill@lanl.gov * 505 665 1831 diff --git a/src/ioc/db/dbTest.c b/src/ioc/db/dbTest.c index 69628cd5d..97279de08 100644 --- a/src/ioc/db/dbTest.c +++ b/src/ioc/db/dbTest.c @@ -7,7 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* database access test subroutines */ #include diff --git a/src/ioc/db/dbUnitTest.c b/src/ioc/db/dbUnitTest.c index 35264abdd..6926595c2 100644 --- a/src/ioc/db/dbUnitTest.c +++ b/src/ioc/db/dbUnitTest.c @@ -193,6 +193,9 @@ void testdbVGetFieldEqual(const char* pv, short dbrType, va_list ap) if (status) { testFail("dbGetField(\"%s\", %d, ...) -> %#lx (%s)", pv, dbrType, status, errSymMsg(status)); return; + } else if(nReq==0) { + testFail("dbGetField(\"%s\", %d, ...) -> zero length", pv, dbrType); + return; } switch(dbrType) { @@ -220,6 +223,72 @@ void testdbVGetFieldEqual(const char* pv, short dbrType, va_list ap) } } +void testdbGetArrFieldEqual(const char* pv, short dbfType, long nRequest, unsigned long cnt, const void *pbufraw) +{ + DBADDR addr; + const long vSize = dbValueSize(dbfType); + const long nStore = vSize * nRequest; + long status; + char *gbuf, *gstore; + const char *pbuf = pbufraw; + + if(dbNameToAddr(pv, &addr)) { + testFail("Missing PV \"%s\"", pv); + return; + } + + gbuf = gstore = malloc(nStore); + if(!gbuf && nStore!=0) { /* note that malloc(0) is allowed to return NULL on success */ + testFail("Allocation failed esize=%ld total=%ld", vSize, nStore); + return; + } + + status = dbGetField(&addr, dbfType, gbuf, NULL, &nRequest, NULL); + if (status) { + testFail("dbGetField(\"%s\", %d, ...) -> %#lx", pv, dbfType, status); + + } else { + unsigned match = nRequest==cnt; + long n, N = nRequest < cnt ? nRequest : cnt; + + if(!match) + testDiag("Length mis-match. expected=%lu actual=%lu", cnt, nRequest); + + for(n=0; n pbufcnt will detect truncation. + * nRequest < pbufcnt always fails. + * nRequest ==pbufcnt checks prefix (actual may be longer than expected) + */ +epicsShareFunc void testdbGetArrFieldEqual(const char* pv, short dbfType, long nRequest, unsigned long pbufcnt, const void *pbuf); + epicsShareFunc dbCommon* testdbRecordPtr(const char* pv); typedef struct testMonitor testMonitor; diff --git a/src/ioc/db/db_access.c b/src/ioc/db/db_access.c index 3e957b4ed..35712ddd6 100644 --- a/src/ioc/db/db_access.c +++ b/src/ioc/db/db_access.c @@ -39,6 +39,7 @@ #include "dbChannel.h" #include "dbCommon.h" #include "dbEvent.h" +#include "dbLock.h" #include "dbNotify.h" #include "dbStaticLib.h" #include "recSup.h" @@ -153,28 +154,30 @@ int dbChannel_get_count( * in the dbAccess.c dbGet() and getOptions() routines. */ + dbScanLock(dbChannelRecord(chan)); + switch(buffer_type) { case(oldDBR_STRING): - status = dbChannelGetField(chan, DBR_STRING, pbuffer, &zero, nRequest, pfl); + status = dbChannelGet(chan, DBR_STRING, pbuffer, &zero, nRequest, pfl); break; /* case(oldDBR_INT): */ case(oldDBR_SHORT): - status = dbChannelGetField(chan, DBR_SHORT, pbuffer, &zero, nRequest, pfl); + status = dbChannelGet(chan, DBR_SHORT, pbuffer, &zero, nRequest, pfl); break; case(oldDBR_FLOAT): - status = dbChannelGetField(chan, DBR_FLOAT, pbuffer, &zero, nRequest, pfl); + status = dbChannelGet(chan, DBR_FLOAT, pbuffer, &zero, nRequest, pfl); break; case(oldDBR_ENUM): - status = dbChannelGetField(chan, DBR_ENUM, pbuffer, &zero, nRequest, pfl); + status = dbChannelGet(chan, DBR_ENUM, pbuffer, &zero, nRequest, pfl); break; case(oldDBR_CHAR): - status = dbChannelGetField(chan, DBR_CHAR, pbuffer, &zero, nRequest, pfl); + status = dbChannelGet(chan, DBR_CHAR, pbuffer, &zero, nRequest, pfl); break; case(oldDBR_LONG): - status = dbChannelGetField(chan, DBR_LONG, pbuffer, &zero, nRequest, pfl); + status = dbChannelGet(chan, DBR_LONG, pbuffer, &zero, nRequest, pfl); break; case(oldDBR_DOUBLE): - status = dbChannelGetField(chan, DBR_DOUBLE, pbuffer, &zero, nRequest, pfl); + status = dbChannelGet(chan, DBR_DOUBLE, pbuffer, &zero, nRequest, pfl); break; case(oldDBR_STS_STRING): @@ -187,10 +190,10 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS; - status = dbChannelGetField(chan, DBR_STRING, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_STRING, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; - status = dbChannelGetField(chan, DBR_STRING, pold->value, &zero, + status = dbChannelGet(chan, DBR_STRING, pold->value, &zero, nRequest, pfl); } break; @@ -203,10 +206,10 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS; - status = dbChannelGetField(chan, DBR_SHORT, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_SHORT, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; - status = dbChannelGetField(chan, DBR_SHORT, &pold->value, &zero, + status = dbChannelGet(chan, DBR_SHORT, &pold->value, &zero, nRequest, pfl); } break; @@ -218,10 +221,10 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS; - status = dbChannelGetField(chan, DBR_FLOAT, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_FLOAT, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; - status = dbChannelGetField(chan, DBR_FLOAT, &pold->value, &zero, + status = dbChannelGet(chan, DBR_FLOAT, &pold->value, &zero, nRequest, pfl); } break; @@ -233,10 +236,10 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS; - status = dbChannelGetField(chan, DBR_ENUM, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_ENUM, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; - status = dbChannelGetField(chan, DBR_ENUM, &pold->value, &zero, + status = dbChannelGet(chan, DBR_ENUM, &pold->value, &zero, nRequest, pfl); } break; @@ -248,10 +251,10 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS; - status = dbChannelGetField(chan, DBR_UCHAR, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_UCHAR, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; - status = dbChannelGetField(chan, DBR_UCHAR, &pold->value, &zero, + status = dbChannelGet(chan, DBR_UCHAR, &pold->value, &zero, nRequest, pfl); } break; @@ -263,10 +266,10 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS; - status = dbChannelGetField(chan, DBR_LONG, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_LONG, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; - status = dbChannelGetField(chan, DBR_LONG, &pold->value, &zero, + status = dbChannelGet(chan, DBR_LONG, &pold->value, &zero, nRequest, pfl); } break; @@ -278,11 +281,11 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS; - status = dbChannelGetField(chan, DBR_DOUBLE, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_DOUBLE, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; options = 0; - status = dbChannelGetField(chan, DBR_DOUBLE, &pold->value, &options, + status = dbChannelGet(chan, DBR_DOUBLE, &pold->value, &options, nRequest, pfl); } break; @@ -296,12 +299,12 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS | DBR_TIME; - status = dbChannelGetField(chan, DBR_STRING, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_STRING, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; pold->stamp = newSt.time; /* structure copy */ options = 0; - status = dbChannelGetField(chan, DBR_STRING, pold->value, &options, + status = dbChannelGet(chan, DBR_STRING, pold->value, &options, nRequest, pfl); } break; @@ -315,12 +318,12 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS | DBR_TIME; - status = dbChannelGetField(chan, DBR_SHORT, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_SHORT, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; pold->stamp = newSt.time; /* structure copy */ options = 0; - status = dbChannelGetField(chan, DBR_SHORT, &pold->value, &options, + status = dbChannelGet(chan, DBR_SHORT, &pold->value, &options, nRequest, pfl); } break; @@ -333,12 +336,12 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS | DBR_TIME; - status = dbChannelGetField(chan, DBR_FLOAT, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_FLOAT, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; pold->stamp = newSt.time; /* structure copy */ options = 0; - status = dbChannelGetField(chan, DBR_FLOAT, &pold->value, &options, + status = dbChannelGet(chan, DBR_FLOAT, &pold->value, &options, nRequest, pfl); } break; @@ -351,12 +354,12 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS | DBR_TIME; - status = dbChannelGetField(chan, DBR_ENUM, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_ENUM, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; pold->stamp = newSt.time; /* structure copy */ options = 0; - status = dbChannelGetField(chan, DBR_ENUM, &pold->value, &options, + status = dbChannelGet(chan, DBR_ENUM, &pold->value, &options, nRequest, pfl); } break; @@ -369,12 +372,12 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS | DBR_TIME; - status = dbChannelGetField(chan, DBR_CHAR, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_CHAR, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; pold->stamp = newSt.time; /* structure copy */ options = 0; - status = dbChannelGetField(chan, DBR_CHAR, &pold->value, &options, + status = dbChannelGet(chan, DBR_CHAR, &pold->value, &options, nRequest, pfl); } break; @@ -387,12 +390,12 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS | DBR_TIME; - status = dbChannelGetField(chan, DBR_LONG, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_LONG, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; pold->stamp = newSt.time; /* structure copy */ options = 0; - status = dbChannelGetField(chan, DBR_LONG, &pold->value, &options, + status = dbChannelGet(chan, DBR_LONG, &pold->value, &options, nRequest, pfl); } break; @@ -405,12 +408,12 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS | DBR_TIME; - status = dbChannelGetField(chan, DBR_DOUBLE, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_DOUBLE, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; pold->stamp = newSt.time; /* structure copy */ options = 0; - status = dbChannelGetField(chan, DBR_DOUBLE, &pold->value, &options, + status = dbChannelGet(chan, DBR_DOUBLE, &pold->value, &options, nRequest, pfl); } break; @@ -428,7 +431,7 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS | DBR_UNITS | DBR_GR_LONG | DBR_AL_LONG; - status = dbChannelGetField(chan, DBR_SHORT, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_SHORT, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; strncpy(pold->units, newSt.units, MAX_UNITS_SIZE); @@ -440,7 +443,7 @@ int dbChannel_get_count( pold->lower_warning_limit = newSt.lower_warning_limit; pold->lower_alarm_limit = newSt.lower_alarm_limit; options = 0; - status = dbChannelGetField(chan, DBR_SHORT, &pold->value, &options, + status = dbChannelGet(chan, DBR_SHORT, &pold->value, &options, nRequest, pfl); } break; @@ -457,7 +460,7 @@ int dbChannel_get_count( options = DBR_STATUS | DBR_UNITS | DBR_PRECISION | DBR_GR_DOUBLE | DBR_AL_DOUBLE; - status = dbChannelGetField(chan, DBR_FLOAT, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_FLOAT, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; pold->precision = (dbr_short_t) newSt.precision.dp; @@ -470,7 +473,7 @@ int dbChannel_get_count( pold->upper_warning_limit = epicsConvertDoubleToFloat(newSt.upper_warning_limit); pold->lower_warning_limit = epicsConvertDoubleToFloat(newSt.lower_warning_limit); options = 0; - status = dbChannelGetField(chan, DBR_FLOAT, &pold->value, &options, + status = dbChannelGet(chan, DBR_FLOAT, &pold->value, &options, nRequest, pfl); } break; @@ -486,7 +489,7 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS | DBR_UNITS | DBR_GR_LONG | DBR_AL_LONG; - status = dbChannelGetField(chan, DBR_UCHAR, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_UCHAR, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; strncpy(pold->units, newSt.units, MAX_UNITS_SIZE); @@ -498,7 +501,7 @@ int dbChannel_get_count( pold->lower_warning_limit = newSt.lower_warning_limit; pold->lower_alarm_limit = newSt.lower_alarm_limit; options = 0; - status = dbChannelGetField(chan, DBR_UCHAR, &pold->value, &options, + status = dbChannelGet(chan, DBR_UCHAR, &pold->value, &options, nRequest, pfl); } break; @@ -513,7 +516,7 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS | DBR_UNITS | DBR_GR_LONG | DBR_AL_LONG; - status = dbChannelGetField(chan, DBR_LONG, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_LONG, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; strncpy(pold->units, newSt.units, MAX_UNITS_SIZE); @@ -525,7 +528,7 @@ int dbChannel_get_count( pold->lower_warning_limit = newSt.lower_warning_limit; pold->lower_alarm_limit = newSt.lower_alarm_limit; options = 0; - status = dbChannelGetField(chan, DBR_LONG, &pold->value, &options, + status = dbChannelGet(chan, DBR_LONG, &pold->value, &options, nRequest, pfl); } break; @@ -542,7 +545,7 @@ int dbChannel_get_count( options = DBR_STATUS | DBR_UNITS | DBR_PRECISION | DBR_GR_DOUBLE | DBR_AL_DOUBLE; - status = dbChannelGetField(chan, DBR_DOUBLE, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_DOUBLE, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; pold->precision = (dbr_short_t) newSt.precision.dp; @@ -555,7 +558,7 @@ int dbChannel_get_count( pold->lower_warning_limit = newSt.lower_warning_limit; pold->lower_alarm_limit = newSt.lower_alarm_limit; options = 0; - status = dbChannelGetField(chan, DBR_DOUBLE, &pold->value, &options, + status = dbChannelGet(chan, DBR_DOUBLE, &pold->value, &options, nRequest, pfl); } break; @@ -574,7 +577,7 @@ int dbChannel_get_count( options = DBR_STATUS | DBR_UNITS | DBR_GR_LONG | DBR_CTRL_LONG | DBR_AL_LONG; - status = dbChannelGetField(chan, DBR_SHORT, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_SHORT, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; strncpy(pold->units, newSt.units, MAX_UNITS_SIZE); @@ -588,7 +591,7 @@ int dbChannel_get_count( pold->upper_ctrl_limit = newSt.upper_ctrl_limit; pold->lower_ctrl_limit = newSt.lower_ctrl_limit; options = 0; - status = dbChannelGetField(chan, DBR_SHORT, &pold->value, &options, + status = dbChannelGet(chan, DBR_SHORT, &pold->value, &options, nRequest, pfl); } break; @@ -606,7 +609,7 @@ int dbChannel_get_count( options = DBR_STATUS | DBR_UNITS | DBR_PRECISION | DBR_GR_DOUBLE | DBR_CTRL_DOUBLE | DBR_AL_DOUBLE; - status = dbChannelGetField(chan, DBR_FLOAT, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_FLOAT, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; pold->precision = (dbr_short_t) newSt.precision.dp; @@ -621,7 +624,7 @@ int dbChannel_get_count( pold->upper_ctrl_limit = epicsConvertDoubleToFloat(newSt.upper_ctrl_limit); pold->lower_ctrl_limit = epicsConvertDoubleToFloat(newSt.lower_ctrl_limit); options = 0; - status = dbChannelGetField(chan, DBR_FLOAT, &pold->value, &options, + status = dbChannelGet(chan, DBR_FLOAT, &pold->value, &options, nRequest, pfl); } break; @@ -638,7 +641,7 @@ int dbChannel_get_count( memset(pold, '\0', sizeof(struct dbr_ctrl_enum)); /* first get status and severity */ options = DBR_STATUS | DBR_ENUM_STRS; - status = dbChannelGetField(chan, DBR_ENUM, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_ENUM, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; no_str = newSt.no_str; @@ -648,7 +651,7 @@ int dbChannel_get_count( strncpy(pold->strs[i], newSt.strs[i], sizeof(pold->strs[i])); /*now get values*/ options = 0; - status = dbChannelGetField(chan, DBR_ENUM, &pold->value, &options, + status = dbChannelGet(chan, DBR_ENUM, &pold->value, &options, nRequest, pfl); } break; @@ -665,7 +668,7 @@ int dbChannel_get_count( options = DBR_STATUS | DBR_UNITS | DBR_GR_LONG | DBR_CTRL_LONG | DBR_AL_LONG; - status = dbChannelGetField(chan, DBR_UCHAR, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_UCHAR, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; strncpy(pold->units, newSt.units, MAX_UNITS_SIZE); @@ -679,7 +682,7 @@ int dbChannel_get_count( pold->upper_ctrl_limit = newSt.upper_ctrl_limit; pold->lower_ctrl_limit = newSt.lower_ctrl_limit; options = 0; - status = dbChannelGetField(chan, DBR_UCHAR, &pold->value, &options, + status = dbChannelGet(chan, DBR_UCHAR, &pold->value, &options, nRequest, pfl); } break; @@ -696,7 +699,7 @@ int dbChannel_get_count( options = DBR_STATUS | DBR_UNITS | DBR_GR_LONG | DBR_CTRL_LONG | DBR_AL_LONG; - status = dbChannelGetField(chan, DBR_LONG, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_LONG, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; strncpy(pold->units, newSt.units, MAX_UNITS_SIZE); @@ -710,7 +713,7 @@ int dbChannel_get_count( pold->upper_ctrl_limit = newSt.upper_ctrl_limit; pold->lower_ctrl_limit = newSt.lower_ctrl_limit; options = 0; - status = dbChannelGetField(chan, DBR_LONG, &pold->value, &options, + status = dbChannelGet(chan, DBR_LONG, &pold->value, &options, nRequest, pfl); } break; @@ -728,7 +731,7 @@ int dbChannel_get_count( options = DBR_STATUS | DBR_UNITS | DBR_PRECISION | DBR_GR_DOUBLE | DBR_CTRL_DOUBLE | DBR_AL_DOUBLE; - status = dbChannelGetField(chan, DBR_DOUBLE, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_DOUBLE, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; pold->precision = (dbr_short_t) newSt.precision.dp; @@ -743,7 +746,7 @@ int dbChannel_get_count( pold->upper_ctrl_limit = newSt.upper_ctrl_limit; pold->lower_ctrl_limit = newSt.lower_ctrl_limit; options = 0; - status = dbChannelGetField(chan, DBR_DOUBLE, &pold->value, &options, + status = dbChannelGet(chan, DBR_DOUBLE, &pold->value, &options, nRequest, pfl); } break; @@ -756,13 +759,13 @@ int dbChannel_get_count( } newSt; options = DBR_STATUS; - status = dbChannelGetField(chan, DBR_STRING, &newSt, &options, &zero, pfl); + status = dbChannelGet(chan, DBR_STRING, &newSt, &options, &zero, pfl); pold->status = newSt.status; pold->severity = newSt.severity; pold->ackt = newSt.ackt; pold->acks = newSt.acks; options = 0; - status = dbChannelGetField(chan, DBR_STRING, pold->value, + status = dbChannelGet(chan, DBR_STRING, pold->value, &options, nRequest, pfl); } break; @@ -791,8 +794,12 @@ int dbChannel_get_count( } break; default: - return -1; + status = -1; + break; } + + dbScanUnlock(dbChannelRecord(chan)); + if (status) return -1; return 0; } diff --git a/src/ioc/db/db_access_routines.h b/src/ioc/db/db_access_routines.h index 36b926d1a..f48ebb001 100644 --- a/src/ioc/db/db_access_routines.h +++ b/src/ioc/db/db_access_routines.h @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* base/include/db_access_routines.h */ /* This defined routines for old database access. These were broken out of db_access.h so that ca can be build independent of db. diff --git a/src/ioc/db/db_field_log.h b/src/ioc/db/db_field_log.h index 93a1fefdb..1534517bb 100644 --- a/src/ioc/db/db_field_log.h +++ b/src/ioc/db/db_field_log.h @@ -9,7 +9,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ - /* * Author: Jeffrey O. Hill * @@ -19,7 +18,8 @@ #ifndef INCLdb_field_logh #define INCLdb_field_logh -#include "epicsTime.h" +#include +#include #ifdef __cplusplus extern "C" { @@ -32,18 +32,20 @@ extern "C" { * priority task pending on the event queue wakes up). Strings would slow down * events for more reasonable size values. DB fields of native type string * will most likely change infrequently. - * + * + * Strings can be added to the set of types for which updates will be queued + * by defining the macro DB_EVENT_LOG_STRINGS. The code in db_add_event() + * will adjust automatically, it just compares field sizes. */ union native_value { - short dbf_int; - short dbf_short; - float dbf_float; - short dbf_enum; - char dbf_char; - long dbf_long; - double dbf_double; + epicsInt8 dbf_char; + epicsInt16 dbf_short; + epicsEnum16 dbf_enum; + epicsInt32 dbf_long; + epicsFloat32 dbf_float; + epicsFloat64 dbf_double; #ifdef DB_EVENT_LOG_STRINGS - char dbf_string[MAX_STRING_SIZE]; + char dbf_string[MAX_STRING_SIZE]; #endif }; diff --git a/src/ioc/db/db_test.c b/src/ioc/db/db_test.c index 4dc26a07d..8d7ad31b1 100644 --- a/src/ioc/db/db_test.c +++ b/src/ioc/db/db_test.c @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ - /* database access subroutines */ /* * Author: Bob Dalesio @@ -173,6 +172,7 @@ int pft(const char *pname, const char *pvalue) ca_dump_dbr(DBR_ENUM,1, buffer); } printf("\n"); + dbChannelDelete(chan); return (0); } @@ -232,6 +232,7 @@ int tpn(const char *pname, const char *pvalue) ppn = calloc(1, sizeof(processNotify)); if (!ppn) { printf("calloc failed\n"); + dbChannelDelete(chan); return -1; } ppn->requestType = putProcessRequest; @@ -242,6 +243,8 @@ int tpn(const char *pname, const char *pvalue) ptpnInfo = calloc(1, sizeof(tpnInfo)); if (!ptpnInfo) { printf("calloc failed\n"); + free(ppn); + dbChannelDelete(chan); return -1; } ptpnInfo->ppn = ppn; diff --git a/src/ioc/db/initHooks.c b/src/ioc/db/initHooks.c index 8590480ae..9070c53f5 100644 --- a/src/ioc/db/initHooks.c +++ b/src/ioc/db/initHooks.c @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Authors: Benjamin Franksen (BESY) and Marty Kraimer * Date: 06-01-91 diff --git a/src/ioc/db/initHooks.h b/src/ioc/db/initHooks.h index c4c84b7b9..429a768db 100644 --- a/src/ioc/db/initHooks.h +++ b/src/ioc/db/initHooks.h @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Authors: Benjamin Franksen (BESY) and Marty Kraimer * Date: 06-01-91 diff --git a/src/ioc/db/recGbl.c b/src/ioc/db/recGbl.c index 0d835b9a4..2bf44322f 100644 --- a/src/ioc/db/recGbl.c +++ b/src/ioc/db/recGbl.c @@ -6,7 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ - +/* recGbl.c */ /* * Author: Marty Kraimer * Andrew Johnson diff --git a/src/ioc/db/templateInstances.cpp b/src/ioc/db/templateInstances.cpp deleted file mode 100644 index 0b4adba57..000000000 --- a/src/ioc/db/templateInstances.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -/* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * - * Author Jeffrey O. Hill - * johill@lanl.gov - * 505 665 1831 - */ - -#define epicsExportSharedSymbols - -#include "dbCAC.h" -#include "dbChannelIO.h" -#include "dbPutNotifyBlocker.h" - -#ifdef _MSC_VER -# pragma warning ( push ) -# pragma warning ( disable:4660 ) -#endif - -template class tsFreeList < dbChannelIO, 256, epicsMutexNOOP >; -template class tsFreeList < dbPutNotifyBlocker, 64, epicsMutexNOOP >; -template class tsFreeList < dbSubscriptionIO, 256, epicsMutexNOOP >; -template class resTable < dbBaseIO, chronIntId >; -template class chronIntIdResTable < dbBaseIO >; - -#ifdef _MSC_VER -# pragma warning ( pop ) -#endif diff --git a/src/ioc/db/test/Makefile b/src/ioc/db/test/Makefile index 6c9f3e9c1..ec23f4ab2 100644 --- a/src/ioc/db/test/Makefile +++ b/src/ioc/db/test/Makefile @@ -155,6 +155,13 @@ recGblCheckDeadbandTest_SRCS += dbTestIoc_registerRecordDeviceDriver.cpp testHarness_SRCS += recGblCheckDeadbandTest.c TESTS += recGblCheckDeadbandTest +TESTPROD_HOST += testPutGetTest +testPutGetTest_SRCS += dbPutGetTest.c +testPutGetTest_SRCS += dbTestIoc_registerRecordDeviceDriver.cpp +testHarness_SRCS += dbPutGetTest.db +TESTFILES += ../dbPutGetTest.db +TESTS += testPutGetTest + # This runs all the test programs in a known working order: testHarness_SRCS += epicsRunDbTests.c diff --git a/src/ioc/db/test/arrRecord.c b/src/ioc/db/test/arrRecord.c index 7dea7caaf..16b1b32e2 100644 --- a/src/ioc/db/test/arrRecord.c +++ b/src/ioc/db/test/arrRecord.c @@ -37,8 +37,8 @@ /* Create RSET - Record Support Entry Table*/ #define report NULL #define initialize NULL -static long init_record(arrRecord *, int); -static long process(arrRecord *); +static long init_record(struct dbCommon *, int); +static long process(struct dbCommon *); #define special NULL #define get_value NULL static long cvt_dbaddr(DBADDR *); @@ -75,8 +75,10 @@ rset arrRSET = { }; epicsExportAddress(rset, arrRSET); -static long init_record(arrRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct arrRecord *prec = (struct arrRecord *)pcommon; + if (pass == 0) { if (prec->nelm <= 0) prec->nelm = 1; @@ -95,8 +97,9 @@ static long init_record(arrRecord *prec, int pass) return 0; } -static long process(arrRecord *prec) +static long process(struct dbCommon *pcommon) { + struct arrRecord *prec = (struct arrRecord *)pcommon; if(prec->clbk) (*prec->clbk)(prec); prec->pact = TRUE; diff --git a/src/ioc/db/test/callbackParallelTest.c b/src/ioc/db/test/callbackParallelTest.c index 6dda789e3..2ccc44375 100644 --- a/src/ioc/db/test/callbackParallelTest.c +++ b/src/ioc/db/test/callbackParallelTest.c @@ -7,7 +7,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Author: Marty Kraimer Date: 26JAN2000 */ @@ -99,7 +98,7 @@ MAIN(callbackParallelTest) myPvt *pcbt[NCALLBACKS]; epicsTimeStamp start; int noCpus = epicsThreadGetCPUs(); - int i, j; + int i, j, slowups, faults; /* Statistics: min/max/sum/sum^2/n for each priority */ double setupError[NUM_CALLBACK_PRIORITIES][5]; double timeError[NUM_CALLBACK_PRIORITIES][5]; @@ -109,7 +108,7 @@ MAIN(callbackParallelTest) for (j = 0; j < 5; j++) setupError[i][j] = timeError[i][j] = defaultError[j]; - testPlan(NCALLBACKS * 2 + 1); + testPlan(4); testDiag("Starting %d parallel callback threads", noCpus); @@ -138,7 +137,7 @@ MAIN(callbackParallelTest) pcbt[NCALLBACKS-1]->delay = TEST_DELAY(NCALLBACKS) + 1.0; pcbt[NCALLBACKS-1]->pass = 0; - testOk1(epicsTimeGetCurrent(&start)==epicsTimeOK); + testOk(epicsTimeGetCurrent(&start)==epicsTimeOK, "Time-of-day clock Ok"); for (i = 0; i < NCALLBACKS ; i++) { callbackRequest(&pcbt[i]->cb1); @@ -147,28 +146,43 @@ MAIN(callbackParallelTest) testDiag("Waiting %.02f sec", pcbt[NCALLBACKS-1]->delay); epicsEventWait(finished); - + slowups = 0; + faults = 0; + for (i = 0; i < NCALLBACKS ; i++) { if(pcbt[i]->resultFail || pcbt[i]->pass!=2) - testFail("pass = %d for delay = %f", pcbt[i]->pass, pcbt[i]->delay); + testDiag("callback setup fault #%d: pass = %d for delay = %.02f", + ++faults, pcbt[i]->pass, pcbt[i]->delay); else { double delta = epicsTimeDiffInSeconds(&pcbt[i]->pass1Time, &start); - testOk(fabs(delta) < 0.05, "callback %.02f setup time |%f| < 0.05", + + if (fabs(delta) >= 0.05) { + slowups++; + testDiag("callback %.02f setup time |%f| >= 0.05 seconds", pcbt[i]->delay, delta); + } updateStats(setupError[i%NUM_CALLBACK_PRIORITIES], delta); } } + testOk(faults == 0, "%d faults during callback setup", faults); + testOk(slowups <= 1, "%d slowups during callback setup", slowups); + slowups = 0; for (i = 0; i < NCALLBACKS ; i++) { double delta, error; + if(pcbt[i]->resultFail || pcbt[i]->pass!=2) continue; delta = epicsTimeDiffInSeconds(&pcbt[i]->pass2Time, &pcbt[i]->pass1Time); error = delta - pcbt[i]->delay; - testOk(fabs(error) < 0.05, "delay %.02f seconds, callback time error |%.04f| < 0.05", + if (fabs(error) >= 0.05) { + slowups++; + testDiag("delay %.02f seconds, delay error |%.04f| >= 0.05", pcbt[i]->delay, error); + } updateStats(timeError[i%NUM_CALLBACK_PRIORITIES], error); } + testOk(slowups < 5, "%d slowups during callbacks", slowups); testDiag("Setup time statistics"); printStats(setupError[0], "LOW"); diff --git a/src/ioc/db/test/callbackTest.c b/src/ioc/db/test/callbackTest.c index d733f99d7..7032a7cd1 100644 --- a/src/ioc/db/test/callbackTest.c +++ b/src/ioc/db/test/callbackTest.c @@ -7,7 +7,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Author: Marty Kraimer Date: 26JAN2000 */ @@ -99,7 +98,7 @@ MAIN(callbackTest) { myPvt *pcbt[NCALLBACKS]; epicsTimeStamp start; - int i, j; + int i, j, slowups, faults; /* Statistics: min/max/sum/sum^2/n for each priority */ double setupError[NUM_CALLBACK_PRIORITIES][5]; double timeError[NUM_CALLBACK_PRIORITIES][5]; @@ -109,7 +108,7 @@ MAIN(callbackTest) for (j = 0; j < 5; j++) setupError[i][j] = timeError[i][j] = defaultError[j]; - testPlan(NCALLBACKS * 2 + 1); + testPlan(4); callbackInit(); epicsThreadSleep(1.0); @@ -135,7 +134,7 @@ MAIN(callbackTest) pcbt[NCALLBACKS-1]->delay = TEST_DELAY(NCALLBACKS) + 1.0; pcbt[NCALLBACKS-1]->pass = 0; - testOk1(epicsTimeGetCurrent(&start)==epicsTimeOK); + testOk(epicsTimeGetCurrent(&start)==epicsTimeOK, "Time-of-day clock Ok"); for (i = 0; i < NCALLBACKS ; i++) { callbackRequest(&pcbt[i]->cb1); @@ -144,28 +143,43 @@ MAIN(callbackTest) testDiag("Waiting %.02f sec", pcbt[NCALLBACKS-1]->delay); epicsEventWait(finished); - + slowups = 0; + faults = 0; + for (i = 0; i < NCALLBACKS ; i++) { if(pcbt[i]->resultFail || pcbt[i]->pass!=2) - testFail("pass = %d for delay = %f", pcbt[i]->pass, pcbt[i]->delay); + testDiag("callback setup fault #%d: pass = %d for delay = %.02f", + ++faults, pcbt[i]->pass, pcbt[i]->delay); else { double delta = epicsTimeDiffInSeconds(&pcbt[i]->pass1Time, &start); - testOk(fabs(delta) < 0.05, "callback %.02f setup time |%f| < 0.05", + + if (fabs(delta) >= 0.05) { + slowups++; + testDiag("callback %.02f setup time |%f| >= 0.05 seconds", pcbt[i]->delay, delta); + } updateStats(setupError[i%NUM_CALLBACK_PRIORITIES], delta); } } + testOk(faults == 0, "%d faults during callback setup", faults); + testOk(slowups <= 1, "%d slowups during callback setup", slowups); + slowups = 0; for (i = 0; i < NCALLBACKS ; i++) { double delta, error; + if(pcbt[i]->resultFail || pcbt[i]->pass!=2) continue; delta = epicsTimeDiffInSeconds(&pcbt[i]->pass2Time, &pcbt[i]->pass1Time); error = delta - pcbt[i]->delay; - testOk(fabs(error) < 0.05, "delay %.02f seconds, callback time error |%.04f| < 0.05", + if (fabs(error) >= 0.05) { + slowups++; + testDiag("delay %.02f seconds, delay error |%.04f| >= 0.05", pcbt[i]->delay, error); + } updateStats(timeError[i%NUM_CALLBACK_PRIORITIES], error); } + testOk(slowups < 5, "%d slowups during callbacks", slowups); testDiag("Setup time statistics"); printStats(setupError[0], "LOW"); diff --git a/src/ioc/db/test/chfPluginTest.c b/src/ioc/db/test/chfPluginTest.c index 4b12644ea..becd876e8 100644 --- a/src/ioc/db/test/chfPluginTest.c +++ b/src/ioc/db/test/chfPluginTest.c @@ -541,8 +541,11 @@ MAIN(chfPluginTest) dbChannel *pch; db_field_log *pfl; -#if defined(WIN32) && (!defined(_MINGW) || __MSVCRT_VERSION__ >= 0x0800) +#ifdef _WIN32 +#if (defined(_MSC_VER) && _MSC_VER < 1900) || \ + (defined(_MINGW) && defined(_TWO_DIGIT_EXPONENT)) _set_output_format(_TWO_DIGIT_EXPONENT); +#endif #endif testPlan(1433); diff --git a/src/ioc/db/test/dbPutGetTest.c b/src/ioc/db/test/dbPutGetTest.c new file mode 100644 index 000000000..61b31a785 --- /dev/null +++ b/src/ioc/db/test/dbPutGetTest.c @@ -0,0 +1,150 @@ + +#include + +#include +#include +#include +#include +#include +#include + +static +void testdbGetStringEqual(const char *pv, const char *expected) +{ + const char *actual; + int ok; + DBENTRY ent; + + dbInitEntry(pdbbase, &ent); + + if(dbFindRecord(&ent, pv)) { + testFail("Failed to find record '%s'", pv); + return; + } + + actual = dbGetString(&ent); + ok = (!actual && !expected) + || (actual && expected && strcmp(actual, expected)==0); + + testOk(ok, "dbGetString(\"%s\") -> \"%s\" == \"%s\"", pv, actual, expected); + + dbFinishEntry(&ent); +} + +static +void testGetString(void) +{ + testDiag("testGetString()"); + + testdbGetStringEqual("recempty.DTYP", "Soft Channel"); + testdbGetStringEqual("recempty.DESC", ""); + testdbGetStringEqual("recempty.PHAS", "0"); + testdbGetStringEqual("recempty.TSE" , "0"); + testdbGetStringEqual("recempty.DISA", "0"); + testdbGetStringEqual("recempty.DISV", "0"); + + testdbGetStringEqual("recoverwrite.DTYP", "Soft Channel"); + testdbGetStringEqual("recoverwrite.DESC", ""); + testdbGetStringEqual("recoverwrite.PHAS", "0"); + testdbGetStringEqual("recoverwrite.TSE" , "0"); + testdbGetStringEqual("recoverwrite.DISA", "0"); + testdbGetStringEqual("recoverwrite.DISV", "0"); +} + +static +void testStringMax(void) +{ + testDiag("testStringMax()"); + + testdbGetStringEqual("recmax.DISA", "-1"); +} + +static +void testLongLink(void) +{ + testDiag("testLonkLink()"); + + testdbGetFieldEqual("lnktest.INP", DBR_STRING, "lnktarget NPP NMS"); + testdbGetFieldEqual("lnktest.INP$", DBR_STRING, "lnktarget NPP NMS"); + testDiag("dbGet() w/ nRequest==1 gets only trailing nil"); + testdbGetFieldEqual("lnktest.INP$", DBR_CHAR, '\0'); + testdbGetArrFieldEqual("lnktest.INP$", DBR_CHAR, 19, 18, "lnktarget NPP NMS"); + + testDiag("get w/ truncation"); + testdbGetArrFieldEqual("lnktest.INP$", DBR_CHAR, 0, 0, NULL); + testdbGetArrFieldEqual("lnktest.INP$", DBR_CHAR, 1, 1, ""); + testdbGetArrFieldEqual("lnktest.INP$", DBR_CHAR, 2, 2, "l"); + testdbGetArrFieldEqual("lnktest.INP$", DBR_CHAR, 3, 3, "ln"); + testdbGetArrFieldEqual("lnktest.INP$", DBR_CHAR, 17, 17, "lnktarget NPP NM"); + testdbGetArrFieldEqual("lnktest.INP$", DBR_CHAR, 18, 18, "lnktarget NPP NMS"); + + testdbGetArrFieldEqual("lnktest.INP", DBR_STRING, 2, 1, "lnktarget NPP NMS"); +} + +static +void testLongAttr(void) +{ + testDiag("testLongAttr()"); + + testdbGetFieldEqual("lnktest.RTYP", DBR_STRING, "x"); + testdbGetFieldEqual("lnktest.RTYP$", DBR_STRING, "x"); + testDiag("dbGet() w/ nRequest==1 gets only trailing nil"); + testdbGetFieldEqual("lnktest.RTYP$", DBR_CHAR, '\0'); + + testdbGetArrFieldEqual("lnktest.RTYP$", DBR_CHAR, 4, 2, "x"); + + testDiag("get w/ truncation"); + testdbGetArrFieldEqual("lnktest.RTYP$", DBR_CHAR, 0, 0, NULL); + testdbGetArrFieldEqual("lnktest.RTYP$", DBR_CHAR, 1, 1, ""); + testdbGetArrFieldEqual("lnktest.RTYP$", DBR_CHAR, 2, 2, "x"); +} + +static +void testLongField(void) +{ + testDiag("testLongField()"); + + testdbGetFieldEqual("lnktest.NAME", DBR_STRING, "lnktest"); + testdbGetFieldEqual("lnktest.NAME$", DBR_STRING, "108"); + testDiag("dbGet() w/ nRequest==1 gets only trailing nil"); + testdbGetFieldEqual("lnktest.NAME$", DBR_CHAR, '\0'); + testdbGetArrFieldEqual("lnktest.NAME$", DBR_CHAR, 10, 8, "lnktest"); + + testDiag("get w/ truncation"); + testdbGetArrFieldEqual("lnktest.NAME$", DBR_CHAR, 0, 0, NULL); + testdbGetArrFieldEqual("lnktest.NAME$", DBR_CHAR, 1, 1, ""); + testdbGetArrFieldEqual("lnktest.NAME$", DBR_CHAR, 2, 2, "l"); + testdbGetArrFieldEqual("lnktest.NAME$", DBR_CHAR, 3, 3, "ln"); + testdbGetArrFieldEqual("lnktest.NAME$", DBR_CHAR, 7, 7, "lnktes"); + testdbGetArrFieldEqual("lnktest.NAME$", DBR_CHAR, 8, 8, "lnktest"); +} + +void dbTestIoc_registerRecordDeviceDriver(struct dbBase *); + +MAIN(dbPutGet) +{ + testPlan(41); + testdbPrepare(); + + testdbReadDatabase("dbTestIoc.dbd", NULL, NULL); + dbTestIoc_registerRecordDeviceDriver(pdbbase); + testdbReadDatabase("dbPutGetTest.db", NULL, NULL); + + testGetString(); + + testStringMax(); + + eltc(0); + testIocInitOk(); + eltc(1); + + testLongLink(); + testLongAttr(); + testLongField(); + + testIocShutdownOk(); + + testdbCleanup(); + + return testDone(); +} diff --git a/src/ioc/db/test/dbPutGetTest.db b/src/ioc/db/test/dbPutGetTest.db new file mode 100644 index 000000000..bacaa5638 --- /dev/null +++ b/src/ioc/db/test/dbPutGetTest.db @@ -0,0 +1,41 @@ + +record(x, "recempty") { +# empty string is the same "0" for numeric fields + field(DTYP, "") + field(DESC, "") + field(PHAS, "") + field(TSE , "") + field(DISA, "") + field(DISV, "") +} + +record(x, "recoverwrite") { +# first with non-default values +# field(DTYP, "Scan I/O") + field(DESC, "hello") + field(PHAS, "2") + field(TSE , "5") + field(DISA, "6") + field(DISV, "7") +} + +record(x, "recoverwrite") { +# now restore default values + field(DTYP, "") + field(DESC, "") + field(PHAS, "") + field(TSE , "") + field(TSEL, "") + field(DISA, "") + field(DISV, "") +} + +record(x, "recmax") { + field(DISA, "0xffffffff") +} + +record(x, "lnktarget") {} + +record(x, "lnktest") { + field(INP, "lnktarget NPP NMS") +} diff --git a/src/ioc/db/test/xRecord.c b/src/ioc/db/test/xRecord.c index 356af0869..5188bf187 100644 --- a/src/ioc/db/test/xRecord.c +++ b/src/ioc/db/test/xRecord.c @@ -26,8 +26,9 @@ #include "devx.h" -static long init_record(xRecord *prec, int pass) +static long init_record(struct dbCommon *pcommon, int pass) { + struct xRecord *prec = (struct xRecord *)pcommon; long ret = 0; xdset *xset = (xdset*)prec->dset; if(!pass) return 0; @@ -41,10 +42,12 @@ static long init_record(xRecord *prec, int pass) return ret; } -static long process(xRecord *prec) +static long process(struct dbCommon *pcommon) { + struct xRecord *prec = (struct xRecord *)pcommon; long ret = 0; xdset *xset = (xdset*)prec->dset; + if(prec->clbk) (*prec->clbk)(prec); prec->pact = TRUE; diff --git a/src/ioc/dbStatic/dbBase.h b/src/ioc/dbStatic/dbBase.h index 84d41c2fe..c1aed5c9a 100644 --- a/src/ioc/dbStatic/dbBase.h +++ b/src/ioc/dbStatic/dbBase.h @@ -6,8 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Current Author: Marty Kraimer * Date: 03-19-92 */ @@ -19,6 +18,7 @@ #include "dbFldTypes.h" #include "ellLib.h" #include "dbDefs.h" +#include "recSup.h" typedef struct dbMenu { ELLNODE node; @@ -141,25 +141,25 @@ typedef struct dbVariableDef { }dbVariableDef; typedef struct dbRecordType { - ELLNODE node; - ELLLIST attributeList; /*LIST head of attributes*/ - ELLLIST recList; /*LIST head of sorted dbRecordNodes*/ - ELLLIST devList; /*List of associated device support*/ - ELLLIST cdefList; /*LIST of Cdef text items*/ - char *name; - short no_fields; /* number of fields defined */ - short no_prompt; /* number of fields to configure*/ - short no_links; /* number of links */ - short no_aliases; /* number of aliases in recList */ - short *link_ind; /* addr of array of ind in papFldDes*/ - char **papsortFldName;/* ptr to array of ptr to fld names*/ - short *sortFldInd; /* addr of array of ind in papFldDes*/ - dbFldDes *pvalFldDes; /*pointer dbFldDes for VAL field*/ - short indvalFlddes; /*ind in papFldDes*/ - dbFldDes **papFldDes; /* ptr to array of ptr to fldDes*/ - /*The following are only available on run time system*/ - struct rset *prset; - int rec_size; /*record size in bytes */ + ELLNODE node; + ELLLIST attributeList; /*LIST head of attributes*/ + ELLLIST recList; /*LIST head of sorted dbRecordNodes*/ + ELLLIST devList; /*List of associated device support*/ + ELLLIST cdefList; /*LIST of Cdef text items*/ + char *name; + short no_fields; /* number of fields defined */ + short no_prompt; /* number of fields to configure*/ + short no_links; /* number of links */ + short no_aliases; /* number of aliases in recList */ + short *link_ind; /* addr of array of ind in papFldDes*/ + char **papsortFldName;/* ptr to array of ptr to fld names*/ + short *sortFldInd; /* addr of array of ind in papFldDes*/ + dbFldDes *pvalFldDes; /*pointer dbFldDes for VAL field*/ + short indvalFlddes; /*ind in papFldDes*/ + dbFldDes **papFldDes; /* ptr to array of ptr to fldDes*/ + /*The following are only available on run time system*/ + rset *prset; + int rec_size; /*record size in bytes */ }dbRecordType; struct dbPvd; /* Contents private to dbPvdLib code */ @@ -174,8 +174,9 @@ typedef struct dbBase { ELLLIST functionList; ELLLIST variableList; ELLLIST bptList; - ELLLIST filterList; - void *pathPvt; + ELLLIST filterList; + ELLLIST guiGroupList; + void *pathPvt; struct dbPvd *ppvd; struct gphPvt *pgpHash; short ignoreMissingMenus; diff --git a/src/ioc/dbStatic/dbFldTypes.h b/src/ioc/dbStatic/dbFldTypes.h index 39f17c8ed..0d2b9e1da 100644 --- a/src/ioc/dbStatic/dbFldTypes.h +++ b/src/ioc/dbStatic/dbFldTypes.h @@ -7,8 +7,7 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Author: Marty Kraimer * Date: 6-1-90 */ diff --git a/src/ioc/dbStatic/dbLexRoutines.c b/src/ioc/dbStatic/dbLexRoutines.c index 660c02669..dc447e5ce 100644 --- a/src/ioc/dbStatic/dbLexRoutines.c +++ b/src/ioc/dbStatic/dbLexRoutines.c @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* Author: Marty Kraimer Date: 13JUL95*/ @@ -34,7 +33,6 @@ #include "dbStaticLib.h" #include "dbStaticPvt.h" #include "epicsExport.h" -#include "guigroup.h" #include "link.h" #include "special.h" @@ -52,6 +50,9 @@ epicsExportAddress(int,dbBptNotMonotonic); epicsShareDef int dbQuietMacroWarnings=0; epicsExportAddress(int,dbQuietMacroWarnings); +epicsShareDef int dbRecordsAbcSorted=0; +epicsExportAddress(int,dbRecordsAbcSorted); + /*private routines */ static void yyerrorAbort(char *str); static void allocTemp(void *pvoid); @@ -71,6 +72,7 @@ static void dbRecordtypeEmpty(void); static void dbRecordtypeBody(void); static void dbRecordtypeFieldHead(char *name,char *type); static void dbRecordtypeFieldItem(char *name,char *value); +static short findOrAddGuiGroup(const char *name); static void dbDevice(char *recordtype,char *linktype, char *dsetname,char *choicestring); @@ -196,7 +198,16 @@ static void freeInputFileList(void) free((void *)pinputFileNow); } } - + +static +int cmp_dbRecordNode(const ELLNODE *lhs, const ELLNODE *rhs) +{ + dbRecordNode *LHS = (dbRecordNode*)lhs, + *RHS = (dbRecordNode*)rhs; + + return strcmp(LHS->recordname, RHS->recordname); +} + static long dbReadCOM(DBBASE **ppdbbase,const char *filename, FILE *fp, const char *path,const char *substitutions) { @@ -241,24 +252,25 @@ static long dbReadCOM(DBBASE **ppdbbase,const char *filename, FILE *fp, macSuppressWarning(macHandle,dbQuietMacroWarnings); } pinputFile = dbCalloc(1,sizeof(inputFile)); - if(filename) { - pinputFile->filename = macEnvExpand(filename); + if (filename) { + pinputFile->filename = macEnvExpand(filename); } - if(!fp) { - FILE *fp1; + if (!fp) { + FILE *fp1 = 0; - if(pinputFile->filename) pinputFile->path = dbOpenFile(pdbbase,pinputFile->filename,&fp1); - if(!pinputFile->filename || !fp1) { - errPrintf(0,__FILE__, __LINE__, - "dbRead opening file %s",pinputFile->filename); - free((void *)pinputFile->filename); - free((void *)pinputFile); + if (pinputFile->filename) + pinputFile->path = dbOpenFile(pdbbase, pinputFile->filename, &fp1); + if (!pinputFile->filename || !fp1) { + errPrintf(0, __FILE__, __LINE__, + "dbRead opening file %s",pinputFile->filename); + free(pinputFile->filename); + free(pinputFile); status = -1; goto cleanup; - } - pinputFile->fp = fp1; + } + pinputFile->fp = fp1; } else { - pinputFile->fp = fp; + pinputFile->fp = fp; } pinputFile->line_num = 0; pinputFileNow = pinputFile; @@ -296,6 +308,15 @@ static long dbReadCOM(DBBASE **ppdbbase,const char *filename, FILE *fp, dbFinishEntry(pdbEntry); } cleanup: + if(dbRecordsAbcSorted) { + ELLNODE *cur; + for(cur = ellFirst(&pdbbase->recordTypeList); cur; cur=ellNext(cur)) + { + dbRecordType *rtype = CONTAINER(cur, dbRecordType, node); + + ellSortStable(&rtype->recList, &cmp_dbRecordNode); + } + } if(macHandle) macDeleteHandle(macHandle); macHandle = NULL; if(mac_input_buffer) free((void *)mac_input_buffer); @@ -503,7 +524,23 @@ static void dbRecordtypeFieldHead(char *name,char *type) yyerrorAbort("Illegal Field Type"); pdbFldDes->field_type = i; } - + +static short findOrAddGuiGroup(const char *name) +{ + dbGuiGroup *pdbGuiGroup; + GPHENTRY *pgphentry; + pgphentry = gphFind(pdbbase->pgpHash, name, &pdbbase->guiGroupList); + if (!pgphentry) { + pdbGuiGroup = dbCalloc(1,sizeof(dbGuiGroup)); + pdbGuiGroup->name = epicsStrDup(name); + ellAdd(&pdbbase->guiGroupList, &pdbGuiGroup->node); + pdbGuiGroup->key = ellCount(&pdbbase->guiGroupList); + pgphentry = gphAdd(pdbbase->pgpHash, pdbGuiGroup->name, &pdbbase->guiGroupList); + pgphentry->userPvt = pdbGuiGroup; + } + return ((dbGuiGroup *)pgphentry->userPvt)->key; +} + static void dbRecordtypeFieldItem(char *name,char *value) { dbFldDes *pdbFldDes; @@ -525,14 +562,7 @@ static void dbRecordtypeFieldItem(char *name,char *value) return; } if(strcmp(name,"promptgroup")==0) { - int i; - for(i=0; ipromptgroup = pamapguiGroup[i].value; - return; - } - } - yyerror("Illegal promptgroup. See guigroup.h for legal values"); + pdbFldDes->promptgroup = findOrAddGuiGroup(value); return; } if(strcmp(name,"prompt")==0) { diff --git a/src/ioc/dbStatic/dbStaticLib.c b/src/ioc/dbStatic/dbStaticLib.c index 566f3cf74..a9de8ea3c 100644 --- a/src/ioc/dbStatic/dbStaticLib.c +++ b/src/ioc/dbStatic/dbStaticLib.c @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ #include #include @@ -31,7 +30,6 @@ #include "postfix.h" #define DBFLDTYPES_GBLSOURCE -#define GUIGROUPS_GBLSOURCE #define SPECIAL_GBLSOURCE #define epicsExportSharedSymbols @@ -41,7 +39,6 @@ #include "dbStaticPvt.h" #include "devSup.h" #include "drvSup.h" -#include "guigroup.h" #include "link.h" #include "special.h" @@ -439,6 +436,7 @@ dbBase * dbAllocBase(void) ellInit(&pdbbase->variableList); ellInit(&pdbbase->bptList); ellInit(&pdbbase->filterList); + ellInit(&pdbbase->guiGroupList); gphInitPvt(&pdbbase->pgpHash,256); dbPvdInitPvt(pdbbase); return (pdbbase); @@ -465,8 +463,10 @@ void dbFreeBase(dbBase *pdbbase) linkSup *plinkSup; brkTable *pbrkTable; brkTable *pbrkTableNext; - chFilterPlugin *pfilt; - chFilterPlugin *pfiltNext; + chFilterPlugin *pfilt; + chFilterPlugin *pfiltNext; + dbGuiGroup *pguiGroup; + dbGuiGroup *pguiGroupNext; int i; DBENTRY dbentry; @@ -612,6 +612,15 @@ void dbFreeBase(dbBase *pdbbase) free(pfilt); pfilt = pfiltNext; } + pguiGroup = (dbGuiGroup *)ellFirst(&pdbbase->guiGroupList); + while (pguiGroup) { + pguiGroupNext = (dbGuiGroup *)ellNext(&pguiGroup->node); + gphDelete(pdbbase->pgpHash, pguiGroup->name, &pdbbase->guiGroupList); + ellDelete(&pdbbase->guiGroupList, &pguiGroup->node); + free(pguiGroup->name); + free((void *)pguiGroup); + pguiGroup = pguiGroupNext; + } gphFreeMem(pdbbase->pgpHash); dbPvdFreeMem(pdbbase); dbFreePath(pdbbase); @@ -766,6 +775,31 @@ static long dbAddOnePath (DBBASE *pdbbase, const char *path, unsigned length) return 0; } +char *dbGetPromptGroupNameFromKey(DBBASE *pdbbase, const short key) +{ + dbGuiGroup *pdbGuiGroup; + + if (!pdbbase) return NULL; + for (pdbGuiGroup = (dbGuiGroup *)ellFirst(&pdbbase->guiGroupList); + pdbGuiGroup; pdbGuiGroup = (dbGuiGroup *)ellNext(&pdbGuiGroup->node)) { + if (pdbGuiGroup->key == key) return pdbGuiGroup->name; + } + return NULL; +} + +short dbGetPromptGroupKeyFromName(DBBASE *pdbbase, const char *name) +{ + GPHENTRY *pgphentry; + + if (!pdbbase) return 0; + pgphentry = gphFind(pdbbase->pgpHash, name, &pdbbase->guiGroupList); + if (!pgphentry) { + return 0; + } else { + return ((dbGuiGroup*)pgphentry->userPvt)->key; + } +} + long dbWriteRecord(DBBASE *ppdbbase,const char *filename, const char *precordTypename,int level) @@ -965,16 +999,11 @@ long dbWriteRecordTypeFP( fprintf(fp,"\t\tprompt(\"%s\")\n",pdbFldDes->prompt); if(pdbFldDes->initial) fprintf(fp,"\t\tinitial(\"%s\")\n",pdbFldDes->initial); - if(pdbFldDes->promptgroup) { - for(j=0; jpromptgroup) { - fprintf(fp,"\t\tpromptgroup(%s)\n", - pamapguiGroup[j].strvalue); - break; - } - } - } - if(pdbFldDes->special) { + if (pdbFldDes->promptgroup) { + fprintf(fp,"\t\tpromptgroup(\"%s\")\n", + dbGetPromptGroupNameFromKey(pdbbase, pdbFldDes->promptgroup)); + } + if(pdbFldDes->special) { if(pdbFldDes->special >= SPC_NTYPES) { fprintf(fp,"\t\tspecial(%d)\n",pdbFldDes->special); } else for(j=0; jpapFldDes[0]; if(!pdbFldDes || (strcmp(pdbFldDes->name,"NAME")!=0)) - return(S_dbLib_nameLength); + return(S_dbLib_nameLength); if((int)strlen(precordName)>=pdbFldDes->size) return(S_dbLib_nameLength); /* clear callers entry */ zeroDbentry(pdbentry); @@ -1439,18 +1467,7 @@ long dbCreateRecord(DBENTRY *pdbentry,const char *precordName) if((status = dbAllocRecord(pdbentry,precordName))) return(status); pNewRecNode->recordname = dbRecordName(pdbentry); ellInit(&pNewRecNode->infoList); - /* install record node in list in sorted postion */ - status = dbFirstRecord(pdbentry); - while(status==0) { - if(strcmp(precordName,dbGetRecordName(pdbentry)) < 0) break; - status = dbNextRecord(pdbentry); - } - if(status==0) { - precnode = pdbentry->precnode; - ellInsert(preclist,ellPrevious(&precnode->node),&pNewRecNode->node); - } else { - ellAdd(preclist,&pNewRecNode->node); - } + ellAdd(preclist, &pNewRecNode->node); pdbentry->precnode = pNewRecNode; ppvd = dbPvdAdd(pdbentry->pdbbase,precordType,pNewRecNode); if(!ppvd) {errMessage(-1,"Logic Err: Could not add to PVD");return(-1);} @@ -1628,52 +1645,6 @@ char * dbGetRecordName(DBENTRY *pdbentry) return precnode->recordname; } -long dbRenameRecord(DBENTRY *pdbentry,const char *newName) -{ - dbBase *pdbbase = pdbentry->pdbbase; - dbRecordType *precordType = pdbentry->precordType; - dbFldDes *pdbFldDes; - dbRecordNode *precnode = pdbentry->precnode; - PVDENTRY *ppvd; - ELLLIST *preclist; - dbRecordNode *plistnode; - long status; - DBENTRY dbentry; - - if(!precordType) return(S_dbLib_recordTypeNotFound); - /*Get size of NAME field*/ - pdbFldDes = precordType->papFldDes[0]; - if(!pdbFldDes || (strcmp(pdbFldDes->name,"NAME")!=0)) - return(S_dbLib_nameLength); - if((int)strlen(newName)>=pdbFldDes->size) return(S_dbLib_nameLength); - if (!precnode || dbIsAlias(pdbentry)) return S_dbLib_recNotFound; - dbInitEntry(pdbentry->pdbbase,&dbentry); - status = dbFindRecord(&dbentry,newName); - dbFinishEntry(&dbentry); - if(!status) return(S_dbLib_recExists); - dbPvdDelete(pdbbase,precnode); - pdbentry->pflddes = precordType->papFldDes[0]; - if((status = dbGetFieldAddress(pdbentry))) return(status); - strcpy(pdbentry->pfield,newName); - ppvd = dbPvdAdd(pdbbase,precordType,precnode); - if(!ppvd) {errMessage(-1,"Logic Err: Could not add to PVD");return(-1);} - /*remove from record list and reinstall in sorted order*/ - preclist = &precordType->recList; - ellDelete(preclist,&precnode->node); - plistnode = (dbRecordNode *)ellFirst(preclist); - while(plistnode) { - pdbentry->precnode = plistnode; - if(strcmp(newName,dbGetRecordName(pdbentry)) >=0) break; - plistnode = (dbRecordNode *)ellNext(&plistnode->node); - } - if(plistnode) - ellInsert(preclist,ellPrevious(&plistnode->node),&precnode->node); - else - ellAdd(preclist,&precnode->node); - /*Leave pdbentry pointing to newly renamed record*/ - return(dbFindRecord(pdbentry,newName)); -} - long dbVisibleRecord(DBENTRY *pdbentry) { dbRecordNode *precnode = pdbentry->precnode; @@ -1707,7 +1678,6 @@ long dbCreateAlias(DBENTRY *pdbentry, const char *alias) dbRecordNode *pnewnode; PVDENTRY *ppvd; ELLLIST *preclist = NULL; - long status; if (!precordType) return S_dbLib_recordTypeNotFound; if (!precnode) return S_dbLib_recNotFound; @@ -1723,18 +1693,7 @@ long dbCreateAlias(DBENTRY *pdbentry, const char *alias) if (!(precnode->flags & DBRN_FLAGS_ISALIAS)) precnode->flags |= DBRN_FLAGS_HASALIAS; ellInit(&pnewnode->infoList); - /* install record node in list in sorted postion */ - status = dbFirstRecord(pdbentry); - while (!status) { - if (strcmp(alias, dbGetRecordName(pdbentry)) < 0) break; - status = dbNextRecord(pdbentry); - } - if (!status) { - precnode = pdbentry->precnode; - ellInsert(preclist, ellPrevious(&precnode->node), &pnewnode->node); - } else { - ellAdd(preclist, &pnewnode->node); - } + ellAdd(preclist, &pnewnode->node); precordType->no_aliases++; pdbentry->precnode = pnewnode; ppvd = dbPvdAdd(pdbentry->pdbbase, precordType, pnewnode); @@ -3344,14 +3303,9 @@ void dbDumpField( if(!pdbFldDes->promptgroup) { printf("\t promptgroup: %d\n",pdbFldDes->promptgroup); } else { - for(j=0; jpromptgroup) { - printf("\t promptgroup: %s\n", - pamapguiGroup[j].strvalue); - break; - } - } - } + printf("\t promptgroup: %s\n", + dbGetPromptGroupNameFromKey(pdbbase, pdbFldDes->promptgroup)); + } printf("\t interest: %hd\n", pdbFldDes->interest); printf("\t as_level: %d\n",pdbFldDes->as_level); printf("\t initial: %s\n", diff --git a/src/ioc/dbStatic/dbStaticLib.h b/src/ioc/dbStatic/dbStaticLib.h index 1015301b4..a09d7b28b 100644 --- a/src/ioc/dbStatic/dbStaticLib.h +++ b/src/ioc/dbStatic/dbStaticLib.h @@ -6,8 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Author: Marty Kraimer * Date: 06-08-93 */ @@ -81,6 +80,10 @@ epicsShareFunc long dbReadDatabaseFP(DBBASE **ppdbbase, FILE *fp, const char *path, const char *substitutions); epicsShareFunc long dbPath(DBBASE *pdbbase, const char *path); epicsShareFunc long dbAddPath(DBBASE *pdbbase, const char *path); +epicsShareFunc char * dbGetPromptGroupNameFromKey(DBBASE *pdbbase, + const short key); +epicsShareFunc short dbGetPromptGroupKeyFromName(DBBASE *pdbbase, + const char *name); epicsShareFunc long dbWriteRecord(DBBASE *ppdbbase, const char *filename, const char *precordTypename, int level); epicsShareFunc long dbWriteRecordFP(DBBASE *ppdbbase, @@ -144,8 +147,6 @@ epicsShareFunc long dbNextRecord(DBENTRY *pdbentry); epicsShareFunc int dbGetNRecords(DBENTRY *pdbentry); epicsShareFunc int dbGetNAliases(DBENTRY *pdbentry); epicsShareFunc char * dbGetRecordName(DBENTRY *pdbentry); -epicsShareFunc long dbRenameRecord(DBENTRY *pdbentry, - const char *newName); epicsShareFunc long dbCopyRecord(DBENTRY *pdbentry, const char *newRecordName, int overWriteOK); diff --git a/src/ioc/dbStatic/dbStaticPvt.h b/src/ioc/dbStatic/dbStaticPvt.h index 372fd54bf..4e7d2d6f1 100644 --- a/src/ioc/dbStatic/dbStaticPvt.h +++ b/src/ioc/dbStatic/dbStaticPvt.h @@ -83,6 +83,13 @@ typedef struct dbPathNode { char *directory; } dbPathNode; +/* Element of the global gui group list */ +typedef struct dbGuiGroup { + ELLNODE node; + short key; + char *name; +} dbGuiGroup; + /*The following are in dbPvdLib.c*/ /*directory*/ typedef struct{ diff --git a/src/ioc/dbStatic/devSup.h b/src/ioc/dbStatic/devSup.h index 0f2fc339b..bd900cae4 100644 --- a/src/ioc/dbStatic/devSup.h +++ b/src/ioc/dbStatic/devSup.h @@ -7,7 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* devSup.h Device Support */ -/* $Revision-Id$ */ /* * Author: Marty Kraimer * Date: 6-1-90 diff --git a/src/ioc/dbStatic/drvSup.h b/src/ioc/dbStatic/drvSup.h index 9f743ed6f..5778038e7 100644 --- a/src/ioc/dbStatic/drvSup.h +++ b/src/ioc/dbStatic/drvSup.h @@ -7,7 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* drvSup.h Driver Support */ -/* share/epicsH $Revision-Id$ */ /* * Author: Marty Kraimer diff --git a/src/ioc/dbStatic/guigroup.h b/src/ioc/dbStatic/guigroup.h index 5d97a4f8c..4e2f2e1dd 100644 --- a/src/ioc/dbStatic/guigroup.h +++ b/src/ioc/dbStatic/guigroup.h @@ -8,7 +8,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ +/* these are used in the pmt (prompt) field of the record support ascii files. They represent field groupings for dct tools */ @@ -16,68 +16,11 @@ #ifndef __gui_group_h__ #define __gui_group_h__ -#define GUI_COMMON 1 -#define GUI_ALARMS 2 -#define GUI_BITS1 3 -#define GUI_BITS2 4 -#define GUI_CALC 5 -#define GUI_CLOCK 6 -#define GUI_COMPRESS 7 -#define GUI_CONVERT 8 -#define GUI_DISPLAY 9 -#define GUI_HIST 10 -#define GUI_INPUTS 11 -#define GUI_LINKS 12 -#define GUI_MBB 13 -#define GUI_MOTOR 14 -#define GUI_OUTPUT 15 -#define GUI_PID 16 -#define GUI_PULSE 17 -#define GUI_SELECT 18 -#define GUI_SEQ1 19 -#define GUI_SEQ2 20 -#define GUI_SEQ3 21 -#define GUI_SUB 22 -#define GUI_TIMER 23 -#define GUI_WAVE 24 -#define GUI_SCAN 25 -#define GUI_NTYPES 25 - -typedef struct mapguiGroup{ - char *strvalue; - int value; -}mapguiGroup; - -#ifndef GUIGROUPS_GBLSOURCE -extern mapguiGroup pamapguiGroup[]; -#else -mapguiGroup pamapguiGroup[GUI_NTYPES] = { - {"GUI_COMMON",GUI_COMMON}, - {"GUI_ALARMS",GUI_ALARMS}, - {"GUI_BITS1",GUI_BITS1}, - {"GUI_BITS2",GUI_BITS2}, - {"GUI_CALC",GUI_CALC}, - {"GUI_CLOCK",GUI_CLOCK}, - {"GUI_COMPRESS",GUI_COMPRESS}, - {"GUI_CONVERT",GUI_CONVERT}, - {"GUI_DISPLAY",GUI_DISPLAY}, - {"GUI_HIST",GUI_HIST}, - {"GUI_INPUTS",GUI_INPUTS}, - {"GUI_LINKS",GUI_LINKS}, - {"GUI_MBB",GUI_MBB}, - {"GUI_MOTOR",GUI_MOTOR}, - {"GUI_OUTPUT",GUI_OUTPUT}, - {"GUI_PID",GUI_PID}, - {"GUI_PULSE",GUI_PULSE}, - {"GUI_SELECT",GUI_SELECT}, - {"GUI_SEQ1",GUI_SEQ1}, - {"GUI_SEQ2",GUI_SEQ2}, - {"GUI_SEQ3",GUI_SEQ3}, - {"GUI_SUB",GUI_SUB}, - {"GUI_TIMER",GUI_TIMER}, - {"GUI_WAVE",GUI_WAVE}, - {"GUI_SCAN",GUI_SCAN} -}; -#endif /*GUIGROUPS_GBLSOURCE*/ +#error As of Base 3.15.4, the promptgroup implementation has changed. \ + This header file (guigroup.h) is invalid and will be removed shortly. \ + Instead, you should include dbStaticLib.h, parse the DBD, \ + and use dbGetPromptGroupNameFromKey() and dbGetPromptGroupKeyFromName() \ + that have been added to dbStaticLib. \ + More details in the 3.15.4 release notes and the AppDev Guide. #endif /*__gui_group_h__*/ diff --git a/src/ioc/dbStatic/link.h b/src/ioc/dbStatic/link.h index ab1d7a54d..9055c7588 100644 --- a/src/ioc/dbStatic/link.h +++ b/src/ioc/dbStatic/link.h @@ -7,7 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* link.h */ -/* $Id$ */ /* * Original Authors: Bob Dalesio, Marty Kraimer diff --git a/src/ioc/dbStatic/recSup.h b/src/ioc/dbStatic/recSup.h index 7ff0b2e18..91309898e 100644 --- a/src/ioc/dbStatic/recSup.h +++ b/src/ioc/dbStatic/recSup.h @@ -16,61 +16,85 @@ #define INCrecSuph 1 #include "errMdef.h" +#include "compilerDependencies.h" #ifdef __cplusplus extern "C" { #endif -typedef long (*RECSUPFUN) (); /* ptr to record support function*/ +/* RSET definition */ -typedef struct rset { /* record support entry table */ - long number; /*number of support routines */ - RECSUPFUN report; /*print report */ - RECSUPFUN init; /*init support */ - RECSUPFUN init_record; /*init record */ - RECSUPFUN process; /*process record */ - RECSUPFUN special; /*special processing */ - RECSUPFUN get_value; /*no longer used */ - RECSUPFUN cvt_dbaddr; /*cvt dbAddr */ - RECSUPFUN get_array_info; - RECSUPFUN put_array_info; - RECSUPFUN get_units; - RECSUPFUN get_precision; - RECSUPFUN get_enum_str; /*get string from enum item*/ - RECSUPFUN get_enum_strs; /*get all enum strings */ - RECSUPFUN put_enum_str; /*put string from enum item*/ - RECSUPFUN get_graphic_double; - RECSUPFUN get_control_double; - RECSUPFUN get_alarm_double; -}rset; +/* defined elsewhere */ +struct dbAddr; +struct dbCommon; +struct dbr_enumStrs; +struct dbr_grDouble; +struct dbr_ctrlDouble; +struct dbr_alDouble; -#define RSETNUMBER ( (sizeof(struct rset) - sizeof(long))/sizeof(RECSUPFUN) ) +/* record support entry table */ +struct typed_rset { + long number; /* number of support routines */ + long (*report)(void *precord); + long (*init)(); + long (*init_record)(struct dbCommon *precord, int pass); + long (*process)(struct dbCommon *precord); + long (*special)(struct dbAddr *paddr, int after); + long (*get_value)(void); /* DEPRECATED set to NULL */ + long (*cvt_dbaddr)(struct dbAddr *paddr); + long (*get_array_info)(struct dbAddr *paddr, long *no_elements, long *offset); + long (*put_array_info)(struct dbAddr *paddr, long nNew); + long (*get_units)(struct dbAddr *paddr, char *units); + long (*get_precision)(const struct dbAddr *paddr, long *precision); + long (*get_enum_str)(const struct dbAddr *paddr, char *pbuffer); + long (*get_enum_strs)(const struct dbAddr *paddr, struct dbr_enumStrs *p); + long (*put_enum_str)(const struct dbAddr *paddr, const char *pbuffer); + long (*get_graphic_double)(struct dbAddr *paddr, struct dbr_grDouble *p); + long (*get_control_double)(struct dbAddr *paddr, struct dbr_ctrlDouble *p); + long (*get_alarm_double)(struct dbAddr *paddr, struct dbr_alDouble *p); +}; +#ifdef USE_TYPED_RSET + +typedef struct typed_rset rset; + +#else + +/* pre-3.16 old untyped RSET definition - DEPRECATED */ + +typedef long (*RECSUPFUN) () EPICS_DEPRECATED; /* ptr to record support function*/ + +struct rset { /* record support entry table */ + long number; /*number of support routines */ + RECSUPFUN report; /*print report */ + RECSUPFUN init; /*init support */ + RECSUPFUN init_record; /*init record */ + RECSUPFUN process; /*process record */ + RECSUPFUN special; /*special processing */ + RECSUPFUN get_value; /*no longer used */ + RECSUPFUN cvt_dbaddr; /*cvt dbAddr */ + RECSUPFUN get_array_info; + RECSUPFUN put_array_info; + RECSUPFUN get_units; + RECSUPFUN get_precision; + RECSUPFUN get_enum_str; /*get string from enum item*/ + RECSUPFUN get_enum_strs; /*get all enum strings */ + RECSUPFUN put_enum_str; /*put string from enum item*/ + RECSUPFUN get_graphic_double; + RECSUPFUN get_control_double; + RECSUPFUN get_alarm_double; +} EPICS_DEPRECATED; + +typedef struct rset rset EPICS_DEPRECATED; + +#endif + +#define RSETNUMBER 17 #define S_rec_noRSET (M_recSup| 1) /*Missing record support entry table*/ #define S_rec_noSizeOffset (M_recSup| 2) /*Missing SizeOffset Routine*/ #define S_rec_outMem (M_recSup| 3) /*Out of Memory*/ - -/************************************************************************ - * report(FILE fp,void *precord); - * init(); - * init_record(precord,pass); - * process(void *precord); - * special(struct dbAddr *paddr, after); - * cvt_dbaddr(struct dbAddr *paddr); - * get_array_info(paddr,long *no_elements,long *offset); - * put_array_info(paddr,nNew); - * get_units(paddr,char units[8]); - * get_precision(struct dbAddr *paddr,long *precision); - * get_enum_str(paddr,pbuffer); - * get_enum_strs(paddr,struct dbr_enumStrs *p); - * put_enum_str(paddr,pbuffer); - * get_graphic_double(paddr,struct dbr_grDouble *p); - * get_control_double(paddr,struct dbr_ctrlDouble *p); - * get_alarm_double(paddr,struct dbr_ctrlDouble *p); - ***********************************************************************/ - #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/src/ioc/dbStatic/special.h b/src/ioc/dbStatic/special.h index ca8c0eaeb..055287a64 100644 --- a/src/ioc/dbStatic/special.h +++ b/src/ioc/dbStatic/special.h @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* special.h */ -/* share/epicsH $Revision-Id$ */ /* * Author: Marty Kraimer diff --git a/src/ioc/misc/dbCore.dbd b/src/ioc/misc/dbCore.dbd index 42e84c251..a2ce45806 100644 --- a/src/ioc/misc/dbCore.dbd +++ b/src/ioc/misc/dbCore.dbd @@ -1,7 +1,5 @@ # dbCore.dbd # -# $Revision-Id$ -# # This file provides iocsh access to variables that control some lesser-used # and debugging features of the IOC database code. @@ -13,6 +11,7 @@ variable(asCaDebug,int) # Static database access variables variable(dbRecordsOnceOnly,int) +variable(dbRecordsAbcSorted,int) variable(dbBptNotMonotonic,int) variable(dbQuietMacroWarnings,int) diff --git a/src/ioc/misc/epicsRelease.c b/src/ioc/misc/epicsRelease.c index d6e87cd35..7ee89fcda 100644 --- a/src/ioc/misc/epicsRelease.c +++ b/src/ioc/misc/epicsRelease.c @@ -6,9 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* - * $Revision-Id$ - */ #include #include diff --git a/src/ioc/misc/iocInit.c b/src/ioc/misc/iocInit.c index 30854c3bf..92c2edafb 100644 --- a/src/ioc/misc/iocInit.c +++ b/src/ioc/misc/iocInit.c @@ -8,7 +8,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Original Author: Marty Kraimer * Date: 06-01-91 @@ -23,10 +22,12 @@ #include #include +#include "dbBase.h" #include "dbDefs.h" #include "ellLib.h" #include "envDefs.h" #include "epicsExit.h" +#include "epicsGeneralTime.h" #include "epicsPrint.h" #include "epicsSignal.h" #include "epicsThread.h" @@ -79,6 +80,7 @@ static enum { /* define forward references*/ static int checkDatabase(dbBase *pdbbase); +static void checkGeneralTime(void); static void initDrvSup(void); static void initRecSup(void); static void initDevSup(void); @@ -130,6 +132,7 @@ static int iocBuild_1(void) coreRelease(); iocState = iocBuilding; + checkGeneralTime(); taskwdInit(); callbackInit(); initHookAnnounce(initHookAfterCallbackInit); @@ -355,6 +358,22 @@ static int checkDatabase(dbBase *pdbbase) return 0; } +static void checkGeneralTime(void) +{ + epicsTimeStamp ts; + + epicsTimeGetCurrent(&ts); + if (ts.secPastEpoch < 2*24*60*60) { + static const char * const tsfmt = "%Y-%m-%d %H:%M:%S.%09f"; + char buff[40]; + + epicsTimeToStrftime(buff, sizeof(buff), tsfmt, &ts); + errlogPrintf("iocInit: Time provider has not yet synchronized.\n"); + } + + epicsTimeGetEvent(&ts, 1); /* Prime gtPvt.lastEventProvider for ISRs */ +} + static void initDrvSup(void) /* Locate all driver support entry tables */ { @@ -384,7 +403,7 @@ static void initRecSup(void) pdbRecordType = (dbRecordType *)ellNext(&pdbRecordType->node)) { recordTypeLocation *precordTypeLocation = registryRecordTypeFind(pdbRecordType->name); - struct rset *prset; + rset *prset; if (!precordTypeLocation) { errlogPrintf("iocInit record support for %s not found\n", @@ -469,7 +488,7 @@ static void iterateRecords(recIterFunc func, void *user) static void doInitRecord0(dbRecordType *pdbRecordType, dbCommon *precord, void *user) { - struct rset *prset = pdbRecordType->prset; + rset *prset = pdbRecordType->prset; devSup *pdevSup; if (!prset) return; /* unlikely */ @@ -524,7 +543,7 @@ static void doResolveLinks(dbRecordType *pdbRecordType, dbCommon *precord, static void doInitRecord1(dbRecordType *pdbRecordType, dbCommon *precord, void *user) { - struct rset *prset = pdbRecordType->prset; + rset *prset = pdbRecordType->prset; if (!prset) return; /* unlikely */ diff --git a/src/ioc/misc/iocshRegisterCommon.c b/src/ioc/misc/iocshRegisterCommon.c index 0341dfbd6..fefa716b9 100644 --- a/src/ioc/misc/iocshRegisterCommon.c +++ b/src/ioc/misc/iocshRegisterCommon.c @@ -7,6 +7,8 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ +#include "envDefs.h" +#include "epicsVersion.h" #include "iocsh.h" #include "libComRegister.h" @@ -21,10 +23,29 @@ #include "registryIocRegister.h" #include "rsrvIocRegister.h" +#define quote(v) #v +#define str(v) quote(v) + void iocshRegisterCommon(void) { + const char *targetArch = envGetConfigParamPtr(&EPICS_BUILD_TARGET_ARCH); iocshPpdbbase = &pdbbase; + /* This uses a config param so the user can override it */ + if (targetArch) { + epicsEnvSet("ARCH", targetArch); + } + + /* Base build version variables */ + epicsEnvSet("EPICS_VERSION_MAJOR", str(EPICS_VERSION)); + epicsEnvSet("EPICS_VERSION_MIDDLE", str(EPICS_REVISION)); + epicsEnvSet("EPICS_VERSION_MINOR", str(EPICS_MODIFICATION)); + epicsEnvSet("EPICS_VERSION_PATCH", str(EPICS_PATCH_LEVEL)); + epicsEnvSet("EPICS_VERSION_SNAPSHOT", EPICS_DEV_SNAPSHOT); + epicsEnvSet("EPICS_VERSION_SITE", EPICS_SITE_VERSION); + epicsEnvSet("EPICS_VERSION_SHORT", EPICS_VERSION_SHORT); + epicsEnvSet("EPICS_VERSION_FULL", EPICS_VERSION_FULL); + dbStaticIocRegister(); registryIocRegister(); dbIocRegister(); diff --git a/src/ioc/registry/registryRecordType.h b/src/ioc/registry/registryRecordType.h index 1d4c80cdd..29ba714e8 100644 --- a/src/ioc/registry/registryRecordType.h +++ b/src/ioc/registry/registryRecordType.h @@ -18,13 +18,12 @@ extern "C" { #endif struct dbRecordType; -struct rset; struct dbBase; typedef int (*computeSizeOffset)(struct dbRecordType *pdbRecordType); typedef struct recordTypeLocation { - struct rset *prset; + struct typed_rset *prset; computeSizeOffset sizeOffset; }recordTypeLocation; diff --git a/src/ioc/rsrv/camessage.c b/src/ioc/rsrv/camessage.c index b992b46eb..b13883b5a 100644 --- a/src/ioc/rsrv/camessage.c +++ b/src/ioc/rsrv/camessage.c @@ -26,6 +26,7 @@ #include "epicsEvent.h" #include "epicsMutex.h" #include "epicsStdio.h" +#include "epicsString.h" #include "epicsThread.h" #include "epicsTime.h" #include "errlog.h" @@ -663,7 +664,7 @@ static void read_reply ( void *pArg, struct dbChannel *dbch, static int read_action ( caHdrLargeArray *mp, void *pPayloadIn, struct client *pClient ) { struct channel_in_use *pciu = MPTOPCIU ( mp ); - const int readAccess = asCheckGet ( pciu->asClientPVT ); + int readAccess; ca_uint32_t payloadSize; void *pPayload; int status; @@ -675,6 +676,7 @@ static int read_action ( caHdrLargeArray *mp, void *pPayloadIn, struct client *p logBadId ( pClient, mp, 0 ); return RSRV_ERROR; } + readAccess = asCheckGet ( pciu->asClientPVT ); SEND_LOCK ( pClient ); @@ -748,7 +750,7 @@ static int read_action ( caHdrLargeArray *mp, void *pPayloadIn, struct client *p */ if ( mp->m_dataType == DBR_STRING && mp->m_count == 1 ) { char * pStr = (char *) pPayload; - size_t strcnt = strlen ( pStr ); + size_t strcnt = epicsStrnLen( pStr, payloadSize ); if ( strcnt < payloadSize ) { payloadSize = ( ca_uint32_t ) ( strcnt + 1u ); } @@ -883,7 +885,7 @@ static int write_action ( caHdrLargeArray *mp, static int host_name_action ( caHdrLargeArray *mp, void *pPayload, struct client *client ) { - size_t size; + ca_uint32_t size; char *pName; char *pMalloc; int chanCount; @@ -907,9 +909,9 @@ static int host_name_action ( caHdrLargeArray *mp, void *pPayload, } pName = (char *) pPayload; - size = strlen(pName)+1; - if (size > 512) { - log_header ( "bad (very long) host name", + size = epicsStrnLen(pName, mp->m_postsize)+1; + if (size > 512 || size > mp->m_postsize) { + log_header ( "bad (very long) host name", client, mp, pPayload, 0 ); SEND_LOCK(client); send_err( @@ -962,7 +964,7 @@ static int host_name_action ( caHdrLargeArray *mp, void *pPayload, static int client_name_action ( caHdrLargeArray *mp, void *pPayload, struct client *client ) { - size_t size; + ca_uint32_t size; char *pName; char *pMalloc; int chanCount; @@ -986,9 +988,9 @@ static int client_name_action ( caHdrLargeArray *mp, void *pPayload, } pName = (char *) pPayload; - size = strlen(pName)+1; - if (size > 512) { - log_header ("a very long user name was specified", + size = epicsStrnLen(pName, mp->m_postsize)+1; + if (size > 512 || size > mp->m_postsize) { + log_header ("a very long user name was specified", client, mp, pPayload, 0); SEND_LOCK(client); send_err( @@ -1112,7 +1114,7 @@ unsigned cid * casAccessRightsCB() * * If access right state changes then inform the client. - * + * asLock is held */ static void casAccessRightsCB(ASCLIENTPVT ascpvt, asClientStatus type) { @@ -1568,6 +1570,9 @@ static void sendAllUpdateAS ( struct client *client ) else if ( pciu->state == rsrvCS_inServiceUpdatePendAR ) { access_rights_reply ( pciu ); } + else if ( pciu->state == rsrvCS_shutdown ) { + /* no-op */ + } else { errlogPrintf ( "%s at %d: corrupt channel state detected durring AR update\n", @@ -2047,10 +2052,15 @@ static int clear_channel_reply ( caHdrLargeArray *mp, if ( pciu->state == rsrvCS_inService || pciu->state == rsrvCS_pendConnectResp ) { ellDelete ( &client->chanList, &pciu->node ); + pciu->state = rsrvCS_shutdown; } else if ( pciu->state == rsrvCS_inServiceUpdatePendAR || pciu->state == rsrvCS_pendConnectRespUpdatePendAR ) { ellDelete ( &client->chanPendingUpdateARList, &pciu->node ); + pciu->state = rsrvCS_shutdown; + } + else if ( pciu->state == rsrvCS_shutdown ) { + /* no-op */ } else { epicsMutexUnlock( client->chanListLock ); diff --git a/src/ioc/rsrv/caservertask.c b/src/ioc/rsrv/caservertask.c index 310cabb29..a18abafe2 100644 --- a/src/ioc/rsrv/caservertask.c +++ b/src/ioc/rsrv/caservertask.c @@ -11,10 +11,7 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Jeffrey O. Hill - * */ #include @@ -235,16 +232,17 @@ SOCKET* rsrv_grab_tcp(unsigned short *port) ok = 0; break; } - /* if SOCK_EADDRINUSE then try again with a different port number. - * otherwise, fail hard + /* if SOCK_EADDRINUSE or SOCK_EACCES try again with a different + * port number, otherwise fail hard. */ - if(errcode!=SOCK_EADDRINUSE) { + if (errcode != SOCK_EADDRINUSE && + errcode != SOCK_EACCES) { char name[40]; char sockErrBuf[64]; epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) ); ipAddrToDottedIP(&scratch.ia, name, sizeof(name)); - cantProceed( "CAS: Socket bind %s error was \"%s\"\n", + cantProceed( "CAS: Socket bind %s error was %s\n", name, sockErrBuf ); } ok = 0; @@ -855,7 +853,7 @@ static void log_one_client (struct client *client, unsigned level) printf( "\tUnprocessed request bytes = %u, Undelivered response bytes = %u\n", client->recv.cnt - client->recv.stk, - client->send.stk ); + client->send.stk ); printf( "\tState = %s%s%s\n", state[client->disconnect?1:0], @@ -1134,6 +1132,7 @@ static void destroyAllChannels ( epicsMutexMustLock ( client->chanListLock ); pciu = (struct channel_in_use *) ellGet ( pList ); + if(pciu) pciu->state = rsrvCS_shutdown; epicsMutexUnlock ( client->chanListLock ); if ( ! pciu ) { diff --git a/src/ioc/rsrv/online_notify.c b/src/ioc/rsrv/online_notify.c index 619fdc4e5..d1d557943 100644 --- a/src/ioc/rsrv/online_notify.c +++ b/src/ioc/rsrv/online_notify.c @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * tell CA clients this a server has joined the network * * Author: Jeffrey O. Hill diff --git a/src/ioc/rsrv/rsrv.h b/src/ioc/rsrv/rsrv.h index 84414fc8d..10947cdf0 100644 --- a/src/ioc/rsrv/rsrv.h +++ b/src/ioc/rsrv/rsrv.h @@ -8,8 +8,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Jeffrey O. Hill * hill@luke.lanl.gov * (505) 665 1831 diff --git a/src/ioc/rsrv/server.h b/src/ioc/rsrv/server.h index a1094c2eb..d2a1cf3f4 100644 --- a/src/ioc/rsrv/server.h +++ b/src/ioc/rsrv/server.h @@ -99,12 +99,25 @@ typedef struct client { char disconnect; /* disconnect detected */ } client; +/* Channel state shows which struct client list a + * channel_in_us::node is in. + * + * client::chanList + * rsrvCS_pendConnectResp, rsrvCS_inService + * client::chanPendingUpdateARList + * rsrvCS_pendConnectRespUpdatePendAR, rsrvCS_inServiceUpdatePendAR + * Not in any list + * rsrvCS_shutdown + * + * rsrvCS_invalid is not used + */ enum rsrvChanState { rsrvCS_invalid, rsrvCS_pendConnectResp, rsrvCS_inService, rsrvCS_pendConnectRespUpdatePendAR, - rsrvCS_inServiceUpdatePendAR + rsrvCS_inServiceUpdatePendAR, + rsrvCS_shutdown }; /* diff --git a/src/libCom/Makefile b/src/libCom/Makefile index 43aef2d46..ee93ada0a 100644 --- a/src/libCom/Makefile +++ b/src/libCom/Makefile @@ -50,13 +50,17 @@ Com_SYS_LIBS_WIN32 = ws2_32 advapi32 user32 Com_RCS = Com.rc +ifeq ($(T_A),$(EPICS_HOST_ARCH)) + # Antelope & flex are needed to finish libCom + DELAY_INSTALL_LIBS = YES +endif + include $(TOP)/configure/RULES include $(LIBCOM)/as/RULES include $(LIBCOM)/env/RULES include $(LIBCOM)/error/RULES include $(LIBCOM)/flex/RULES -include $(LIBCOM)/log/RULES include $(LIBCOM)/misc/RULES include $(LIBCOM)/osi/RULES diff --git a/src/libCom/RTEMS/epicsRtemsInitHookPost.c b/src/libCom/RTEMS/epicsRtemsInitHookPost.c index da2fbeab4..f589eb9cf 100644 --- a/src/libCom/RTEMS/epicsRtemsInitHookPost.c +++ b/src/libCom/RTEMS/epicsRtemsInitHookPost.c @@ -8,7 +8,6 @@ /* * Dummy version -- use if application does not provide its own version - * $Revision-Id$ */ #include "epicsRtemsInitHooks.h" diff --git a/src/libCom/RTEMS/epicsRtemsInitHookPre.c b/src/libCom/RTEMS/epicsRtemsInitHookPre.c index 357952007..08efe1fe2 100644 --- a/src/libCom/RTEMS/epicsRtemsInitHookPre.c +++ b/src/libCom/RTEMS/epicsRtemsInitHookPre.c @@ -8,7 +8,6 @@ /* * Dummy version -- use if application does not provide its own version - * $Revision-Id$ */ #include "epicsRtemsInitHooks.h" diff --git a/src/libCom/RTEMS/epicsRtemsInitHooks.h b/src/libCom/RTEMS/epicsRtemsInitHooks.h index fac577a06..b7f09c100 100644 --- a/src/libCom/RTEMS/epicsRtemsInitHooks.h +++ b/src/libCom/RTEMS/epicsRtemsInitHooks.h @@ -8,7 +8,6 @@ /* * Hooks into RTEMS startup code - * $Revision-Id$ */ #include #include diff --git a/src/libCom/RTEMS/rtems_config.c b/src/libCom/RTEMS/rtems_config.c index ff5fb8128..147c08b10 100644 --- a/src/libCom/RTEMS/rtems_config.c +++ b/src/libCom/RTEMS/rtems_config.c @@ -6,7 +6,6 @@ \*************************************************************************/ /* * RTEMS configuration for EPICS - * $Revision-Id$ * Author: W. Eric Norum * norume@aps.anl.gov * (630) 252-4793 diff --git a/src/libCom/RTEMS/rtems_init.c b/src/libCom/RTEMS/rtems_init.c index 156fc7154..82871da0d 100644 --- a/src/libCom/RTEMS/rtems_init.c +++ b/src/libCom/RTEMS/rtems_init.c @@ -2,11 +2,10 @@ * Copyright (c) 2002 The University of Saskatchewan * EPICS BASE Versions 3.13.7 * and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* * RTEMS startup task for EPICS - * $Revision-Id$ * Author: W. Eric Norum * eric.norum@usask.ca * (306) 966-5394 @@ -288,27 +287,27 @@ initialize_remote_filesystem(char **argv, int hasLocalFilesystem) mount_point[l] = '\0'; argv[1] = rtems_bsdnet_bootp_cmdline; /* - * Its probably common to embed the mount point in the server + * Its probably common to embed the mount point in the server * name so, when this is occurring, dont clobber the mount point * by appending the first node from the command path. This allows - * the mount point to be a different path then the server's mount + * the mount point to be a different path then the server's mount * path. * - * This allows for example a line similar to as follows the DHCP + * This allows for example a line similar to as follows the DHCP * configuration file. * * server-name "159.233@192.168.0.123:/vol/vol0/bootRTEMS"; */ if ( server_name ) { const size_t allocSize = strlen ( server_name ) + 2; - char * const pServerName = mustMalloc( allocSize, + char * const pServerName = mustMalloc( allocSize, "NFS mount paths"); - char * const pServerPath = mustMalloc ( allocSize, + char * const pServerPath = mustMalloc ( allocSize, "NFS mount paths"); - const int scanfStatus = sscanf ( - server_name, - "%[^:] : / %s", - pServerName, + const int scanfStatus = sscanf ( + server_name, + "%[^:] : / %s", + pServerName, pServerPath + 1u ); if ( scanfStatus == 2 ) { pServerPath[0u]= '/'; @@ -536,7 +535,7 @@ exitHandler(void) rtems_task Init (rtems_task_argument ignored) { - int i; + int result; char *argv[3] = { NULL, NULL, NULL }; char *cp; rtems_task_priority newpri; @@ -575,6 +574,12 @@ Init (rtems_task_argument ignored) putenv ("TERM=xterm"); putenv ("IOCSH_HISTSIZE=20"); + /* + * Display some OS information + */ + printf("\n***** RTEMS Version: %s *****\n", + rtems_get_version_string()); + /* * Start network */ @@ -656,8 +661,8 @@ Init (rtems_task_argument ignored) atexit(exitHandler); errlogFlush(); printf ("***** Starting EPICS application *****\n"); - i = main ((sizeof argv / sizeof argv[0]) - 1, argv); + result = main ((sizeof argv / sizeof argv[0]) - 1, argv); printf ("***** IOC application terminating *****\n"); epicsThreadSleep(1.0); - epicsExit(0); + epicsExit(result); } diff --git a/src/libCom/RTEMS/rtems_netconfig.c b/src/libCom/RTEMS/rtems_netconfig.c index 910961153..832a6646b 100644 --- a/src/libCom/RTEMS/rtems_netconfig.c +++ b/src/libCom/RTEMS/rtems_netconfig.c @@ -5,7 +5,6 @@ \*************************************************************************/ /* * RTEMS network configuration for EPICS - * $Revision-Id$ * Author: W. Eric Norum * eric.norum@usask.ca * (306) 966-5394 diff --git a/src/libCom/RTEMS/rtems_util.c b/src/libCom/RTEMS/rtems_util.c index 82e405027..ca64f9650 100644 --- a/src/libCom/RTEMS/rtems_util.c +++ b/src/libCom/RTEMS/rtems_util.c @@ -6,7 +6,6 @@ \*************************************************************************/ /* * RTEMS utilitiy routines for EPICS - * $Revision-Id$ * Author: W. Eric Norum * eric@cls.usask.ca * (306) 966-6055 diff --git a/src/libCom/as/asLib.y b/src/libCom/as/asLib.y index 7e2803158..55d48ebad 100644 --- a/src/libCom/as/asLib.y +++ b/src/libCom/as/asLib.y @@ -3,9 +3,8 @@ * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* EPICS BASE is distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. \*************************************************************************/ %{ static int yyerror(char *); @@ -29,9 +28,7 @@ static ASGRULE *yyAsgRule=NULL; %union { int Int; - char Char; char *Str; - double Real; } %% @@ -208,11 +205,12 @@ rule_hag_list_name: tokenSTRING static int yyerror(char *str) { - if (strlen(str)) epicsPrintf("%s\n", str); - epicsPrintf("Access Security file error at line %d\n", - line_num); + if (strlen(str)) + errlogPrintf("%s at line %d\n", str, line_num); + else + errlogPrintf("Error at line %d\n", line_num); yyFailed = TRUE; - return(0); + return 0; } static int myParse(ASINPUTFUNCPTR inputfunction) { diff --git a/src/libCom/as/asLibRoutines.c b/src/libCom/as/asLibRoutines.c index c8046ebce..e7f1d90bf 100644 --- a/src/libCom/as/asLibRoutines.c +++ b/src/libCom/as/asLibRoutines.c @@ -1,12 +1,10 @@ -/* share/src/as/asLibRoutines.c */ /*************************************************************************\ * Copyright (c) 2002 The University of Chicago, as Operator of Argonne * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* EPICS BASE is distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. \*************************************************************************/ /* Author: Marty Kraimer Date: 10-15-93 */ @@ -22,7 +20,7 @@ #include "epicsThread.h" #include "cantProceed.h" #include "epicsMutex.h" -#include "epicsPrint.h" +#include "errlog.h" #include "gpHash.h" #include "freeList.h" #include "macLib.h" @@ -109,7 +107,7 @@ long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction) pasg = (ASG *)ellFirst(&pasbasenew->asgList); while(pasg) { pasg->pavalue = asCalloc(CALCPERFORM_NARGS, sizeof(double)); - pasg = (ASG *)ellNext((ELLNODE *)pasg); + pasg = (ASG *)ellNext(&pasg->node); } gphInitPvt(&pasbasenew->phash, 256); /*Hash each uagname and each hagname*/ @@ -119,12 +117,12 @@ long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction) while(puagname) { pgphentry = gphAdd(pasbasenew->phash,puagname->user,puag); if(!pgphentry) { - epicsPrintf("Duplicated user '%s' in UAG '%s'\n", + errlogPrintf("Duplicated user '%s' in UAG '%s'\n", puagname->user, puag->name); } - puagname = (UAGNAME *)ellNext((ELLNODE *)puagname); + puagname = (UAGNAME *)ellNext(&puagname->node); } - puag = (UAG *)ellNext((ELLNODE *)puag); + puag = (UAG *)ellNext(&puag->node); } phag = (HAG *)ellFirst(&pasbasenew->hagList); while(phag) { @@ -132,12 +130,12 @@ long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction) while(phagname) { pgphentry = gphAdd(pasbasenew->phash,phagname->host,phag); if(!pgphentry) { - epicsPrintf("Duplicated host '%s' in HAG '%s'\n", + errlogPrintf("Duplicated host '%s' in HAG '%s'\n", phagname->host, phag->name); } - phagname = (HAGNAME *)ellNext((ELLNODE *)phagname); + phagname = (HAGNAME *)ellNext(&phagname->node); } - phag = (HAG *)ellNext((ELLNODE *)phag); + phag = (HAG *)ellNext(&phag->node); } pasbaseold = (ASBASE *)pasbase; pasbase = (ASBASE volatile *)pasbasenew; @@ -150,12 +148,12 @@ long epicsShareAPI asInitialize(ASINPUTFUNCPTR inputfunction) while(poldasg) { poldmem = (ASGMEMBER *)ellFirst(&poldasg->memberList); while(poldmem) { - pnextoldmem = (ASGMEMBER *)ellNext((ELLNODE *)poldmem); - ellDelete(&poldasg->memberList,(ELLNODE *)poldmem); + pnextoldmem = (ASGMEMBER *)ellNext(&poldmem->node); + ellDelete(&poldasg->memberList,&poldmem->node); status = asAddMemberPvt(&poldmem,poldmem->asgName); poldmem = pnextoldmem; } - poldasg = (ASG *)ellNext((ELLNODE *)poldasg); + poldasg = (ASG *)ellNext(&poldasg->node); } asFreeAll(pasbaseold); } @@ -201,7 +199,7 @@ static int myInputFunction(char *buf, int max_size) n = macExpandString(macHandle,mac_input_buffer, my_buffer,BUF_SIZE); if(n<0) { - epicsPrintf("access security: macExpandString failed\n" + errlogPrintf("access security: macExpandString failed\n" "input line: %s\n",mac_input_buffer); return(0); } @@ -241,7 +239,7 @@ long epicsShareAPI asInitFP(FILE *fp,const char *substitutions) macHandle = NULL; } else { macInstallMacros(macHandle,macPairs); - free((void *)macPairs); + free(macPairs); mac_input_buffer = mac_buffer; } } @@ -277,13 +275,13 @@ long epicsShareAPI asRemoveMember(ASMEMBERPVT *asMemberPvt) return(S_asLib_clientsExist); } if(pasgmember->pasg) { - ellDelete(&pasgmember->pasg->memberList,(ELLNODE *)pasgmember); + ellDelete(&pasgmember->pasg->memberList,&pasgmember->node); } else { errMessage(-1,"Logic error in asRemoveMember"); UNLOCK; return(-1); } - free((void *)pasgmember); + free(pasgmember); *asMemberPvt = NULL; UNLOCK; return(0); @@ -299,7 +297,7 @@ long epicsShareAPI asChangeGroup(ASMEMBERPVT *asMemberPvt,const char *newAsgName if(!pasgmember) return(S_asLib_badMember); LOCK; if(pasgmember->pasg) { - ellDelete(&pasgmember->pasg->memberList,(ELLNODE *)pasgmember); + ellDelete(&pasgmember->pasg->memberList,&pasgmember->node); } else { errMessage(-1,"Logic error in asChangeGroup"); UNLOCK; @@ -351,7 +349,7 @@ long epicsShareAPI asAddClient(ASCLIENTPVT *pasClientPvt,ASMEMBERPVT asMemberPvt pasgclient->user = user; pasgclient->host = host; LOCK; - ellAdd(&pasgmember->clientList,(ELLNODE *)pasgclient); + ellAdd(&pasgmember->clientList,&pasgclient->node); status = asComputePvt(pasgclient); UNLOCK; return(status); @@ -393,7 +391,7 @@ long epicsShareAPI asRemoveClient(ASCLIENTPVT *asClientPvt) UNLOCK; return(-1); } - ellDelete(&pasgMember->clientList,(ELLNODE *)pasgclient); + ellDelete(&pasgMember->clientList,&pasgclient->node); UNLOCK; freeListFree(freeListPvt,pasgclient); *asClientPvt = NULL; @@ -506,10 +504,10 @@ int epicsShareAPI asDumpFP( if(puagname) fprintf(fp," {"); else fprintf(fp,"\n"); while(puagname) { fprintf(fp,"%s",puagname->user); - puagname = (UAGNAME *)ellNext((ELLNODE *)puagname); + puagname = (UAGNAME *)ellNext(&puagname->node); if(puagname) fprintf(fp,","); else fprintf(fp,"}\n"); } - puag = (UAG *)ellNext((ELLNODE *)puag); + puag = (UAG *)ellNext(&puag->node); } phag = (HAG *)ellFirst(&pasbase->hagList); if(!phag) fprintf(fp,"No HAGs\n"); @@ -519,10 +517,10 @@ int epicsShareAPI asDumpFP( if(phagname) fprintf(fp," {"); else fprintf(fp,"\n"); while(phagname) { fprintf(fp,"%s",phagname->host); - phagname = (HAGNAME *)ellNext((ELLNODE *)phagname); + phagname = (HAGNAME *)ellNext(&phagname->node); if(phagname) fprintf(fp,","); else fprintf(fp,"}\n"); } - phag = (HAG *)ellNext((ELLNODE *)phag); + phag = (HAG *)ellNext(&phag->node); } pasg = (ASG *)ellFirst(&pasbase->asgList); if(!pasg) fprintf(fp,"No ASGs\n"); @@ -550,7 +548,7 @@ int epicsShareAPI asDumpFP( fprintf(fp," value=%f",pasg->pavalue[pasginp->inpIndex]); } fprintf(fp,"\n"); - pasginp = (ASGINP *)ellNext((ELLNODE *)pasginp); + pasginp = (ASGINP *)ellNext(&pasginp->node); } while(pasgrule) { int print_end_brace; @@ -570,14 +568,14 @@ int epicsShareAPI asDumpFP( if(pasguag) fprintf(fp,"\t\tUAG("); while(pasguag) { fprintf(fp,"%s",pasguag->puag->name); - pasguag = (ASGUAG *)ellNext((ELLNODE *)pasguag); + pasguag = (ASGUAG *)ellNext(&pasguag->node); if(pasguag) fprintf(fp,","); else fprintf(fp,")\n"); } pasghag = (ASGHAG *)ellFirst(&pasgrule->hagList); if(pasghag) fprintf(fp,"\t\tHAG("); while(pasghag) { fprintf(fp,"%s",pasghag->phag->name); - pasghag = (ASGHAG *)ellNext((ELLNODE *)pasghag); + pasghag = (ASGHAG *)ellNext(&pasghag->node); if(pasghag) fprintf(fp,","); else fprintf(fp,")\n"); } if(pasgrule->calc) { @@ -587,7 +585,7 @@ int epicsShareAPI asDumpFP( fprintf(fp,"\n"); } if(print_end_brace) fprintf(fp,"\t}\n"); - pasgrule = (ASGRULE *)ellNext((ELLNODE *)pasgrule); + pasgrule = (ASGRULE *)ellNext(&pasgrule->node); } pasgmember = (ASGMEMBER *)ellFirst(&pasg->memberList); if(!verbose) pasgmember = NULL; @@ -614,12 +612,12 @@ int epicsShareAPI asDumpFP( fprintf(fp," Illegal Access %d",pasgclient->access); if(clientcallback) clientcallback(pasgclient,fp); fprintf(fp,"\n"); - pasgclient = (ASGCLIENT *)ellNext((ELLNODE *)pasgclient); + pasgclient = (ASGCLIENT *)ellNext(&pasgclient->node); } - pasgmember = (ASGMEMBER *)ellNext((ELLNODE *)pasgmember); + pasgmember = (ASGMEMBER *)ellNext(&pasgmember->node); } if(print_end_brace) fprintf(fp,"}\n"); - pasg = (ASG *)ellNext((ELLNODE *)pasg); + pasg = (ASG *)ellNext(&pasg->node); } return(0); } @@ -639,7 +637,7 @@ int epicsShareAPI asDumpUagFP(FILE *fp,const char *uagname) if(!puag) fprintf(fp,"No UAGs\n"); while(puag) { if(uagname && strcmp(uagname,puag->name)!=0) { - puag = (UAG *)ellNext((ELLNODE *)puag); + puag = (UAG *)ellNext(&puag->node); continue; } fprintf(fp,"UAG(%s)",puag->name); @@ -647,10 +645,10 @@ int epicsShareAPI asDumpUagFP(FILE *fp,const char *uagname) if(puagname) fprintf(fp," {"); else fprintf(fp,"\n"); while(puagname) { fprintf(fp,"%s",puagname->user); - puagname = (UAGNAME *)ellNext((ELLNODE *)puagname); + puagname = (UAGNAME *)ellNext(&puagname->node); if(puagname) fprintf(fp,","); else fprintf(fp,"}\n"); } - puag = (UAG *)ellNext((ELLNODE *)puag); + puag = (UAG *)ellNext(&puag->node); } return(0); } @@ -670,7 +668,7 @@ int epicsShareAPI asDumpHagFP(FILE *fp,const char *hagname) if(!phag) fprintf(fp,"No HAGs\n"); while(phag) { if(hagname && strcmp(hagname,phag->name)!=0) { - phag = (HAG *)ellNext((ELLNODE *)phag); + phag = (HAG *)ellNext(&phag->node); continue; } fprintf(fp,"HAG(%s)",phag->name); @@ -678,10 +676,10 @@ int epicsShareAPI asDumpHagFP(FILE *fp,const char *hagname) if(phagname) fprintf(fp," {"); else fprintf(fp,"\n"); while(phagname) { fprintf(fp,"%s",phagname->host); - phagname = (HAGNAME *)ellNext((ELLNODE *)phagname); + phagname = (HAGNAME *)ellNext(&phagname->node); if(phagname) fprintf(fp,","); else fprintf(fp,"}\n"); } - phag = (HAG *)ellNext((ELLNODE *)phag); + phag = (HAG *)ellNext(&phag->node); } return(0); } @@ -706,7 +704,7 @@ int epicsShareAPI asDumpRulesFP(FILE *fp,const char *asgname) int print_end_brace; if(asgname && strcmp(asgname,pasg->name)!=0) { - pasg = (ASG *)ellNext((ELLNODE *)pasg); + pasg = (ASG *)ellNext(&pasg->node); continue; } fprintf(fp,"ASG(%s)",pasg->name); @@ -726,7 +724,7 @@ int epicsShareAPI asDumpRulesFP(FILE *fp,const char *asgname) fprintf(fp," INVALID"); fprintf(fp," value=%f",pasg->pavalue[pasginp->inpIndex]); fprintf(fp,"\n"); - pasginp = (ASGINP *)ellNext((ELLNODE *)pasginp); + pasginp = (ASGINP *)ellNext(&pasginp->node); } while(pasgrule) { int print_end_brace; @@ -746,14 +744,14 @@ int epicsShareAPI asDumpRulesFP(FILE *fp,const char *asgname) if(pasguag) fprintf(fp,"\t\tUAG("); while(pasguag) { fprintf(fp,"%s",pasguag->puag->name); - pasguag = (ASGUAG *)ellNext((ELLNODE *)pasguag); + pasguag = (ASGUAG *)ellNext(&pasguag->node); if(pasguag) fprintf(fp,","); else fprintf(fp,")\n"); } pasghag = (ASGHAG *)ellFirst(&pasgrule->hagList); if(pasghag) fprintf(fp,"\t\tHAG("); while(pasghag) { fprintf(fp,"%s",pasghag->phag->name); - pasghag = (ASGHAG *)ellNext((ELLNODE *)pasghag); + pasghag = (ASGHAG *)ellNext(&pasghag->node); if(pasghag) fprintf(fp,","); else fprintf(fp,")\n"); } if(pasgrule->calc) { @@ -762,10 +760,10 @@ int epicsShareAPI asDumpRulesFP(FILE *fp,const char *asgname) fprintf(fp,"\n"); } if(print_end_brace) fprintf(fp,"\t}\n"); - pasgrule = (ASGRULE *)ellNext((ELLNODE *)pasgrule); + pasgrule = (ASGRULE *)ellNext(&pasgrule->node); } if(print_end_brace) fprintf(fp,"}\n"); - pasg = (ASG *)ellNext((ELLNODE *)pasg); + pasg = (ASG *)ellNext(&pasg->node); } return(0); } @@ -789,7 +787,7 @@ int epicsShareAPI asDumpMemFP(FILE *fp,const char *asgname, while(pasg) { if(asgname && strcmp(asgname,pasg->name)!=0) { - pasg = (ASG *)ellNext((ELLNODE *)pasg); + pasg = (ASG *)ellNext(&pasg->node); continue; } fprintf(fp,"ASG(%s)\n",pasg->name); @@ -818,11 +816,11 @@ int epicsShareAPI asDumpMemFP(FILE *fp,const char *asgname, else fprintf(fp," Illegal Access %d",pasgclient->access); fprintf(fp,"\n"); - pasgclient = (ASGCLIENT *)ellNext((ELLNODE *)pasgclient); + pasgclient = (ASGCLIENT *)ellNext(&pasgclient->node); } - pasgmember = (ASGMEMBER *)ellNext((ELLNODE *)pasgmember); + pasgmember = (ASGMEMBER *)ellNext(&pasgmember->node); } - pasg = (ASG *)ellNext((ELLNODE *)pasg); + pasg = (ASG *)ellNext(&pasg->node); } return(0); } @@ -873,23 +871,23 @@ static long asAddMemberPvt(ASMEMBERPVT *pasMemberPvt,const char *asgName) pgroup = (ASG *)ellFirst(&pasbase->asgList); while(pgroup) { if(strcmp(pgroup->name,pasgmember->asgName)==0) goto got_it; - pgroup = (ASG *)ellNext((ELLNODE *)pgroup); + pgroup = (ASG *)ellNext(&pgroup->node); } /* Put it in DEFAULT*/ pgroup = (ASG *)ellFirst(&pasbase->asgList); while(pgroup) { if(strcmp(pgroup->name,DEFAULT)==0) goto got_it; - pgroup = (ASG *)ellNext((ELLNODE *)pgroup); + pgroup = (ASG *)ellNext(&pgroup->node); } errMessage(-1,"Logic Error in asAddMember"); return(-1); got_it: pasgmember->pasg = pgroup; - ellAdd(&pgroup->memberList,(ELLNODE *)pasgmember); + ellAdd(&pgroup->memberList,&pasgmember->node); pasgclient = (ASGCLIENT *)ellFirst(&pasgmember->clientList); while(pasgclient) { asComputePvt((ASCLIENTPVT)pasgclient); - pasgclient = (ASGCLIENT *)ellNext((ELLNODE *)pasgclient); + pasgclient = (ASGCLIENT *)ellNext(&pasgclient->node); } return(0); } @@ -902,7 +900,7 @@ static long asComputeAllAsgPvt(void) pasg = (ASG *)ellFirst(&pasbase->asgList); while(pasg) { asComputeAsgPvt(pasg); - pasg = (ASG *)ellNext((ELLNODE *)pasg); + pasg = (ASG *)ellNext(&pasg->node); } return(0); } @@ -928,7 +926,7 @@ static long asComputeAsgPvt(ASG *pasg) pasgrule->result = ((result>.99) && (result<1.01)) ? 1 : 0; } } - pasgrule = (ASGRULE *)ellNext((ELLNODE *)pasgrule); + pasgrule = (ASGRULE *)ellNext(&pasgrule->node); } pasg->inpChanged = FALSE; pasgmember = (ASGMEMBER *)ellFirst(&pasg->memberList); @@ -936,9 +934,9 @@ static long asComputeAsgPvt(ASG *pasg) pasgclient = (ASGCLIENT *)ellFirst(&pasgmember->clientList); while(pasgclient) { asComputePvt((ASCLIENTPVT)pasgclient); - pasgclient = (ASGCLIENT *)ellNext((ELLNODE *)pasgclient); + pasgclient = (ASGCLIENT *)ellNext(&pasgclient->node); } - pasgmember = (ASGMEMBER *)ellNext((ELLNODE *)pasgmember); + pasgmember = (ASGMEMBER *)ellNext(&pasgmember->node); } return(0); } @@ -977,7 +975,7 @@ static long asComputePvt(ASCLIENTPVT asClientPvt) pgphentry = gphFind(pasbase->phash,pasgclient->user,puag); if(pgphentry) goto check_hag; } - pasguag = (ASGUAG *)ellNext((ELLNODE *)pasguag); + pasguag = (ASGUAG *)ellNext(&pasguag->node); } goto next_rule; } @@ -993,7 +991,7 @@ check_hag: pgphentry=gphFind(pasbase->phash,pasgclient->host,phag); if(pgphentry) goto check_calc; } - pasghag = (ASGHAG *)ellNext((ELLNODE *)pasghag); + pasghag = (ASGHAG *)ellNext(&pasghag->node); } goto next_rule; } @@ -1004,7 +1002,7 @@ check_calc: trapMask = pasgrule->trapMask; } next_rule: - pasgrule = (ASGRULE *)ellNext((ELLNODE *)pasgrule); + pasgrule = (ASGRULE *)ellNext(&pasgrule->node); } pasgclient->access = access; pasgclient->trapMask = trapMask; @@ -1031,70 +1029,70 @@ void asFreeAll(ASBASE *pasbase) while(puag) { puagname = (UAGNAME *)ellFirst(&puag->list); while(puagname) { - pnext = ellNext((ELLNODE *)puagname); - ellDelete(&puag->list,(ELLNODE *)puagname); - free((void *)puagname); + pnext = ellNext(&puagname->node); + ellDelete(&puag->list,&puagname->node); + free(puagname); puagname = pnext; } - pnext = ellNext((ELLNODE *)puag); - ellDelete(&pasbase->uagList,(ELLNODE *)puag); - free((void *)puag); + pnext = ellNext(&puag->node); + ellDelete(&pasbase->uagList,&puag->node); + free(puag); puag = pnext; } phag = (HAG *)ellFirst(&pasbase->hagList); while(phag) { phagname = (HAGNAME *)ellFirst(&phag->list); while(phagname) { - pnext = ellNext((ELLNODE *)phagname); - ellDelete(&phag->list,(ELLNODE *)phagname); - free((void *)phagname); + pnext = ellNext(&phagname->node); + ellDelete(&phag->list,&phagname->node); + free(phagname); phagname = pnext; } - pnext = ellNext((ELLNODE *)phag); - ellDelete(&pasbase->hagList,(ELLNODE *)phag); - free((void *)phag); + pnext = ellNext(&phag->node); + ellDelete(&pasbase->hagList,&phag->node); + free(phag); phag = pnext; } pasg = (ASG *)ellFirst(&pasbase->asgList); while(pasg) { - free((void *)pasg->pavalue); + free(pasg->pavalue); pasginp = (ASGINP *)ellFirst(&pasg->inpList); while(pasginp) { - pnext = ellNext((ELLNODE *)pasginp); - ellDelete(&pasg->inpList,(ELLNODE *)pasginp); - free((void *)pasginp); + pnext = ellNext(&pasginp->node); + ellDelete(&pasg->inpList,&pasginp->node); + free(pasginp); pasginp = pnext; } pasgrule = (ASGRULE *)ellFirst(&pasg->ruleList); while(pasgrule) { - free((void *)pasgrule->calc); - free((void *)pasgrule->rpcl); + free(pasgrule->calc); + free(pasgrule->rpcl); pasguag = (ASGUAG *)ellFirst(&pasgrule->uagList); while(pasguag) { - pnext = ellNext((ELLNODE *)pasguag); - ellDelete(&pasgrule->uagList,(ELLNODE *)pasguag); - free((void *)pasguag); + pnext = ellNext(&pasguag->node); + ellDelete(&pasgrule->uagList,&pasguag->node); + free(pasguag); pasguag = pnext; } pasghag = (ASGHAG *)ellFirst(&pasgrule->hagList); while(pasghag) { - pnext = ellNext((ELLNODE *)pasghag); - ellDelete(&pasgrule->hagList,(ELLNODE *)pasghag); - free((void *)pasghag); + pnext = ellNext(&pasghag->node); + ellDelete(&pasgrule->hagList,&pasghag->node); + free(pasghag); pasghag = pnext; } - pnext = ellNext((ELLNODE *)pasgrule); - ellDelete(&pasg->ruleList,(ELLNODE *)pasgrule); - free((void *)pasgrule); + pnext = ellNext(&pasgrule->node); + ellDelete(&pasg->ruleList,&pasgrule->node); + free(pasgrule); pasgrule = pnext; } - pnext = ellNext((ELLNODE *)pasg); - ellDelete(&pasbase->asgList,(ELLNODE *)pasg); - free((void *)pasg); + pnext = ellNext(&pasg->node); + ellDelete(&pasbase->asgList,&pasg->node); + free(pasg); pasg = pnext; } gphFreeMem(pasbase->phash); - free((void *)pasbase); + free(pasbase); } /*Beginning of routines called by lex code*/ @@ -1115,17 +1113,17 @@ static UAG *asUagAdd(const char *uagName) errlogPrintf("Duplicate User Access Group named '%s'\n", uagName); return(NULL); } - pnext = (UAG *)ellNext((ELLNODE *)pnext); + pnext = (UAG *)ellNext(&pnext->node); } puag = asCalloc(1,sizeof(UAG)+strlen(uagName)+1); ellInit(&puag->list); puag->name = (char *)(puag+1); strcpy(puag->name,uagName); if(pnext==NULL) { /*Add to end of list*/ - ellAdd(&pasbase->uagList,(ELLNODE *)puag); + ellAdd(&pasbase->uagList,&puag->node); } else { - pprev = (UAG *)ellPrevious((ELLNODE *)pnext); - ellInsert(&pasbase->uagList,(ELLNODE *)pprev,(ELLNODE *)puag); + pprev = (UAG *)ellPrevious(&pnext->node); + ellInsert(&pasbase->uagList,&pprev->node,&puag->node); } return(puag); } @@ -1138,7 +1136,7 @@ static long asUagAddUser(UAG *puag,const char *user) puagname = asCalloc(1,sizeof(UAGNAME)+strlen(user)+1); puagname->user = (char *)(puagname+1); strcpy(puagname->user,user); - ellAdd(&puag->list,(ELLNODE *)puagname); + ellAdd(&puag->list,&puagname->node); return(0); } @@ -1159,17 +1157,17 @@ static HAG *asHagAdd(const char *hagName) errlogPrintf("Duplicate Host Access Group named '%s'\n", hagName); return(NULL); } - pnext = (HAG *)ellNext((ELLNODE *)pnext); + pnext = (HAG *)ellNext(&pnext->node); } phag = asCalloc(1,sizeof(HAG)+strlen(hagName)+1); ellInit(&phag->list); phag->name = (char *)(phag+1); strcpy(phag->name,hagName); if(pnext==NULL) { /*Add to end of list*/ - ellAdd(&pasbase->hagList,(ELLNODE *)phag); + ellAdd(&pasbase->hagList,&phag->node); } else { - pprev = (HAG *)ellPrevious((ELLNODE *)pnext); - ellInsert(&pasbase->hagList,(ELLNODE *)pprev,(ELLNODE *)phag); + pprev = (HAG *)ellPrevious(&pnext->node); + ellInsert(&pasbase->hagList,&pprev->node,&phag->node); } return(phag); } @@ -1186,7 +1184,7 @@ static long asHagAddHost(HAG *phag,const char *host) for (i = 0; i < len; i++) { phagname->host[i] = (char)tolower((int)host[i]); } - ellAdd(&phag->list, (ELLNODE *)phagname); + ellAdd(&phag->list, &phagname->node); return 0; } @@ -1212,7 +1210,7 @@ static ASG *asAsgAdd(const char *asgName) errlogPrintf("Duplicate Access Security Group named '%s'\n", asgName); return(NULL); } - pnext = (ASG *)ellNext((ELLNODE *)pnext); + pnext = (ASG *)ellNext(&pnext->node); } pasg = asCalloc(1,sizeof(ASG)+strlen(asgName)+1); ellInit(&pasg->inpList); @@ -1221,10 +1219,10 @@ static ASG *asAsgAdd(const char *asgName) pasg->name = (char *)(pasg+1); strcpy(pasg->name,asgName); if(pnext==NULL) { /*Add to end of list*/ - ellAdd(&pasbase->asgList,(ELLNODE *)pasg); + ellAdd(&pasbase->asgList,&pasg->node); } else { - pprev = (ASG *)ellPrevious((ELLNODE *)pnext); - ellInsert(&pasbase->asgList,(ELLNODE *)pprev,(ELLNODE *)pasg); + pprev = (ASG *)ellPrevious(&pnext->node); + ellInsert(&pasbase->asgList,&pprev->node,&pasg->node); } return(pasg); } @@ -1239,7 +1237,7 @@ static long asAsgAddInp(ASG *pasg,const char *inp,int inpIndex) strcpy(pasginp->inp,inp); pasginp->pasg = pasg; pasginp->inpIndex = inpIndex; - ellAdd(&pasg->inpList,(ELLNODE *)pasginp); + ellAdd(&pasg->inpList,&pasginp->node); return(0); } @@ -1254,7 +1252,7 @@ static ASGRULE *asAsgAddRule(ASG *pasg,asAccessRights access,int level) pasgrule->level = level; ellInit(&pasgrule->uagList); ellInit(&pasgrule->hagList); - ellAdd(&pasg->ruleList,(ELLNODE *)pasgrule); + ellAdd(&pasg->ruleList,&pasgrule->node); return(pasgrule); } @@ -1265,48 +1263,56 @@ static long asAsgAddRuleOptions(ASGRULE *pasgrule,int trapMask) return(0); } -static long asAsgRuleUagAdd(ASGRULE *pasgrule,const char *name) +static long asAsgRuleUagAdd(ASGRULE *pasgrule, const char *name) { ASGUAG *pasguag; UAG *puag; ASBASE *pasbase = (ASBASE *)pasbasenew; - if(!pasgrule) return(0); + if (!pasgrule) + return 0; + puag = (UAG *)ellFirst(&pasbase->uagList); - while(puag) { - if(strcmp(puag->name,name)==0) break; - puag = (UAG *)ellNext((ELLNODE *)puag); + while (puag) { + if (strcmp(puag->name, name)==0) + break; + puag = (UAG *)ellNext(&puag->node); } - if(!puag){ - errlogPrintf("No User Access Group named '%s' defined\n", name); - return(S_asLib_noUag); + if (!puag){ + errlogPrintf("No User Access Group named '%s' defined\n", name); + return S_asLib_noUag; } - pasguag = asCalloc(1,sizeof(ASGUAG)); + + pasguag = asCalloc(1, sizeof(ASGUAG)); pasguag->puag = puag; - ellAdd(&pasgrule->uagList,(ELLNODE *)pasguag); - return(0); + ellAdd(&pasgrule->uagList, &pasguag->node); + return 0; } -static long asAsgRuleHagAdd(ASGRULE *pasgrule,const char *name) +static long asAsgRuleHagAdd(ASGRULE *pasgrule, const char *name) { ASGHAG *pasghag; HAG *phag; ASBASE *pasbase = (ASBASE *)pasbasenew; - if(!pasgrule) return(0); + if (!pasgrule) + return 0; + phag = (HAG *)ellFirst(&pasbase->hagList); - while(phag) { - if(strcmp(phag->name,name)==0) break; - phag = (HAG *)ellNext((ELLNODE *)phag); + while (phag) { + if (strcmp(phag->name, name)==0) + break; + phag = (HAG *)ellNext(&phag->node); } - if(!phag){ - errlogPrintf("No Host Access Group named '%s' defined\n", name); - return(S_asLib_noHag); + if (!phag){ + errlogPrintf("No Host Access Group named '%s' defined\n", name); + return S_asLib_noHag; } - pasghag = asCalloc(1,sizeof(ASGHAG)); + + pasghag = asCalloc(1, sizeof(ASGHAG)); pasghag->phag = phag; - ellAdd(&pasgrule->hagList,(ELLNODE *)pasghag); - return(0); + ellAdd(&pasgrule->hagList, &pasghag->node); + return 0; } static long asAsgRuleCalc(ASGRULE *pasgrule,const char *calc) @@ -1323,8 +1329,8 @@ static long asAsgRuleCalc(ASGRULE *pasgrule,const char *calc) pasgrule->rpcl = asCalloc(1, INFIX_TO_POSTFIX_SIZE(insize)); status = postfix(pasgrule->calc, pasgrule->rpcl, &err); if(status) { - free((void *)pasgrule->calc); - free((void *)pasgrule->rpcl); + free(pasgrule->calc); + free(pasgrule->rpcl); pasgrule->calc = NULL; pasgrule->rpcl = NULL; status = S_asLib_badCalc; @@ -1334,8 +1340,8 @@ static long asAsgRuleCalc(ASGRULE *pasgrule,const char *calc) calcArgUsage(pasgrule->rpcl, &pasgrule->inpUsed, &stores); /* Until someone proves stores are not dangerous, don't allow them */ if (stores) { - free((void *)pasgrule->calc); - free((void *)pasgrule->rpcl); + free(pasgrule->calc); + free(pasgrule->rpcl); pasgrule->calc = NULL; pasgrule->rpcl = NULL; status = S_asLib_badCalc; diff --git a/src/libCom/as/asLib_lex.l b/src/libCom/as/asLib_lex.l index 90e1b55bb..924105c14 100644 --- a/src/libCom/as/asLib_lex.l +++ b/src/libCom/as/asLib_lex.l @@ -3,18 +3,21 @@ * National Laboratory. * Copyright (c) 2002 The Regents of the University of California, as * Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. +* EPICS BASE is distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. \*************************************************************************/ -digit [0-9] -name [a-zA-Z0-9_\-:\.\[\]<>;] -notquote [^\"] -escapequote \\\" -string {notquote}|{escapequote} +newline "\n" +backslash "\\" +doublequote "\"" +comment "#" whitespace [ \t\r] +escape {backslash}. +stringchar [^"\n\\] + +name [a-zA-Z0-9_\-+:.\[\]<>;] +digit [0-9] punctuation [(){},] -link [A-L] +link [A-L] %{ static ASINPUTFUNCPTR *my_yyinput; @@ -37,46 +40,55 @@ HAG { return(tokenHAG); } ASG { return(tokenASG); } RULE { return(tokenRULE); } CALC { return(tokenCALC); } + INP{link} { yylval.Int = (unsigned char)yytext[3]; yylval.Int -= 'A'; return(tokenINP); - } +} {digit}+ { /*integer*/ yylval.Int = atoi((char *)yytext); return(tokenINTEGER); - } +} {name}+ { /*unquoted string*/ yylval.Str=asStrdup(yytext); return(tokenSTRING); - } +} -\"{string}*\" { /*quoted string*/ - /* making sure that neither double quote gets passed back */ +{doublequote}({stringchar}|{escape})*{doublequote} { /* quoted string */ yylval.Str=asStrdup(yytext+1); yylval.Str[strlen(yylval.Str)-1] = '\0'; return(tokenSTRING); - } +} + +{doublequote}({stringchar}|{escape})*{newline} { /* bad string */ + yyerror("Newline in quoted string, closing quote missing"); +} {punctuation} { return(yytext[0]); } -^#.* +{newline} { line_num++; } + +{comment}.* ; {whitespace} ; -\n { line_num ++;} - . { - char message[20]; + char message[40]; YY_BUFFER_STATE *dummy=0; - sprintf(message,"invalid character '%c'",yytext[0]); + if (isprint((int) yytext[0])) { + sprintf(message, "Invalid character '%c'", yytext[0]); + } + else { + sprintf(message, "Invalid character 0x%2.2x", yytext[0]); + } yyerror(message); /*The following suppress compiler warning messages*/ if (0) yyunput('c',(unsigned char *) message); if (0) yy_switch_to_buffer(*dummy); - } +} %% diff --git a/src/libCom/bucketLib/bucketLib.h b/src/libCom/bucketLib/bucketLib.h index e232d706e..60d73b459 100644 --- a/src/libCom/bucketLib/bucketLib.h +++ b/src/libCom/bucketLib/bucketLib.h @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Jeffrey O. Hill * hill@luke.lanl.gov * (505) 665 1831 diff --git a/src/libCom/calc/calcPerform.c b/src/libCom/calc/calcPerform.c index e53d860e2..c0f4aebb8 100644 --- a/src/libCom/calc/calcPerform.c +++ b/src/libCom/calc/calcPerform.c @@ -6,7 +6,6 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ */ /* * Author: Julie Sander and Bob Dalesio * Date: 07-27-87 @@ -155,7 +154,7 @@ epicsShareFunc long break; case ABS_VAL: - if (*ptop < 0.0) *ptop = - *ptop; + *ptop = fabs(*ptop); break; case EXP: diff --git a/src/libCom/calc/postfix.c b/src/libCom/calc/postfix.c index 2f51549d0..463ceea82 100644 --- a/src/libCom/calc/postfix.c +++ b/src/libCom/calc/postfix.c @@ -6,8 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Subroutines used to convert an infix expression to a postfix expression * * Original Author: Bob Dalesio diff --git a/src/libCom/cppStd/Makefile b/src/libCom/cppStd/Makefile index 989b87eb0..782c4da25 100644 --- a/src/libCom/cppStd/Makefile +++ b/src/libCom/cppStd/Makefile @@ -10,5 +10,4 @@ SRC_DIRS += $(LIBCOM)/cppStd INC += epicsAlgorithm.h INC += epicsExcept.h -INC += epicsMemory.h diff --git a/src/libCom/cppStd/epicsExcept.h b/src/libCom/cppStd/epicsExcept.h index 50245ecea..e68999735 100644 --- a/src/libCom/cppStd/epicsExcept.h +++ b/src/libCom/cppStd/epicsExcept.h @@ -7,7 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -// $Revision-Id$ // Author: Andrew Johnson & Jeff Hill // Date: December 2000 diff --git a/src/libCom/cppStd/epicsMemory.h b/src/libCom/cppStd/epicsMemory.h deleted file mode 100644 index 49c9ebecc..000000000 --- a/src/libCom/cppStd/epicsMemory.h +++ /dev/null @@ -1,115 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ -// epicsMemoryH.h -// Author: Jeff Hill -// Date: March 2001 - -#ifndef epicsMemoryH -#define epicsMemoryH - -enum epics_auto_ptr_type { - eapt_scalar, eapt_array }; - -template < class T, epics_auto_ptr_type PT = eapt_scalar > -class epics_auto_ptr { -public: - typedef T element_type; - explicit epics_auto_ptr ( T * p = 0 ) throw (); - epics_auto_ptr ( epics_auto_ptr & rhs ) throw (); - ~epics_auto_ptr() throw (); - epics_auto_ptr & operator = ( epics_auto_ptr & rhs ) throw (); - T & operator * () const throw (); - T * operator -> () const throw (); - T & operator [] ( unsigned index ) const throw (); - T * get () const throw (); - T * release () throw (); - void reset ( T * p = 0 ) throw (); -private: - T * p; - void destroyTarget () throw (); -}; - -template < class T, epics_auto_ptr_type PT > -inline epics_auto_ptr::epics_auto_ptr ( T *pIn ) throw () : -p ( pIn ) {} - -template < class T, epics_auto_ptr_type PT > -inline epics_auto_ptr:: - epics_auto_ptr ( epics_auto_ptr & ap ) throw () : - p ( ap.release() ) {} - -template < class T, epics_auto_ptr_type PT > -inline void epics_auto_ptr::destroyTarget () throw () -{ - if ( PT == eapt_scalar ) { - delete this->p; - } - else { - delete [] this->p; - } -} - -template < class T, epics_auto_ptr_type PT > -inline epics_auto_ptr::~epics_auto_ptr () throw () -{ - this->destroyTarget (); -} - -template < class T, epics_auto_ptr_type PT > -inline epics_auto_ptr & epics_auto_ptr::operator = - ( epics_auto_ptr & rhs ) throw () -{ - if ( &rhs != this) { - this->destroyTarget (); - this->p = rhs.release (); - } - return *this; -} - -template < class T, epics_auto_ptr_type PT > -inline T & epics_auto_ptr::operator * () const throw() -{ - return * this->p; -} - -template < class T, epics_auto_ptr_type PT > -inline T * epics_auto_ptr::operator -> () const throw () -{ - return this->p; -} - -template < class T, epics_auto_ptr_type PT > -T & epics_auto_ptr::operator [] ( unsigned index ) const throw () -{ - return this->p [ index ]; -} - -template < class T, epics_auto_ptr_type PT > -inline T * epics_auto_ptr::get () const throw () -{ - return this->p; -} - -template < class T, epics_auto_ptr_type PT > -inline T * epics_auto_ptr::release () throw () -{ - T *pTmp = this->p; - this->p = 0; - return pTmp; -} - -template < class T, epics_auto_ptr_type PT > -inline void epics_auto_ptr::reset ( T * pIn ) throw () -{ - this->destroyTarget (); - this->p = pIn; -} - -#endif // ifndef epicsMemoryH diff --git a/src/libCom/cvtFast/cvtFast.c b/src/libCom/cvtFast/cvtFast.c index 5fef677a2..2f29dd51f 100644 --- a/src/libCom/cvtFast/cvtFast.c +++ b/src/libCom/cvtFast/cvtFast.c @@ -7,7 +7,6 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$*/ /* Very efficient routines to convert numbers to strings * Author: Bob Dalesio wrote cvtFloatToString (called FF_TO_STR) * Code is same for cvtDoubleToString diff --git a/src/libCom/cvtFast/cvtFast.h b/src/libCom/cvtFast/cvtFast.h index fb1971b96..d2eb86ddf 100644 --- a/src/libCom/cvtFast/cvtFast.h +++ b/src/libCom/cvtFast/cvtFast.h @@ -7,7 +7,7 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ +/* * Very efficient routines to convert numbers to strings * * Author: Bob Dalesio wrote cvtFloatToString (called FF_TO_STR) diff --git a/src/libCom/cxxTemplates/Makefile b/src/libCom/cxxTemplates/Makefile index b15464aef..c67668f55 100644 --- a/src/libCom/cxxTemplates/Makefile +++ b/src/libCom/cxxTemplates/Makefile @@ -12,12 +12,9 @@ INC += resourceLib.h INC += tsDLList.h INC += tsSLList.h INC += tsMinMax.h -INC += tsBTree.h INC += tsFreeList.h INC += epicsSingleton.h INC += epicsGuard.h -INC += epicsOnce.h Com_SRCS += resourceLib.cpp -Com_SRCS += epicsOnce.cpp Com_SRCS += epicsSingletonMutex.cpp diff --git a/src/libCom/cxxTemplates/epicsGuard.h b/src/libCom/cxxTemplates/epicsGuard.h index a51411bc6..f0aa401a5 100644 --- a/src/libCom/cxxTemplates/epicsGuard.h +++ b/src/libCom/cxxTemplates/epicsGuard.h @@ -16,10 +16,7 @@ #endif /* - * $Revision-Id$ - * * Author: Jeffrey O. Hill - * */ template < class T > class epicsGuardRelease; @@ -30,6 +27,7 @@ template < class T > class epicsGuardRelease; template < class T > class epicsGuard { public: + typedef epicsGuardRelease release_t; epicsGuard ( T & ); void assertIdenticalMutex ( const T & ) const; ~epicsGuard (); @@ -46,6 +44,7 @@ private: template < class T > class epicsGuardRelease { public: + typedef epicsGuard guard_t; epicsGuardRelease ( epicsGuard < T > & ); ~epicsGuardRelease (); private: diff --git a/src/libCom/cxxTemplates/epicsOnce.cpp b/src/libCom/cxxTemplates/epicsOnce.cpp deleted file mode 100644 index e911314f0..000000000 --- a/src/libCom/cxxTemplates/epicsOnce.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -/* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * - * Author Jeff Hill - * johill@lanl.gov - * 505 665 1831 - */ - -#define epicsExportSharedSymbols -#include "epicsMutex.h" -#include "epicsSingleton.h" -#include "epicsGuard.h" -#include "epicsOnce.h" -#include "tsFreeList.h" - -class epicsOnceImpl : public epicsOnce { -public: - epicsOnceImpl ( epicsOnceNotify & notifyIn ); - void * operator new ( size_t size ); - void operator delete ( void * pCadaver, size_t size ); -private: - epicsSingleton < epicsMutex > :: reference mutexRef; - epicsOnceNotify & notify; - bool onceFlag; - void destroy (); - void once (); - epicsOnceImpl ( epicsOnceImpl & ); // disabled - epicsOnceImpl & operator = ( epicsOnceImpl & ); // disabled - static epicsSingleton < epicsMutex > mutex; - static epicsSingleton < tsFreeList < class epicsOnceImpl, 16 > > freeList; -}; - -#ifdef _MSC_VER -# pragma warning ( push ) -# pragma warning ( disable:4660 ) -#endif - -template class epicsSingleton < epicsMutex >; -template class tsFreeList < class epicsOnceImpl, 16 >; -template class epicsSingleton < tsFreeList < class epicsOnceImpl, 16 > >; - -#ifdef _MSC_VER -# pragma warning ( pop ) -#endif - -epicsSingleton < epicsMutex > epicsOnceImpl::mutex; -epicsSingleton < tsFreeList < class epicsOnceImpl, 16 > > epicsOnceImpl::freeList; - -inline void * epicsOnceImpl::operator new ( size_t size ) -{ - epicsSingleton < tsFreeList < class epicsOnceImpl, 16 > > :: reference ref = - epicsOnceImpl::freeList.getReference (); - return ref->allocate ( size ); -} - -inline void epicsOnceImpl::operator delete ( void *pCadaver, size_t size ) -{ - epicsSingleton < tsFreeList < class epicsOnceImpl, 16 > > :: reference ref = - epicsOnceImpl::freeList.getReference (); - ref->release ( pCadaver, size ); -} - -inline epicsOnceImpl::epicsOnceImpl ( epicsOnceNotify & notifyIn ) : -mutexRef ( epicsOnceImpl::mutex.getReference() ), notify ( notifyIn ), onceFlag ( false ) -{ -} - -void epicsOnceImpl::once () -{ - epicsGuard < epicsMutex > guard ( *this->mutexRef ); - if ( ! this->onceFlag ) { - this->notify.initialize (); - this->onceFlag = true; - } -} - -void epicsOnceImpl::destroy () -{ - delete this; -} - -epicsOnce & epicsOnce::create ( epicsOnceNotify & notifyIn ) -{ - // free list throws exception in no memory situation - return * new epicsOnceImpl ( notifyIn ); -} - -epicsOnce::~epicsOnce () -{ -} - -epicsOnceNotify::~epicsOnceNotify () -{ -} - diff --git a/src/libCom/cxxTemplates/epicsOnce.h b/src/libCom/cxxTemplates/epicsOnce.h deleted file mode 100644 index 28708dc77..000000000 --- a/src/libCom/cxxTemplates/epicsOnce.h +++ /dev/null @@ -1,46 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ -/* - * $Revision-Id$ - * - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * - * - * Author Jeff Hill - * johill@lanl.gov - * 505 665 1831 - */ - -#ifndef epicsOnceh -#define epicsOnceh - -#include "shareLib.h" - -class epicsOnceNotify { -public: - epicsShareFunc virtual ~epicsOnceNotify (); - virtual void initialize () = 0; -}; - -class epicsOnce { -public: - epicsShareFunc static epicsOnce & create ( epicsOnceNotify & notifyIn ); - virtual ~epicsOnce (); // use destroy - virtual void once () = 0; // run notifyIn.initialize() once only - virtual void destroy () = 0; // destroy this object -}; - -#endif // epicsOnceh - diff --git a/src/libCom/cxxTemplates/epicsSingleton.h b/src/libCom/cxxTemplates/epicsSingleton.h index cece8007c..2c63d3ff7 100644 --- a/src/libCom/cxxTemplates/epicsSingleton.h +++ b/src/libCom/cxxTemplates/epicsSingleton.h @@ -9,10 +9,7 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Jeffrey O. Hill - * */ #ifndef epicsSingleton_h diff --git a/src/libCom/cxxTemplates/epicsSingletonBase.cpp b/src/libCom/cxxTemplates/epicsSingletonBase.cpp index 438f093c3..bf9a466d4 100644 --- a/src/libCom/cxxTemplates/epicsSingletonBase.cpp +++ b/src/libCom/cxxTemplates/epicsSingletonBase.cpp @@ -8,10 +8,7 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Jeffrey O. Hill - * */ #include diff --git a/src/libCom/cxxTemplates/epicsSingletonMutex.cpp b/src/libCom/cxxTemplates/epicsSingletonMutex.cpp index 02d5d63c1..8cd69d969 100644 --- a/src/libCom/cxxTemplates/epicsSingletonMutex.cpp +++ b/src/libCom/cxxTemplates/epicsSingletonMutex.cpp @@ -9,10 +9,7 @@ \*************************************************************************/ /* - * $Revision-Id$ - * * Author: Jeff O. Hill - * */ #include diff --git a/src/libCom/cxxTemplates/resourceLib.cpp b/src/libCom/cxxTemplates/resourceLib.cpp index e86f0ed19..f3a9a9993 100644 --- a/src/libCom/cxxTemplates/resourceLib.cpp +++ b/src/libCom/cxxTemplates/resourceLib.cpp @@ -8,14 +8,6 @@ \*************************************************************************/ /* - * $Revision-Id$ - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * * Author: Jeff Hill */ diff --git a/src/libCom/cxxTemplates/resourceLib.h b/src/libCom/cxxTemplates/resourceLib.h index 4c79f6cca..7b61e238d 100644 --- a/src/libCom/cxxTemplates/resourceLib.h +++ b/src/libCom/cxxTemplates/resourceLib.h @@ -7,8 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * General hash table templates for fast indexing of resources * of any base resource type and any resource identifier type. Fast * indexing is implemented with a hash lookup. The identifier type diff --git a/src/libCom/cxxTemplates/test/Makefile b/src/libCom/cxxTemplates/test/Makefile index 847f1795e..61d807c65 100644 --- a/src/libCom/cxxTemplates/test/Makefile +++ b/src/libCom/cxxTemplates/test/Makefile @@ -3,8 +3,7 @@ # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. -# EPICS BASE Versions 3.13.7 -# and higher are distributed subject to a Software License Agreement found +# EPICS BASE is distributed subject to a Software License Agreement found # in file LICENSE that is included with this distribution. #************************************************************************* @@ -13,36 +12,22 @@ TOP=../../../.. include $(TOP)/configure/CONFIG resourceLibTest_SRCS += resourceLibTest.cc -PROD_HOST += resourceLibTest -OBJS_IOC += resourceLibTest +TESTPROD_HOST += resourceLibTest tsDLListBench_SRCS += tsDLListBench.cc -PROD_HOST += tsDLListBench -OBJS_IOC += tsDLListBench +TESTPROD_HOST += tsDLListBench tsDLListTest_SRCS += tsDLListTest.cc -PROD_HOST += tsDLListTest -OBJS_IOC += tsDLListTest +TESTPROD_HOST += tsDLListTest tsSLListBench_SRCS += tsSLListBench.cc -PROD_HOST += tsSLListBench -OBJS_IOC += tsSLListBench +TESTPROD_HOST += tsSLListBench tsSLListTest_SRCS += tsSLListTest.cc -PROD_HOST += tsSLListTest -OBJS_IOC += tsSLListTest +TESTPROD_HOST += tsSLListTest minmaxTest_SRCS += minmaxTest.cc -PROD_HOST += minmaxTest -OBJS_IOC += minmaxTest - -tsBTreeTest_SRCS += tsBTreeTest.cc -PROD_HOST += tsBTreeTest -OBJS_IOC += tsBTreeTest - -tsBTreeBench_SRCS += tsBTreeBench.cc -PROD_HOST += tsBTreeBench -OBJS_IOC += tsBTreeBench +TESTPROD_HOST += minmaxTest PROD_LIBS = Com diff --git a/src/libCom/cxxTemplates/test/tsBTreeBench.cc b/src/libCom/cxxTemplates/test/tsBTreeBench.cc deleted file mode 100644 index b54837001..000000000 --- a/src/libCom/cxxTemplates/test/tsBTreeBench.cc +++ /dev/null @@ -1,95 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -#include -#include -#include -#include -#include - -#include "tsBTree.h" -#include "tsSLList.h" - -class A : public tsBTreeNode, public tsSLNode { -public: - A() - { - key = (unsigned) rand(); - } - - btCmp tsBTreeCompare(const A &item) const - { - if (this->key<=item.key) { - return btLessOrEqual; - } - else { - return btGreater; - } - } - - void show() - { - printf("A: %u\n", key); - } -private: - unsigned key; -}; - -#define LOOPCOUNT 10000u - -int main () -{ - unsigned i; - tsBTree tree; - tsSLList list; - A *pA; - A a; - clock_t clk; - clock_t diff; - double delay; - - tree.insert (a); - list.add (a); - - for (i=0u; i -#include -#include - -#include "tsBTree.h" - -#define verify(exp) ((exp) ? (void)0 : \ - epicsAssert(__FILE__, __LINE__, #exp, epicsAssertAuthor)) - -class A : public tsBTreeNode { -public: - A(const char *pNameIn) : pName(pNameIn) {} - - btCmp tsBTreeCompare(const A &item) const - { - int cmp = strcmp(this->pName, item.pName); - if (cmp<=0) { - return btLessOrEqual; - } - else { - return btGreater; - } - } - - void show() - { - printf("A: %s\n", pName); - } -private: - const char *pName; -}; - -int main () -{ - tsBTree tree; - A a0 ("fred"); - A a1 ("jane"); - A a2 ("jane0"); - A a3 ("bill"); - A a4 ("jane"); - A a5 ("dan"); - A a6 ("joe"); - - tree.insert (a0); - tree.insert (a1); - tree.insert (a2); - tree.insert (a3); - tree.insert (a4); - tree.insert (a5); - - tree.traverse (&A::show); - - verify (tree.remove(a6)==tsbtrrNotFound); - tree.insert (a6); - verify (tree.remove(a6)==tsbtrrFound); - verify (tree.remove(a5)==tsbtrrFound); - verify (tree.remove(a5)==tsbtrrNotFound); - verify (!tree.verify(a5)); - verify (tree.verify(a4)); - verify (tree.remove(a0)==tsbtrrFound); - verify (!tree.verify(a0)); - verify (tree.remove(a0)==tsbtrrNotFound); - tree.insert (a5); - verify (tree.verify(a5)); - verify (tree.verify(a2)); - verify (tree.remove(a2)==tsbtrrFound); - verify (!tree.verify(a2)); - verify (tree.remove(a2)==tsbtrrNotFound); - verify (tree.verify(a5)); - verify (tree.remove(a5)==tsbtrrFound); - verify (tree.remove(a5)==tsbtrrNotFound); - verify (tree.remove(a0)==tsbtrrNotFound); - verify (tree.remove(a4)==tsbtrrFound); - verify (tree.remove(a3)==tsbtrrFound); - verify (tree.remove(a4)==tsbtrrNotFound); - verify (tree.remove(a1)==tsbtrrFound); - - tree.traverse (&A::show); - - return 0; -} - - diff --git a/src/libCom/cxxTemplates/tsBTree.h b/src/libCom/cxxTemplates/tsBTree.h deleted file mode 100644 index 29b7b9c9d..000000000 --- a/src/libCom/cxxTemplates/tsBTree.h +++ /dev/null @@ -1,279 +0,0 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/ - -#ifndef assert // allow use of epicsAssert.h -#include -#endif -#include "locationException.h" - -// -// tsBTreeRMRet -// -enum tsbtRR {tsbtrrNotFound, tsbtrrFound}; -template -class tsBTreeRMRet { -public: - tsBTreeRMRet (tsbtRR foundItIn, T *pNewSegIn) : - foundIt(foundItIn), pNewSeg(pNewSegIn) {} - - operator tsbtRR () - { - return this->foundIt; - } - - const tsbtRR foundIt; - T * const pNewSeg; -}; - -template class tsBTree; - -// -// tsBTreeNode -// -template -class tsBTreeNode -{ -friend class tsBTree; -public: - // - // exceptions - // - class invalid_btCmp {}; - - - // - // when someone copies into a class deriving from this - // do _not_ change the node pointers - // - void operator = (tsBTreeNode &) {} - - enum btCmp {btGreater, btLessOrEqual}; - - // - // class T must supply this member function which - // comapres *this with item - // - // returns: - // btGreater *this is greater than item - // btLessOrEqual *this is less than or equal to item - // - // btCmp tsBTreeCompare(const T &item) const; - // - -private: - T *pLeft; - T *pRight; - - // - // run callback for evey item in the B-Treee in sort order - // - static void traverse (T &item, void (T::*pCallBack)()) - { - tsBTreeNode &node = item; - if (node.pLeft) { - tsBTreeNode::traverse (*node.pLeft, pCallBack); - } - (item.*pCallBack)(); - if (node.pRight) { - tsBTreeNode::traverse (*node.pRight, pCallBack); - } - } - - // - // NOTE: - // no change to item.pLeft and item.pRight here - // so that an segment of a tree can be inserted - // - static void insert(T &self, T &item) - { - tsBTreeNode &node = self; - btCmp result = item.tsBTreeCompare(self); - if (result==btLessOrEqual) { - if (node.pLeft) { - tsBTreeNode::insert (*node.pLeft, item); - } - else { - node.pLeft = &item; - } - } - else if(result==btGreater) { - if (node.pRight) { - tsBTreeNode::insert (*node.pRight, item); - } - else { - node.pRight = &item; - } - } - else { - throwWithLocation ( invalid_btCmp () ); - } - } - - // - // remove() - // returns pointer to modified tree and found/not found - // (NULL if this portion of the tree is empty) - // - static tsBTreeRMRet remove(T &self, T &item) - { - tsBTreeNode &node = self; - if (&self == &item) { - if (node.pLeft) { - if (node.pRight) { - tsBTreeNode *pLeftNode = node.pLeft; - T *pR = pLeftNode->pRight; - if (pR) { - tsBTreeNode::insert (*pR, *node.pRight); - } - else { - pLeftNode->pRight = node.pRight; - } - } - return tsBTreeRMRet(tsbtrrFound, node.pLeft); // found it - } - else { - return tsBTreeRMRet(tsbtrrFound, node.pRight); // found it - } - } - - btCmp result = item.tsBTreeCompare(self); - if (result==btLessOrEqual) { - if (node.pLeft) { - tsBTreeRMRet ret = tsBTreeNode::remove(*node.pLeft, item); - if (ret.foundIt==tsbtrrFound) { - node.pLeft= ret.pNewSeg; - return tsBTreeRMRet (tsbtrrFound, &self); // TRUE - found it - } - } - return tsBTreeRMRet(tsbtrrNotFound, 0u); // not found - } - else if(result==btGreater) { - if (node.pRight) { - tsBTreeRMRet ret = tsBTreeNode::remove(*node.pRight, item); - if (ret.foundIt==tsbtrrFound) { - node.pRight = ret.pNewSeg; - return tsBTreeRMRet(tsbtrrFound,&self); // TRUE - found it - } - } - return tsBTreeRMRet(tsbtrrNotFound, 0u); // not found - } - else { - return tsBTreeRMRet(tsbtrrNotFound, 0u); // not found - } - } - // - // verify - // - static unsigned verify(const T &self, const T &item) - { - const tsBTreeNode &node = self; - - if (&self == &item) { - return 1u; // TRUE -item is present - } - btCmp result = item.tsBTreeCompare(self); - if (result==btLessOrEqual) { - if (node.pLeft) { - return tsBTreeNode::verify (*node.pLeft, item); - } - else { - return 0u; // FALSE - not found - } - } - else if(result==btGreater) { - if (node.pRight) { - return tsBTreeNode::verify (*node.pRight, item); - } - else { - return 0u; // FALSE - not found - } - } - else { - return 0u; // FALSE - not found - } - } -}; - -// -// tsBTree -// -template -class tsBTree -{ -public: - tsBTree() : pRoot(0u) {} - -// ~tsBTree() -// { -// this->traverse(T::~T); -// } - - void insert(T &item) - { - tsBTreeNode &node = item; - node.pLeft = 0; - node.pRight = 0; - if (this->pRoot) { - tsBTreeNode::insert(*this->pRoot, item); - } - else { - this->pRoot = &item; - } - } - // - // remove item from the tree - // - // returns true if item was in the tree - // (otherwise FALSE) - // - unsigned remove(T &item) - { - if (this->pRoot) { - tsBTreeRMRet ret = - tsBTreeNode::remove(*this->pRoot, item); - if (ret.foundIt) { - this->pRoot = ret.pNewSeg; - return 1u; // TRUE - found it - } - } - return 0u; // FALSE - not found - } - // - // verify that item is in the tree - // - // returns true if item is in the tree - // (otherwise FALSE) - // - unsigned verify(T &item) const - { - if (this->pRoot) { - return tsBTreeNode::verify(*this->pRoot, item); - } - else { - return 0u; // FALSE - not found - } - } - // - // Call (pT->*pCB) () for each item in the table - // - // where pT is a pointer to type T and pCB is - // a pointer to a memmber function of T with - // no parameters and returning void - // - void traverse(void (T::*pCB)()) - { - if (this->pRoot) { - tsBTreeNode::traverse(*this->pRoot, pCB); - } - } -private: - T *pRoot; -}; - diff --git a/src/libCom/cxxTemplates/tsDLList.h b/src/libCom/cxxTemplates/tsDLList.h index 96d9dd2fa..a315ecaab 100644 --- a/src/libCom/cxxTemplates/tsDLList.h +++ b/src/libCom/cxxTemplates/tsDLList.h @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * type safe doubly linked list templates * * Author Jeffrey O. Hill diff --git a/src/libCom/cxxTemplates/tsFreeList.h b/src/libCom/cxxTemplates/tsFreeList.h index 70485c5ab..55787ac6b 100644 --- a/src/libCom/cxxTemplates/tsFreeList.h +++ b/src/libCom/cxxTemplates/tsFreeList.h @@ -11,14 +11,7 @@ #ifndef tsFreeList_h #define tsFreeList_h -/* $Revision-Id$ - * - * L O S A L A M O S - * Los Alamos National Laboratory - * Los Alamos, New Mexico 87545 - * - * Copyright, 1986, The Regents of the University of California. - * +/* * Author: Jeff Hill */ diff --git a/src/libCom/cxxTemplates/tsSLList.h b/src/libCom/cxxTemplates/tsSLList.h index acfd4bc8c..ce29a6f5c 100644 --- a/src/libCom/cxxTemplates/tsSLList.h +++ b/src/libCom/cxxTemplates/tsSLList.h @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * type safe singly linked list templates * * Author Jeffrey O. Hill diff --git a/src/libCom/ellLib/Makefile b/src/libCom/ellLib/Makefile index b325a453e..9a5cb3e67 100644 --- a/src/libCom/ellLib/Makefile +++ b/src/libCom/ellLib/Makefile @@ -10,3 +10,4 @@ SRC_DIRS += $(LIBCOM)/ellLib INC += ellLib.h Com_SRCS += ellLib.c +Com_SRCS += ellSort.c diff --git a/src/libCom/ellLib/ellLib.c b/src/libCom/ellLib/ellLib.c index be1632079..c539a843f 100644 --- a/src/libCom/ellLib/ellLib.c +++ b/src/libCom/ellLib/ellLib.c @@ -6,8 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ - * +/* * Author: John Winans (ANL) * Date: 07-02-92 */ diff --git a/src/libCom/ellLib/ellLib.h b/src/libCom/ellLib/ellLib.h index ea90774cf..52b58d169 100644 --- a/src/libCom/ellLib/ellLib.h +++ b/src/libCom/ellLib/ellLib.h @@ -6,9 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ - /* - * * Author: John Winans (ANL) * Andrew Johnson */ @@ -58,6 +56,8 @@ epicsShareFunc void ellInsert (ELLLIST *plist, ELLNODE *pPrev, ELLNODE *pNode); epicsShareFunc ELLNODE * ellNth (ELLLIST *pList, int nodeNum); epicsShareFunc ELLNODE * ellNStep (ELLNODE *pNode, int nStep); epicsShareFunc int ellFind (ELLLIST *pList, ELLNODE *pNode); +typedef int (*pListCmp)(const ELLNODE* A, const ELLNODE* B); +epicsShareFunc void ellSortStable(ELLLIST *pList, pListCmp); epicsShareFunc void ellFree2 (ELLLIST *pList, FREEFUNC freeFunc); epicsShareFunc void ellVerify (ELLLIST *pList); diff --git a/src/libCom/ellLib/ellSort.c b/src/libCom/ellLib/ellSort.c new file mode 100644 index 000000000..2f8f2748b --- /dev/null +++ b/src/libCom/ellLib/ellSort.c @@ -0,0 +1,83 @@ +/*************************************************************************\ +* Copyright (c) 2014 Brookhaven Science Assoc., as Operator of Argonne +* National Laboratory. +* Copyright (c) 2016 Michael Davidsaver +* EPICS BASE is distributed subject to a Software License Agreement found +* in file LICENSE that is included with this distribution. +\*************************************************************************/ + +/* + * Use of mergesort algorithm based on analysis by + * http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html + */ +#include + +#define epicsExportSharedSymbols +#include "epicsAssert.h" +#include "ellLib.h" + +static void ellMoveN(ELLLIST* pTo, ELLLIST* pFrom, int count ) +{ + for(;count && ellCount(pFrom); count--) { + ELLNODE *node = ellGet(pFrom); + ellAdd(pTo, node); + } +} + +/* Stable (MergeSort) to given list. + * The comparison function cmp(A,B) is expected + * to return -1 for AB. + */ +void ellSortStable(ELLLIST *pList, pListCmp cmp) +{ + ELLLIST INP, P, Q; + size_t insize = 1; /* initial sub-list size */ + if(ellCount(pList)<=1) + return; + + ellInit(&INP); + ellInit(&P); + ellInit(&Q); + + /* Process is to iteratively sort + * a sequence of sub-lists of size 'insize' + */ + + while(insize < ellCount(pList)) { + + assert(ellCount(&INP)==0); + + /* shift previous results to inputs */ + ellConcat(&INP, pList); + + while(ellCount(&INP)) + { + ELLNODE *p, *q; + + /* Pull out the next pair of sub-lists */ + ellMoveN(&Q, &INP, insize); + ellMoveN(&P, &INP, insize); + + /* merge these sub-lists */ + while((p=ellFirst(&P)) && (q=ellFirst(&Q))) + { + if((*cmp)(p,q) < 0) { + ellAdd(pList, ellGet(&P)); + } else { + ellAdd(pList, ellGet(&Q)); + } + } + + /* concatenate any remaining to result */ + if(ellFirst(&P)) + ellConcat(pList, &P); + else if(ellFirst(&Q)) + ellConcat(pList, &Q); + + assert(!ellFirst(&P) && !ellFirst(&Q)); + } + + insize *= 2; + } + +} diff --git a/src/libCom/env/RULES b/src/libCom/env/RULES index 88d29be17..2737d5d4a 100644 --- a/src/libCom/env/RULES +++ b/src/libCom/env/RULES @@ -8,5 +8,7 @@ # This is a Makefile fragment, see src/libCom/Makefile. envData.c: $(LIBCOM)/env/envDefs.h $(LIBCOM)/env/bldEnvData.pl \ - $(CONFIG)/CONFIG_ENV $(CONFIG)/CONFIG_SITE_ENV - $(PERL) $(LIBCOM)/env/bldEnvData.pl $(QUIET_FLAG) $(CONFIG) + $(CONFIG)/CONFIG_ENV $(CONFIG)/CONFIG_SITE_ENV \ + $(wildcard $(CONFIG)/os/CONFIG_SITE_ENV.$(T_A)) + $(PERL) $(LIBCOM)/env/bldEnvData.pl $(QUIET_FLAG) -t $(T_A) \ + -c $(CMPLR_CLASS) -s $(OS_CLASS) $(CONFIG) diff --git a/src/libCom/env/bldEnvData.pl b/src/libCom/env/bldEnvData.pl index 08d65467e..9df15a535 100644 --- a/src/libCom/env/bldEnvData.pl +++ b/src/libCom/env/bldEnvData.pl @@ -26,13 +26,13 @@ use Text::Wrap; my $tool = basename($0); -our ($opt_h, $opt_q); +our ($opt_h, $opt_q, $opt_t, $opt_s, $opt_c); our $opt_o = 'envData.c'; $Getopt::Std::OUTPUT_HELP_VERSION = 1; $Text::Wrap::columns = 75; -HELP_MESSAGE() unless getopts('ho:q') && @ARGV == 1; +HELP_MESSAGE() unless getopts('ho:qt:s:c:') && @ARGV == 1; HELP_MESSAGE() if $opt_h; my $config = AbsPath(shift); @@ -52,16 +52,31 @@ while () { } close SRC; -# Read the values from the CONFIG_ENV and CONFIG_SITE_ENV files +# A list of configure/CONFIG_* files to read # -my $config_env = "$config/CONFIG_ENV"; -my $config_site_env = "$config/CONFIG_SITE_ENV"; +my @configs = ("$config/CONFIG_ENV", "$config/CONFIG_SITE_ENV"); -my %values; -readReleaseFiles($config_env, \%values); -readReleaseFiles($config_site_env, \%values); +if ($opt_t) { + my $config_arch_env = "$config/os/CONFIG_SITE_ENV.$opt_t"; + push @configs, $config_arch_env + if -f $config_arch_env; +} -# Warn about any vars with no value +my @sources = ($env_defs, @configs); + +# Get values from the config files +# +my (%values, @dummy); +readRelease($_, \%values, \@dummy) foreach @configs; +expandRelease(\%values); + +# Get values from the command-line +# +$values{EPICS_BUILD_COMPILER_CLASS} = $opt_c if $opt_c; +$values{EPICS_BUILD_OS_CLASS} = $opt_s if $opt_s; +$values{EPICS_BUILD_TARGET_ARCH} = $opt_t if $opt_t; + +# Warn about vars with no configured value # my @undefs = grep {!exists $values{$_}} @vars; warn "$tool: No value given for $_\n" foreach @undefs; @@ -73,13 +88,13 @@ print "Generating $opt_o\n" unless $opt_q; open OUT, '>', $opt_o or die "$tool: Cannot create $opt_o: $!\n"; +my $sources = join "\n", map {" * $_"} @sources; + print OUT << "END"; /* Generated file $opt_o * * Created from - * $env_defs - * $config_env - * $config_site_env +$sources */ #include @@ -88,18 +103,23 @@ print OUT << "END"; END -# Define all parameters, giving variable name and default value +# Define a default value for each named parameter # foreach my $var (@vars) { - my $default = $values{$var} || ''; - $default =~ s/^"//; - $default =~ s/"$//; + my $default = $values{$var}; + if (defined $default) { + $default =~ s/^"//; + $default =~ s/"$//; + } + else { + $default = ''; + } print OUT "epicsShareDef const ENV_PARAM $var =\n", " {\"$var\", \"$default\"};\n"; } -# Now create a list of all those parameters +# Also provide a list of all defined parameters # print OUT "\n", "epicsShareDef const ENV_PARAM* env_param_list[] = {\n", @@ -112,6 +132,9 @@ sub HELP_MESSAGE { " -h Help: Print this message\n", " -q Quiet: Only print errors\n", " -o file Output filename, default is $opt_o\n", + " -t arch Target architecture \$(T_A) name\n", + " -s os Operating system \$(OS_CLASS)\n", + " -c comp Compiler class \$(CMPLR_CLASS)\n", "\n"; exit 1; diff --git a/src/libCom/env/envDefs.h b/src/libCom/env/envDefs.h index 01ae5e040..536e63635 100644 --- a/src/libCom/env/envDefs.h +++ b/src/libCom/env/envDefs.h @@ -6,7 +6,7 @@ * EPICS BASE is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ +/* * Author: Roger A. Cole * Date: 07-20-91 * @@ -40,7 +40,7 @@ typedef struct envParam { } ENV_PARAM; /* - * bldEnvData looks for "epicsShareExtern const ENV_PARAM" + * bldEnvData.pl looks for "epicsShareExtern const ENV_PARAM ;" */ epicsShareExtern const ENV_PARAM EPICS_CA_ADDR_LIST; epicsShareExtern const ENV_PARAM EPICS_CA_CONN_TMO; @@ -58,6 +58,9 @@ epicsShareExtern const ENV_PARAM EPICS_CAS_SERVER_PORT; epicsShareExtern const ENV_PARAM EPICS_CA_BEACON_PERIOD; /* deprecated */ epicsShareExtern const ENV_PARAM EPICS_CAS_BEACON_PERIOD; epicsShareExtern const ENV_PARAM EPICS_CAS_BEACON_PORT; +epicsShareExtern const ENV_PARAM EPICS_BUILD_COMPILER_CLASS; +epicsShareExtern const ENV_PARAM EPICS_BUILD_OS_CLASS; +epicsShareExtern const ENV_PARAM EPICS_BUILD_TARGET_ARCH; epicsShareExtern const ENV_PARAM EPICS_TIMEZONE; epicsShareExtern const ENV_PARAM EPICS_TS_NTP_INET; epicsShareExtern const ENV_PARAM EPICS_IOC_LOG_PORT; diff --git a/src/libCom/env/envSubr.c b/src/libCom/env/envSubr.c index 7eb7ed397..283b13290 100644 --- a/src/libCom/env/envSubr.c +++ b/src/libCom/env/envSubr.c @@ -7,7 +7,7 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ +/* * Author: Roger A. Cole * Date: 07-20-91 */ diff --git a/src/libCom/error/errMdef.h b/src/libCom/error/errMdef.h index 163b063f2..4dbbecaf1 100644 --- a/src/libCom/error/errMdef.h +++ b/src/libCom/error/errMdef.h @@ -7,7 +7,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* Error Handling definitions */ -/* $Revision-Id$ */ /* * Author: Marty Kraimer * Date: 6-1-90 diff --git a/src/libCom/error/errSymLib.c b/src/libCom/error/errSymLib.c index 74d766810..aa1f3961c 100644 --- a/src/libCom/error/errSymLib.c +++ b/src/libCom/error/errSymLib.c @@ -7,11 +7,11 @@ * and higher are distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. \*************************************************************************/ -/* $Revision-Id$ +/* * errSymLib.c * Author: Marty Kraimer * Date: 6-1-90 - * errMessage.c - Handle error messages + * *************************************************************************** * This must ultimately be replaced by a facility that allows remote * nodes access to the error messages. A message handling communication diff --git a/src/libCom/error/error.h b/src/libCom/error/error.h index e951a042d..18cf7eebd 100644 --- a/src/libCom/error/error.h +++ b/src/libCom/error/error.h @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* error.h - errMessage symbol table header */ -/* share/epicsH $Revision-Id$ */ /* * Author: Marty Kraimer diff --git a/src/libCom/fdmgr/fdManager.cpp b/src/libCom/fdmgr/fdManager.cpp index 8beafe8db..ff5022d81 100644 --- a/src/libCom/fdmgr/fdManager.cpp +++ b/src/libCom/fdmgr/fdManager.cpp @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ // -// $Revision-Id$ -// // File descriptor management C++ class library // (for multiplexing IO in a single threaded environment) // diff --git a/src/libCom/fdmgr/fdManager.h b/src/libCom/fdmgr/fdManager.h index 621a004bc..59a2f355f 100644 --- a/src/libCom/fdmgr/fdManager.h +++ b/src/libCom/fdmgr/fdManager.h @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* - * $Revision-Id$ - * * File descriptor management C++ class library * (for multiplexing IO in a single threaded environment) * diff --git a/src/libCom/fdmgr/fdmgr.cpp b/src/libCom/fdmgr/fdmgr.cpp index 54c0f809c..342bae862 100644 --- a/src/libCom/fdmgr/fdmgr.cpp +++ b/src/libCom/fdmgr/fdmgr.cpp @@ -8,7 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ // -// // File descriptor management C++ class library // (for multiplexing IO in a single threaded environment) // diff --git a/src/libCom/fdmgr/fdmgr.h b/src/libCom/fdmgr/fdmgr.h index 07294c5cc..a227335e7 100644 --- a/src/libCom/fdmgr/fdmgr.h +++ b/src/libCom/fdmgr/fdmgr.h @@ -8,8 +8,6 @@ * in file LICENSE that is included with this distribution. \*************************************************************************/ /* fdmgr.h - * - * share/epicsH/$Revision-Id$ * * Header file associated with a file descriptor manager * for use with the UNIX system call select diff --git a/src/libCom/flex/README b/src/libCom/flex/README index 27ef4909c..210290892 100644 --- a/src/libCom/flex/README +++ b/src/libCom/flex/README @@ -1,5 +1,3 @@ -// $Revision-Id$ - This is release 2.3 of flex - a full release. The flex distribution consists of the following files: diff --git a/src/libCom/flex/flex.c b/src/libCom/flex/flex.c index eb966b8e5..196f4e4cc 100644 --- a/src/libCom/flex/flex.c +++ b/src/libCom/flex/flex.c @@ -42,14 +42,6 @@ char copyright[] = All rights reserved.\n"; #endif /* not lint */ -/* -#ifndef lint -static char rcsid[] = - "@(#) $Revision-Id$ (LBL)"; -#endif - -#include "flexdef.h" -*/ #define epicsExportSharedSymbols #include "epicsTempFile.h" diff --git a/src/libCom/flex/flex.html b/src/libCom/flex/flex.html index bb8c240a3..3b6ae9b80 100644 --- a/src/libCom/flex/flex.html +++ b/src/libCom/flex/flex.html @@ -1,12 +1,3 @@ -/*************************************************************************\ -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne -* National Laboratory. -* Copyright (c) 2002 The Regents of the University of California, as -* Operator of Los Alamos National Laboratory. -* EPICS BASE Versions 3.13.7 -* and higher are distributed subject to a Software License Agreement found -* in file LICENSE that is included with this distribution. -\*************************************************************************/
    diff --git a/src/libCom/flex/flex.skel b/src/libCom/flex/flex.skel
    index b8fb64090..6b9805b04 100644
    --- a/src/libCom/flex/flex.skel
    +++ b/src/libCom/flex/flex.skel
    @@ -1,8 +1,6 @@
     /* A lexical scanner generated by flex */
     
    -/* scanner skeleton version:
    - * $Revision-Id$
    - */
    +/* scanner skeleton */
     
     #define FLEX_SCANNER
     
    diff --git a/src/libCom/flex/flex.skel.static b/src/libCom/flex/flex.skel.static
    index e4fa7deb1..5e8bf2810 100644
    --- a/src/libCom/flex/flex.skel.static
    +++ b/src/libCom/flex/flex.skel.static
    @@ -1,8 +1,6 @@
     /* A lexical scanner generated by flex */
     
    -/* scanner skeleton version:
    - * $Revision-Id$
    - */
    +/* scanner skeleton */
     
     /* modified by Jim Kowalkowski to have everything declared static */
     
    diff --git a/src/libCom/flex/flexdef.h b/src/libCom/flex/flexdef.h
    index f05694a1c..79cfa9427 100644
    --- a/src/libCom/flex/flexdef.h
    +++ b/src/libCom/flex/flexdef.h
    @@ -34,8 +34,6 @@
      * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
      */
     
    -/* @(#) $Revision-Id$ (LBL) */
    -
     #ifndef INC_flexdef_H
     #define INC_flexdef_H
     
    diff --git a/src/libCom/flex/flexdoc.html b/src/libCom/flex/flexdoc.html
    index 0a3b59510..30ed69521 100644
    --- a/src/libCom/flex/flexdoc.html
    +++ b/src/libCom/flex/flexdoc.html
    @@ -1,12 +1,3 @@
    -/*************************************************************************\
    -* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
    -*     National Laboratory.
    -* Copyright (c) 2002 The Regents of the University of California, as
    -*     Operator of Los Alamos National Laboratory.
    -* EPICS BASE Versions 3.13.7
    -* and higher are distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    -\*************************************************************************/
     
     
     
    diff --git a/src/libCom/flex/libmain.c b/src/libCom/flex/libmain.c
    index 70a10af06..878aa21dc 100644
    --- a/src/libCom/flex/libmain.c
    +++ b/src/libCom/flex/libmain.c
    @@ -8,8 +8,6 @@
     \*************************************************************************/
     /* libmain - flex run-time support library "main" function */
     
    -/* $Revision-Id$ */
    -
     extern int yylex();
     
     int main(int argc, char *argv[])
    diff --git a/src/libCom/flex/scan.c b/src/libCom/flex/scan.c
    index 1c34ee1e9..a12c020bf 100644
    --- a/src/libCom/flex/scan.c
    +++ b/src/libCom/flex/scan.c
    @@ -1,8 +1,6 @@
     /* A lexical scanner generated by flex */
     
    -/* scanner skeleton version:
    - * $Revision-Id$
    - */
    +/* scanner skeleton */
     
     #define FLEX_SCANNER
     
    diff --git a/src/libCom/flex/yylex.c b/src/libCom/flex/yylex.c
    index 3fb51dcfa..28f487d6b 100644
    --- a/src/libCom/flex/yylex.c
    +++ b/src/libCom/flex/yylex.c
    @@ -34,10 +34,6 @@
      * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
      */
     
    -/*
    - * $Revision-Id$
    - */
    -
     #include 
     #include "flexdef.h"
     #include "parse.h"
    diff --git a/src/libCom/freeList/freeList.h b/src/libCom/freeList/freeList.h
    index c7ca84efc..77ebfb82e 100644
    --- a/src/libCom/freeList/freeList.h
    +++ b/src/libCom/freeList/freeList.h
    @@ -7,10 +7,8 @@
     * and higher are distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* share/epicsH/freeList.h	*/
    -/* share/epicsH $Revision-Id$ */
     /* Author:  Marty Kraimer Date:    04-19-94	*/
    -
    +
     #ifndef INCfreeListh
     #define INCfreeListh
     
    diff --git a/src/libCom/freeList/freeListLib.c b/src/libCom/freeList/freeListLib.c
    index b8e8e6f23..b489a476d 100755
    --- a/src/libCom/freeList/freeListLib.c
    +++ b/src/libCom/freeList/freeListLib.c
    @@ -7,9 +7,7 @@
     * and higher are distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     /* Author:  Marty Kraimer Date:    04-19-94 */
    -
     
     #include 
     #include 
    diff --git a/src/libCom/gpHash/gpHash.h b/src/libCom/gpHash/gpHash.h
    index ce6ec5f4a..d9c0dd204 100644
    --- a/src/libCom/gpHash/gpHash.h
    +++ b/src/libCom/gpHash/gpHash.h
    @@ -7,7 +7,6 @@
     * and higher are distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/* $Revision-Id$ */
     /* Author:  Marty Kraimer Date:    04-07-94 */
     
     /* gph provides a general purpose directory accessed via a hash table*/
    diff --git a/src/libCom/gpHash/gpHashLib.c b/src/libCom/gpHash/gpHashLib.c
    index 3b680a2fc..a56f00a0c 100644
    --- a/src/libCom/gpHash/gpHashLib.c
    +++ b/src/libCom/gpHash/gpHashLib.c
    @@ -6,7 +6,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     /* Author:  Marty Kraimer Date:    04-07-94 */
     
    diff --git a/src/libCom/iocsh/iocsh.cpp b/src/libCom/iocsh/iocsh.cpp
    index c5b629ba6..e2e3aaf41 100644
    --- a/src/libCom/iocsh/iocsh.cpp
    +++ b/src/libCom/iocsh/iocsh.cpp
    @@ -559,6 +559,7 @@ iocshBody (const char *pathname, const char *commandLine, const char *macros)
         
         if (macros) {
             if (macParseDefns(NULL, macros, &defines) < 0) {
    +            free(redirects);
                 return -1;
             }
         }
    @@ -571,6 +572,7 @@ iocshBody (const char *pathname, const char *commandLine, const char *macros)
         if (handle == NULL) {
             if (macCreateHandle(&handle, pairs)) {
                 errlogMessage("iocsh: macCreateHandle failed.");
    +            free(redirects);
                 return -1;
             }
             
    diff --git a/src/libCom/log/Makefile b/src/libCom/log/Makefile
    index 5b0f23cea..7d7a6b620 100644
    --- a/src/libCom/log/Makefile
    +++ b/src/libCom/log/Makefile
    @@ -21,6 +21,8 @@ iocLogServer_LIBS = Com
     iocLogServer_SYS_LIBS_solaris += socket
     iocLogServer_SYS_LIBS_WIN32   += user32 ws2_32
     
    -SCRIPTS_solaris := S99logServer
    -SCRIPTS_Linux := S99logServer
    +SCRIPTS_HOST = S99logServer
    +
    +EXPAND += S99logServer@
    +EXPAND_VARS = INSTALL_BIN=$(abspath $(INSTALL_BIN))
     
    diff --git a/src/libCom/log/RULES b/src/libCom/log/RULES
    deleted file mode 100644
    index 0483b0518..000000000
    --- a/src/libCom/log/RULES
    +++ /dev/null
    @@ -1,12 +0,0 @@
    -#*************************************************************************
    -# Copyright (c) 2010 UChicago Argonne LLC, as Operator of Argonne
    -#     National Laboratory.
    -# EPICS BASE is distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    -#*************************************************************************
    -
    -# This is a Makefile fragment, see src/libCom/Makefile.
    -
    -S99%: ../log/rc2.%
    -	sed -e s%:INSTALL_BIN:%`cd $(INSTALL_BIN); pwd`% $< >$@
    -
    diff --git a/src/libCom/log/rc2.logServer b/src/libCom/log/S99logServer@
    similarity index 96%
    rename from src/libCom/log/rc2.logServer
    rename to src/libCom/log/S99logServer@
    index 407227d91..294b2ec01 100644
    --- a/src/libCom/log/rc2.logServer
    +++ b/src/libCom/log/S99logServer@
    @@ -3,7 +3,7 @@
     # System-V init script for the EPICS IOC Log Server.
     #
     
    -INSTALL_BIN=:INSTALL_BIN:
    +INSTALL_BIN=@INSTALL_BIN@
     
     # To change the default values for the EPICS Environment parameters,
     # uncomment and modify the relevant lines below.
    diff --git a/src/libCom/log/iocLogServer.c b/src/libCom/log/iocLogServer.c
    index 3040c9cc8..f5694fc0f 100644
    --- a/src/libCom/log/iocLogServer.c
    +++ b/src/libCom/log/iocLogServer.c
    @@ -7,7 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* iocLogServer.c */
    -/* $Revision-Id$ */
     
     /*
      *	archive logMsg() from several IOC's to a common rotating file
    @@ -85,131 +84,132 @@ static int sighupPipe[2];
     
     /*
      *
    - *	main()
    + * main()
      *
      */
     int main(void)
     {
    -	struct sockaddr_in serverAddr;	/* server's address */
    -	struct timeval timeout;
    -	int status;
    -	struct ioc_log_server *pserver;
    +    struct sockaddr_in serverAddr;  /* server's address */
    +    struct timeval timeout;
    +    int status;
    +    struct ioc_log_server *pserver;
     
    -	osiSockIoctl_t	optval;
    +    osiSockIoctl_t  optval;
     
    -	status = getConfig();
    -	if(status<0){
    -		fprintf(stderr, "iocLogServer: EPICS environment underspecified\n");
    -		fprintf(stderr, "iocLogServer: failed to initialize\n");
    -		return IOCLS_ERROR;
    -	}
    +    status = getConfig();
    +    if (status<0) {
    +        fprintf(stderr, "iocLogServer: EPICS environment underspecified\n");
    +        fprintf(stderr, "iocLogServer: failed to initialize\n");
    +        return IOCLS_ERROR;
    +    }
     
    -	pserver = (struct ioc_log_server *) 
    -			calloc(1, sizeof *pserver);
    -	if(!pserver){
    -		fprintf(stderr, "iocLogServer: %s\n", strerror(errno));
    -		return IOCLS_ERROR;
    -	}
    +    pserver = (struct ioc_log_server *) 
    +            calloc(1, sizeof *pserver);
    +    if (!pserver) {
    +        fprintf(stderr, "iocLogServer: %s\n", strerror(errno));
    +        return IOCLS_ERROR;
    +    }
     
    -	pserver->pfdctx = (void *) fdmgr_init();
    -	if(!pserver->pfdctx){
    -		fprintf(stderr, "iocLogServer: %s\n", strerror(errno));
    -		return IOCLS_ERROR;
    -	}
    +    pserver->pfdctx = (void *) fdmgr_init();
    +    if (!pserver->pfdctx) {
    +        fprintf(stderr, "iocLogServer: %s\n", strerror(errno));
    +        return IOCLS_ERROR;
    +    }
     
    -	/*
    -	 * Open the socket. Use ARPA Internet address format and stream
    -	 * sockets. Format described in .
    -	 */
    -	pserver->sock = epicsSocketCreate(AF_INET, SOCK_STREAM, 0);
    -	if (pserver->sock==INVALID_SOCKET) {
    +    /*
    +     * Open the socket. Use ARPA Internet address format and stream
    +     * sockets. Format described in .
    +     */
    +    pserver->sock = epicsSocketCreate(AF_INET, SOCK_STREAM, 0);
    +    if (pserver->sock == INVALID_SOCKET) {
             char sockErrBuf[64];
             epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
    -		fprintf(stderr, "iocLogServer: sock create err: %s\n", sockErrBuf);
    -		return IOCLS_ERROR;
    -	}
    -	
    +        fprintf(stderr, "iocLogServer: sock create err: %s\n", sockErrBuf);
    +        free(pserver);
    +        return IOCLS_ERROR;
    +    }
    +    
         epicsSocketEnableAddressReuseDuringTimeWaitState ( pserver->sock );
     
    -	/* Zero the sock_addr structure */
    -	memset((void *)&serverAddr, 0, sizeof serverAddr);
    -	serverAddr.sin_family = AF_INET;
    -	serverAddr.sin_port = htons(ioc_log_port);
    +    /* Zero the sock_addr structure */
    +    memset((void *)&serverAddr, 0, sizeof serverAddr);
    +    serverAddr.sin_family = AF_INET;
    +    serverAddr.sin_port = htons(ioc_log_port);
     
    -	/* get server's Internet address */
    -	status = bind (	pserver->sock, 
    -			(struct sockaddr *)&serverAddr, 
    -			sizeof (serverAddr) );
    -	if (status<0) {
    +    /* get server's Internet address */
    +    status = bind ( pserver->sock, 
    +            (struct sockaddr *)&serverAddr, 
    +            sizeof (serverAddr) );
    +    if (status < 0) {
             char sockErrBuf[64];
             epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
    -		fprintf(stderr, "iocLogServer: bind err: %s\n", sockErrBuf );
    -		fprintf (stderr,
    -			"iocLogServer: a server is already installed on port %u?\n", 
    -			(unsigned)ioc_log_port);
    -		return IOCLS_ERROR;
    -	}
    +        fprintf(stderr, "iocLogServer: bind err: %s\n", sockErrBuf );
    +        fprintf (stderr,
    +            "iocLogServer: a server is already installed on port %u?\n", 
    +            (unsigned)ioc_log_port);
    +        return IOCLS_ERROR;
    +    }
     
    -	/* listen and accept new connections */
    -	status = listen(pserver->sock, 10);
    -	if (status<0) {
    +    /* listen and accept new connections */
    +    status = listen(pserver->sock, 10);
    +    if (status < 0) {
             char sockErrBuf[64];
             epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
    -		fprintf(stderr, "iocLogServer: listen err %s\n", sockErrBuf);
    -		return IOCLS_ERROR;
    -	}
    +        fprintf(stderr, "iocLogServer: listen err %s\n", sockErrBuf);
    +        return IOCLS_ERROR;
    +    }
     
    -	/*
    -	 * Set non blocking IO
    -	 * to prevent dead locks
    -	 */
    -	optval = TRUE;
    -	status = socket_ioctl(
    -					pserver->sock,
    -					FIONBIO,
    -					&optval);
    -	if(status<0){
    +    /*
    +     * Set non blocking IO
    +     * to prevent dead locks
    +     */
    +    optval = TRUE;
    +    status = socket_ioctl(
    +                    pserver->sock,
    +                    FIONBIO,
    +                    &optval);
    +    if (status < 0){
             char sockErrBuf[64];
             epicsSocketConvertErrnoToString ( sockErrBuf, sizeof ( sockErrBuf ) );
    -		fprintf(stderr, "iocLogServer: ioctl FIONBIO err %s\n", sockErrBuf);
    -		return IOCLS_ERROR;
    -	}
    +        fprintf(stderr, "iocLogServer: ioctl FIONBIO err %s\n", sockErrBuf);
    +        return IOCLS_ERROR;
    +    }
     
    -#	ifdef UNIX
    -		status = setupSIGHUP(pserver);
    -		if (status<0) {
    -			return IOCLS_ERROR;
    -		}
    -#	endif
    +#   ifdef UNIX
    +        status = setupSIGHUP(pserver);
    +        if (status < 0) {
    +            return IOCLS_ERROR;
    +        }
    +#   endif
     
    -	status = openLogFile(pserver);
    -	if (status<0) {
    -		fprintf(stderr,
    -			"File access problems to `%s' because `%s'\n", 
    -			ioc_log_file_name,
    -			strerror(errno));
    -		return IOCLS_ERROR;
    -	}
    +    status = openLogFile(pserver);
    +    if (status < 0) {
    +        fprintf(stderr,
    +            "File access problems to `%s' because `%s'\n", 
    +            ioc_log_file_name,
    +            strerror(errno));
    +        return IOCLS_ERROR;
    +    }
     
    -	status = fdmgr_add_callback(
    -			pserver->pfdctx, 
    -			pserver->sock, 
    -			fdi_read,
    -			acceptNewClient,
    -			pserver);
    -	if(status<0){
    -		fprintf(stderr,
    -			"iocLogServer: failed to add read callback\n");
    -		return IOCLS_ERROR;
    -	}
    +    status = fdmgr_add_callback(
    +            pserver->pfdctx, 
    +            pserver->sock, 
    +            fdi_read,
    +            acceptNewClient,
    +            pserver);
    +    if (status < 0) {
    +        fprintf(stderr,
    +            "iocLogServer: failed to add read callback\n");
    +        return IOCLS_ERROR;
    +    }
     
     
    -	while(TRUE){
    -		timeout.tv_sec = 60; /* 1 min */
    -		timeout.tv_usec = 0;
    -		fdmgr_pend_event(pserver->pfdctx, &timeout);
    -		fflush(pserver->poutfile);
    -	}
    +    while (TRUE) {
    +        timeout.tv_sec = 60; /* 1 min */
    +        timeout.tv_usec = 0;
    +        fdmgr_pend_event(pserver->pfdctx, &timeout);
    +        fflush(pserver->poutfile);
    +    }
     }
     
     /*
    @@ -965,6 +965,7 @@ static int getDirectory(void)
     				"Problem reading o/p from `%s' because `%s'\n", 
     				ioc_log_file_command,
     				strerror(errno));
    +			(void) pclose(pipe);
     			return IOCLS_ERROR;
     		}
     		(void) pclose(pipe);
    diff --git a/src/libCom/macLib/macCore.c b/src/libCom/macLib/macCore.c
    index dea4a061b..55d31719e 100644
    --- a/src/libCom/macLib/macCore.c
    +++ b/src/libCom/macLib/macCore.c
    @@ -6,8 +6,7 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$
    - *
    +/*
      * Implementation of core macro substitution library (macLib)
      *
      * The implementation is fairly unsophisticated and linked lists are
    @@ -868,9 +867,9 @@ static void refer ( MAC_HANDLE *handle, MAC_ENTRY *entry, int level,
             if ( !refentry->visited ) {
                 /* reference is good, use it */
                 if ( !handle->dirty ) {
    -                /* copy the already-expanded value, and its error status! */
    +                /* copy the already-expanded value, merge any error status */
                     cpy2val( refentry->value, &v, valend );
    -                entry->error = refentry->error;
    +                entry->error = entry->error || refentry->error;
                 } else {
                     /* translate raw value */
                     const char *rv = refentry->rawval;
    diff --git a/src/libCom/macLib/macEnv.c b/src/libCom/macLib/macEnv.c
    index 8cdf8bd94..f102748a8 100644
    --- a/src/libCom/macLib/macEnv.c
    +++ b/src/libCom/macLib/macEnv.c
    @@ -4,8 +4,7 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$
    - *
    +/*
      * Macro expansion of environment variables
      */
     
    diff --git a/src/libCom/macLib/macLib.h b/src/libCom/macLib/macLib.h
    index c06e67d9e..14ecdaa3f 100644
    --- a/src/libCom/macLib/macLib.h
    +++ b/src/libCom/macLib/macLib.h
    @@ -6,8 +6,7 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$
    - *
    +/*
      * Definitions for macro substitution library (macLib)
      *
      * William Lupton, W. M. Keck Observatory
    diff --git a/src/libCom/macLib/macLibNOTES b/src/libCom/macLib/macLibNOTES
    index d079a3282..fc3606254 100644
    --- a/src/libCom/macLib/macLibNOTES
    +++ b/src/libCom/macLib/macLibNOTES
    @@ -1,5 +1,3 @@
    -# $Revision-Id$
    -#
     # Test input file for macTest filter, doubling as notes on usage of the
     # macro library. Some special strings at start of line are supported:
     #
    diff --git a/src/libCom/macLib/macUtil.c b/src/libCom/macLib/macUtil.c
    index ee7b53f7f..7bf73542e 100644
    --- a/src/libCom/macLib/macUtil.c
    +++ b/src/libCom/macLib/macUtil.c
    @@ -6,8 +6,7 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$
    - *
    +/*
      * Implementation of utility macro substitution library (macLib)
      *
      * William Lupton, W. M. Keck Observatory
    diff --git a/src/libCom/misc/alarm.h b/src/libCom/misc/alarm.h
    index 5158206f7..58e2b7313 100644
    --- a/src/libCom/misc/alarm.h
    +++ b/src/libCom/misc/alarm.h
    @@ -7,7 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* Alarm definitions, must match menuAlarmSevr.dbd and menuAlarmStat.dbd */
    -/* $Revision-Id$ */
     
     /*
      *      Authors: Bob Dalesio and Marty Kraimer
    diff --git a/src/libCom/misc/alarmString.c b/src/libCom/misc/alarmString.c
    index b8c72451c..4db179dcb 100644
    --- a/src/libCom/misc/alarmString.c
    +++ b/src/libCom/misc/alarmString.c
    @@ -6,7 +6,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     /* String names for alarm status and severity values */
     
    diff --git a/src/libCom/misc/alarmString.h b/src/libCom/misc/alarmString.h
    index 75fe2317c..ab320f058 100644
    --- a/src/libCom/misc/alarmString.h
    +++ b/src/libCom/misc/alarmString.h
    @@ -6,7 +6,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     /*
      * This file is deprecated, use alarm.h instead.
    diff --git a/src/libCom/misc/cantProceed.c b/src/libCom/misc/cantProceed.c
    index cbd7e87af..6c35796fd 100644
    --- a/src/libCom/misc/cantProceed.c
    +++ b/src/libCom/misc/cantProceed.c
    @@ -7,7 +7,6 @@
     * and higher are distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     /* Author:  Marty Kraimer Date:    04JAN99 */
     
    diff --git a/src/libCom/misc/dbDefs.h b/src/libCom/misc/dbDefs.h
    index e8c2bb265..e1de3f200 100644
    --- a/src/libCom/misc/dbDefs.h
    +++ b/src/libCom/misc/dbDefs.h
    @@ -6,8 +6,7 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$
    - *
    +/*
      *      Author:          Marty Kraimer
      *      Date:            6-1-90
      */
    diff --git a/src/libCom/misc/epicsStdlib.c b/src/libCom/misc/epicsStdlib.c
    index b2d441274..865c8069d 100644
    --- a/src/libCom/misc/epicsStdlib.c
    +++ b/src/libCom/misc/epicsStdlib.c
    @@ -6,7 +6,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     /* Authors: Eric Norum & Andrew Johnson */
     
     #include 
    diff --git a/src/libCom/misc/epicsStdlib.h b/src/libCom/misc/epicsStdlib.h
    index 2d143cb39..20b7cd26f 100644
    --- a/src/libCom/misc/epicsStdlib.h
    +++ b/src/libCom/misc/epicsStdlib.h
    @@ -70,12 +70,12 @@ epicsShareFunc int
     /* These macros return 1 if successful, 0 on failure.
      * This is analagous to the return value from sscanf()
      */
    -#define epicsScanLong(str, to, base) !epicsParseLong(str, to, base, NULL)
    -#define epicsScanULong(str, to, base) !epicsParseULong(str, to, base, NULL)
    -#define epicsScanLLong(str, to, base) !epicsParseLLong(str, to, base, NULL)
    -#define epicsScanULLong(str, to, base) !epicsParseULLong(str, to, base, NULL)
    -#define epicsScanFloat(str, to) !epicsParseFloat(str, to, NULL)
    -#define epicsScanDouble(str, to) !epicsParseDouble(str, to, NULL)
    +#define epicsScanLong(str, to, base) (!epicsParseLong(str, to, base, NULL))
    +#define epicsScanULong(str, to, base) (!epicsParseULong(str, to, base, NULL))
    +#define epicsScanLLong(str, to, base) (!epicsParseLLong(str, to, base, NULL))
    +#define epicsScanULLong(str, to, base) (!epicsParseULLong(str, to, base, NULL))
    +#define epicsScanFloat(str, to) (!epicsParseFloat(str, to, NULL))
    +#define epicsScanDouble(str, to) (!epicsParseDouble(str, to, NULL))
     
     #ifdef __cplusplus
     }
    diff --git a/src/libCom/misc/epicsString.c b/src/libCom/misc/epicsString.c
    index 996c669aa..e41e21b72 100644
    --- a/src/libCom/misc/epicsString.c
    +++ b/src/libCom/misc/epicsString.c
    @@ -7,7 +7,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     /* Authors: Jun-ichi Odagiri, Marty Kraimer, Eric Norum,
      *          Mark Rivers, Andrew Johnson, Ralph Lange
    @@ -266,6 +265,18 @@ int epicsStrPrintEscaped(FILE *fp, const char *s, size_t len)
        return nout;
     }
     
    +/* Until Base requires POSIX 2008 we must provide our own implementation */
    +size_t epicsStrnLen(const char *s, size_t maxlen)
    +{
    +    size_t i;
    +
    +    for (i=0; i
     #include 
     
    +//#define EPICS_FREELIST_DEBUG
    +#define EPICS_PRIVATE_API
    +
     #define epicsExportSharedSymbols
     #include "ipAddrToAsciiAsynchronous.h"
     #include "epicsThread.h"
    @@ -54,7 +48,6 @@ public:
             < ipAddrToAsciiTransactionPrivate, 0x80 > & );
         epicsPlacementDeleteOperator (( void *, tsFreeList 
             < ipAddrToAsciiTransactionPrivate, 0x80 > & ))
    -private:
         osiSockAddr addr;
         ipAddrToAsciiEnginePrivate & engine;
         ipAddrToAsciiCallBack * pCB;
    @@ -62,7 +55,7 @@ private:
         void ipAddrToAscii ( const osiSockAddr &, ipAddrToAsciiCallBack & );
         void release (); 
         void operator delete ( void * );
    -    friend class ipAddrToAsciiEnginePrivate;
    +private:
         ipAddrToAsciiTransactionPrivate & operator = ( const ipAddrToAsciiTransactionPrivate & );
         ipAddrToAsciiTransactionPrivate ( const ipAddrToAsciiTransactionPrivate & );
     };
    @@ -83,41 +76,54 @@ extern "C" {
     static void ipAddrToAsciiEngineGlobalMutexConstruct ( void * );
     }
     
    -// - this class executes the synchronous DNS query
    -// - it creates one thread
    -class ipAddrToAsciiEnginePrivate : 
    -    public ipAddrToAsciiEngine, 
    -    public epicsThreadRunable {
    -public:
    -    ipAddrToAsciiEnginePrivate ();
    -    virtual ~ipAddrToAsciiEnginePrivate ();
    -    void show ( unsigned level ) const; 
    -private:
    +namespace {
    +struct ipAddrToAsciiGlobal : public epicsThreadRunable {
    +    ipAddrToAsciiGlobal();
    +    virtual ~ipAddrToAsciiGlobal() {}
    +
    +    virtual void run ();
    +
         char nameTmp [1024];
    -    tsFreeList 
    -        < ipAddrToAsciiTransactionPrivate, 0x80 > 
    +    tsFreeList
    +        < ipAddrToAsciiTransactionPrivate, 0x80 >
                 transactionFreeList;
         tsDLList < ipAddrToAsciiTransactionPrivate > labor;
         mutable epicsMutex mutex;
         epicsEvent laborEvent;
         epicsEvent destructorBlockEvent;
         epicsThread thread;
    +    // pCurrent may be changed by any thread (worker or other)
         ipAddrToAsciiTransactionPrivate * pCurrent;
    +    // pActive may only be changed by the worker
    +    ipAddrToAsciiTransactionPrivate * pActive;
         unsigned cancelPendingCount;
         bool exitFlag;
         bool callbackInProgress;
    -    static ipAddrToAsciiEnginePrivate * pEngine;
    +};
    +}
    +
    +// - this class executes the synchronous DNS query
    +// - it creates one thread
    +class ipAddrToAsciiEnginePrivate : 
    +    public ipAddrToAsciiEngine {
    +public:
    +    ipAddrToAsciiEnginePrivate() :refcount(1u), released(false) {}
    +    virtual ~ipAddrToAsciiEnginePrivate () {}
    +    void show ( unsigned level ) const; 
    +
    +    unsigned refcount;
    +    bool released;
    +
    +    static ipAddrToAsciiGlobal * pEngine;
         ipAddrToAsciiTransaction & createTransaction ();
    -    void release (); 
    -    void run ();
    -	ipAddrToAsciiEnginePrivate ( const ipAddrToAsciiEngine & );
    +    void release ();
    +
    +private:
    +    ipAddrToAsciiEnginePrivate ( const ipAddrToAsciiEngine & );
     	ipAddrToAsciiEnginePrivate & operator = ( const ipAddrToAsciiEngine & );
    -    friend class ipAddrToAsciiEngine;
    -    friend class ipAddrToAsciiTransactionPrivate;
    -    friend void ipAddrToAsciiEngineGlobalMutexConstruct ( void * );
     };
     
    -ipAddrToAsciiEnginePrivate * ipAddrToAsciiEnginePrivate :: pEngine = 0;
    +ipAddrToAsciiGlobal * ipAddrToAsciiEnginePrivate :: pEngine = 0;
     static epicsThreadOnceId ipAddrToAsciiEngineGlobalMutexOnceFlag = EPICS_THREAD_ONCE_INIT;
     
     // the users are not required to supply a show routine
    @@ -132,12 +138,24 @@ ipAddrToAsciiEngine::~ipAddrToAsciiEngine () {}
     static void ipAddrToAsciiEngineGlobalMutexConstruct ( void * )
     {
         try {
    -        ipAddrToAsciiEnginePrivate::pEngine = new ipAddrToAsciiEnginePrivate ();
    +        ipAddrToAsciiEnginePrivate::pEngine = new ipAddrToAsciiGlobal ();
         } catch (std::exception& e) {
             errlogPrintf("ipAddrToAsciiEnginePrivate ctor fails with: %s\n", e.what());
         }
     }
     
    +void ipAddrToAsciiEngine::cleanup()
    +{
    +    {
    +        epicsGuard G(ipAddrToAsciiEnginePrivate::pEngine->mutex);
    +        ipAddrToAsciiEnginePrivate::pEngine->exitFlag = true;
    +    }
    +    ipAddrToAsciiEnginePrivate::pEngine->laborEvent.signal();
    +    ipAddrToAsciiEnginePrivate::pEngine->thread.exitWait();
    +    delete ipAddrToAsciiEnginePrivate::pEngine;
    +    ipAddrToAsciiEnginePrivate::pEngine = 0;
    +}
    +
     // for now its probably sufficent to allocate one 
     // DNS transaction thread for all codes sharing
     // the same process that need DNS services but we 
    @@ -149,41 +167,78 @@ ipAddrToAsciiEngine & ipAddrToAsciiEngine::allocate ()
             ipAddrToAsciiEngineGlobalMutexConstruct, 0 );
         if(!ipAddrToAsciiEnginePrivate::pEngine)
             throw std::runtime_error("ipAddrToAsciiEngine::allocate fails");
    -    return * ipAddrToAsciiEnginePrivate::pEngine;
    +    return * new ipAddrToAsciiEnginePrivate();
     }
     
    -ipAddrToAsciiEnginePrivate::ipAddrToAsciiEnginePrivate () :
    +ipAddrToAsciiGlobal::ipAddrToAsciiGlobal () :
         thread ( *this, "ipToAsciiProxy",
             epicsThreadGetStackSize(epicsThreadStackBig),
             epicsThreadPriorityLow ),
    -    pCurrent ( 0 ), cancelPendingCount ( 0u ), exitFlag ( false ),  
    +    pCurrent ( 0 ), pActive ( 0 ), cancelPendingCount ( 0u ), exitFlag ( false ),
         callbackInProgress ( false )
     {
         this->thread.start (); // start the thread
     }
     
    -ipAddrToAsciiEnginePrivate::~ipAddrToAsciiEnginePrivate ()
    -{
    -    {
    -        epicsGuard < epicsMutex > guard ( this->mutex );
    -        this->exitFlag = true;
    -    }
    -    this->laborEvent.signal ();
    -    this->thread.exitWait ();
    -}
     
     void ipAddrToAsciiEnginePrivate::release ()
     {
    +    bool last;
    +    {
    +        epicsGuard < epicsMutex > guard ( this->pEngine->mutex );
    +        if(released)
    +            throw std::logic_error("Engine release() called again!");
    +
    +        // released==true prevents new transactions
    +        released = true;
    +
    +        {
    +            // cancel any pending transactions
    +            tsDLIter < ipAddrToAsciiTransactionPrivate > it(pEngine->labor.firstIter());
    +            while(it.valid()) {
    +                ipAddrToAsciiTransactionPrivate *trn = it.pointer();
    +                ++it;
    +
    +                if(this==&trn->engine) {
    +                    trn->pending = false;
    +                    pEngine->labor.remove(*trn);
    +                }
    +            }
    +
    +            // cancel transaction in lookup or callback
    +            if (pEngine->pCurrent && this==&pEngine->pCurrent->engine) {
    +                pEngine->pCurrent->pending = false;
    +                pEngine->pCurrent = 0;
    +            }
    +
    +            // wait for completion of in-progress callback
    +            pEngine->cancelPendingCount++;
    +            while(pEngine->pActive && this==&pEngine->pActive->engine
    +                  && ! pEngine->thread.isCurrentThread()) {
    +                epicsGuardRelease < epicsMutex > unguard ( guard );
    +                pEngine->destructorBlockEvent.wait();
    +            }
    +            pEngine->cancelPendingCount--;
    +            if(pEngine->cancelPendingCount)
    +                pEngine->destructorBlockEvent.signal();
    +        }
    +
    +        assert(refcount>0);
    +        last = 0==--refcount;
    +    }
    +    if(last) {
    +        delete this;
    +    }
     }
     
     void ipAddrToAsciiEnginePrivate::show ( unsigned level ) const
     {
    -    epicsGuard < epicsMutex > guard ( this->mutex );
    +    epicsGuard < epicsMutex > guard ( this->pEngine->mutex );
         printf ( "ipAddrToAsciiEngine at %p with %u requests pending\n", 
    -        static_cast  (this), this->labor.count () );
    +        static_cast  (this), this->pEngine->labor.count () );
         if ( level > 0u ) {
    -        tsDLIterConst < ipAddrToAsciiTransactionPrivate > 
    -            pItem = this->labor.firstIter ();
    +        tsDLIter < ipAddrToAsciiTransactionPrivate >
    +            pItem = this->pEngine->labor.firstIter ();
             while ( pItem.valid () ) {
                 pItem->show ( level - 1u );
                 pItem++;
    @@ -191,10 +246,10 @@ void ipAddrToAsciiEnginePrivate::show ( unsigned level ) const
         }
         if ( level > 1u ) {
             printf ( "mutex:\n" );
    -        this->mutex.show ( level - 2u );
    +        this->pEngine->mutex.show ( level - 2u );
             printf ( "laborEvent:\n" );
    -        this->laborEvent.show ( level - 2u );
    -        printf ( "exitFlag  boolean = %u\n", this->exitFlag );
    +        this->pEngine->laborEvent.show ( level - 2u );
    +        printf ( "exitFlag  boolean = %u\n", this->pEngine->exitFlag );
             printf ( "exit event:\n" );
         }
     }
    @@ -227,10 +282,20 @@ void ipAddrToAsciiTransactionPrivate::operator delete ( void * )
     
     ipAddrToAsciiTransaction & ipAddrToAsciiEnginePrivate::createTransaction ()
     {
    -    return * new ( this->transactionFreeList ) ipAddrToAsciiTransactionPrivate ( *this );
    +    epicsGuard  G(this->pEngine->mutex);
    +    if(this->released)
    +        throw std::logic_error("createTransaction() on release()'d ipAddrToAsciiEngine");
    +
    +    assert(this->refcount>0);
    +
    +    ipAddrToAsciiTransactionPrivate *ret = new ( this->pEngine->transactionFreeList ) ipAddrToAsciiTransactionPrivate ( *this );
    +
    +    this->refcount++;
    +
    +    return * ret;
     }
     
    -void ipAddrToAsciiEnginePrivate::run ()
    +void ipAddrToAsciiGlobal::run ()
     {
         epicsGuard < epicsMutex > guard ( this->mutex );
         while ( ! this->exitFlag ) {
    @@ -265,15 +330,20 @@ void ipAddrToAsciiEnginePrivate::run ()
                     continue;
                 }
     
    +            // fix for lp:1580623
    +            // a destructing cac sets pCurrent to NULL, so
    +            // make local copy to avoid race when releasing the guard
    +            ipAddrToAsciiTransactionPrivate *pCur = pActive = pCurrent;
                 this->callbackInProgress = true;
     
                 {
                     epicsGuardRelease < epicsMutex > unguard ( guard );
                     // dont call callback with lock applied
    -                this->pCurrent->pCB->transactionComplete ( this->nameTmp );
    +                pCur->pCB->transactionComplete ( this->nameTmp );
                 }
     
                 this->callbackInProgress = false;
    +            pActive = 0;
     
                 if ( this->pCurrent ) {
                     this->pCurrent->pending = false;
    @@ -297,44 +367,53 @@ ipAddrToAsciiTransactionPrivate::ipAddrToAsciiTransactionPrivate
     void ipAddrToAsciiTransactionPrivate::release ()
     {
         this->~ipAddrToAsciiTransactionPrivate ();
    -    this->engine.transactionFreeList.release ( this );
    +    this->engine.pEngine->transactionFreeList.release ( this );
     }
     
     ipAddrToAsciiTransactionPrivate::~ipAddrToAsciiTransactionPrivate ()
     {
    -    epicsGuard < epicsMutex > guard ( this->engine.mutex );
    -    while ( this->pending ) {
    -        if ( this->engine.pCurrent == this && 
    -                this->engine.callbackInProgress && 
    -                ! this->engine.thread.isCurrentThread() ) {
    -            // cancel from another thread while callback in progress
    -            // waits for callback to complete
    -            assert ( this->engine.cancelPendingCount < UINT_MAX );
    -            this->engine.cancelPendingCount++;
    -            {
    -                epicsGuardRelease < epicsMutex > unguard ( guard );
    -                this->engine.destructorBlockEvent.wait ();
    -            }
    -            assert ( this->engine.cancelPendingCount > 0u );
    -            this->engine.cancelPendingCount--;
    -            if ( ! this->pending ) {
    -                if ( this->engine.cancelPendingCount ) {
    -                    this->engine.destructorBlockEvent.signal ();
    +    ipAddrToAsciiGlobal *pGlobal = this->engine.pEngine;
    +    bool last;
    +    {
    +        epicsGuard < epicsMutex > guard ( pGlobal->mutex );
    +        while ( this->pending ) {
    +            if ( pGlobal->pCurrent == this &&
    +                    pGlobal->callbackInProgress &&
    +                    ! pGlobal->thread.isCurrentThread() ) {
    +                // cancel from another thread while callback in progress
    +                // waits for callback to complete
    +                assert ( pGlobal->cancelPendingCount < UINT_MAX );
    +                pGlobal->cancelPendingCount++;
    +                {
    +                    epicsGuardRelease < epicsMutex > unguard ( guard );
    +                    pGlobal->destructorBlockEvent.wait ();
    +                }
    +                assert ( pGlobal->cancelPendingCount > 0u );
    +                pGlobal->cancelPendingCount--;
    +                if ( ! this->pending ) {
    +                    if ( pGlobal->cancelPendingCount ) {
    +                        pGlobal->destructorBlockEvent.signal ();
    +                    }
    +                    break;
                     }
    -                break;
    -            }
    -        }
    -        else {
    -            if ( this->engine.pCurrent == this ) {
    -                // cancel from callback, or while lookup in progress
    -                this->engine.pCurrent = 0;
                 }
                 else {
    -                // cancel before lookup starts
    -                this->engine.labor.remove ( *this );
    +                if ( pGlobal->pCurrent == this ) {
    +                    // cancel from callback, or while lookup in progress
    +                    pGlobal->pCurrent = 0;
    +                }
    +                else {
    +                    // cancel before lookup starts
    +                    pGlobal->labor.remove ( *this );
    +                }
    +                this->pending = false;
                 }
    -            this->pending = false;
             }
    +        assert(this->engine.refcount>0);
    +        last = 0==--this->engine.refcount;
    +    }
    +    if(last) {
    +        delete &this->engine;
         }
     }
     
    @@ -342,15 +421,21 @@ void ipAddrToAsciiTransactionPrivate::ipAddrToAscii (
         const osiSockAddr & addrIn, ipAddrToAsciiCallBack & cbIn )
     {
         bool success;
    +    ipAddrToAsciiGlobal *pGlobal = this->engine.pEngine;
     
         {
    -        epicsGuard < epicsMutex > guard ( this->engine.mutex );
    -        // put some reasonable limit on queue expansion
    -        if ( !this->pending && engine.labor.count () < 16u ) {
    +        epicsGuard < epicsMutex > guard ( pGlobal->mutex );
    +
    +        if (this->engine.released) {
    +            errlogPrintf("Warning: ipAddrToAscii on transaction with release()'d ipAddrToAsciiEngine");
    +            success = false;
    +
    +        } else if ( !this->pending && pGlobal->labor.count () < 16u ) {
    +            // put some reasonable limit on queue expansion
                 this->addr = addrIn;
                 this->pCB = & cbIn;
                 this->pending = true;
    -            this->engine.labor.add ( *this );
    +            pGlobal->labor.add ( *this );
                 success = true;
             }
             else {
    @@ -359,7 +444,7 @@ void ipAddrToAsciiTransactionPrivate::ipAddrToAscii (
         }
     
         if ( success ) {
    -        this->engine.laborEvent.signal ();
    +        pGlobal->laborEvent.signal ();
         }
         else {
             char autoNameTmp[256];
    @@ -376,7 +461,7 @@ osiSockAddr ipAddrToAsciiTransactionPrivate::address () const
     
     void ipAddrToAsciiTransactionPrivate::show ( unsigned level ) const
     {
    -    epicsGuard < epicsMutex > guard ( this->engine.mutex );
    +    epicsGuard < epicsMutex > guard ( this->engine.pEngine->mutex );
         char ipAddr [64];
         sockAddrToDottedIP ( &this->addr.sa, ipAddr, sizeof ( ipAddr ) );
         printf ( "ipAddrToAsciiTransactionPrivate for address %s\n", ipAddr );
    diff --git a/src/libCom/misc/ipAddrToAsciiAsynchronous.h b/src/libCom/misc/ipAddrToAsciiAsynchronous.h
    index 95b853994..9aefca44e 100644
    --- a/src/libCom/misc/ipAddrToAsciiAsynchronous.h
    +++ b/src/libCom/misc/ipAddrToAsciiAsynchronous.h
    @@ -9,16 +9,6 @@
     \*************************************************************************/
     
     /*  
    - *  $Revision-Id$
    - *
    - *                              
    - *                    L O S  A L A M O S
    - *              Los Alamos National Laboratory
    - *               Los Alamos, New Mexico 87545
    - *                                  
    - *  Copyright, 1986, The Regents of the University of California.
    - *                                  
    - *           
      *	Author Jeffrey O. Hill
      *	johill@lanl.gov
      */
    @@ -54,6 +44,10 @@ public:
         static ipAddrToAsciiEngine & allocate ();
     protected:
         virtual ~ipAddrToAsciiEngine () = 0;
    +public:
    +#ifdef EPICS_PRIVATE_API
    +    static void cleanup();
    +#endif
     };
     
     #endif // ifdef ipAddrToAsciiAsynchronous_h
    diff --git a/src/libCom/misc/locationException.h b/src/libCom/misc/locationException.h
    index 4a5a279a9..30b187208 100644
    --- a/src/libCom/misc/locationException.h
    +++ b/src/libCom/misc/locationException.h
    @@ -8,8 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -//
    -// $Revision-Id$
     //
     // Author: Jeff Hill
     //
    diff --git a/src/libCom/misc/makeEpicsVersion.pl b/src/libCom/misc/makeEpicsVersion.pl
    index 08f5aa3c0..c7c9acc39 100644
    --- a/src/libCom/misc/makeEpicsVersion.pl
    +++ b/src/libCom/misc/makeEpicsVersion.pl
    @@ -30,7 +30,7 @@ print "Building $opt_o from $infile\n" unless $opt_q;
     open my $VARS, '<', $infile
         or die "$tool: Can't open $infile: $!\n";
     
    -my ($ver, $rev, $mod, $patch, $snapshot, $commit_date);
    +my ($ver, $rev, $mod, $patch, $snapshot);
     while (<$VARS>) {
         chomp;
         next if m/^\s*#/;   # Skip comments
    @@ -39,16 +39,16 @@ while (<$VARS>) {
         if (m/^EPICS_MODIFICATION\s*=\s*(\d+)/)         { $mod = $1; }
         if (m/^EPICS_PATCH_LEVEL\s*=\s*(\d+)/)          { $patch = $1; }
         if (m/^EPICS_DEV_SNAPSHOT\s*=\s*([-\w]*)/)      { $snapshot = $1; }
    -    if (m/^COMMIT_DATE\s*=\s*"\\(.*)"/)             { $commit_date = $1; }
     }
     close $VARS;
     
     map {
         die "$tool: Variable missing from $infile" unless defined $_;
    -} $ver, $rev, $mod, $patch, $snapshot, $commit_date;
    +} $ver, $rev, $mod, $patch, $snapshot;
     
     my $ver_str = "$ver.$rev.$mod";
     $ver_str .= ".$patch" if $patch > 0;
    +my $ver_short = $ver_str;
     $ver_str .= $snapshot if $snapshot ne '';
     $ver_str .= "-$opt_v" if $opt_v;
     
    @@ -71,10 +71,15 @@ print $OUT <<"END";
     #define EPICS_PATCH_LEVEL    $patch
     #define EPICS_DEV_SNAPSHOT   "$snapshot"
     #define EPICS_SITE_VERSION   "$opt_v"
    -#define EPICS_VERSION_STRING "EPICS $ver_str"
    -#define epicsReleaseVersion  "EPICS R$ver_str $commit_date"
     
    -#define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P))
    +#define EPICS_VERSION_SHORT  "$ver_short"
    +#define EPICS_VERSION_FULL   "$ver_str"
    +#define EPICS_VERSION_STRING "EPICS $ver_str"
    +#define epicsReleaseVersion  "EPICS R$ver_str"
    +
    +#ifndef VERSION_INT
    +#  define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P))
    +#endif
     #define EPICS_VERSION_INT VERSION_INT($ver, $rev, $mod, $patch)
     
     #endif /* INC_${obase}_H */
    diff --git a/src/libCom/misc/testMain.h b/src/libCom/misc/testMain.h
    index 655503881..4db72c39e 100644
    --- a/src/libCom/misc/testMain.h
    +++ b/src/libCom/misc/testMain.h
    @@ -4,7 +4,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     #ifndef INC_testMain_H
     #define INC_testMain_H
    diff --git a/src/libCom/misc/unixFileName.h b/src/libCom/misc/unixFileName.h
    index faeed9d8e..36e818c8f 100644
    --- a/src/libCom/misc/unixFileName.h
    +++ b/src/libCom/misc/unixFileName.h
    @@ -10,8 +10,6 @@
     /*
      * unixFileName.h
      * Author: Jeff Hill
    - *
    - *
      */
     #ifndef unixFileNameH
     #define unixFileNameH
    diff --git a/src/libCom/osi/devLib.h b/src/libCom/osi/devLib.h
    index b78f94907..729f9b932 100644
    --- a/src/libCom/osi/devLib.h
    +++ b/src/libCom/osi/devLib.h
    @@ -9,7 +9,6 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     /* devLib.h */
    -/* $Revision-Id$ */
     
     /*
      * Original Author: Marty Kraimer
    diff --git a/src/libCom/osi/devLibVME.c b/src/libCom/osi/devLibVME.c
    index a935e4857..6c7d93f99 100644
    --- a/src/libCom/osi/devLibVME.c
    +++ b/src/libCom/osi/devLibVME.c
    @@ -9,7 +9,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* devLib.c - support for allocation of common device resources */
    -/* $Revision-Id$ */
     
     /*
      *  Original Author: Marty Kraimer
    diff --git a/src/libCom/osi/devLibVME.h b/src/libCom/osi/devLibVME.h
    index 8e526a139..4fb17f0c2 100644
    --- a/src/libCom/osi/devLibVME.h
    +++ b/src/libCom/osi/devLibVME.h
    @@ -7,7 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* devLib.h */
    -/* devLib.h,v 1.1.2.8 2009/07/09 15:27:43 anj Exp */
     
     /*
      * Original Author: Marty Kraimer 
    diff --git a/src/libCom/osi/devLibVMEImpl.h b/src/libCom/osi/devLibVMEImpl.h
    index e695edeb9..e479d869c 100644
    --- a/src/libCom/osi/devLibVMEImpl.h
    +++ b/src/libCom/osi/devLibVMEImpl.h
    @@ -9,7 +9,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* devLibImpl.h */
    -/*  */
     
     /*
      * Original Author: Marty Kraimer 
    diff --git a/src/libCom/osi/epicsAssert.h b/src/libCom/osi/epicsAssert.h
    index a16c036ec..60dc130c8 100644
    --- a/src/libCom/osi/epicsAssert.h
    +++ b/src/libCom/osi/epicsAssert.h
    @@ -6,7 +6,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     /*
      * EPICS assert
      *
    diff --git a/src/libCom/osi/epicsGeneralTime.c b/src/libCom/osi/epicsGeneralTime.c
    index 7f8e1b66f..ca3317ee3 100644
    --- a/src/libCom/osi/epicsGeneralTime.c
    +++ b/src/libCom/osi/epicsGeneralTime.c
    @@ -1,5 +1,5 @@
     /*************************************************************************\
    -* Copyright (c) 2009 UChicago Argonne LLC, as Operator of Argonne
    +* Copyright (c) 2016 UChicago Argonne LLC, as Operator of Argonne
     *     National Laboratory.
     * Copyright (c) 2008 Diamond Light Source Ltd
     * Copyright (c) 2004 Oak Ridge National Laboratory
    @@ -31,6 +31,17 @@
     #include "generalTimeSup.h"
     #include "epicsGeneralTime.h"
     
    +/* Change 'undef' to 'define' to turn on debug statements: */
    +#undef DEBUG_GENERAL_TIME
    +
    +#ifdef DEBUG_GENERAL_TIME
    +    int generalTimeDebug = 10;
    +#   define IFDEBUG(n) \
    +        if (generalTimeDebug >= n) /* block or statement */
    +#else
    +#   define IFDEBUG(n) \
    +        if(0) /* Compiler will elide the block or statement */
    +#endif
     
     /* Declarations */
     
    @@ -65,6 +76,7 @@ static struct {
     
     static epicsThreadOnceId onceId = EPICS_THREAD_ONCE_INIT;
     
    +static const char * const tsfmt = "%Y-%m-%d %H:%M:%S.%09f";
     
     /* Implementation */
     
    @@ -75,6 +87,9 @@ static void generalTime_InitOnce(void *dummy)
     
         ellInit(>Pvt.eventProviders);
         gtPvt.eventListLock = epicsMutexMustCreate();
    +
    +    IFDEBUG(1)
    +        printf("General Time Initialized\n");
     }
     
     void generalTime_Init(void)
    @@ -90,44 +105,103 @@ int generalTimeGetExceptPriority(epicsTimeStamp *pDest, int *pPrio, int ignore)
     
         generalTime_Init();
     
    +    IFDEBUG(2)
    +        printf("generalTimeGetExceptPriority(ignore=%d)\n", ignore);
    +
         epicsMutexMustLock(gtPvt.timeListLock);
         for (ptp = (gtProvider *)ellFirst(>Pvt.timeProviders);
              ptp; ptp = (gtProvider *)ellNext(&ptp->node)) {
    -        if (ptp->priority == ignore)
    +        if ((ignore > 0 && ptp->priority == ignore) ||
    +            (ignore < 0 && ptp->priority != -ignore))
                 continue;
     
             status = ptp->get.Time(pDest);
             if (status == epicsTimeOK) {
    -            /* check time is monotonic */
    -            if (epicsTimeGreaterThanEqual(pDest, >Pvt.lastProvidedTime)) {
    -                gtPvt.lastProvidedTime = *pDest;
    -                if (ignore == 0)
    -                    gtPvt.lastTimeProvider = ptp;
    -                if (pPrio)
    -                    *pPrio = ptp->priority;
    -            } else {
    -                int key;
    -
    -                *pDest = gtPvt.lastProvidedTime;
    -                if (pPrio)
    -                    *pPrio = gtPvt.lastTimeProvider->priority;
    -                key = epicsInterruptLock();
    -                gtPvt.ErrorCounts++;
    -                epicsInterruptUnlock(key);
    -            }
    +            /* No ratchet, time from this routine may go backwards */
    +            if (pPrio)
    +                *pPrio = ptp->priority;
                 break;
             }
    +        else IFDEBUG(2)
    +            printf("gTGExP provider '%s' returned error\n", ptp->name);
         }
    -    if (status && ignore == 0)
    -        gtPvt.lastTimeProvider = NULL;
         epicsMutexUnlock(gtPvt.timeListLock);
     
    +    IFDEBUG(2) {
    +        if (ptp && status == epicsTimeOK) {
    +            char buff[40];
    +
    +            epicsTimeToStrftime(buff, sizeof(buff), tsfmt, pDest);
    +            printf("gTGExP returning %s from provider '%s'\n",
    +                buff, ptp->name);
    +        }
    +        else
    +            printf("gTGExP returning error\n");
    +    }
    +
         return status;
     }
     
     int epicsShareAPI epicsTimeGetCurrent(epicsTimeStamp *pDest)
     {
    -    return generalTimeGetExceptPriority(pDest, NULL, 0);
    +    gtProvider *ptp;
    +    int status = S_time_noProvider;
    +    epicsTimeStamp ts;
    +
    +    generalTime_Init();
    +
    +    IFDEBUG(20)
    +        printf("epicsTimeGetCurrent()\n");
    +
    +    epicsMutexMustLock(gtPvt.timeListLock);
    +    for (ptp = (gtProvider *)ellFirst(>Pvt.timeProviders);
    +         ptp; ptp = (gtProvider *)ellNext(&ptp->node)) {
    +
    +        status = ptp->get.Time(&ts);
    +        if (status == epicsTimeOK) {
    +            /* check time is monotonic */
    +            if (epicsTimeGreaterThanEqual(&ts, >Pvt.lastProvidedTime)) {
    +                *pDest = ts;
    +                gtPvt.lastProvidedTime = ts;
    +                gtPvt.lastTimeProvider = ptp;
    +            } else {
    +                int key;
    +
    +                *pDest = gtPvt.lastProvidedTime;
    +                key = epicsInterruptLock();
    +                gtPvt.ErrorCounts++;
    +                epicsInterruptUnlock(key);
    +
    +                IFDEBUG(10) {
    +                    char last[40], buff[40];
    +
    +                    epicsTimeToStrftime(last, sizeof(last), tsfmt,
    +                        >Pvt.lastProvidedTime);
    +                    epicsTimeToStrftime(buff, sizeof(buff), tsfmt, &ts);
    +                    printf("eTGC provider '%s' returned older time\n"
    +                        "    %s, using %s instead\n", ptp->name, buff, last);
    +                }
    +            }
    +            break;
    +        }
    +    }
    +    if (status)
    +        gtPvt.lastTimeProvider = NULL;
    +    epicsMutexUnlock(gtPvt.timeListLock);
    +
    +    IFDEBUG(20) {
    +        if (ptp && status == epicsTimeOK) {
    +            char buff[40];
    +
    +            epicsTimeToStrftime(buff, sizeof(buff), tsfmt, &ts);
    +            printf("eTGC returning %s from provider '%s'\n",
    +                buff, ptp->name);
    +        }
    +        else
    +            printf("eTGC returning error\n");
    +    }
    +
    +    return status;
     }
     
     int epicsTimeGetCurrentInt(epicsTimeStamp *pDest)
    @@ -135,8 +209,11 @@ int epicsTimeGetCurrentInt(epicsTimeStamp *pDest)
         gtProvider *ptp = gtPvt.lastTimeProvider;
     
         if (ptp == NULL ||
    -        ptp->getInt.Time == NULL)
    -	return S_time_noProvider;
    +        ptp->getInt.Time == NULL) {
    +        IFDEBUG(20)
    +            epicsInterruptContextMessage("eTGCInt: No support\n");
    +        return S_time_noProvider;
    +    }
     
         return ptp->getInt.Time(pDest);
     }
    @@ -147,9 +224,13 @@ static int generalTimeGetEventPriority(epicsTimeStamp *pDest, int eventNumber,
     {
         gtProvider *ptp;
         int status = S_time_noProvider;
    +    epicsTimeStamp ts;
     
         generalTime_Init();
     
    +    IFDEBUG(2)
    +        printf("generalTimeGetEventPriority(eventNum=%d)\n", eventNumber);
    +
         if ((eventNumber < 0 || eventNumber >= NUM_TIME_EVENTS) &&
             (eventNumber != epicsTimeEventBestTime))
             return S_time_badEvent;
    @@ -158,16 +239,17 @@ static int generalTimeGetEventPriority(epicsTimeStamp *pDest, int eventNumber,
         for (ptp = (gtProvider *)ellFirst(>Pvt.eventProviders);
              ptp; ptp = (gtProvider *)ellNext(&ptp->node)) {
     
    -        status = ptp->get.Event(pDest, eventNumber);
    +        status = ptp->get.Event(&ts, eventNumber);
             if (status == epicsTimeOK) {
                 gtPvt.lastEventProvider = ptp;
                 if (pPrio)
                     *pPrio = ptp->priority;
     
                 if (eventNumber == epicsTimeEventBestTime) {
    -                if (epicsTimeGreaterThanEqual(pDest,
    +                if (epicsTimeGreaterThanEqual(&ts,
                             >Pvt.lastProvidedBestTime)) {
    -                    gtPvt.lastProvidedBestTime = *pDest;
    +                    *pDest = ts;
    +                    gtPvt.lastProvidedBestTime = ts;
                     } else {
                         int key;
     
    @@ -175,11 +257,23 @@ static int generalTimeGetEventPriority(epicsTimeStamp *pDest, int eventNumber,
                         key = epicsInterruptLock();
                         gtPvt.ErrorCounts++;
                         epicsInterruptUnlock(key);
    +
    +                    IFDEBUG(10) {
    +                        char last[40], buff[40];
    +
    +                        epicsTimeToStrftime(last, sizeof(last), tsfmt,
    +                            >Pvt.lastProvidedBestTime);
    +                        epicsTimeToStrftime(buff, sizeof(buff), tsfmt, &ts);
    +                        printf("gTGEvP provider '%s' returned older time\n"
    +                            "    %s, using %s instead\n",
    +                            ptp->name, buff, last);
    +                    }
                     }
                 } else {
                     if (epicsTimeGreaterThanEqual(pDest,
                             >Pvt.eventTime[eventNumber])) {
    -                    gtPvt.eventTime[eventNumber] = *pDest;
    +                    *pDest = ts;
    +                    gtPvt.eventTime[eventNumber] = ts;
                     } else {
                         int key;
     
    @@ -188,14 +282,39 @@ static int generalTimeGetEventPriority(epicsTimeStamp *pDest, int eventNumber,
                         gtPvt.ErrorCounts++;
                         epicsInterruptUnlock(key);
                     }
    +
    +                    IFDEBUG(10) {
    +                        char last[40], buff[40];
    +
    +                        epicsTimeToStrftime(last, sizeof(last), tsfmt,
    +                            >Pvt.lastProvidedBestTime);
    +                        epicsTimeToStrftime(buff, sizeof(buff), tsfmt, &ts);
    +                        printf("gTGEvP provider '%s' returned older time\n"
    +                            "    %s, using %s instead\n",
    +                            ptp->name, buff, last);
    +                    }
                 }
                 break;
             }
    +        else IFDEBUG(2)
    +            printf("gTGEvP provider '%s' returned error\n", ptp->name);
         }
         if (status)
             gtPvt.lastEventProvider = NULL;
         epicsMutexUnlock(gtPvt.eventListLock);
     
    +    IFDEBUG(10) {
    +        if (ptp && status == epicsTimeOK) {
    +            char buff[40];
    +
    +            epicsTimeToStrftime(buff, sizeof(buff), tsfmt, &ts);
    +            printf("gTGEvP returning %s from provider '%s'\n",
    +                buff, ptp->name);
    +        }
    +        else
    +            printf("gTGEvP returning error\n");
    +    }
    +
         return status;
     }
     
    @@ -216,8 +335,11 @@ int epicsTimeGetEventInt(epicsTimeStamp *pDest, int eventNumber)
             gtProvider *ptp = gtPvt.lastEventProvider;
     
             if (ptp == NULL ||
    -            ptp->getInt.Event == NULL)
    -	    return S_time_noProvider;
    +            ptp->getInt.Event == NULL) {
    +            IFDEBUG(20)
    +                epicsInterruptContextMessage("eTGEvInt: No support\n");
    +            return S_time_noProvider;
    +        }
     
             return ptp->getInt.Event(pDest, eventNumber);
         }
    @@ -258,7 +380,7 @@ static gtProvider * findProvider(ELLLIST *plist, epicsMutexId lock,
     
         for (ptp = (gtProvider *)ellFirst(plist);
              ptp; ptp = (gtProvider *)ellNext(&ptp->node)) {
    -        if (ptp->priority == ptp->priority &&
    +        if (ptp->priority == priority &&
                 !strcmp(ptp->name, name))
                 break;
         }
    @@ -288,6 +410,9 @@ int generalTimeRegisterEventProvider(const char *name, int priority,
     
         insertProvider(ptp, >Pvt.eventProviders, gtPvt.eventListLock);
     
    +    IFDEBUG(1)
    +        printf("Registered event provider '%s' at %d\n", name, priority);
    +
         return epicsTimeOK;
     }
     
    @@ -301,6 +426,9 @@ int generalTimeAddIntEventProvider(const char *name, int priority,
     
         ptp->getInt.Event = getEvent;
     
    +    IFDEBUG(1)
    +        printf("Event provider '%s' is interrupt-callable\n", name);
    +
         return epicsTimeOK;
     }
     
    @@ -325,6 +453,9 @@ int generalTimeRegisterCurrentProvider(const char *name, int priority,
     
         insertProvider(ptp, >Pvt.timeProviders, gtPvt.timeListLock);
     
    +    IFDEBUG(1)
    +        printf("Registered time provider '%s' at %d\n", name, priority);
    +
         return epicsTimeOK;
     }
     
    @@ -338,6 +469,9 @@ int generalTimeAddIntCurrentProvider(const char *name, int priority,
     
         ptp->getInt.Time = getTime;
     
    +    IFDEBUG(1)
    +        printf("Time provider '%s' is interrupt-callable\n", name);
    +
         return epicsTimeOK;
     }
     
    diff --git a/src/libCom/osi/epicsMessageQueue.cpp b/src/libCom/osi/epicsMessageQueue.cpp
    index 1561fbf7d..1527b3d3a 100644
    --- a/src/libCom/osi/epicsMessageQueue.cpp
    +++ b/src/libCom/osi/epicsMessageQueue.cpp
    @@ -8,8 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*
    - *      $Revision-Id$
    - *
      *      Author  W. Eric Norum
      *              norume@aps.anl.gov
      *              630 252 4793
    diff --git a/src/libCom/osi/epicsMessageQueue.h b/src/libCom/osi/epicsMessageQueue.h
    index 0c18dd545..c6a98fd47 100644
    --- a/src/libCom/osi/epicsMessageQueue.h
    +++ b/src/libCom/osi/epicsMessageQueue.h
    @@ -8,8 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*
    - *      $Revision-Id$
    - *
      *      Author  W. Eric Norum
      *              norume@aps.anl.gov
      *              630 252 4793
    @@ -28,8 +26,6 @@ typedef struct epicsMessageQueueOSD *epicsMessageQueueId;
     
     #ifdef __cplusplus
     
    -#include "locationException.h"
    -
     class epicsShareClass epicsMessageQueue {
     public:
         epicsMessageQueue ( unsigned int capacity,
    diff --git a/src/libCom/osi/epicsMutex.cpp b/src/libCom/osi/epicsMutex.cpp
    index 8580af204..7c8d05056 100644
    --- a/src/libCom/osi/epicsMutex.cpp
    +++ b/src/libCom/osi/epicsMutex.cpp
    @@ -7,7 +7,7 @@
     * and higher are distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* epicsMutex.c */
    +/* epicsMutex.cpp */
     /*	Author: Marty Kraimer and Jeff Hill	Date: 03APR01	*/
     
     /*
    diff --git a/src/libCom/osi/epicsMutex.h b/src/libCom/osi/epicsMutex.h
    index b24e5ecb8..6d74f9599 100644
    --- a/src/libCom/osi/epicsMutex.h
    +++ b/src/libCom/osi/epicsMutex.h
    @@ -22,11 +22,14 @@ typedef enum {
     #ifdef __cplusplus
     
     #include "compilerDependencies.h"
    +#include "epicsGuard.h"
     
     #define newEpicsMutex new epicsMutex(__FILE__,__LINE__)
     
     class epicsShareClass epicsMutex {
     public:
    +    typedef epicsGuard guard_t;
    +    typedef epicsGuard release_t;
         class mutexCreateFailed; /* exception payload */
         class invalidMutex; /* exception payload */
         epicsMutex ();
    @@ -44,6 +47,8 @@ private:
     
     class epicsShareClass epicsDeadlockDetectMutex {
     public:
    +    typedef epicsGuard guard_t;
    +    typedef epicsGuard release_t;
         typedef unsigned hierarchyLevel_t;
         epicsDeadlockDetectMutex ( unsigned hierarchyLevel_t );
         ~epicsDeadlockDetectMutex ();
    diff --git a/src/libCom/osi/epicsReadline.c b/src/libCom/osi/epicsReadline.c
    index d410ac91e..936cbce99 100644
    --- a/src/libCom/osi/epicsReadline.c
    +++ b/src/libCom/osi/epicsReadline.c
    @@ -5,7 +5,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/* $Revision-Id$ */
     /* Author:  Eric Norum Date: 12DEC2001 */
     
     #include 
    diff --git a/src/libCom/osi/epicsThread.cpp b/src/libCom/osi/epicsThread.cpp
    index f59c0bd1a..892d73de0 100644
    --- a/src/libCom/osi/epicsThread.cpp
    +++ b/src/libCom/osi/epicsThread.cpp
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     //
    -// $Revision-Id$
    -//
     // Author: Jeff Hill
     //
     
    diff --git a/src/libCom/osi/epicsTime.cpp b/src/libCom/osi/epicsTime.cpp
    index 59514c2f7..6dd1d3f97 100644
    --- a/src/libCom/osi/epicsTime.cpp
    +++ b/src/libCom/osi/epicsTime.cpp
    @@ -6,15 +6,15 @@
     * Copyright (c) 2007 UChicago Argonne LLC, as Operator of Argonne
     *     National Laboratory.
     * EPICS BASE is distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     /* epicsTime.cpp */
     /* Author Jeffrey O. Hill */
     
     // Notes:
    -// 1) The epicsTime::nSec field is not public and so it could be 
    -// changed to work more like the fractional seconds field in the NTP time 
    -// stamp. That would significantly improve the precision of epicsTime on 
    +// 1) The epicsTime::nSec field is not public and so it could be
    +// changed to work more like the fractional seconds field in the NTP time
    +// stamp. That would significantly improve the precision of epicsTime on
     // 64 bit architectures.
     //
     
    @@ -26,7 +26,7 @@
     #include 
     #include 
     #include 
    -#include  // vxWorks 6.0 requires this include 
    +#include  // vxWorks 6.0 requires this include
     
     #define epicsExportSharedSymbols
     #include "locationException.h"
    @@ -37,7 +37,7 @@
     #include "osiSock.h" /* pull in struct timeval */
     #include "epicsStdio.h"
     
    -static const char pEpicsTimeVersion[] = 
    +static const char pEpicsTimeVersion[] =
         "@(#) " EPICS_VERSION_STRING ", Common Utilities Library " __DATE__;
     
     //
    @@ -60,11 +60,13 @@ static const unsigned long NTP_TIME_AT_EPICS_EPOCH =
     //
     // epicsTime (const unsigned long secIn, const unsigned long nSecIn)
     //
    -inline epicsTime::epicsTime (const unsigned long secIn, 
    -                             const unsigned long nSecIn) :
    -    secPastEpoch ( nSecIn / nSecPerSec + secIn ), 
    -    nSec ( nSecIn % nSecPerSec ) 
    +inline epicsTime::epicsTime (const unsigned long secIn, const unsigned long nSecIn) :
    +    secPastEpoch ( secIn ), nSec ( nSecIn )
     {
    +    if (nSecIn >= nSecPerSec) {
    +        this->secPastEpoch += nSecIn / nSecPerSec;
    +        this->nSec = nSecIn % nSecPerSec;
    +    }
     }
     
     //
    @@ -93,7 +95,7 @@ epicsTimeLoadTimeInit::epicsTimeLoadTimeInit ()
          * the ANSI epoch (1/1/1970 00:00:00UTC)
          * Convert this offset into time_t units, however this must not be
          * calculated using local time (i.e. using mktime() or similar), since
    -     * in the UK the ANSI Epoch had daylight saving time in effect, and 
    +     * in the UK the ANSI Epoch had daylight saving time in effect, and
          * the value calculated would be 3600 seconds wrong.*/
         this->epicsEpochOffset =
             (double) POSIX_TIME_AT_EPICS_EPOCH / this->time_tSecPerTick;
    @@ -103,7 +105,7 @@ epicsTimeLoadTimeInit::epicsTimeLoadTimeInit ()
             this->epicsEpochOffset >= 0) {
             // We can use simpler code on Posix-compliant systems
             this->useDiffTimeOptimization = true;
    -        this->epicsEpochOffsetAsAnUnsignedLong = 
    +        this->epicsEpochOffsetAsAnUnsignedLong =
                 static_cast(this->epicsEpochOffset);
         } else {
             // Forced to use the slower but correct code
    @@ -113,47 +115,26 @@ epicsTimeLoadTimeInit::epicsTimeLoadTimeInit ()
     }
     
     //
    -// epicsTime::addNanoSec ()
    +// private epicsTime::addNanoSec ()
     //
    -// The nano-second field of several of the the UNIX time stamp formats 
    -// field is stored in the C type "long".
    +// Most formats keep the nSec value as an unsigned long, so are +ve.
    +// struct timeval's tv_usec may be -1, but I think that means error,
    +// so this private method never needs to handle -ve offsets.
     //
     void epicsTime :: addNanoSec ( long nSecAdj )
     {
    -    //
    -    // After optimizing this function we now have a larger code which 
    -    // uses only unsigned integer, and not floating point, arithmetic.
    -    // This change benefits embedded CPU's lacking a floating point 
    -    // co-processor at the expense of some additional code to maintain.
    -    //
    -    // We hope that all CPU's we run on provide at least an integer 
    -    // divide instruction which should enable this implementation
    -    // to be more efficient than implementations based on branching; 
    -    // this is presuming that we will run on pipelined architectures.
    -    //
    -    // Overflow and underflow is expected; in the future we might
    -    // operate close to, the modulo of, the EPICS epic.
    -    //
    -    // We are depending on the normalize operation in the private 
    -    // constructor used below.
    -    //
    -    // joh 11-04-2012
    -    //
    -    if ( nSecAdj >= 0 ) {
    -        const unsigned long nSecPlus = 
    -                static_cast  ( nSecAdj );
    -        const unsigned long nSecPlusAdj = nSecPlus % nSecPerSec;
    -        const unsigned long secPlusAdj = nSecPlus / nSecPerSec;
    -        *this = epicsTime ( this->secPastEpoch+secPlusAdj, 
    -                                this->nSec+nSecPlusAdj );
    +    if (nSecAdj <= 0)
    +        return;
    +
    +    if (static_cast(nSecAdj) >= nSecPerSec) {
    +        this->secPastEpoch += nSecAdj / nSecPerSec;
    +        nSecAdj %= nSecPerSec;
         }
    -    else {
    -        const unsigned long nSecMinus = 
    -                static_cast  ( -nSecAdj );
    -        const unsigned long nSecMinusAdj = nSecMinus % nSecPerSec;
    -        const unsigned long secMinusAdj = nSecMinus / nSecPerSec;
    -        *this = epicsTime ( this->secPastEpoch - secMinusAdj - 1u, 
    -                            this->nSec + nSecPerSec - nSecMinusAdj );
    +
    +    this->nSec += nSecAdj;  // Can't overflow
    +    if (this->nSec >= nSecPerSec) {
    +        this->secPastEpoch++;
    +        this->nSec -= nSecPerSec;
         }
     }
     
    @@ -166,11 +147,11 @@ epicsTime::epicsTime ( const time_t_wrapper & ansiTimeTicks )
         static epicsTimeLoadTimeInit & lti = * new epicsTimeLoadTimeInit ();
     
         //
    -    // try to directly map time_t into an unsigned long integer because this is 
    +    // try to directly map time_t into an unsigned long integer because this is
         // faster on systems w/o hardware floating point and a simple integer type time_t.
         //
         if ( lti.useDiffTimeOptimization ) {
    -        // LONG_MAX is used here and not ULONG_MAX because some systems (linux) 
    +        // LONG_MAX is used here and not ULONG_MAX because some systems (linux)
             // still store time_t as a long.
             if ( ansiTimeTicks.ts > 0 && ansiTimeTicks.ts <= LONG_MAX ) {
                 unsigned long ticks = static_cast < unsigned long > ( ansiTimeTicks.ts );
    @@ -186,8 +167,8 @@ epicsTime::epicsTime ( const time_t_wrapper & ansiTimeTicks )
         }
     
         //
    -    // otherwise map time_t, which ANSI C and POSIX define as any arithmetic type, 
    -    // into type double 
    +    // otherwise map time_t, which ANSI C and POSIX define as any arithmetic type,
    +    // into type double
         //
         double sec = ansiTimeTicks.ts * lti.time_tSecPerTick - lti.epicsEpochOffset;
     
    @@ -209,14 +190,14 @@ epicsTime::epicsTime ( const time_t_wrapper & ansiTimeTicks )
         this->nSec = static_cast  ( ( sec-this->secPastEpoch ) * nSecPerSec );
     }
     
    -epicsTime::epicsTime (const epicsTimeStamp &ts) 
    +epicsTime::epicsTime (const epicsTimeStamp &ts)
     {
         if ( ts.nsec < nSecPerSec ) {
             this->secPastEpoch = ts.secPastEpoch;
             this->nSec = ts.nsec;
         }
         else {
    -        throw std::logic_error ( 
    +        throw std::logic_error (
                 "epicsTimeStamp has overflow in nano-seconds field" );
         }
     }
    @@ -262,7 +243,7 @@ epicsTime::operator time_t_wrapper () const
                return wrap;
            }
         }
    -    
    +
         //
         // map type double into time_t which ansi C defines as some arithmetic type
         //
    @@ -317,20 +298,82 @@ epicsTime::operator gm_tm_nano_sec () const
     //
     epicsTime::epicsTime (const local_tm_nano_sec &tm)
     {
    -    static const time_t mktimeFailure = static_cast  (-1);
    -    time_t_wrapper ansiTimeTicks;
         struct tm tmp = tm.ansi_tm;
    +    time_t_wrapper ansiTimeTicks = { mktime (&tmp) };
     
    -    ansiTimeTicks.ts = mktime (&tmp);
    -    if (ansiTimeTicks.ts ==  mktimeFailure) {
    +    static const time_t mktimeError = static_cast  (-1);
    +    if (ansiTimeTicks.ts == mktimeError) {
             throwWithLocation ( formatProblemWithStructTM () );
         }
     
    -    *this = epicsTime (ansiTimeTicks);
    +    *this = epicsTime(ansiTimeTicks);
    +    this->addNanoSec(tm.nSec);
    +}
     
    -    unsigned long nSecAdj = tm.nSec % nSecPerSec;
    -    unsigned long secAdj = tm.nSec / nSecPerSec;
    -    *this = epicsTime ( this->secPastEpoch+secAdj, this->nSec+nSecAdj );
    +//
    +// epicsTime (const gm_tm_nano_sec &tm)
    +//
    +
    +// do conversion avoiding the timezone mechanism
    +static inline int is_leap(int year)
    +{
    +    if (year % 400 == 0)
    +        return 1;
    +    if (year % 100 == 0)
    +        return 0;
    +    if (year % 4 == 0)
    +        return 1;
    +    return 0;
    +}
    +
    +static inline int days_from_0(int year)
    +{
    +    year--;
    +    return 365 * year + (year / 400) - (year / 100) + (year / 4);
    +}
    +
    +static inline int days_from_1970(int year)
    +{
    +    static const int days_from_0_to_1970 = days_from_0(1970);
    +    return days_from_0(year) - days_from_0_to_1970;
    +}
    +
    +static inline int days_from_1jan(int year, int month, int day)
    +{
    +    static const int days[2][12] =
    +    {
    +        { 0,31,59,90,120,151,181,212,243,273,304,334},
    +        { 0,31,60,91,121,152,182,213,244,274,305,335}
    +    };
    +    return days[is_leap(year)][month-1] + day - 1;
    +}
    +
    +epicsTime::epicsTime (const gm_tm_nano_sec &tm)
    +{
    +    int year = tm.ansi_tm.tm_year + 1900;
    +    int month = tm.ansi_tm.tm_mon;
    +    if (month > 11) {
    +        year += month / 12;
    +        month %= 12;
    +    } else if (month < 0) {
    +        int years_diff = (-month + 11) / 12;
    +        year  -= years_diff;
    +        month += 12 * years_diff;
    +    }
    +    month++;
    +
    +    int day = tm.ansi_tm.tm_mday;
    +    int day_of_year = days_from_1jan(year, month, day);
    +    int days_since_epoch = days_from_1970(year) + day_of_year;
    +
    +    time_t_wrapper ansiTimeTicks;
    +    ansiTimeTicks.ts = ((days_since_epoch
    +        * 24 + tm.ansi_tm.tm_hour)
    +        * 60 + tm.ansi_tm.tm_min)
    +        * 60 + tm.ansi_tm.tm_sec;
    +
    +    *this = epicsTime(ansiTimeTicks);
    +    this->addNanoSec(tm.nSec);
     }
     
     //
    @@ -372,9 +415,9 @@ epicsTime::operator struct timeval () const
         // a direct assignment. On other systems I dont know that we can
         // guarantee that time_t and timeval :: tv_sec will have the
         // same epoch or have the same scaling factor to discrete seconds.
    -    // For example, on windows time_t changed recently to a 64 bit 
    +    // For example, on windows time_t changed recently to a 64 bit
         // quantity but timeval is still a long. That can cause problems
    -    // on 32 bit systems. So technically, we should have an os 
    +    // on 32 bit systems. So technically, we should have an os
         // dependent conversion between time_t and timeval :: tv_sec?
         ts.tv_sec = ansiTimeTicks.ts;
         ts.tv_usec = static_cast < long > ( this->nSec / nSecPerUSec );
    @@ -391,9 +434,9 @@ epicsTime::epicsTime (const struct timeval &ts)
         // a direct assignment. On other systems I dont know that we can
         // guarantee that time_t and timeval :: tv_sec will have the
         // same epoch or have the same scaling factor to discrete seconds.
    -    // For example, on windows time_t changed recently to a 64 bit 
    +    // For example, on windows time_t changed recently to a 64 bit
         // quantity but timeval is still a long. That can cause problems
    -    // on 32 bit systems. So technically, we should have an os 
    +    // on 32 bit systems. So technically, we should have an os
         // dependent conversion between time_t and timeval :: tv_sec?
         ansiTimeTicks.ts = ts.tv_sec;
         *this = epicsTime (ansiTimeTicks);
    @@ -415,7 +458,7 @@ epicsTime::operator l_fp () const
     {
         l_fp ts;
         ts.l_ui = this->secPastEpoch + NTP_TIME_AT_EPICS_EPOCH;
    -    ts.l_uf = static_cast < unsigned long > 
    +    ts.l_uf = static_cast < unsigned long >
             ( ( this->nSec * NTP_FRACTION_DENOMINATOR ) / nSecPerSec );
         return ts;
     }
    @@ -426,14 +469,14 @@ epicsTime::operator l_fp () const
     epicsTime::epicsTime ( const l_fp & ts )
     {
         this->secPastEpoch = ts.l_ui - NTP_TIME_AT_EPICS_EPOCH;
    -    this->nSec = static_cast < unsigned long > 
    +    this->nSec = static_cast < unsigned long >
             ( ( ts.l_uf / NTP_FRACTION_DENOMINATOR ) * nSecPerSec );
     }
     
     epicsTime::operator epicsTimeStamp () const
     {
         if ( this->nSec >= nSecPerSec ) {
    -        throw std::logic_error ( 
    +        throw std::logic_error (
                 "epicsTimeStamp has overflow in nano-seconds field?" );
         }
         epicsTimeStamp ts;
    @@ -444,7 +487,7 @@ epicsTime::operator epicsTimeStamp () const
         // on 64 bit hosts than the original epicsTimeStamp::secPastEpoch. The
         // epicsTimeStamp::secPastEpoch is based on epicsUInt32 so that it will
         // match the original network protocol. Of course one can anticipate
    -    // that eventually, a epicsUInt64 based network time stamp will be 
    +    // that eventually, a epicsUInt64 based network time stamp will be
         // introduced when 64 bit architectures are more ubiquitous.
         //
         // Truncation usually works fine here because the routines in this code
    @@ -458,14 +501,14 @@ epicsTime::operator epicsTimeStamp () const
         return ts;
     }
     
    -// Break up a format string into "%0f" 
    -// (where  in an unsigned integer) 
    +// Break up a format string into "%0f"
    +// (where  in an unsigned integer)
     // Result:
     // A) Copies a prefix which is valid for ANSI strftime into the supplied
     // buffer setting the buffer to an empty string if no prefix is present.
    -// B) Indicates whether a valid "%0f]" is present or not and if so 
    +// B) Indicates whether a valid "%0f]" is present or not and if so
     // specifying its nnnn
    -// C) returning a pointer to the postfix (which might be passed again 
    +// C) returning a pointer to the postfix (which might be passed again
     // to fracFormatFind.
     static const char * fracFormatFind (
         const char * const pFormat,
    @@ -529,8 +572,8 @@ static const char * fracFormatFind (
     //
     // size_t epicsTime::strftime ()
     //
    -size_t epicsTime::strftime ( 
    -    char * pBuff, size_t bufLength, const char * pFormat ) const 
    +size_t epicsTime::strftime (
    +    char * pBuff, size_t bufLength, const char * pFormat ) const
     {
         if ( bufLength == 0u ) {
             return 0u;
    @@ -547,15 +590,15 @@ size_t epicsTime::strftime (
         const char * pFmt = pFormat;
         size_t bufLenLeft = bufLength;
         while ( *pFmt != '\0' && bufLenLeft > 1 ) {
    -        // look for "%0f" at the end (used for fractional second formatting)        
    +        // look for "%0f" at the end (used for fractional second formatting)
             char strftimePrefixBuf [256];
             bool fracFmtFound;
             unsigned long fracWid = 0;
             pFmt = fracFormatFind (
    -            pFmt, 
    +            pFmt,
                 strftimePrefixBuf, sizeof ( strftimePrefixBuf ),
                 fracFmtFound, fracWid );
    -            
    +
             // nothing more in the string, then quit
             if ( ! ( strftimePrefixBuf[0] != '\0' || fracFmtFound ) ) {
                 break;
    @@ -657,7 +700,7 @@ void epicsTime::show ( unsigned level ) const
         if ( level > 1 ) {
             // this also suppresses the "defined, but not used"
             // warning message
    -        printf ( "epicsTime: revision \"%s\"\n", 
    +        printf ( "epicsTime: revision \"%s\"\n",
                 pEpicsTimeVersion );
         }
     
    @@ -704,10 +747,10 @@ epicsTime epicsTime::operator + (const double &rhs) const
     }
     
     //
    -// operator - 
    +// operator -
     //
     // To make this code robust during timestamp rollover events
    -// time stamp differences greater than one half full scale are 
    +// time stamp differences greater than one half full scale are
     // interpreted as rollover situations:
     //
     // when RHS is greater than THIS:
    @@ -729,7 +772,7 @@ double epicsTime::operator - (const epicsTime &rhs) const
         // so the unsigned to signed conversion is ok
         //
         if (this->nSec>=rhs.nSec) {
    -        nSecRes = this->nSec - rhs.nSec;    
    +        nSecRes = this->nSec - rhs.nSec;
         }
         else {
             nSecRes = rhs.nSec - this->nSec;
    @@ -746,7 +789,7 @@ double epicsTime::operator - (const epicsTime &rhs) const
             if (secRes > ULONG_MAX/2) {
                 //
                 // In this situation where the difference is more than
    -            // 68 years assume that the seconds counter has rolled 
    +            // 68 years assume that the seconds counter has rolled
                 // over and compute the "wrap around" difference
                 //
                 secRes = 1 + (ULONG_MAX-secRes);
    @@ -761,7 +804,7 @@ double epicsTime::operator - (const epicsTime &rhs) const
             if (secRes > ULONG_MAX/2) {
                 //
                 // In this situation where the difference is more than
    -            // 68 years assume that the seconds counter has rolled 
    +            // 68 years assume that the seconds counter has rolled
                 // over and compute the "wrap around" difference
                 //
                 secRes = 1 + (ULONG_MAX-secRes);
    @@ -770,7 +813,7 @@ double epicsTime::operator - (const epicsTime &rhs) const
             }
         }
     
    -    return secRes + nSecRes/nSecPerSec; 
    +    return secRes + nSecRes/nSecPerSec;
     }
     
     //
    @@ -791,7 +834,7 @@ bool epicsTime::operator <= (const epicsTime &rhs) const
             else {
                 //
                 // In this situation where the difference is more than
    -            // 69 years assume that the seconds counter has rolled 
    +            // 69 years assume that the seconds counter has rolled
                 // over and compute the "wrap around" result
                 //
                 rc = false;
    @@ -808,7 +851,7 @@ bool epicsTime::operator <= (const epicsTime &rhs) const
             else {
                 //
                 // In this situation where the difference is more than
    -            // 69 years assume that the seconds counter has rolled 
    +            // 69 years assume that the seconds counter has rolled
                 // over and compute the "wrap around" result
                 //
                 rc = true;
    @@ -843,7 +886,7 @@ bool epicsTime::operator < (const epicsTime &rhs) const
             else {
                 //
                 // In this situation where the difference is more than
    -            // 69 years assume that the seconds counter has rolled 
    +            // 69 years assume that the seconds counter has rolled
                 // over and compute the "wrap around" result
                 //
                 rc = false;
    @@ -860,7 +903,7 @@ bool epicsTime::operator < (const epicsTime &rhs) const
             else {
                 //
                 // In this situation where the difference is more than
    -            // 69 years assume that the seconds counter has rolled 
    +            // 69 years assume that the seconds counter has rolled
                 // over and compute the "wrap around" result
                 //
                 rc = true;
    @@ -881,7 +924,7 @@ extern "C" {
         //
         // ANSI C interface
         //
    -    // its too bad that these cant be implemented with inline functions 
    +    // its too bad that these cant be implemented with inline functions
         // at least when running the GNU compiler
         //
         epicsShareFunc int epicsShareAPI epicsTimeToTime_t (time_t *pDest, const epicsTimeStamp *pSrc)
    @@ -944,6 +987,19 @@ extern "C" {
             }
             return epicsTimeOK;
         }
    +    epicsShareFunc int epicsShareAPI epicsTimeFromGMTM (epicsTimeStamp *pDest, const struct tm *pSrc, unsigned long nSecSrc)
    +    {
    +        try {
    +            gm_tm_nano_sec tmns;
    +            tmns.ansi_tm = *pSrc;
    +            tmns.nSec = nSecSrc;
    +            *pDest = epicsTime (tmns);
    +        }
    +        catch (...) {
    +            return S_time_conversion;
    +        }
    +        return epicsTimeOK;
    +    }
         epicsShareFunc int epicsShareAPI epicsTimeToTimespec (struct timespec *pDest, const epicsTimeStamp *pSrc)
         {
             try {
    @@ -1075,4 +1131,3 @@ extern "C" {
             }
         }
     }
    -
    diff --git a/src/libCom/osi/epicsTime.h b/src/libCom/osi/epicsTime.h
    index bf8f77c87..149f6f2d3 100644
    --- a/src/libCom/osi/epicsTime.h
    +++ b/src/libCom/osi/epicsTime.h
    @@ -106,10 +106,12 @@ public:
         epicsTime & operator = ( const local_tm_nano_sec & );
     
         /*
    -     * convert to ANSI Cs "struct tm" (with nano seconds)
    +     * convert to and from ANSI Cs "struct tm" (with nano seconds)
          * adjusted for GM time (UTC)
          */
         operator gm_tm_nano_sec () const;
    +    epicsTime ( const gm_tm_nano_sec & );
    +    epicsTime & operator = ( const gm_tm_nano_sec & );
     
         /* convert to and from POSIX RTs "struct timespec" */
         operator struct timespec () const;
    @@ -201,13 +203,15 @@ epicsShareFunc int epicsShareAPI epicsTimeToTime_t (
     epicsShareFunc int epicsShareAPI epicsTimeFromTime_t (
         epicsTimeStamp * pDest, time_t src );
     
    -/*convert to and from ANSI C's "struct tm" with nano seconds */
    +/* convert to and from ANSI C's "struct tm" with nano seconds */
     epicsShareFunc int epicsShareAPI epicsTimeToTM (
         struct tm * pDest, unsigned long * pNSecDest, const epicsTimeStamp * pSrc );
     epicsShareFunc int epicsShareAPI epicsTimeToGMTM (
         struct tm * pDest, unsigned long * pNSecDest, const epicsTimeStamp * pSrc );
     epicsShareFunc int epicsShareAPI epicsTimeFromTM (
         epicsTimeStamp * pDest, const struct tm * pSrc, unsigned long nSecSrc );
    +epicsShareFunc int epicsShareAPI epicsTimeFromGMTM (
    +    epicsTimeStamp * pDest, const struct tm * pSrc, unsigned long nSecSrc );
     
     /* convert to and from POSIX RT's "struct timespec" */
     epicsShareFunc int epicsShareAPI epicsTimeToTimespec (
    @@ -319,6 +323,11 @@ inline epicsTime & epicsTime::operator = ( const local_tm_nano_sec & rhs )
         return *this = epicsTime ( rhs );
     }
     
    +inline epicsTime & epicsTime::operator = ( const gm_tm_nano_sec & rhs )
    +{
    +    return *this = epicsTime ( rhs );
    +}
    +
     inline epicsTime & epicsTime::operator = ( const struct timespec & rhs )
     {
         *this = epicsTime ( rhs );
    diff --git a/src/libCom/osi/os/Darwin/osdEnv.c b/src/libCom/osi/os/Darwin/osdEnv.c
    index 35517c1e9..ab3f93644 100644
    --- a/src/libCom/osi/os/Darwin/osdEnv.c
    +++ b/src/libCom/osi/os/Darwin/osdEnv.c
    @@ -5,8 +5,6 @@
     \*************************************************************************/
     /* osdEnv.c */
     /*
    - * $Revision-Id$
    - *
      * Author: Eric Norum
      *   Date: May 7, 2001
      *
    diff --git a/src/libCom/osi/os/Darwin/osdSock.h b/src/libCom/osi/os/Darwin/osdSock.h
    index dc0dcee91..1d4556eee 100644
    --- a/src/libCom/osi/os/Darwin/osdSock.h
    +++ b/src/libCom/osi/os/Darwin/osdSock.h
    @@ -1,11 +1,9 @@
     /*************************************************************************\
     * Copyright (c) 2002 The University of Saskatchewan
     * EPICS BASE is distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     /*
    - * $Revision-Id$
    - *
      * Author: Eric Norum
      */
     
    @@ -40,6 +38,7 @@ typedef socklen_t osiSocklen_t;
     #define SOCK_ENOBUFS ENOBUFS
     #define SOCK_ECONNRESET ECONNRESET
     #define SOCK_ETIMEDOUT ETIMEDOUT
    +#define SOCK_EACCES EACCES
     #define SOCK_EADDRINUSE EADDRINUSE
     #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
     #define SOCK_ECONNREFUSED ECONNREFUSED
    diff --git a/src/libCom/osi/os/Darwin/osdSockAddrReuse.cpp b/src/libCom/osi/os/Darwin/osdSockAddrReuse.cpp
    index a7bb3615c..869514160 100644
    --- a/src/libCom/osi/os/Darwin/osdSockAddrReuse.cpp
    +++ b/src/libCom/osi/os/Darwin/osdSockAddrReuse.cpp
    @@ -1,4 +1,3 @@
    -
     /*************************************************************************\
     * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
     *     National Laboratory.
    @@ -10,7 +9,6 @@
     \*************************************************************************/
     
     /*
    - * $Revision-Id$
      * Author: Jeff Hill
      */
     
    diff --git a/src/libCom/osi/os/Darwin/osdTime.h b/src/libCom/osi/os/Darwin/osdTime.h
    index 3abea1f14..d0c361404 100644
    --- a/src/libCom/osi/os/Darwin/osdTime.h
    +++ b/src/libCom/osi/os/Darwin/osdTime.h
    @@ -4,8 +4,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*
    - * $Revision-Id$
    - *
      * Author: Eric Norum
      */
     
    diff --git a/src/libCom/osi/os/Darwin/osiFileName.h b/src/libCom/osi/os/Darwin/osiFileName.h
    index 4004e82a4..a78118679 100644
    --- a/src/libCom/osi/os/Darwin/osiFileName.h
    +++ b/src/libCom/osi/os/Darwin/osiFileName.h
    @@ -5,8 +5,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*
    - * $Revision-Id$
    - *
      * Author: Eric Norum
      */
     
    diff --git a/src/libCom/osi/os/Linux/osdSock.h b/src/libCom/osi/os/Linux/osdSock.h
    index b32a16044..614f3f98d 100644
    --- a/src/libCom/osi/os/Linux/osdSock.h
    +++ b/src/libCom/osi/os/Linux/osdSock.h
    @@ -4,7 +4,7 @@
     * Copyright (c) 2002 The Regents of the University of California, as
     *     Operator of Los Alamos National Laboratory.
     * EPICS BASE is distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     
     /*
    @@ -42,6 +42,7 @@ typedef socklen_t osiSocklen_t;
     #define SOCK_ENOBUFS ENOBUFS
     #define SOCK_ECONNRESET ECONNRESET
     #define SOCK_ETIMEDOUT ETIMEDOUT
    +#define SOCK_EACCES EACCES
     #define SOCK_EADDRINUSE EADDRINUSE
     #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
     #define SOCK_ECONNREFUSED ECONNREFUSED
    @@ -72,4 +73,3 @@ typedef socklen_t osiSocklen_t;
     #define ifreq_size(pifreq) (sizeof(pifreq->ifr_name))
     
     #endif /*osdSockH*/
    -
    diff --git a/src/libCom/osi/os/Linux/osdTime.h b/src/libCom/osi/os/Linux/osdTime.h
    index 50788a025..988f8747f 100644
    --- a/src/libCom/osi/os/Linux/osdTime.h
    +++ b/src/libCom/osi/os/Linux/osdTime.h
    @@ -6,8 +6,6 @@
     \*************************************************************************/
     
     /*
    - * $Revision-Id$
    - *
      * Author: Eric Norum
      */
     
    diff --git a/src/libCom/osi/os/Linux/osiFileName.h b/src/libCom/osi/os/Linux/osiFileName.h
    index b79203992..3a6448d54 100644
    --- a/src/libCom/osi/os/Linux/osiFileName.h
    +++ b/src/libCom/osi/os/Linux/osiFileName.h
    @@ -10,8 +10,6 @@
     /*
      * osiFileName.h
      * Author: Jeff Hill
    - *
    - *
      */
     #ifndef osiFileNameH
     #define osiFileNameH
    diff --git a/src/libCom/osi/os/Linux/osiUnistd.h b/src/libCom/osi/os/Linux/osiUnistd.h
    index fc58f0b59..336a9a802 100644
    --- a/src/libCom/osi/os/Linux/osiUnistd.h
    +++ b/src/libCom/osi/os/Linux/osiUnistd.h
    @@ -8,16 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*  
    - *  $Revision-Id$
    - *
    - *                              
    - *                    L O S  A L A M O S
    - *              Los Alamos National Laboratory
    - *               Los Alamos, New Mexico 87545
    - *                                  
    - *  Copyright, 1986, The Regents of the University of California.
    - *                                  
    - *           
      *	Author Jeffrey O. Hill
      *	johill@lanl.gov
      *	505 665 1831
    diff --git a/src/libCom/osi/os/RTEMS/devLibVMEOSD.c b/src/libCom/osi/os/RTEMS/devLibVMEOSD.c
    index dfc5fcaf1..0a96bad1a 100644
    --- a/src/libCom/osi/os/RTEMS/devLibVMEOSD.c
    +++ b/src/libCom/osi/os/RTEMS/devLibVMEOSD.c
    @@ -6,7 +6,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     /*      RTEMS port by Till Straumann, 
      *            3/2002
    diff --git a/src/libCom/osi/os/RTEMS/epicsMMIO.h b/src/libCom/osi/os/RTEMS/epicsMMIO.h
    index 7db66704f..293886b78 100644
    --- a/src/libCom/osi/os/RTEMS/epicsMMIO.h
    +++ b/src/libCom/osi/os/RTEMS/epicsMMIO.h
    @@ -12,6 +12,8 @@
     #define EPICSMMIO_H
     
     #include 
    +#include 
    +#include 
     
     #if defined(_ARCH_PPC) || defined(__PPC__) || defined(__PPC)
     #  include 
    @@ -39,6 +41,24 @@
     #  define nat_iowrite16 be_iowrite16
     #  define nat_iowrite32 be_iowrite32
     
    +static EPICS_ALWAYS_INLINE
    +epicsUInt16
    +bswap16(epicsUInt16 value)
    +{
    +    return (((epicsUInt16)(value) & 0x00ff) << 8)    |
    +           (((epicsUInt16)(value) & 0xff00) >> 8);
    +}
    +
    +static EPICS_ALWAYS_INLINE
    +epicsUInt32
    +bswap32(epicsUInt32 value)
    +{
    +    return (((epicsUInt32)(value) & 0x000000ff) << 24)   |
    +           (((epicsUInt32)(value) & 0x0000ff00) << 8)    |
    +           (((epicsUInt32)(value) & 0x00ff0000) >> 8)    |
    +           (((epicsUInt32)(value) & 0xff000000) >> 24);
    +}
    +
     #elif defined(i386) || defined(__i386__) || defined(__i386) || defined(__m68k__)
     
     /* X86 does not need special handling for read/write width.
    diff --git a/src/libCom/osi/os/RTEMS/osdEvent.c b/src/libCom/osi/os/RTEMS/osdEvent.c
    index ce21506c7..455413870 100644
    --- a/src/libCom/osi/os/RTEMS/osdEvent.c
    +++ b/src/libCom/osi/os/RTEMS/osdEvent.c
    @@ -7,7 +7,6 @@
     \*************************************************************************/
     /*
      * RTEMS osdEvent.c
    - *	$Revision-Id$
      *      Author: W. Eric Norum
      *              eric@cls.usask.ca
      *              (306) 966-6055
    diff --git a/src/libCom/osi/os/RTEMS/osdEvent.h b/src/libCom/osi/os/RTEMS/osdEvent.h
    index 506f3d65d..6c53aada7 100644
    --- a/src/libCom/osi/os/RTEMS/osdEvent.h
    +++ b/src/libCom/osi/os/RTEMS/osdEvent.h
    @@ -6,7 +6,6 @@
     \*************************************************************************/
     /*
      * RTEMS osdEvent.h
    - *	$Revision-Id$
      *      Author: W. Eric Norum
      *              eric@cls.usask.ca
      *              (306) 966-6055
    diff --git a/src/libCom/osi/os/RTEMS/osdInterrupt.c b/src/libCom/osi/os/RTEMS/osdInterrupt.c
    index 8f029112e..88ce664e5 100644
    --- a/src/libCom/osi/os/RTEMS/osdInterrupt.c
    +++ b/src/libCom/osi/os/RTEMS/osdInterrupt.c
    @@ -6,7 +6,6 @@
     \*************************************************************************/
     /*
      * RTEMS osdInterrupt.c
    - *	$Revision-Id$
      *      Author: W. Eric Norum
      *              eric@cls.usask.ca
      *              (306) 966-6055
    diff --git a/src/libCom/osi/os/RTEMS/osdMessageQueue.c b/src/libCom/osi/os/RTEMS/osdMessageQueue.c
    index 1ac2cb221..a566de6f6 100644
    --- a/src/libCom/osi/os/RTEMS/osdMessageQueue.c
    +++ b/src/libCom/osi/os/RTEMS/osdMessageQueue.c
    @@ -8,8 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*
    - *      $Revision-Id$
    - *
      *      Author  W. Eric Norum
      *              norume@aps.anl.gov
      *              630 252 4793
    @@ -173,7 +171,7 @@ static int receiveMessage(
                     return -1;
             }
             rsize = receiveMessage(id, id->localBuf, id->maxSize, wait, delay);
    -        if ((rsize < 0) || (rsize > size))
    +        if (rsize > size)
                 return -1;
             memcpy(buffer, id->localBuf, rsize);
         }
    diff --git a/src/libCom/osi/os/RTEMS/osdMessageQueue.h b/src/libCom/osi/os/RTEMS/osdMessageQueue.h
    index c0631b72a..0244a1f0b 100644
    --- a/src/libCom/osi/os/RTEMS/osdMessageQueue.h
    +++ b/src/libCom/osi/os/RTEMS/osdMessageQueue.h
    @@ -8,8 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*
    - *      $Revision-Id$
    - *
      *      Author  W. Eric Norum
      *              norume@aps.anl.gov
      *              630 252 4793
    diff --git a/src/libCom/osi/os/RTEMS/osdMutex.c b/src/libCom/osi/os/RTEMS/osdMutex.c
    index eb02b86ff..96fde6ea0 100644
    --- a/src/libCom/osi/os/RTEMS/osdMutex.c
    +++ b/src/libCom/osi/os/RTEMS/osdMutex.c
    @@ -6,7 +6,6 @@
     \*************************************************************************/
     /*
      * RTEMS osdMutex.c
    - *	$Revision-Id$
      *      Author: W. Eric Norum
      *              eric@cls.usask.ca
      *              (306) 966-6055
    diff --git a/src/libCom/osi/os/RTEMS/osdMutex.h b/src/libCom/osi/os/RTEMS/osdMutex.h
    index edf630f78..7e2ecc77d 100644
    --- a/src/libCom/osi/os/RTEMS/osdMutex.h
    +++ b/src/libCom/osi/os/RTEMS/osdMutex.h
    @@ -6,7 +6,6 @@
     \*************************************************************************/
     /*
      * RTEMS osdMutex.h
    - *	$Revision-Id$
      *      Author: W. Eric Norum
      *              eric@cls.usask.ca
      *              (306) 966-6055
    diff --git a/src/libCom/osi/os/RTEMS/osdProcess.c b/src/libCom/osi/os/RTEMS/osdProcess.c
    index ce788bf99..2768dbb0d 100644
    --- a/src/libCom/osi/os/RTEMS/osdProcess.c
    +++ b/src/libCom/osi/os/RTEMS/osdProcess.c
    @@ -9,8 +9,6 @@
     \*************************************************************************/
     
     /* 
    - * $Revision-Id$
    - * 
      * Operating System Dependent Implementation of osiProcess.h
      *
      * Author: Jeff Hill
    diff --git a/src/libCom/osi/os/RTEMS/osdReadline.c b/src/libCom/osi/os/RTEMS/osdReadline.c
    index 03ed7ed90..877db53f6 100644
    --- a/src/libCom/osi/os/RTEMS/osdReadline.c
    +++ b/src/libCom/osi/os/RTEMS/osdReadline.c
    @@ -5,7 +5,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/* $Revision-Id$ */
     /* Author:  Eric Norum Date: 12DEC2001 */
     
     /*
    diff --git a/src/libCom/osi/os/RTEMS/osdSock.h b/src/libCom/osi/os/RTEMS/osdSock.h
    index a97241126..930ed0e72 100644
    --- a/src/libCom/osi/os/RTEMS/osdSock.h
    +++ b/src/libCom/osi/os/RTEMS/osdSock.h
    @@ -1,11 +1,10 @@
     /*************************************************************************\
     * Copyright (c) 2002 The University of Saskatchewan
     * EPICS BASE is distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     /*
      * RTEMS osdSock.h
    - *	$Revision-Id$
      *      Author: W. Eric Norum
      *              eric@cls.usask.ca
      *              (306) 966-6055
    @@ -36,7 +35,7 @@ int select(int  n,  fd_set  *readfds,  fd_set  *writefds, fd_set *exceptfds, str
     #ifdef __cplusplus
     }
     #endif
    - 
    +
     typedef int                     SOCKET;
     #define INVALID_SOCKET          (-1)
     #define SOCKERRNO               errno
    @@ -50,6 +49,7 @@ typedef socklen_t osiSocklen_t;
     #define SOCK_ENOBUFS ENOBUFS
     #define SOCK_ECONNRESET ECONNRESET
     #define SOCK_ETIMEDOUT ETIMEDOUT
    +#define SOCK_EACCES EACCES
     #define SOCK_EADDRINUSE EADDRINUSE
     #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
     #define SOCK_ECONNREFUSED ECONNREFUSED
    @@ -76,7 +76,7 @@ typedef socklen_t osiSocklen_t;
     
     #ifndef INADDR_NONE
     #   define INADDR_NONE (0xffffffff)
    -#endif 
    +#endif
     
     /*
      * For shutdown()
    diff --git a/src/libCom/osi/os/RTEMS/osdThread.c b/src/libCom/osi/os/RTEMS/osdThread.c
    index ed6e73368..769e95820 100644
    --- a/src/libCom/osi/os/RTEMS/osdThread.c
    +++ b/src/libCom/osi/os/RTEMS/osdThread.c
    @@ -5,7 +5,6 @@
     \*************************************************************************/
     /*
      * RTEMS osdThread.c
    - *      $Revision-Id$
      *      Author: W. Eric Norum
      */
     
    @@ -428,8 +427,6 @@ void epicsThreadGetName (epicsThreadId id, char *name, size_t size)
         struct taskVar *v;
         int haveName = 0;
     
    -    if (size <= 0)
    -        return;
         taskVarLock ();
         for (v=taskVarHead ; v != NULL ; v=v->forw) {
             if (v->id == tid) {
    @@ -691,6 +688,7 @@ void epicsThreadShow (epicsThreadId id, unsigned int level)
         for (v = taskVarHead ; v != NULL ; v = v->forw) {
             if ((rtems_id)id == v->id) {
                 epicsThreadShowInfo (v, level);
    +            taskVarUnlock ();
                 return;
             }
         }
    diff --git a/src/libCom/osi/os/RTEMS/osdTime.cpp b/src/libCom/osi/os/RTEMS/osdTime.cpp
    index 5e21f3087..4947c568e 100644
    --- a/src/libCom/osi/os/RTEMS/osdTime.cpp
    +++ b/src/libCom/osi/os/RTEMS/osdTime.cpp
    @@ -6,8 +6,6 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     /*
    - * $Revision-Id$
    - *
      * Author: W. Eric Norum
      */
     #define __BSD_VISIBLE 1
    diff --git a/src/libCom/osi/os/RTEMS/osdTime.h b/src/libCom/osi/os/RTEMS/osdTime.h
    index 5790ec3b6..55e3bc2b0 100644
    --- a/src/libCom/osi/os/RTEMS/osdTime.h
    +++ b/src/libCom/osi/os/RTEMS/osdTime.h
    @@ -7,11 +7,6 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     
    -/*
    - * $Revision-Id$
    - *
    - */
    -
     #ifndef INC_osdTime_H
     #define INC_osdTime_H
     
    diff --git a/src/libCom/osi/os/RTEMS/osdVME.h b/src/libCom/osi/os/RTEMS/osdVME.h
    index 5e8c5f984..65548abcb 100644
    --- a/src/libCom/osi/os/RTEMS/osdVME.h
    +++ b/src/libCom/osi/os/RTEMS/osdVME.h
    @@ -7,7 +7,6 @@
     * and higher are distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     /*
      * OS-dependent VME support
    diff --git a/src/libCom/osi/os/RTEMS/osiFileName.h b/src/libCom/osi/os/RTEMS/osiFileName.h
    index 5cd57e52c..8c9226898 100644
    --- a/src/libCom/osi/os/RTEMS/osiFileName.h
    +++ b/src/libCom/osi/os/RTEMS/osiFileName.h
    @@ -6,7 +6,6 @@
     \*************************************************************************/
     /*
      * RTEMS osiFileName.h
    - *	$Revision-Id$
      *      Author: W. Eric Norum
      *              eric@cls.usask.ca
      *              (306) 966-6055
    diff --git a/src/libCom/osi/os/RTEMS/osiUnistd.h b/src/libCom/osi/os/RTEMS/osiUnistd.h
    index e5264267c..c0a6e222d 100644
    --- a/src/libCom/osi/os/RTEMS/osiUnistd.h
    +++ b/src/libCom/osi/os/RTEMS/osiUnistd.h
    @@ -8,16 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*  
    - *  $Revision-Id$
    - *
    - *                              
    - *                    L O S  A L A M O S
    - *              Los Alamos National Laboratory
    - *               Los Alamos, New Mexico 87545
    - *                                  
    - *  Copyright, 1986, The Regents of the University of California.
    - *                                  
    - *           
      *	Author Jeffrey O. Hill
      *	johill@lanl.gov
      *	505 665 1831
    diff --git a/src/libCom/osi/os/WIN32/epicsSocketConvertErrnoToString.cpp b/src/libCom/osi/os/WIN32/epicsSocketConvertErrnoToString.cpp
    index 5ab809cde..3db87ac84 100644
    --- a/src/libCom/osi/os/WIN32/epicsSocketConvertErrnoToString.cpp
    +++ b/src/libCom/osi/os/WIN32/epicsSocketConvertErrnoToString.cpp
    @@ -7,10 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/*
    - * $Revision-Id$
    - */
    -
     #include 
     
     #define epicsExportSharedSymbols
    diff --git a/src/libCom/osi/os/WIN32/epicsTempFile.cpp b/src/libCom/osi/os/WIN32/epicsTempFile.cpp
    index dc90ec9b9..11b835134 100644
    --- a/src/libCom/osi/os/WIN32/epicsTempFile.cpp
    +++ b/src/libCom/osi/os/WIN32/epicsTempFile.cpp
    @@ -9,7 +9,6 @@
     \*************************************************************************/
     
     /*
    - *  $Revision-Id$
      *  Author: Jeff Hill 
      */
     
    diff --git a/src/libCom/osi/os/WIN32/osdEvent.c b/src/libCom/osi/os/WIN32/osdEvent.c
    index a57d43608..314138b27 100644
    --- a/src/libCom/osi/os/WIN32/osdEvent.c
    +++ b/src/libCom/osi/os/WIN32/osdEvent.c
    @@ -8,7 +8,6 @@
     \*************************************************************************/
     /* osdEvent.c */
     /*
    - *      $Revision-Id$
      *      WIN32 version
      *
      *      Author  Jeffrey O. Hill
    diff --git a/src/libCom/osi/os/WIN32/osdEvent.h b/src/libCom/osi/os/WIN32/osdEvent.h
    index b5dd115bf..f57f2cc49 100644
    --- a/src/libCom/osi/os/WIN32/osdEvent.h
    +++ b/src/libCom/osi/os/WIN32/osdEvent.h
    @@ -9,7 +9,6 @@
     \*************************************************************************/
     /* osdEvent.c */
     /*
    - *      $Revision-Id$
      *      WIN32 version
      *
      *      Author  Jeffrey O. Hill
    diff --git a/src/libCom/osi/os/WIN32/osdMutex.c b/src/libCom/osi/os/WIN32/osdMutex.c
    index 0104ac566..63a51efd5 100644
    --- a/src/libCom/osi/os/WIN32/osdMutex.c
    +++ b/src/libCom/osi/os/WIN32/osdMutex.c
    @@ -9,7 +9,6 @@
     \*************************************************************************/
     /* osdMutex.c */
     /*
    - *      $Revision-Id$
      *      WIN32 version
      *
      *      Author  Jeffrey O. Hill
    diff --git a/src/libCom/osi/os/WIN32/osdMutex.h b/src/libCom/osi/os/WIN32/osdMutex.h
    index e531f792d..d8f3f78bd 100644
    --- a/src/libCom/osi/os/WIN32/osdMutex.h
    +++ b/src/libCom/osi/os/WIN32/osdMutex.h
    @@ -10,7 +10,6 @@
     
     /* osdMutex.h */
     /*
    - *      $Revision-Id$
      *      WIN32 version
      *
      *      Author  Jeffrey O. Hill
    diff --git a/src/libCom/osi/os/WIN32/osdNetIntf.c b/src/libCom/osi/os/WIN32/osdNetIntf.c
    index c508bfdfd..db445d494 100644
    --- a/src/libCom/osi/os/WIN32/osdNetIntf.c
    +++ b/src/libCom/osi/os/WIN32/osdNetIntf.c
    @@ -3,18 +3,15 @@
     *     National Laboratory.
     * Copyright (c) 2002 The Regents of the University of California, as
     *     Operator of Los Alamos National Laboratory.
    -* EPICS BASE Versions 3.13.7
    -* and higher are distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* EPICS BASE is distributed subject to a Software License Agreement found
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     
     /*
    - *	    $Revision-Id$
    - *
    - *	    WIN32 specific initialisation for bsd sockets,
    - *	    based on Chris Timossi's base/src/ca/windows_depend.c,
    + *      WIN32 specific initialisation for bsd sockets,
    + *      based on Chris Timossi's base/src/ca/windows_depend.c,
      *      and also further additions by Kay Kasemir when this was in
    - *	    dllmain.cc
    + *      dllmain.cc
      *
      *      7-1-97  -joh-
      *
    @@ -51,14 +48,14 @@ static epicsThreadOnceId osiLocalAddrId = EPICS_THREAD_ONCE_INIT;
      */
     static void osiLocalAddrOnce ( void *raw )
     {
    -    SOCKET *psocket = raw;
    +    SOCKET              *psocket = raw;
         osiSockAddr         addr;
    -    int             	status;
    -    INTERFACE_INFO		*pIfinfo;
    +    int                 status;
    +    INTERFACE_INFO      *pIfinfo;
         INTERFACE_INFO      *pIfinfoList = NULL;
    -    unsigned			nelem;
    -    DWORD				numifs;
    -    DWORD				cbBytesReturned;
    +    unsigned            nelem;
    +    DWORD               numifs;
    +    DWORD               cbBytesReturned;
     
         memset ( (void *) &addr, '\0', sizeof ( addr ) );
         addr.sa.sa_family = AF_UNSPEC;
    @@ -68,7 +65,7 @@ static void osiLocalAddrOnce ( void *raw )
             goto fail;
         }
     
    -    nelem = 10;
    +    nelem = 100;
         pIfinfoList = (INTERFACE_INFO *) calloc ( nelem, sizeof (INTERFACE_INFO) );
         if (!pIfinfoList) {
             errlogPrintf ("calloc failed\n");
    @@ -137,12 +134,12 @@ epicsShareFunc osiSockAddr epicsShareAPI osiLocalAddr (SOCKET socket)
     epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses
          (ELLLIST *pList, SOCKET socket, const osiSockAddr *pMatchAddr)
     {
    -    int             	status;
    +    int                 status;
         INTERFACE_INFO      *pIfinfo;
         INTERFACE_INFO      *pIfinfoList;
    -    unsigned			nelem;
    -    int					numifs;
    -    DWORD				cbBytesReturned;
    +    unsigned            nelem;
    +    int                 numifs;
    +    DWORD               cbBytesReturned;
         osiSockAddrNode     *pNewNode;
     
         if ( pMatchAddr->sa.sa_family == AF_INET  ) {
    @@ -165,7 +162,7 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses
             return;
         }
     
    -    nelem = 10;
    +    nelem = 100;
         pIfinfoList = (INTERFACE_INFO *) calloc(nelem, sizeof(INTERFACE_INFO));
         if(!pIfinfoList){
             return;
    diff --git a/src/libCom/osi/os/WIN32/osdProcess.c b/src/libCom/osi/os/WIN32/osdProcess.c
    index fcf1e2feb..6e69c0485 100644
    --- a/src/libCom/osi/os/WIN32/osdProcess.c
    +++ b/src/libCom/osi/os/WIN32/osdProcess.c
    @@ -8,8 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* 
    - * $Revision-Id$
    - * 
      * Operating System Dependent Implementation of osiProcess.h
      *
      * Author: Jeff Hill
    diff --git a/src/libCom/osi/os/WIN32/osdSock.c b/src/libCom/osi/os/WIN32/osdSock.c
    index 564fe431c..b8c8363fb 100644
    --- a/src/libCom/osi/os/WIN32/osdSock.c
    +++ b/src/libCom/osi/os/WIN32/osdSock.c
    @@ -9,8 +9,6 @@
     \*************************************************************************/
     
     /*
    - *	    $Revision-Id$
    - *
      *	    WIN32 specific initialisation for bsd sockets,
      *	    based on Chris Timossi's base/src/ca/windows_depend.c,
      *      and also further additions by Kay Kasemir when this was in
    diff --git a/src/libCom/osi/os/WIN32/osdSock.h b/src/libCom/osi/os/WIN32/osdSock.h
    index e685f6564..d92e18755 100644
    --- a/src/libCom/osi/os/WIN32/osdSock.h
    +++ b/src/libCom/osi/os/WIN32/osdSock.h
    @@ -4,7 +4,7 @@
     * Copyright (c) 2002 The Regents of the University of California, as
     *     Operator of Los Alamos National Laboratory.
     * EPICS BASE is distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     
     #ifndef osdSockH
    @@ -14,7 +14,7 @@
     #include 
     
     /*
    - * winsock2.h changes the structure alignment to 4 if 
    + * winsock2.h changes the structure alignment to 4 if
      * WIN32 isnt set which can be a source of confusion
      */
     #ifndef WIN32
    @@ -48,6 +48,7 @@ typedef int osiSocklen_t;
     #define SOCK_ENOBUFS WSAENOBUFS
     #define SOCK_ECONNRESET WSAECONNRESET
     #define SOCK_ETIMEDOUT WSAETIMEDOUT
    +#define SOCK_EACCES WSAEACCES
     #define SOCK_EADDRINUSE WSAEADDRINUSE
     #define SOCK_EADDRNOTAVAIL WSAEADDRNOTAVAIL
     #define SOCK_ECONNREFUSED WSAECONNREFUSED
    diff --git a/src/libCom/osi/os/WIN32/osdSockAddrReuse.cpp b/src/libCom/osi/os/WIN32/osdSockAddrReuse.cpp
    index e8de4d4b7..d441d7511 100644
    --- a/src/libCom/osi/os/WIN32/osdSockAddrReuse.cpp
    +++ b/src/libCom/osi/os/WIN32/osdSockAddrReuse.cpp
    @@ -10,7 +10,6 @@
     \*************************************************************************/
     
     /*
    - * $Revision-Id$
      * Author: Jeff Hill
      */
     
    diff --git a/src/libCom/osi/os/WIN32/osdThread.c b/src/libCom/osi/os/WIN32/osdThread.c
    index 9d45e28e0..8cdb4a3f4 100644
    --- a/src/libCom/osi/os/WIN32/osdThread.c
    +++ b/src/libCom/osi/os/WIN32/osdThread.c
    @@ -8,11 +8,7 @@
     \*************************************************************************/
     
     /*
    - * $Revision-Id$
    - *
      * Author: Jeff Hill
    - * 
    - *
      */
     
     #include 
    @@ -527,13 +523,8 @@ static win32ThreadParam * epicsThreadParmCreate ( const char *pName )
     
         pParmWIN32 = calloc ( 1, sizeof ( *pParmWIN32 ) + strlen ( pName ) + 1 );
         if ( pParmWIN32  ) {
    -        if ( pName ) {
    -            pParmWIN32->pName = (char *) ( pParmWIN32 + 1 );
    -            strcpy ( pParmWIN32->pName, pName );
    -        }
    -        else {
    -            pParmWIN32->pName = 0;
    -        }
    +        pParmWIN32->pName = (char *) ( pParmWIN32 + 1 );
    +        strcpy ( pParmWIN32->pName, pName );
             pParmWIN32->isSuspended = 0;
         }
         return pParmWIN32;
    diff --git a/src/libCom/osi/os/WIN32/osdTime.cpp b/src/libCom/osi/os/WIN32/osdTime.cpp
    index 99f75c195..2ee0d3066 100644
    --- a/src/libCom/osi/os/WIN32/osdTime.cpp
    +++ b/src/libCom/osi/os/WIN32/osdTime.cpp
    @@ -7,12 +7,9 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     
    -//
    -// $Revision-Id$
     //
     // Author: Jeff Hill
     //
    -//
     
     //
     // ANSI C
    diff --git a/src/libCom/osi/os/WIN32/osdTime.h b/src/libCom/osi/os/WIN32/osdTime.h
    index abd150c4b..35848f6dc 100644
    --- a/src/libCom/osi/os/WIN32/osdTime.h
    +++ b/src/libCom/osi/os/WIN32/osdTime.h
    @@ -8,8 +8,6 @@
     \*************************************************************************/
     
     /*
    - * $Revision-Id$
    - *
      * Author: Jeff Hill
      */
     
    diff --git a/src/libCom/osi/os/WIN32/osiFileName.h b/src/libCom/osi/os/WIN32/osiFileName.h
    index 658975d89..6ff0308b2 100644
    --- a/src/libCom/osi/os/WIN32/osiFileName.h
    +++ b/src/libCom/osi/os/WIN32/osiFileName.h
    @@ -11,7 +11,6 @@
      * osiFileName.h
      * Author: Jeff Hill
      *
    - *
      */
     #ifndef osiFileNameH
     #define osiFileNameH
    diff --git a/src/libCom/osi/os/WIN32/osiUnistd.h b/src/libCom/osi/os/WIN32/osiUnistd.h
    index c8c744f6f..3f34e74cc 100644
    --- a/src/libCom/osi/os/WIN32/osiUnistd.h
    +++ b/src/libCom/osi/os/WIN32/osiUnistd.h
    @@ -8,16 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*  
    - *  $Revision-Id$
    - *
    - *                              
    - *                    L O S  A L A M O S
    - *              Los Alamos National Laboratory
    - *               Los Alamos, New Mexico 87545
    - *                                  
    - *  Copyright, 1986, The Regents of the University of California.
    - *                                  
    - *           
      *	Author Jeffrey O. Hill
      *	johill@lanl.gov
      *	505 665 1831
    diff --git a/src/libCom/osi/os/WIN32/systemCallIntMech.cpp b/src/libCom/osi/os/WIN32/systemCallIntMech.cpp
    index be18c02a1..5e13299c0 100644
    --- a/src/libCom/osi/os/WIN32/systemCallIntMech.cpp
    +++ b/src/libCom/osi/os/WIN32/systemCallIntMech.cpp
    @@ -8,7 +8,6 @@
     * and higher are distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     /*
      *      Author:		Jeff Hill 
      */
    diff --git a/src/libCom/osi/os/cygwin32/devLibVMEOSD.c b/src/libCom/osi/os/cygwin32/devLibVMEOSD.c
    index bc1ec80cf..53cbd58cd 100644
    --- a/src/libCom/osi/os/cygwin32/devLibVMEOSD.c
    +++ b/src/libCom/osi/os/cygwin32/devLibVMEOSD.c
    @@ -5,8 +5,6 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     #include 
     
     #define epicsExportSharedSymbols
    diff --git a/src/libCom/osi/os/cygwin32/osdSock.h b/src/libCom/osi/os/cygwin32/osdSock.h
    index 324e75c3f..d642cad44 100644
    --- a/src/libCom/osi/os/cygwin32/osdSock.h
    +++ b/src/libCom/osi/os/cygwin32/osdSock.h
    @@ -4,7 +4,7 @@
     * Copyright (c) 2002 The Regents of the University of California, as
     *     Operator of Los Alamos National Laboratory.
     * EPICS BASE is distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     /*
      * cygwin32 specific include
    @@ -49,6 +49,7 @@ typedef int osiSocklen_t;
     #define SOCK_ENOBUFS ENOBUFS
     #define SOCK_ECONNRESET ECONNRESET
     #define SOCK_ETIMEDOUT ETIMEDOUT
    +#define SOCK_EACCES EACCES
     #define SOCK_EADDRINUSE EADDRINUSE
     #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
     #define SOCK_ECONNREFUSED ECONNREFUSED
    @@ -67,4 +68,3 @@ typedef int osiSocklen_t;
     #define ifreq_size(pifreq) (sizeof(pifreq->ifr_name))
     
     #endif /*osdSockH*/
    -
    diff --git a/src/libCom/osi/os/cygwin32/osdSockAddrReuse.cpp b/src/libCom/osi/os/cygwin32/osdSockAddrReuse.cpp
    index e8de4d4b7..d441d7511 100644
    --- a/src/libCom/osi/os/cygwin32/osdSockAddrReuse.cpp
    +++ b/src/libCom/osi/os/cygwin32/osdSockAddrReuse.cpp
    @@ -10,7 +10,6 @@
     \*************************************************************************/
     
     /*
    - * $Revision-Id$
      * Author: Jeff Hill
      */
     
    diff --git a/src/libCom/osi/os/cygwin32/osiFileName.h b/src/libCom/osi/os/cygwin32/osiFileName.h
    index 658975d89..6d7fd6eb9 100644
    --- a/src/libCom/osi/os/cygwin32/osiFileName.h
    +++ b/src/libCom/osi/os/cygwin32/osiFileName.h
    @@ -10,8 +10,6 @@
     /*
      * osiFileName.h
      * Author: Jeff Hill
    - *
    - *
      */
     #ifndef osiFileNameH
     #define osiFileNameH
    diff --git a/src/libCom/osi/os/cygwin32/systemCallIntMech.cpp b/src/libCom/osi/os/cygwin32/systemCallIntMech.cpp
    index 93da75ea6..9c0df3293 100644
    --- a/src/libCom/osi/os/cygwin32/systemCallIntMech.cpp
    +++ b/src/libCom/osi/os/cygwin32/systemCallIntMech.cpp
    @@ -6,7 +6,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/* $Revision-Id$ */
     /*
      *      Author:		Jeff Hill 
      */
    diff --git a/src/libCom/osi/os/default/devLibVMEOSD.c b/src/libCom/osi/os/default/devLibVMEOSD.c
    index 218f5f6ed..b8b1d5047 100644
    --- a/src/libCom/osi/os/default/devLibVMEOSD.c
    +++ b/src/libCom/osi/os/default/devLibVMEOSD.c
    @@ -5,8 +5,6 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     #include 
     
     #define epicsExportSharedSymbols
    diff --git a/src/libCom/osi/os/default/epicsMMIODef.h b/src/libCom/osi/os/default/epicsMMIODef.h
    index a306f8339..dc4bb4cb7 100644
    --- a/src/libCom/osi/os/default/epicsMMIODef.h
    +++ b/src/libCom/osi/os/default/epicsMMIODef.h
    @@ -90,15 +90,23 @@ nat_iowrite32(volatile void* addr, epicsUInt32 val)
      *@{
      */
     
    -#define bswap16(value) ((epicsUInt16) (  \
    -        (((epicsUInt16)(value) & 0x00ff) << 8)    |       \
    -        (((epicsUInt16)(value) & 0xff00) >> 8)))
    +static EPICS_ALWAYS_INLINE
    +epicsUInt16
    +bswap16(epicsUInt16 value)
    +{
    +    return (((epicsUInt16)(value) & 0x00ff) << 8)    |
    +           (((epicsUInt16)(value) & 0xff00) >> 8);
    +}
     
    -#define bswap32(value) (  \
    -        (((epicsUInt32)(value) & 0x000000ff) << 24)   |                \
    -        (((epicsUInt32)(value) & 0x0000ff00) << 8)    |                \
    -        (((epicsUInt32)(value) & 0x00ff0000) >> 8)    |                \
    -        (((epicsUInt32)(value) & 0xff000000) >> 24))
    +static EPICS_ALWAYS_INLINE
    +epicsUInt32
    +bswap32(epicsUInt32 value)
    +{
    +    return (((epicsUInt32)(value) & 0x000000ff) << 24)   |
    +           (((epicsUInt32)(value) & 0x0000ff00) << 8)    |
    +           (((epicsUInt32)(value) & 0x00ff0000) >> 8)    |
    +           (((epicsUInt32)(value) & 0xff000000) >> 24);
    +}
     
     #  define be_ioread16(A)    nat_ioread16(A)
     #  define be_ioread32(A)    nat_ioread32(A)
    diff --git a/src/libCom/osi/os/default/epicsSocketConvertErrnoToString.cpp b/src/libCom/osi/os/default/epicsSocketConvertErrnoToString.cpp
    index 0e0ef94f0..3cbfce60d 100644
    --- a/src/libCom/osi/os/default/epicsSocketConvertErrnoToString.cpp
    +++ b/src/libCom/osi/os/default/epicsSocketConvertErrnoToString.cpp
    @@ -7,7 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* osdSock.c */
    -/* $Revision-Id$ */
     /*
      *      Author:		Jeff Hill 
      *      Date:          	04-05-94 
    diff --git a/src/libCom/osi/os/default/gnuReadline.c b/src/libCom/osi/os/default/gnuReadline.c
    index 78ed17828..ae646a53e 100644
    --- a/src/libCom/osi/os/default/gnuReadline.c
    +++ b/src/libCom/osi/os/default/gnuReadline.c
    @@ -5,7 +5,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/* $Revision-Id$ */
     /* Author:  Eric Norum Date: 12DEC2001 */
     
     /*
    diff --git a/src/libCom/osi/os/default/osdAssert.c b/src/libCom/osi/os/default/osdAssert.c
    index 1bd8e7f65..14d548c3d 100644
    --- a/src/libCom/osi/os/default/osdAssert.c
    +++ b/src/libCom/osi/os/default/osdAssert.c
    @@ -6,7 +6,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     /*
      *      Author:         Jeffrey Hill
      *      Date:           02-27-95
    diff --git a/src/libCom/osi/os/default/osdEnv.c b/src/libCom/osi/os/default/osdEnv.c
    index 6c67a6999..682bcc934 100644
    --- a/src/libCom/osi/os/default/osdEnv.c
    +++ b/src/libCom/osi/os/default/osdEnv.c
    @@ -5,8 +5,6 @@
     \*************************************************************************/
     /* osdEnv.c */
     /*
    - * $Revision-Id$
    - *
      * Author: Eric Norum
      *   Date: May 7, 2001
      *
    diff --git a/src/libCom/osi/os/default/osdMessageQueue.cpp b/src/libCom/osi/os/default/osdMessageQueue.cpp
    index 9f589aaf4..c86d8cc2b 100644
    --- a/src/libCom/osi/os/default/osdMessageQueue.cpp
    +++ b/src/libCom/osi/os/default/osdMessageQueue.cpp
    @@ -8,8 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*
    - *      $Revision-Id$
    - *
      *      Author  W. Eric Norum
      *              norume@aps.anl.gov
      *              630 252 4793
    @@ -18,6 +16,9 @@
     #include 
     #include 
     
    +#include 
    +#include 
    +
     #define epicsExportSharedSymbols
     #include "epicsMessageQueue.h"
     #include 
    diff --git a/src/libCom/osi/os/default/osdNetIntf.c b/src/libCom/osi/os/default/osdNetIntf.c
    index c3f1a89cb..62247bc5d 100644
    --- a/src/libCom/osi/os/default/osdNetIntf.c
    +++ b/src/libCom/osi/os/default/osdNetIntf.c
    @@ -8,7 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
     /*
      *      Author:		Jeff Hill 
      *      Date:       04-05-94 
    @@ -77,6 +76,21 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses
         struct ifreq                    *pifreq;
         struct ifreq                    *pnextifreq;
         osiSockAddrNode                 *pNewNode;
    +
    +    if ( pMatchAddr->sa.sa_family == AF_INET  ) {
    +        if ( pMatchAddr->ia.sin_addr.s_addr == htonl (INADDR_LOOPBACK) ) {
    +            pNewNode = (osiSockAddrNode *) calloc (1, sizeof (*pNewNode) );
    +            if ( pNewNode == NULL ) {
    +                errlogPrintf ( "osiSockDiscoverBroadcastAddresses(): no memory available for configuration\n" );
    +                return;
    +            }
    +            pNewNode->addr.ia.sin_family = AF_INET;
    +            pNewNode->addr.ia.sin_port = htons ( 0 );
    +            pNewNode->addr.ia.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
    +            ellAdd ( pList, &pNewNode->node );
    +            return;
    +        }
    +    }
          
         /*
          * use pool so that we avoid using too much stack space
    @@ -104,7 +118,6 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses
     
         for ( pifreq = pIfreqList; pifreq <= pIfreqListEnd; pifreq = pnextifreq ) {
             uint32_t  current_ifreqsize;
    -        struct sockaddr_in if_addr;
     
             /*
              * find the next ifreq
    @@ -128,7 +141,6 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses
                  ifDepenDebugPrintf ( ("osiSockDiscoverBroadcastAddresses(): interface \"%s\" was not AF_INET\n", pIfreqList->ifr_name) );
                  continue;
             }
    -        if_addr = *(struct sockaddr_in *)&pIfreqList->ifr_addr;
     
             /*
              * if it isnt a wildcarded interface then look for
    @@ -139,7 +151,8 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses
                     continue;
                 }
                 if ( pMatchAddr->ia.sin_addr.s_addr != htonl (INADDR_ANY) ) {
    -                 if ( if_addr.sin_addr.s_addr != pMatchAddr->ia.sin_addr.s_addr ) {
    +                 struct sockaddr_in *pInetAddr = (struct sockaddr_in *) &pIfreqList->ifr_addr;
    +                 if ( pInetAddr->sin_addr.s_addr != pMatchAddr->ia.sin_addr.s_addr ) {
                          ifDepenDebugPrintf ( ("osiSockDiscoverBroadcastAddresses(): net intf \"%s\" didnt match\n", pIfreqList->ifr_name) );
                          continue;
                      }
    @@ -161,6 +174,14 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses
                  continue;
             }
     
    +        /*
    +         * dont use the loop back interface 
    +         */
    +        if ( pIfreqList->ifr_flags & IFF_LOOPBACK ) {
    +             ifDepenDebugPrintf ( ("osiSockDiscoverBroadcastAddresses(): ignoring loopback interface: \"%s\"\n", pIfreqList->ifr_name) );
    +             continue;
    +        }
    +
             pNewNode = (osiSockAddrNode *) calloc (1, sizeof (*pNewNode) );
             if ( pNewNode == NULL ) {
                 errlogPrintf ( "osiSockDiscoverBroadcastAddresses(): no memory available for configuration\n" );
    @@ -179,14 +200,22 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses
              * interface.
              */
             if ( pIfreqList->ifr_flags & IFF_BROADCAST ) {
    +            osiSockAddr baddr;
                 status = socket_ioctl (socket, SIOCGIFBRDADDR, pIfreqList);
                 if ( status ) {
                     errlogPrintf ("osiSockDiscoverBroadcastAddresses(): net intf \"%s\": bcast addr fetch fail\n", pIfreqList->ifr_name);
                     free ( pNewNode );
                     continue;
                 }
    -            pNewNode->addr.sa = pIfreqList->ifr_broadaddr;
    -            ifDepenDebugPrintf ( ( "found broadcast addr = %x\n", ntohl ( pNewNode->addr.ia.sin_addr.s_addr ) ) );
    +            baddr.sa = pIfreqList->ifr_broadaddr;
    +            if (baddr.ia.sin_family==AF_INET && baddr.ia.sin_addr.s_addr != INADDR_ANY) {
    +                pNewNode->addr.sa = pIfreqList->ifr_broadaddr;
    +                ifDepenDebugPrintf ( ( "found broadcast addr = %x\n", ntohl ( baddr.ia.sin_addr.s_addr ) ) );
    +            } else {
    +                ifDepenDebugPrintf ( ( "Ignoring broadcast addr = \n", ntohl ( baddr.ia.sin_addr.s_addr ) ) );
    +                free ( pNewNode );
    +                continue;
    +            }
             }
     #if defined (IFF_POINTOPOINT)
             else if ( pIfreqList->ifr_flags & IFF_POINTOPOINT ) {
    @@ -198,22 +227,6 @@ epicsShareFunc void epicsShareAPI osiSockDiscoverBroadcastAddresses
                 }
                 pNewNode->addr.sa = pIfreqList->ifr_dstaddr;
             }
    -#endif
    -#if defined(__linux__)
    -        /* On Linux, even though the 'lo' interface doesn't set IFF_BROADCAST
    -         * a broadcast route often exists.  Assume that sending to 127.255.255.255
    -         * reaches all local listeners.
    -         *
    -         *   $ ip route show table local scope link dev lo
    -         *   broadcast 127.0.0.0  proto kernel  src 127.0.0.1
    -         *   broadcast 127.255.255.255  proto kernel  src 127.0.0.1
    -         */
    -        else if ( pIfreqList->ifr_flags & IFF_LOOPBACK && if_addr.sin_addr.s_addr == htonl(INADDR_LOOPBACK) ) {
    -            memset(&pNewNode->addr.ia, 0, sizeof(pNewNode->addr.ia));
    -            pNewNode->addr.ia.sin_family = AF_INET;
    -            pNewNode->addr.ia.sin_addr.s_addr = htonl(0x7fffffff);
    -            ifDepenDebugPrintf ( ( "assume loopback broadcast addr = %x\n", ntohl ( pNewNode->addr.ia.sin_addr.s_addr ) ) );
    -        }
     #endif
             else {
                 ifDepenDebugPrintf ( ( "osiSockDiscoverBroadcastAddresses(): net intf \"%s\": not point to point or bcast?\n", pIfreqList->ifr_name ) );
    diff --git a/src/libCom/osi/os/default/osdVME.h b/src/libCom/osi/os/default/osdVME.h
    index 37ac6a30a..1b65b3184 100644
    --- a/src/libCom/osi/os/default/osdVME.h
    +++ b/src/libCom/osi/os/default/osdVME.h
    @@ -7,7 +7,6 @@
     * and higher are distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     /*
      * OS-dependent VME support
    diff --git a/src/libCom/osi/os/default/osdWireFormat.h b/src/libCom/osi/os/default/osdWireFormat.h
    index 6db3e20ab..385c9bd69 100644
    --- a/src/libCom/osi/os/default/osdWireFormat.h
    +++ b/src/libCom/osi/os/default/osdWireFormat.h
    @@ -8,13 +8,6 @@
     \*************************************************************************/
     
     /*
    - *                    L O S  A L A M O S
    - *              Los Alamos National Laboratory
    - *               Los Alamos, New Mexico 87545
    - *
    - *  Copyright, 2000, The Regents of the University of California.
    - *
    - *
      *  Author Jeffrey O. Hill
      *  johill@lanl.gov
      */
    diff --git a/src/libCom/osi/os/freebsd/osdSock.h b/src/libCom/osi/os/freebsd/osdSock.h
    index a950b996c..fe28d4cd5 100644
    --- a/src/libCom/osi/os/freebsd/osdSock.h
    +++ b/src/libCom/osi/os/freebsd/osdSock.h
    @@ -4,7 +4,7 @@
     * Copyright (c) 2002 The Regents of the University of California, as
     *     Operator of Los Alamos National Laboratory.
     * EPICS BASE is distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     
     #ifndef osdSockH
    @@ -29,7 +29,7 @@
     #define IPPORT_USERRESERVED 5000
     #endif
     
    - 
    +
     typedef int                     SOCKET;
     #define INVALID_SOCKET          (-1)
     #define SOCKERRNO               errno
    @@ -43,6 +43,7 @@ typedef socklen_t osiSocklen_t;
     #define SOCK_ENOBUFS ENOBUFS
     #define SOCK_ECONNRESET ECONNRESET
     #define SOCK_ETIMEDOUT ETIMEDOUT
    +#define SOCK_EACCES EACCES
     #define SOCK_EADDRINUSE EADDRINUSE
     #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
     #define SOCK_ECONNREFUSED ECONNREFUSED
    @@ -77,4 +78,3 @@ typedef socklen_t osiSocklen_t;
     #endif
     
     #endif /*osdSockH*/
    -
    diff --git a/src/libCom/osi/os/freebsd/osdTime.h b/src/libCom/osi/os/freebsd/osdTime.h
    index d0a61c9e0..941426c72 100644
    --- a/src/libCom/osi/os/freebsd/osdTime.h
    +++ b/src/libCom/osi/os/freebsd/osdTime.h
    @@ -5,8 +5,6 @@
     \*************************************************************************/
     
     /*
    - * $Revision-Id$
    - *
      * Author: Eric Norum
      */
     
    diff --git a/src/libCom/osi/os/freebsd/osiFileName.h b/src/libCom/osi/os/freebsd/osiFileName.h
    index a64c19ad8..83204c70f 100644
    --- a/src/libCom/osi/os/freebsd/osiFileName.h
    +++ b/src/libCom/osi/os/freebsd/osiFileName.h
    @@ -9,8 +9,6 @@
     /*
      * osiFileName.h
      * Author: Jeff Hill
    - *
    - *
      */
     #ifndef osiFileNameH
     #define osiFileNameH
    diff --git a/src/libCom/osi/os/freebsd/osiUnistd.h b/src/libCom/osi/os/freebsd/osiUnistd.h
    index b96f87b5f..c64e57a6c 100644
    --- a/src/libCom/osi/os/freebsd/osiUnistd.h
    +++ b/src/libCom/osi/os/freebsd/osiUnistd.h
    @@ -7,16 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*  
    - *  $Revision-Id$
    - *
    - *                              
    - *                    L O S  A L A M O S
    - *              Los Alamos National Laboratory
    - *               Los Alamos, New Mexico 87545
    - *                                  
    - *  Copyright, 1986, The Regents of the University of California.
    - *                                  
    - *           
      *	Author Jeffrey O. Hill
      *	johill@lanl.gov
      *	505 665 1831
    diff --git a/src/libCom/osi/os/iOS/osdEnv.c b/src/libCom/osi/os/iOS/osdEnv.c
    index c631ec4f8..a32cce5ef 100644
    --- a/src/libCom/osi/os/iOS/osdEnv.c
    +++ b/src/libCom/osi/os/iOS/osdEnv.c
    @@ -6,13 +6,10 @@
     
     /* osdEnv.c */
     /*
    - * $Revision-Id$
    - *
      * Author: Eric Norum
      *   Date: May 7, 2001
      *
      * Routines to modify/display environment variables and EPICS parameters
    - *
      */
     
     #include 
    diff --git a/src/libCom/osi/os/iOS/osdSock.h b/src/libCom/osi/os/iOS/osdSock.h
    index 149c4021c..0b3b3f6c1 100644
    --- a/src/libCom/osi/os/iOS/osdSock.h
    +++ b/src/libCom/osi/os/iOS/osdSock.h
    @@ -5,8 +5,6 @@
     \*************************************************************************/
     
     /*
    - * $Revision-Id$
    - *
      * Author: Eric Norum
      */
     
    @@ -41,6 +39,7 @@ typedef socklen_t osiSocklen_t;
     #define SOCK_ENOBUFS ENOBUFS
     #define SOCK_ECONNRESET ECONNRESET
     #define SOCK_ETIMEDOUT ETIMEDOUT
    +#define SOCK_EACCES EACCES
     #define SOCK_EADDRINUSE EADDRINUSE
     #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
     #define SOCK_ECONNREFUSED ECONNREFUSED
    diff --git a/src/libCom/osi/os/iOS/osdSockAddrReuse.cpp b/src/libCom/osi/os/iOS/osdSockAddrReuse.cpp
    index f5aa99f31..9f64e331a 100644
    --- a/src/libCom/osi/os/iOS/osdSockAddrReuse.cpp
    +++ b/src/libCom/osi/os/iOS/osdSockAddrReuse.cpp
    @@ -8,7 +8,6 @@
     \*************************************************************************/
     
     /*
    - * $Revision-Id$
      * Author: Jeff Hill
      */
     
    diff --git a/src/libCom/osi/os/iOS/osdTime.h b/src/libCom/osi/os/iOS/osdTime.h
    index 554999779..953ec31b8 100644
    --- a/src/libCom/osi/os/iOS/osdTime.h
    +++ b/src/libCom/osi/os/iOS/osdTime.h
    @@ -5,8 +5,6 @@
     \*************************************************************************/
     
     /*
    - * $Revision-Id$
    - *
      * Author: Eric Norum
      */
     
    diff --git a/src/libCom/osi/os/iOS/osiFileName.h b/src/libCom/osi/os/iOS/osiFileName.h
    index b88bfe35a..f7dd62878 100644
    --- a/src/libCom/osi/os/iOS/osiFileName.h
    +++ b/src/libCom/osi/os/iOS/osiFileName.h
    @@ -5,8 +5,6 @@
     \*************************************************************************/
     
     /*
    - * $Revision-Id$
    - *
      * Author: Eric Norum
      */
     
    diff --git a/src/libCom/osi/os/posix/epicsMath.h b/src/libCom/osi/os/posix/epicsMath.h
    index 4ed0fdc51..4e558676c 100644
    --- a/src/libCom/osi/os/posix/epicsMath.h
    +++ b/src/libCom/osi/os/posix/epicsMath.h
    @@ -19,7 +19,7 @@ extern "C" {
     
     #ifdef isfinite
     #  undef finite
    -#  define finite(x) isfinite(x)
    +#  define finite(x) isfinite((double)(x))
     #endif
     
     epicsShareExtern float epicsNAN;
    diff --git a/src/libCom/osi/os/posix/osdProcess.c b/src/libCom/osi/os/posix/osdProcess.c
    index 847caa4ad..a08871465 100644
    --- a/src/libCom/osi/os/posix/osdProcess.c
    +++ b/src/libCom/osi/os/posix/osdProcess.c
    @@ -9,8 +9,6 @@
     \*************************************************************************/
     
     /* 
    - * $Revision-Id$
    - * 
      * Operating System Dependent Implementation of osiProcess.h
      *
      * Author: Jeff Hill
    diff --git a/src/libCom/osi/os/posix/osdSock.c b/src/libCom/osi/os/posix/osdSock.c
    index 4cd776c92..9f8146142 100644
    --- a/src/libCom/osi/os/posix/osdSock.c
    +++ b/src/libCom/osi/os/posix/osdSock.c
    @@ -8,7 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* osdSock.c */
    -/* $Revision-Id$ */
     /*
      *      Author:		Jeff Hill 
      *      Date:          	04-05-94 
    diff --git a/src/libCom/osi/os/posix/osdSockAddrReuse.cpp b/src/libCom/osi/os/posix/osdSockAddrReuse.cpp
    index 7ee0c64d2..3a3f78ebd 100644
    --- a/src/libCom/osi/os/posix/osdSockAddrReuse.cpp
    +++ b/src/libCom/osi/os/posix/osdSockAddrReuse.cpp
    @@ -10,7 +10,6 @@
     \*************************************************************************/
     
     /*
    - * $Revision-Id$
      * Author: Jeff Hill
      */
     
    diff --git a/src/libCom/osi/os/posix/osdTime.h b/src/libCom/osi/os/posix/osdTime.h
    index 12ff42a12..d1da77696 100644
    --- a/src/libCom/osi/os/posix/osdTime.h
    +++ b/src/libCom/osi/os/posix/osdTime.h
    @@ -9,8 +9,6 @@
     \*************************************************************************/
     
     /*
    - * $Revision-Id$
    - *
      * Author: Jeff Hill
      */
     
    diff --git a/src/libCom/osi/os/posix/osiUnistd.h b/src/libCom/osi/os/posix/osiUnistd.h
    index 5d2bb5e6f..5121261b6 100644
    --- a/src/libCom/osi/os/posix/osiUnistd.h
    +++ b/src/libCom/osi/os/posix/osiUnistd.h
    @@ -8,16 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*  
    - *  $Revision-Id$
    - *
    - *                              
    - *                    L O S  A L A M O S
    - *              Los Alamos National Laboratory
    - *               Los Alamos, New Mexico 87545
    - *                                  
    - *  Copyright, 1986, The Regents of the University of California.
    - *                                  
    - *           
      *	Author Jeffrey O. Hill
      *	johill@lanl.gov
      *	505 665 1831
    diff --git a/src/libCom/osi/os/posix/systemCallIntMech.cpp b/src/libCom/osi/os/posix/systemCallIntMech.cpp
    index 9eb77a1b6..cdac1d0cb 100644
    --- a/src/libCom/osi/os/posix/systemCallIntMech.cpp
    +++ b/src/libCom/osi/os/posix/systemCallIntMech.cpp
    @@ -8,7 +8,6 @@
     * and higher are distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     /*
      *      Author:		Jeff Hill 
      */
    diff --git a/src/libCom/osi/os/solaris/osdSock.h b/src/libCom/osi/os/solaris/osdSock.h
    index 1ea493680..a39c6c3d3 100644
    --- a/src/libCom/osi/os/solaris/osdSock.h
    +++ b/src/libCom/osi/os/solaris/osdSock.h
    @@ -4,7 +4,7 @@
     * Copyright (c) 2002 The Regents of the University of California, as
     *     Operator of Los Alamos National Laboratory.
     * EPICS BASE is distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     
     /*
    @@ -39,7 +39,7 @@ typedef int osiSockIoctl_t;
     
     #if SOLARIS > 6 || defined ( _SOCKLEN_T )
         typedef uint32_t osiSocklen_t;
    -#else 
    +#else
         typedef int osiSocklen_t;
     #endif
     
    @@ -51,6 +51,7 @@ typedef int osiSockIoctl_t;
     #define SOCK_ENOBUFS ENOBUFS
     #define SOCK_ECONNRESET ECONNRESET
     #define SOCK_ETIMEDOUT ETIMEDOUT
    +#define SOCK_EACCES EACCES
     #define SOCK_EADDRINUSE EADDRINUSE
     #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
     #define SOCK_ECONNREFUSED ECONNREFUSED
    @@ -80,9 +81,8 @@ typedef int osiSockIoctl_t;
     
     #ifndef INADDR_NONE
     #   define INADDR_NONE (0xffffffff)
    -#endif 
    +#endif
     
     #define ifreq_size(pifreq) (sizeof(pifreq->ifr_name))
     
     #endif /*osdSockH*/
    -
    diff --git a/src/libCom/osi/os/vxWorks/camacLib.h b/src/libCom/osi/os/vxWorks/camacLib.h
    index eb2456b1a..a30ab5659 100644
    --- a/src/libCom/osi/os/vxWorks/camacLib.h
    +++ b/src/libCom/osi/os/vxWorks/camacLib.h
    @@ -14,8 +14,6 @@
      *
      */
     
    -static char ht2992_h_RCSID[] = "$Revision-Id$";
    -
     /********************************/
     /* GLOBAL DATA			*/
     /********************************/
    diff --git a/src/libCom/osi/os/vxWorks/devLibVMEOSD.c b/src/libCom/osi/os/vxWorks/devLibVMEOSD.c
    index 22cd177ea..82bec603d 100644
    --- a/src/libCom/osi/os/vxWorks/devLibVMEOSD.c
    +++ b/src/libCom/osi/os/vxWorks/devLibVMEOSD.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* 
    - * $Revision-Id$
    - *
      * Archictecture dependent support for common device driver resources 
      *
      *      Author: Jeff Hill 
    diff --git a/src/libCom/osi/os/vxWorks/epicsDynLink.c b/src/libCom/osi/os/vxWorks/epicsDynLink.c
    index ba0fde277..df954782a 100644
    --- a/src/libCom/osi/os/vxWorks/epicsDynLink.c
    +++ b/src/libCom/osi/os/vxWorks/epicsDynLink.c
    @@ -6,8 +6,7 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/* $Id $
    - *
    +/*
      * On 68K targets, all symbols have an underscore prepended to their name.
      * This code permits both standards to work, as long as you're not looking
      * for a symbol name that actually begins with an underscore.
    diff --git a/src/libCom/osi/os/vxWorks/epicsMMIO.h b/src/libCom/osi/os/vxWorks/epicsMMIO.h
    index dd8abe95a..b12c71ad9 100644
    --- a/src/libCom/osi/os/vxWorks/epicsMMIO.h
    +++ b/src/libCom/osi/os/vxWorks/epicsMMIO.h
    @@ -37,6 +37,7 @@
     
     #include                          /* EPICS Common Type Definitions                  */
     #include                         /* EPICS Byte Order Definitions                   */
    +#include  
     
     /*=====================
      * vxAtomicLib.h (which defines the memory barrier macros)
    @@ -49,15 +50,23 @@
     #  include  
     #endif
     
    -#define bswap16(value) ((epicsUInt16) (  \
    -        (((epicsUInt16)(value) & 0x00ff) << 8)    |       \
    -        (((epicsUInt16)(value) & 0xff00) >> 8)))
    +static EPICS_ALWAYS_INLINE
    +epicsUInt16
    +bswap16(epicsUInt16 value)
    +{
    +    return (((epicsUInt16)(value) & 0x00ff) << 8)    |
    +           (((epicsUInt16)(value) & 0xff00) >> 8);
    +}
     
    -#define bswap32(value) (  \
    -        (((epicsUInt32)(value) & 0x000000ff) << 24)   |                \
    -        (((epicsUInt32)(value) & 0x0000ff00) << 8)    |                \
    -        (((epicsUInt32)(value) & 0x00ff0000) >> 8)    |                \
    -        (((epicsUInt32)(value) & 0xff000000) >> 24))
    +static EPICS_ALWAYS_INLINE
    +epicsUInt32
    +bswap32(epicsUInt32 value)
    +{
    +    return (((epicsUInt32)(value) & 0x000000ff) << 24)   |
    +           (((epicsUInt32)(value) & 0x0000ff00) << 8)    |
    +           (((epicsUInt32)(value) & 0x00ff0000) >> 8)    |
    +           (((epicsUInt32)(value) & 0xff000000) >> 24);
    +}
     
     #if EPICS_BYTE_ORDER == EPICS_ENDIAN_BIG
     #  define be16_to_cpu(X) (epicsUInt16)(X)
    diff --git a/src/libCom/osi/os/vxWorks/logMsgToErrlog.cpp b/src/libCom/osi/os/vxWorks/logMsgToErrlog.cpp
    index fade9ffea..b44881cd0 100644
    --- a/src/libCom/osi/os/vxWorks/logMsgToErrlog.cpp
    +++ b/src/libCom/osi/os/vxWorks/logMsgToErrlog.cpp
    @@ -9,8 +9,6 @@
     \*************************************************************************/
     
     /* 
    - * $Revision-Id$
    - *
      * route vxWorks logMsg messages into the EPICS logging system
      *
      * Author: Jeff Hill
    diff --git a/src/libCom/osi/os/vxWorks/module_types.h b/src/libCom/osi/os/vxWorks/module_types.h
    index af3dd122f..07372c37a 100644
    --- a/src/libCom/osi/os/vxWorks/module_types.h
    +++ b/src/libCom/osi/os/vxWorks/module_types.h
    @@ -8,7 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* module_types.h */
    -/* base/include $Revision-Id$ */
     /*
      * 	Author:      Bob Dalesio
      * 	Date:        12-07-88
    diff --git a/src/libCom/osi/os/vxWorks/osdEnv.c b/src/libCom/osi/os/vxWorks/osdEnv.c
    index 085611935..c81f49316 100644
    --- a/src/libCom/osi/os/vxWorks/osdEnv.c
    +++ b/src/libCom/osi/os/vxWorks/osdEnv.c
    @@ -5,8 +5,6 @@
     \*************************************************************************/
     /* osdEnv.c */
     /*
    - * $Revision-Id$
    - *
      * Author: Eric Norum
      *   Date: May 7, 2001
      *
    diff --git a/src/libCom/osi/os/vxWorks/osdMessageQueue.cpp b/src/libCom/osi/os/vxWorks/osdMessageQueue.cpp
    index 206d6def4..89c2745ed 100644
    --- a/src/libCom/osi/os/vxWorks/osdMessageQueue.cpp
    +++ b/src/libCom/osi/os/vxWorks/osdMessageQueue.cpp
    @@ -8,8 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*
    - *      $Revision-Id$
    - *
      *      Author  W. Eric Norum
      *              norume@aps.anl.gov
      *              630 252 4793
    diff --git a/src/libCom/osi/os/vxWorks/osdMessageQueue.h b/src/libCom/osi/os/vxWorks/osdMessageQueue.h
    index 3ae77b514..87b35bd38 100644
    --- a/src/libCom/osi/os/vxWorks/osdMessageQueue.h
    +++ b/src/libCom/osi/os/vxWorks/osdMessageQueue.h
    @@ -8,8 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*
    - *      $Revision-Id$
    - *
      *      Author  W. Eric Norum
      *              norume@aps.anl.gov
      *              630 252 4793
    diff --git a/src/libCom/osi/os/vxWorks/osdProcess.c b/src/libCom/osi/os/vxWorks/osdProcess.c
    index 27f5b71e9..2347a407c 100644
    --- a/src/libCom/osi/os/vxWorks/osdProcess.c
    +++ b/src/libCom/osi/os/vxWorks/osdProcess.c
    @@ -8,8 +8,6 @@
     \*************************************************************************/
     
     /* 
    - * $Revision-Id$
    - * 
      * Operating System Dependent Implementation of osiProcess.h
      *
      * Author: Jeff Hill
    diff --git a/src/libCom/osi/os/vxWorks/osdReadline.c b/src/libCom/osi/os/vxWorks/osdReadline.c
    index e0208893e..9195b6b72 100644
    --- a/src/libCom/osi/os/vxWorks/osdReadline.c
    +++ b/src/libCom/osi/os/vxWorks/osdReadline.c
    @@ -5,7 +5,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/* $Revision-Id$ */
     /* Author:  Eric Norum Date: 12DEC2001 */
     
     /*
    diff --git a/src/libCom/osi/os/vxWorks/osdSock.h b/src/libCom/osi/os/vxWorks/osdSock.h
    index f0260c5a8..80464ef87 100644
    --- a/src/libCom/osi/os/vxWorks/osdSock.h
    +++ b/src/libCom/osi/os/vxWorks/osdSock.h
    @@ -4,7 +4,7 @@
     * Copyright (c) 2002 The Regents of the University of California, as
     *     Operator of Los Alamos National Laboratory.
     * EPICS BASE is distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     /*
      * vxWorks specific socket include
    @@ -44,7 +44,7 @@ int sysClkRateGet(void);
     #ifdef __cplusplus
     }
     #endif
    - 
    +
     typedef int                     SOCKET;
     #define INVALID_SOCKET		(-1)
     #define SOCKERRNO               errno
    @@ -72,6 +72,7 @@ typedef int osiSocklen_t;
     #define SOCK_ENOBUFS ENOBUFS
     #define SOCK_ECONNRESET ECONNRESET
     #define SOCK_ETIMEDOUT ETIMEDOUT
    +#define SOCK_EACCES EACCES
     #define SOCK_EADDRINUSE EADDRINUSE
     #define SOCK_EADDRNOTAVAIL EADDRNOTAVAIL
     #define SOCK_ECONNREFUSED ECONNREFUSED
    @@ -93,7 +94,7 @@ typedef int osiSocklen_t;
     
     #ifndef INADDR_NONE
     #   define INADDR_NONE (0xffffffff)
    -#endif 
    +#endif
     
     #if defined(_SIZEOF_ADDR_IFREQ)
     #   define ifreq_size(pifreq) _SIZEOF_ADDR_IFREQ(*pifreq)
    @@ -104,5 +105,3 @@ typedef int osiSocklen_t;
     #endif
     
     #endif /*osdSockH*/
    - 
    -
    diff --git a/src/libCom/osi/os/vxWorks/osdVME.h b/src/libCom/osi/os/vxWorks/osdVME.h
    index a5e3bb346..b9d031a04 100644
    --- a/src/libCom/osi/os/vxWorks/osdVME.h
    +++ b/src/libCom/osi/os/vxWorks/osdVME.h
    @@ -7,7 +7,6 @@
     * and higher are distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     /*
      * OS-dependent VME support
    diff --git a/src/libCom/osi/os/vxWorks/osiFileName.h b/src/libCom/osi/os/vxWorks/osiFileName.h
    index b79203992..3a6448d54 100644
    --- a/src/libCom/osi/os/vxWorks/osiFileName.h
    +++ b/src/libCom/osi/os/vxWorks/osiFileName.h
    @@ -10,8 +10,6 @@
     /*
      * osiFileName.h
      * Author: Jeff Hill
    - *
    - *
      */
     #ifndef osiFileNameH
     #define osiFileNameH
    diff --git a/src/libCom/osi/os/vxWorks/task_params.h b/src/libCom/osi/os/vxWorks/task_params.h
    index 455e8ceb2..7b2055157 100644
    --- a/src/libCom/osi/os/vxWorks/task_params.h
    +++ b/src/libCom/osi/os/vxWorks/task_params.h
    @@ -7,7 +7,6 @@
     * and higher are distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     /*  Parameters for tasks on IOC  */
     /*
    diff --git a/src/libCom/osi/os/vxWorks/veclist.c b/src/libCom/osi/os/vxWorks/veclist.c
    index 63aea6618..2a4e617ef 100644
    --- a/src/libCom/osi/os/vxWorks/veclist.c
    +++ b/src/libCom/osi/os/vxWorks/veclist.c
    @@ -8,9 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*
    - *	$Revision-Id$
    - *	@(#)veclist.c	1.10
    - *
      *	list fuctions attached to the interrupt vector table
      *
      *	Created 28Mar89	Jeffrey O. Hill
    @@ -19,19 +16,6 @@
      *
      */
     
    -/*
    - * 
    - *	makefile
    - *
    - *
    - * V5VW = /.../vx/v502b
    - *
    - * veclist.o:
    - *	cc68k -c -DCPU_FAMILY=MC680X0 -I$(V5VW)/h veclist.c
    - * 
    - *
    - */
    -
     #include "vxWorks.h"
     #include "stdio.h"
     #include "string.h"
    @@ -41,9 +25,6 @@
     #include "ctype.h"
     #include "sysSymTbl.h"
     
    -static const char sccsID[] = 
    -	"@(#) $Revision-Id$";
    -
     /*
      *
      * VME bus dependent
    diff --git a/src/libCom/osi/osiClockTime.c b/src/libCom/osi/osiClockTime.c
    index efe25f8b8..408a93fc0 100644
    --- a/src/libCom/osi/osiClockTime.c
    +++ b/src/libCom/osi/osiClockTime.c
    @@ -23,7 +23,7 @@
     #include "taskwd.h"
     
     #define NSEC_PER_SEC 1000000000
    -#define ClockTimeSyncInterval 60.0
    +#define ClockTimeSyncInterval_value 60.0
     
     
     static struct {
    @@ -32,6 +32,7 @@ static struct {
         epicsEventId    loopEvent;
         epicsTimeStamp  startTime;
         epicsTimeStamp  syncTime;
    +    double          ClockTimeSyncInterval;
         int             syncFromPriority;
         epicsMutexId    lock;
     } ClockTimePvt;
    @@ -76,6 +77,7 @@ static void ClockTime_InitOnce(void *pfirst)
     
         ClockTimePvt.loopEvent   = epicsEventMustCreate(epicsEventEmpty);
         ClockTimePvt.lock        = epicsMutexCreate();
    +    ClockTimePvt.ClockTimeSyncInterval = 1.0;   /* First sync */
     
         epicsAtExit(ClockTime_Shutdown, NULL);
     
    @@ -142,10 +144,10 @@ static void ClockTimeSync(void *dummy)
         taskwdInsert(0, NULL, NULL);
     
         for (epicsEventWaitWithTimeout(ClockTimePvt.loopEvent,
    -             ClockTimeSyncInterval);
    +             ClockTimePvt.ClockTimeSyncInterval);
              ClockTimePvt.synchronize == CLOCKTIME_SYNC;
              epicsEventWaitWithTimeout(ClockTimePvt.loopEvent,
    -             ClockTimeSyncInterval)) {
    +             ClockTimePvt.ClockTimeSyncInterval)) {
             epicsTimeStamp timeNow;
             int priority;
     
    @@ -167,6 +169,8 @@ static void ClockTimeSync(void *dummy)
                 ClockTimePvt.syncFromPriority = priority;
                 ClockTimePvt.syncTime         = timeNow;
                 epicsMutexUnlock(ClockTimePvt.lock);
    +
    +            ClockTimePvt.ClockTimeSyncInterval = ClockTimeSyncInterval_value;
             }
         }
     
    @@ -244,7 +248,7 @@ int ClockTime_Report(int level)
                     printf("Last successful sync was at %s\n", timebuf);
                 }
                 printf("Syncronization interval = %.0f seconds\n",
    -                ClockTimeSyncInterval);
    +                ClockTimePvt.ClockTimeSyncInterval);
             }
             else
                 printf("OS Clock driver is *not* synchronized\n");
    diff --git a/src/libCom/osi/osiPoolStatus.h b/src/libCom/osi/osiPoolStatus.h
    index 20f1b7339..b0207f185 100644
    --- a/src/libCom/osi/osiPoolStatus.h
    +++ b/src/libCom/osi/osiPoolStatus.h
    @@ -11,8 +11,6 @@
     #define INC_osiPoolStatus_H
     
     /*
    - * $Revision-Id$
    - *
      * Author: Jeff Hill
      *
      * Functions which interrogate the state of the system wide pool
    diff --git a/src/libCom/osi/osiProcess.h b/src/libCom/osi/osiProcess.h
    index b954c4019..eabff1e72 100644
    --- a/src/libCom/osi/osiProcess.h
    +++ b/src/libCom/osi/osiProcess.h
    @@ -11,8 +11,6 @@
     #define INC_osiProcess_H
     
     /* 
    - * $Revision-Id$
    - * 
      * Operating System Independent Interface to Process Environment
      *
      * Author: Jeff Hill
    diff --git a/src/libCom/osi/osiSock.c b/src/libCom/osi/osiSock.c
    index e030f5ab2..8b4634caf 100644
    --- a/src/libCom/osi/osiSock.c
    +++ b/src/libCom/osi/osiSock.c
    @@ -9,8 +9,6 @@
     \*************************************************************************/
     
     /*
    - *	    $Revision-Id$
    - *
      *      socket support library generic code
      *
      *      7-1-97  -joh-
    diff --git a/src/libCom/osi/osiSock.h b/src/libCom/osi/osiSock.h
    index 1b52c7993..061619e89 100644
    --- a/src/libCom/osi/osiSock.h
    +++ b/src/libCom/osi/osiSock.h
    @@ -8,8 +8,6 @@
     \*************************************************************************/
     
     /*
    - *	    $Revision-Id$
    - *
      *      socket support library API def
      *
      *      7-1-97  -joh-
    diff --git a/src/libCom/osi/osiWireFormat.h b/src/libCom/osi/osiWireFormat.h
    index 1ba8b905d..4d7e6717f 100644
    --- a/src/libCom/osi/osiWireFormat.h
    +++ b/src/libCom/osi/osiWireFormat.h
    @@ -8,13 +8,6 @@
     \*************************************************************************/
     
     /*
    - *                    L O S  A L A M O S
    - *              Los Alamos National Laboratory
    - *               Los Alamos, New Mexico 87545
    - *
    - *  Copyright, 2000, The Regents of the University of California.
    - *
    - *
      *  Author Jeffrey O. Hill
      *  johill@lanl.gov
      */
    diff --git a/src/libCom/taskwd/taskwd.h b/src/libCom/taskwd/taskwd.h
    index 2d66be950..4d5274d56 100644
    --- a/src/libCom/taskwd/taskwd.h
    +++ b/src/libCom/taskwd/taskwd.h
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* General purpose task watchdog */
     /*
      *      Original Author:        Marty Kraimer
    diff --git a/src/libCom/test/Makefile b/src/libCom/test/Makefile
    index f0359420d..ee4d11071 100755
    --- a/src/libCom/test/Makefile
    +++ b/src/libCom/test/Makefile
    @@ -11,6 +11,7 @@ TOP=../../..
     include $(TOP)/configure/CONFIG
     
     PROD_LIBS += Com
    +PROD_SYS_LIBS_WIN32 += ws2_32 advapi32 user32
     
     TESTPROD_HOST += epicsUnitTestTest
     epicsUnitTestTest_SRCS += epicsUnitTestTest.c
    @@ -98,6 +99,7 @@ TESTS += epicsTimeTest
     
     TESTPROD_HOST += epicsTimeZoneTest
     epicsTimeZoneTest_SRCS += epicsTimeZoneTest.c
    +libComTestHarness_SRCS_RTEMS += epicsTimeZoneTest.c
     TESTS += epicsTimeZoneTest
     
     TESTPROD_HOST += epicsThreadTest
    @@ -170,11 +172,6 @@ epicsAtomicTest_SRCS += epicsAtomicTest.cpp
     testHarness_SRCS += epicsAtomicTest.cpp
     TESTS += epicsAtomicTest
     
    -TESTPROD_HOST += epicsExceptionTest
    -epicsExceptionTest_SRCS += epicsExceptionTest.cpp
    -testHarness_SRCS += epicsExceptionTest.cpp
    -TESTS += epicsExceptionTest
    -
     TESTPROD_HOST += macDefExpandTest
     macDefExpandTest_SRCS += macDefExpandTest.c
     testHarness_SRCS += macDefExpandTest.c
    @@ -208,6 +205,10 @@ epicsStackTraceTest_SRCS += epicsStackTraceTest.c
     testHarness_SRCS += epicsStackTraceTest.c
     TESTS += epicsStackTraceTest
     
    +TESTPROD_HOST += ipAddrToAsciiTest
    +ipAddrToAsciiTest_SRCS += ipAddrToAsciiTest.cpp
    +testHarness_SRCS += ipAddrToAsciiTest.cpp
    +TESTS += ipAddrToAsciiTest
     
     # The testHarness runs all the test programs in a known working order.
     testHarness_SRCS += epicsRunLibComTests.c
    diff --git a/src/libCom/test/epicsCalcTest.cpp b/src/libCom/test/epicsCalcTest.cpp
    index 24e30d417..1bd046d37 100644
    --- a/src/libCom/test/epicsCalcTest.cpp
    +++ b/src/libCom/test/epicsCalcTest.cpp
    @@ -4,7 +4,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -// $Revision-Id$
     //	Author: Andrew Johnson
     
     #include "epicsUnitTest.h"
    diff --git a/src/libCom/test/epicsEllTest.c b/src/libCom/test/epicsEllTest.c
    index b608d1cc3..62ee14e39 100644
    --- a/src/libCom/test/epicsEllTest.c
    +++ b/src/libCom/test/epicsEllTest.c
    @@ -1,4 +1,5 @@
     /*************************************************************************\
    +* Copyright (c) 2016 Michael Davidsaver
     * Copyright (c) 2009 UChicago Argonne LLC, as Operator of Argonne
     *     National Laboratory.
     * Copyright (c) 2002 The Regents of the University of California, as
    @@ -11,6 +12,7 @@
     #include 
     
     #include "ellLib.h"
    +#include "dbDefs.h"
     #include "epicsUnitTest.h"
     #include "testMain.h"
     
    @@ -20,15 +22,13 @@ struct myItem {
         int num;
     };
     
    -MAIN(epicsEllTest)
    +static void testList(void)
     {
         ELLLIST list1;
         ELLLIST list2 = ELLLIST_INIT;
         int i1 = 1;
         struct myItem *pitem, *pfirst, *pick;
     
    -    testPlan(70);
    -
         list1.count = 27;
         list1.node.next = (ELLNODE *) 0x01010101;
         list1.node.previous = (ELLNODE *) 0x10101010;
    @@ -192,6 +192,77 @@ MAIN(epicsEllTest)
     
         ellFree2(&list1, free);
         testOk1(ellCount(&list1) == 0);
    +}
    +
    +typedef struct { int A, B; } input_t;
    +
    +static int myItemCmp(const ELLNODE *a, const ELLNODE *b)
    +{
    +    struct myItem *A = CONTAINER(a, struct myItem, node),
    +                  *B = CONTAINER(b, struct myItem, node);
    +
    +    if     (A->num < B->num)   return -1;
    +    else if(A->num > B->num)   return 1;
    +    else if(A->list < B->list) return -1;
    +    else if(A->list > B->list) return 1;
    +    else                       return 0;
    +}
    +
    +static const input_t input[] = {
    +    {-4, 0},
    +    {-5, 0},
    +    {0,0},
    +    {50,0},
    +    {0,1},
    +    {5,0},
    +    {5,1}
    +};
    +
    +static
    +void testSort(const input_t *inp, size_t ninp)
    +{
    +    unsigned i;
    +    ELLLIST list = ELLLIST_INIT;
    +    struct myItem *alloc = calloc(ninp, sizeof(*alloc));
    +
    +    if(!alloc) testAbort("testSort allocation fails");
    +
    +    for(i=0; inum = inp[i].A;
    +        it->list= inp[i].B;
    +
    +        ellAdd(&list, &it->node);
    +    }
    +
    +    ellSortStable(&list, &myItemCmp);
    +
    +    testOk(ellCount(&list)==ninp, "output length %u == %u", (unsigned)ellCount(&list), (unsigned)ninp);
    +    if(ellCount(&list)==0) {
    +        testSkip(ninp-1, "all items lost");
    +    }
    +
    +    {
    +        struct myItem *prev = CONTAINER(ellFirst(&list), struct myItem, node),
    +                      *next;
    +
    +        for(next = CONTAINER(ellNext(&prev->node), struct myItem, node);
    +            next;
    +            prev = next, next = CONTAINER(ellNext(&next->node), struct myItem, node))
    +        {
    +            int cond = (prev->numnum) || (prev->num==next->num && prev->listlist);
    +            testOk(cond, "%d:%d < %d:%d", prev->num, prev->list, next->num, next->list);
    +        }
    +    }
    +}
    +
    +MAIN(epicsEllTest)
    +{
    +    testPlan(77);
    +
    +    testList();
    +    testSort(input, NELEMENTS(input));
     
         return testDone();
     }
    diff --git a/src/libCom/test/epicsEventTest.cpp b/src/libCom/test/epicsEventTest.cpp
    index b0d79613f..7c1a24141 100644
    --- a/src/libCom/test/epicsEventTest.cpp
    +++ b/src/libCom/test/epicsEventTest.cpp
    @@ -250,5 +250,12 @@ MAIN(epicsEventTest)
         eventWaitTest();
         eventWakeupTest();
     
    +    free(name);
    +    free(id);
    +    epicsRingPointerDelete(pinfo->ring);
    +    epicsMutexDestroy(pinfo->lockRing);
    +    epicsEventDestroy(event);
    +    free(pinfo);
    +
         return testDone();
     }
    diff --git a/src/libCom/test/epicsExceptionTest.cpp b/src/libCom/test/epicsExceptionTest.cpp
    deleted file mode 100644
    index d6c3ecd9b..000000000
    --- a/src/libCom/test/epicsExceptionTest.cpp
    +++ /dev/null
    @@ -1,110 +0,0 @@
    -/*************************************************************************\
    -* Copyright (c) 2006 UChicago Argonne LLC, as Operator of Argonne
    -*     National Laboratory.
    -* Copyright (c) 2002 The Regents of the University of California, as
    -*     Operator of Los Alamos National Laboratory.
    -* EPICS BASE is distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution.
    -\*************************************************************************/
    -
    -//
    -// Verify that the local c++ exception mechanism matches the ANSI/ISO standard.
    -// Author: Jeff Hill
    -//
    -
    -#include 
    -#include 
    -#include 
    -#if defined(__GNUC__) && (__GNUC__<2 || (__GNUC__==2 && __GNUC_MINOR__<=96))
    -#include 
    -#else
    -#include 
    -#endif
    -
    -#include "epicsUnitTest.h"
    -#include "epicsThread.h"
    -#include "testMain.h"
    -
    -using namespace std;
    -
    -#if defined ( _MSC_VER )
    -    // some interesting bugs found in the MS implementation of new
    -#   if _MSC_VER >= 1900
    -        static size_t unsuccessfulNewSize = numeric_limits < size_t > :: max ();
    -#   elif _MSC_VER > 1310  /* this gets fixed some release after visual studio 7 we hope */
    -        static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max ();
    -#   else
    -        static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max () - 100;
    -#   endif
    -    // passing a size_t to printf() needs "%zu" on some platforms
    -#elif defined(vxWorks)
    -    // Neither vxWorks 5 or 6 supply true ANSI C++
    -    static const size_t unsuccessfulNewSize = UINT_MAX - 15u;
    -#else
    -    static const size_t unsuccessfulNewSize = numeric_limits < size_t > :: max ();
    -#endif
    -
    -class exThread : public epicsThreadRunable {
    -public:
    -    exThread ();
    -    void waitForCompletion ();
    -    ~exThread() {};
    -private:
    -    epicsThread thread;
    -    bool done;
    -    void run ();
    -};
    -
    -static void epicsExceptionTestPrivate ()
    -{
    -    try {
    -        char * p = new char [unsuccessfulNewSize];
    -        testFail("new char[%lu] returned %p",
    -            (unsigned long) unsuccessfulNewSize, p);
    -    }
    -    catch ( const bad_alloc & ) {
    -        testPass("new char[%lu] threw",
    -            (unsigned long) unsuccessfulNewSize);
    -    }
    -    catch ( ... ) {
    -        testFail("new: threw wrong type");
    -    }
    -    try {
    -        char * p = new ( nothrow ) 
    -            char [unsuccessfulNewSize];
    -        testOk(p == 0, "new (nothrow) returned %p", p);
    -    }
    -    catch( ... ) {
    -        testFail("new (nothrow): threw");
    -    }
    -}
    -
    -exThread::exThread () :
    -    thread ( *this, "testExceptions", epicsThreadGetStackSize(epicsThreadStackSmall) ),
    -        done ( false )
    -{
    -    this->thread.start ();
    -}
    -
    -void exThread::run ()
    -{
    -    epicsExceptionTestPrivate ();
    -    this->done = true;
    -}
    -
    -void exThread::waitForCompletion ()
    -{
    -    while ( ! this->done ) {
    -        epicsThreadSleep ( 0.1 );
    -    }
    -}
    -
    -MAIN(epicsExceptionTest)
    -{
    -    testPlan(4);
    -    epicsExceptionTestPrivate ();
    -    
    -    exThread athread;
    -    athread.waitForCompletion ();
    -    return testDone();
    -}
    diff --git a/src/libCom/test/epicsMessageQueueTest.cpp b/src/libCom/test/epicsMessageQueueTest.cpp
    index e4216c291..ae090fc47 100644
    --- a/src/libCom/test/epicsMessageQueueTest.cpp
    +++ b/src/libCom/test/epicsMessageQueueTest.cpp
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     /*
    - *      $Revision-Id$
    - *
      *      Author  W. Eric Norum
      */
     #include 
    diff --git a/src/libCom/test/epicsMutexTest.cpp b/src/libCom/test/epicsMutexTest.cpp
    index 87cf0a460..d44e5c0f1 100644
    --- a/src/libCom/test/epicsMutexTest.cpp
    +++ b/src/libCom/test/epicsMutexTest.cpp
    @@ -279,5 +279,11 @@ MAIN(epicsMutexTest)
     
         epicsMutexPerformance ();
     
    +    free(pinfo);
    +    free(arg);
    +    free(name);
    +    free(id);
    +    epicsMutexDestroy(mutex);
    +
         return testDone();
     }
    diff --git a/src/libCom/test/epicsRunLibComTests.c b/src/libCom/test/epicsRunLibComTests.c
    index 5022fef69..c4a76e777 100644
    --- a/src/libCom/test/epicsRunLibComTests.c
    +++ b/src/libCom/test/epicsRunLibComTests.c
    @@ -24,7 +24,6 @@ int epicsEllTest(void);
     int epicsEnvTest(void);
     int epicsErrlogTest(void);
     int epicsEventTest(void);
    -int epicsExceptionTest(void);
     int epicsExitTest(void);
     int epicsMathTest(void);
     int epicsMessageQueueTest(void);
    @@ -44,8 +43,12 @@ int epicsThreadPrivateTest(void);
     int epicsThreadTest(void);
     int epicsTimerTest(void);
     int epicsTimeTest(void);
    +#ifdef __rtems__
    +int epicsTimeZoneTest(void);
    +#endif
     int epicsTypesTest(void);
     int epicsInlineTest(void);
    +int ipAddrToAsciiTest(void);
     int macDefExpandTest(void);
     int macLibTest(void);
     int ringBytesTest(void);
    @@ -77,7 +80,7 @@ void epicsRunLibComTests(void)
         runTest(epicsEnvTest);
         runTest(epicsErrlogTest);
         runTest(epicsEventTest);
    -    runTest(epicsExceptionTest);
    +    runTest(epicsInlineTest);
         runTest(epicsMathTest);
         runTest(epicsMessageQueueTest);
         runTest(epicsMMIOTest);
    @@ -94,8 +97,11 @@ void epicsRunLibComTests(void)
         runTest(epicsThreadPriorityTest);
         runTest(epicsThreadPrivateTest);
         runTest(epicsTimeTest);
    +#ifdef __rtems__
    +    runTest(epicsTimeZoneTest);
    +#endif
         runTest(epicsTypesTest);
    -    runTest(epicsInlineTest);
    +    runTest(ipAddrToAsciiTest);
         runTest(macDefExpandTest);
         runTest(macLibTest);
         runTest(ringBytesTest);
    diff --git a/src/libCom/test/epicsStdioTest.c b/src/libCom/test/epicsStdioTest.c
    index c2d7eb58a..bf25784a5 100644
    --- a/src/libCom/test/epicsStdioTest.c
    +++ b/src/libCom/test/epicsStdioTest.c
    @@ -37,7 +37,14 @@ static void testEpicsSnprintf(void) {
         const char *expected = exbuffer;
         int size;
         int rtn, rlen;
    -    
    +
    +#ifdef _WIN32
    +#if (defined(_MSC_VER) && _MSC_VER < 1900) || \
    +    (defined(_MINGW) && defined(_TWO_DIGIT_EXPONENT))
    +    _set_output_format(_TWO_DIGIT_EXPONENT);
    +#endif
    +#endif
    +
         sprintf(exbuffer, format, ivalue, fvalue, svalue);
         rlen = strlen(expected)+1;
         
    @@ -121,11 +128,7 @@ void testStdoutRedir (const char *report)
     
     MAIN(epicsStdioTest)
     {
    -#ifdef _WIN32
    -    testPlan(166);
    -#else
         testPlan(163);
    -#endif
         testEpicsSnprintf();
     #ifdef __rtems__
         /* ensure there is a writeable area */
    diff --git a/src/libCom/test/epicsStringTest.c b/src/libCom/test/epicsStringTest.c
    index a5fffaf49..3e4aed7e7 100644
    --- a/src/libCom/test/epicsStringTest.c
    +++ b/src/libCom/test/epicsStringTest.c
    @@ -6,8 +6,7 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/* $Revision-Id$
    - *
    +/*
      *      Author  Marty Kraimer
      */
     
    @@ -88,7 +87,7 @@ MAIN(epicsStringTest)
         char *s;
         int status;
     
    -    testPlan(402);
    +    testPlan(406);
     
         testChars();
     
    @@ -123,6 +122,11 @@ MAIN(epicsStringTest)
         testOk1(epicsStrHash(abcd, 0) == epicsMemHash(abcde, 4, 0));
         testOk1(epicsStrHash(abcd, 0) != epicsMemHash("abcd\0", 5, 0));
     
    +    testOk1(epicsStrnLen("abcd", 5)==4);
    +    testOk1(epicsStrnLen("abcd", 4)==4);
    +    testOk1(epicsStrnLen("abcd", 3)==3);
    +    testOk1(epicsStrnLen("abcd", 0)==0);
    +
         testGlob();
     
         memset(result, 'x', sizeof(result));
    diff --git a/src/libCom/test/epicsThreadOnceTest.c b/src/libCom/test/epicsThreadOnceTest.c
    index 0939a2aae..2ecdf3a68 100644
    --- a/src/libCom/test/epicsThreadOnceTest.c
    +++ b/src/libCom/test/epicsThreadOnceTest.c
    @@ -4,7 +4,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     #include 
     #include 
    diff --git a/src/libCom/test/epicsThreadPrivateTest.cpp b/src/libCom/test/epicsThreadPrivateTest.cpp
    index 582611ad8..7ce28f4fd 100644
    --- a/src/libCom/test/epicsThreadPrivateTest.cpp
    +++ b/src/libCom/test/epicsThreadPrivateTest.cpp
    @@ -6,7 +6,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     /* Author: Jeff Hill Date:    March 28 2001 */
     
    diff --git a/src/libCom/test/epicsTimeTest.cpp b/src/libCom/test/epicsTimeTest.cpp
    index 970258801..ec5da4c78 100644
    --- a/src/libCom/test/epicsTimeTest.cpp
    +++ b/src/libCom/test/epicsTimeTest.cpp
    @@ -43,7 +43,7 @@ MAIN(epicsTimeTest)
         const int wasteTime = 100000;
         const int nTimes = 10;
     
    -    testPlan(15 + nTimes * 18);
    +    testPlan(15 + nTimes * 19);
     
         try {
             const epicsTimeStamp epochTS = {0, 0};
    @@ -200,6 +200,11 @@ MAIN(epicsTimeTest)
             epicsTime beginANSI = ansiDate;
             testOk1(beginANSI + diff == now);
     
    +        // test struct gmtm round-trip conversion
    +        gm_tm_nano_sec ansiGmDate = begin;
    +        epicsTime beginGMANSI = ansiGmDate;
    +        testOk1(beginGMANSI + diff == now);
    +
             // test struct timespec round-trip conversion
             struct timespec ts = begin;
             epicsTime beginTS = ts;
    diff --git a/src/libCom/test/epicsTimeZoneTest.c b/src/libCom/test/epicsTimeZoneTest.c
    index dd12b1acf..685295fc4 100644
    --- a/src/libCom/test/epicsTimeZoneTest.c
    +++ b/src/libCom/test/epicsTimeZoneTest.c
    @@ -17,15 +17,9 @@
     #endif
     
     static
    -void setTZ(const char *base, const char *dst, int offset)
    +void setTZ(const char *tz)
     {
    -    char tz[20];
    -    if(offset!=0 || dst)
    -        sprintf(tz, "%s%d%s", base, offset/3600, dst);
    -    else
    -        sprintf(tz, "%s", base);
    -    testDiag("TZ=\"%s\"", tz);
    -
    +    testDiag("TZ = \"%s\"", tz);
         epicsEnvSet("TZ", tz);
         tzset();
     }
    @@ -86,32 +80,52 @@ void test_gmtime(time_t T, int sec, int min, int hour,
     
     MAIN(epicsTimeZoneTest)
     {
    -    testPlan(80);
    +    testPlan(160);
         /* 1445259616
          *  Mon Oct 19 09:00:16 2015 EDT
          *  Mon Oct 19 08:00:16 2015 CDT
    +     *  Mon Oct 19 03:00:16 2015 HST  (no dst)
          *  Mon Oct 19 13:00:16 2015 UTC
          */
         testDiag("POSIX 1445259616");
    -    setTZ("EST", "EDT", 5*3600);
    -    test_localtime(1445259616ul, 16, 0, 9, 19, 9, 2015, 1, 291, 1);
    -    setTZ("CST", "CDT", 6*3600);
    -    test_localtime(1445259616ul, 16, 0, 8, 19, 9, 2015, 1, 291, 1);
    -    setTZ("UTC", NULL, 0);
    +    setTZ("EST5EDT");
    +    test_localtime(1445259616ul, 16, 0, 9,  19, 9, 2015, 1, 291, 1);
    +    test_gmtime   (1445259616ul, 16, 0, 13, 19, 9, 2015, 1, 291, 0);
    +    setTZ("CST6CDT");
    +    test_localtime(1445259616ul, 16, 0, 8,  19, 9, 2015, 1, 291, 1);
    +    test_gmtime   (1445259616ul, 16, 0, 13, 19, 9, 2015, 1, 291, 0);
    +#if defined(__rtems__)
    +    setTZ("HST10HST10");
    +#else
    +    setTZ("HST10");
    +#endif
    +    test_localtime(1445259616ul, 16, 0, 3,  19, 9, 2015, 1, 291, 0);
    +    test_gmtime   (1445259616ul, 16, 0, 13, 19, 9, 2015, 1, 291, 0);
    +    setTZ("UTC0");
         test_localtime(1445259616ul, 16, 0, 13, 19, 9, 2015, 1, 291, 0);
    -    test_gmtime(1445259616ul, 16, 0, 13, 19, 9, 2015, 1, 291, 0);
    +    test_gmtime   (1445259616ul, 16, 0, 13, 19, 9, 2015, 1, 291, 0);
         /* 1421244931
          *  Wed Jan 14 09:15:31 2015 EST
          *  Wed Jan 14 08:15:31 2015 CST
    +     *  Wed Jan 14 04:15:31 2015 HST
          *  Wed Jan 14 14:15:31 2015 UTC
          */
         testDiag("POSIX 1421244931");
    -    setTZ("EST", "EDT", 5*3600);
    -    test_localtime(1421244931ul, 31, 15, 9, 14, 0, 2015, 3, 13, 0);
    -    setTZ("CST", "CDT", 6*3600);
    -    test_localtime(1421244931ul, 31, 15, 8, 14, 0, 2015, 3, 13, 0);
    -    setTZ("UTC", NULL, 0);
    +    setTZ("EST5EDT");
    +    test_localtime(1421244931ul, 31, 15,  9, 14, 0, 2015, 3, 13, 0);
    +    test_gmtime   (1421244931ul, 31, 15, 14, 14, 0, 2015, 3, 13, 0);
    +    setTZ("CST6CDT");
    +    test_localtime(1421244931ul, 31, 15,  8, 14, 0, 2015, 3, 13, 0);
    +    test_gmtime   (1421244931ul, 31, 15, 14, 14, 0, 2015, 3, 13, 0);
    +#if defined(__rtems__)
    +    setTZ("HST10HST10");
    +#else
    +    setTZ("HST10");
    +#endif
    +    test_localtime(1421244931ul, 31, 15,  4, 14, 0, 2015, 3, 13, 0);
    +    test_gmtime   (1421244931ul, 31, 15, 14, 14, 0, 2015, 3, 13, 0);
    +    setTZ("UTC0");
         test_localtime(1421244931ul, 31, 15, 14, 14, 0, 2015, 3, 13, 0);
    -    test_gmtime(1421244931ul, 31, 15, 14, 14, 0, 2015, 3, 13, 0);
    +    test_gmtime   (1421244931ul, 31, 15, 14, 14, 0, 2015, 3, 13, 0);
         return testDone();
     }
    diff --git a/src/libCom/test/epicsTimerTest.cpp b/src/libCom/test/epicsTimerTest.cpp
    index 96f1a78cd..f2a510819 100644
    --- a/src/libCom/test/epicsTimerTest.cpp
    +++ b/src/libCom/test/epicsTimerTest.cpp
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     /*
    - *      $Revision-Id$
    - *
      *      Author  Jeffrey O. Hill
      *              johill@lanl.gov
      *              505 665 1831
    diff --git a/src/libCom/test/epicsUnitTestTest.c b/src/libCom/test/epicsUnitTestTest.c
    index 688049c05..b16bad52a 100644
    --- a/src/libCom/test/epicsUnitTestTest.c
    +++ b/src/libCom/test/epicsUnitTestTest.c
    @@ -5,7 +5,7 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     
    -/* $Revision-Id$
    +/*
      * Author: Andrew Johnson
      *
      * Test for the unit test module...
    diff --git a/src/libCom/test/ipAddrToAsciiTest.cpp b/src/libCom/test/ipAddrToAsciiTest.cpp
    new file mode 100644
    index 000000000..f9323374d
    --- /dev/null
    +++ b/src/libCom/test/ipAddrToAsciiTest.cpp
    @@ -0,0 +1,165 @@
    +/*************************************************************************\
    +* Copyright (c) 2017 Michael Davidsaver
    +* EPICS BASE is distributed subject to a Software License Agreement found
    +* in file LICENSE that is included with this distribution.
    +\*************************************************************************/
    +
    +#include 
    +#include 
    +
    +#define EPICS_PRIVATE_API
    +
    +#include "epicsMutex.h"
    +#include "epicsGuard.h"
    +#include "epicsThread.h"
    +#include "epicsEvent.h"
    +#include "ipAddrToAsciiAsynchronous.h"
    +
    +#include "epicsUnitTest.h"
    +#include "testMain.h"
    +
    +namespace {
    +
    +typedef epicsGuard Guard;
    +typedef epicsGuardRelease UnGuard;
    +
    +struct CB : public ipAddrToAsciiCallBack
    +{
    +    const char *name;
    +    epicsMutex mutex;
    +    epicsEvent starter, blocker, complete;
    +    bool started, cont, done;
    +    CB(const char *name) : name(name), started(false), cont(false), done(false) {}
    +    virtual ~CB() {}
    +    virtual void transactionComplete ( const char * pHostName )
    +    {
    +        Guard G(mutex);
    +        started = true;
    +        starter.signal();
    +        testDiag("In transactionComplete(%s) for %s", pHostName, name);
    +        while(!cont) {
    +            UnGuard U(G);
    +            if(!blocker.wait(2.0))
    +                break;
    +        }
    +        done = true;
    +        complete.signal();
    +    }
    +    void waitStart()
    +    {
    +        Guard G(mutex);
    +        while(!started) {
    +            UnGuard U(G);
    +            if(!starter.wait(2.0))
    +                break;
    +        }
    +    }
    +    void poke()
    +    {
    +        testDiag("Poke");
    +        Guard G(mutex);
    +        cont = true;
    +        blocker.signal();
    +    }
    +    void finish()
    +    {
    +        testDiag("Finish");
    +        Guard G(mutex);
    +        while(!done) {
    +            UnGuard U(G);
    +            if(!complete.wait(2.0))
    +                break;
    +        }
    +        testDiag("Finished");
    +    }
    +};
    +
    +// ensure that lookup of 127.0.0.1 works
    +void doLookup(ipAddrToAsciiEngine& engine)
    +{
    +    testDiag("In doLookup");
    +
    +    ipAddrToAsciiTransaction& trn(engine.createTransaction());
    +    CB cb("cb");
    +    osiSockAddr addr;
    +    addr.ia.sin_family = AF_INET;
    +    addr.ia.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
    +    addr.ia.sin_port = htons(42);
    +
    +    testDiag("Start lookup");
    +    trn.ipAddrToAscii(addr, cb);
    +    cb.poke();
    +    cb.finish();
    +    testOk1(cb.cont);
    +    testOk1(cb.done);
    +
    +    trn.release();
    +}
    +
    +// Test cancel of pending transaction
    +void doCancel()
    +{
    +    testDiag("In doCancel");
    +
    +    ipAddrToAsciiEngine& engine1(ipAddrToAsciiEngine::allocate());
    +    ipAddrToAsciiEngine& engine2(ipAddrToAsciiEngine::allocate());
    +
    +    ipAddrToAsciiTransaction& trn1(engine1.createTransaction()),
    +                            & trn2(engine2.createTransaction());
    +    testOk1(&trn1!=&trn2);
    +    CB cb1("cb1"), cb2("cb2");
    +
    +    osiSockAddr addr;
    +    addr.ia.sin_family = AF_INET;
    +    addr.ia.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
    +    addr.ia.sin_port = htons(42);
    +
    +    // ensure that the worker thread is blocked with a transaction from engine1
    +    testDiag("Start lookup1");
    +    trn1.ipAddrToAscii(addr, cb1);
    +    testDiag("Wait start1");
    +    cb1.waitStart();
    +
    +    testDiag("Start lookup2");
    +    trn2.ipAddrToAscii(addr, cb2);
    +
    +    testDiag("release engine2, implicitly cancels lookup2");
    +    engine2.release();
    +
    +    cb2.poke();
    +    testDiag("Wait for lookup2 timeout");
    +    cb2.finish();
    +    testOk1(!cb2.done);
    +
    +    testDiag("Complete lookup1");
    +    cb1.poke();
    +    cb1.finish();
    +    testOk1(cb1.done);
    +
    +    engine1.release();
    +
    +    trn1.release();
    +    trn2.release();
    +}
    +
    +} // namespace
    +
    +MAIN(ipAddrToAsciiTest)
    +{
    +    testPlan(5);
    +    {
    +        ipAddrToAsciiEngine& engine(ipAddrToAsciiEngine::allocate());
    +        doLookup(engine);
    +        engine.release();
    +    }
    +    doCancel();
    +    // TODO: somehow test cancel of in-progress callback
    +    // allow time for any un-canceled transcations to crash us...
    +    epicsThreadSleep(1.0);
    +
    +#ifdef __linux__
    +    ipAddrToAsciiEngine::cleanup();
    +#endif
    +
    +    return testDone();
    +}
    diff --git a/src/libCom/test/macDefExpandTest.c b/src/libCom/test/macDefExpandTest.c
    index 8e651efbe..a5e45a420 100644
    --- a/src/libCom/test/macDefExpandTest.c
    +++ b/src/libCom/test/macDefExpandTest.c
    @@ -6,9 +6,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/*
    - * $Revision-Id$
    - */
     
     #include 
     #include 
    diff --git a/src/libCom/test/macLibTest.c b/src/libCom/test/macLibTest.c
    index 1b79ad012..7f1e2c544 100644
    --- a/src/libCom/test/macLibTest.c
    +++ b/src/libCom/test/macLibTest.c
    @@ -6,9 +6,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/*
    - * $Revision-Id$
    - */
     
     #include 
     #include 
    @@ -68,7 +65,7 @@ static void ovcheck(void)
     
     MAIN(macLibTest)
     {
    -    testPlan(89);
    +    testPlan(91);
     
         if (macCreateHandle(&h, NULL))
             testAbort("macCreateHandle() failed");
    @@ -206,6 +203,9 @@ MAIN(macLibTest)
             /* STR2 = "VAL2" */
         check("${FOO}", " VAL2");
     
    +    check("$(FOO)$(FOO1)", "!VAL2$(FOO1,undefined)");
    +    check("$(FOO1)$(FOO)", "!$(FOO1,undefined)VAL2");
    +
         macPutValue(h, "BAR","${FOO}");
             /* FOO = "${BAR}" */
             /* BAR = "${FOO}" */
    diff --git a/src/libCom/test/ringBytesTest.c b/src/libCom/test/ringBytesTest.c
    index ecfd991be..6cef93334 100644
    --- a/src/libCom/test/ringBytesTest.c
    +++ b/src/libCom/test/ringBytesTest.c
    @@ -115,5 +115,9 @@ MAIN(ringBytesTest)
         testOk(n==1, "ring get %d", 1);
         check(ring, RINGSIZE);
     
    +    epicsRingBytesDelete(ring);
    +    epicsEventDestroy(consumerEvent);
    +    free(pinfo);
    +
         return testDone();
     }
    diff --git a/src/libCom/test/taskwdTest.c b/src/libCom/test/taskwdTest.c
    index 3fb2319fe..6cec429d2 100644
    --- a/src/libCom/test/taskwdTest.c
    +++ b/src/libCom/test/taskwdTest.c
    @@ -4,7 +4,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     /* Author: Andrew Johnson
      * Date:    May 21, 2008
    diff --git a/src/libCom/timer/epicsTimer.cpp b/src/libCom/timer/epicsTimer.cpp
    index 35fdaf9db..e55280e7e 100644
    --- a/src/libCom/timer/epicsTimer.cpp
    +++ b/src/libCom/timer/epicsTimer.cpp
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     /*
    - *      $Revision-Id$
    - *
      *      Author  Jeffrey O. Hill
      *              johill@lanl.gov
      *              505 665 1831
    diff --git a/src/libCom/timer/timer.cpp b/src/libCom/timer/timer.cpp
    index 3f4b2aff6..35d6e47bf 100644
    --- a/src/libCom/timer/timer.cpp
    +++ b/src/libCom/timer/timer.cpp
    @@ -9,11 +9,9 @@
     \*************************************************************************/
     
     /*
    - *
      *      Author  Jeffrey O. Hill
      *              johill@lanl.gov
      *              505 665 1831
    - *
      */
     
     #include 
    diff --git a/src/libCom/timer/timerPrivate.h b/src/libCom/timer/timerPrivate.h
    index 186b799e6..c60939851 100644
    --- a/src/libCom/timer/timerPrivate.h
    +++ b/src/libCom/timer/timerPrivate.h
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     /*
    - *      $Revision-Id$
    - *
      *      Author  Jeffrey O. Hill
      *              johill@lanl.gov
      *              505 665 1831
    diff --git a/src/libCom/timer/timerQueue.cpp b/src/libCom/timer/timerQueue.cpp
    index cbccd8ffa..5a798d4d4 100644
    --- a/src/libCom/timer/timerQueue.cpp
    +++ b/src/libCom/timer/timerQueue.cpp
    @@ -7,7 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*
    - *
      *      Author  Jeffrey O. Hill
      *              johill@lanl.gov
      *              505 665 1831
    diff --git a/src/libCom/timer/timerQueueActive.cpp b/src/libCom/timer/timerQueueActive.cpp
    index 6225b11a0..5d8b72951 100644
    --- a/src/libCom/timer/timerQueueActive.cpp
    +++ b/src/libCom/timer/timerQueueActive.cpp
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     /*
    - *      $Revision-Id$
    - *
      *      Author  Jeffrey O. Hill
      *              johill@lanl.gov
      *              505 665 1831
    diff --git a/src/libCom/timer/timerQueueActiveMgr.cpp b/src/libCom/timer/timerQueueActiveMgr.cpp
    index 803b96bba..d6349a84c 100644
    --- a/src/libCom/timer/timerQueueActiveMgr.cpp
    +++ b/src/libCom/timer/timerQueueActiveMgr.cpp
    @@ -8,8 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*
    - *      $Revision-Id$
    - *
      *      Author  Jeffrey O. Hill
      *              johill@lanl.gov
      *              505 665 1831
    diff --git a/src/libCom/timer/timerQueuePassive.cpp b/src/libCom/timer/timerQueuePassive.cpp
    index 192f2bbe5..a352c5672 100644
    --- a/src/libCom/timer/timerQueuePassive.cpp
    +++ b/src/libCom/timer/timerQueuePassive.cpp
    @@ -8,7 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /*
    - *
      *      Author  Jeffrey O. Hill
      *              johill@lanl.gov
      *              505 665 1831
    diff --git a/src/std/dev/Makefile b/src/std/dev/Makefile
    index 6bdbbd997..8e4e242f9 100644
    --- a/src/std/dev/Makefile
    +++ b/src/std/dev/Makefile
    @@ -66,6 +66,7 @@ dbRecStd_SRCS += devSoSoftCallback.c
     
     dbRecStd_SRCS += devTimestamp.c
     dbRecStd_SRCS += devStdio.c
    +dbRecStd_SRCS += devEnviron.c
     
     dbRecStd_SRCS += asSubRecordFunctions.c
     
    diff --git a/src/std/dev/asSubRecordFunctions.c b/src/std/dev/asSubRecordFunctions.c
    index 957db300a..76943e94b 100644
    --- a/src/std/dev/asSubRecordFunctions.c
    +++ b/src/std/dev/asSubRecordFunctions.c
    @@ -38,10 +38,10 @@ static void myCallback(CALLBACK *pcallback)
     {
         ASDBCALLBACK	*pasdbcallback = (ASDBCALLBACK *)pcallback;
         subRecord	*precord;
    -    struct rset		*prset;
    +    rset		*prset;
     
         callbackGetUser(precord,pcallback);
    -    prset=(struct rset *)(precord->rset);
    +    prset=(rset *)(precord->rset);
         precord->val = 0.0;
         if(pasdbcallback->status) {
     	recGblSetSevr(precord,READ_ALARM,precord->brsv);
    diff --git a/src/std/dev/devAaiSoft.c b/src/std/dev/devAaiSoft.c
    index a9d1c7615..e2e014efb 100644
    --- a/src/std/dev/devAaiSoft.c
    +++ b/src/std/dev/devAaiSoft.c
    @@ -7,7 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    +/*
      * devAaiSoft.c - Device Support Routines for soft Waveform Records
      *
      *      Original Author: Bob Dalesio
    diff --git a/src/std/dev/devAaoSoft.c b/src/std/dev/devAaoSoft.c
    index dd96d10c0..3331ec1bf 100644
    --- a/src/std/dev/devAaoSoft.c
    +++ b/src/std/dev/devAaoSoft.c
    @@ -7,7 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    +/*
      * devAaoSoft.c - Device Support Routines for soft Waveform Records
      * 
      *      Original Author: Bob Dalesio
    diff --git a/src/std/dev/devAiSoft.c b/src/std/dev/devAiSoft.c
    index 85c78c242..69afff3ee 100644
    --- a/src/std/dev/devAiSoft.c
    +++ b/src/std/dev/devAiSoft.c
    @@ -7,8 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    - *
    +/*
      *      Original Authors: Bob Dalesio and Marty Kraimer
      *      Date: 3/6/91
      */
    diff --git a/src/std/dev/devAiSoftRaw.c b/src/std/dev/devAiSoftRaw.c
    index b06e245d2..e7b767e50 100644
    --- a/src/std/dev/devAiSoftRaw.c
    +++ b/src/std/dev/devAiSoftRaw.c
    @@ -7,8 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    - *
    +/*
      *      Original Authors: Bob Dalesio and Marty Kraimer
      *      Date: 6-1-90
      */
    diff --git a/src/std/dev/devAoSoft.c b/src/std/dev/devAoSoft.c
    index ce63a57b3..56bd05620 100644
    --- a/src/std/dev/devAoSoft.c
    +++ b/src/std/dev/devAoSoft.c
    @@ -8,7 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* devAoSoft.c */
    -/* base/src/dev $Revision-Id$ */
     
     /* Device Support Routines for soft Analog Output Records*/
     /*
    diff --git a/src/std/dev/devAoSoftRaw.c b/src/std/dev/devAoSoftRaw.c
    index 400e8f9a3..05aed035e 100644
    --- a/src/std/dev/devAoSoftRaw.c
    +++ b/src/std/dev/devAoSoftRaw.c
    @@ -8,7 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* devAoSoftRaw.c */
    -/* base/src/dev $Revision-Id$ */
     
     /* Device Support Routines for soft raw Analog Output Records*/
     /*
    diff --git a/src/std/dev/devBiSoft.c b/src/std/dev/devBiSoft.c
    index b1b3c17a3..f0f305b8c 100644
    --- a/src/std/dev/devBiSoft.c
    +++ b/src/std/dev/devBiSoft.c
    @@ -7,8 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    - *
    +/*
      *      Original Authors: Bob Dalesio and Marty Kraimer
      *      Date: 6-1-90
      */
    diff --git a/src/std/dev/devBiSoftRaw.c b/src/std/dev/devBiSoftRaw.c
    index afddd4712..3cb6b6ffe 100644
    --- a/src/std/dev/devBiSoftRaw.c
    +++ b/src/std/dev/devBiSoftRaw.c
    @@ -7,8 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    - *
    +/*
      *      Original Authors: Bob Dalesio and Marty Kraimer
      *      Date: 6-1-90
      */
    diff --git a/src/std/dev/devBoSoft.c b/src/std/dev/devBoSoft.c
    index 65bb4f505..ba6ff14a7 100644
    --- a/src/std/dev/devBoSoft.c
    +++ b/src/std/dev/devBoSoft.c
    @@ -7,8 +7,6 @@
     * and higher are distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* devBoSoft.c */
    -/* base/src/dev $Revision-Id$ */
     
     /* devBoSoft.c - Device Support Routines for  Soft Binary Output*/
     /*
    diff --git a/src/std/dev/devBoSoftRaw.c b/src/std/dev/devBoSoftRaw.c
    index ef812d51b..df1ba5b4e 100644
    --- a/src/std/dev/devBoSoftRaw.c
    +++ b/src/std/dev/devBoSoftRaw.c
    @@ -7,8 +7,6 @@
     * and higher are distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* devBoSoftRaw.c */
    -/* base/src/dev $Revision-Id$ */
     
     /* devBoSoftRaw.c - Device Support Routines for  SoftRaw Binary Output*/
     /*
    diff --git a/src/std/dev/devEnviron.c b/src/std/dev/devEnviron.c
    new file mode 100644
    index 000000000..9672d6ce5
    --- /dev/null
    +++ b/src/std/dev/devEnviron.c
    @@ -0,0 +1,128 @@
    +/*************************************************************************\
    +* Copyright (c) 2016 UChicago Argonne LLC, as Operator of Argonne
    +*     National Laboratory.
    +* EPICS BASE is distributed subject to a Software License Agreement found
    +* in file LICENSE that is included with this distribution. 
    +\*************************************************************************/
    +
    +/* devEnviron.c */
    +
    +#include 
    +#include 
    +
    +#include "alarm.h"
    +#include "dbCommon.h"
    +#include "devSup.h"
    +#include "errlog.h"
    +#include "recGbl.h"
    +#include "recSup.h"
    +
    +#include "lsiRecord.h"
    +#include "stringinRecord.h"
    +#include "epicsExport.h"
    +
    +/* lsi device support */
    +
    +static long add_lsi(dbCommon *pcommon) {
    +    lsiRecord *prec = (lsiRecord *) pcommon;
    +
    +    if (prec->inp.type != INST_IO)
    +        return S_dev_badInpType;
    +
    +    return 0;
    +}
    +
    +static long del_lsi(dbCommon *pcommon) {
    +    return 0;
    +}
    +
    +static struct dsxt dsxtLsiEnviron = {
    +    add_lsi, del_lsi
    +};
    +
    +static long init_lsi(int pass)
    +{
    +    if (pass == 0)
    +        devExtend(&dsxtLsiEnviron);
    +
    +    return 0;
    +}
    +
    +static long read_lsi(lsiRecord *prec)
    +{
    +    const char *val = getenv(prec->inp.value.instio.string);
    +
    +    if (val) {
    +        strncpy(prec->val, val, prec->sizv);
    +        prec->val[prec->sizv - 1] = 0;
    +        prec->len = strlen(prec->val);
    +        prec->udf = FALSE;
    +    }
    +    else {
    +        prec->val[0] = 0;
    +        prec->len = 1;
    +        prec->udf = TRUE;
    +        recGblSetSevr(prec, UDF_ALARM, prec->udfs);
    +    }
    +
    +    return 0;
    +}
    +
    +lsidset devLsiEnviron = {
    +    5, NULL, init_lsi, NULL, NULL, read_lsi
    +};
    +epicsExportAddress(dset, devLsiEnviron);
    +
    +
    +/* stringin device support */
    +
    +static long add_stringin(dbCommon *pcommon) {
    +    stringinRecord *prec = (stringinRecord *) pcommon;
    +
    +    if (prec->inp.type != INST_IO)
    +        return S_dev_badInpType;
    +
    +    return 0;
    +}
    +
    +static long del_stringin(dbCommon *pcommon) {
    +    return 0;
    +}
    +
    +static struct dsxt dsxtSiEnviron = {
    +    add_stringin, del_stringin
    +};
    +
    +static long init_stringin(int pass)
    +{
    +    if (pass == 0)
    +        devExtend(&dsxtSiEnviron);
    +
    +    return 0;
    +}
    +
    +static long read_stringin(stringinRecord *prec)
    +{
    +    const char *val = getenv(prec->inp.value.instio.string);
    +
    +    if (val) {
    +        strncpy(prec->val, val, MAX_STRING_SIZE);
    +        prec->val[MAX_STRING_SIZE - 1] = 0;
    +        prec->udf = FALSE;
    +    }
    +    else {
    +        prec->val[0] = 0;
    +        prec->udf = TRUE;
    +        recGblSetSevr(prec, UDF_ALARM, prec->udfs);
    +    }
    +
    +    return 0;
    +}
    +
    +static struct {
    +    dset common;
    +    DEVSUPFUN read;
    +} devSiEnviron = {
    +    {5, NULL, init_stringin, NULL, NULL}, read_stringin
    +};
    +epicsExportAddress(dset, devSiEnviron);
    diff --git a/src/std/dev/devEventSoft.c b/src/std/dev/devEventSoft.c
    index b5cc02f5c..ae5c9d01b 100644
    --- a/src/std/dev/devEventSoft.c
    +++ b/src/std/dev/devEventSoft.c
    @@ -7,8 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    - *
    +/*
      *      Author: Janet Anderson
      *      Date: 04-21-91
      */
    diff --git a/src/std/dev/devGeneralTime.c b/src/std/dev/devGeneralTime.c
    index 0cce00d4b..1b821d582 100644
    --- a/src/std/dev/devGeneralTime.c
    +++ b/src/std/dev/devGeneralTime.c
    @@ -3,7 +3,6 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     
    -/* $Revision-Id$ */
     /*
      *   Original Author:	Sheng Peng, ORNL / SNS Project
      *   Date:		07/2004
    diff --git a/src/std/dev/devHistogramSoft.c b/src/std/dev/devHistogramSoft.c
    index 60e6e3ddd..3b46b5d99 100644
    --- a/src/std/dev/devHistogramSoft.c
    +++ b/src/std/dev/devHistogramSoft.c
    @@ -8,7 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* devHistogramSoft.c */
    -/* base/src/dev $Revision-Id$ */
     /*
      *      Author:		Janet Anderson
      *      Date:		07/02/91
    diff --git a/src/std/dev/devLiSoft.c b/src/std/dev/devLiSoft.c
    index b48baccf9..30f981b59 100644
    --- a/src/std/dev/devLiSoft.c
    +++ b/src/std/dev/devLiSoft.c
    @@ -7,8 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    - *
    +/*
      *      Author: Janet Anderson
      *      Date: 09-23-91
      */
    diff --git a/src/std/dev/devLoSoft.c b/src/std/dev/devLoSoft.c
    index fe2de4203..af49c60ff 100644
    --- a/src/std/dev/devLoSoft.c
    +++ b/src/std/dev/devLoSoft.c
    @@ -8,7 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* devLoSoft.c */
    -/* base/src/dev $Revision-Id$ */
     /*
      *      Author:		Janet Anderson
      *      Date:   	09-23-91
    diff --git a/src/std/dev/devLsoSoftCallback.c b/src/std/dev/devLsoSoftCallback.c
    index 616b27692..59579d558 100644
    --- a/src/std/dev/devLsoSoftCallback.c
    +++ b/src/std/dev/devLsoSoftCallback.c
    @@ -4,7 +4,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     /*
      *      Author: Andrew Johnson
      *      Date:   30 Nov 2012
    diff --git a/src/std/dev/devMbbiDirectSoft.c b/src/std/dev/devMbbiDirectSoft.c
    index 8160bdfad..c63d0de1a 100644
    --- a/src/std/dev/devMbbiDirectSoft.c
    +++ b/src/std/dev/devMbbiDirectSoft.c
    @@ -7,8 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    - *
    +/*
      *      Original Authors: Bob Dalesio and Matthew Needes
      *      Date: 10-08-93
      */
    diff --git a/src/std/dev/devMbbiDirectSoftRaw.c b/src/std/dev/devMbbiDirectSoftRaw.c
    index 2509ed392..f6172cdec 100644
    --- a/src/std/dev/devMbbiDirectSoftRaw.c
    +++ b/src/std/dev/devMbbiDirectSoftRaw.c
    @@ -7,8 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    - *
    +/*
      *      Original Authors: Bob Dalesio and Matthew Needes
      *      Date: 10-08-93
      */
    diff --git a/src/std/dev/devMbbiSoft.c b/src/std/dev/devMbbiSoft.c
    index b7411aea4..670e2f615 100644
    --- a/src/std/dev/devMbbiSoft.c
    +++ b/src/std/dev/devMbbiSoft.c
    @@ -7,8 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    - *
    +/*
      *      Original Authors: Bob Dalesio and Marty Kraimer
      *      Date: 6-1-90
      */
    diff --git a/src/std/dev/devMbbiSoftRaw.c b/src/std/dev/devMbbiSoftRaw.c
    index ddaecfc29..fde76513a 100644
    --- a/src/std/dev/devMbbiSoftRaw.c
    +++ b/src/std/dev/devMbbiSoftRaw.c
    @@ -7,8 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    - *
    +/*
      *      Original Authors: Bob Dalesio and Marty Kraimer
      *      Date: 6-1-90
      */
    diff --git a/src/std/dev/devMbboSoft.c b/src/std/dev/devMbboSoft.c
    index 43ad5a05d..b2fe6b094 100644
    --- a/src/std/dev/devMbboSoft.c
    +++ b/src/std/dev/devMbboSoft.c
    @@ -8,7 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     /* devMbboSoft.c */
    -/* base/src/dev $Revision-Id$ */
     /*
      *      Original Author: Bob Dalesio
      *      Current Author:  Marty Kraimer
    diff --git a/src/std/dev/devPrintfSoft.c b/src/std/dev/devPrintfSoft.c
    index a61d4bbfb..ca06f04be 100644
    --- a/src/std/dev/devPrintfSoft.c
    +++ b/src/std/dev/devPrintfSoft.c
    @@ -4,7 +4,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     /*
      *      Author: Andrew Johnson
      *      Date:   28 Sept 2012
    diff --git a/src/std/dev/devPrintfSoftCallback.c b/src/std/dev/devPrintfSoftCallback.c
    index 51fde605d..e89afd53b 100644
    --- a/src/std/dev/devPrintfSoftCallback.c
    +++ b/src/std/dev/devPrintfSoftCallback.c
    @@ -4,7 +4,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     /*
      *      Author: Andrew Johnson
      *      Date:   28 Sept 2012
    diff --git a/src/std/dev/devSASoft.c b/src/std/dev/devSASoft.c
    index b197f7eff..56ffdd796 100644
    --- a/src/std/dev/devSASoft.c
    +++ b/src/std/dev/devSASoft.c
    @@ -7,8 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    - *
    +/*
      *      Author: Carl Lionberger
      *      Date: 9-2-93
      */
    diff --git a/src/std/dev/devSiSoft.c b/src/std/dev/devSiSoft.c
    index b1f3255f4..9b1fcfe4b 100644
    --- a/src/std/dev/devSiSoft.c
    +++ b/src/std/dev/devSiSoft.c
    @@ -7,8 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    - *
    +/*
      *      Author: Janet Anderson
      *      Date: 04-21-91
      */
    diff --git a/src/std/dev/devSoSoft.c b/src/std/dev/devSoSoft.c
    index ca7a87051..6dda4a765 100644
    --- a/src/std/dev/devSoSoft.c
    +++ b/src/std/dev/devSoSoft.c
    @@ -7,7 +7,6 @@
     * and higher are distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     /*
      *      Author: Janet Anderson
      *      Date:   21APR1991
    diff --git a/src/std/dev/devSoft.dbd b/src/std/dev/devSoft.dbd
    index d6cb14de9..1314bf540 100644
    --- a/src/std/dev/devSoft.dbd
    +++ b/src/std/dev/devSoft.dbd
    @@ -1,3 +1,5 @@
    +# devSoft.dbd
    +
     device(aai,CONSTANT,devAaiSoft,"Soft Channel")
     device(aao,CONSTANT,devAaoSoft,"Soft Channel")
     device(ai,CONSTANT,devAiSoft,"Soft Channel")
    @@ -58,5 +60,8 @@ device(lso,INST_IO,devLsoStdio,"stdio")
     device(printf,INST_IO,devPrintfStdio,"stdio")
     device(stringout,INST_IO,devSoStdio,"stdio")
     
    +device(lsi,INST_IO,devLsiEnviron,"getenv")
    +device(stringin,INST_IO,devSiEnviron,"getenv")
    +
     device(bi, INST_IO, devBiDbState, "Db State")
     device(bo, INST_IO, devBoDbState, "Db State")
    diff --git a/src/std/dev/devStdio.c b/src/std/dev/devStdio.c
    index 4801657b9..e957bfce0 100644
    --- a/src/std/dev/devStdio.c
    +++ b/src/std/dev/devStdio.c
    @@ -5,8 +5,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     #include 
     #include 
     
    diff --git a/src/std/dev/devTimestamp.c b/src/std/dev/devTimestamp.c
    index a43a2d352..936d7767d 100644
    --- a/src/std/dev/devTimestamp.c
    +++ b/src/std/dev/devTimestamp.c
    @@ -5,7 +5,6 @@
     * in the file LICENSE that is included with this distribution.
     \*************************************************************************/
     
    -/* $Revision-Id$ */
     /*
      * Device support for EPICS time stamps
      *
    diff --git a/src/std/dev/devWfSoft.c b/src/std/dev/devWfSoft.c
    index 124f615c9..d1daefd7b 100644
    --- a/src/std/dev/devWfSoft.c
    +++ b/src/std/dev/devWfSoft.c
    @@ -7,8 +7,7 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$
    - *
    +/*
      *      Original Authors: Bob Dalesio and Marty Kraimer
      *      Date: 6-1-90
      */
    diff --git a/src/std/filters/arr.c b/src/std/filters/arr.c
    index 9e183ac15..7a4960bcf 100644
    --- a/src/std/filters/arr.c
    +++ b/src/std/filters/arr.c
    @@ -94,7 +94,7 @@ static db_field_log* filter(void* pvt, dbChannel *chan, db_field_log *pfl)
     {
         myStruct *my = (myStruct*) pvt;
         struct dbCommon *prec;
    -    struct rset *prset;
    +    rset *prset;
         long start = my->start;
         long end = my->end;
         long nTarget = 0;
    diff --git a/src/std/filters/test/arrRecord.c b/src/std/filters/test/arrRecord.c
    index 7dea7caaf..8f1881f02 100644
    --- a/src/std/filters/test/arrRecord.c
    +++ b/src/std/filters/test/arrRecord.c
    @@ -37,8 +37,8 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(arrRecord *, int);
    -static long process(arrRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     static long cvt_dbaddr(DBADDR *);
    @@ -75,8 +75,10 @@ rset arrRSET = {
     };
     epicsExportAddress(rset, arrRSET);
     
    -static long init_record(arrRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct arrRecord *prec = (struct arrRecord *)pcommon;
    +
         if (pass == 0) {
             if (prec->nelm <= 0)
                 prec->nelm = 1;
    @@ -95,8 +97,10 @@ static long init_record(arrRecord *prec, int pass)
         return 0;
     }
     
    -static long process(arrRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct arrRecord *prec = (struct arrRecord *)pcommon;
    +
         if(prec->clbk)
             (*prec->clbk)(prec);
         prec->pact = TRUE;
    diff --git a/src/std/filters/test/syncTest.c b/src/std/filters/test/syncTest.c
    index ce9b23d01..eea24508b 100644
    --- a/src/std/filters/test/syncTest.c
    +++ b/src/std/filters/test/syncTest.c
    @@ -140,7 +140,7 @@ MAIN(syncTest)
         int i;
         dbEventCtx evtctx;
     
    -    testPlan(0);
    +    testPlan(139);
     
         dbChannelInit();
         evtctx = db_init_events();
    diff --git a/src/std/rec/aSubRecord.c b/src/std/rec/aSubRecord.c
    index 02461c135..b513df17a 100644
    --- a/src/std/rec/aSubRecord.c
    +++ b/src/std/rec/aSubRecord.c
    @@ -4,8 +4,7 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
    -/* $Revision-Id$
    - * 
    +/*
      * Record Support Routines for the Array Subroutine Record type,
      * derived from Andy Foster's genSub record, with some features
      * removed and asynchronous support added.
    @@ -45,15 +44,15 @@ typedef long (*GENFUNCPTR)(struct aSubRecord *);
     
     #define report             NULL
     #define initialize          NULL
    -static long init_record(aSubRecord *, int);
    -static long process(aSubRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     static long special(DBADDR *, int);
     #define get_value          NULL
     static long cvt_dbaddr(DBADDR *);
     static long get_array_info(DBADDR *, long *, long *);
     static long put_array_info(DBADDR *, long );
     static long get_units(DBADDR *, char *);
    -static long get_precision(DBADDR *, long *);
    +static long get_precision(const DBADDR *, long *);
     #define get_enum_str       NULL
     #define get_enum_strs      NULL
     #define put_enum_str       NULL
    @@ -105,8 +104,9 @@ static const char *Ofldnames[] = {
     };
     
     
    -static long init_record(aSubRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct aSubRecord *prec = (struct aSubRecord *)pcommon;
         STATIC_ASSERT(sizeof(prec->onam)==sizeof(prec->snam));
         GENFUNCPTR     pfunc;
         int            i;
    @@ -197,8 +197,9 @@ static long initFields(epicsEnum16 *pft, epicsUInt32 *pno, epicsUInt32 *pne,
     }
     
     
    -static long process(aSubRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct aSubRecord *prec = (struct aSubRecord *)pcommon;
         int pact = prec->pact;
         long status = 0;
     
    @@ -307,7 +308,7 @@ static long get_units(DBADDR *paddr, char *units)
         return 0;
     }
     
    -static long get_precision(DBADDR *paddr, long *pprecision)
    +static long get_precision(const DBADDR *paddr, long *pprecision)
     {
         aSubRecord *prec = (aSubRecord *)paddr->precord;
         int fieldIndex = dbGetFieldIndex(paddr);
    diff --git a/src/std/rec/aSubRecord.dbd.pod b/src/std/rec/aSubRecord.dbd.pod
    index d188745f1..73f734629 100644
    --- a/src/std/rec/aSubRecord.dbd.pod
    +++ b/src/std/rec/aSubRecord.dbd.pod
    @@ -61,33 +61,33 @@ recordtype(aSub) {
     	}
     	field(INAM,DBF_STRING) {
     		prompt("Initialize Subr. Name")
    -		promptgroup(GUI_SUB)
    +		promptgroup("30 - Action")
     		special(SPC_NOMOD)
     		interest(1)
     		size(41)
     	}
     	field(LFLG,DBF_MENU) {
     		prompt("Subr. Input Enable")
    -		promptgroup(GUI_SUB)
    +		promptgroup("30 - Action")
     		interest(1)
     		menu(aSubLFLG)
     	}
     	field(SUBL,DBF_INLINK) {
     		prompt("Subroutine Name Link")
    -		promptgroup(GUI_SUB)
    +		promptgroup("30 - Action")
     		special(SPC_NOMOD)
     		interest(1)
     	}
     	field(SNAM,DBF_STRING) {
     		prompt("Process Subr. Name")
    -		promptgroup(GUI_SUB)
    +		promptgroup("30 - Action")
     		special(SPC_MOD)
     		interest(1)
     		size(41)
     	}
     	field(ONAM,DBF_STRING) {
     		prompt("Old Subr. Name")
    -		promptgroup(GUI_SUB)
    +		promptgroup("30 - Action")
     		special(SPC_NOMOD)
     		interest(3)
     		size(41)
    @@ -107,127 +107,127 @@ recordtype(aSub) {
     	}
     	field(BRSV,DBF_MENU) {
     		prompt("Bad Return Severity")
    -		promptgroup(GUI_SUB)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(PREC,DBF_SHORT) {
     		prompt("Display Precision")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(EFLG,DBF_MENU) {
     		prompt("Output Event Flag")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     		menu(aSubEFLG)
     		initial("1")
     	}
     	field(INPA,DBF_INLINK) {
     		prompt("Input Link A")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("41 - Input A-G")
     		interest(1)
     	}
     	field(INPB,DBF_INLINK) {
     		prompt("Input Link B")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("41 - Input A-G")
     		interest(1)
     	}
     	field(INPC,DBF_INLINK) {
     		prompt("Input Link C")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("41 - Input A-G")
     		interest(1)
     	}
     	field(INPD,DBF_INLINK) {
     		prompt("Input Link D")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("41 - Input A-G")
     		interest(1)
     	}
     	field(INPE,DBF_INLINK) {
     		prompt("Input Link E")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("41 - Input A-G")
     		interest(1)
     	}
     	field(INPF,DBF_INLINK) {
     		prompt("Input Link F")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("41 - Input A-G")
     		interest(1)
     	}
     	field(INPG,DBF_INLINK) {
     		prompt("Input Link G")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("41 - Input A-G")
     		interest(1)
     	}
     	field(INPH,DBF_INLINK) {
     		prompt("Input Link H")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("42 - Input H-N")
     		interest(1)
     	}
     	field(INPI,DBF_INLINK) {
     		prompt("Input Link I")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("42 - Input H-N")
     		interest(1)
     	}
     	field(INPJ,DBF_INLINK) {
     		prompt("Input Link J")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("42 - Input H-N")
     		interest(1)
     	}
     	field(INPK,DBF_INLINK) {
     		prompt("Input Link K")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("42 - Input H-N")
     		interest(1)
     	}
     	field(INPL,DBF_INLINK) {
     		prompt("Input Link L")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("42 - Input H-N")
     		interest(1)
     	}
     	field(INPM,DBF_INLINK) {
     		prompt("Input Link M")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("42 - Input H-N")
     		interest(1)
     	}
     	field(INPN,DBF_INLINK) {
     		prompt("Input Link N")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("42 - Input H-N")
     		interest(1)
     	}
     	field(INPO,DBF_INLINK) {
     		prompt("Input Link O")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("43 - Input O-U")
     		interest(1)
     	}
     	field(INPP,DBF_INLINK) {
     		prompt("Input Link P")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("43 - Input O-U")
     		interest(1)
     	}
     	field(INPQ,DBF_INLINK) {
     		prompt("Input Link Q")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("43 - Input O-U")
     		interest(1)
     	}
     	field(INPR,DBF_INLINK) {
     		prompt("Input Link R")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("43 - Input O-U")
     		interest(1)
     	}
     	field(INPS,DBF_INLINK) {
     		prompt("Input Link S")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("43 - Input O-U")
     		interest(1)
     	}
     	field(INPT,DBF_INLINK) {
     		prompt("Input Link T")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("43 - Input O-U")
     		interest(1)
     	}
     	field(INPU,DBF_INLINK) {
     		prompt("Input Link U")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("43 - Input O-U")
     		interest(1)
     	}
     
    @@ -451,7 +451,7 @@ recordtype(aSub) {
     	}
     	field(FTA,DBF_MENU) {
     		prompt("Type of A")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("41 - Input A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -459,7 +459,7 @@ recordtype(aSub) {
     	}
     	field(FTB,DBF_MENU) {
     		prompt("Type of B")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("41 - Input A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -467,7 +467,7 @@ recordtype(aSub) {
     	}
     	field(FTC,DBF_MENU) {
     		prompt("Type of C")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("41 - Input A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -475,7 +475,7 @@ recordtype(aSub) {
     	}
     	field(FTD,DBF_MENU) {
     		prompt("Type of D")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("41 - Input A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -483,7 +483,7 @@ recordtype(aSub) {
     	}
     	field(FTE,DBF_MENU) {
     		prompt("Type of E")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("41 - Input A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -491,7 +491,7 @@ recordtype(aSub) {
     	}
     	field(FTF,DBF_MENU) {
     		prompt("Type of F")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("41 - Input A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -499,7 +499,7 @@ recordtype(aSub) {
     	}
     	field(FTG,DBF_MENU) {
     		prompt("Type of G")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("41 - Input A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -507,7 +507,7 @@ recordtype(aSub) {
     	}
     	field(FTH,DBF_MENU) {
     		prompt("Type of H")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("42 - Input H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -515,7 +515,7 @@ recordtype(aSub) {
     	}
     	field(FTI,DBF_MENU) {
     		prompt("Type of I")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("42 - Input H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -523,7 +523,7 @@ recordtype(aSub) {
     	}
     	field(FTJ,DBF_MENU) {
     		prompt("Type of J")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("42 - Input H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -531,7 +531,7 @@ recordtype(aSub) {
     	}
     	field(FTK,DBF_MENU) {
     		prompt("Type of K")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("42 - Input H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -539,7 +539,7 @@ recordtype(aSub) {
     	}
     	field(FTL,DBF_MENU) {
     		prompt("Type of L")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("42 - Input H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -547,7 +547,7 @@ recordtype(aSub) {
     	}
     	field(FTM,DBF_MENU) {
     		prompt("Type of M")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("42 - Input H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -555,7 +555,7 @@ recordtype(aSub) {
     	}
     	field(FTN,DBF_MENU) {
     		prompt("Type of N")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("42 - Input H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -563,7 +563,7 @@ recordtype(aSub) {
     	}
     	field(FTO,DBF_MENU) {
     		prompt("Type of O")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("43 - Input O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -571,7 +571,7 @@ recordtype(aSub) {
     	}
     	field(FTP,DBF_MENU) {
     		prompt("Type of P")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("43 - Input O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -579,7 +579,7 @@ recordtype(aSub) {
     	}
     	field(FTQ,DBF_MENU) {
     		prompt("Type of Q")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("43 - Input O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -587,7 +587,7 @@ recordtype(aSub) {
     	}
     	field(FTR,DBF_MENU) {
     		prompt("Type of R")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("43 - Input O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -595,7 +595,7 @@ recordtype(aSub) {
     	}
     	field(FTS,DBF_MENU) {
     		prompt("Type of S")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("43 - Input O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -603,7 +603,7 @@ recordtype(aSub) {
     	}
     	field(FTT,DBF_MENU) {
     		prompt("Type of T")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("43 - Input O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -611,7 +611,7 @@ recordtype(aSub) {
     	}
     	field(FTU,DBF_MENU) {
     		prompt("Type of U")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("43 - Input O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -619,401 +619,380 @@ recordtype(aSub) {
     	}
     	field(NOA,DBF_ULONG) {
     		prompt("Max. elements in A")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("41 - Input A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOB,DBF_ULONG) {
     		prompt("Max. elements in B")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("41 - Input A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOC,DBF_ULONG) {
     		prompt("Max. elements in C")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("41 - Input A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOD,DBF_ULONG) {
     		prompt("Max. elements in D")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("41 - Input A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOE,DBF_ULONG) {
     		prompt("Max. elements in E")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("41 - Input A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOF,DBF_ULONG) {
     		prompt("Max. elements in F")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("41 - Input A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOG,DBF_ULONG) {
     		prompt("Max. elements in G")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("41 - Input A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOH,DBF_ULONG) {
     		prompt("Max. elements in H")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("42 - Input H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOI,DBF_ULONG) {
     		prompt("Max. elements in I")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("42 - Input H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOJ,DBF_ULONG) {
     		prompt("Max. elements in J")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("42 - Input H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOK,DBF_ULONG) {
     		prompt("Max. elements in K")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("42 - Input H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOL,DBF_ULONG) {
     		prompt("Max. elements in L")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("42 - Input H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOM,DBF_ULONG) {
     		prompt("Max. elements in M")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("42 - Input H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NON,DBF_ULONG) {
     		prompt("Max. elements in N")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("42 - Input H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOO,DBF_ULONG) {
     		prompt("Max. elements in O")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("43 - Input O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOP,DBF_ULONG) {
     		prompt("Max. elements in P")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("43 - Input O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOQ,DBF_ULONG) {
     		prompt("Max. elements in Q")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("43 - Input O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOR,DBF_ULONG) {
     		prompt("Max. elements in R")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("43 - Input O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOS,DBF_ULONG) {
     		prompt("Max. elements in S")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("43 - Input O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOT,DBF_ULONG) {
     		prompt("Max. elements in T")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("43 - Input O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOU,DBF_ULONG) {
     		prompt("Max. elements in U")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("43 - Input O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NEA,DBF_ULONG) {
     		prompt("Num. elements in A")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEB,DBF_ULONG) {
     		prompt("Num. elements in B")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEC,DBF_ULONG) {
     		prompt("Num. elements in C")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NED,DBF_ULONG) {
     		prompt("Num. elements in D")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEE,DBF_ULONG) {
     		prompt("Num. elements in E")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEF,DBF_ULONG) {
     		prompt("Num. elements in F")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEG,DBF_ULONG) {
     		prompt("Num. elements in G")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEH,DBF_ULONG) {
     		prompt("Num. elements in H")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEI,DBF_ULONG) {
     		prompt("Num. elements in I")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEJ,DBF_ULONG) {
     		prompt("Num. elements in J")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEK,DBF_ULONG) {
     		prompt("Num. elements in K")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEL,DBF_ULONG) {
     		prompt("Num. elements in L")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEM,DBF_ULONG) {
     		prompt("Num. elements in M")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEN,DBF_ULONG) {
     		prompt("Num. elements in N")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEO,DBF_ULONG) {
     		prompt("Num. elements in O")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEP,DBF_ULONG) {
     		prompt("Num. elements in P")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEQ,DBF_ULONG) {
     		prompt("Num. elements in Q")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NER,DBF_ULONG) {
     		prompt("Num. elements in R")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NES,DBF_ULONG) {
     		prompt("Num. elements in S")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NET,DBF_ULONG) {
     		prompt("Num. elements in T")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(NEU,DBF_ULONG) {
     		prompt("Num. elements in U")
    -		promptgroup(GUI_WAVE)
     		special(SPC_NOMOD)
     		interest(3)
     		initial("1")
     	}
     	field(OUTA,DBF_OUTLINK) {
     		prompt("Output Link A")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("51 - Output A-G")
     		interest(1)
     	}
     	field(OUTB,DBF_OUTLINK) {
     		prompt("Output Link B")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("51 - Output A-G")
     		interest(1)
     	}
     	field(OUTC,DBF_OUTLINK) {
     		prompt("Output Link C")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("51 - Output A-G")
     		interest(1)
     	}
     	field(OUTD,DBF_OUTLINK) {
     		prompt("Output Link D")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("51 - Output A-G")
     		interest(1)
     	}
     	field(OUTE,DBF_OUTLINK) {
     		prompt("Output Link E")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("51 - Output A-G")
     		interest(1)
     	}
     	field(OUTF,DBF_OUTLINK) {
     		prompt("Output Link F")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("51 - Output A-G")
     		interest(1)
     	}
     	field(OUTG,DBF_OUTLINK) {
     		prompt("Output Link G")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("51 - Output A-G")
     		interest(1)
     	}
     	field(OUTH,DBF_OUTLINK) {
     		prompt("Output Link H")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("52 - Output H-N")
     		interest(1)
     	}
     	field(OUTI,DBF_OUTLINK) {
     		prompt("Output Link I")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("52 - Output H-N")
     		interest(1)
     	}
     	field(OUTJ,DBF_OUTLINK) {
     		prompt("Output Link J")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("52 - Output H-N")
     		interest(1)
     	}
     	field(OUTK,DBF_OUTLINK) {
     		prompt("Output Link K")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("52 - Output H-N")
     		interest(1)
     	}
     	field(OUTL,DBF_OUTLINK) {
     		prompt("Output Link L")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("52 - Output H-N")
     		interest(1)
     	}
     	field(OUTM,DBF_OUTLINK) {
     		prompt("Output Link M")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("52 - Output H-N")
     		interest(1)
     	}
     	field(OUTN,DBF_OUTLINK) {
     		prompt("Output Link N")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("52 - Output H-N")
     		interest(1)
     	}
     	field(OUTO,DBF_OUTLINK) {
     		prompt("Output Link O")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("53 - Output O-U")
     		interest(1)
     	}
     	field(OUTP,DBF_OUTLINK) {
     		prompt("Output Link P")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("53 - Output O-U")
     		interest(1)
     	}
     	field(OUTQ,DBF_OUTLINK) {
     		prompt("Output Link Q")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("53 - Output O-U")
     		interest(1)
     	}
     	field(OUTR,DBF_OUTLINK) {
     		prompt("Output Link R")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("53 - Output O-U")
     		interest(1)
     	}
     	field(OUTS,DBF_OUTLINK) {
     		prompt("Output Link S")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("53 - Output O-U")
     		interest(1)
     	}
     	field(OUTT,DBF_OUTLINK) {
     		prompt("Output Link T")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("53 - Output O-U")
     		interest(1)
     	}
     	field(OUTU,DBF_OUTLINK) {
     		prompt("Output Link U")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("53 - Output O-U")
     		interest(1)
     	}
     
    @@ -1384,7 +1363,7 @@ recordtype(aSub) {
     	}
     	field(FTVA,DBF_MENU) {
     		prompt("Type of VALA")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("51 - Output A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1392,7 +1371,7 @@ recordtype(aSub) {
     	}
     	field(FTVB,DBF_MENU) {
     		prompt("Type of VALB")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("51 - Output A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1400,7 +1379,7 @@ recordtype(aSub) {
     	}
     	field(FTVC,DBF_MENU) {
     		prompt("Type of VALC")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("51 - Output A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1408,7 +1387,7 @@ recordtype(aSub) {
     	}
     	field(FTVD,DBF_MENU) {
     		prompt("Type of VALD")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("51 - Output A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1416,7 +1395,7 @@ recordtype(aSub) {
     	}
     	field(FTVE,DBF_MENU) {
     		prompt("Type of VALE")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("51 - Output A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1424,7 +1403,7 @@ recordtype(aSub) {
     	}
     	field(FTVF,DBF_MENU) {
     		prompt("Type of VALF")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("51 - Output A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1432,7 +1411,7 @@ recordtype(aSub) {
     	}
     	field(FTVG,DBF_MENU) {
     		prompt("Type of VALG")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("51 - Output A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1440,7 +1419,7 @@ recordtype(aSub) {
     	}
     	field(FTVH,DBF_MENU) {
     		prompt("Type of VALH")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("52 - Output H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1448,7 +1427,7 @@ recordtype(aSub) {
     	}
     	field(FTVI,DBF_MENU) {
     		prompt("Type of VALI")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("52 - Output H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1456,7 +1435,7 @@ recordtype(aSub) {
     	}
     	field(FTVJ,DBF_MENU) {
     		prompt("Type of VALJ")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("52 - Output H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1464,7 +1443,7 @@ recordtype(aSub) {
     	}
     	field(FTVK,DBF_MENU) {
     		prompt("Type of VALK")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("52 - Output H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1472,7 +1451,7 @@ recordtype(aSub) {
     	}
     	field(FTVL,DBF_MENU) {
     		prompt("Type of VALL")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("52 - Output H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1480,7 +1459,7 @@ recordtype(aSub) {
     	}
     	field(FTVM,DBF_MENU) {
     		prompt("Type of VALM")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("52 - Output H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1488,7 +1467,7 @@ recordtype(aSub) {
     	}
     	field(FTVN,DBF_MENU) {
     		prompt("Type of VALN")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("52 - Output H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1496,7 +1475,7 @@ recordtype(aSub) {
     	}
     	field(FTVO,DBF_MENU) {
     		prompt("Type of VALO")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("53 - Output O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1504,7 +1483,7 @@ recordtype(aSub) {
     	}
     	field(FTVP,DBF_MENU) {
     		prompt("Type of VALP")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("53 - Output O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1512,7 +1491,7 @@ recordtype(aSub) {
     	}
     	field(FTVQ,DBF_MENU) {
     		prompt("Type of VALQ")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("53 - Output O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1520,7 +1499,7 @@ recordtype(aSub) {
     	}
     	field(FTVR,DBF_MENU) {
     		prompt("Type of VALR")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("53 - Output O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1528,7 +1507,7 @@ recordtype(aSub) {
     	}
     	field(FTVS,DBF_MENU) {
     		prompt("Type of VALS")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("53 - Output O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1536,7 +1515,7 @@ recordtype(aSub) {
     	}
     	field(FTVT,DBF_MENU) {
     		prompt("Type of VALT")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("53 - Output O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1544,7 +1523,7 @@ recordtype(aSub) {
     	}
     	field(FTVU,DBF_MENU) {
     		prompt("Type of VALU")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("53 - Output O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("DOUBLE")
    @@ -1552,147 +1531,147 @@ recordtype(aSub) {
     	}
     	field(NOVA,DBF_ULONG) {
     		prompt("Max. elements in VALA")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("51 - Output A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVB,DBF_ULONG) {
     		prompt("Max. elements in VALB")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("51 - Output A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVC,DBF_ULONG) {
     		prompt("Max. elements in VALC")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("51 - Output A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVD,DBF_ULONG) {
     		prompt("Max. elements in VALD")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("51 - Output A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVE,DBF_ULONG) {
     		prompt("Max. elements in VALE")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("51 - Output A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVF,DBF_ULONG) {
     		prompt("Max. elements in VALF")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("51 - Output A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVG,DBF_ULONG) {
     		prompt("Max. elements in VALG")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("51 - Output A-G")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVH,DBF_ULONG) {
     		prompt("Max. elements in VAlH")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("52 - Output H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVI,DBF_ULONG) {
     		prompt("Max. elements in VALI")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("52 - Output H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVJ,DBF_ULONG) {
     		prompt("Max. elements in VALJ")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("52 - Output H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVK,DBF_ULONG) {
     		prompt("Max. elements in VALK")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("52 - Output H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVL,DBF_ULONG) {
     		prompt("Max. elements in VALL")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("52 - Output H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVM,DBF_ULONG) {
     		prompt("Max. elements in VALM")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("52 - Output H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVN,DBF_ULONG) {
     		prompt("Max. elements in VALN")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("52 - Output H-N")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVO,DBF_ULONG) {
     		prompt("Max. elements in VALO")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("53 - Output O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVP,DBF_ULONG) {
     		prompt("Max. elements in VALP")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("53 - Output O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVQ,DBF_ULONG) {
     		prompt("Max. elements in VALQ")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("53 - Output O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVR,DBF_ULONG) {
     		prompt("Max. elements in VALR")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("53 - Output O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVS,DBF_ULONG) {
     		prompt("Max. elements in VALS")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("53 - Output O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVT,DBF_ULONG) {
     		prompt("Max. elements in VALT")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("53 - Output O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NOVU,DBF_ULONG) {
     		prompt("Max. elements in VALU")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("53 - Output O-U")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
    diff --git a/src/std/rec/aaiRecord.c b/src/std/rec/aaiRecord.c
    index 612b2d8c5..0dfed346c 100644
    --- a/src/std/rec/aaiRecord.c
    +++ b/src/std/rec/aaiRecord.c
    @@ -50,15 +50,15 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(aaiRecord *, int);
    -static long process(aaiRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     static long cvt_dbaddr(DBADDR *);
     static long get_array_info(DBADDR *, long *, long *);
     static long put_array_info(DBADDR *, long);
     static long get_units(DBADDR *, char *);
    -static long get_precision(DBADDR *, long *);
    +static long get_precision(const DBADDR *, long *);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    @@ -100,10 +100,11 @@ struct aaidset { /* aai dset */
     static void monitor(aaiRecord *);
     static long readValue(aaiRecord *);
     
    -static long init_record(aaiRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    -    long status;
    +    struct aaiRecord *prec = (struct aaiRecord *)pcommon;
         struct aaidset *pdset = (struct aaidset *)(prec->dset);
    +    long status;
     
         /* must have dset defined */
         if (!pdset) {
    @@ -150,8 +151,9 @@ static long init_record(aaiRecord *prec, int pass)
         return 0;
     }
     
    -static long process(aaiRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct aaiRecord *prec = (struct aaiRecord *)pcommon;
         struct aaidset *pdset = (struct aaidset *)(prec->dset);
         long status;
         unsigned char pact = prec->pact;
    @@ -225,7 +227,7 @@ static long get_units(DBADDR *paddr, char *units)
         return 0;
     }
     
    -static long get_precision(DBADDR *paddr, long *precision)
    +static long get_precision(const DBADDR *paddr, long *precision)
     {
         aaiRecord *prec = (aaiRecord *)paddr->precord;
     
    diff --git a/src/std/rec/aaiRecord.dbd b/src/std/rec/aaiRecord.dbd
    index 3b6c5fb2c..06ab7f7b8 100644
    --- a/src/std/rec/aaiRecord.dbd
    +++ b/src/std/rec/aaiRecord.dbd
    @@ -3,13 +3,12 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     menu(aaiPOST) {
    -        choice(aaiPOST_Always,"Always")
    -        choice(aaiPOST_OnChange,"On Change")
    +	choice(aaiPOST_Always,"Always")
    +	choice(aaiPOST_OnChange,"On Change")
     }
     recordtype(aai) {
     	include "dbCommon.dbd" 
    @@ -25,44 +24,44 @@ recordtype(aai) {
     	}
     	field(PREC,DBF_SHORT) {
     		prompt("Display Precision")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(INP,DBF_INLINK) {
     		prompt("Input Specification")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(EGU,DBF_STRING) {
    -		prompt("Engineering Units Name")
    -		promptgroup(GUI_BITS2)
    +		prompt("Engineering Units")
    +		promptgroup("80 - Display")
     		interest(1)
     		size(16)
     		prop(YES)
     	}
     	field(HOPR,DBF_DOUBLE) {
     		prompt("High Operating Range")
    -		promptgroup(GUI_CALC)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(LOPR,DBF_DOUBLE) {
     		prompt("Low Operating Range")
    -		promptgroup(GUI_CLOCK)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(NELM,DBF_ULONG) {
     		prompt("Number of Elements")
    -		promptgroup(GUI_COMPRESS)
    +		promptgroup("30 - Action")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(FTVL,DBF_MENU) {
     		prompt("Field Type of Value")
    -		promptgroup(GUI_CONVERT)
    +		promptgroup("30 - Action")
     		special(SPC_NOMOD)
     		interest(1)
     		menu(menuFtype)
    @@ -79,7 +78,7 @@ recordtype(aai) {
     	}
     	field(SIML,DBF_INLINK) {
     		prompt("Sim Mode Location")
    -		promptgroup(GUI_HIST)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIMM,DBF_MENU) {
    @@ -89,27 +88,27 @@ recordtype(aai) {
     	}
     	field(SIMS,DBF_MENU) {
     		prompt("Sim mode Alarm Svrty")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(2)
     		menu(menuAlarmSevr)
     	}
     	field(SIOL,DBF_INLINK) {
     		prompt("Sim Input Specifctn")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(MPST,DBF_MENU) {
    -                prompt("Post Value Monitors")
    -                promptgroup(GUI_DISPLAY)
    -                interest(1)
    -                menu(aaiPOST)
    +		prompt("Post Value Monitors")
    +		promptgroup("80 - Display")
    +		interest(1)
    +		menu(aaiPOST)
     	}
     	field(APST,DBF_MENU) {
    -                prompt("Post Archive Monitors")
    -                promptgroup(GUI_DISPLAY)
    -                interest(1)
    -                menu(aaiPOST)
    -        }
    +		prompt("Post Archive Monitors")
    +		promptgroup("80 - Display")
    +		interest(1)
    +		menu(aaiPOST)
    +	}
     	field(HASH,DBF_ULONG) {
     		prompt("Hash of OnChange data.")
     		interest(3)
    diff --git a/src/std/rec/aaoRecord.c b/src/std/rec/aaoRecord.c
    index b547a4c00..1cc2541eb 100644
    --- a/src/std/rec/aaoRecord.c
    +++ b/src/std/rec/aaoRecord.c
    @@ -50,15 +50,15 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(aaoRecord *, int);
    -static long process(aaoRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     static long cvt_dbaddr(DBADDR *);
     static long get_array_info(DBADDR *, long *, long *);
     static long put_array_info(DBADDR *, long);
     static long get_units(DBADDR *, char *);
    -static long get_precision(DBADDR *, long *);
    +static long get_precision(const DBADDR *, long *);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    @@ -100,10 +100,11 @@ struct aaodset { /* aao dset */
     static void monitor(aaoRecord *);
     static long writeValue(aaoRecord *);
     
    -static long init_record(aaoRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    -    long status;
    +    struct aaoRecord *prec = (struct aaoRecord *)pcommon;
         struct aaodset *pdset = (struct aaodset *)(prec->dset);
    +    long status;
     
         /* must have dset defined */
         if (!pdset) {
    @@ -150,8 +151,9 @@ static long init_record(aaoRecord *prec, int pass)
         return 0;
     }
     
    -static long process(aaoRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct aaoRecord *prec = (struct aaoRecord *)pcommon;
         struct aaodset *pdset = (struct aaodset *)(prec->dset);
         long status;
         unsigned char pact = prec->pact;
    @@ -225,7 +227,7 @@ static long get_units(DBADDR *paddr, char *units)
         return 0;
     }
     
    -static long get_precision(DBADDR *paddr, long *precision)
    +static long get_precision(const DBADDR *paddr, long *precision)
     {
         aaoRecord *prec = (aaoRecord *)paddr->precord;
     
    diff --git a/src/std/rec/aaoRecord.dbd b/src/std/rec/aaoRecord.dbd
    index 861a16613..57d842f4f 100644
    --- a/src/std/rec/aaoRecord.dbd
    +++ b/src/std/rec/aaoRecord.dbd
    @@ -3,13 +3,12 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     menu(aaoPOST) {
    -        choice(aaoPOST_Always,"Always")
    -        choice(aaoPOST_OnChange,"On Change")
    +	choice(aaoPOST_Always,"Always")
    +	choice(aaoPOST_OnChange,"On Change")
     }
     recordtype(aao) {
     	include "dbCommon.dbd" 
    @@ -25,44 +24,44 @@ recordtype(aao) {
     	}
     	field(PREC,DBF_SHORT) {
     		prompt("Display Precision")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(OUT,DBF_OUTLINK) {
     		prompt("Output Specification")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(EGU,DBF_STRING) {
    -		prompt("Engineering Units Name")
    -		promptgroup(GUI_BITS2)
    +		prompt("Engineering Units")
    +		promptgroup("80 - Display")
     		interest(1)
     		size(16)
     		prop(YES)
     	}
     	field(HOPR,DBF_DOUBLE) {
     		prompt("High Operating Range")
    -		promptgroup(GUI_CALC)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(LOPR,DBF_DOUBLE) {
     		prompt("Low Operating Range")
    -		promptgroup(GUI_CLOCK)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(NELM,DBF_ULONG) {
     		prompt("Number of Elements")
    -		promptgroup(GUI_COMPRESS)
    +		promptgroup("30 - Action")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(FTVL,DBF_MENU) {
     		prompt("Field Type of Value")
    -		promptgroup(GUI_CONVERT)
    +		promptgroup("30 - Action")
     		special(SPC_NOMOD)
     		interest(1)
     		menu(menuFtype)
    @@ -79,7 +78,7 @@ recordtype(aao) {
     	}
     	field(SIML,DBF_INLINK) {
     		prompt("Sim Mode Location")
    -		promptgroup(GUI_HIST)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIMM,DBF_MENU) {
    @@ -89,27 +88,27 @@ recordtype(aao) {
     	}
     	field(SIMS,DBF_MENU) {
     		prompt("Sim mode Alarm Svrty")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(2)
     		menu(menuAlarmSevr)
     	}
     	field(SIOL,DBF_OUTLINK) {
     		prompt("Sim Output Specifctn")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(MPST,DBF_MENU) {
    -                prompt("Post Value Monitors")
    -                promptgroup(GUI_DISPLAY)
    -                interest(1)
    -                menu(aaoPOST)
    +		prompt("Post Value Monitors")
    +		promptgroup("80 - Display")
    +		interest(1)
    +		menu(aaoPOST)
     	}
     	field(APST,DBF_MENU) {
    -                prompt("Post Archive Monitors")
    -                promptgroup(GUI_DISPLAY)
    -                interest(1)
    -                menu(aaoPOST)
    -        }
    +		prompt("Post Archive Monitors")
    +		promptgroup("80 - Display")
    +		interest(1)
    +		menu(aaoPOST)
    +	}
     	field(HASH,DBF_ULONG) {
     		prompt("Hash of OnChange data.")
     		interest(3)
    diff --git a/src/std/rec/aiRecord.c b/src/std/rec/aiRecord.c
    index 9d20cab0d..81f730f6d 100644
    --- a/src/std/rec/aiRecord.c
    +++ b/src/std/rec/aiRecord.c
    @@ -6,7 +6,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     /* aiRecord.c - Record Support Routines for Analog Input records */
     /*
    @@ -48,15 +47,15 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(void *, int);
    -static long process(void *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     static long special(DBADDR *, int);
     #define get_value NULL
     #define cvt_dbaddr NULL
     #define get_array_info NULL
     #define put_array_info NULL
     static long get_units(DBADDR *, char *);
    -static long get_precision(DBADDR *, long *);
    +static long get_precision(const DBADDR *, long *);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    @@ -103,9 +102,9 @@ static void convert(aiRecord *prec);
     static void monitor(aiRecord *prec);
     static long readValue(aiRecord *prec);
     
    -static long init_record(void *precord,int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    -    aiRecord	*prec = (aiRecord *)precord;
    +    struct aiRecord *prec = (struct aiRecord *)pcommon;
         aidset	*pdset;
         double	eoff = prec->eoff, eslo = prec->eslo;
     
    @@ -144,10 +143,10 @@ static long init_record(void *precord,int pass)
         return(0);
     }
     
    -static long process(void *precord)
    +static long process(struct dbCommon *pcommon)
     {
    -	aiRecord	*prec = (aiRecord *)precord;
    -	aidset		*pdset = (aidset *)(prec->dset);
    +    struct aiRecord *prec = (struct aiRecord *)pcommon;
    +    aidset		*pdset = (aidset *)(prec->dset);
     	long		 status;
     	unsigned char    pact=prec->pact;
             epicsTimeStamp	 timeLast;
    @@ -231,7 +230,7 @@ static long get_units(DBADDR *paddr, char *units)
         return(0);
     }
     
    -static long get_precision(DBADDR *paddr, long *precision)
    +static long get_precision(const DBADDR *paddr, long *precision)
     {
         aiRecord	*prec=(aiRecord *)paddr->precord;
     
    diff --git a/src/std/rec/aiRecord.dbd.pod b/src/std/rec/aiRecord.dbd.pod
    index 8da77055d..2973ec831 100644
    --- a/src/std/rec/aiRecord.dbd.pod
    +++ b/src/std/rec/aiRecord.dbd.pod
    @@ -217,24 +217,24 @@ monitoring functionality.
         include "dbCommon.dbd" 
         field(VAL,DBF_DOUBLE) {
             prompt("Current EGU Value")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("40 - Input")
             asl(ASL0)
             pp(TRUE)
         }
         field(INP,DBF_INLINK) {
             prompt("Input Specification")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(PREC,DBF_SHORT) {
             prompt("Display Precision")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(LINR,DBF_MENU) {
             prompt("Linearization")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             special(SPC_LINCONV)
             pp(TRUE)
             interest(1)
    @@ -242,133 +242,133 @@ monitoring functionality.
         }
         field(EGUF,DBF_DOUBLE) {
             prompt("Engineer Units Full")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             special(SPC_LINCONV)
             pp(TRUE)
             interest(1)
         }
         field(EGUL,DBF_DOUBLE) {
             prompt("Engineer Units Low")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             special(SPC_LINCONV)
             pp(TRUE)
             interest(1)
         }
         field(EGU,DBF_STRING) {
             prompt("Engineering Units")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
             size(16)
    -		prop(YES)
    +        prop(YES)
         }
         field(HOPR,DBF_DOUBLE) {
             prompt("High Operating Range")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(LOPR,DBF_DOUBLE) {
             prompt("Low Operating Range")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(AOFF,DBF_DOUBLE) {
             prompt("Adjustment Offset")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             pp(TRUE)
             interest(1)
         }
         field(ASLO,DBF_DOUBLE) {
             prompt("Adjustment Slope")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             pp(TRUE)
             interest(1)
             initial("1")
         }
         field(SMOO,DBF_DOUBLE) {
             prompt("Smoothing")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             interest(1)
         }
         field(HIHI,DBF_DOUBLE) {
             prompt("Hihi Alarm Limit")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(LOLO,DBF_DOUBLE) {
             prompt("Lolo Alarm Limit")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(HIGH,DBF_DOUBLE) {
             prompt("High Alarm Limit")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(LOW,DBF_DOUBLE) {
             prompt("Low Alarm Limit")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(HHSV,DBF_MENU) {
             prompt("Hihi Severity")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
             menu(menuAlarmSevr)
         }
         field(LLSV,DBF_MENU) {
             prompt("Lolo Severity")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
             menu(menuAlarmSevr)
         }
         field(HSV,DBF_MENU) {
             prompt("High Severity")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
             menu(menuAlarmSevr)
         }
         field(LSV,DBF_MENU) {
             prompt("Low Severity")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
             menu(menuAlarmSevr)
         }
         field(HYST,DBF_DOUBLE) {
             prompt("Alarm Deadband")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             interest(1)
         }
         field(AFTC,DBF_DOUBLE) {
             prompt("Alarm Filter Time Constant")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             interest(1)
         }
         field(ADEL,DBF_DOUBLE) {
             prompt("Archive Deadband")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
         }
         field(MDEL,DBF_DOUBLE) {
             prompt("Monitor Deadband")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
         }
         field(LALM,DBF_DOUBLE) {
    @@ -393,14 +393,14 @@ monitoring functionality.
         }
         field(ESLO,DBF_DOUBLE) {
             prompt("Raw to EGU Slope")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             pp(TRUE)
             interest(2)
             initial("1")
         }
         field(EOFF,DBF_DOUBLE) {
             prompt("Raw to EGU Offset")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             pp(TRUE)
             interest(2)
         }
    @@ -469,7 +469,7 @@ simulation mode.
     
         field(SIOL,DBF_INLINK) {
             prompt("Sim. Input Specification")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("90 - Simulate")
             interest(1)
         }
         field(SVAL,DBF_DOUBLE) {
    @@ -477,7 +477,7 @@ simulation mode.
         }
         field(SIML,DBF_INLINK) {
             prompt("Sim. Mode Location")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("90 - Simulate")
             interest(1)
         }
         field(SIMM,DBF_MENU) {
    @@ -487,7 +487,7 @@ simulation mode.
         }
         field(SIMS,DBF_MENU) {
             prompt("Simulation Mode Severity")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("90 - Simulate")
             interest(2)
             menu(menuAlarmSevr)
         }
    @@ -610,7 +610,7 @@ values that the C routine can put in the RVAL field.
     When RVAL is set to I the VAL field will be set to EGUF, and when RVAL
     is set to I the VAL field will become EGUL.
     
    -The fomulae to use are:
    +The formulae to use are:
     
     =over
     
    diff --git a/src/std/rec/aoRecord.c b/src/std/rec/aoRecord.c
    index a32c5bb55..0d923af5c 100644
    --- a/src/std/rec/aoRecord.c
    +++ b/src/std/rec/aoRecord.c
    @@ -6,7 +6,6 @@
     * EPICS BASE is distributed subject to a Software License Agreement found
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
    -/* $Revision-Id$ */
     
     /* aoRecord.c - Record Support Routines for Analog Output records */
     /*
    @@ -47,15 +46,15 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(aoRecord *prec, int pass);
    -static long process(aoRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     static long special(DBADDR *, int);
     #define get_value NULL
     #define cvt_dbaddr NULL
     #define get_array_info NULL
     #define put_array_info NULL
     static long get_units(DBADDR *, char *);
    -static long get_precision(DBADDR *, long *);
    +static long get_precision(const DBADDR *, long *);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    @@ -102,9 +101,10 @@ static void convert(aoRecord *, double);
     static void monitor(aoRecord *);
     static long writeValue(aoRecord *);
     
    -static long init_record(aoRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    -    struct aodset *pdset;
    +    struct aoRecord *prec = (struct aoRecord *)pcommon;
    +    struct aodset  *pdset;
         double 	eoff = prec->eoff, eslo = prec->eslo;
         double	value;
     
    @@ -170,9 +170,10 @@ static long init_record(aoRecord *prec, int pass)
         return(0);
     }
     
    -static long process(aoRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    -	struct aodset	*pdset = (struct aodset *)(prec->dset);
    +    struct aoRecord *prec = (struct aoRecord *)pcommon;
    +    struct aodset  *pdset = (struct aodset *)(prec->dset);
     	long		 status=0;
     	unsigned char    pact=prec->pact;
     	double		value;
    @@ -290,7 +291,7 @@ static long get_units(DBADDR * paddr,char *units)
         return(0);
     }
     
    -static long get_precision(DBADDR *paddr,long *precision)
    +static long get_precision(const DBADDR *paddr,long *precision)
     {
         aoRecord	*prec=(aoRecord *)paddr->precord;
     
    diff --git a/src/std/rec/aoRecord.dbd.pod b/src/std/rec/aoRecord.dbd.pod
    index 5b9280a65..41467dcd3 100644
    --- a/src/std/rec/aoRecord.dbd.pod
    +++ b/src/std/rec/aoRecord.dbd.pod
    @@ -273,7 +273,7 @@ information on these fields.
         include "dbCommon.dbd" 
         field(VAL,DBF_DOUBLE) {
             prompt("Desired Output")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("50 - Output")
             asl(ASL0)
             pp(TRUE)
         }
    @@ -282,40 +282,40 @@ information on these fields.
         }
         field(OUT,DBF_OUTLINK) {
             prompt("Output Specification")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("50 - Output")
             interest(1)
         }
         field(OROC,DBF_DOUBLE) {
             prompt("Output Rate of Change")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("50 - Output")
             interest(1)
         }
         field(DOL,DBF_INLINK) {
             prompt("Desired Output Loc")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(OMSL,DBF_MENU) {
             prompt("Output Mode Select")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("50 - Output")
             interest(1)
             menu(menuOmsl)
         }
         field(OIF,DBF_MENU) {
             prompt("Out Full/Incremental")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("50 - Output")
             interest(1)
             menu(aoOIF)
         }
         field(PREC,DBF_SHORT) {
             prompt("Display Precision")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(LINR,DBF_MENU) {
             prompt("Linearization")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             special(SPC_LINCONV)
             pp(TRUE)
             interest(1)
    @@ -323,24 +323,24 @@ information on these fields.
         }
         field(EGUF,DBF_DOUBLE) {
             prompt("Eng Units Full")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             special(SPC_LINCONV)
             pp(TRUE)
             interest(1)
         }
         field(EGUL,DBF_DOUBLE) {
             prompt("Eng Units Low")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             special(SPC_LINCONV)
             pp(TRUE)
             interest(1)
         }
         field(EGU,DBF_STRING) {
             prompt("Engineering Units")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
             size(16)
    -		prop(YES)
    +        prop(YES)
         }
         field(ROFF,DBF_ULONG) {
             prompt("Raw Offset")
    @@ -349,128 +349,128 @@ information on these fields.
         }
         field(EOFF,DBF_DOUBLE) {
             prompt("EGU to Raw Offset")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             pp(TRUE)
             interest(2)
         }
         field(ESLO,DBF_DOUBLE) {
             prompt("EGU to Raw Slope")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             pp(TRUE)
             interest(2)
             initial("1")
         }
         field(DRVH,DBF_DOUBLE) {
             prompt("Drive High Limit")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("30 - Action")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(DRVL,DBF_DOUBLE) {
             prompt("Drive Low Limit")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("30 - Action")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(HOPR,DBF_DOUBLE) {
             prompt("High Operating Range")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(LOPR,DBF_DOUBLE) {
             prompt("Low Operating Range")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(AOFF,DBF_DOUBLE) {
             prompt("Adjustment Offset")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             pp(TRUE)
             interest(1)
         }
         field(ASLO,DBF_DOUBLE) {
             prompt("Adjustment Slope")
    -        promptgroup(GUI_CONVERT)
    +        promptgroup("60 - Convert")
             pp(TRUE)
             interest(1)
         }
         field(HIHI,DBF_DOUBLE) {
             prompt("Hihi Alarm Limit")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(LOLO,DBF_DOUBLE) {
             prompt("Lolo Alarm Limit")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(HIGH,DBF_DOUBLE) {
             prompt("High Alarm Limit")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(LOW,DBF_DOUBLE) {
             prompt("Low Alarm Limit")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
         }
         field(HHSV,DBF_MENU) {
             prompt("Hihi Severity")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
             menu(menuAlarmSevr)
         }
         field(LLSV,DBF_MENU) {
             prompt("Lolo Severity")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
             menu(menuAlarmSevr)
         }
         field(HSV,DBF_MENU) {
             prompt("High Severity")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
             menu(menuAlarmSevr)
         }
         field(LSV,DBF_MENU) {
             prompt("Low Severity")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             pp(TRUE)
             interest(1)
    -		prop(YES)
    +        prop(YES)
             menu(menuAlarmSevr)
         }
         field(HYST,DBF_DOUBLE) {
             prompt("Alarm Deadband")
    -        promptgroup(GUI_ALARMS)
    +        promptgroup("70 - Alarm")
             interest(1)
         }
         field(ADEL,DBF_DOUBLE) {
             prompt("Archive Deadband")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
         }
         field(MDEL,DBF_DOUBLE) {
             prompt("Monitor Deadband")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
         }
         field(RVAL,DBF_LONG) {
    @@ -529,12 +529,12 @@ information on these fields.
         }
         field(SIOL,DBF_OUTLINK) {
             prompt("Sim Output Specifctn")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("90 - Simulate")
             interest(1)
         }
         field(SIML,DBF_INLINK) {
             prompt("Sim Mode Location")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("90 - Simulate")
             interest(1)
         }
         field(SIMM,DBF_MENU) {
    @@ -544,19 +544,19 @@ information on these fields.
         }
         field(SIMS,DBF_MENU) {
             prompt("Sim mode Alarm Svrty")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("90 - Simulate")
             interest(2)
             menu(menuAlarmSevr)
         }
         field(IVOA,DBF_MENU) {
             prompt("INVALID output action")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("50 - Output")
             interest(2)
             menu(menuIvoa)
         }
         field(IVOV,DBF_DOUBLE) {
             prompt("INVALID output value")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("50 - Output")
             interest(2)
         }
         field(OMOD,DBF_UCHAR) {
    diff --git a/src/std/rec/biRecord.c b/src/std/rec/biRecord.c
    index 1e09ce2f7..7afea3d9d 100644
    --- a/src/std/rec/biRecord.c
    +++ b/src/std/rec/biRecord.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* recBi.c - Record Support Routines for Binary Input records */
     /*
      *      Original Author: Bob Dalesio
    @@ -43,8 +41,8 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(biRecord *, int);
    -static long process(biRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     #define cvt_dbaddr NULL
    @@ -52,9 +50,9 @@ static long process(biRecord *);
     #define put_array_info NULL
     #define get_units NULL
     #define get_precision NULL
    -static long get_enum_str(DBADDR *, char *);
    -static long get_enum_strs(DBADDR *, struct dbr_enumStrs *);
    -static long put_enum_str(DBADDR *, char *);
    +static long get_enum_str(const DBADDR *, char *);
    +static long get_enum_strs(const DBADDR *, struct dbr_enumStrs *);
    +static long put_enum_str(const DBADDR *, const char *);
     #define get_graphic_double NULL
     #define get_control_double NULL
     #define get_alarm_double NULL
    @@ -91,8 +89,9 @@ static void checkAlarms(biRecord *);
     static void monitor(biRecord *);
     static long readValue(biRecord *);
     
    -static long init_record(biRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct biRecord *prec = (struct biRecord *)pcommon;
         struct bidset *pdset;
         long status;
     
    @@ -118,9 +117,10 @@ static long init_record(biRecord *prec, int pass)
         return(0);
     }
     
    -static long process(biRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    -	struct bidset	*pdset = (struct bidset *)(prec->dset);
    +    struct biRecord *prec = (struct biRecord *)pcommon;
    +    struct bidset  *pdset = (struct bidset *)(prec->dset);
     	long		 status;
     	unsigned char    pact=prec->pact;
     
    @@ -153,7 +153,7 @@ static long process(biRecord *prec)
     	return(status);
     }
     
    -static long get_enum_str(DBADDR *paddr, char *pstring)
    +static long get_enum_str(const DBADDR *paddr, char *pstring)
     {
         biRecord	*prec=(biRecord *)paddr->precord;
         int                 index;
    @@ -175,7 +175,7 @@ static long get_enum_str(DBADDR *paddr, char *pstring)
         return(0);
     }
     
    -static long get_enum_strs(DBADDR *paddr,struct dbr_enumStrs *pes)
    +static long get_enum_strs(const DBADDR *paddr,struct dbr_enumStrs *pes)
     {
         biRecord	*prec=(biRecord *)paddr->precord;
     
    @@ -188,7 +188,7 @@ static long get_enum_strs(DBADDR *paddr,struct dbr_enumStrs *pes)
         return(0);
     }
     
    -static long put_enum_str(DBADDR *paddr, char *pstring)
    +static long put_enum_str(const DBADDR *paddr, const char *pstring)
     {
         biRecord     *prec=(biRecord *)paddr->precord;
     
    diff --git a/src/std/rec/biRecord.dbd b/src/std/rec/biRecord.dbd
    index 501ecab83..fb3588fb1 100644
    --- a/src/std/rec/biRecord.dbd
    +++ b/src/std/rec/biRecord.dbd
    @@ -3,47 +3,46 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     recordtype(bi) {
     	include "dbCommon.dbd" 
     	field(INP,DBF_INLINK) {
     		prompt("Input Specification")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(VAL,DBF_ENUM) {
     		prompt("Current Value")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("40 - Input")
     		asl(ASL0)
     		pp(TRUE)
     	}
     	field(ZSV,DBF_MENU) {
     		prompt("Zero Error Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(OSV,DBF_MENU) {
     		prompt("One Error Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(COSV,DBF_MENU) {
     		prompt("Change of State Svr")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(ZNAM,DBF_STRING) {
     		prompt("Zero Name")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		pp(TRUE)
     		interest(1)
     		size(26)
    @@ -51,7 +50,7 @@ recordtype(bi) {
     	}
     	field(ONAM,DBF_STRING) {
     		prompt("One Name")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		pp(TRUE)
     		interest(1)
     		size(26)
    @@ -83,7 +82,7 @@ recordtype(bi) {
     	}
     	field(SIOL,DBF_INLINK) {
     		prompt("Sim Input Specifctn")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SVAL,DBF_ULONG) {
    @@ -91,7 +90,7 @@ recordtype(bi) {
     	}
     	field(SIML,DBF_INLINK) {
     		prompt("Sim Mode Location")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIMM,DBF_MENU) {
    @@ -101,7 +100,7 @@ recordtype(bi) {
     	}
     	field(SIMS,DBF_MENU) {
     		prompt("Sim mode Alarm Svrty")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(2)
     		menu(menuAlarmSevr)
     	}
    diff --git a/src/std/rec/boRecord.c b/src/std/rec/boRecord.c
    index 24b842d87..8f60a0be5 100644
    --- a/src/std/rec/boRecord.c
    +++ b/src/std/rec/boRecord.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* recBo.c - Record Support Routines for Binary Output records */
     /*
      *      Original Author: Bob Dalesio
    @@ -45,18 +43,18 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(boRecord *, int);
    -static long process(boRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     #define cvt_dbaddr NULL
     #define get_array_info NULL
     #define put_array_info NULL
     static long get_units(DBADDR *, char *);
    -static long get_precision(DBADDR *, long *);
    -static long get_enum_str(DBADDR *, char *);
    -static long get_enum_strs(DBADDR *, struct dbr_enumStrs *);
    -static long put_enum_str(DBADDR *, char *);
    +static long get_precision(const DBADDR *, long *);
    +static long get_enum_str(const DBADDR *, char *);
    +static long get_enum_strs(const DBADDR *, struct dbr_enumStrs *);
    +static long put_enum_str(const DBADDR *, const char *);
     #define get_graphic_double NULL
     static long get_control_double(DBADDR *, struct dbr_ctrlDouble *);
     #define get_alarm_double NULL
    @@ -130,8 +128,9 @@ static void myCallbackFunc(CALLBACK *arg)
         dbScanUnlock((struct dbCommon *)prec);
     }
     
    -static long init_record(boRecord *prec,int pass)
    +static long init_record(struct dbCommon *pcommon,int pass)
     {
    +    struct boRecord *prec = (struct boRecord *)pcommon;
         struct bodset *pdset = (struct bodset *) prec->dset;
         unsigned short ival = 0;
         long status = 0;
    @@ -187,9 +186,10 @@ static long init_record(boRecord *prec,int pass)
         return(status);
     }
     
    -static long process(boRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    -	struct bodset	*pdset = (struct bodset *)(prec->dset);
    +    struct boRecord *prec = (struct boRecord *)pcommon;
    +    struct bodset  *pdset = (struct bodset *)(prec->dset);
     	long		 status=0;
     	unsigned char    pact=prec->pact;
     
    @@ -280,7 +280,7 @@ static long get_units(DBADDR *paddr, char *units)
         return(0);
     }
     
    -static long get_precision(DBADDR *paddr, long *precision)
    +static long get_precision(const DBADDR *paddr, long *precision)
     {
         if(dbGetFieldIndex(paddr) == indexof(HIGH))
             *precision = boHIGHprecision;
    @@ -299,7 +299,7 @@ static long get_control_double(DBADDR *paddr,struct dbr_ctrlDouble *pcd)
         return(0);
     }
     
    -static long get_enum_str(DBADDR *paddr, char *pstring)
    +static long get_enum_str(const DBADDR *paddr, char *pstring)
     {
         boRecord	*prec=(boRecord *)paddr->precord;
         int                 index;
    @@ -321,7 +321,7 @@ static long get_enum_str(DBADDR *paddr, char *pstring)
         return(0);
     }
     
    -static long get_enum_strs(DBADDR *paddr,struct dbr_enumStrs *pes)
    +static long get_enum_strs(const DBADDR *paddr,struct dbr_enumStrs *pes)
     {
         boRecord	*prec=(boRecord *)paddr->precord;
     
    @@ -334,7 +334,7 @@ static long get_enum_strs(DBADDR *paddr,struct dbr_enumStrs *pes)
         if(*prec->onam!=0) pes->no_str=2;
         return(0);
     }
    -static long put_enum_str(DBADDR *paddr, char *pstring)
    +static long put_enum_str(const DBADDR *paddr, const char *pstring)
     {
         boRecord     *prec=(boRecord *)paddr->precord;
     
    diff --git a/src/std/rec/boRecord.dbd b/src/std/rec/boRecord.dbd
    index 9a861f157..fd002c368 100644
    --- a/src/std/rec/boRecord.dbd
    +++ b/src/std/rec/boRecord.dbd
    @@ -3,42 +3,41 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     recordtype(bo) {
     	include "dbCommon.dbd" 
     	field(VAL,DBF_ENUM) {
     		prompt("Current Value")
    -                promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		asl(ASL0)
     		pp(TRUE)
     	}
     	field(OMSL,DBF_MENU) {
     		prompt("Output Mode Select")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     		menu(menuOmsl)
     	}
     	field(DOL,DBF_INLINK) {
     		prompt("Desired Output Loc")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(OUT,DBF_OUTLINK) {
     		prompt("Output Specification")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(HIGH,DBF_DOUBLE) {
     		prompt("Seconds to Hold High")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("30 - Action")
     		interest(1)
     	}
     	field(ZNAM,DBF_STRING) {
     		prompt("Zero Name")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		pp(TRUE)
     		interest(1)
     		size(26)
    @@ -46,7 +45,7 @@ recordtype(bo) {
     	}
     	field(ONAM,DBF_STRING) {
     		prompt("One Name")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		pp(TRUE)
     		interest(1)
     		size(26)
    @@ -80,21 +79,21 @@ recordtype(bo) {
     	}
     	field(ZSV,DBF_MENU) {
     		prompt("Zero Error Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(OSV,DBF_MENU) {
     		prompt("One Error Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(COSV,DBF_MENU) {
     		prompt("Change of State Sevr")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
    @@ -120,12 +119,12 @@ recordtype(bo) {
     	}
     	field(SIOL,DBF_OUTLINK) {
     		prompt("Sim Output Specifctn")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIML,DBF_INLINK) {
     		prompt("Sim Mode Location")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIMM,DBF_MENU) {
    @@ -135,19 +134,19 @@ recordtype(bo) {
     	}
     	field(SIMS,DBF_MENU) {
     		prompt("Sim mode Alarm Svrty")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(2)
     		menu(menuAlarmSevr)
     	}
     	field(IVOA,DBF_MENU) {
     		prompt("INVALID outpt action")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(2)
     		menu(menuIvoa)
     	}
     	field(IVOV,DBF_USHORT) {
     		prompt("INVALID output value")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(2)
     	}
     }
    diff --git a/src/std/rec/calcRecord.c b/src/std/rec/calcRecord.c
    index b479b779b..12a58d1c8 100644
    --- a/src/std/rec/calcRecord.c
    +++ b/src/std/rec/calcRecord.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* Record Support Routines for Calculation records */
     /*
      *      Original Author: Julie Sander and Bob Dalesio
    @@ -45,15 +43,15 @@
     
     #define report NULL
     #define initialize NULL
    -static long init_record(calcRecord *prec, int pass);
    -static long process(calcRecord *prec);
    +static long init_record(struct dbCommon *prec, int pass);
    +static long process(struct dbCommon *prec);
     static long special(DBADDR *paddr, int after);
     #define get_value NULL
     #define cvt_dbaddr NULL
     #define get_array_info NULL
     #define put_array_info NULL
     static long get_units(DBADDR *paddr, char *units);
    -static long get_precision(DBADDR *paddr, long *precision);
    +static long get_precision(const DBADDR *paddr, long *precision);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    @@ -88,8 +86,9 @@ static void monitor(calcRecord *prec);
     static int fetch_values(calcRecord *prec);
     
     
    -static long init_record(calcRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct calcRecord *prec = (struct calcRecord *)pcommon;
         struct link *plink;
         double *pvalue;
         int i;
    @@ -111,8 +110,9 @@ static long init_record(calcRecord *prec, int pass)
         return 0;
     }
     
    -static long process(calcRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct calcRecord *prec = (struct calcRecord *)pcommon;
         epicsTimeStamp timeLast;
     
         prec->pact = TRUE;
    @@ -180,7 +180,7 @@ static long get_units(DBADDR *paddr, char *units)
         return 0;
     }
     
    -static long get_precision(DBADDR *paddr, long *pprecision)
    +static long get_precision(const DBADDR *paddr, long *pprecision)
     {
         calcRecord *prec = (calcRecord *)paddr->precord;
         int fieldIndex = dbGetFieldIndex(paddr);
    diff --git a/src/std/rec/calcRecord.dbd b/src/std/rec/calcRecord.dbd
    index 27c21da95..e7eb0eee3 100644
    --- a/src/std/rec/calcRecord.dbd
    +++ b/src/std/rec/calcRecord.dbd
    @@ -10,11 +10,12 @@ recordtype(calc) {
     	include "dbCommon.dbd" 
     	field(VAL,DBF_DOUBLE) {
     		prompt("Result")
    +		promptgroup("50 - Output")
     		asl(ASL0)
     	}
     	field(CALC,DBF_STRING) {
     		prompt("Calculation")
    -		promptgroup(GUI_CALC)
    +		promptgroup("30 - Action")
     		special(SPC_CALC)
     		pp(TRUE)
     		size(80)
    @@ -22,120 +23,120 @@ recordtype(calc) {
     	}
     	field(INPA,DBF_INLINK) {
     		prompt("Input A")
    -		promptgroup(GUI_CALC)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPB,DBF_INLINK) {
     		prompt("Input B")
    -		promptgroup(GUI_CALC)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPC,DBF_INLINK) {
     		prompt("Input C")
    -		promptgroup(GUI_CALC)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPD,DBF_INLINK) {
     		prompt("Input D")
    -		promptgroup(GUI_CALC)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPE,DBF_INLINK) {
     		prompt("Input E")
    -		promptgroup(GUI_CALC)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPF,DBF_INLINK) {
     		prompt("Input F")
    -		promptgroup(GUI_CALC)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPG,DBF_INLINK) {
     		prompt("Input G")
    -		promptgroup(GUI_CALC)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPH,DBF_INLINK) {
     		prompt("Input H")
    -		promptgroup(GUI_CALC)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPI,DBF_INLINK) {
     		prompt("Input I")
    -		promptgroup(GUI_CALC)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPJ,DBF_INLINK) {
     		prompt("Input J")
    -		promptgroup(GUI_CALC)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPK,DBF_INLINK) {
     		prompt("Input K")
    -		promptgroup(GUI_CALC)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPL,DBF_INLINK) {
     		prompt("Input L")
    -		promptgroup(GUI_CALC)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(EGU,DBF_STRING) {
    -		prompt("Units Name")
    -		promptgroup(GUI_DISPLAY)
    +		prompt("Engineering Units")
    +		promptgroup("80 - Display")
     		interest(1)
     		size(16)
     		prop(YES)
     	}
     	field(PREC,DBF_SHORT) {
     		prompt("Display Precision")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(HOPR,DBF_DOUBLE) {
     		prompt("High Operating Rng")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(LOPR,DBF_DOUBLE) {
     		prompt("Low Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(HIHI,DBF_DOUBLE) {
     		prompt("Hihi Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(LOLO,DBF_DOUBLE) {
     		prompt("Lolo Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(HIGH,DBF_DOUBLE) {
     		prompt("High Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(LOW,DBF_DOUBLE) {
     		prompt("Low Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(HHSV,DBF_MENU) {
     		prompt("Hihi Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -143,7 +144,7 @@ recordtype(calc) {
     	}
     	field(LLSV,DBF_MENU) {
     		prompt("Lolo Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -151,7 +152,7 @@ recordtype(calc) {
     	}
     	field(HSV,DBF_MENU) {
     		prompt("High Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -159,35 +160,35 @@ recordtype(calc) {
     	}
     	field(LSV,DBF_MENU) {
     		prompt("Low Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     		menu(menuAlarmSevr)
     	}
    -        field(AFTC, DBF_DOUBLE) {
    -                prompt("Alarm Filter Time Constant")
    -                promptgroup(GUI_ALARMS)
    -                interest(1)
    -        }
    -        field(AFVL, DBF_DOUBLE) {
    -                prompt("Alarm Filter Value")
    -                special(SPC_NOMOD)
    -                interest(3)
    -        }
    +	field(AFTC, DBF_DOUBLE) {
    +		prompt("Alarm Filter Time Constant")
    +		promptgroup("70 - Alarm")
    +		interest(1)
    +	}
    +	field(AFVL, DBF_DOUBLE) {
    +		prompt("Alarm Filter Value")
    +		special(SPC_NOMOD)
    +		interest(3)
    +	}
     	field(HYST,DBF_DOUBLE) {
     		prompt("Alarm Deadband")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		interest(1)
     	}
     	field(ADEL,DBF_DOUBLE) {
     		prompt("Archive Deadband")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(MDEL,DBF_DOUBLE) {
     		prompt("Monitor Deadband")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(A,DBF_DOUBLE) {
    diff --git a/src/std/rec/calcoutRecord.c b/src/std/rec/calcoutRecord.c
    index ab1f53fac..e1020938e 100644
    --- a/src/std/rec/calcoutRecord.c
    +++ b/src/std/rec/calcoutRecord.c
    @@ -47,15 +47,15 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(calcoutRecord *, int);
    -static long process(calcoutRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     static long special(DBADDR *, int);
     #define get_value NULL
     #define cvt_dbaddr NULL
     #define get_array_info NULL
     #define put_array_info NULL
     static long get_units(DBADDR *, char *);
    -static long get_precision(DBADDR *, long *);
    +static long get_precision(const DBADDR *, long *);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    @@ -134,8 +134,9 @@ static long writeValue(calcoutRecord *prec);
     int    calcoutRecDebug;
     
     
    -static long init_record(calcoutRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct calcoutRecord *prec = (struct calcoutRecord *)pcommon;
         DBLINK *plink;
         int i;
         double *pvalue;
    @@ -229,8 +230,9 @@ static long init_record(calcoutRecord *prec, int pass)
         return 0;
     }
     
    -static long process(calcoutRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct calcoutRecord *prec = (struct calcoutRecord *)pcommon;
         rpvtStruct *prpvt = prec->rpvt;
         int doOutput;
     
    @@ -434,7 +436,7 @@ static long get_units(DBADDR *paddr, char *units)
         return 0;
     }
     
    -static long get_precision(DBADDR *paddr, long *pprecision)
    +static long get_precision(const DBADDR *paddr, long *pprecision)
     {
         calcoutRecord *prec = (calcoutRecord *)paddr->precord;
         int fieldIndex = dbGetFieldIndex(paddr);
    diff --git a/src/std/rec/calcoutRecord.dbd b/src/std/rec/calcoutRecord.dbd
    index 4b6e2a5e2..5bf2e54de 100644
    --- a/src/std/rec/calcoutRecord.dbd
    +++ b/src/std/rec/calcoutRecord.dbd
    @@ -34,7 +34,7 @@ recordtype(calcout) {
     	}
     	field(VAL,DBF_DOUBLE) {
     		prompt("Result")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		asl(ASL0)
     	}
     	field(PVAL,DBF_DOUBLE) {
    @@ -42,7 +42,7 @@ recordtype(calcout) {
     	}
     	field(CALC,DBF_STRING) {
     		prompt("Calculation")
    -		promptgroup(GUI_CALC)
    +		promptgroup("30 - Action")
     		special(SPC_CALC)
     		pp(TRUE)
     		size(80)
    @@ -55,79 +55,79 @@ recordtype(calcout) {
     	field(INPA,DBF_INLINK) {
     		prompt("Input A")
     		special(SPC_MOD)
    -		promptgroup(GUI_CALC)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPB,DBF_INLINK) {
     		prompt("Input B")
     		special(SPC_MOD)
    -		promptgroup(GUI_CALC)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPC,DBF_INLINK) {
     		prompt("Input C")
     		special(SPC_MOD)
    -		promptgroup(GUI_CALC)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPD,DBF_INLINK) {
     		prompt("Input D")
     		special(SPC_MOD)
    -		promptgroup(GUI_CALC)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPE,DBF_INLINK) {
     		prompt("Input E")
     		special(SPC_MOD)
    -		promptgroup(GUI_CALC)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPF,DBF_INLINK) {
     		prompt("Input F")
     		special(SPC_MOD)
    -		promptgroup(GUI_CALC)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPG,DBF_INLINK) {
     		prompt("Input G")
     		special(SPC_MOD)
    -		promptgroup(GUI_CALC)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPH,DBF_INLINK) {
     		prompt("Input H")
     		special(SPC_MOD)
    -		promptgroup(GUI_CALC)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPI,DBF_INLINK) {
     		prompt("Input I")
     		special(SPC_MOD)
    -		promptgroup(GUI_CALC)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPJ,DBF_INLINK) {
     		prompt("Input J")
     		special(SPC_MOD)
    -		promptgroup(GUI_CALC)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPK,DBF_INLINK) {
     		prompt("Input K")
     		special(SPC_MOD)
    -		promptgroup(GUI_CALC)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPL,DBF_INLINK) {
     		prompt("Input L")
     		special(SPC_MOD)
    -		promptgroup(GUI_CALC)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(OUT,DBF_OUTLINK) {
     		prompt("Output Specification")
     		special(SPC_MOD)
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(INAV,DBF_MENU) {
    @@ -222,13 +222,13 @@ recordtype(calcout) {
     	}
     	field(OOPT,DBF_MENU) {
     		prompt("Output Execute Opt")
    -		promptgroup(GUI_CALC)
    +		promptgroup("50 - Output")
     		interest(1)
     		menu(calcoutOOPT)
     	}
     	field(ODLY,DBF_DOUBLE) {
     		prompt("Output Execute Delay")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("50 - Output")
     		asl(ASL0)
     		interest(1)
     	}
    @@ -239,13 +239,13 @@ recordtype(calcout) {
     	}
     	field(DOPT,DBF_MENU) {
     		prompt("Output Data Opt")
    -		promptgroup(GUI_CALC)
    +		promptgroup("30 - Action")
     		interest(1)
     		menu(calcoutDOPT)
     	}
     	field(OCAL,DBF_STRING) {
     		prompt("Output Calculation")
    -		promptgroup(GUI_CALC)
    +		promptgroup("30 - Action")
     		special(SPC_CALC)
     		pp(TRUE)
     		size(80)
    @@ -257,7 +257,7 @@ recordtype(calcout) {
     	}
     	field(OEVT,DBF_STRING) {
     		prompt("Event To Issue")
    -		promptgroup(GUI_CLOCK)
    +		promptgroup("30 - Action")
     		special(SPC_MOD)
     		asl(ASL0)
     		size(40)
    @@ -271,71 +271,71 @@ recordtype(calcout) {
     	}
     	field(IVOA,DBF_MENU) {
     		prompt("INVALID output action")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(2)
     		menu(menuIvoa)
     	}
     	field(IVOV,DBF_DOUBLE) {
     		prompt("INVALID output value")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(2)
     	}
     	field(EGU,DBF_STRING) {
    -		prompt("Units Name")
    -		promptgroup(GUI_DISPLAY)
    +		prompt("Engineering Units")
    +		promptgroup("80 - Display")
     		interest(1)
     		size(16)
     		prop(YES)
     	}
     	field(PREC,DBF_SHORT) {
     		prompt("Display Precision")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(HOPR,DBF_DOUBLE) {
     		prompt("High Operating Rng")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(LOPR,DBF_DOUBLE) {
     		prompt("Low Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(HIHI,DBF_DOUBLE) {
     		prompt("Hihi Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(LOLO,DBF_DOUBLE) {
     		prompt("Lolo Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(HIGH,DBF_DOUBLE) {
     		prompt("High Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(LOW,DBF_DOUBLE) {
     		prompt("Low Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(HHSV,DBF_MENU) {
     		prompt("Hihi Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -343,7 +343,7 @@ recordtype(calcout) {
     	}
     	field(LLSV,DBF_MENU) {
     		prompt("Lolo Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -351,7 +351,7 @@ recordtype(calcout) {
     	}
     	field(HSV,DBF_MENU) {
     		prompt("High Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -359,7 +359,7 @@ recordtype(calcout) {
     	}
     	field(LSV,DBF_MENU) {
     		prompt("Low Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -367,17 +367,17 @@ recordtype(calcout) {
     	}
     	field(HYST,DBF_DOUBLE) {
     		prompt("Alarm Deadband")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		interest(1)
     	}
     	field(ADEL,DBF_DOUBLE) {
     		prompt("Archive Deadband")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(MDEL,DBF_DOUBLE) {
     		prompt("Monitor Deadband")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(A,DBF_DOUBLE) {
    diff --git a/src/std/rec/compressRecord.c b/src/std/rec/compressRecord.c
    index c6bdbd869..4b4de5f15 100644
    --- a/src/std/rec/compressRecord.c
    +++ b/src/std/rec/compressRecord.c
    @@ -7,7 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
     /*
      *      Original Author: Bob Dalesio
      *      Date:            7-14-89 
    @@ -42,15 +41,15 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(compressRecord *, int);
    -static long process(compressRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     static long special(DBADDR *, int);
     #define get_value NULL
     static long cvt_dbaddr(DBADDR *);
     static long get_array_info(DBADDR *, long *, long *);
     static long put_array_info(DBADDR *, long);
     static long get_units(DBADDR *, char *);
    -static long get_precision(DBADDR *, long *);
    +static long get_precision(const DBADDR *, long *);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    @@ -313,8 +312,9 @@ static int compress_scalar(struct compressRecord *prec,double *psource)
     }
     
     /*Beginning of record support routines*/
    -static long init_record(compressRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct compressRecord *prec = (struct compressRecord *)pcommon;
         if (pass == 0) {
             if (prec->nsam < 1)
                 prec->nsam = 1;
    @@ -325,8 +325,9 @@ static long init_record(compressRecord *prec, int pass)
         return 0;
     }
     
    -static long process(compressRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct compressRecord *prec = (struct compressRecord *)pcommon;
         long status = 0;
         long nelements = 0;
         int alg = prec->alg;
    @@ -458,7 +459,7 @@ static long get_units(DBADDR *paddr, char *units)
         return 0;
     }
     
    -static long get_precision(DBADDR *paddr, long *precision)
    +static long get_precision(const DBADDR *paddr, long *precision)
     {
         compressRecord *prec = (compressRecord *) paddr->precord;
     
    diff --git a/src/std/rec/compressRecord.dbd.pod b/src/std/rec/compressRecord.dbd.pod
    index 93d1e63bf..c1cb8cc29 100644
    --- a/src/std/rec/compressRecord.dbd.pod
    +++ b/src/std/rec/compressRecord.dbd.pod
    @@ -79,7 +79,7 @@ recordtype(compress) {
     	}
     	field(INP,DBF_INLINK) {
     		prompt("Input Specification")
    -		promptgroup(GUI_COMPRESS)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(RES,DBF_SHORT) {
    @@ -90,7 +90,7 @@ recordtype(compress) {
     	}
     	field(ALG,DBF_MENU) {
     		prompt("Compression Algorithm")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("30 - Action")
     		special(SPC_RESET)
     		interest(1)
     		menu(compressALG)
    @@ -104,49 +104,49 @@ recordtype(compress) {
     	}
     	field(NSAM,DBF_ULONG) {
     		prompt("Number of Values")
    -		promptgroup(GUI_COMPRESS)
    +		promptgroup("30 - Action")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(N,DBF_ULONG) {
     		prompt("N to 1 Compression")
    -		promptgroup(GUI_COMPRESS)
    +		promptgroup("30 - Action")
     		special(SPC_RESET)
     		interest(1)
     		initial("1")
     	}
     	field(IHIL,DBF_DOUBLE) {
     		prompt("Init High Interest Lim")
    -		promptgroup(GUI_COMPRESS)
    +		promptgroup("30 - Action")
     		interest(1)
     	}
     	field(ILIL,DBF_DOUBLE) {
     		prompt("Init Low Interest Lim")
    -		promptgroup(GUI_COMPRESS)
    +		promptgroup("30 - Action")
     		interest(1)
     	}
     	field(HOPR,DBF_DOUBLE) {
     		prompt("High Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(LOPR,DBF_DOUBLE) {
     		prompt("Low Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(PREC,DBF_SHORT) {
     		prompt("Display Precision")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(EGU,DBF_STRING) {
    -		prompt("EngineeringUnits")
    -		promptgroup(GUI_DISPLAY)
    +		prompt("Engineering Units")
    +		promptgroup("80 - Display")
     		interest(1)
     		size(16)
     		prop(YES)
    diff --git a/src/std/rec/dfanoutRecord.c b/src/std/rec/dfanoutRecord.c
    index d25093d4f..4672fc413 100644
    --- a/src/std/rec/dfanoutRecord.c
    +++ b/src/std/rec/dfanoutRecord.c
    @@ -5,8 +5,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* recDfanout.c - Record Support Routines for Dfanout records */
     /*
      * Original Author: 	Matt Bickley   (Sometime in 1994)
    @@ -47,15 +45,15 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(dfanoutRecord *, int);
    -static long process(dfanoutRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     #define cvt_dbaddr NULL
     #define get_array_info NULL
     #define put_array_info NULL
     static long get_units(DBADDR *, char *);
    -static long get_precision(DBADDR *, long *);
    +static long get_precision(const DBADDR *, long *);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    @@ -93,8 +91,9 @@ static void push_values(dfanoutRecord *);
     #define OUT_ARG_MAX 8
     
     
    -static long init_record(dfanoutRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct dfanoutRecord *prec = (struct dfanoutRecord *)pcommon;
         if (pass==0)
             return 0;
     
    @@ -107,8 +106,9 @@ static long init_record(dfanoutRecord *prec, int pass)
         return 0;
     }
     
    -static long process(dfanoutRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct dfanoutRecord *prec = (struct dfanoutRecord *)pcommon;
         long status=0;
     
         if (!prec->pact &&
    @@ -142,7 +142,7 @@ static long get_units(DBADDR *paddr,char *units)
         return(0);
     }
     
    -static long get_precision(DBADDR *paddr,long *precision)
    +static long get_precision(const DBADDR *paddr,long *precision)
     {
         dfanoutRecord *prec=(dfanoutRecord *)paddr->precord;
     
    diff --git a/src/std/rec/dfanoutRecord.dbd b/src/std/rec/dfanoutRecord.dbd
    index 4e61907c7..c2eb42a75 100644
    --- a/src/std/rec/dfanoutRecord.dbd
    +++ b/src/std/rec/dfanoutRecord.dbd
    @@ -3,145 +3,145 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     menu(dfanoutSELM) {
    -        choice(dfanoutSELM_All,"All")
    -        choice(dfanoutSELM_Specified,"Specified")
    -        choice(dfanoutSELM_Mask,"Mask")
    +	choice(dfanoutSELM_All,"All")
    +	choice(dfanoutSELM_Specified,"Specified")
    +	choice(dfanoutSELM_Mask,"Mask")
     }
     recordtype(dfanout) {
     	include "dbCommon.dbd" 
     	field(VAL,DBF_DOUBLE) {
     		prompt("Desired Output")
    +		promptgroup("40 - Input")
     		asl(ASL0)
     		pp(TRUE)
     	}
    -        field(SELM,DBF_MENU) {
    -                prompt("Select Mechanism")
    -                promptgroup(GUI_LINKS)
    -                interest(1)
    -                menu(dfanoutSELM)
    -        }
    -        field(SELN,DBF_USHORT) {
    -                prompt("Link Selection")
    -                interest(1)
    -                initial("1")
    -        }
    -        field(SELL,DBF_INLINK) {
    -                prompt("Link Selection Loc")
    -                promptgroup(GUI_LINKS)
    -                interest(1)
    -        }
    +	field(SELM,DBF_MENU) {
    +		prompt("Select Mechanism")
    +		promptgroup("30 - Action")
    +		interest(1)
    +		menu(dfanoutSELM)
    +	}
    +	field(SELN,DBF_USHORT) {
    +		prompt("Link Selection")
    +		interest(1)
    +		initial("1")
    +	}
    +	field(SELL,DBF_INLINK) {
    +		prompt("Link Selection Loc")
    +		promptgroup("30 - Action")
    +		interest(1)
    +	}
     	field(OUTA,DBF_OUTLINK) {
     		prompt("Output Spec A")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(OUTB,DBF_OUTLINK) {
     		prompt("Output Spec B")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(OUTC,DBF_OUTLINK) {
     		prompt("Output Spec C")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(OUTD,DBF_OUTLINK) {
     		prompt("Output Spec D")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(OUTE,DBF_OUTLINK) {
     		prompt("Output Spec E")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(OUTF,DBF_OUTLINK) {
     		prompt("Output Spec F")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(OUTG,DBF_OUTLINK) {
     		prompt("Output Spec G")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(OUTH,DBF_OUTLINK) {
     		prompt("Output Spec H")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(DOL,DBF_INLINK) {
     		prompt("Desired Output Loc")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(OMSL,DBF_MENU) {
     		prompt("Output Mode Select")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     		menu(menuOmsl)
     	}
     	field(EGU,DBF_STRING) {
    -		prompt("Units name")
    -		promptgroup(GUI_DISPLAY)
    +		prompt("Engineering Units")
    +		promptgroup("80 - Display")
     		interest(1)
     		size(16)
     		prop(YES)
     	}
    -        field(PREC,DBF_SHORT) {
    -                prompt("Display Precision")
    -                promptgroup(GUI_DISPLAY)
    -                interest(1)
    +	field(PREC,DBF_SHORT) {
    +		prompt("Display Precision")
    +		promptgroup("80 - Display")
    +		interest(1)
     		prop(YES)
    -        }
    +	}
     	field(HOPR,DBF_DOUBLE) {
     		prompt("High Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(LOPR,DBF_DOUBLE) {
     		prompt("Low Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(HIHI,DBF_DOUBLE) {
     		prompt("Hihi Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(LOLO,DBF_DOUBLE) {
     		prompt("Lolo Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(HIGH,DBF_DOUBLE) {
     		prompt("High Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(LOW,DBF_DOUBLE) {
     		prompt("Low Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(HHSV,DBF_MENU) {
     		prompt("Hihi Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -149,7 +149,7 @@ recordtype(dfanout) {
     	}
     	field(LLSV,DBF_MENU) {
     		prompt("Lolo Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -157,7 +157,7 @@ recordtype(dfanout) {
     	}
     	field(HSV,DBF_MENU) {
     		prompt("High Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -165,7 +165,7 @@ recordtype(dfanout) {
     	}
     	field(LSV,DBF_MENU) {
     		prompt("Low Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -173,17 +173,17 @@ recordtype(dfanout) {
     	}
     	field(HYST,DBF_DOUBLE) {
     		prompt("Alarm Deadband")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		interest(1)
     	}
     	field(ADEL,DBF_DOUBLE) {
     		prompt("Archive Deadband")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(MDEL,DBF_DOUBLE) {
     		prompt("Monitor Deadband")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(LALM,DBF_DOUBLE) {
    diff --git a/src/std/rec/eventRecord.c b/src/std/rec/eventRecord.c
    index 35fd32192..5c4a65743 100644
    --- a/src/std/rec/eventRecord.c
    +++ b/src/std/rec/eventRecord.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* recEvent.c - Record Support Routines for Event records */
     /*
      *      Author:          Janet Anderson
    @@ -43,8 +41,8 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(eventRecord *, int);
    -static long process(eventRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     static long special(DBADDR *, int);
     #define get_value NULL
     #define cvt_dbaddr NULL
    @@ -93,8 +91,9 @@ static void monitor(eventRecord *);
     static long readValue(eventRecord *);
     
     
    -static long init_record(eventRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct eventRecord *prec = (struct eventRecord *)pcommon;
         struct eventdset *pdset;
         long status=0;
     
    @@ -110,9 +109,10 @@ static long init_record(eventRecord *prec, int pass)
         return(status);
     }
     
    -static long process(eventRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    -	struct eventdset	*pdset = (struct eventdset *)(prec->dset);
    +    struct eventRecord *prec = (struct eventRecord *)pcommon;
    +    struct eventdset  *pdset = (struct eventdset *)(prec->dset);
     	long		 status=0;
     	unsigned char    pact=prec->pact;
     
    diff --git a/src/std/rec/eventRecord.dbd b/src/std/rec/eventRecord.dbd
    index 842d2b1c0..348902e4b 100644
    --- a/src/std/rec/eventRecord.dbd
    +++ b/src/std/rec/eventRecord.dbd
    @@ -3,15 +3,14 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     recordtype(event) {
     	include "dbCommon.dbd" 
     	field(VAL,DBF_STRING) {
     		prompt("Event Name To Post")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("40 - Input")
     		special(SPC_MOD)
     		asl(ASL0)
     		size(40)
    @@ -25,12 +24,12 @@ recordtype(event) {
     	}
     	field(INP,DBF_INLINK) {
     		prompt("Input Specification")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(SIOL,DBF_INLINK) {
     		prompt("Sim Input Specifctn")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SVAL,DBF_STRING) {
    @@ -39,7 +38,7 @@ recordtype(event) {
     	}
     	field(SIML,DBF_INLINK) {
     		prompt("Sim Mode Location")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIMM,DBF_MENU) {
    @@ -49,7 +48,7 @@ recordtype(event) {
     	}
     	field(SIMS,DBF_MENU) {
     		prompt("Sim mode Alarm Svrty")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(2)
     		menu(menuAlarmSevr)
     	}
    diff --git a/src/std/rec/fanoutRecord.c b/src/std/rec/fanoutRecord.c
    index 7897fbc6f..3ac6b66c6 100644
    --- a/src/std/rec/fanoutRecord.c
    +++ b/src/std/rec/fanoutRecord.c
    @@ -7,7 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
     /*
      *      Original Author: Bob Dalesio
      *      Date:            12-20-88
    @@ -41,8 +40,8 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(fanoutRecord *, int);
    -static long process(fanoutRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     #define cvt_dbaddr NULL
    @@ -79,9 +78,9 @@ rset fanoutRSET = {
     };
     epicsExportAddress(rset,fanoutRSET);
     
    -static long init_record(fanoutRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    -
    +    struct fanoutRecord *prec = (struct fanoutRecord *)pcommon;
         if (pass == 0)
             return 0;
     
    @@ -89,8 +88,9 @@ static long init_record(fanoutRecord *prec, int pass)
         return 0;
     }
     
    -static long process(fanoutRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct fanoutRecord *prec = (struct fanoutRecord *)pcommon;
         struct link *plink;
         epicsUInt16 seln, events;
         int         i;
    diff --git a/src/std/rec/fanoutRecord.dbd b/src/std/rec/fanoutRecord.dbd
    index 8ad9209fc..251d63a11 100644
    --- a/src/std/rec/fanoutRecord.dbd
    +++ b/src/std/rec/fanoutRecord.dbd
    @@ -20,7 +20,7 @@ recordtype(fanout) {
     	}
     	field(SELM,DBF_MENU) {
     		prompt("Select Mechanism")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("30 - Action")
     		interest(1)
     		menu(fanoutSELM)
     	}
    @@ -31,97 +31,99 @@ recordtype(fanout) {
     	}
     	field(SELL,DBF_INLINK) {
     		prompt("Link Selection Loc")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("30 - Action")
     		interest(1)
     	}
     	field(OFFS,DBF_SHORT) {
     		prompt("Offset for Specified")
    -		interest(1)
    +                promptgroup("30 - Action")
    +                interest(1)
     		initial("0")
     	}
     	field(SHFT,DBF_SHORT) {
     		prompt("Shift for Mask mode")
    -		interest(1)
    +                promptgroup("30 - Action")
    +                interest(1)
     		initial("-1")
     	}
     	field(LNK0,DBF_FWDLINK) {
     		prompt("Forward Link 0")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("51 - Output 0-7")
     		interest(1)
     	}
     	field(LNK1,DBF_FWDLINK) {
     		prompt("Forward Link 1")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("51 - Output 0-7")
     		interest(1)
     	}
     	field(LNK2,DBF_FWDLINK) {
     		prompt("Forward Link 2")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("51 - Output 0-7")
     		interest(1)
     	}
     	field(LNK3,DBF_FWDLINK) {
     		prompt("Forward Link 3")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("51 - Output 0-7")
     		interest(1)
     	}
     	field(LNK4,DBF_FWDLINK) {
     		prompt("Forward Link 4")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("51 - Output 0-7")
     		interest(1)
     	}
     	field(LNK5,DBF_FWDLINK) {
     		prompt("Forward Link 5")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("51 - Output 0-7")
     		interest(1)
     	}
     	field(LNK6,DBF_FWDLINK) {
     		prompt("Forward Link 6")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("51 - Output 0-7")
     		interest(1)
     	}
     	field(LNK7,DBF_FWDLINK) {
     		prompt("Forward Link 7")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("51 - Output 0-7")
     		interest(1)
     	}
     	field(LNK8,DBF_FWDLINK) {
     		prompt("Forward Link 8")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("52 - Output 8-F")
     		interest(1)
     	}
     	field(LNK9,DBF_FWDLINK) {
     		prompt("Forward Link 9")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("52 - Output 8-F")
     		interest(1)
     	}
     	field(LNKA,DBF_FWDLINK) {
     		prompt("Forward Link 10")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("52 - Output 8-F")
     		interest(1)
     	}
     	field(LNKB,DBF_FWDLINK) {
     		prompt("Forward Link 11")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("52 - Output 8-F")
     		interest(1)
     	}
     	field(LNKC,DBF_FWDLINK) {
     		prompt("Forward Link 12")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("52 - Output 8-F")
     		interest(1)
     	}
     	field(LNKD,DBF_FWDLINK) {
     		prompt("Forward Link 13")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("52 - Output 8-F")
     		interest(1)
     	}
     	field(LNKE,DBF_FWDLINK) {
     		prompt("Forward Link 14")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("52 - Output 8-F")
     		interest(1)
     	}
     	field(LNKF,DBF_FWDLINK) {
     		prompt("Forward Link 15")
    -		promptgroup(GUI_LINKS)
    +		promptgroup("52 - Output 8-F")
     		interest(1)
     	}
     }
    diff --git a/src/std/rec/histogramRecord.c b/src/std/rec/histogramRecord.c
    index 643c4fa68..a9563500f 100644
    --- a/src/std/rec/histogramRecord.c
    +++ b/src/std/rec/histogramRecord.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* histogramRecord.c - Record Support Routines for Histogram records */
     /*
      *      Author:      Janet Anderson
    @@ -48,15 +46,15 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(histogramRecord *, int);
    -static long process(histogramRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     static long special(DBADDR *, int);
     #define get_value NULL
     static long cvt_dbaddr(DBADDR *);
     static long get_array_info(DBADDR *, long *, long *);
     #define  put_array_info NULL
     static long get_units(DBADDR *, char *);
    -static long get_precision(DBADDR *paddr,long *precision);
    +static long get_precision(const DBADDR *paddr,long *precision);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    @@ -164,8 +162,9 @@ static long wdogInit(histogramRecord *prec)
         return 0;
     }
     
    -static long init_record(histogramRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct histogramRecord *prec = (struct histogramRecord *)pcommon;
         struct histogramdset *pdset;
     
         if (pass == 0) {
    @@ -209,9 +208,10 @@ static long init_record(histogramRecord *prec, int pass)
         return 0;
     }
     
    -static long process(histogramRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    -    struct histogramdset *pdset = (struct histogramdset *) prec->dset;
    +    struct histogramRecord *prec = (struct histogramRecord *)pcommon;
    +    struct histogramdset  *pdset = (struct histogramdset *) prec->dset;
         int pact = prec->pact;
         long status;
     
    @@ -412,7 +412,7 @@ static long get_units(DBADDR *paddr, char *units)
         return 0;
     }
     
    -static long get_precision(DBADDR *paddr,long *precision)
    +static long get_precision(const DBADDR *paddr,long *precision)
     {
         histogramRecord *prec = (histogramRecord *) paddr->precord;
     
    diff --git a/src/std/rec/histogramRecord.dbd b/src/std/rec/histogramRecord.dbd
    index 08fc12d4f..075400fc6 100644
    --- a/src/std/rec/histogramRecord.dbd
    +++ b/src/std/rec/histogramRecord.dbd
    @@ -3,9 +3,8 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     menu(histogramCMD) {
     	choice(histogramCMD_Read,"Read")
    @@ -26,7 +25,7 @@ recordtype(histogram) {
     	}
     	field(NELM,DBF_USHORT) {
     		prompt("Num of Array Elements")
    -		promptgroup(GUI_HIST)
    +		promptgroup("30 - Action")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
    @@ -46,14 +45,14 @@ recordtype(histogram) {
     	}
     	field(ULIM,DBF_DOUBLE) {
     		prompt("Upper Signal Limit")
    -		promptgroup(GUI_HIST)
    +		promptgroup("30 - Action")
     		special(SPC_RESET)
     		interest(1)
     		prop(YES)
     	}
     	field(LLIM,DBF_DOUBLE) {
     		prompt("Lower Signal Limit ")
    -		promptgroup(GUI_HIST)
    +		promptgroup("30 - Action")
     		special(SPC_RESET)
     		interest(1)
     		prop(YES)
    @@ -69,13 +68,13 @@ recordtype(histogram) {
     	}
     	field(PREC,DBF_SHORT) {
     		prompt("Display Precision")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(SVL,DBF_INLINK) {
     		prompt("Signal Value Location")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(BPTR,DBF_NOACCESS) {
    @@ -92,7 +91,7 @@ recordtype(histogram) {
     	}
     	field(MDEL,DBF_SHORT) {
     		prompt("Monitor Count Deadband")
    -		promptgroup(GUI_HIST)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(MCNT,DBF_SHORT) {
    @@ -102,13 +101,13 @@ recordtype(histogram) {
     	}
     	field(SDEL,DBF_DOUBLE) {
     		prompt("Monitor Seconds Dband")
    -		promptgroup(GUI_HIST)
    +		promptgroup("80 - Display")
     		special(SPC_RESET)
     		interest(1)
     	}
     	field(SIOL,DBF_INLINK) {
     		prompt("Sim Input Specifctn")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SVAL,DBF_DOUBLE) {
    @@ -116,7 +115,7 @@ recordtype(histogram) {
     	}
     	field(SIML,DBF_INLINK) {
     		prompt("Sim Mode Location")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIMM,DBF_MENU) {
    @@ -126,19 +125,19 @@ recordtype(histogram) {
     	}
     	field(SIMS,DBF_MENU) {
     		prompt("Sim mode Alarm Svrty")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(2)
     		menu(menuAlarmSevr)
     	}
     	field(HOPR,DBF_ULONG) {
     		prompt("High Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(LOPR,DBF_ULONG) {
     		prompt("Low Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
    diff --git a/src/std/rec/longinRecord.c b/src/std/rec/longinRecord.c
    index 91d7e2193..bd3c24ab9 100644
    --- a/src/std/rec/longinRecord.c
    +++ b/src/std/rec/longinRecord.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* recLongin.c - Record Support Routines for Longin records */
     /*
      *      Author: 	Janet Anderson
    @@ -44,8 +42,8 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(longinRecord *, int);
    -static long process(longinRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     #define cvt_dbaddr NULL
    @@ -96,8 +94,9 @@ static void monitor(longinRecord *prec);
     static long readValue(longinRecord *prec);
     
     
    -static long init_record(longinRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct longinRecord *prec = (struct longinRecord *)pcommon;
         struct longindset *pdset = (struct longindset *) prec->dset;
     
         if (pass==0)
    @@ -130,9 +129,10 @@ static long init_record(longinRecord *prec, int pass)
         return 0;
     }
     
    -static long process(longinRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    -	struct longindset	*pdset = (struct longindset *)(prec->dset);
    +    struct longinRecord *prec = (struct longinRecord *)pcommon;
    +    struct longindset  *pdset = (struct longindset *)(prec->dset);
     	long		 status;
     	unsigned char    pact=prec->pact;
     	epicsTimeStamp   timeLast;
    diff --git a/src/std/rec/longinRecord.dbd b/src/std/rec/longinRecord.dbd
    index 5c038f9db..60eee5000 100644
    --- a/src/std/rec/longinRecord.dbd
    +++ b/src/std/rec/longinRecord.dbd
    @@ -3,121 +3,120 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     recordtype(longin) {
     	include "dbCommon.dbd" 
     	field(VAL,DBF_LONG) {
     		prompt("Current value")
    -                promptgroup(GUI_INPUTS)
    +		promptgroup("40 - Input")
     		asl(ASL0)
     		pp(TRUE)
     	}
     	field(INP,DBF_INLINK) {
     		prompt("Input Specification")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(EGU,DBF_STRING) {
    -		prompt("Units name")
    -		promptgroup(GUI_DISPLAY)
    +		prompt("Engineering Units")
    +		promptgroup("80 - Display")
     		interest(1)
     		size(16)
     		prop(YES)
     	}
     	field(HOPR,DBF_LONG) {
     		prompt("High Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(LOPR,DBF_LONG) {
     		prompt("Low Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(HIHI,DBF_LONG) {
     		prompt("Hihi Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(LOLO,DBF_LONG) {
     		prompt("Lolo Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(HIGH,DBF_LONG) {
     		prompt("High Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(LOW,DBF_LONG) {
     		prompt("Low Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(HHSV,DBF_MENU) {
     		prompt("Hihi Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(LLSV,DBF_MENU) {
     		prompt("Lolo Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(HSV,DBF_MENU) {
     		prompt("High Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(LSV,DBF_MENU) {
     		prompt("Low Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(HYST,DBF_LONG) {
     		prompt("Alarm Deadband")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		interest(1)
     	}
             field(AFTC, DBF_DOUBLE) {
    -                prompt("Alarm Filter Time Constant")
    -                promptgroup(GUI_ALARMS)
    -                interest(1)
    +		prompt("Alarm Filter Time Constant")
    +		promptgroup("70 - Alarm")
    +		interest(1)
             }
             field(AFVL, DBF_DOUBLE) {
    -                prompt("Alarm Filter Value")
    -                special(SPC_NOMOD)
    -                interest(3)
    +		prompt("Alarm Filter Value")
    +		special(SPC_NOMOD)
    +		interest(3)
             }
     	field(ADEL,DBF_LONG) {
     		prompt("Archive Deadband")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(MDEL,DBF_LONG) {
     		prompt("Monitor Deadband")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(LALM,DBF_LONG) {
    @@ -137,7 +136,7 @@ recordtype(longin) {
     	}
     	field(SIOL,DBF_INLINK) {
     		prompt("Sim Input Specifctn")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SVAL,DBF_LONG) {
    @@ -145,7 +144,7 @@ recordtype(longin) {
     	}
     	field(SIML,DBF_INLINK) {
     		prompt("Sim Mode Location")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIMM,DBF_MENU) {
    @@ -155,7 +154,7 @@ recordtype(longin) {
     	}
     	field(SIMS,DBF_MENU) {
     		prompt("Sim mode Alarm Svrty")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(2)
     		menu(menuAlarmSevr)
     	}
    diff --git a/src/std/rec/longoutRecord.c b/src/std/rec/longoutRecord.c
    index 5d35df634..6062ad741 100644
    --- a/src/std/rec/longoutRecord.c
    +++ b/src/std/rec/longoutRecord.c
    @@ -7,7 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
     /*
      * Author: 	Janet Anderson
      * Date:	9/23/91
    @@ -40,8 +39,8 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(longoutRecord *, int);
    -static long process(longoutRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     #define cvt_dbaddr NULL
    @@ -92,9 +91,9 @@ static void monitor(longoutRecord *prec);
     static long writeValue(longoutRecord *prec);
     static void convert(longoutRecord *prec, epicsInt32 value);
     
    -
    -static long init_record(longoutRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct longoutRecord *prec = (struct longoutRecord *)pcommon;
         struct longoutdset *pdset = (struct longoutdset *) prec->dset;
     
         if (pass==0)
    @@ -129,9 +128,10 @@ static long init_record(longoutRecord *prec, int pass)
         return 0;
     }
     
    -static long process(longoutRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    -	struct longoutdset	*pdset = (struct longoutdset *)(prec->dset);
    +    struct longoutRecord *prec = (struct longoutRecord *)pcommon;
    +    struct longoutdset  *pdset = (struct longoutdset *)(prec->dset);
     	long		 status=0;
     	epicsInt32	 value;
     	unsigned char    pact=prec->pact;
    diff --git a/src/std/rec/longoutRecord.dbd b/src/std/rec/longoutRecord.dbd
    index 5124aafe8..c3ba0b977 100644
    --- a/src/std/rec/longoutRecord.dbd
    +++ b/src/std/rec/longoutRecord.dbd
    @@ -3,136 +3,135 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     recordtype(longout) {
     	include "dbCommon.dbd" 
     	field(VAL,DBF_LONG) {
     		prompt("Desired Output")
    -                promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		asl(ASL0)
     		pp(TRUE)
     	}
     	field(OUT,DBF_OUTLINK) {
     		prompt("Output Specification")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(DOL,DBF_INLINK) {
     		prompt("Desired Output Loc")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(OMSL,DBF_MENU) {
     		prompt("Output Mode Select")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     		menu(menuOmsl)
     	}
     	field(EGU,DBF_STRING) {
    -		prompt("Units name")
    -		promptgroup(GUI_DISPLAY)
    +		prompt("Engineering Units")
    +		promptgroup("80 - Display")
     		interest(1)
     		size(16)
     		prop(YES)
     	}
     	field(DRVH,DBF_LONG) {
     		prompt("Drive High Limit")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("30 - Action")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(DRVL,DBF_LONG) {
     		prompt("Drive Low Limit")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("30 - Action")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(HOPR,DBF_LONG) {
     		prompt("High Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(LOPR,DBF_LONG) {
     		prompt("Low Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(HIHI,DBF_LONG) {
     		prompt("Hihi Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(LOLO,DBF_LONG) {
     		prompt("Lolo Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(HIGH,DBF_LONG) {
     		prompt("High Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(LOW,DBF_LONG) {
     		prompt("Low Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(HHSV,DBF_MENU) {
     		prompt("Hihi Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(LLSV,DBF_MENU) {
     		prompt("Lolo Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(HSV,DBF_MENU) {
     		prompt("High Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(LSV,DBF_MENU) {
     		prompt("Low Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(HYST,DBF_LONG) {
     		prompt("Alarm Deadband")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		interest(1)
     	}
     	field(ADEL,DBF_LONG) {
     		prompt("Archive Deadband")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(MDEL,DBF_LONG) {
     		prompt("Monitor Deadband")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(LALM,DBF_LONG) {
    @@ -152,12 +151,12 @@ recordtype(longout) {
     	}
     	field(SIOL,DBF_OUTLINK) {
     		prompt("Sim Output Specifctn")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIML,DBF_INLINK) {
     		prompt("Sim Mode Location")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIMM,DBF_MENU) {
    @@ -167,19 +166,19 @@ recordtype(longout) {
     	}
     	field(SIMS,DBF_MENU) {
     		prompt("Sim mode Alarm Svrty")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(2)
     		menu(menuAlarmSevr)
     	}
     	field(IVOA,DBF_MENU) {
     		prompt("INVALID output action")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(2)
     		menu(menuIvoa)
     	}
     	field(IVOV,DBF_LONG) {
     		prompt("INVALID output value")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(2)
     	}
     }
    diff --git a/src/std/rec/lsiRecord.c b/src/std/rec/lsiRecord.c
    index 1cbff9185..81b6785ab 100644
    --- a/src/std/rec/lsiRecord.c
    +++ b/src/std/rec/lsiRecord.c
    @@ -36,8 +36,9 @@
     static void monitor(lsiRecord *);
     static long readValue(lsiRecord *);
     
    -static long init_record(lsiRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct lsiRecord *prec = (struct lsiRecord *)pcommon;
         lsidset *pdset;
     
         if (pass == 0) {
    @@ -85,8 +86,9 @@ static long init_record(lsiRecord *prec, int pass)
         return 0;
     }
     
    -static long process(lsiRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct lsiRecord *prec = (struct lsiRecord *)pcommon;
         int pact = prec->pact;
         lsidset *pdset = (lsidset *) prec->dset;
         long status = 0;
    @@ -158,9 +160,10 @@ static long put_array_info(DBADDR *paddr, long nNew)
     {
         lsiRecord *prec = (lsiRecord *) paddr->precord;
     
    -    if (nNew == prec->sizv)
    -        --nNew;             /* truncated string */
    -    prec->val[nNew] = 0;    /* ensure data is terminated */
    +    if (nNew >= prec->sizv)
    +        nNew = prec->sizv - 1; /* truncated string */
    +    if (paddr->field_type == DBF_CHAR)
    +        prec->val[nNew] = 0;   /* ensure data is terminated */
     
         return 0;
     }
    diff --git a/src/std/rec/lsiRecord.dbd b/src/std/rec/lsiRecord.dbd
    index be14cf552..c50d905d8 100644
    --- a/src/std/rec/lsiRecord.dbd
    +++ b/src/std/rec/lsiRecord.dbd
    @@ -34,7 +34,7 @@ recordtype(lsi) {
         }
         field(SIZV,DBF_USHORT) {
             prompt("Size of buffers")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("40 - Input")
             special(SPC_NOMOD)
             interest(1)
             initial("41")
    @@ -49,24 +49,24 @@ recordtype(lsi) {
         }
         field(INP,DBF_INLINK) {
             prompt("Input Specification")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(MPST,DBF_MENU) {
             prompt("Post Value Monitors")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
             menu(menuPost)
         }
         field(APST,DBF_MENU) {
             prompt("Post Archive Monitors")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
             menu(menuPost)
         }
         field(SIML,DBF_INLINK) {
             prompt("Simulation Mode Link")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("90 - Simulate")
             interest(2)
         }
         field(SIMM,DBF_MENU) {
    @@ -76,13 +76,13 @@ recordtype(lsi) {
         }
         field(SIMS,DBF_MENU) {
             prompt("Simulation Mode Severity")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("90 - Simulate")
             interest(2)
             menu(menuAlarmSevr)
         }
         field(SIOL,DBF_INLINK) {
             prompt("Sim Input Specifctn")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("90 - Simulate")
             interest(2)
         }
     }
    diff --git a/src/std/rec/lsoRecord.c b/src/std/rec/lsoRecord.c
    index 271a0c3f9..625f5d77c 100644
    --- a/src/std/rec/lsoRecord.c
    +++ b/src/std/rec/lsoRecord.c
    @@ -40,8 +40,9 @@
     static void monitor(lsoRecord *);
     static long writeValue(lsoRecord *);
     
    -static long init_record(lsoRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct lsoRecord *prec = (struct lsoRecord *)pcommon;
         lsodset *pdset;
     
         if (pass == 0) {
    @@ -91,8 +92,9 @@ static long init_record(lsoRecord *prec, int pass)
         return 0;
     }
     
    -static long process(lsoRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct lsoRecord *prec = (struct lsoRecord *)pcommon;
         int pact = prec->pact;
         lsodset *pdset = (lsodset *) prec->dset;
         long status = 0;
    @@ -200,9 +202,10 @@ static long put_array_info(DBADDR *paddr, long nNew)
     {
         lsoRecord *prec = (lsoRecord *) paddr->precord;
     
    -    if (nNew == prec->sizv)
    -        --nNew;             /* truncated string */
    -    prec->val[nNew] = 0;    /* ensure data is terminated */
    +    if (nNew >= prec->sizv)
    +        nNew = prec->sizv - 1; /* truncated string */
    +    if (paddr->field_type == DBF_CHAR)
    +        prec->val[nNew] = 0;   /* ensure data is terminated */
     
         return 0;
     }
    diff --git a/src/std/rec/lsoRecord.dbd b/src/std/rec/lsoRecord.dbd
    index 48ddea810..69203f2d0 100644
    --- a/src/std/rec/lsoRecord.dbd
    +++ b/src/std/rec/lsoRecord.dbd
    @@ -34,7 +34,7 @@ recordtype(lso) {
         }
         field(SIZV,DBF_USHORT) {
             prompt("Size of buffers")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("50 - Output")
             special(SPC_NOMOD)
             interest(1)
             initial("41")
    @@ -50,47 +50,47 @@ recordtype(lso) {
         }
         field(DOL,DBF_INLINK) {
             prompt("Desired Output Link")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(IVOA,DBF_MENU) {
             prompt("INVALID Output Action")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("50 - Output")
             interest(2)
             menu(menuIvoa)
         }
         field(IVOV,DBF_STRING) {
             prompt("INVALID Output Value")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("50 - Output")
             interest(2)
             size(40)
         }
         field(OMSL,DBF_MENU) {
             prompt("Output Mode Select")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("50 - Output")
             interest(1)
             menu(menuOmsl)
         }
         field(OUT,DBF_OUTLINK) {
             prompt("Output Specification")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("50 - Output")
             interest(1)
         }
         field(MPST,DBF_MENU) {
             prompt("Post Value Monitors")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
             menu(menuPost)
         }
         field(APST,DBF_MENU) {
             prompt("Post Archive Monitors")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
             menu(menuPost)
         }
         field(SIML,DBF_INLINK) {
             prompt("Sim Mode link")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("90 - Simulate")
             interest(1)
         }
         field(SIMM,DBF_MENU) {
    @@ -100,13 +100,13 @@ recordtype(lso) {
         }
         field(SIMS,DBF_MENU) {
             prompt("Sim mode Alarm Svrty")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("90 - Simulate")
             interest(2)
             menu(menuAlarmSevr)
         }
         field(SIOL,DBF_OUTLINK) {
             prompt("Sim Output Specifctn")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("90 - Simulate")
             interest(1)
         }
     }
    diff --git a/src/std/rec/mbbiDirectRecord.c b/src/std/rec/mbbiDirectRecord.c
    index cc1170b7e..112272925 100644
    --- a/src/std/rec/mbbiDirectRecord.c
    +++ b/src/std/rec/mbbiDirectRecord.c
    @@ -9,8 +9,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* mbbiDirectRecord.c - Record Support routines for mbboDirect records */
     /*
      *      Original Authors: Bob Dalesio and Matthew Needes
    @@ -44,8 +42,8 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(mbbiDirectRecord *, int);
    -static long process(mbbiDirectRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     #define cvt_dbaddr NULL
    @@ -96,8 +94,9 @@ static long readValue(mbbiDirectRecord *);
     
     #define NUM_BITS 16
     
    -static long init_record(mbbiDirectRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct mbbiDirectRecord *prec = (struct mbbiDirectRecord *)pcommon;
         struct mbbidset *pdset = (struct mbbidset *) prec->dset;
         long status = 0;
     
    @@ -139,8 +138,9 @@ static long init_record(mbbiDirectRecord *prec, int pass)
         return status;
     }
     
    -static long process(mbbiDirectRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct mbbiDirectRecord *prec = (struct mbbiDirectRecord *)pcommon;
         struct mbbidset *pdset = (struct mbbidset *) prec->dset;
         long status;
         int pact = prec->pact;
    diff --git a/src/std/rec/mbbiDirectRecord.dbd b/src/std/rec/mbbiDirectRecord.dbd
    index a72c24070..3fa3d8823 100644
    --- a/src/std/rec/mbbiDirectRecord.dbd
    +++ b/src/std/rec/mbbiDirectRecord.dbd
    @@ -10,19 +10,19 @@ recordtype(mbbiDirect) {
         include "dbCommon.dbd" 
         field(VAL,DBF_USHORT) {
             prompt("Current Value")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("40 - Input")
             asl(ASL0)
             pp(TRUE)
         }
         field(NOBT,DBF_SHORT) {
             prompt("Number of Bits")
    -        promptgroup(GUI_MBB)
    +        promptgroup("40 - Input")
             special(SPC_NOMOD)
             interest(1)
         }
         field(INP,DBF_INLINK) {
             prompt("Input Specification")
    -        promptgroup(GUI_MBB)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(RVAL,DBF_ULONG) {
    @@ -46,12 +46,12 @@ recordtype(mbbiDirect) {
         }
         field(SHFT,DBF_USHORT) {
             prompt("Shift")
    -        promptgroup(GUI_MBB)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(SIOL,DBF_INLINK) {
             prompt("Sim Input Specifctn")
    -        promptgroup(GUI_MBB)
    +        promptgroup("90 - Simulate")
             interest(1)
         }
         field(SVAL,DBF_ULONG) {
    @@ -59,7 +59,7 @@ recordtype(mbbiDirect) {
         }
         field(SIML,DBF_INLINK) {
             prompt("Sim Mode Location")
    -        promptgroup(GUI_MBB)
    +        promptgroup("90 - Simulate")
             interest(1)
         }
         field(SIMM,DBF_MENU) {
    @@ -69,7 +69,7 @@ recordtype(mbbiDirect) {
         }
         field(SIMS,DBF_MENU) {
             prompt("Sim mode Alarm Svrty")
    -        promptgroup(GUI_MBB)
    +        promptgroup("90 - Simulate")
             interest(2)
             menu(menuAlarmSevr)
         }
    diff --git a/src/std/rec/mbbiRecord.c b/src/std/rec/mbbiRecord.c
    index bd344f307..ad5a8ce06 100644
    --- a/src/std/rec/mbbiRecord.c
    +++ b/src/std/rec/mbbiRecord.c
    @@ -8,7 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
     /*
      *      Original Author: Bob Dalesio
      *      Date:            5-9-88
    @@ -45,8 +44,8 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(mbbiRecord *, int);
    -static long process(mbbiRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     static long  special(DBADDR *, int);
     #define get_value NULL
     #define cvt_dbaddr NULL
    @@ -54,9 +53,9 @@ static long  special(DBADDR *, int);
     #define put_array_info NULL
     #define get_units NULL
     #define get_precision NULL
    -static long get_enum_str(DBADDR *, char *);
    -static long get_enum_strs(DBADDR *, struct dbr_enumStrs *);
    -static long put_enum_str(DBADDR *, char *);
    +static long get_enum_str(const DBADDR *, char *);
    +static long get_enum_strs(const DBADDR *, struct dbr_enumStrs *);
    +static long put_enum_str(const DBADDR *, const char *);
     #define get_graphic_double NULL
     #define get_control_double NULL
     #define get_alarm_double NULL
    @@ -112,9 +111,10 @@ static void init_common(mbbiRecord *prec)
         prec->sdef = FALSE;
     }
     
    -static long init_record(mbbiRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    -    struct mbbidset *pdset = (struct mbbidset *) prec->dset;
    +    struct mbbiRecord *prec = (struct mbbiRecord *)pcommon;
    +    struct mbbidset  *pdset = (struct mbbidset *) prec->dset;
         long status = 0;
     
         if (pass == 0)
    @@ -149,9 +149,10 @@ static long init_record(mbbiRecord *prec, int pass)
         return status;
     }
     
    -static long process(mbbiRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    -    struct mbbidset *pdset = (struct mbbidset *) prec->dset;
    +    struct mbbiRecord *prec = (struct mbbiRecord *)pcommon;
    +    struct mbbidset  *pdset = (struct mbbidset *) prec->dset;
         long status;
         int pact = prec->pact;
         epicsTimeStamp timeLast;
    @@ -234,7 +235,7 @@ static long special(DBADDR *paddr, int after)
         }
     }
     
    -static long get_enum_str(DBADDR *paddr, char *pstring)
    +static long get_enum_str(const DBADDR *paddr, char *pstring)
     {
         mbbiRecord *prec = (mbbiRecord *) paddr->precord;
         int index;
    @@ -256,7 +257,7 @@ static long get_enum_str(DBADDR *paddr, char *pstring)
         return 0;
     }
     
    -static long get_enum_strs(DBADDR *paddr, struct dbr_enumStrs *pes)
    +static long get_enum_strs(const DBADDR *paddr, struct dbr_enumStrs *pes)
     {
         mbbiRecord *prec = (mbbiRecord *) paddr->precord;
         char *pstate = prec->zrst;
    @@ -272,7 +273,7 @@ static long get_enum_strs(DBADDR *paddr, struct dbr_enumStrs *pes)
         return 0;
     }
     
    -static long put_enum_str(DBADDR *paddr, char *pstring)
    +static long put_enum_str(const DBADDR *paddr, const char *pstring)
     {
         mbbiRecord *prec = (mbbiRecord *) paddr->precord;
         char *pstate;
    diff --git a/src/std/rec/mbbiRecord.dbd b/src/std/rec/mbbiRecord.dbd
    index ffc37cfaf..1f5724c92 100644
    --- a/src/std/rec/mbbiRecord.dbd
    +++ b/src/std/rec/mbbiRecord.dbd
    @@ -10,24 +10,24 @@ recordtype(mbbi) {
     	include "dbCommon.dbd" 
     	field(VAL,DBF_ENUM) {
     		prompt("Current Value")
    -                promptgroup(GUI_INPUTS)
    +		promptgroup("40 - Input")
     		asl(ASL0)
     		pp(TRUE)
     	}
     	field(NOBT,DBF_USHORT) {
     		prompt("Number of Bits")
    -		promptgroup(GUI_MBB)
    +		promptgroup("40 - Input")
     		special(SPC_NOMOD)
     		interest(1)
     	}
     	field(INP,DBF_INLINK) {
     		prompt("Input Specification")
    -		promptgroup(GUI_MBB)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(ZRVL,DBF_ULONG) {
     		prompt("Zero Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("41 - Input 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -35,7 +35,7 @@ recordtype(mbbi) {
     	}
     	field(ONVL,DBF_ULONG) {
     		prompt("One Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("41 - Input 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -43,7 +43,7 @@ recordtype(mbbi) {
     	}
     	field(TWVL,DBF_ULONG) {
     		prompt("Two Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("41 - Input 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -51,7 +51,7 @@ recordtype(mbbi) {
     	}
     	field(THVL,DBF_ULONG) {
     		prompt("Three Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("41 - Input 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -59,7 +59,7 @@ recordtype(mbbi) {
     	}
     	field(FRVL,DBF_ULONG) {
     		prompt("Four Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("41 - Input 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -67,7 +67,7 @@ recordtype(mbbi) {
     	}
     	field(FVVL,DBF_ULONG) {
     		prompt("Five Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("41 - Input 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -75,7 +75,7 @@ recordtype(mbbi) {
     	}
     	field(SXVL,DBF_ULONG) {
     		prompt("Six Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("41 - Input 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -83,7 +83,7 @@ recordtype(mbbi) {
     	}
     	field(SVVL,DBF_ULONG) {
     		prompt("Seven Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("41 - Input 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -91,7 +91,7 @@ recordtype(mbbi) {
     	}
     	field(EIVL,DBF_ULONG) {
     		prompt("Eight Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("42 - Input 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -99,7 +99,7 @@ recordtype(mbbi) {
     	}
     	field(NIVL,DBF_ULONG) {
     		prompt("Nine Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("42 - Input 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -107,7 +107,7 @@ recordtype(mbbi) {
     	}
     	field(TEVL,DBF_ULONG) {
     		prompt("Ten Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("42 - Input 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -115,7 +115,7 @@ recordtype(mbbi) {
     	}
     	field(ELVL,DBF_ULONG) {
     		prompt("Eleven Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("42 - Input 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -123,7 +123,7 @@ recordtype(mbbi) {
     	}
     	field(TVVL,DBF_ULONG) {
     		prompt("Twelve Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("42 - Input 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -131,7 +131,7 @@ recordtype(mbbi) {
     	}
     	field(TTVL,DBF_ULONG) {
     		prompt("Thirteen Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("42 - Input 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -139,7 +139,7 @@ recordtype(mbbi) {
     	}
     	field(FTVL,DBF_ULONG) {
     		prompt("Fourteen Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("42 - Input 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -147,7 +147,7 @@ recordtype(mbbi) {
     	}
     	field(FFVL,DBF_ULONG) {
     		prompt("Fifteen Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("42 - Input 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -155,7 +155,7 @@ recordtype(mbbi) {
     	}
     	field(ZRST,DBF_STRING) {
     		prompt("Zero String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -163,7 +163,7 @@ recordtype(mbbi) {
     	}
     	field(ONST,DBF_STRING) {
     		prompt("One String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -171,7 +171,7 @@ recordtype(mbbi) {
     	}
     	field(TWST,DBF_STRING) {
     		prompt("Two String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -179,7 +179,7 @@ recordtype(mbbi) {
     	}
     	field(THST,DBF_STRING) {
     		prompt("Three String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -187,7 +187,7 @@ recordtype(mbbi) {
     	}
     	field(FRST,DBF_STRING) {
     		prompt("Four String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -195,7 +195,7 @@ recordtype(mbbi) {
     	}
     	field(FVST,DBF_STRING) {
     		prompt("Five String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -203,7 +203,7 @@ recordtype(mbbi) {
     	}
     	field(SXST,DBF_STRING) {
     		prompt("Six String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -211,7 +211,7 @@ recordtype(mbbi) {
     	}
     	field(SVST,DBF_STRING) {
     		prompt("Seven String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -219,7 +219,7 @@ recordtype(mbbi) {
     	}
     	field(EIST,DBF_STRING) {
     		prompt("Eight String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -227,7 +227,7 @@ recordtype(mbbi) {
     	}
     	field(NIST,DBF_STRING) {
     		prompt("Nine String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -235,7 +235,7 @@ recordtype(mbbi) {
     	}
     	field(TEST,DBF_STRING) {
     		prompt("Ten String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -243,7 +243,7 @@ recordtype(mbbi) {
     	}
     	field(ELST,DBF_STRING) {
     		prompt("Eleven String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -251,7 +251,7 @@ recordtype(mbbi) {
     	}
     	field(TVST,DBF_STRING) {
     		prompt("Twelve String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -259,7 +259,7 @@ recordtype(mbbi) {
     	}
     	field(TTST,DBF_STRING) {
     		prompt("Thirteen String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -267,7 +267,7 @@ recordtype(mbbi) {
     	}
     	field(FTST,DBF_STRING) {
     		prompt("Fourteen String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -275,7 +275,7 @@ recordtype(mbbi) {
     	}
     	field(FFST,DBF_STRING) {
     		prompt("Fifteen String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -283,136 +283,136 @@ recordtype(mbbi) {
     	}
     	field(ZRSV,DBF_MENU) {
     		prompt("State Zero Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(ONSV,DBF_MENU) {
     		prompt("State One Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(TWSV,DBF_MENU) {
     		prompt("State Two Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(THSV,DBF_MENU) {
     		prompt("State Three Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(FRSV,DBF_MENU) {
     		prompt("State Four Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(FVSV,DBF_MENU) {
     		prompt("State Five Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(SXSV,DBF_MENU) {
     		prompt("State Six Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(SVSV,DBF_MENU) {
     		prompt("State Seven Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(EISV,DBF_MENU) {
     		prompt("State Eight Severity")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(NISV,DBF_MENU) {
     		prompt("State Nine Severity")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(TESV,DBF_MENU) {
     		prompt("State Ten Severity")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(ELSV,DBF_MENU) {
     		prompt("State Eleven Severity")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(TVSV,DBF_MENU) {
     		prompt("State Twelve Severity")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(TTSV,DBF_MENU) {
     		prompt("State Thirteen Sevr")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(FTSV,DBF_MENU) {
     		prompt("State Fourteen Sevr")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(FFSV,DBF_MENU) {
     		prompt("State Fifteen Severity")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
    -        field(AFTC, DBF_DOUBLE) {
    -                prompt("Alarm Filter Time Constant")
    -                promptgroup(GUI_ALARMS)
    -                interest(1)
    -        }
    -        field(AFVL, DBF_DOUBLE) {
    -                prompt("Alarm Filter Value")
    -                special(SPC_NOMOD)
    -                interest(3)
    -        }
    +	field(AFTC, DBF_DOUBLE) {
    +		prompt("Alarm Filter Time Constant")
    +		promptgroup("70 - Alarm")
    +		interest(1)
    +	}
    +	field(AFVL, DBF_DOUBLE) {
    +		prompt("Alarm Filter Value")
    +		special(SPC_NOMOD)
    +		interest(3)
    +	}
     	field(UNSV,DBF_MENU) {
     		prompt("Unknown State Severity")
    -		promptgroup(GUI_MBB)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(COSV,DBF_MENU) {
     		prompt("Change of State Svr")
    -		promptgroup(GUI_MBB)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
    @@ -448,12 +448,12 @@ recordtype(mbbi) {
     	}
     	field(SHFT,DBF_USHORT) {
     		prompt("Shift")
    -		promptgroup(GUI_MBB)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(SIOL,DBF_INLINK) {
     		prompt("Sim Input Specifctn")
    -		promptgroup(GUI_MBB)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SVAL,DBF_ULONG) {
    @@ -461,7 +461,7 @@ recordtype(mbbi) {
     	}
     	field(SIML,DBF_INLINK) {
     		prompt("Sim Mode Location")
    -		promptgroup(GUI_MBB)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIMM,DBF_MENU) {
    @@ -471,7 +471,7 @@ recordtype(mbbi) {
     	}
     	field(SIMS,DBF_MENU) {
     		prompt("Sim mode Alarm Svrty")
    -		promptgroup(GUI_MBB)
    +		promptgroup("90 - Simulate")
     		interest(2)
     		menu(menuAlarmSevr)
     	}
    diff --git a/src/std/rec/mbboDirectRecord.c b/src/std/rec/mbboDirectRecord.c
    index fb36a0a3b..0a6e3391e 100644
    --- a/src/std/rec/mbboDirectRecord.c
    +++ b/src/std/rec/mbboDirectRecord.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution.
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* mbboDirectRecord.c - Record Support for mbboDirect records */
     /*
      *      Original Author: Bob Dalesio
    @@ -44,8 +42,8 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(mbboDirectRecord *, int);
    -static long process(mbboDirectRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     static long special(DBADDR *, int);
     #define get_value NULL
     #define cvt_dbaddr NULL
    @@ -98,8 +96,9 @@ static long writeValue(mbboDirectRecord *);
     
     #define NUM_BITS 16
     
    -static long init_record(mbboDirectRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct mbboDirectRecord *prec = (struct mbboDirectRecord *)pcommon;
         struct mbbodset *pdset = (struct mbbodset *) prec->dset;
         long status = 0;
     
    @@ -159,8 +158,9 @@ static long init_record(mbboDirectRecord *prec, int pass)
         return status;
     }
     
    -static long process(mbboDirectRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct mbboDirectRecord *prec = (struct mbboDirectRecord *)pcommon;
         struct mbbodset *pdset = (struct mbbodset *)(prec->dset);
         long status = 0;
         int pact = prec->pact;
    diff --git a/src/std/rec/mbboDirectRecord.dbd b/src/std/rec/mbboDirectRecord.dbd
    index df2927de5..0b4285e32 100644
    --- a/src/std/rec/mbboDirectRecord.dbd
    +++ b/src/std/rec/mbboDirectRecord.dbd
    @@ -10,13 +10,13 @@ recordtype(mbboDirect) {
         include "dbCommon.dbd" 
         field(VAL,DBF_USHORT) {
             prompt("Word")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("50 - Output")
             asl(ASL0)
             pp(TRUE)
         }
         field(OMSL,DBF_MENU) {
             prompt("Output Mode Select")
    -        promptgroup(GUI_MBB)
    +        promptgroup("50 - Output")
             special(SPC_RESET)
             pp(TRUE)
             interest(1)
    @@ -24,128 +24,128 @@ recordtype(mbboDirect) {
         }
         field(NOBT,DBF_SHORT) {
             prompt("Number of Bits")
    -        promptgroup(GUI_MBB)
    +        promptgroup("50 - Output")
             special(SPC_NOMOD)
             interest(1)
         }
         field(DOL,DBF_INLINK) {
             prompt("Desired Output Loc")
    -        promptgroup(GUI_MBB)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(OUT,DBF_OUTLINK) {
             prompt("Output Specification")
    -        promptgroup(GUI_MBB)
    +        promptgroup("50 - Output")
             interest(1)
         }
         field(B0,DBF_UCHAR) {
             prompt("Bit 0")
    -        promptgroup(GUI_BITS1)
    +        promptgroup("51 - Output 0-7")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(B1,DBF_UCHAR) {
             prompt("Bit 1")
    -        promptgroup(GUI_BITS1)
    +        promptgroup("51 - Output 0-7")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(B2,DBF_UCHAR) {
             prompt("Bit 2")
    -        promptgroup(GUI_BITS1)
    +        promptgroup("51 - Output 0-7")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(B3,DBF_UCHAR) {
             prompt("Bit 3")
    -        promptgroup(GUI_BITS1)
    +        promptgroup("51 - Output 0-7")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(B4,DBF_UCHAR) {
             prompt("Bit 4")
    -        promptgroup(GUI_BITS1)
    +        promptgroup("51 - Output 0-7")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(B5,DBF_UCHAR) {
             prompt("Bit 5")
    -        promptgroup(GUI_BITS1)
    +        promptgroup("51 - Output 0-7")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(B6,DBF_UCHAR) {
             prompt("Bit 6")
    -        promptgroup(GUI_BITS1)
    +        promptgroup("51 - Output 0-7")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(B7,DBF_UCHAR) {
             prompt("Bit 7")
    -        promptgroup(GUI_BITS1)
    +        promptgroup("51 - Output 0-7")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(B8,DBF_UCHAR) {
             prompt("Bit 8")
    -        promptgroup(GUI_BITS2)
    +        promptgroup("52 - Output 9-F")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(B9,DBF_UCHAR) {
             prompt("Bit 9")
    -        promptgroup(GUI_BITS2)
    +        promptgroup("52 - Output 9-F")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(BA,DBF_UCHAR) {
             prompt("Bit 10")
    -        promptgroup(GUI_BITS2)
    +        promptgroup("52 - Output 9-F")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(BB,DBF_UCHAR) {
             prompt("Bit 11")
    -        promptgroup(GUI_BITS2)
    +        promptgroup("52 - Output 9-F")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(BC,DBF_UCHAR) {
             prompt("Bit 12")
    -        promptgroup(GUI_BITS2)
    +        promptgroup("52 - Output 9-F")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(BD,DBF_UCHAR) {
             prompt("Bit 13")
    -        promptgroup(GUI_BITS2)
    +        promptgroup("52 - Output 9-F")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(BE,DBF_UCHAR) {
             prompt("Bit 14")
    -        promptgroup(GUI_BITS2)
    +        promptgroup("52 - Output 9-F")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
         }
         field(BF,DBF_UCHAR) {
             prompt("Bit 15")
    -        promptgroup(GUI_BITS2)
    +        promptgroup("52 - Output 9-F")
             special(SPC_MOD)
             pp(TRUE)
             interest(1)
    @@ -181,17 +181,17 @@ recordtype(mbboDirect) {
         }
         field(SHFT,DBF_ULONG) {
             prompt("Shift")
    -        promptgroup(GUI_MBB)
    +        promptgroup("50 - Output")
             interest(1)
         }
         field(SIOL,DBF_OUTLINK) {
             prompt("Sim Output Specifctn")
    -        promptgroup(GUI_MBB)
    +        promptgroup("90 - Simulate")
             interest(1)
         }
         field(SIML,DBF_INLINK) {
             prompt("Sim Mode Location")
    -        promptgroup(GUI_MBB)
    +        promptgroup("90 - Simulate")
             interest(1)
         }
         field(SIMM,DBF_MENU) {
    @@ -201,19 +201,19 @@ recordtype(mbboDirect) {
         }
         field(SIMS,DBF_MENU) {
             prompt("Sim mode Alarm Svrty")
    -        promptgroup(GUI_MBB)
    +        promptgroup("90 - Simulate")
             interest(2)
             menu(menuAlarmSevr)
         }
         field(IVOA,DBF_MENU) {
             prompt("INVALID outpt action")
    -        promptgroup(GUI_MBB)
    +        promptgroup("50 - Output")
             interest(2)
             menu(menuIvoa)
         }
         field(IVOV,DBF_USHORT) {
             prompt("INVALID output value")
    -        promptgroup(GUI_MBB)
    +        promptgroup("50 - Output")
             interest(2)
         }
     }
    diff --git a/src/std/rec/mbboRecord.c b/src/std/rec/mbboRecord.c
    index 9d00a6d5e..0ae6a815a 100644
    --- a/src/std/rec/mbboRecord.c
    +++ b/src/std/rec/mbboRecord.c
    @@ -8,8 +8,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* mbboRecord.c - Record Support Routines for multi bit binary Output records */
     /*
      *      Original Author: Bob Dalesio
    @@ -45,8 +43,8 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(mbboRecord *, int);
    -static long process(mbboRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     static long special(DBADDR *, int);
     #define get_value NULL
     static long cvt_dbaddr(DBADDR *);
    @@ -54,9 +52,9 @@ static long cvt_dbaddr(DBADDR *);
     #define put_array_info NULL
     #define get_units NULL
     #define get_precision NULL
    -static long get_enum_str(DBADDR *, char *);
    -static long get_enum_strs(DBADDR *, struct dbr_enumStrs *);
    -static long put_enum_str(DBADDR *, char *);
    +static long get_enum_str(const DBADDR *, char *);
    +static long get_enum_strs(const DBADDR *, struct dbr_enumStrs *);
    +static long put_enum_str(const DBADDR *, const char *);
     #define get_graphic_double NULL
     #define get_control_double NULL
     #define get_alarm_double NULL
    @@ -115,8 +113,9 @@ static void init_common(mbboRecord *prec)
         prec->sdef = FALSE;
     }
     
    -static long init_record(mbboRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct mbboRecord *prec = (struct mbboRecord *)pcommon;
         struct mbbodset *pdset;
         long status;
     
    @@ -190,9 +189,10 @@ static long init_record(mbboRecord *prec, int pass)
         return status;
     }
     
    -static long process(mbboRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    -    struct mbbodset *pdset = (struct mbbodset *) prec->dset;
    +    struct mbboRecord *prec = (struct mbboRecord *)pcommon;
    +    struct mbbodset  *pdset = (struct mbbodset *) prec->dset;
         long status = 0;
         int pact = prec->pact;
     
    @@ -303,7 +303,7 @@ static long cvt_dbaddr(DBADDR *paddr)
         return 0;
     }
     
    -static long get_enum_str(DBADDR *paddr, char *pstring)
    +static long get_enum_str(const DBADDR *paddr, char *pstring)
     {
         mbboRecord *prec = (mbboRecord *) paddr->precord;
         epicsEnum16 *pfield = paddr->pfield;
    @@ -323,7 +323,7 @@ static long get_enum_str(DBADDR *paddr, char *pstring)
         return 0;
     }
     
    -static long get_enum_strs(DBADDR *paddr, struct dbr_enumStrs *pes)
    +static long get_enum_strs(const DBADDR *paddr, struct dbr_enumStrs *pes)
     {
         mbboRecord *prec = (mbboRecord *) paddr->precord;
         const char *pstate;
    @@ -342,7 +342,7 @@ static long get_enum_strs(DBADDR *paddr, struct dbr_enumStrs *pes)
         return 0;
     }
     
    -static long put_enum_str(DBADDR *paddr,char *pstring)
    +static long put_enum_str(const DBADDR *paddr, const char *pstring)
     {
         mbboRecord *prec = (mbboRecord *) paddr->precord;
         const char *pstate;
    diff --git a/src/std/rec/mbboRecord.dbd b/src/std/rec/mbboRecord.dbd
    index 1a32ad1cd..f841ba018 100644
    --- a/src/std/rec/mbboRecord.dbd
    +++ b/src/std/rec/mbboRecord.dbd
    @@ -10,7 +10,7 @@ recordtype(mbbo) {
     	include "dbCommon.dbd" 
     	field(VAL,DBF_ENUM) {
     		prompt("Desired Value")
    -                promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		special(SPC_DBADDR)
     		asl(ASL0)
     		pp(TRUE)
    @@ -19,29 +19,29 @@ recordtype(mbbo) {
     	}
     	field(DOL,DBF_INLINK) {
     		prompt("Desired Output Loc")
    -		promptgroup(GUI_MBB)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(OMSL,DBF_MENU) {
     		prompt("Output Mode Select")
    -		promptgroup(GUI_MBB)
    +		promptgroup("50 - Output")
     		interest(1)
     		menu(menuOmsl)
     	}
     	field(NOBT,DBF_USHORT) {
     		prompt("Number of Bits")
    -		promptgroup(GUI_MBB)
    +		promptgroup("50 - Output")
     		special(SPC_NOMOD)
     		interest(1)
     	}
     	field(OUT,DBF_OUTLINK) {
     		prompt("Output Specification")
    -		promptgroup(GUI_MBB)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(ZRVL,DBF_ULONG) {
     		prompt("Zero Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("51 - Output 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -49,7 +49,7 @@ recordtype(mbbo) {
     	}
     	field(ONVL,DBF_ULONG) {
     		prompt("One Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("51 - Output 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -57,7 +57,7 @@ recordtype(mbbo) {
     	}
     	field(TWVL,DBF_ULONG) {
     		prompt("Two Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("51 - Output 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -65,7 +65,7 @@ recordtype(mbbo) {
     	}
     	field(THVL,DBF_ULONG) {
     		prompt("Three Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("51 - Output 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -73,7 +73,7 @@ recordtype(mbbo) {
     	}
     	field(FRVL,DBF_ULONG) {
     		prompt("Four Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("51 - Output 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -81,7 +81,7 @@ recordtype(mbbo) {
     	}
     	field(FVVL,DBF_ULONG) {
     		prompt("Five Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("51 - Output 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -89,7 +89,7 @@ recordtype(mbbo) {
     	}
     	field(SXVL,DBF_ULONG) {
     		prompt("Six Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("51 - Output 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -97,7 +97,7 @@ recordtype(mbbo) {
     	}
     	field(SVVL,DBF_ULONG) {
     		prompt("Seven Value")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("51 - Output 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -105,7 +105,7 @@ recordtype(mbbo) {
     	}
     	field(EIVL,DBF_ULONG) {
     		prompt("Eight Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("52 - Output 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -113,7 +113,7 @@ recordtype(mbbo) {
     	}
     	field(NIVL,DBF_ULONG) {
     		prompt("Nine Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("52 - Output 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -121,7 +121,7 @@ recordtype(mbbo) {
     	}
     	field(TEVL,DBF_ULONG) {
     		prompt("Ten Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("52 - Output 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -129,7 +129,7 @@ recordtype(mbbo) {
     	}
     	field(ELVL,DBF_ULONG) {
     		prompt("Eleven Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("52 - Output 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -137,7 +137,7 @@ recordtype(mbbo) {
     	}
     	field(TVVL,DBF_ULONG) {
     		prompt("Twelve Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("52 - Output 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -145,7 +145,7 @@ recordtype(mbbo) {
     	}
     	field(TTVL,DBF_ULONG) {
     		prompt("Thirteen Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("52 - Output 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -153,7 +153,7 @@ recordtype(mbbo) {
     	}
     	field(FTVL,DBF_ULONG) {
     		prompt("Fourteen Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("52 - Output 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -161,7 +161,7 @@ recordtype(mbbo) {
     	}
     	field(FFVL,DBF_ULONG) {
     		prompt("Fifteen Value")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("52 - Output 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		base(HEX)
    @@ -169,7 +169,7 @@ recordtype(mbbo) {
     	}
     	field(ZRST,DBF_STRING) {
     		prompt("Zero String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -177,7 +177,7 @@ recordtype(mbbo) {
     	}
     	field(ONST,DBF_STRING) {
     		prompt("One String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -185,7 +185,7 @@ recordtype(mbbo) {
     	}
     	field(TWST,DBF_STRING) {
     		prompt("Two String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -193,7 +193,7 @@ recordtype(mbbo) {
     	}
     	field(THST,DBF_STRING) {
     		prompt("Three String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -201,7 +201,7 @@ recordtype(mbbo) {
     	}
     	field(FRST,DBF_STRING) {
     		prompt("Four String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -209,7 +209,7 @@ recordtype(mbbo) {
     	}
     	field(FVST,DBF_STRING) {
     		prompt("Five String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -217,7 +217,7 @@ recordtype(mbbo) {
     	}
     	field(SXST,DBF_STRING) {
     		prompt("Six String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -225,7 +225,7 @@ recordtype(mbbo) {
     	}
     	field(SVST,DBF_STRING) {
     		prompt("Seven String")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("81 - Display 0-7")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -233,7 +233,7 @@ recordtype(mbbo) {
     	}
     	field(EIST,DBF_STRING) {
     		prompt("Eight String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -241,7 +241,7 @@ recordtype(mbbo) {
     	}
     	field(NIST,DBF_STRING) {
     		prompt("Nine String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -249,7 +249,7 @@ recordtype(mbbo) {
     	}
     	field(TEST,DBF_STRING) {
     		prompt("Ten String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -257,7 +257,7 @@ recordtype(mbbo) {
     	}
     	field(ELST,DBF_STRING) {
     		prompt("Eleven String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -265,7 +265,7 @@ recordtype(mbbo) {
     	}
     	field(TVST,DBF_STRING) {
     		prompt("Twelve String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -273,7 +273,7 @@ recordtype(mbbo) {
     	}
     	field(TTST,DBF_STRING) {
     		prompt("Thirteen String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -281,7 +281,7 @@ recordtype(mbbo) {
     	}
     	field(FTST,DBF_STRING) {
     		prompt("Fourteen String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -289,7 +289,7 @@ recordtype(mbbo) {
     	}
     	field(FFST,DBF_STRING) {
     		prompt("Fifteen String")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("82 - Display 8-15")
     		special(SPC_MOD)
     		pp(TRUE)
     		interest(1)
    @@ -297,126 +297,126 @@ recordtype(mbbo) {
     	}
     	field(ZRSV,DBF_MENU) {
     		prompt("State Zero Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(ONSV,DBF_MENU) {
     		prompt("State One Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(TWSV,DBF_MENU) {
     		prompt("State Two Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(THSV,DBF_MENU) {
     		prompt("State Three Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(FRSV,DBF_MENU) {
     		prompt("State Four Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(FVSV,DBF_MENU) {
     		prompt("State Five Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(SXSV,DBF_MENU) {
     		prompt("State Six Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(SVSV,DBF_MENU) {
     		prompt("State Seven Severity")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("71 - Alarm 0-7")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(EISV,DBF_MENU) {
     		prompt("State Eight Severity")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(NISV,DBF_MENU) {
     		prompt("State Nine Severity")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(TESV,DBF_MENU) {
     		prompt("State Ten Severity")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(ELSV,DBF_MENU) {
     		prompt("State Eleven Severity")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(TVSV,DBF_MENU) {
     		prompt("State Twelve Severity")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(TTSV,DBF_MENU) {
     		prompt("State Thirteen Sevr")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(FTSV,DBF_MENU) {
     		prompt("State Fourteen Sevr")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(FFSV,DBF_MENU) {
     		prompt("State Fifteen Sevr")
    -		promptgroup(GUI_BITS2)
    +		promptgroup("72 - Alarm 8-15")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(UNSV,DBF_MENU) {
     		prompt("Unknown State Sevr")
    -		promptgroup(GUI_MBB)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(COSV,DBF_MENU) {
     		prompt("Change of State Sevr")
    -		promptgroup(GUI_MBB)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
    @@ -461,17 +461,17 @@ recordtype(mbbo) {
     	}
     	field(SHFT,DBF_USHORT) {
     		prompt("Shift")
    -		promptgroup(GUI_MBB)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(SIOL,DBF_OUTLINK) {
     		prompt("Sim Output Specifctn")
    -		promptgroup(GUI_MBB)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIML,DBF_INLINK) {
     		prompt("Sim Mode Location")
    -		promptgroup(GUI_MBB)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIMM,DBF_MENU) {
    @@ -481,19 +481,19 @@ recordtype(mbbo) {
     	}
     	field(SIMS,DBF_MENU) {
     		prompt("Sim mode Alarm Svrty")
    -		promptgroup(GUI_MBB)
    +		promptgroup("90 - Simulate")
     		interest(2)
     		menu(menuAlarmSevr)
     	}
     	field(IVOA,DBF_MENU) {
     		prompt("INVALID outpt action")
    -		promptgroup(GUI_MBB)
    +		promptgroup("50 - Output")
     		interest(2)
     		menu(menuIvoa)
     	}
     	field(IVOV,DBF_USHORT) {
     		prompt("INVALID output value")
    -		promptgroup(GUI_MBB)
    +		promptgroup("50 - Output")
     		interest(2)
     	}
     }
    diff --git a/src/std/rec/permissiveRecord.c b/src/std/rec/permissiveRecord.c
    index 65077253a..e553931bc 100644
    --- a/src/std/rec/permissiveRecord.c
    +++ b/src/std/rec/permissiveRecord.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* recPermissive.c - Record Support Routines for Permissive records */
     /*
      *      Original Author: Bob Dalesio
    @@ -39,7 +37,7 @@
     #define report NULL
     #define initialize NULL
     #define init_record NULL
    -static long process(permissiveRecord *);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     #define cvt_dbaddr NULL
    @@ -78,8 +76,9 @@ epicsExportAddress(rset,permissiveRSET);
     
     static void monitor(permissiveRecord *);
     
    -static long process(permissiveRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct permissiveRecord *prec = (struct permissiveRecord *)pcommon;
     
         prec->pact=TRUE;
         prec->udf=FALSE;
    diff --git a/src/std/rec/permissiveRecord.dbd b/src/std/rec/permissiveRecord.dbd
    index 6e999175f..7eb04bf95 100644
    --- a/src/std/rec/permissiveRecord.dbd
    +++ b/src/std/rec/permissiveRecord.dbd
    @@ -3,21 +3,21 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     recordtype(permissive) {
     	include "dbCommon.dbd" 
     	field(LABL,DBF_STRING) {
     		prompt("Button Label")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		pp(TRUE)
     		interest(1)
     		size(20)
     	}
     	field(VAL,DBF_USHORT) {
     		prompt("Status")
    +		promptgroup("40 - Input")
     		asl(ASL0)
     		pp(TRUE)
     	}
    diff --git a/src/std/rec/printfRecord.c b/src/std/rec/printfRecord.c
    index f8419e4ad..17114712e 100644
    --- a/src/std/rec/printfRecord.c
    +++ b/src/std/rec/printfRecord.c
    @@ -292,8 +292,9 @@ static void doPrintf(printfRecord *prec)
     }
     
     
    -static long init_record(printfRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct printfRecord *prec = (struct printfRecord *)pcommon;
         printfdset *pdset;
     
         if (pass == 0) {
    @@ -327,8 +328,9 @@ static long init_record(printfRecord *prec, int pass)
         return 0;
     }
     
    -static long process(printfRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct printfRecord *prec = (struct printfRecord *)pcommon;
         int pact = prec->pact;
         printfdset *pdset;
         long status = 0;
    diff --git a/src/std/rec/printfRecord.dbd b/src/std/rec/printfRecord.dbd
    index 37beccebf..4fd63ef3c 100644
    --- a/src/std/rec/printfRecord.dbd
    +++ b/src/std/rec/printfRecord.dbd
    @@ -28,7 +28,7 @@ recordtype(printf) {
         }
         field(SIZV,DBF_USHORT) {
             prompt("Size of VAL buffer")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("30 - Action")
             special(SPC_NOMOD)
             interest(1)
             initial("41")
    @@ -39,69 +39,69 @@ recordtype(printf) {
         }
         field(OUT,DBF_OUTLINK) {
             prompt("Output Specification")
    -        promptgroup(GUI_OUTPUT)
    +        promptgroup("50 - Output")
             interest(1)
         }
         field(FMT,DBF_STRING) {
             prompt("Format String")
    -        promptgroup(GUI_CALC)
    +        promptgroup("30 - Action")
             pp(TRUE)
             size(81)
         }
         field(IVLS,DBF_STRING) {
             prompt("Invalid Link String")
    -        promptgroup(GUI_CALC)
    +        promptgroup("30 - Action")
             size(16)
             initial("LNK")
         }
         field(INP0,DBF_INLINK) {
             prompt("Input 0")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(INP1,DBF_INLINK) {
             prompt("Input 1")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(INP2,DBF_INLINK) {
             prompt("Input 2")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(INP3,DBF_INLINK) {
             prompt("Input 3")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(INP4,DBF_INLINK) {
             prompt("Input 4")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(INP5,DBF_INLINK) {
             prompt("Input 5")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(INP6,DBF_INLINK) {
             prompt("Input 6")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(INP7,DBF_INLINK) {
             prompt("Input 7")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(INP8,DBF_INLINK) {
             prompt("Input 8")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("40 - Input")
             interest(1)
         }
         field(INP9,DBF_INLINK) {
             prompt("Input 9")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("40 - Input")
             interest(1)
         }
         %/* Number of INPx fields defined */
    diff --git a/src/std/rec/selRecord.c b/src/std/rec/selRecord.c
    index 37456feff..56a995c8f 100644
    --- a/src/std/rec/selRecord.c
    +++ b/src/std/rec/selRecord.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* selRecord.c - Record Support Routines for Select records */
     /*
      *      Original Author: Bob Dalesio
    @@ -40,15 +38,15 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(selRecord *, int);
    -static long process(selRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     #define cvt_dbaddr NULL
     #define get_array_info NULL
     #define put_array_info NULL
     static long get_units(DBADDR *, char *);
    -static long get_precision(DBADDR *, long *);
    +static long get_precision(const DBADDR *, long *);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    @@ -86,8 +84,9 @@ static int fetch_values(selRecord *);
     static void monitor(selRecord *);
     
     
    -static long init_record(selRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct selRecord *prec = (struct selRecord *)pcommon;
         struct link *plink;
         int i;
         double *pvalue;
    @@ -107,8 +106,9 @@ static long init_record(selRecord *prec, int pass)
         return 0;
     }
     
    -static long process(selRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct selRecord *prec = (struct selRecord *)pcommon;
         prec->pact = TRUE;
         if ( RTN_SUCCESS(fetch_values(prec)) ) {
     	do_sel(prec);
    @@ -142,7 +142,7 @@ static long get_units(DBADDR *paddr, char *units)
         return(0);
     }
     
    -static long get_precision(DBADDR *paddr, long *precision)
    +static long get_precision(const DBADDR *paddr, long *precision)
     {
         selRecord	*prec=(selRecord *)paddr->precord;
         double *pvalue,*plvalue;
    diff --git a/src/std/rec/selRecord.dbd b/src/std/rec/selRecord.dbd
    index 0d01586a0..724482704 100644
    --- a/src/std/rec/selRecord.dbd
    +++ b/src/std/rec/selRecord.dbd
    @@ -3,9 +3,8 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     menu(selSELM) {
     	choice(selSELM_Specified,"Specified")
    @@ -17,12 +16,13 @@ recordtype(sel) {
     	include "dbCommon.dbd" 
     	field(VAL,DBF_DOUBLE) {
     		prompt("Result")
    +		promptgroup("40 - Input")
     		asl(ASL0)
     		special(SPC_NOMOD)
     	}
     	field(SELM,DBF_MENU) {
     		prompt("Select Mechanism")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("30 - Action")
     		menu(selSELM)
     	}
     	field(SELN,DBF_USHORT) {
    @@ -30,124 +30,124 @@ recordtype(sel) {
     	}
     	field(PREC,DBF_SHORT) {
     		prompt("Display Precision")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(NVL,DBF_INLINK) {
     		prompt("Index Value Location")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("30 - Action")
     		interest(1)
     	}
     	field(INPA,DBF_INLINK) {
     		prompt("Input A")
    -		promptgroup(GUI_SELECT)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPB,DBF_INLINK) {
     		prompt("Input B")
    -		promptgroup(GUI_SELECT)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPC,DBF_INLINK) {
     		prompt("Input C")
    -		promptgroup(GUI_SELECT)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPD,DBF_INLINK) {
     		prompt("Input D")
    -		promptgroup(GUI_SELECT)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPE,DBF_INLINK) {
     		prompt("Input E")
    -		promptgroup(GUI_SELECT)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPF,DBF_INLINK) {
     		prompt("Input F")
    -		promptgroup(GUI_SELECT)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPG,DBF_INLINK) {
     		prompt("Input G")
    -		promptgroup(GUI_SELECT)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPH,DBF_INLINK) {
     		prompt("Input H")
    -		promptgroup(GUI_SELECT)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPI,DBF_INLINK) {
     		prompt("Input I")
    -		promptgroup(GUI_SELECT)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPJ,DBF_INLINK) {
     		prompt("Input J")
    -		promptgroup(GUI_SELECT)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPK,DBF_INLINK) {
     		prompt("Input K")
    -		promptgroup(GUI_SELECT)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPL,DBF_INLINK) {
     		prompt("Input L")
    -		promptgroup(GUI_SELECT)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(EGU,DBF_STRING) {
    -		prompt("Units Name")
    -		promptgroup(GUI_DISPLAY)
    +		prompt("Engineering Units")
    +		promptgroup("80 - Display")
     		interest(1)
     		size(16)
     		prop(YES)
     	}
     	field(HOPR,DBF_DOUBLE) {
     		prompt("High Operating Rng")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(LOPR,DBF_DOUBLE) {
     		prompt("Low Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(HIHI,DBF_DOUBLE) {
     		prompt("Hihi Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(LOLO,DBF_DOUBLE) {
     		prompt("Lolo Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(HIGH,DBF_DOUBLE) {
     		prompt("High Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(LOW,DBF_DOUBLE) {
     		prompt("Low Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(HHSV,DBF_MENU) {
     		prompt("Hihi Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -155,7 +155,7 @@ recordtype(sel) {
     	}
     	field(LLSV,DBF_MENU) {
     		prompt("Lolo Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -163,7 +163,7 @@ recordtype(sel) {
     	}
     	field(HSV,DBF_MENU) {
     		prompt("High Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -171,7 +171,7 @@ recordtype(sel) {
     	}
     	field(LSV,DBF_MENU) {
     		prompt("Low Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -179,17 +179,17 @@ recordtype(sel) {
     	}
     	field(HYST,DBF_DOUBLE) {
     		prompt("Alarm Deadband")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		interest(1)
     	}
     	field(ADEL,DBF_DOUBLE) {
     		prompt("Archive Deadband")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(MDEL,DBF_DOUBLE) {
     		prompt("Monitor Deadband")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(A,DBF_DOUBLE) {
    diff --git a/src/std/rec/seqRecord.c b/src/std/rec/seqRecord.c
    index eae156fb9..86d05f254 100644
    --- a/src/std/rec/seqRecord.c
    +++ b/src/std/rec/seqRecord.c
    @@ -8,8 +8,6 @@
     \*************************************************************************/
      
     /*
    - * $Revision-Id$
    - *
      *      Author:	John Winans
      *      Date:	09-21-92
      */
    @@ -38,15 +36,15 @@ static void processCallback(CALLBACK *arg);
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(seqRecord *prec, int pass);
    -static long process(seqRecord *prec);
    +static long init_record(struct dbCommon *prec, int pass);
    +static long process(struct dbCommon *prec);
     #define special NULL
     #define get_value NULL
     #define cvt_dbaddr NULL
     #define get_array_info NULL
     #define put_array_info NULL
     static long get_units(DBADDR *, char *);
    -static long get_precision(dbAddr *paddr, long *);
    +static long get_precision(const DBADDR *paddr, long *);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    @@ -103,8 +101,9 @@ typedef struct seqRecPvt {
     } seqRecPvt;
     
     
    -static long init_record(seqRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct seqRecord *prec = (struct seqRecord *)pcommon;
         int index;
         linkGrp *grp;
         seqRecPvt *pseqRecPvt;
    @@ -130,8 +129,9 @@ static long init_record(seqRecord *prec, int pass)
         return 0;
     }
     
    -static long process(seqRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct seqRecord *prec = (struct seqRecord *)pcommon;
         seqRecPvt *pcb = (seqRecPvt *) prec->dpvt;
         linkGrp *pgrp;
         epicsUInt16 lmask;
    @@ -206,7 +206,7 @@ static void processNextLink(seqRecord *prec)
     
         if (pgrp == NULL) {
             /* None left, finish up. */
    -        prec->rset->process(prec);
    +        prec->rset->process((dbCommon *)prec);
             return;
         }
     
    @@ -297,7 +297,7 @@ static long get_units(DBADDR *paddr, char *units)
         return 0;
     }
     
    -static long get_precision(dbAddr *paddr, long *pprecision)
    +static long get_precision(const DBADDR *paddr, long *pprecision)
     {
         seqRecord *prec = (seqRecord *) paddr->precord;
         int fieldOffset = dbGetFieldIndex(paddr) - indexof(DLY1);
    diff --git a/src/std/rec/seqRecord.dbd b/src/std/rec/seqRecord.dbd
    index 3ef3d3ef9..826f3ecf6 100644
    --- a/src/std/rec/seqRecord.dbd
    +++ b/src/std/rec/seqRecord.dbd
    @@ -20,7 +20,7 @@ recordtype(seq) {
         }
         field(SELM,DBF_MENU) {
             prompt("Select Mechanism")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("30 - Action")
             interest(1)
             menu(seqSELM)
         }
    @@ -31,16 +31,18 @@ recordtype(seq) {
         }
         field(SELL,DBF_INLINK) {
             prompt("Link Selection Loc")
    -        promptgroup(GUI_INPUTS)
    +        promptgroup("30 - Action")
             interest(1)
         }
         field(OFFS,DBF_SHORT) {
             prompt("Offset for Specified")
    +        promptgroup("30 - Action")
             interest(1)
             initial("0")
         }
         field(SHFT,DBF_SHORT) {
             prompt("Shift for Mask mode")
    +        promptgroup("30 - Action")
             interest(1)
             initial("-1")
         }
    @@ -50,17 +52,17 @@ recordtype(seq) {
         }
         field(PREC,DBF_SHORT) {
             prompt("Display Precision")
    -        promptgroup(GUI_DISPLAY)
    +        promptgroup("80 - Display")
             interest(1)
         }
         field(DLY0,DBF_DOUBLE) {
             prompt("Delay 0")
    -        promptgroup(GUI_SEQ1)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DOL0,DBF_INLINK) {
             prompt("Input link 0")
    -        promptgroup(GUI_SEQ1)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DO0,DBF_DOUBLE) {
    @@ -69,17 +71,17 @@ recordtype(seq) {
         }
         field(LNK0,DBF_OUTLINK) {
             prompt("Output Link 0")
    -        promptgroup(GUI_SEQ1)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DLY1,DBF_DOUBLE) {
             prompt("Delay 1")
    -        promptgroup(GUI_SEQ1)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DOL1,DBF_INLINK) {
             prompt("Input link1")
    -        promptgroup(GUI_SEQ1)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DO1,DBF_DOUBLE) {
    @@ -88,17 +90,17 @@ recordtype(seq) {
         }
         field(LNK1,DBF_OUTLINK) {
             prompt("Output Link 1")
    -        promptgroup(GUI_SEQ1)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DLY2,DBF_DOUBLE) {
             prompt("Delay 2")
    -        promptgroup(GUI_SEQ1)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DOL2,DBF_INLINK) {
             prompt("Input link 2")
    -        promptgroup(GUI_SEQ1)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DO2,DBF_DOUBLE) {
    @@ -107,17 +109,17 @@ recordtype(seq) {
         }
         field(LNK2,DBF_OUTLINK) {
             prompt("Output Link 2")
    -        promptgroup(GUI_SEQ1)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DLY3,DBF_DOUBLE) {
             prompt("Delay 3")
    -        promptgroup(GUI_SEQ1)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DOL3,DBF_INLINK) {
             prompt("Input link 3")
    -        promptgroup(GUI_SEQ1)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DO3,DBF_DOUBLE) {
    @@ -126,17 +128,17 @@ recordtype(seq) {
         }
         field(LNK3,DBF_OUTLINK) {
             prompt("Output Link 3")
    -        promptgroup(GUI_SEQ1)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DLY4,DBF_DOUBLE) {
             prompt("Delay 4")
    -        promptgroup(GUI_SEQ2)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DOL4,DBF_INLINK) {
             prompt("Input link 4")
    -        promptgroup(GUI_SEQ2)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DO4,DBF_DOUBLE) {
    @@ -145,17 +147,17 @@ recordtype(seq) {
         }
         field(LNK4,DBF_OUTLINK) {
             prompt("Output Link 4")
    -        promptgroup(GUI_SEQ2)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DLY5,DBF_DOUBLE) {
             prompt("Delay 5")
    -        promptgroup(GUI_SEQ2)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DOL5,DBF_INLINK) {
             prompt("Input link 5")
    -        promptgroup(GUI_SEQ2)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DO5,DBF_DOUBLE) {
    @@ -164,17 +166,17 @@ recordtype(seq) {
         }
         field(LNK5,DBF_OUTLINK) {
             prompt("Output Link 5")
    -        promptgroup(GUI_SEQ2)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DLY6,DBF_DOUBLE) {
             prompt("Delay 6")
    -        promptgroup(GUI_SEQ2)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DOL6,DBF_INLINK) {
             prompt("Input link 6")
    -        promptgroup(GUI_SEQ2)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DO6,DBF_DOUBLE) {
    @@ -183,17 +185,17 @@ recordtype(seq) {
         }
         field(LNK6,DBF_OUTLINK) {
             prompt("Output Link 6")
    -        promptgroup(GUI_SEQ2)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DLY7,DBF_DOUBLE) {
             prompt("Delay 7")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DOL7,DBF_INLINK) {
             prompt("Input link 7")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DO7,DBF_DOUBLE) {
    @@ -202,17 +204,17 @@ recordtype(seq) {
         }
         field(LNK7,DBF_OUTLINK) {
             prompt("Output Link 7")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("41 - Link 0-7")
             interest(1)
         }
         field(DLY8,DBF_DOUBLE) {
             prompt("Delay 8")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DOL8,DBF_INLINK) {
             prompt("Input link 8")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DO8,DBF_DOUBLE) {
    @@ -221,17 +223,17 @@ recordtype(seq) {
         }
         field(LNK8,DBF_OUTLINK) {
             prompt("Output Link 8")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DLY9,DBF_DOUBLE) {
             prompt("Delay 9")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DOL9,DBF_INLINK) {
             prompt("Input link 9")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DO9,DBF_DOUBLE) {
    @@ -240,17 +242,17 @@ recordtype(seq) {
         }
         field(LNK9,DBF_OUTLINK) {
             prompt("Output Link 9")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DLYA,DBF_DOUBLE) {
             prompt("Delay 10")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DOLA,DBF_INLINK) {
             prompt("Input link 10")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DOA,DBF_DOUBLE) {
    @@ -259,17 +261,17 @@ recordtype(seq) {
         }
         field(LNKA,DBF_OUTLINK) {
             prompt("Output Link 10")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DLYB,DBF_DOUBLE) {
             prompt("Delay 11")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DOLB,DBF_INLINK) {
             prompt("Input link 11")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DOB,DBF_DOUBLE) {
    @@ -278,17 +280,17 @@ recordtype(seq) {
         }
         field(LNKB,DBF_OUTLINK) {
             prompt("Output Link 11")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DLYC,DBF_DOUBLE) {
             prompt("Delay 12")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DOLC,DBF_INLINK) {
             prompt("Input link 12")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DOC,DBF_DOUBLE) {
    @@ -297,17 +299,17 @@ recordtype(seq) {
         }
         field(LNKC,DBF_OUTLINK) {
             prompt("Output Link 12")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DLYD,DBF_DOUBLE) {
             prompt("Delay 13")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DOLD,DBF_INLINK) {
             prompt("Input link 13")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DOD,DBF_DOUBLE) {
    @@ -316,17 +318,17 @@ recordtype(seq) {
         }
         field(LNKD,DBF_OUTLINK) {
             prompt("Output Link 13")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DLYE,DBF_DOUBLE) {
             prompt("Delay 14")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DOLE,DBF_INLINK) {
             prompt("Input link 14")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DOE,DBF_DOUBLE) {
    @@ -335,17 +337,17 @@ recordtype(seq) {
         }
         field(LNKE,DBF_OUTLINK) {
             prompt("Output Link 14")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DLYF,DBF_DOUBLE) {
             prompt("Delay 15")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DOLF,DBF_INLINK) {
             prompt("Input link 15")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
         field(DOF,DBF_DOUBLE) {
    @@ -354,7 +356,7 @@ recordtype(seq) {
         }
         field(LNKF,DBF_OUTLINK) {
             prompt("Output Link 15")
    -        promptgroup(GUI_SEQ3)
    +        promptgroup("42 - Link 8-F")
             interest(1)
         }
     }
    diff --git a/src/std/rec/stateRecord.c b/src/std/rec/stateRecord.c
    index b295ccbb7..ca5df0295 100644
    --- a/src/std/rec/stateRecord.c
    +++ b/src/std/rec/stateRecord.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* recState.c - Record Support Routines for State records */
     /*
      *      Original Author: Bob Dalesio
    @@ -40,7 +38,7 @@
     #define report NULL
     #define initialize NULL
     #define init_record NULL
    -static long process(stateRecord *);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     #define cvt_dbaddr NULL
    @@ -79,8 +77,9 @@ epicsExportAddress(rset,stateRSET);
     
     static void monitor(stateRecord *);
     
    -static long process(stateRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct stateRecord *prec = (struct stateRecord *)pcommon;
     
     	prec->udf = FALSE;
             prec->pact=TRUE;
    diff --git a/src/std/rec/stateRecord.dbd b/src/std/rec/stateRecord.dbd
    index c0a253e1c..6e43ddbba 100644
    --- a/src/std/rec/stateRecord.dbd
    +++ b/src/std/rec/stateRecord.dbd
    @@ -3,15 +3,14 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     recordtype(state) {
     	include "dbCommon.dbd" 
     	field(VAL,DBF_STRING) {
     		prompt("Value")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("40 - Input")
     		asl(ASL0)
     		pp(TRUE)
     		size(20)
    diff --git a/src/std/rec/stringinRecord.c b/src/std/rec/stringinRecord.c
    index 474b24324..163b23a49 100644
    --- a/src/std/rec/stringinRecord.c
    +++ b/src/std/rec/stringinRecord.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* recStringin.c - Record Support Routines for Stringin records */
     /*
      *      Author: 	Janet Anderson
    @@ -42,8 +40,8 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(stringinRecord *, int);
    -static long process(stringinRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     #define cvt_dbaddr NULL
    @@ -92,8 +90,9 @@ static void monitor(stringinRecord *);
     static long readValue(stringinRecord *);
     
     
    -static long init_record(stringinRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct stringinRecord *prec = (struct stringinRecord *)pcommon;
         STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val));
         struct stringindset *pdset = (struct stringindset *) prec->dset;
     
    @@ -126,9 +125,10 @@ static long init_record(stringinRecord *prec, int pass)
     
     /*
      */
    -static long process(stringinRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    -	struct stringindset	*pdset = (struct stringindset *)(prec->dset);
    +    struct stringinRecord *prec = (struct stringinRecord *)pcommon;
    +    struct stringindset  *pdset = (struct stringindset *)(prec->dset);
     	long		 status;
     	unsigned char    pact=prec->pact;
     
    diff --git a/src/std/rec/stringinRecord.dbd b/src/std/rec/stringinRecord.dbd
    index acafc8cf4..5b0b76813 100644
    --- a/src/std/rec/stringinRecord.dbd
    +++ b/src/std/rec/stringinRecord.dbd
    @@ -3,9 +3,8 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     menu(stringinPOST) {
     	choice(stringinPOST_OnChange,"On Change")
    @@ -15,7 +14,7 @@ recordtype(stringin) {
     	include "dbCommon.dbd" 
     	field(VAL,DBF_STRING) {
     		prompt("Current Value")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("40 - Input")
     		asl(ASL0)
     		pp(TRUE)
     		size(40)
    @@ -28,24 +27,24 @@ recordtype(stringin) {
     	}
     	field(INP,DBF_INLINK) {
     		prompt("Input Specification")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(MPST,DBF_MENU) {
     		prompt("Post Value Monitors")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		menu(stringinPOST)
     	}
     	field(APST,DBF_MENU) {
     		prompt("Post Archive Monitors")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		menu(stringinPOST)
     	}
     	field(SIOL,DBF_INLINK) {
     		prompt("Sim Input Specifctn")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SVAL,DBF_STRING) {
    @@ -55,7 +54,7 @@ recordtype(stringin) {
     	}
     	field(SIML,DBF_INLINK) {
     		prompt("Sim Mode Location")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIMM,DBF_MENU) {
    @@ -65,7 +64,7 @@ recordtype(stringin) {
     	}
     	field(SIMS,DBF_MENU) {
     		prompt("Sim mode Alarm Svrty")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(2)
     		menu(menuAlarmSevr)
     	}
    diff --git a/src/std/rec/stringoutRecord.c b/src/std/rec/stringoutRecord.c
    index dbb368a59..416a6db5e 100644
    --- a/src/std/rec/stringoutRecord.c
    +++ b/src/std/rec/stringoutRecord.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* recStringout.c - Record Support Routines for Stringout records */
     /*
      * Author: 	Janet Anderson
    @@ -44,8 +42,8 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(stringoutRecord *, int);
    -static long process(stringoutRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     #define cvt_dbaddr NULL
    @@ -94,8 +92,9 @@ static void monitor(stringoutRecord *);
     static long writeValue(stringoutRecord *);
     
     
    -static long init_record(stringoutRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct stringoutRecord *prec = (struct stringoutRecord *)pcommon;
         STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val));
         struct stringoutdset *pdset = (struct stringoutdset *) prec->dset;
     
    @@ -130,9 +129,10 @@ static long init_record(stringoutRecord *prec, int pass)
         return 0;
     }
     
    -static long process(stringoutRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    -	struct stringoutdset	*pdset = (struct stringoutdset *)(prec->dset);
    +    struct stringoutRecord *prec = (struct stringoutRecord *)pcommon;
    +    struct stringoutdset  *pdset = (struct stringoutdset *)(prec->dset);
     	long		 status=0;
     	unsigned char    pact=prec->pact;
     
    diff --git a/src/std/rec/stringoutRecord.dbd b/src/std/rec/stringoutRecord.dbd
    index 25bd2fde9..fe0bae5d0 100644
    --- a/src/std/rec/stringoutRecord.dbd
    +++ b/src/std/rec/stringoutRecord.dbd
    @@ -3,9 +3,8 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     menu(stringoutPOST) {
     	choice(stringoutPOST_OnChange,"On Change")
    @@ -15,7 +14,7 @@ recordtype(stringout) {
     	include "dbCommon.dbd" 
     	field(VAL,DBF_STRING) {
     		prompt("Current Value")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		asl(ASL0)
     		pp(TRUE)
     		size(40)
    @@ -28,40 +27,40 @@ recordtype(stringout) {
     	}
     	field(DOL,DBF_INLINK) {
     		prompt("Desired Output Loc")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(OMSL,DBF_MENU) {
     		prompt("Output Mode Select")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     		menu(menuOmsl)
     	}
     	field(OUT,DBF_OUTLINK) {
     		prompt("Output Specification")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(1)
     	}
     	field(MPST,DBF_MENU) {
     		prompt("Post Value Monitors")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		menu(stringoutPOST)
     	}
     	field(APST,DBF_MENU) {
     		prompt("Post Archive Monitors")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		menu(stringoutPOST)
     	}
     	field(SIOL,DBF_OUTLINK) {
     		prompt("Sim Output Specifctn")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIML,DBF_INLINK) {
     		prompt("Sim Mode Location")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIMM,DBF_MENU) {
    @@ -71,19 +70,19 @@ recordtype(stringout) {
     	}
     	field(SIMS,DBF_MENU) {
     		prompt("Sim mode Alarm Svrty")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(2)
     		menu(menuAlarmSevr)
     	}
     	field(IVOA,DBF_MENU) {
     		prompt("INVALID output action")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(2)
     		menu(menuIvoa)
     	}
     	field(IVOV,DBF_STRING) {
     		prompt("INVALID output value")
    -		promptgroup(GUI_OUTPUT)
    +		promptgroup("50 - Output")
     		interest(2)
     		size(40)
     	}
    diff --git a/src/std/rec/subArrayRecord.c b/src/std/rec/subArrayRecord.c
    index dd6d50a9c..3de610c26 100644
    --- a/src/std/rec/subArrayRecord.c
    +++ b/src/std/rec/subArrayRecord.c
    @@ -5,8 +5,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* recSubArray.c - Record Support Routines for SubArray records 
      *
      *
    @@ -46,15 +44,15 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(subArrayRecord *prec, int pass);
    -static long process(subArrayRecord *prec);
    +static long init_record(struct dbCommon *prec, int pass);
    +static long process(struct dbCommon *prec);
     #define special NULL
     #define get_value NULL
     static long cvt_dbaddr(DBADDR *paddr);
     static long get_array_info(DBADDR *paddr, long *no_elements, long *offset);
     static long put_array_info(DBADDR *paddr, long nNew);
     static long get_units(DBADDR *paddr, char *units);
    -static long get_precision(DBADDR *paddr, long *precision);
    +static long get_precision(const DBADDR *paddr, long *precision);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    @@ -97,9 +95,9 @@ static void monitor(subArrayRecord *prec);
     static long readValue(subArrayRecord *prec);
     
     
    -
    -static long init_record(subArrayRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct subArrayRecord *prec = (struct subArrayRecord *)pcommon;
         struct sadset *pdset;
     
         if (pass==0){
    @@ -131,8 +129,9 @@ static long init_record(subArrayRecord *prec, int pass)
         return 0;
     }
     
    -static long process(subArrayRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct subArrayRecord *prec = (struct subArrayRecord *)pcommon;
         struct sadset *pdset = (struct sadset *)(prec->dset);
         long           status;
         unsigned char  pact=prec->pact;
    @@ -218,7 +217,7 @@ static long get_units(DBADDR *paddr, char *units)
         return 0;
     }
     
    -static long get_precision(DBADDR *paddr, long *precision)
    +static long get_precision(const DBADDR *paddr, long *precision)
     {
         subArrayRecord *prec = (subArrayRecord *) paddr->precord;
     
    diff --git a/src/std/rec/subArrayRecord.dbd b/src/std/rec/subArrayRecord.dbd
    index 4a0bfe0c6..7814a2e48 100644
    --- a/src/std/rec/subArrayRecord.dbd
    +++ b/src/std/rec/subArrayRecord.dbd
    @@ -3,9 +3,8 @@
     #     National Laboratory.
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
    -# EPICS BASE Versions 3.13.7
    -# and higher are distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# EPICS BASE is distributed subject to a Software License Agreement found
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     recordtype(subArray) {
     	include "dbCommon.dbd" 
    @@ -21,57 +20,57 @@ recordtype(subArray) {
     	}
     	field(PREC,DBF_SHORT) {
     		prompt("Display Precision")
    -		promptgroup(GUI_COMMON)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(FTVL,DBF_MENU) {
     		prompt("Field Type of Value")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("30 - Action")
     		special(SPC_NOMOD)
     		interest(1)
     		menu(menuFtype)
     	}
     	field(INP,DBF_INLINK) {
     		prompt("Input Specification")
    -		promptgroup(GUI_BITS1)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(EGU,DBF_STRING) {
    -		prompt("Engineering Units Name")
    -		promptgroup(GUI_BITS2)
    +		prompt("Engineering Units")
    +		promptgroup("80 - Display")
     		interest(1)
     		size(16)
     		prop(YES)
     	}
     	field(HOPR,DBF_DOUBLE) {
     		prompt("High Operating Range")
    -		promptgroup(GUI_CALC)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(LOPR,DBF_DOUBLE) {
     		prompt("Low Operating Range")
    -		promptgroup(GUI_CLOCK)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(MALM,DBF_ULONG) {
    -		prompt("Maximum Elements  ")
    -		promptgroup(GUI_CLOCK)
    +		prompt("Maximum Elements")
    +		promptgroup("30 - Action")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(NELM,DBF_ULONG) {
     		prompt("Number of Elements")
    -		promptgroup(GUI_COMPRESS)
    +		promptgroup("30 - Action")
     		pp(TRUE)
     		initial("1")
     	}
     	field(INDX,DBF_ULONG) {
     		prompt("Substring Index")
    -		promptgroup(GUI_CONVERT)
    +		promptgroup("30 - Action")
     		pp(TRUE)
     	}
     	field(BUSY,DBF_SHORT) {
    diff --git a/src/std/rec/subRecord.c b/src/std/rec/subRecord.c
    index 9cb3ae683..5c1d654c6 100644
    --- a/src/std/rec/subRecord.c
    +++ b/src/std/rec/subRecord.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* Record Support Routines for Subroutine records */
     /*
      *      Original Author: Bob Dalesio
    @@ -44,15 +42,15 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(subRecord *, int);
    -static long process(subRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     static long special(DBADDR *, int);
     #define get_value NULL
     #define cvt_dbaddr NULL
     #define get_array_info NULL
     #define put_array_info NULL
     static long get_units(DBADDR *, char *);
    -static long get_precision(DBADDR *, long *);
    +static long get_precision(const DBADDR *, long *);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    @@ -89,8 +87,9 @@ static void monitor(subRecord *);
     
     #define INP_ARG_MAX 12
     
    -static long init_record(subRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct subRecord *prec = (struct subRecord *)pcommon;
         SUBFUNCPTR psubroutine;
         struct link *plink;
         int i;
    @@ -131,8 +130,9 @@ static long init_record(subRecord *prec, int pass)
         return 0;
     }
     
    -static long process(subRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct subRecord *prec = (struct subRecord *)pcommon;
         long status = 0;
         int pact = prec->pact;
     
    @@ -171,7 +171,7 @@ static long special(DBADDR *paddr, int after)
         if (!after) {
             if (prec->snam[0] == 0 && prec->pact)
                 prec->pact = FALSE;
    -            prec->rpro = FALSE;
    +        prec->rpro = FALSE;
             return 0;
         }
     
    @@ -214,7 +214,7 @@ static long get_units(DBADDR *paddr, char *units)
         return 0;
     }
     
    -static long get_precision(DBADDR *paddr, long *pprecision)
    +static long get_precision(const DBADDR *paddr, long *pprecision)
     {
         subRecord *prec = (subRecord *)paddr->precord;
         int fieldIndex = dbGetFieldIndex(paddr);
    diff --git a/src/std/rec/subRecord.dbd b/src/std/rec/subRecord.dbd
    index 973cab7f1..48cfc1385 100644
    --- a/src/std/rec/subRecord.dbd
    +++ b/src/std/rec/subRecord.dbd
    @@ -15,14 +15,14 @@ recordtype(sub) {
     	}
     	field(INAM,DBF_STRING) {
     		prompt("Init Routine Name")
    -		promptgroup(GUI_SUB)
    +		promptgroup("30 - Action")
     		special(SPC_NOMOD)
     		interest(1)
     		size(40)
     	}
     	field(SNAM,DBF_STRING) {
     		prompt("Subroutine Name")
    -		promptgroup(GUI_SUB)
    +		promptgroup("30 - Action")
     		special(SPC_MOD)
     		interest(1)
     		size(40)
    @@ -37,127 +37,127 @@ recordtype(sub) {
     	}
     	field(INPA,DBF_INLINK) {
     		prompt("Input A")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPB,DBF_INLINK) {
     		prompt("Input B")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPC,DBF_INLINK) {
     		prompt("Input C")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPD,DBF_INLINK) {
     		prompt("Input D")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPE,DBF_INLINK) {
     		prompt("Input E")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPF,DBF_INLINK) {
     		prompt("Input F")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("41 - Input A-F")
     		interest(1)
     	}
     	field(INPG,DBF_INLINK) {
     		prompt("Input G")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPH,DBF_INLINK) {
     		prompt("Input H")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPI,DBF_INLINK) {
     		prompt("Input I")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPJ,DBF_INLINK) {
     		prompt("Input J")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPK,DBF_INLINK) {
     		prompt("Input K")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(INPL,DBF_INLINK) {
     		prompt("Input L")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("42 - Input G-L")
     		interest(1)
     	}
     	field(EGU,DBF_STRING) {
    -		prompt("Units Name")
    -		promptgroup(GUI_DISPLAY)
    +		prompt("Engineering Units")
    +		promptgroup("80 - Display")
     		interest(1)
     		size(16)
     		prop(YES)
     	}
     	field(HOPR,DBF_DOUBLE) {
    -		prompt("High Operating Rng")
    -		promptgroup(GUI_DISPLAY)
    +		prompt("High Operating Range")
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(LOPR,DBF_DOUBLE) {
     		prompt("Low Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(HIHI,DBF_DOUBLE) {
     		prompt("Hihi Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(LOLO,DBF_DOUBLE) {
     		prompt("Lolo Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(HIGH,DBF_DOUBLE) {
     		prompt("High Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(LOW,DBF_DOUBLE) {
     		prompt("Low Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
     	}
     	field(PREC,DBF_SHORT) {
     		prompt("Display Precision")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(BRSV,DBF_MENU) {
     		prompt("Bad Return Severity")
    -		promptgroup(GUI_SUB)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(HHSV,DBF_MENU) {
     		prompt("Hihi Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -165,7 +165,7 @@ recordtype(sub) {
     	}
     	field(LLSV,DBF_MENU) {
     		prompt("Lolo Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -173,7 +173,7 @@ recordtype(sub) {
     	}
     	field(HSV,DBF_MENU) {
     		prompt("High Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -181,7 +181,7 @@ recordtype(sub) {
     	}
     	field(LSV,DBF_MENU) {
     		prompt("Low Severity")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		prop(YES)
    @@ -189,17 +189,17 @@ recordtype(sub) {
     	}
     	field(HYST,DBF_DOUBLE) {
     		prompt("Alarm Deadband")
    -		promptgroup(GUI_ALARMS)
    +		promptgroup("70 - Alarm")
     		interest(1)
     	}
     	field(ADEL,DBF_DOUBLE) {
     		prompt("Archive Deadband")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(MDEL,DBF_DOUBLE) {
     		prompt("Monitor Deadband")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     	}
     	field(A,DBF_DOUBLE) {
    diff --git a/src/std/rec/test/Makefile b/src/std/rec/test/Makefile
    index 110d141a8..793312f9a 100644
    --- a/src/std/rec/test/Makefile
    +++ b/src/std/rec/test/Makefile
    @@ -68,6 +68,14 @@ testHarness_SRCS += analogMonitorTest_registerRecordDeviceDriver.cpp
     TESTFILES += $(COMMON_DIR)/analogMonitorTest.dbd ../analogMonitorTest.db
     TESTS += analogMonitorTest
     
    +TARGETS += $(COMMON_DIR)/regressTest.dbd
    +regressTest_DBD += base.dbd
    +TESTPROD_HOST += regressTest
    +regressTest_SRCS += regressTest.c
    +regressTest_SRCS += regressTest_registerRecordDeviceDriver.cpp
    +TESTFILES += $(COMMON_DIR)/regressTest.dbd ../regressArray1.db
    +TESTS += regressTest
    +
     # epicsRunRecordTests runs all the test programs in a known working order.
     testHarness_SRCS += epicsRunRecordTests.c
     
    diff --git a/src/std/rec/test/asTestLib.c b/src/std/rec/test/asTestLib.c
    index 62b5e62fc..18139233f 100644
    --- a/src/std/rec/test/asTestLib.c
    +++ b/src/std/rec/test/asTestLib.c
    @@ -204,7 +204,7 @@ static void hookPass1(initHookState state)
             testFail("missing rec1");
             testSkip(3, "missing record");
         } else {
    -        struct rset *prset = dbGetRset(&addr);
    +        rset *prset = dbGetRset(&addr);
             dbfType ftype = addr.field_type;
             long count=-1, offset=-1, maxcount = addr.no_elements;
             testOk1(prset && prset->get_array_info && prset->put_array_info);
    diff --git a/src/std/rec/test/regressArray1.db b/src/std/rec/test/regressArray1.db
    new file mode 100644
    index 000000000..a09f3bfba
    --- /dev/null
    +++ b/src/std/rec/test/regressArray1.db
    @@ -0,0 +1,9 @@
    +record(waveform, "wf") {
    +  field(FTVL, "DOUBLE")
    +  field(NELM, "1")
    +  field(FLNK, "co")
    +}
    +record(calcout, "co") {
    +  field(CALC, "A")
    +  field(INPA, "wf")
    +}
    diff --git a/src/std/rec/test/regressTest.c b/src/std/rec/test/regressTest.c
    new file mode 100644
    index 000000000..ccbe53189
    --- /dev/null
    +++ b/src/std/rec/test/regressTest.c
    @@ -0,0 +1,73 @@
    +/*************************************************************************\
    +* Copyright (c) 2016 Michael Davidsaver
    +* EPICS BASE is distributed subject to a Software License Agreement found
    +* in file LICENSE that is included with this distribution.
    + \*************************************************************************/
    +
    +#include 
    +#include 
    +#include 
    +#include 
    +
    +#include 
    +#include 
    +
    +/*
    + * Test the some identified regressions
    + */
    +
    +void regressTest_registerRecordDeviceDriver(struct dbBase *);
    +
    +/*
    + * https://bugs.launchpad.net/epics-base/+bug/1577108
    + */
    +static
    +void testArrayLength1(void)
    +{
    +    waveformRecord *precwf;
    +    calcoutRecord  *precco;
    +    double *pbuf;
    +
    +    testdbPrepare();
    +
    +    testdbReadDatabase("regressTest.dbd", NULL, NULL);
    +
    +    regressTest_registerRecordDeviceDriver(pdbbase);
    +
    +    testdbReadDatabase("regressArray1.db", NULL, NULL);
    +
    +    precwf = (waveformRecord*)testdbRecordPtr("wf");
    +    precco = (calcoutRecord*)testdbRecordPtr("co");
    +
    +    eltc(0);
    +    testIocInitOk();
    +    eltc(1);
    +
    +    dbScanLock((dbCommon*)precwf);
    +    pbuf = (double*)precwf->bptr;
    +    dbScanUnlock((dbCommon*)precwf);
    +
    +    testdbPutFieldOk("wf", DBF_DOUBLE, 2.0);
    +
    +    dbScanLock((dbCommon*)precwf);
    +    testOk(precwf->nord==1, "wf.NORD = %u == 1", (unsigned)precwf->nord);
    +    testOk(pbuf[0]==2.0, "wf.VAL[0] = %f == 2.0", pbuf[0]);
    +    dbScanUnlock((dbCommon*)precwf);
    +
    +    dbScanLock((dbCommon*)precco);
    +    testOk(precco->a==2.0, "co.A = %f == 2.0", precco->a);
    +    dbScanUnlock((dbCommon*)precco);
    +
    +    testdbGetFieldEqual("co", DBF_DOUBLE, 2.0);
    +
    +    testIocShutdownOk();
    +
    +    testdbCleanup();
    +}
    +
    +MAIN(regressTest)
    +{
    +    testPlan(5);
    +    testArrayLength1();
    +    return testDone();
    +}
    diff --git a/src/std/rec/waveformRecord.c b/src/std/rec/waveformRecord.c
    index 71e19014a..c06c48001 100644
    --- a/src/std/rec/waveformRecord.c
    +++ b/src/std/rec/waveformRecord.c
    @@ -7,8 +7,6 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* recWaveform.c - Record Support Routines for Waveform records */
     /*
      *      Original Author: Bob Dalesio
    @@ -44,15 +42,15 @@
     /* Create RSET - Record Support Entry Table*/
     #define report NULL
     #define initialize NULL
    -static long init_record(waveformRecord *, int);
    -static long process(waveformRecord *);
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     static long cvt_dbaddr(DBADDR *);
     static long get_array_info(DBADDR *, long *, long *);
     static long put_array_info(DBADDR *, long);
     static long get_units(DBADDR *, char *);
    -static long get_precision(DBADDR *, long *);
    +static long get_precision(const DBADDR *, long *);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    @@ -92,8 +90,9 @@ struct wfdset { /* waveform dset */
     static void monitor(waveformRecord *);
     static long readValue(waveformRecord *);
     
    -static long init_record(waveformRecord *prec, int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    +    struct waveformRecord *prec = (struct waveformRecord *)pcommon;
         struct wfdset *pdset;
     
         if (pass==0){
    @@ -128,8 +127,9 @@ static long init_record(waveformRecord *prec, int pass)
         return (*pdset->init_record)(prec);
     }
     
    -static long process(waveformRecord *prec)
    +static long process(struct dbCommon *pcommon)
     {
    +    struct waveformRecord *prec = (struct waveformRecord *)pcommon;
         struct wfdset *pdset = (struct wfdset *)(prec->dset);
         unsigned char  pact=prec->pact;
     
    @@ -209,7 +209,7 @@ static long get_units(DBADDR *paddr, char *units)
         return 0;
     }
     
    -static long get_precision(DBADDR *paddr, long *precision)
    +static long get_precision(const DBADDR *paddr, long *precision)
     {
         waveformRecord *prec = (waveformRecord *) paddr->precord;
     
    diff --git a/src/std/rec/waveformRecord.dbd.pod b/src/std/rec/waveformRecord.dbd.pod
    index d28302801..db2fa05fb 100644
    --- a/src/std/rec/waveformRecord.dbd.pod
    +++ b/src/std/rec/waveformRecord.dbd.pod
    @@ -56,50 +56,50 @@ recordtype(waveform) {
     	}
     	field(RARM,DBF_SHORT) {
     		prompt("Rearm the waveform")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("30 - Action")
     		pp(TRUE)
     		interest(1)
     	}
     	field(PREC,DBF_SHORT) {
     		prompt("Display Precision")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(INP,DBF_INLINK) {
     		prompt("Input Specification")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("40 - Input")
     		interest(1)
     	}
     	field(EGU,DBF_STRING) {
    -		prompt("Engineering Units Name")
    -		promptgroup(GUI_DISPLAY)
    +		prompt("Engineering Units")
    +		promptgroup("80 - Display")
     		interest(1)
     		size(16)
     		prop(YES)
     	}
     	field(HOPR,DBF_DOUBLE) {
     		prompt("High Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(LOPR,DBF_DOUBLE) {
     		prompt("Low Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +		promptgroup("80 - Display")
     		interest(1)
     		prop(YES)
     	}
     	field(NELM,DBF_ULONG) {
     		prompt("Number of Elements")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("30 - Action")
     		special(SPC_NOMOD)
     		interest(1)
     		initial("1")
     	}
     	field(FTVL,DBF_MENU) {
     		prompt("Field Type of Value")
    -		promptgroup(GUI_WAVE)
    +		promptgroup("30 - Action")
     		special(SPC_NOMOD)
     		interest(1)
     		menu(menuFtype)
    @@ -120,12 +120,12 @@ recordtype(waveform) {
     	}
     	field(SIOL,DBF_INLINK) {
     		prompt("Sim Input Specifctn")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIML,DBF_INLINK) {
     		prompt("Sim Mode Location")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(1)
     	}
     	field(SIMM,DBF_MENU) {
    @@ -135,22 +135,22 @@ recordtype(waveform) {
     	}
     	field(SIMS,DBF_MENU) {
     		prompt("Sim mode Alarm Svrty")
    -		promptgroup(GUI_INPUTS)
    +		promptgroup("90 - Simulate")
     		interest(2)
     		menu(menuAlarmSevr)
     	}
     	field(MPST,DBF_MENU) {
    -                prompt("Post Value Monitors")
    -                promptgroup(GUI_DISPLAY)
    -                interest(1)
    -                menu(waveformPOST)
    +		prompt("Post Value Monitors")
    +		promptgroup("80 - Display")
    +		interest(1)
    +		menu(waveformPOST)
     	}
     	field(APST,DBF_MENU) {
    -                prompt("Post Archive Monitors")
    -                promptgroup(GUI_DISPLAY)
    -                interest(1)
    -                menu(waveformPOST)
    -        }
    +		prompt("Post Archive Monitors")
    +		promptgroup("80 - Display")
    +		interest(1)
    +		menu(waveformPOST)
    +	}
     	field(HASH,DBF_ULONG) {
     		prompt("Hash of OnChange data.")
     		interest(3)
    diff --git a/src/std/softIoc/base.dbd b/src/std/softIoc/base.dbd
    index 644d8bbaa..58f4884ea 100644
    --- a/src/std/softIoc/base.dbd
    +++ b/src/std/softIoc/base.dbd
    @@ -1,5 +1,3 @@
    -# $Revision-Id$
    -#
     # This file includes the standard record types and device support
     # provided by Base and (usually) loaded into all IOCs.
     
    diff --git a/src/std/softIoc/softIocExit.db b/src/std/softIoc/softIocExit.db
    index b5c027d70..c530f778a 100644
    --- a/src/std/softIoc/softIocExit.db
    +++ b/src/std/softIoc/softIocExit.db
    @@ -1,7 +1,15 @@
    -# $Revision-Id$
    -#
    +# softIocExit.db
    +
     record(sub,"$(IOC):exit") {
    -	field(DESC,"Exit subroutine")
    -	field(SCAN,"Passive")
    -	field(SNAM,"exit")
    +    field(DESC,"Exit subroutine")
    +    field(SCAN,"Passive")
    +    field(SNAM,"exit")
    +}
    +
    +record(stringin,"$(IOC):BaseVersion") {
    +    field(DESC,"EPICS Base Version")
    +    field(DTYP,"getenv")
    +    field(INP,"@EPICS_VERSION_FULL")
    +    field(PINI,"YES")
    +    field(DISP,1)
     }
    diff --git a/src/std/softIoc/softMain.cpp b/src/std/softIoc/softMain.cpp
    index 13ecce884..8400a6554 100644
    --- a/src/std/softIoc/softMain.cpp
    +++ b/src/std/softIoc/softMain.cpp
    @@ -7,8 +7,6 @@
     * found in the file LICENSE that is included with this distribution.
     \*************************************************************************/
     
    -/* $Revision-Id$ */
    -
     /* Author: Andrew Johnson	Date: 2003-04-08 */
     
     /* Usage:
    diff --git a/src/template/base/makeBaseApp.pl b/src/template/base/makeBaseApp.pl
    index 65091a0fb..d6da8adf8 100644
    --- a/src/template/base/makeBaseApp.pl
    +++ b/src/template/base/makeBaseApp.pl
    @@ -1,7 +1,6 @@
     #!/usr/bin/env perl
     
     # Authors: Ralph Lange, Marty Kraimer, Andrew Johnson and Janet Anderson
    -# $Revision-Id$
     
     use FindBin qw($Bin);
     use lib ("$Bin/../../lib/perl", $Bin);
    @@ -419,7 +418,8 @@ EOF
     }
     
     sub GetUser {
    -    $user = $opt_u || $ENV{USER} || $ENV{USERNAME} || Win32::LoginName();
    +    $user = $opt_u || $ENV{USER} || $ENV{USERNAME} || getlogin();
    +    $user = Win32::LoginName() if !$user && $^ eq 'MSWin32';
     
         unless ($user) {
     	print "Strange, I cannot figure out your user name!\n";
    diff --git a/src/template/base/top/caClientApp/caMonitor.c b/src/template/base/top/caClientApp/caMonitor.c
    index 059fefb5e..9554cc744 100644
    --- a/src/template/base/top/caClientApp/caMonitor.c
    +++ b/src/template/base/top/caClientApp/caMonitor.c
    @@ -109,6 +109,7 @@ int main(int argc,char **argv)
             pmynode[npv] = callocMustSucceed(1, sizeof(MYNODE), "caMonitor");
             npv++;
         }
    +    fclose(fp);
         SEVCHK(ca_context_create(ca_disable_preemptive_callback),"ca_context_create");
         SEVCHK(ca_add_exception_event(exceptionCallback,NULL),
     	"ca_add_exception_event");
    diff --git a/src/template/base/top/caServerApp/exAsyncPV.cc b/src/template/base/top/caServerApp/exAsyncPV.cc
    index 7e0758c13..b5bff9181 100644
    --- a/src/template/base/top/caServerApp/exAsyncPV.cc
    +++ b/src/template/base/top/caServerApp/exAsyncPV.cc
    @@ -3,9 +3,8 @@
     *     National Laboratory.
     * Copyright (c) 2002 The Regents of the University of California, as
     *     Operator of Los Alamos National Laboratory.
    -* EPICS BASE Versions 3.13.7
    -* and higher are distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* EPICS BASE is distributed subject to a Software License Agreement found
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     
     //
    @@ -30,23 +29,23 @@ exAsyncPV::exAsyncPV ( exServer & cas, pvInfo & setup,
     //
     caStatus exAsyncPV::read (const casCtx &ctx, gdd &valueIn)
     {
    -	exAsyncReadIO	*pIO;
    -	
    -	if ( this->simultAsychReadIOCount >= this->cas.maxSimultAsyncIO () ) {
    -		return S_casApp_postponeAsyncIO;
    -	}
    +    exAsyncReadIO *pIO;
     
    -	pIO = new exAsyncReadIO ( this->cas, ctx, 
    -	                *this, valueIn, this->asyncDelay );
    -	if ( ! pIO ) {
    +    if ( this->simultAsychReadIOCount >= this->cas.maxSimultAsyncIO () ) {
    +        return S_casApp_postponeAsyncIO;
    +    }
    +
    +    pIO = new exAsyncReadIO ( this->cas, ctx,
    +                *this, valueIn, this->asyncDelay );
    +    if ( ! pIO ) {
             if ( this->simultAsychReadIOCount > 0 ) {
                 return S_casApp_postponeAsyncIO;
             }
             else {
    -		    return S_casApp_noMemory;
    +            return S_casApp_noMemory;
             }
    -	}
    -	this->simultAsychReadIOCount++;
    +    }
    +    this->simultAsychReadIOCount++;
         return S_casApp_asyncCompletion;
     }
     
    @@ -54,24 +53,24 @@ caStatus exAsyncPV::read (const casCtx &ctx, gdd &valueIn)
     // exAsyncPV::writeNotify()
     //
     caStatus exAsyncPV::writeNotify ( const casCtx &ctx, const gdd &valueIn )
    -{	
    -	if ( this->simultAsychWriteIOCount >= this->cas.maxSimultAsyncIO() ) {
    -		return S_casApp_postponeAsyncIO;
    -	}
    +{
    +    if ( this->simultAsychWriteIOCount >= this->cas.maxSimultAsyncIO() ) {
    +        return S_casApp_postponeAsyncIO;
    +    }
     
    -	exAsyncWriteIO * pIO = new 
    +    exAsyncWriteIO * pIO = new
             exAsyncWriteIO ( this->cas, ctx, *this, 
    -	                    valueIn, this->asyncDelay );
    -	if ( ! pIO ) {
    +                        valueIn, this->asyncDelay );
    +    if ( ! pIO ) {
             if ( this->simultAsychReadIOCount > 0 ) {
                 return S_casApp_postponeAsyncIO;
             }
             else {
    -		    return S_casApp_noMemory;
    +            return S_casApp_noMemory;
             }
         }
    -	this->simultAsychWriteIOCount++;
    -	return S_casApp_asyncCompletion;
    +    this->simultAsychWriteIOCount++;
    +    return S_casApp_asyncCompletion;
     }
     
     //
    @@ -79,24 +78,24 @@ caStatus exAsyncPV::writeNotify ( const casCtx &ctx, const gdd &valueIn )
     //
     caStatus exAsyncPV::write ( const casCtx &ctx, const gdd &valueIn )
     {
    -	// implement the discard intermediate values, but last value
    +    // implement the discard intermediate values, but last value
         // sent always applied behavior that IOCs provide excepting
         // that we will alow N requests to pend instead of a limit
         // of only one imposed in the IOC
    -	if ( this->simultAsychWriteIOCount >= this->cas.maxSimultAsyncIO() ) {
    +    if ( this->simultAsychWriteIOCount >= this->cas.maxSimultAsyncIO() ) {
             pStandbyValue.set ( & valueIn );
    -		return S_casApp_success;
    -	}
    -
    -	exAsyncWriteIO * pIO = new 
    -        exAsyncWriteIO ( this->cas, ctx, *this, 
    -	                    valueIn, this->asyncDelay );
    -	if ( ! pIO ) {
    -        pStandbyValue.set ( & valueIn );
    -		return S_casApp_success;
    +        return S_casApp_success;
         }
    -	this->simultAsychWriteIOCount++;
    -	return S_casApp_asyncCompletion;
    +
    +    exAsyncWriteIO * pIO = new 
    +        exAsyncWriteIO ( this->cas, ctx, *this, 
    +                        valueIn, this->asyncDelay );
    +    if ( ! pIO ) {
    +        pStandbyValue.set ( & valueIn );
    +        return S_casApp_success;
    +    }
    +    this->simultAsychWriteIOCount++;
    +    return S_casApp_asyncCompletion;
     }
     
     // Implementing a specialized update for exAsyncPV
    @@ -150,7 +149,7 @@ void exAsyncPV::removeWriteIO ()
     exAsyncWriteIO::exAsyncWriteIO ( exServer & cas,
             const casCtx & ctxIn, exAsyncPV & pvIn, 
             const gdd & valueIn, double asyncDelay ) :
    -	casAsyncWriteIO ( ctxIn ), pv ( pvIn ), 
    +    casAsyncWriteIO ( ctxIn ), pv ( pvIn ), 
             timer ( cas.createTimer () ), pValue(valueIn)
     {
         this->timer.start ( *this, asyncDelay );
    @@ -168,7 +167,7 @@ exAsyncWriteIO::~exAsyncWriteIO()
         if ( this->pValue.valid () ) {
             this->pv.updateFromAsyncWrite ( *this->pValue );
         }
    -	this->pv.removeWriteIO();
    +    this->pv.removeWriteIO();
     }
     
     //
    @@ -179,9 +178,9 @@ epicsTimerNotify::expireStatus exAsyncWriteIO::
         expire ( const epicsTime & /* currentTime */ ) 
     {
         assert ( this->pValue.valid () );
    -	caStatus status = this->pv.updateFromAsyncWrite ( *this->pValue );
    -	this->pValue.set ( 0 );
    -	this->postIOCompletion ( status );
    +    caStatus status = this->pv.updateFromAsyncWrite ( *this->pValue );
    +    this->pValue.set ( 0 );
    +    this->postIOCompletion ( status );
         return noRestart;
     }
     
    @@ -191,7 +190,7 @@ epicsTimerNotify::expireStatus exAsyncWriteIO::
     exAsyncReadIO::exAsyncReadIO ( exServer & cas, const casCtx & ctxIn, 
                                   exAsyncPV & pvIn, gdd & protoIn,
                                   double asyncDelay ) :
    -	casAsyncReadIO ( ctxIn ), pv ( pvIn ), 
    +    casAsyncReadIO ( ctxIn ), pv ( pvIn ), 
             timer ( cas.createTimer() ), pProto ( protoIn )
     {
         this->timer.start ( *this, asyncDelay );
    @@ -202,7 +201,7 @@ exAsyncReadIO::exAsyncReadIO ( exServer & cas, const casCtx & ctxIn,
     //
     exAsyncReadIO::~exAsyncReadIO()
     {
    -	this->pv.removeReadIO ();
    +    this->pv.removeReadIO ();
         this->timer.destroy ();
     }
     
    @@ -213,16 +212,16 @@ exAsyncReadIO::~exAsyncReadIO()
     epicsTimerNotify::expireStatus 
         exAsyncReadIO::expire ( const epicsTime & /* currentTime */ )
     {
    -	//
    -	// map between the prototype in and the
    -	// current value
    -	//
    -	caStatus status = this->pv.exPV::readNoCtx ( this->pProto );
    +    //
    +    // map between the prototype in and the
    +    // current value
    +    //
    +    caStatus status = this->pv.exPV::readNoCtx ( this->pProto );
     
    -	//
    -	// post IO completion
    -	//
    -	this->postIOCompletion ( status, *this->pProto );
    +    //
    +    // post IO completion
    +    //
    +    this->postIOCompletion ( status, *this->pProto );
     
         return noRestart;
     }
    diff --git a/src/template/base/top/caServerApp/exPV.cc b/src/template/base/top/caServerApp/exPV.cc
    index af99c4e6a..97430c000 100644
    --- a/src/template/base/top/caServerApp/exPV.cc
    +++ b/src/template/base/top/caServerApp/exPV.cc
    @@ -3,9 +3,8 @@
     *     National Laboratory.
     * Copyright (c) 2002 The Regents of the University of California, as
     *     Operator of Los Alamos National Laboratory.
    -* EPICS BASE Versions 3.13.7
    -* and higher are distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* EPICS BASE is distributed subject to a Software License Agreement found
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     //
     // Example EPICS CA server
    @@ -42,7 +41,7 @@ exPV::exPV ( exServer & casIn, pvInfo & setup,
         //
         // no dataless PV allowed
         //
    -    assert (this->info.getElementCount()>=1u);
    +    assert (this->info.getCapacity()>=1u);
     
         //
         // start a very slow background scan 
    diff --git a/src/template/base/top/caServerApp/exScalarPV.cc b/src/template/base/top/caServerApp/exScalarPV.cc
    index 0e91d81e9..1b326fa51 100644
    --- a/src/template/base/top/caServerApp/exScalarPV.cc
    +++ b/src/template/base/top/caServerApp/exScalarPV.cc
    @@ -71,9 +71,9 @@ void exScalarPV::scan()
         }
         newValue += (float) ( sin (radians) / 10.0 );
         limit = (float) this->info.getHopr ();
    -    newValue = tsMin ( newValue, limit );
    +    newValue = epicsMin ( newValue, limit );
         limit = (float) this->info.getLopr ();
    -    newValue = tsMax ( newValue, limit );
    +    newValue = epicsMax ( newValue, limit );
         *pDD = newValue;
         aitTimeStamp gddts ( this->currentTime );
         pDD->setTimeStamp ( & gddts );
    diff --git a/src/template/base/top/caServerApp/exServer.cc b/src/template/base/top/caServerApp/exServer.cc
    index 49ea802dc..f934f3608 100644
    --- a/src/template/base/top/caServerApp/exServer.cc
    +++ b/src/template/base/top/caServerApp/exServer.cc
    @@ -3,9 +3,8 @@
     *     National Laboratory.
     * Copyright (c) 2002 The Regents of the University of California, as
     *     Operator of Los Alamos National Laboratory.
    -* EPICS BASE Versions 3.13.7
    -* and higher are distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* EPICS BASE is distributed subject to a Software License Agreement found
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     //
     // fileDescriptorManager.process(delay);
    @@ -304,7 +303,7 @@ exPV *pvInfo::createPV ( exServer & cas, bool preCreateFlag,
         // depending on the io type and the number
         // of elements
         //
    -    if (this->elementCount==1u) {
    +    if (this->capacity==1u) {
             switch (this->ioType){
             case excasIoSync:
                 pNewPV = new exScalarPV ( cas, *this, preCreateFlag, scanOn );
    diff --git a/src/template/base/top/caServerApp/exServer.h b/src/template/base/top/caServerApp/exServer.h
    index 59ba11309..cd9a897d3 100644
    --- a/src/template/base/top/caServerApp/exServer.h
    +++ b/src/template/base/top/caServerApp/exServer.h
    @@ -3,9 +3,8 @@
     *     National Laboratory.
     * Copyright (c) 2002 The Regents of the University of California, as
     *     Operator of Los Alamos National Laboratory.
    -* EPICS BASE Versions 3.13.7
    -* and higher are distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* EPICS BASE is distributed subject to a Software License Agreement found
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     //
     //  Example EPICS CA server
    @@ -45,7 +44,7 @@
     #include "casdef.h"
     #include "epicsAssert.h"
     #include "resourceLib.h"
    -#include "tsMinMax.h"
    +#include "epicsAlgorithm.h"
     
     #ifndef NELEMENTS
     #   define NELEMENTS(A) (sizeof(A)/sizeof(A[0]))
    @@ -76,8 +75,10 @@ public:
         double getLopr () const; 
         aitEnum getType () const; 
         excasIoType  getIOType () const; 
    -    unsigned getElementCount () const; 
    -    void unlinkPV (); 
    +    unsigned getCapacity () const;
    +    unsigned getElementCount () const;
    +    void setElementCount (unsigned);
    +    void unlinkPV ();
         exPV *createPV  ( exServer &  exCAS, bool  preCreateFlag, 
             bool  scanOn, double  asyncDelay ); 
         void deletePV ();
    @@ -88,7 +89,8 @@ private:
         const double lopr;
         aitEnum type;
         const excasIoType ioType;
    -    const unsigned elementCount;
    +    const unsigned capacity;
    +    unsigned elementCount;
         exPV * pPV;
         pvInfo & operator = ( const pvInfo & );
     };
    @@ -441,8 +443,8 @@ inline pvInfo::pvInfo ( double scanPeriodIn, const char *pNameIn,
     
         scanPeriod ( scanPeriodIn ), pName ( pNameIn ), 
         hopr ( hoprIn ), lopr ( loprIn ), type ( typeIn ),
    -    ioType ( ioTypeIn ), elementCount ( countIn ), 
    -    pPV ( 0 )
    +    ioType ( ioTypeIn ), capacity ( countIn ),
    +    elementCount ( 0 ), pPV ( 0 )
     {
     }
     
    @@ -454,8 +456,8 @@ inline pvInfo::pvInfo ( const pvInfo & copyIn ) :
     
         scanPeriod ( copyIn.scanPeriod ), pName ( copyIn.pName ), 
         hopr ( copyIn.hopr ), lopr ( copyIn.lopr ), type ( copyIn.type ),
    -    ioType ( copyIn.ioType ), elementCount ( copyIn.elementCount ),
    -    pPV ( copyIn.pPV )
    +    ioType ( copyIn.ioType ), capacity ( copyIn.capacity ),
    +    elementCount ( copyIn.elementCount ), pPV ( copyIn.pPV )
     {
     }
     
    @@ -509,12 +511,22 @@ inline excasIoType pvInfo::getIOType () const
         return this->ioType; 
     }
     
    -inline unsigned pvInfo::getElementCount () const 
    -{ 
    -    return this->elementCount; 
    +inline unsigned pvInfo::getCapacity () const
    +{
    +    return this->capacity;
     }
     
    -inline void pvInfo::unlinkPV () 
    +inline unsigned pvInfo::getElementCount () const
    +{
    +    return this->elementCount;
    +}
    +
    +inline void pvInfo::setElementCount (unsigned newCount)
    +{
    +    this->elementCount = newCount;
    +}
    +
    +inline void pvInfo::unlinkPV ()
     { 
         this->pPV = NULL; 
     }
    diff --git a/src/template/base/top/caServerApp/exVectorPV.cc b/src/template/base/top/caServerApp/exVectorPV.cc
    index 963b59082..932188806 100644
    --- a/src/template/base/top/caServerApp/exVectorPV.cc
    +++ b/src/template/base/top/caServerApp/exVectorPV.cc
    @@ -3,9 +3,8 @@
     *     National Laboratory.
     * Copyright (c) 2002 The Regents of the University of California, as
     *     Operator of Los Alamos National Laboratory.
    -* EPICS BASE Versions 3.13.7
    -* and higher are distributed subject to a Software License Agreement found
    -* in file LICENSE that is included with this distribution. 
    +* EPICS BASE is distributed subject to a Software License Agreement found
    +* in file LICENSE that is included with this distribution.
     \*************************************************************************/
     
     #include "exServer.h"
    @@ -48,7 +47,7 @@ unsigned exVectorPV::maxDimension() const
     aitIndex exVectorPV::maxBound (unsigned dimension) const
     {
         if (dimension==0u) {
    -        return this->info.getElementCount();
    +        return this->info.getCapacity();
         }
         else {
             return 0u;
    @@ -60,45 +59,40 @@ aitIndex exVectorPV::maxBound (unsigned dimension) const
     //
     void exVectorPV::scan()
     {
    -    caStatus            status;
    -    double              radians;
    -    smartGDDPointer     pDD;
    -    aitFloat32          *pF, *pFE;
    -    const aitFloat32    *pCF;
    -    float               newValue;
    -    float               limit;
    -    exVecDestructor     *pDest;
    -    int                 gddStatus;
    +    static epicsTime startTime = epicsTime::getCurrent();
     
    -    //
    -    // update current time (so we are not required to do
    -    // this every time that we write the PV which impacts
    -    // throughput under sunos4 because gettimeofday() is
    -    // slow)
    +    // update current time
         //
         this->currentTime = epicsTime::getCurrent();
    - 
    -    pDD = new gddAtomic (gddAppType_value, aitEnumFloat64, 
    -            1u, this->info.getElementCount());
    +
    +    // demonstrate a changing array size
    +    unsigned ramp = 15 & (unsigned) (this->currentTime - startTime);
    +    unsigned newSize = this->info.getCapacity();
    +    if (newSize > ramp) {
    +        newSize -= ramp;
    +    }
    +
    +    smartGDDPointer pDD = new gddAtomic (gddAppType_value, aitEnumFloat64,
    +            1u, newSize);
         if ( ! pDD.valid () ) {
             return;
         }
    - 
    +
         //
         // smart pointer class manages reference count after this point
         //
    -    gddStatus = pDD->unreference();
    -    assert (!gddStatus);
    +    gddStatus gdds = pDD->unreference();
    +    assert(!gdds);
     
         //
         // allocate array buffer
         //
    -    pF = new aitFloat32 [this->info.getElementCount()];
    +    aitFloat64 * pF = new aitFloat64 [newSize];
         if (!pF) {
             return;
         }
     
    -    pDest = new exVecDestructor;
    +    exVecDestructor * pDest = new exVecDestructor;
         if (!pDest) {
             delete [] pF;
             return;
    @@ -114,37 +108,39 @@ void exVectorPV::scan()
         // double check for reasonable bounds on the
         // current value
         //
    -    pCF=NULL;
    -    if ( this->pValue.valid () ) {
    -        if (this->pValue->dimension()==1u) {
    -            const gddBounds *pB = this->pValue->getBounds();
    -            if (pB[0u].size()==this->info.getElementCount()) {
    -                pCF = *this->pValue;
    -            }
    -        }
    +    const aitFloat64 *pCF = NULL, *pCFE = NULL;
    +    if (this->pValue.valid () &&
    +        this->pValue->dimension() == 1u) {
    +        const gddBounds *pB = this->pValue->getBounds();
    +
    +        pCF = *this->pValue;
    +        pCFE = &pCF[pB->size()];
         }
     
    -    pFE = &pF[this->info.getElementCount()];
    -    while (pFinfo.getHopr();
    -        newValue = tsMin (newValue, limit);
    -        limit = (float) this->info.getLopr();
    -        newValue = tsMax (newValue, limit);
    -        *(pF++) = newValue;
    +        newValue += (sin (radians) / 10.0);
    +        double limit = this->info.getHopr();
    +        newValue = epicsMin (newValue, limit);
    +        limit = this->info.getLopr();
    +        newValue = epicsMax (newValue, limit);
    +        *pF++ = newValue;
         }
     
         aitTimeStamp gddts = this->currentTime;
         pDD->setTimeStamp ( & gddts );
     
    -    status = this->update ( *pDD );
    +    caStatus status = this->update ( *pDD );
    +    this->info.setElementCount(newSize);
    +
         if ( status != S_casApp_success ) {
             errMessage (status, "vector scan update failed\n");
         }
    @@ -166,7 +162,7 @@ void exVectorPV::scan()
     //
     caStatus exVectorPV::updateValue ( const gdd & value )
     {
    -
    +    aitUint32 newSize = 0;
         //
         // Check bounds of incoming request
         // (and see if we are replacing all elements -
    @@ -183,7 +179,9 @@ caStatus exVectorPV::updateValue ( const gdd & value )
             if ( pb[0u].first() != 0u ) {
                 return S_casApp_outOfBounds;
             }
    -        else if ( pb[0u].size() > this->info.getElementCount() ) {
    +
    +        newSize = pb[0u].size();
    +        if ( newSize > this->info.getCapacity() ) {
                 return S_casApp_outOfBounds;
             }
         }
    @@ -193,14 +191,14 @@ caStatus exVectorPV::updateValue ( const gdd & value )
             //
             return S_casApp_outOfBounds;
         }
    -        
    +
         //
         // Create a new array data descriptor
         // (so that old values that may be referenced on the
         // event queue are not replaced)
         //
    -    smartGDDPointer pNewValue ( new gddAtomic ( gddAppType_value, aitEnumFloat64, 
    -        1u, this->info.getElementCount() ) );
    +    smartGDDPointer pNewValue ( new gddAtomic ( gddAppType_value, aitEnumFloat64,
    +        1u, newSize ) );
         if ( ! pNewValue.valid() ) {
             return S_casApp_noMemory;
         }
    @@ -211,21 +209,20 @@ caStatus exVectorPV::updateValue ( const gdd & value )
         //
         gddStatus gdds = pNewValue->unreference( );
         assert ( ! gdds );
    -    
    +
         //
         // allocate array buffer
         //
    -    aitFloat64 * pF = new aitFloat64 [this->info.getElementCount()];
    +    aitFloat64 * pF = new aitFloat64 [newSize];
         if (!pF) {
             return S_casApp_noMemory;
         }
    -    
    +
         //
         // Install (and initialize) array buffer
         // if no old values exist
         //
    -    unsigned count = this->info.getElementCount();
    -    for ( unsigned i = 0u; i < count; i++ ) {
    +    for ( unsigned i = 0u; i < newSize; i++ ) {
             pF[i] = 0.0f;
         }
     
    @@ -240,7 +237,7 @@ caStatus exVectorPV::updateValue ( const gdd & value )
         // (do this before we increment pF)
         //
         pNewValue->putRef ( pF, pDest );
    -    
    +
         //
         // copy in the values that they are writing
         //
    @@ -248,9 +245,10 @@ caStatus exVectorPV::updateValue ( const gdd & value )
         if ( gdds ) {
             return S_cas_noConvert;
         }
    -    
    +
         this->pValue = pNewValue;
    -    
    +    this->info.setElementCount(newSize);
    +
         return S_casApp_success;
     }
     
    @@ -261,6 +259,6 @@ caStatus exVectorPV::updateValue ( const gdd & value )
     //
     void exVecDestructor::run ( void *pUntyped )
     {
    -    aitFloat32 * pf = reinterpret_cast < aitFloat32 * > ( pUntyped );
    +    aitFloat64 * pf = reinterpret_cast < aitFloat64 * > ( pUntyped );
         delete [] pf;
     }
    diff --git a/src/template/base/top/caServerApp/vxEntry.cc b/src/template/base/top/caServerApp/vxEntry.cc
    index 14984fe19..1cb240723 100644
    --- a/src/template/base/top/caServerApp/vxEntry.cc
    +++ b/src/template/base/top/caServerApp/vxEntry.cc
    @@ -8,10 +8,8 @@
     * in file LICENSE that is included with this distribution. 
     \*************************************************************************/
     //
    -// $Revision-Id$
     // Author: Jeff HIll (LANL)
     //
    -//
     
     #include 
     #include 
    diff --git a/src/template/base/top/configure/CONFIG_SITE b/src/template/base/top/configure/CONFIG_SITE
    index 208aa7e68..212485ebe 100644
    --- a/src/template/base/top/configure/CONFIG_SITE
    +++ b/src/template/base/top/configure/CONFIG_SITE
    @@ -34,3 +34,10 @@ CHECK_RELEASE = YES
     #   or CROSS_OPT settings from base/configure/CONFIG_SITE
     #HOST_OPT = NO
     #CROSS_OPT = NO
    +
    +# These allow developers to override the CONFIG_SITE variable
    +# settings without having to modify the configure/CONFIG_SITE
    +# file itself.
    +-include $(TOP)/../CONFIG_SITE.local
    +-include $(TOP)/configure/CONFIG_SITE.local
    +
    diff --git a/src/template/base/top/configure/RELEASE b/src/template/base/top/configure/RELEASE
    index 84074fe15..dbd742b45 100644
    --- a/src/template/base/top/configure/RELEASE
    +++ b/src/template/base/top/configure/RELEASE
    @@ -14,19 +14,30 @@
     #  RELEASE.Common.$(T_A)
     #  RELEASE.$(EPICS_HOST_ARCH).$(T_A)
     #
    -# This file should ONLY define paths to other support modules,
    -# or include statements that pull in similar RELEASE files.
    -# Build settings that are NOT module paths should appear in a
    -# CONFIG_SITE file.
    +# This file is parsed by both GNUmake and an EPICS Perl script,
    +# so it can ONLY contain definititions of paths to other support
    +# modules, variable definitions that are used in module paths,
    +# and include statements that pull in other RELEASE files.
    +# Variables may be used before their values have been set.
    +# Build variables that are NOT used in paths should be set in
    +# the CONFIG_SITE file.
     
    -TEMPLATE_TOP=_TEMPLATE_TOP_
    +# Variables and paths to dependent modules:
    +#MODULES = /path/to/modules
    +#MYMODULE = $(MODULES)/my-module
     
     # If using the sequencer, point SNCSEQ at its top directory:
    -#SNCSEQ=$(EPICS_BASE)/../modules/soft/seq
    +#SNCSEQ = $(MODULES)/seq-ver
     
    -# EPICS_BASE usually appears last so other apps can override stuff:
    -EPICS_BASE=_EPICS_BASE_
    +# EPICS_BASE should appear last so earlier modules can override stuff:
    +EPICS_BASE = _EPICS_BASE_
     
    -# Set RULES here if you want to take build rules from somewhere
    +# Set RULES here if you want to use build rules from somewhere
     # other than EPICS_BASE:
    -#RULES=/path/to/epics/support/module/rules/x-y
    +#RULES = $(MODULES)/build-rules
    +
    +# These allow developers to override the RELEASE variable settings
    +# without having to modify the configure/RELEASE file itself.
    +-include $(TOP)/../RELEASE.local
    +-include $(TOP)/configure/RELEASE.local
    +
    diff --git a/src/template/base/top/exampleApp/src/Makefile b/src/template/base/top/exampleApp/src/Makefile
    index 024726e24..fe010d583 100644
    --- a/src/template/base/top/exampleApp/src/Makefile
    +++ b/src/template/base/top/exampleApp/src/Makefile
    @@ -4,6 +4,9 @@ include $(TOP)/configure/CONFIG
     #----------------------------------------
     #  ADD MACRO DEFINITIONS BELOW HERE
     
    +# Use typed rset structure (see 3.16.1 release notes)
    +USR_CPPFLAGS += -DUSE_TYPED_RSET
    +
     # xxxRecord.h will be created from xxxRecord.dbd
     DBDINC += xxxRecord
     
    @@ -54,9 +57,6 @@ _APPNAME__SRCS += _APPNAME__registerRecordDeviceDriver.cpp
     _APPNAME__SRCS_DEFAULT += _APPNAME_Main.cpp
     _APPNAME__SRCS_vxWorks += -nil-
     
    -# Add support from base/src/vxWorks if needed
    -#_APPNAME__OBJS_vxWorks += $(EPICS_BASE_BIN)/vxComLibrary
    -
     # Link in the code from our support library
     _APPNAME__LIBS += _APPNAME_Support
     
    @@ -66,6 +66,7 @@ ifneq ($(SNCSEQ),)
         # Build sncExample into _APPNAME_Support
         sncExample_SNCFLAGS += +r
         _APPNAME__DBD += sncExample.dbd
    +    # A .stt sequence program is *not* pre-processed:
         _APPNAME_Support_SRCS += sncExample.stt
         _APPNAME_Support_LIBS += seq pv
         _APPNAME__LIBS += seq pv
    @@ -73,6 +74,7 @@ ifneq ($(SNCSEQ),)
         # Build sncProgram as a standalone program
         PROD_HOST += sncProgram
         sncProgram_SNCFLAGS += +m
    +    # A .st sequence program *is* pre-processed:
         sncProgram_SRCS += sncProgram.st
         sncProgram_LIBS += seq pv
         sncProgram_LIBS += $(EPICS_BASE_HOST_LIBS)
    diff --git a/src/template/base/top/exampleApp/src/xxxRecord.c b/src/template/base/top/exampleApp/src/xxxRecord.c
    index f4b65d204..c2693c48e 100644
    --- a/src/template/base/top/exampleApp/src/xxxRecord.c
    +++ b/src/template/base/top/exampleApp/src/xxxRecord.c
    @@ -25,21 +25,21 @@
     /* Create RSET - Record Support Entry Table */
     #define report NULL
     #define initialize NULL
    -static long init_record();
    -static long process();
    +static long init_record(struct dbCommon *, int);
    +static long process(struct dbCommon *);
     #define special NULL
     #define get_value NULL
     #define cvt_dbaddr NULL
     #define get_array_info NULL
     #define put_array_info NULL
    -static long get_units();
    -static long get_precision();
    +static long get_units(DBADDR *, char *);
    +static long get_precision(const DBADDR *, long *);
     #define get_enum_str NULL
     #define get_enum_strs NULL
     #define put_enum_str NULL
    -static long get_graphic_double();
    -static long get_control_double();
    -static long get_alarm_double();
    +static long get_graphic_double(DBADDR *, struct dbr_grDouble *);
    +static long get_control_double(DBADDR *, struct dbr_ctrlDouble *);
    +static long get_alarm_double(DBADDR *, struct dbr_alDouble *);
      
     rset xxxRSET={
     	RSETNUMBER,
    @@ -75,9 +75,9 @@ typedef struct xxxset { /* xxx input dset */
     static void checkAlarms(xxxRecord *prec);
     static void monitor(xxxRecord *prec);
     
    -static long init_record(void *precord,int pass)
    +static long init_record(struct dbCommon *pcommon, int pass)
     {
    -    xxxRecord	*prec = (xxxRecord *)precord;
    +    xxxRecord *prec = (xxxRecord *)pcommon;
         xxxdset	*pdset;
         long	status;
     
    @@ -99,9 +99,9 @@ static long init_record(void *precord,int pass)
         return(0);
     }
     
    -static long process(void *precord)
    +static long process(struct dbCommon *pcommon)
     {
    -	xxxRecord	*prec = (xxxRecord *)precord;
    +    xxxRecord	*prec = (xxxRecord *)pcommon;
     	xxxdset		*pdset = (xxxdset *)(prec->dset);
     	long		 status;
     	unsigned char    pact=prec->pact;
    @@ -138,7 +138,7 @@ static long get_units(DBADDR *paddr, char *units)
         return(0);
     }
     
    -static long get_precision(DBADDR *paddr, long *precision)
    +static long get_precision(const DBADDR *paddr, long *precision)
     {
         xxxRecord	*prec=(xxxRecord *)paddr->precord;
     
    diff --git a/src/template/base/top/exampleApp/src/xxxRecord.dbd b/src/template/base/top/exampleApp/src/xxxRecord.dbd
    index 4a71c5409..12c1d6202 100644
    --- a/src/template/base/top/exampleApp/src/xxxRecord.dbd
    +++ b/src/template/base/top/exampleApp/src/xxxRecord.dbd
    @@ -2,101 +2,102 @@ recordtype(xxx) {
     	include "dbCommon.dbd" 
     	field(VAL,DBF_DOUBLE) {
     		prompt("Current EGU Value")
    -		asl(ASL0)
    +                promptgroup("40 - Input")
    +                asl(ASL0)
     		pp(TRUE)
     	}
     	field(INP,DBF_INLINK) {
     		prompt("Input Specification")
    -		promptgroup(GUI_INPUTS)
    +                promptgroup("40 - Input")
     		special(SPC_NOMOD)
     		interest(1)
     	}
     	field(PREC,DBF_SHORT) {
     		prompt("Display Precision")
    -		promptgroup(GUI_DISPLAY)
    +                promptgroup("80 - Display")
     		interest(1)
     	}
     	field(EGU,DBF_STRING) {
     		prompt("Engineering Units")
    -		promptgroup(GUI_DISPLAY)
    +                promptgroup("80 - Display")
     		interest(1)
     		size(16)
     	}
     	field(HOPR,DBF_FLOAT) {
     		prompt("High Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +                promptgroup("80 - Display")
     		interest(1)
     	}
     	field(LOPR,DBF_FLOAT) {
     		prompt("Low Operating Range")
    -		promptgroup(GUI_DISPLAY)
    +                promptgroup("80 - Display")
     		interest(1)
     	}
     	field(HIHI,DBF_FLOAT) {
     		prompt("Hihi Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +                promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     	}
     	field(LOLO,DBF_FLOAT) {
     		prompt("Lolo Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +                promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     	}
     	field(HIGH,DBF_FLOAT) {
     		prompt("High Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +                promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     	}
     	field(LOW,DBF_FLOAT) {
     		prompt("Low Alarm Limit")
    -		promptgroup(GUI_ALARMS)
    +                promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     	}
     	field(HHSV,DBF_MENU) {
     		prompt("Hihi Severity")
    -		promptgroup(GUI_ALARMS)
    +                promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(LLSV,DBF_MENU) {
     		prompt("Lolo Severity")
    -		promptgroup(GUI_ALARMS)
    +                promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(HSV,DBF_MENU) {
     		prompt("High Severity")
    -		promptgroup(GUI_ALARMS)
    +                promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(LSV,DBF_MENU) {
     		prompt("Low Severity")
    -		promptgroup(GUI_ALARMS)
    +                promptgroup("70 - Alarm")
     		pp(TRUE)
     		interest(1)
     		menu(menuAlarmSevr)
     	}
     	field(HYST,DBF_DOUBLE) {
     		prompt("Alarm Deadband")
    -		promptgroup(GUI_ALARMS)
    +                promptgroup("70 - Alarm")
     		interest(1)
     	}
     	field(ADEL,DBF_DOUBLE) {
     		prompt("Archive Deadband")
    -		promptgroup(GUI_DISPLAY)
    +                promptgroup("80 - Display")
     		interest(1)
     	}
     	field(MDEL,DBF_DOUBLE) {
     		prompt("Monitor Deadband")
    -		promptgroup(GUI_DISPLAY)
    +                promptgroup("80 - Display")
     		interest(1)
     	}
     	field(LALM,DBF_DOUBLE) {
    diff --git a/src/template/base/top/exampleBoot/ioc/Makefile@Common b/src/template/base/top/exampleBoot/ioc/Makefile@Common
    index 64a3e8bf7..e064d7344 100644
    --- a/src/template/base/top/exampleBoot/ioc/Makefile@Common
    +++ b/src/template/base/top/exampleBoot/ioc/Makefile@Common
    @@ -1,5 +1,4 @@
     TOP = ../..
     include $(TOP)/configure/CONFIG
    -ARCH = _ARCH_
     TARGETS = envPaths
     include $(TOP)/configure/RULES.ioc
    diff --git a/src/template/base/top/iocBoot/ioc/Makefile@Common b/src/template/base/top/iocBoot/ioc/Makefile@Common
    index 64a3e8bf7..e064d7344 100644
    --- a/src/template/base/top/iocBoot/ioc/Makefile@Common
    +++ b/src/template/base/top/iocBoot/ioc/Makefile@Common
    @@ -1,5 +1,4 @@
     TOP = ../..
     include $(TOP)/configure/CONFIG
    -ARCH = _ARCH_
     TARGETS = envPaths
     include $(TOP)/configure/RULES.ioc
    diff --git a/src/template/ext/makeBaseExt.pl b/src/template/ext/makeBaseExt.pl
    index c4185ad53..a3bf895d8 100644
    --- a/src/template/ext/makeBaseExt.pl
    +++ b/src/template/ext/makeBaseExt.pl
    @@ -1,7 +1,6 @@
     #!/usr/bin/env perl
     
     # Authors: Ralph Lange, Marty Kraimer, Andrew Johnson and Janet Anderson
    -# $Revision-Id$
     
     use Cwd;
     use Getopt::Std;
    diff --git a/src/template/ext/top/Makefile b/src/template/ext/top/Makefile
    index 053bc6ab8..91e678167 100644
    --- a/src/template/ext/top/Makefile
    +++ b/src/template/ext/top/Makefile
    @@ -1,4 +1,4 @@
    -# $Revision-Id$
    +# Makefile at the top of an extensions tree
     
     TOP = .
     include $(TOP)/configure/CONFIG
    diff --git a/src/template/ext/top/configure/Makefile b/src/template/ext/top/configure/Makefile
    index 956ca1f05..6e6609842 100644
    --- a/src/template/ext/top/configure/Makefile
    +++ b/src/template/ext/top/configure/Makefile
    @@ -1,4 +1,4 @@
    -# $Revision-Id$
    +# Makefile in extensions/configure directory
     
     TOP=..
     
    diff --git a/src/template/ext/top/configure/RULES b/src/template/ext/top/configure/RULES
    index 87f23cc85..7592a37c6 100644
    --- a/src/template/ext/top/configure/RULES
    +++ b/src/template/ext/top/configure/RULES
    @@ -1,4 +1,4 @@
    -# $Revision-Id$
    +# extensions/configure/RULES
     
     include $(CONFIG)/RULES
     -include $(TOP)/configure/RULES_PYTHON
    diff --git a/src/template/ext/top/configure/RULES_DIRS b/src/template/ext/top/configure/RULES_DIRS
    index b3ee47beb..dd6904367 100644
    --- a/src/template/ext/top/configure/RULES_DIRS
    +++ b/src/template/ext/top/configure/RULES_DIRS
    @@ -1,3 +1,3 @@
    -# $Revision-Id$
    +# extensions/configure/RULES_DIRS
     
     include $(CONFIG)/RULES_DIRS
    diff --git a/src/template/ext/top/configure/RULES_IDL b/src/template/ext/top/configure/RULES_IDL
    index c48eb8db5..3610bcc21 100644
    --- a/src/template/ext/top/configure/RULES_IDL
    +++ b/src/template/ext/top/configure/RULES_IDL
    @@ -1,4 +1,4 @@
    -# $Revision-Id$
    +# extensions/configure/RULES_IDL
     
     ifdef T_A
     ifeq ($(findstring Host,$(VALID_BUILDS)),Host)
    diff --git a/src/template/ext/top/configure/RULES_JAVA b/src/template/ext/top/configure/RULES_JAVA
    index 0285c7cd5..b6ffa3f0f 100644
    --- a/src/template/ext/top/configure/RULES_JAVA
    +++ b/src/template/ext/top/configure/RULES_JAVA
    @@ -7,8 +7,6 @@
     # and higher are distributed subject to a Software License Agreement found
     # in file LICENSE that is included with this distribution. 
     #*************************************************************************
    -# $Revision-Id$
    -#
     
     
     ifeq ($(BUILD_CLASS),HOST)
    diff --git a/src/template/ext/top/configure/RULES_PYTHON b/src/template/ext/top/configure/RULES_PYTHON
    index 41bdc9e65..49dffa02b 100644
    --- a/src/template/ext/top/configure/RULES_PYTHON
    +++ b/src/template/ext/top/configure/RULES_PYTHON
    @@ -1,4 +1,4 @@
    -# $Revision-Id$
    +# extensions/configure/RULES_PYTHON
     
     ifdef T_A
     ifeq ($(findstring Host,$(VALID_BUILDS)),Host)
    diff --git a/src/template/ext/top/configure/RULES_TOP b/src/template/ext/top/configure/RULES_TOP
    index b3b5c8d2f..1f81d3d39 100644
    --- a/src/template/ext/top/configure/RULES_TOP
    +++ b/src/template/ext/top/configure/RULES_TOP
    @@ -1,4 +1,4 @@
    -# $Revision-Id$
    +# extensions/configure/RULES_TOP
     
     include $(CONFIG)/RULES_TOP
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.Common.Common b/src/template/ext/top/configure/os/CONFIG_SITE.Common.Common
    index e6ea50981..21363a633 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.Common.Common
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.Common.Common
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.aix-ppc-gnu.aix-ppc-gnu b/src/template/ext/top/configure/os/CONFIG_SITE.aix-ppc-gnu.aix-ppc-gnu
    index aa02c0941..19d65aead 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.aix-ppc-gnu.aix-ppc-gnu
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.aix-ppc-gnu.aix-ppc-gnu
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.aix-ppc.aix-ppc b/src/template/ext/top/configure/os/CONFIG_SITE.aix-ppc.aix-ppc
    index d3ace4e2a..3f40e0b37 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.aix-ppc.aix-ppc
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.aix-ppc.aix-ppc
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86 b/src/template/ext/top/configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86
    index 948b39afe..f1745159b 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.cygwin-x86.cygwin-x86
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.darwin-ppc.darwin-ppc b/src/template/ext/top/configure/os/CONFIG_SITE.darwin-ppc.darwin-ppc
    index d546a6f3a..d8fb7c158 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.darwin-ppc.darwin-ppc
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.darwin-ppc.darwin-ppc
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.darwin-ppcx86.darwin-ppcx86 b/src/template/ext/top/configure/os/CONFIG_SITE.darwin-ppcx86.darwin-ppcx86
    index e4c0927bd..6e31ffdb4 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.darwin-ppcx86.darwin-ppcx86
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.darwin-ppcx86.darwin-ppcx86
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.darwin-x86.darwin-x86 b/src/template/ext/top/configure/os/CONFIG_SITE.darwin-x86.darwin-x86
    index 522510666..9e98c70ef 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.darwin-x86.darwin-x86
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.darwin-x86.darwin-x86
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.freebsd-x86_64.freebsd-x86_64 b/src/template/ext/top/configure/os/CONFIG_SITE.freebsd-x86_64.freebsd-x86_64
    index 300f2be27..c4d1d5670 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.freebsd-x86_64.freebsd-x86_64
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.freebsd-x86_64.freebsd-x86_64
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.linux-ppc.linux-ppc b/src/template/ext/top/configure/os/CONFIG_SITE.linux-ppc.linux-ppc
    index bd4ed29c2..4d78b29d7 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.linux-ppc.linux-ppc
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.linux-ppc.linux-ppc
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86-debug.linux-x86-debug b/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86-debug.linux-x86-debug
    index bd4ed29c2..4d78b29d7 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86-debug.linux-x86-debug
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86-debug.linux-x86-debug
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86.linux-athlon b/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86.linux-athlon
    index aa78c9f65..25036ccac 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86.linux-athlon
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86.linux-athlon
    @@ -1,6 +1,3 @@
    -
    -#
    -# $Revision-Id$
     #
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86.linux-x86 b/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86.linux-x86
    index b24d14bdd..8641a9d27 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86.linux-x86
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86.linux-x86
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86_64-debug.linux-x86_64-debug b/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86_64-debug.linux-x86_64-debug
    index bd4ed29c2..4d78b29d7 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86_64-debug.linux-x86_64-debug
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86_64-debug.linux-x86_64-debug
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 b/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64
    index d2ab00e9d..8d1386636 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc-debug.solaris-sparc-debug b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc-debug.solaris-sparc-debug
    index d2e6e2627..b0b61ce0a 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc-debug.solaris-sparc-debug
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc-debug.solaris-sparc-debug
    @@ -1,6 +1,3 @@
    -
    -#
    -# $Revision-Id$
     #
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc-gnu.solaris-sparc-gnu b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc-gnu.solaris-sparc-gnu
    index db0be679f..b0b61ce0a 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc-gnu.solaris-sparc-gnu
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc-gnu.solaris-sparc-gnu
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc.solaris-sparc b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc.solaris-sparc
    index 23d2ffb3e..bd113bea3 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc.solaris-sparc
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc.solaris-sparc
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc64-gnu.solaris-sparc64-gnu b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc64-gnu.solaris-sparc64-gnu
    index 8de3cfde9..e8b88e0de 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc64-gnu.solaris-sparc64-gnu
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc64-gnu.solaris-sparc64-gnu
    @@ -1,6 +1,3 @@
    -
    -#
    -# $Revision-Id$
     #
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc64.solaris-sparc64 b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc64.solaris-sparc64
    index 2d4e3a497..87628e74e 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc64.solaris-sparc64
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-sparc64.solaris-sparc64
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86-debug.solaris-x86-debug b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86-debug.solaris-x86-debug
    index 78dd969b6..2c322fcfa 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86-debug.solaris-x86-debug
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86-debug.solaris-x86-debug
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86-gnu.solaris-x86-gnu b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86-gnu.solaris-x86-gnu
    index 808b367f0..bf9746289 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86-gnu.solaris-x86-gnu
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86-gnu.solaris-x86-gnu
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86.solaris-x86 b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86.solaris-x86
    index 7260652b4..299dc0834 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86.solaris-x86
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86.solaris-x86
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86_64.solaris-x86_64 b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86_64.solaris-x86_64
    index a85e513f2..9ac039a5b 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86_64.solaris-x86_64
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.solaris-x86_64.solaris-x86_64
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.win32-x86-cygwin.win32-x86-cygwin b/src/template/ext/top/configure/os/CONFIG_SITE.win32-x86-cygwin.win32-x86-cygwin
    index 97416906c..f6ca56942 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.win32-x86-cygwin.win32-x86-cygwin
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.win32-x86-cygwin.win32-x86-cygwin
    @@ -1,6 +1,3 @@
    -
    -#
    -# $Revision-Id$
     #
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.win32-x86-debug.win32-x86-debug b/src/template/ext/top/configure/os/CONFIG_SITE.win32-x86-debug.win32-x86-debug
    index 74e929e9e..ebc1b8238 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.win32-x86-debug.win32-x86-debug
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.win32-x86-debug.win32-x86-debug
    @@ -1,6 +1,3 @@
    -
    -#
    -# $Revision-Id$
     #
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.win32-x86-mingw.win32-x86-mingw b/src/template/ext/top/configure/os/CONFIG_SITE.win32-x86-mingw.win32-x86-mingw
    index 97416906c..f6ca56942 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.win32-x86-mingw.win32-x86-mingw
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.win32-x86-mingw.win32-x86-mingw
    @@ -1,6 +1,3 @@
    -
    -#
    -# $Revision-Id$
     #
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
    diff --git a/src/template/ext/top/configure/os/CONFIG_SITE.windows-x64.windows-x64 b/src/template/ext/top/configure/os/CONFIG_SITE.windows-x64.windows-x64
    index 641ba4291..68a0c149a 100644
    --- a/src/template/ext/top/configure/os/CONFIG_SITE.windows-x64.windows-x64
    +++ b/src/template/ext/top/configure/os/CONFIG_SITE.windows-x64.windows-x64
    @@ -1,6 +1,4 @@
     #
    -# $Revision-Id$
    -#
     # Site Specific Configuration Information
     # Only the local epics system manager should modify this file
     
    diff --git a/src/template/ext/top/src/Makefile b/src/template/ext/top/src/Makefile
    index 4b367d431..d672087ca 100644
    --- a/src/template/ext/top/src/Makefile
    +++ b/src/template/ext/top/src/Makefile
    @@ -1,5 +1,3 @@
    -# $Revision-Id$
    -
     TOP = ..
     include $(TOP)/configure/CONFIG
     
    diff --git a/src/tools/DBD/Base.pm b/src/tools/DBD/Base.pm
    index e258e650a..0751c68fd 100644
    --- a/src/tools/DBD/Base.pm
    +++ b/src/tools/DBD/Base.pm
    @@ -12,7 +12,7 @@ our @ISA = qw(Exporter);
     
     our @EXPORT = qw(&pushContext &popContext &dieContext &warnContext &is_reserved
         &escapeCcomment &escapeCstring $RXident $RXname $RXuint $RXint $RXhex $RXoct
    -    $RXuintx $RXintx $RXnum $RXdqs $RXsqs $RXstr);
    +    $RXuintx $RXintx $RXnum $RXdqs $RXstr);
     
     
     our $RXident = qr/ [a-zA-Z] [a-zA-Z0-9_]* /x;
    @@ -25,8 +25,7 @@ our $RXuintx = qr/ ( $RXhex | $RXoct | $RXuint ) /ox;
     our $RXintx =  qr/ ( $RXhex | $RXoct | $RXint ) /ox;
     our $RXnum =   qr/ -? (?: \d+ | \d* \. \d+ ) (?: [eE] [-+]? \d+ )? /x;
     our $RXdqs =   qr/ " (?: [^"] | \\" )* " /x;
    -our $RXsqs =   qr/ ' (?: [^'] | \\' )* ' /x;
    -our $RXstr =   qr/ ( $RXname | $RXnum | $RXdqs | $RXsqs ) /ox;
    +our $RXstr =   qr/ ( $RXname | $RXnum | $RXdqs ) /ox;
     
     our @context;
     
    diff --git a/src/tools/DBD/Menu.pm b/src/tools/DBD/Menu.pm
    index 244234f20..e5521ed49 100644
    --- a/src/tools/DBD/Menu.pm
    +++ b/src/tools/DBD/Menu.pm
    @@ -60,10 +60,11 @@ sub toDeclaration {
         my @choices = map {
             sprintf "    %-31s /* %s */", @{$_}[0], escapeCcomment(@{$_}[1]);
         } $this->choices;
    +    my $num = scalar @choices;
         return "typedef enum {\n" .
                    join(",\n", @choices) .
    -           ",\n    ${name}_NUM_CHOICES\n" .
    -           "} $name;\n\n";
    +           "\n} $name;\n" .
    +           "#define ${name}_NUM_CHOICES $num\n\n";
     }
     
     sub toDefinition {
    diff --git a/src/tools/DBD/Output.pm b/src/tools/DBD/Output.pm
    index cfe5bb196..c3bce9e58 100644
    --- a/src/tools/DBD/Output.pm
    +++ b/src/tools/DBD/Output.pm
    @@ -110,7 +110,7 @@ sub OutputBreaktables {
         my ($out, $breaktables) = @_;
         while (my ($name, $breaktable) = each %{$breaktables}) {
             printf $out "breaktable(\"%s\") {\n", $name;
    -        printf $out "    point(%s, %s)\n", @{$_}
    +        printf $out "    %s, %s\n", @{$_}
                 foreach $breaktable->points;
             print $out "}\n";
         }
    diff --git a/src/tools/DBD/Parser.pm b/src/tools/DBD/Parser.pm
    index d36fca555..c5f83d6d0 100644
    --- a/src/tools/DBD/Parser.pm
    +++ b/src/tools/DBD/Parser.pm
    @@ -241,10 +241,21 @@ sub parse_record {
         my ($dbd, $record_type, $record_name) = @_;
         pushContext("record($record_type, $record_name)");
         my $rtyp = $dbd->recordtype($record_type);
    -    dieContext("No recordtype named '$record_type'")
    -        unless defined $rtyp;
    -    my $rec = DBD::Record->new($rtyp, $record_name); # FIXME: Merge duplicates
    -    while(1) {
    +    my $rec = $dbd->record($record_name);
    +    if (defined $rec) {
    +        my $otyp = $rec->recordtype;
    +        my $otyp_name = $otyp->name;
    +        $rtyp = $otyp if $record_type eq '*';
    +        dieContext("A(n) $otyp_name record '$record_name' already exists")
    +            unless $otyp == $rtyp;
    +    } else {
    +        dieContext("No record exists named '$record_name'")
    +            if $record_type eq '*';
    +        dieContext("No recordtype exists named '$record_type'")
    +            unless defined $rtyp;
    +        $rec = DBD::Record->new($rtyp, $record_name);
    +    }
    +    while (1) {
             parseCommon($rec);
             if (m/\G field \s* \( \s* $RXstr \s* , \s* $RXstr \s* \)/oxgc) {
                 print " Record-Field: $1, $2\n" if $debug;
    diff --git a/src/tools/DBD/Recfield.pm b/src/tools/DBD/Recfield.pm
    index d38a081fa..73a98123c 100644
    --- a/src/tools/DBD/Recfield.pm
    +++ b/src/tools/DBD/Recfield.pm
    @@ -27,7 +27,7 @@ our %field_types = (
     our %field_attrs = (
         asl         => qr/^ASL[01]$/,
         initial     => qr/^.*$/,
    -    promptgroup => qr/^GUI_\w+$/,
    +    promptgroup => qr/^.*$/,
         prompt      => qr/^.*$/,
         special     => qr/^(?:SPC_\w+|\d{3,})$/,
         pp          => qr/^(?:TRUE|FALSE)$/,
    @@ -39,6 +39,35 @@ our %field_attrs = (
         prop        => qr/^(?:YES|NO)$/
     );
     
    +# Convert old promptgroups into new-style
    +my %promptgroupMap = (
    +    GUI_COMMON   => '10 - Common',
    +    GUI_ALARMS   => '70 - Alarm',
    +    GUI_BITS1    => '41 - Bits (1)',
    +    GUI_BITS2    => '42 - Bits (2)',
    +    GUI_CALC     => '30 - Action',
    +    GUI_CLOCK    => '30 - Action',
    +    GUI_COMPRESS => '30 - Action',
    +    GUI_CONVERT  => '60 - Convert',
    +    GUI_DISPLAY  => '80 - Display',
    +    GUI_HIST     => '30 - Action',
    +    GUI_INPUTS   => '40 - Input',
    +    GUI_LINKS    => '40 - Link',
    +    GUI_MBB      => '30 - Action',
    +    GUI_MOTOR    => '30 - Action',
    +    GUI_OUTPUT   => '50 - Output',
    +    GUI_PID      => '30 - Action',
    +    GUI_PULSE    => '30 - Action',
    +    GUI_SELECT   => '40 - Input',
    +    GUI_SEQ1     => '51 - Output (1)',
    +    GUI_SEQ2     => '52 - Output (2)',
    +    GUI_SEQ3     => '53 - Output (3)',
    +    GUI_SUB      => '30 - Action',
    +    GUI_TIMER    => '30 - Action',
    +    GUI_WAVE     => '30 - Action',
    +    GUI_SCAN     => '20 - Scan',
    +);
    +
     sub new {
         my ($class, $name, $type) = @_;
         dieContext("Illegal field type '$type', valid field types are:",
    @@ -74,6 +103,8 @@ sub number {
     
     sub add_attribute {
         my ($this, $attr, $value) = @_;
    +    $value = $promptgroupMap{$value}
    +        if $attr eq 'promptgroup' && exists $promptgroupMap{$value};
         my $match = $field_attrs{$attr};
         if (defined $match) {
             dieContext("Bad value '$value' for field attribute '$attr'")
    diff --git a/src/tools/DBD/Recordtype.pm b/src/tools/DBD/Recordtype.pm
    index 8c8fabbae..e4b0d5481 100644
    --- a/src/tools/DBD/Recordtype.pm
    +++ b/src/tools/DBD/Recordtype.pm
    @@ -106,7 +106,7 @@ sub equals {
         my ($new, $known) = @_;
         return 0 if ! $known->fields;
         return 1 if ! $new->fields;
    -    dieContext("Duplicate definition of record type '$a->{NAME}'");
    +    dieContext("Duplicate definition of record type '$known->{NAME}'");
     }
     
     sub toDeclaration {
    diff --git a/src/tools/EPICS/Copy.pm b/src/tools/EPICS/Copy.pm
    index 59cc17fa8..d61800e0e 100644
    --- a/src/tools/EPICS/Copy.pm
    +++ b/src/tools/EPICS/Copy.pm
    @@ -5,8 +5,6 @@
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Revision-Id$
    -
     use Carp;
     
     # Copy directories and files from a template
    diff --git a/src/tools/EPICS/Path.pm b/src/tools/EPICS/Path.pm
    index 4ddbbc59e..b86c88007 100644
    --- a/src/tools/EPICS/Path.pm
    +++ b/src/tools/EPICS/Path.pm
    @@ -5,8 +5,6 @@
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Revision-Id$
    -
     package EPICS::Path;
     require 5.000;
     require Exporter;
    diff --git a/src/tools/EPICS/Readfile.pm b/src/tools/EPICS/Readfile.pm
    index 1b6cab21d..4358a6ad2 100644
    --- a/src/tools/EPICS/Readfile.pm
    +++ b/src/tools/EPICS/Readfile.pm
    @@ -5,8 +5,6 @@
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Id$
    -
     package EPICS::Readfile;
     require 5.000;
     require Exporter;
    diff --git a/src/tools/EPICS/Release.pm b/src/tools/EPICS/Release.pm
    index 577444dc4..e2c4a6826 100644
    --- a/src/tools/EPICS/Release.pm
    +++ b/src/tools/EPICS/Release.pm
    @@ -5,8 +5,6 @@
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Revision-Id$
    -
     use Carp;
     
     #
    diff --git a/src/tools/EPICS/macLib.pm b/src/tools/EPICS/macLib.pm
    index 9ae40314e..412c6d709 100644
    --- a/src/tools/EPICS/macLib.pm
    +++ b/src/tools/EPICS/macLib.pm
    @@ -5,8 +5,6 @@
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Id$
    -
     package EPICS::macLib::entry;
     
     sub new ($$) {
    diff --git a/src/tools/assembleSnippets.pl b/src/tools/assembleSnippets.pl
    index 52291efe8..e6f0c77a3 100644
    --- a/src/tools/assembleSnippets.pl
    +++ b/src/tools/assembleSnippets.pl
    @@ -5,8 +5,6 @@
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Id$
    -
     use strict;
     use warnings;
     
    diff --git a/src/tools/convertRelease.pl b/src/tools/convertRelease.pl
    index 9a425c954..e2f13a556 100644
    --- a/src/tools/convertRelease.pl
    +++ b/src/tools/convertRelease.pl
    @@ -5,11 +5,9 @@
     # Copyright (c) 2002 The Regents of the University of California, as
     #     Operator of Los Alamos National Laboratory.
     # EPICS BASE is distributed subject to a Software License Agreement found
    -# in file LICENSE that is included with this distribution. 
    +# in file LICENSE that is included with this distribution.
     #*************************************************************************
     #
    -# $Revision-Id$
    -#
     # Convert configure/RELEASE file(s) into something else.
     #
     
    @@ -77,7 +75,7 @@ my @apps   = ('TOP');   # Records the order of definitions in RELEASE file
     my $relfile = "$top/configure/RELEASE";
     die "Can't find $relfile" unless (-f $relfile);
     readReleaseFiles($relfile, \%macros, \@apps, $arch);
    -expandRelease(\%macros, \@apps);
    +expandRelease(\%macros);
     
     
     # This is a perl switch statement:
    @@ -123,19 +121,21 @@ sub dllPath {
         unlink $outfile;
         open(OUT, ">$outfile") or die "$! creating $outfile";
         print OUT "\@ECHO OFF\n";
    -    print OUT "PATH \%PATH\%;", join(';', binDirs()), "\n";
    +    # This SET syntax is essential for supporting embedded spaces and '&'
    +    # characters in both the PATH variable and the new directory components
    +    print OUT "SET \"PATH=", join(';', binDirs(), '%PATH%'), "\"\n";
         close OUT;
     }
     
     sub relPaths {
         unlink $outfile;
         open(OUT, ">$outfile") or die "$! creating $outfile";
    -    print OUT "export PATH=\$PATH:",
    -        join(':', map {m/\s/ ? "\"$_\"" : $_ } binDirs()), "\n";
    +    print OUT "export PATH=\"", join(':', binDirs(), '$PATH'), "\"\n";
         close OUT;
     }
     
     sub binDirs {
    +    die "Architecture not set (use -a option)\n" unless ($arch);
         my @includes = grep !m/^ (RULES | TEMPLATE_TOP) $/x, @apps;
         my @path;
         foreach my $app (@includes) {
    @@ -154,22 +154,21 @@ sub binDirs {
     sub cdCommands {
         die "Architecture not set (use -a option)" unless ($arch);
         my @includes = grep !m/^(RULES | TEMPLATE_TOP)$/x, @apps;
    -    
    +
         unlink($outfile);
         open(OUT,">$outfile") or die "$! creating $outfile";
    -    
    +
         my $startup = $cwd;
         $startup =~ s/^$root/$iocroot/o if ($opt_t);
         $startup =~ s/([\\"])/\\$1/g; # escape back-slashes and double-quotes
    -    
    +
         print OUT "startup = \"$startup\"\n";
    -    
    +
         my $ioc = $cwd;
         $ioc =~ s/^.*\///;  # iocname is last component of directory name
    -    
    -    print OUT "putenv(\"ARCH=$arch\")\n";
    +
         print OUT "putenv(\"IOC=$ioc\")\n";
    -    
    +
         foreach my $app (@includes) {
             my $iocpath = my $path = $macros{$app};
             $iocpath =~ s/^$root/$iocroot/o if ($opt_t);
    @@ -190,18 +189,16 @@ sub cdCommands {
     # Include parentheses anyway in case CEXP users want to use this.
     #
     sub envPaths {
    -    die "Architecture not set (use -a option)" unless ($arch);
         my @includes = grep !m/^ (RULES | TEMPLATE_TOP) $/x, @apps;
    -    
    +
         unlink($outfile);
         open(OUT,">$outfile") or die "$! creating $outfile";
    -    
    +
         my $ioc = $cwd;
         $ioc =~ s/^.*\///;  # iocname is last component of directory name
    -    
    -    print OUT "epicsEnvSet(\"ARCH\",\"$arch\")\n";
    +
         print OUT "epicsEnvSet(\"IOC\",\"$ioc\")\n";
    -    
    +
         foreach my $app (@includes) {
             my $iocpath = my $path = $macros{$app};
             $iocpath =~ s/^$root/$iocroot/o if ($opt_t);
    @@ -219,16 +216,16 @@ sub checkRelease {
         delete $macros{RULES};
         delete $macros{TOP};
         delete $macros{TEMPLATE_TOP};
    -    
    +
         while (my ($app, $path) = each %macros) {
             my %check = (TOP => $path);
             my @order = ();
             my $relfile = "$path/configure/RELEASE";
             readReleaseFiles($relfile, \%check, \@order, $arch);
    -        expandRelease(\%check, \@order);
    +        expandRelease(\%check);
             delete $check{TOP};
             delete $check{EPICS_HOST_ARCH};
    -        
    +
             while (my ($parent, $ppath) = each %check) {
                 if (exists $macros{$parent} &&
                     AbsPath($macros{$parent}) ne AbsPath($ppath)) {
    @@ -242,7 +239,34 @@ sub checkRelease {
                 }
             }
         }
    -    print "\n" if ($status);
    +
    +    my @modules = grep(!m/^(RULES|TOP|TEMPLATE_TOP)$/, @apps);
    +    my $app = shift @modules;
    +    my $latest = AbsPath($macros{$app});
    +    my %paths = ($latest => $app);
    +    foreach $app (@modules) {
    +        my $path = AbsPath($macros{$app});
    +        if ($path ne $latest && exists $paths{$path}) {
    +            my $prev = $paths{$path};
    +            print "\n" unless ($status);
    +            print "This application's RELEASE file(s) define\n";
    +            print "\t$app = $macros{$app}\n";
    +            print "after but not adjacent to\n\t$prev = $macros{$prev}\n";
    +            print "both of which resolve to $path\n"
    +                if $path ne $macros{$app} || $path ne $macros{$prev};
    +            $status = 2;
    +        }
    +        $paths{$path} = $app;
    +        $latest = $path;
    +    }
    +    if ($status == 2) {
    +        print "Module definitions that share paths must be grouped together.\n";
    +        print "Either remove a definition, or move it to a line immediately\n";
    +        print "above or below the other(s).\n";
    +        print "Any non-module definitions belong in configure/CONFIG_SITE.\n";
    +        $status = 1;
    +    }
    +
    +    print "\n" if $status;
         exit $status;
     }
    -
    diff --git a/src/tools/cvsclean.pl b/src/tools/cvsclean.pl
    index b1398fda5..8dac418d7 100644
    --- a/src/tools/cvsclean.pl
    +++ b/src/tools/cvsclean.pl
    @@ -8,8 +8,6 @@
     # in the file LICENSE that is included with this distribution. 
     #*************************************************************************
     
    -# $Revision-Id$
    -#
     # Find and delete cvs .#* and editor backup *~
     # files from all dirs of the directory tree.
     
    diff --git a/src/tools/dbdExpand.pl b/src/tools/dbdExpand.pl
    index f111bd98d..71f938418 100644
    --- a/src/tools/dbdExpand.pl
    +++ b/src/tools/dbdExpand.pl
    @@ -7,8 +7,6 @@
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Id$
    -
     use strict;
     
     use FindBin qw($Bin);
    @@ -30,6 +28,8 @@ my @path = map { split /[:;]/ } @opt_I; # FIXME: Broken on Win32?
     my $macros = EPICS::macLib->new(@opt_S);
     my $dbd = DBD->new();
     
    +$macros->suppressWarning(1);
    +
     # Calculate filename for the dependency warning message below
     my $dep = $opt_o;
     my $dot_d = '';
    diff --git a/src/tools/dbdReport.pl b/src/tools/dbdReport.pl
    index a90a9c9c0..876ec0abb 100644
    --- a/src/tools/dbdReport.pl
    +++ b/src/tools/dbdReport.pl
    @@ -7,8 +7,6 @@
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Id$
    -
     use FindBin qw($Bin);
     use lib "$Bin/../../lib/perl";
     
    diff --git a/src/tools/dbdToHtml.pl b/src/tools/dbdToHtml.pl
    index 25064ce6e..2c0417cbb 100644
    --- a/src/tools/dbdToHtml.pl
    +++ b/src/tools/dbdToHtml.pl
    @@ -6,8 +6,6 @@
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Id$
    -
     use strict;
     
     use FindBin qw($Bin);
    diff --git a/src/tools/dbdToMenuH.pl b/src/tools/dbdToMenuH.pl
    index e1d640c16..eaa236902 100644
    --- a/src/tools/dbdToMenuH.pl
    +++ b/src/tools/dbdToMenuH.pl
    @@ -7,8 +7,6 @@
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Id$
    -
     use FindBin qw($Bin);
     use lib "$Bin/../../lib/perl";
     
    diff --git a/src/tools/dbdToRecordtypeH.pl b/src/tools/dbdToRecordtypeH.pl
    index 0516a58bf..ccf6b21b2 100644
    --- a/src/tools/dbdToRecordtypeH.pl
    +++ b/src/tools/dbdToRecordtypeH.pl
    @@ -7,8 +7,6 @@
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Id$
    -
     use FindBin qw($Bin);
     use lib "$Bin/../../lib/perl";
     
    diff --git a/src/tools/dos2unix.pl b/src/tools/dos2unix.pl
    index 4940fd5f2..35163ac1f 100644
    --- a/src/tools/dos2unix.pl
    +++ b/src/tools/dos2unix.pl
    @@ -10,7 +10,6 @@
     #*************************************************************************
     
     # Converts text file in DOS CR/LF format to unix ISO format
    -#  $Revision-Id$
     
     @files=@ARGV;
     
    diff --git a/src/tools/expandVars.pl b/src/tools/expandVars.pl
    index c61bfbf6e..01e65fb3a 100644
    --- a/src/tools/expandVars.pl
    +++ b/src/tools/expandVars.pl
    @@ -6,8 +6,6 @@
     # Author: Andrew Johnson 
     # Date: 10 February 2005
     #
    -# $Revision-Id$
    -#
     
     use strict;
     
    diff --git a/src/tools/fullPathName.pl b/src/tools/fullPathName.pl
    index 0b1bdc0dd..c8ac49a12 100644
    --- a/src/tools/fullPathName.pl
    +++ b/src/tools/fullPathName.pl
    @@ -6,8 +6,6 @@
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Revision-Id$
    -
     # Determines an absolute pathname for its argument,
     # which may be either a relative or absolute path and
     # might have trailing directory names that don't exist yet.
    diff --git a/src/tools/makeIncludeDbd.pl b/src/tools/makeIncludeDbd.pl
    index 4b0a25b84..f4ab8be3d 100644
    --- a/src/tools/makeIncludeDbd.pl
    +++ b/src/tools/makeIncludeDbd.pl
    @@ -5,8 +5,6 @@
     # EPICS BASE is distributed subject to a Software License Agreement found
     # in file LICENSE that is included with this distribution. 
     #*************************************************************************
    -#
    -# $Revision-Id$
     
     use strict;
     use File::Basename;
    diff --git a/src/tools/munch.pl b/src/tools/munch.pl
    index 2aee71344..f62b579ad 100644
    --- a/src/tools/munch.pl
    +++ b/src/tools/munch.pl
    @@ -8,8 +8,6 @@
     # in the file LICENSE that is included with this distribution. 
     #*************************************************************************
     
    -#  $Revision-Id$
    -
     use strict;
     use warnings;
     
    diff --git a/src/tools/podRemove.pl b/src/tools/podRemove.pl
    index 66f09e308..14fbf58f0 100644
    --- a/src/tools/podRemove.pl
    +++ b/src/tools/podRemove.pl
    @@ -6,8 +6,6 @@
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Revision-Id$
    -
     use strict;
     use warnings;
     
    diff --git a/src/tools/podToHtml.pl b/src/tools/podToHtml.pl
    index e950f6c6e..81716ae37 100644
    --- a/src/tools/podToHtml.pl
    +++ b/src/tools/podToHtml.pl
    @@ -6,8 +6,6 @@
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Revision-Id$
    -
     use strict;
     use warnings;
     
    diff --git a/src/tools/registerRecordDeviceDriver.pl b/src/tools/registerRecordDeviceDriver.pl
    index 18b522772..c6ab607e6 100644
    --- a/src/tools/registerRecordDeviceDriver.pl
    +++ b/src/tools/registerRecordDeviceDriver.pl
    @@ -69,6 +69,7 @@ print $out (<< "END");
     #include "iocsh.h"
     #include "iocshRegisterCommon.h"
     #include "registryCommon.h"
    +#include "recSup.h"
     
     END
     
    @@ -94,7 +95,7 @@ if (%rectypes) {
     
         if (@rtypnames) {
             # Declare the record support entry tables
    -        print $out wrap('epicsShareExtern rset ', '    ',
    +        print $out wrap('epicsShareExtern typed_rset ', '    ',
                 join(', ', map {"*pvar_rset_${_}RSET"} @rtypnames)), ";\n\n";
     
             # Declare the RecordSizeOffset functions
    @@ -110,7 +111,7 @@ if (%rectypes) {
             # List of pointers to each RSET and RecordSizeOffset function
             print $out "static const recordTypeLocation rtl[] = {\n";
             print $out join(",\n", map {
    -                "    {pvar_rset_${_}RSET, pvar_func_${_}RecordSizeOffset}"
    +                "    {(struct typed_rset *)pvar_rset_${_}RSET, pvar_func_${_}RecordSizeOffset}"
                 } @rtypnames);
             print $out "\n};\n\n";
         }
    diff --git a/src/tools/test/Menu.plt b/src/tools/test/Menu.plt
    index 97305b8a9..8c5540f6a 100644
    --- a/src/tools/test/Menu.plt
    +++ b/src/tools/test/Menu.plt
    @@ -25,8 +25,9 @@ ok !$menu->legal_choice('Choice 3'), 'Third choice not legal';
     is_deeply $menu->choice(2), undef, 'Third choice undefined';
     
     like $menu->toDeclaration, qr/ ^
    -    \s* typedef \s+ enum \s+ {
    -    \s+     ch1 \s+ \/\* [^*]* \*\/,
    -    \s+     ch2 \s+ \/\* [^*]* \*\/,
    -    \s+     test_NUM_CHOICES ,?
    -    \s+ } \s+ test; \s* $ /x, 'C declaration';
    +    \s* typedef \s+ enum \s+ \{ \s* \n
    +    \s*     ch1 \s+ \/\* [^*]* \*\/, \s* \n
    +    \s*     ch2 \s+ \/\* [^*]* \*\/ \s* \n
    +    \s* \} \s* test \s* ; \s* \n
    +    \s* \# \s* define \s+ test_NUM_CHOICES \s+ 2 \s* \n
    +    \s* $ /x, 'C declaration';
    diff --git a/startup/EpicsHostArch.pl b/startup/EpicsHostArch.pl
    index e6babf6d3..09f7ffddd 100755
    --- a/startup/EpicsHostArch.pl
    +++ b/startup/EpicsHostArch.pl
    @@ -9,7 +9,6 @@ eval 'exec perl -S $0 ${1+"$@"}'  # -*- Mode: perl -*-
     # in file LICENSE that is included with this distribution.
     #*************************************************************************
     
    -# $Revision-Id$
     # Returns the Epics host architecture suitable
     # for assigning to the EPICS_HOST_ARCH variable
     
    diff --git a/startup/cygwin.bat b/startup/cygwin.bat
    index 2d3a1567e..ff75b5335 100755
    --- a/startup/cygwin.bat
    +++ b/startup/cygwin.bat
    @@ -8,7 +8,6 @@ REM  EPICS BASE Versions 3.13.7
     REM  and higher are distributed subject to a Software License Agreement found
     REM  in file LICENSE that is included with this distribution.
     REM *************************************************************************
    -REM  $Revision-Id$
     REM
     REM  Site-specific EPICS environment settings
     REM 
    diff --git a/startup/win32.bat b/startup/win32.bat
    index 5c0448fe8..af9155dd7 100755
    --- a/startup/win32.bat
    +++ b/startup/win32.bat
    @@ -8,7 +8,6 @@ REM  EPICS BASE Versions 3.13.7
     REM  and higher are distributed subject to a Software License Agreement found
     REM  in file LICENSE that is included with this distribution.
     REM *************************************************************************
    -REM  $Revision-Id$
     REM
     REM  Site-specific EPICS environment settings
     REM