From 2dc1e771741fd0579a309548c712bbfe3ff6ca92 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 17 Mar 2005 15:29:51 +0000 Subject: [PATCH] Added dbRecordsOnceOnly variable, to allow users to disable the ability to define record fields more than once. Unusual, but occasionally useful. --- src/dbStatic/dbLexRoutines.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dbStatic/dbLexRoutines.c b/src/dbStatic/dbLexRoutines.c index 190264a4b..7e90ed870 100644 --- a/src/dbStatic/dbLexRoutines.c +++ b/src/dbStatic/dbLexRoutines.c @@ -40,6 +40,7 @@ /*global declarations*/ epicsShareDef char *makeDbdDepends=0; +epicsShareDef int dbRecordsOnceOnly=0; /*private routines */ static void yyerrorAbort(char *str); @@ -914,6 +915,9 @@ static void dbRecordHead(char *recordType,char *name, int visible) yyerror("already defined for different record type"); duplicate = TRUE; return; + } else if (dbRecordsOnceOnly) { + yyerror("already defined and dbRecordsOnceOnly set"); + duplicate = TRUE; } } else if(status) { errMessage(status,"new record instance error");