Subject: |
[Merge] lp:~dirk.zimoch/epics-base/DTYP-parsing into lp:epics-base |
From: |
Dirk Zimoch <[email protected]> |
To: |
[email protected] |
Date: |
Sun, 30 May 2010 12:16:26 -0000 |
Dirk Zimoch has proposed merging lp:~dirk.zimoch/epics-base/DTYP-parsing into lp:epics-base.
Requested reviews:
EPICS Core Developers (epics-core)
Now INP/OUT and DTYP can be defined in any order. The original text of INP/OUT link is stored and re-parsed later if DTYP changes.
--
https://code.launchpad.net/~dirk.zimoch/epics-base/DTYP-parsing/+merge/26381
Your team EPICS Core Developers is requested to review the proposed merge of lp:~dirk.zimoch/epics-base/DTYP-parsing into lp:epics-base.
=== modified file 'documentation/RELEASE_NOTES.html'
--- documentation/RELEASE_NOTES.html 2010-04-26 22:16:06 +0000
+++ documentation/RELEASE_NOTES.html 2010-05-30 12:16:26 +0000
@@ -12,6 +12,10 @@
<h2 align="center">Changes between 3.14.11 and 3.14.12</h2>
<!-- Insert new items immediately below here ... -->
+<h4>DTYP and INP/OUT order</h4>
+
+<p>The fields DTYP and INP/OUT can now be specified in any order.
+
<h4>Rewrite epicsThreadOnce()</h4>
<p>Michael Davidsaver suggested a better implementation of epicsThreadOnce()
=== modified file 'src/dbStatic/dbStaticLib.c'
--- src/dbStatic/dbStaticLib.c 2009-08-03 22:22:45 +0000
+++ src/dbStatic/dbStaticLib.c 2010-05-30 12:16:26 +0000
@@ -277,6 +277,19 @@
plink = (DBLINK *)pdbentry->pfield;
if (plink->type == link_type) goto done;
+ if (plink->text)
+ {
+ /* re-parse link text when DTYP has changed */
+ char * link_text;
+ link_text = plink->text;
+ plink->text = NULL;
+ dbFreeLinkContents(plink);
+ plink->type = link_type;
+ dbPutString(pdbentry, link_text);
+ free(link_text);
+ goto done;
+ }
+
type = plink->type;
if ((type == CONSTANT || type == PV_LINK || type == DB_LINK || type == CA_LINK) &&
(link_type == CONSTANT || link_type == PV_LINK)) goto done;
@@ -331,6 +344,7 @@
epicsPrintf("dbFreeLink called but link type unknown\n");
}
if(parm && (parm != pNullString)) free((void *)parm);
+ if(plink->text) free(plink->text);
memset((char *)plink,0,sizeof(struct link));
}
@@ -2224,6 +2238,8 @@
errMessage(status,"in dbPutString from setLinkType");
return status;
}
+ /* store link text in case DTYP changes later */
+ plink->text = epicsStrDup(pstring);
}
if (strlen(pstring) >= sizeof(string)) {
status = S_dbLib_badField;
=== modified file 'src/dbStatic/link.h'
--- src/dbStatic/link.h 2009-04-03 20:54:00 +0000
+++ src/dbStatic/link.h 2010-05-30 12:16:26 +0000
@@ -183,6 +183,7 @@
struct link{
union value value;
short type;
+ char *text; /* original INP/OUT link text */
};
typedef struct link DBLINK;
- Navigate by Date:
- Prev:
Re: [Merge] lp:~khkim/epics-base/alarm-filter into lp:epics-base Ralph Lange
- Next:
Hacking rsrv/camessage.c Michael Abbott
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: [Merge] lp:~khkim/epics-base/alarm-filter into lp:epics-base Ralph Lange
- Next:
Hacking rsrv/camessage.c Michael Abbott
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
<2010>
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|