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  2008  <20092010  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  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: AW: Snl strings
From: Eric Norum <[email protected]>
To: "Gerke, Christian" <[email protected]>
Cc: [email protected]
Date: Thu, 26 Feb 2009 08:27:54 -0600
On Feb 26, 2009, at 3:54 AM, Gerke, Christian wrote:

Thank you Eric,

I needed both modifications:

1) char debus[40];  ==>  string debus;
(which I did not try before)
And
2) sprintf  ==>  strcpy
(which I had tried already)

Good to hear that things are working.

Actually, sprintf should work fine -- but as a general recommendation, I would suggest using epicsSnprintf instead. Prototype is in epicsStdio.h.
Advantages include:
	- Portable across all architectures on which EPICS runs
	- Avoids buffer overruns
--
Eric Norum <[email protected]>
Advanced Photon Source
Argonne National Laboratory
(630) 252-4793



References:
Snl strings Gerke, Christian
Re: Snl strings Eric Norum
AW: Snl strings Gerke, Christian

Navigate by Date:
Prev: AW: Snl strings Gerke, Christian
Next: caget with an array of space-containing strings Carl Schumann
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: AW: Snl strings Gerke, Christian
Next: vme usb support David Kline
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·