EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Q: Portable way to construct a filename?
From: Michael Davidsaver <[email protected]>
To: [email protected]
Date: Fri, 18 Sep 2015 11:24:11 -0400
On 09/18/2015 11:01 AM, Ralph Lange wrote:
> For use inside EPICS Base V3:
> 
> What is a portable way to concatenate a directory name (received as
> iocShell command argument) and a filename (from a readdir() entry) into

The best I can think of is:

> const char *part1, *part2;
> char buf[100]
> 
> epicsSnprintf(buf, sizeof(buf), "%s%s%s",
>               part1, OSI_PATH_SEPARATOR, part2);

Although this has obvious limitations and assumes that empty components,
or double separators are collapsed (eg. 'a//b'=='a/b').

Replies:
Re: Q: Portable way to construct a filename? Ralph Lange
References:
Q: Portable way to construct a filename? Ralph Lange

Navigate by Date:
Prev: Q: Portable way to construct a filename? Ralph Lange
Next: RE: Portable way to construct a filename? nick.rees
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Q: Portable way to construct a filename? Ralph Lange
Next: Re: Q: Portable way to construct a filename? Ralph Lange
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·