EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Initialize multi-element field
From: Benjamin Franksen <[email protected]>
To: [email protected]
Date: Fri, 29 Feb 2008 12:09:15 +0100
On Wednesday 27 February 2008 20:39, Tim Mooney wrote:
> Benjamin Franksen wrote:
> > On Friday 22 February 2008 20:08, Tim Mooney wrote:
> >> (Note the above file must end with '\n' or "\r\n".)
> >
> > Hi,
> >
> > is there a rationale behind this? If not, I think this should be fixed.
> >
> > Similar remarks apply, BTW, to other EPICS tools. For instance, I
> > noticed in the past that dbExpand silently ignores the last line of a
> > dbd include file if it doesn't end in a newline. This has caused
> > endless grief to Windows users, as editors for Windows generally don't
> > automatically add a newline at the end.
> >
> > If this hasn't already been fixed, I propose to put it on the list of
> > things to be done before the next release of base. I'd say chances that
> > people rely on the faulty behaviour are practically zero.
>
> This is not a problem in base.  Autosave simply needs to know that the
> file it's restoring from was not corrupted by an ioc crash that occurred
> while the file was being written.  The simplest and most common artifact
> of such a crash is a truncated file, and autosave detects this by
> requiring the last few characters of the file to fit a pattern that is
> unlikely to occur in the middle of the file, and by always ending the
> files it writes in this way.  Some systems use "\r\n" as an end-of-record
> character, and some use "\n", so both are permitted.
>
> Autosave was not intended to process files written by humans.  

This sounds like a perfect rationale to me. Thanks for explaining.

> If this 
> use becomes common enough, it will be worthwhile to code a relaxed reader
> that recognizes files written by humans, and doesn't require any special
> end pattern.

(I'd rather see db file format & tools extended to support arrays.)

Cheers
Ben
-- 
"Programming = Mathematics + Murphy's Law" (E.W.Dijkstra)

References:
Initialize multi-element field Dehong Zhang
Re: Initialize multi-element field Benjamin Franksen
Re: Initialize multi-element field Tim Mooney

Navigate by Date:
Prev: Re: floating point problem in CA? Heinrich du Toit
Next: Re: Initialize multi-element field Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Initialize multi-element field Tim Mooney
Next: Re: Initialize multi-element field Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·