Fixed Cdefs to be output before the record structure.

Moved record include files from dbStaticLib into dbCommon.dbd.
Added Cdefs that include postfix.h to the calc*.dbd files, removed from .c.
This commit is contained in:
Andrew Johnson
2007-03-13 16:39:53 +00:00
parent f37b9d01a2
commit bc01dca042
6 changed files with 25 additions and 32 deletions

View File

@@ -1,12 +1,13 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# Copyright (c) 2007 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 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.
#*************************************************************************
%#include "epicsTypes.h"
%#include "link.h"
field(NAME,DBF_STRING) {
prompt("Record Name")
special(SPC_NOMOD)
@@ -15,7 +16,7 @@
field(DESC,DBF_STRING) {
prompt("Descriptor")
promptgroup(GUI_COMMON)
size(29)
size(41)
}
field(ASG,DBF_STRING) {
prompt("Access Security Group")
@@ -76,12 +77,14 @@
promptgroup(GUI_SCAN)
interest(1)
}
%#include "epicsMutex.h"
field(MLOK,DBF_NOACCESS) {
prompt("Monitor lock")
special(SPC_NOMOD)
interest(4)
extra("epicsMutexId mlok")
}
%#include "ellLib.h"
field(MLIS,DBF_NOACCESS) {
prompt("Monitor List")
special(SPC_NOMOD)
@@ -237,6 +240,7 @@
interest(1)
initial("1")
}
%#include "epicsTime.h"
field(TIME,DBF_NOACCESS) {
prompt("Time")
special(SPC_NOMOD)

View File

@@ -1,10 +1,9 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* Copyright (c) 2007 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 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.
\*************************************************************************/
/* dbToRecordtypeH.c */
@@ -118,12 +117,6 @@ int main(int argc,char **argv)
exit(-1);
}
fprintf(outFile,"#include \"ellLib.h\"\n");
fprintf(outFile,"#include \"epicsMutex.h\"\n");
fprintf(outFile,"#include \"link.h\"\n");
fprintf(outFile,"#include \"epicsTime.h\"\n");
fprintf(outFile,"#include \"epicsTypes.h\"\n");
pdbMenu = (dbMenu *)ellFirst(&pdbbase->menuList);
while(pdbMenu) {
fprintf(outFile,"\n#ifndef INC%sH\n",pdbMenu->name);
@@ -142,6 +135,11 @@ int main(int argc,char **argv)
while(pdbRecordType) {
fprintf(outFile,"#ifndef INC%sH\n",pdbRecordType->name);
fprintf(outFile,"#define INC%sH\n",pdbRecordType->name);
pdbCdef = (dbText *)ellFirst(&pdbRecordType->cdefList);
while (pdbCdef) {
fprintf(outFile,"%s\n",pdbCdef->text);
pdbCdef = (dbText *)ellNext(&pdbCdef->node);
}
fprintf(outFile,"typedef struct %s",pdbRecordType->name);
if(!isdbCommonRecord) fprintf(outFile,"Record");
fprintf(outFile," {\n");
@@ -219,11 +217,6 @@ int main(int argc,char **argv)
fprintf(outFile,"#define %sRecord%s\t%d\n",
pdbRecordType->name,pdbFldDes->name,pdbFldDes->indRecordType);
}
pdbCdef = (dbText *)ellFirst(&pdbRecordType->cdefList);
while (pdbCdef) {
fprintf(outFile,"%s\n",pdbCdef->text);
pdbCdef = (dbText *)ellNext(&pdbCdef->node);
}
}
fprintf(outFile,"#endif /*INC%sH*/\n",pdbRecordType->name);
pdbRecordType = (dbRecordType *)ellNext(&pdbRecordType->node);

View File

@@ -1,10 +1,9 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* Copyright (c) 2007 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 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.
\*************************************************************************/
/* $Id$ */
@@ -23,7 +22,6 @@
#include "dbDefs.h"
#include "errlog.h"
#include "postfix.h"
#include "alarm.h"
#include "dbAccess.h"
#include "dbEvent.h"

View File

@@ -1,10 +1,9 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# Copyright (c) 2007 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 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.
#*************************************************************************
recordtype(calc) {
@@ -292,6 +291,7 @@ recordtype(calc) {
special(SPC_NOMOD)
interest(3)
}
%#include "postfix.h"
field(RPCL,DBF_NOACCESS) {
prompt("Reverse Polish Calc")
special(SPC_NOMOD)

View File

@@ -1,10 +1,9 @@
/*************************************************************************\
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
* Copyright (c) 2007 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 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.
\*************************************************************************/
/* calcout.c - Record Support Routines for calc with output records */
@@ -37,7 +36,6 @@
#include "special.h"
#include "callback.h"
#include "taskwd.h"
#include "postfix.h"
#define GEN_SIZE_OFFSET
#include "calcoutRecord.h"

View File

@@ -1,10 +1,9 @@
#*************************************************************************
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
# Copyright (c) 2007 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 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.
#*************************************************************************
menu(calcoutOOPT) {
@@ -500,6 +499,7 @@ recordtype(calcout) {
special(SPC_NOMOD)
interest(3)
}
%#include "postfix.h"
field(RPCL,DBF_NOACCESS) {
prompt("Reverse Polish Calc")
special(SPC_NOMOD)