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
<2015>
2016
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
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
|