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: Ralph Lange <[email protected]>
To: [email protected]
Date: Fri, 18 Sep 2015 21:49:04 +0200
On September 18, 2015 5:24:11 PM GMT+02:00, Michael Davidsaver <[email protected]> wrote:
>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').

Perfect!

That's more than good enough for my application.

Thanks a lot,
~Ralph

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

Navigate by Date:
Prev: Jenkins build is back to normal : epics-base-3.15-mac-test #20 APS Jenkins
Next: Re: Q: Portable way to construct a filename? Andrew Johnson
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: Re: Q: Portable way to construct a filename? Michael Davidsaver
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 
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 ·