You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

617 lines
19 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: unixstl/filesystem/file_path_buffer.hpp
  3. *
  4. * Purpose: Contains the basic_file_path_buffer template class.
  5. *
  6. * Created: 24th May 2004
  7. * Updated: 9th February 2011
  8. *
  9. * Home: http://stlsoft.org/
  10. *
  11. * Copyright (c) 2004-2011, Matthew Wilson and Synesis Software
  12. * All rights reserved.
  13. *
  14. * Redistribution and use in source and binary forms, with or without
  15. * modification, are permitted provided that the following conditions are met:
  16. *
  17. * - Redistributions of source code must retain the above copyright notice, this
  18. * list of conditions and the following disclaimer.
  19. * - Redistributions in binary form must reproduce the above copyright notice,
  20. * this list of conditions and the following disclaimer in the documentation
  21. * and/or other materials provided with the distribution.
  22. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
  23. * any contributors may be used to endorse or promote products derived from
  24. * this software without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  27. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  28. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  29. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  30. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  31. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  32. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  33. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  34. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  35. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  36. * POSSIBILITY OF SUCH DAMAGE.
  37. *
  38. * ////////////////////////////////////////////////////////////////////// */
  39. /** \file unixstl/filesystem/file_path_buffer.hpp
  40. *
  41. * \brief [C++ only] Definition of the unixstl::basic_file_path_buffer class
  42. * template
  43. * (\ref group__library__filesystem "File System" Library).
  44. */
  45. #ifndef UNIXSTL_INCL_UNIXSTL_FILESYSTEM_HPP_FILE_PATH_BUFFER
  46. #define UNIXSTL_INCL_UNIXSTL_FILESYSTEM_HPP_FILE_PATH_BUFFER
  47. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  48. # define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_FILE_PATH_BUFFER_MAJOR 4
  49. # define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_FILE_PATH_BUFFER_MINOR 2
  50. # define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_FILE_PATH_BUFFER_REVISION 1
  51. # define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_FILE_PATH_BUFFER_EDIT 65
  52. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  53. /* /////////////////////////////////////////////////////////////////////////
  54. * Includes
  55. */
  56. #ifndef UNIXSTL_INCL_UNIXSTL_H_UNIXSTL
  57. # include <unixstl/unixstl.h>
  58. #endif /* !UNIXSTL_INCL_UNIXSTL_H_UNIXSTL */
  59. #ifndef STLSOFT_INCL_STLSOFT_MEMORY_HPP_AUTO_BUFFER
  60. # include <stlsoft/memory/auto_buffer.hpp>
  61. #endif /* !STLSOFT_INCL_STLSOFT_MEMORY_HPP_AUTO_BUFFER */
  62. #ifndef STLSOFT_INCL_STLSOFT_MEMORY_HPP_ALLOCATOR_SELECTOR
  63. # include <stlsoft/memory/allocator_selector.hpp>
  64. #endif /* !STLSOFT_INCL_STLSOFT_MEMORY_HPP_ALLOCATOR_SELECTOR */
  65. #ifndef UNIXSTL_INCL_UNIXSTL_SHIMS_ACCESS_HPP_STRING
  66. # include <unixstl/shims/access/string.hpp>
  67. #endif /* !UNIXSTL_INCL_UNIXSTL_SHIMS_ACCESS_HPP_STRING */
  68. #ifndef STLSOFT_INCL_STLSOFT_STRING_HPP_COPY_FUNCTIONS
  69. # include <stlsoft/string/copy_functions.hpp>
  70. #endif /* !STLSOFT_INCL_STLSOFT_STRING_HPP_COPY_FUNCTIONS */
  71. #ifndef STLSOFT_INCL_H_UNISTD
  72. # define STLSOFT_INCL_H_UNISTD
  73. # include <unistd.h>
  74. #endif /* !STLSOFT_INCL_H_UNISTD */
  75. /* /////////////////////////////////////////////////////////////////////////
  76. * Namespace
  77. */
  78. #ifndef _UNIXSTL_NO_NAMESPACE
  79. # if defined(_STLSOFT_NO_NAMESPACE) || \
  80. defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
  81. /* There is no stlsoft namespace, so must define ::unixstl */
  82. namespace unixstl
  83. {
  84. # else
  85. /* Define stlsoft::unixstl_project */
  86. namespace stlsoft
  87. {
  88. namespace unixstl_project
  89. {
  90. # endif /* _STLSOFT_NO_NAMESPACE */
  91. #endif /* !_UNIXSTL_NO_NAMESPACE */
  92. /* /////////////////////////////////////////////////////////////////////////
  93. * Classes
  94. */
  95. // class basic_file_path_buffer
  96. /** \brief Acts as a buffer with sufficient size for any drive on the host machine
  97. *
  98. * \ingroup group__library__filesystem
  99. *
  100. * This class is a non-template class primarily so that separate instantiations
  101. * are not created for each instantiation of the basic_file_path_buffer.
  102. *
  103. * This class provides a simple function, which is to provide the maximum path
  104. * length for the host. This information is then cached due to the static nature
  105. * of the get_drivesvar_() method, although it can be reset by calling the
  106. * refresh() method on the buffer class.
  107. *
  108. * \param C The character type
  109. * \param A The allocator type
  110. */
  111. template< ss_typename_param_k C
  112. #ifdef STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
  113. , ss_typename_param_k A = ss_typename_type_def_k allocator_selector<C>::allocator_type
  114. #else /* ? STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT */
  115. , ss_typename_param_k A /* = ss_typename_type_def_k allocator_selector<C>::allocator_type */
  116. #endif /* STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT */
  117. >
  118. class basic_file_path_buffer
  119. {
  120. /// \name Member Constants
  121. /// @{
  122. private:
  123. enum
  124. {
  125. #ifdef PATH_MAX
  126. internalBufferSize = 1 + PATH_MAX
  127. #else /* ? PATH_MAX */
  128. internalBufferSize = 1 + 512
  129. #endif /* PATH_MAX */
  130. };
  131. enum
  132. {
  133. indeterminateMaxPathGuess = 2048
  134. };
  135. typedef stlsoft_ns_qual(auto_buffer)<
  136. C
  137. , internalBufferSize
  138. , A
  139. > buffer_type_;
  140. /// @}
  141. /// \name Member Types
  142. /// @{
  143. public:
  144. /// \brief The character type
  145. typedef C char_type;
  146. /// \brief The allocator type
  147. typedef A allocator_type;
  148. /// \brief The current parameterisation of the type
  149. typedef basic_file_path_buffer<C, A> class_type;
  150. /// \brief The value type
  151. typedef ss_typename_type_k buffer_type_::value_type value_type;
  152. /// \brief The reference type
  153. typedef value_type& reference;
  154. /// \brief The non-mutating (const) reference type
  155. typedef value_type const& const_reference;
  156. /// \brief The size type
  157. typedef ss_typename_type_k buffer_type_::size_type size_type;
  158. /// @}
  159. /// \name Construction
  160. /// @{
  161. public:
  162. /// \brief Default constructor
  163. basic_file_path_buffer()
  164. : m_buffer(1 + calc_path_max_())
  165. {
  166. #ifdef _DEBUG
  167. ::memset(&m_buffer[0], '?', m_buffer.size());
  168. m_buffer[m_buffer.size() - 1] = '\0';
  169. #endif /* _DEBUG */
  170. }
  171. /// \brief Copy constructor
  172. basic_file_path_buffer(class_type const& rhs)
  173. : m_buffer(rhs.size())
  174. {
  175. stlsoft_ns_qual(pod_copy_n)(data(), rhs.data(), m_buffer.size());
  176. }
  177. /// \brief Copy assignment operator
  178. class_type& operator =(class_type const& rhs)
  179. {
  180. m_buffer.resize(rhs.size());
  181. stlsoft_ns_qual(pod_copy_n)(data(), rhs.data(), m_buffer.size());
  182. return *this;
  183. }
  184. /// @}
  185. /// \name Operations
  186. /// @{
  187. public:
  188. /// \brief Swaps the contents with those of another instance
  189. ///
  190. /// \param rhs The instance whose contents will be swapped with the
  191. /// callee
  192. ///
  193. /// \note The complexity of this operation is not guaranteed
  194. /// to be constant-time. See the documentation for
  195. /// \link stlsoft::auto_buffer auto_buffer\endlink for
  196. /// further details.
  197. void swap(class_type& rhs) stlsoft_throw_0()
  198. {
  199. m_buffer.swap(rhs.m_buffer);
  200. }
  201. /// \brief Resizes the buffer to the given size.
  202. us_bool_t grow(size_type newSize)
  203. {
  204. return m_buffer.resize(newSize);
  205. }
  206. /// \brief Doubles the size of the buffer
  207. us_bool_t grow()
  208. {
  209. return grow(2 * size());
  210. }
  211. /// @}
  212. /// \name Accessors
  213. /// @{
  214. public:
  215. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  216. value_type const* data() const
  217. {
  218. return m_buffer.data();
  219. }
  220. value_type* data()
  221. {
  222. return m_buffer.data();
  223. }
  224. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  225. /// \brief Returns a pointer to a nul-terminated string
  226. value_type const* c_str() const
  227. {
  228. return this->data();
  229. }
  230. /// \brief Returns a mutable (non-const) pointer to the internal buffer
  231. reference operator [](us_size_t index)
  232. {
  233. buffer_type_& this_ = m_buffer;
  234. return this_[index];
  235. }
  236. #if !defined(STLSOFT_COMPILER_IS_COMO) && \
  237. !defined(STLSOFT_COMPILER_IS_MWERKS)
  238. /// \brief Returns a non-mutable (const) pointer to the internal buffer
  239. const_reference operator [](us_size_t index) const
  240. {
  241. UNIXSTL_MESSAGE_ASSERT("Index out of range", !(size() < index));
  242. return data()[index];
  243. }
  244. #endif /* compiler */
  245. /// \brief Returns the size of the internal buffer
  246. size_type size() const
  247. {
  248. return m_buffer.size();
  249. }
  250. /// \brief Returns the maximum size of the internal buffer
  251. static size_type max_size()
  252. {
  253. return calc_path_max_();
  254. }
  255. /// \brief Copies the contents into a caller supplied buffer
  256. ///
  257. /// \param buffer Pointer to character buffer to receive the contents.
  258. /// May be NULL, in which case the method returns size().
  259. /// \param cchBuffer Number of characters of available space in \c buffer.
  260. size_type copy(char_type* buffer, size_type cchBuffer) const
  261. {
  262. return stlsoft_ns_qual(copy_contents)(buffer, cchBuffer, m_buffer.data(), m_buffer.size());
  263. }
  264. /// @}
  265. /// \name Operations
  266. /// @{
  267. public:
  268. /// \brief Causes the drives to be examined again for the next instance.
  269. ///
  270. /// \deprecated
  271. static void refresh() stlsoft_throw_0()
  272. {}
  273. /// @}
  274. /// \name Implementation
  275. /// @{
  276. private:
  277. static size_type calc_path_max_()
  278. {
  279. #ifdef PATH_MAX
  280. return PATH_MAX;
  281. #else /* ? PATH_MAX */
  282. int pathMax = ::pathconf("/", _PC_PATH_MAX);
  283. if(pathMax < 0)
  284. {
  285. pathMax = indeterminateMaxPathGuess;
  286. }
  287. else
  288. {
  289. ++pathMax;
  290. }
  291. return static_cast<size_type>(pathMax);
  292. #endif /* PATH_MAX */
  293. }
  294. /// @}
  295. /// \name Members
  296. /// @{
  297. private:
  298. buffer_type_ m_buffer;
  299. /// @}
  300. };
  301. /* Typedefs to commonly encountered types. */
  302. /** \brief Specialisation of the basic_file_path_buffer template for the ANSI character type \c char
  303. *
  304. * \ingroup group__library__filesystem
  305. */
  306. typedef basic_file_path_buffer<us_char_a_t, stlsoft_ns_qual(allocator_selector)<us_char_a_t>::allocator_type> file_path_buffer_a;
  307. /** \brief Specialisation of the basic_file_path_buffer template for the Unicode character type \c wchar_t
  308. *
  309. * \ingroup group__library__filesystem
  310. */
  311. typedef basic_file_path_buffer<us_char_w_t, stlsoft_ns_qual(allocator_selector)<us_char_w_t>::allocator_type> file_path_buffer_w;
  312. /** \brief Specialisation of the basic_file_path_buffer template for the ANSI character type \c char
  313. *
  314. * \ingroup group__library__filesystem
  315. */
  316. typedef basic_file_path_buffer<us_char_a_t, stlsoft_ns_qual(allocator_selector)<us_char_a_t>::allocator_type> file_path_buffer;
  317. /* /////////////////////////////////////////////////////////////////////////
  318. * Support for PlatformSTL redefinition by inheritance+namespace, for confused
  319. * compilers (e.g. VC++ 6)
  320. */
  321. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  322. template< ss_typename_param_k C
  323. #ifdef STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
  324. , ss_typename_param_k A = ss_typename_type_def_k allocator_selector<C>::allocator_type
  325. #else /* ? STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT */
  326. , ss_typename_param_k A /* = ss_typename_type_def_k allocator_selector<C>::allocator_type */
  327. #endif /* STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT */
  328. >
  329. class basic_file_path_buffer__
  330. : public unixstl_ns_qual(basic_file_path_buffer)<C, A>
  331. {
  332. private:
  333. typedef unixstl_ns_qual(basic_file_path_buffer)<C, A> parent_class_type;
  334. public:
  335. typedef basic_file_path_buffer__<C, A> class_type;
  336. typedef ss_typename_type_k parent_class_type::value_type value_type;
  337. typedef ss_typename_type_k parent_class_type::reference reference;
  338. typedef ss_typename_type_k parent_class_type::const_reference const_reference;
  339. typedef ss_typename_type_k parent_class_type::size_type size_type;
  340. };
  341. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  342. /* /////////////////////////////////////////////////////////////////////////
  343. * swapping
  344. */
  345. template<
  346. ss_typename_param_k C
  347. , ss_typename_param_k A
  348. >
  349. inline
  350. void
  351. swap(
  352. basic_file_path_buffer<C, A>& lhs
  353. , basic_file_path_buffer<C, A>& rhs
  354. )
  355. {
  356. lhs.swap(rhs);
  357. }
  358. /* /////////////////////////////////////////////////////////////////////////
  359. * Shims
  360. */
  361. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  362. template <ss_typename_param_k A>
  363. inline us_char_a_t const* c_str_data_a(unixstl_ns_qual(basic_file_path_buffer)<us_char_a_t, A> const& b)
  364. {
  365. return b.c_str();
  366. }
  367. template <ss_typename_param_k A>
  368. inline us_char_w_t const* c_str_data_w(unixstl_ns_qual(basic_file_path_buffer)<us_char_w_t, A> const& b)
  369. {
  370. return b.c_str();
  371. }
  372. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  373. /** \brief \ref group__concept__shim__string_access__c_str_data for unixstl::basic_file_path_buffer
  374. *
  375. * \ingroup group__concept__shim__string_access
  376. */
  377. template< ss_typename_param_k C
  378. , ss_typename_param_k A
  379. >
  380. inline C const* c_str_data(unixstl_ns_qual(basic_file_path_buffer)<C, A> const& b)
  381. {
  382. return b.c_str();
  383. }
  384. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  385. template <ss_typename_param_k A>
  386. inline us_size_t c_str_len_a(unixstl_ns_qual(basic_file_path_buffer)<us_char_a_t, A> const& b)
  387. {
  388. return stlsoft_ns_qual(c_str_len_a)(b.c_str());
  389. }
  390. template <ss_typename_param_k A>
  391. inline us_size_t c_str_len_w(unixstl_ns_qual(basic_file_path_buffer)<us_char_w_t, A> const& b)
  392. {
  393. return stlsoft_ns_qual(c_str_len_w)(b.c_str());
  394. }
  395. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  396. /** \brief \ref group__concept__shim__string_access__c_str_len for unixstl::basic_file_path_buffer
  397. *
  398. * \ingroup group__concept__shim__string_access
  399. */
  400. template< ss_typename_param_k C
  401. , ss_typename_param_k A
  402. >
  403. inline us_size_t c_str_len(unixstl_ns_qual(basic_file_path_buffer)<C, A> const& b)
  404. {
  405. return stlsoft_ns_qual(c_str_len)(b.c_str());
  406. }
  407. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  408. template <ss_typename_param_k A>
  409. inline us_char_a_t const* c_str_ptr_a(unixstl_ns_qual(basic_file_path_buffer)<us_char_a_t, A> const& b)
  410. {
  411. return b.c_str();
  412. }
  413. template <ss_typename_param_k A>
  414. inline us_char_w_t const* c_str_ptr_w(unixstl_ns_qual(basic_file_path_buffer)<us_char_w_t, A> const& b)
  415. {
  416. return b.c_str();
  417. }
  418. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  419. /** \brief \ref group__concept__shim__string_access__c_str_ptr for unixstl::basic_file_path_buffer
  420. *
  421. * \ingroup group__concept__shim__string_access
  422. */
  423. template< ss_typename_param_k C
  424. , ss_typename_param_k A
  425. >
  426. inline C const* c_str_ptr(unixstl_ns_qual(basic_file_path_buffer)<C, A> const& b)
  427. {
  428. return b.c_str();
  429. }
  430. #ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
  431. template <ss_typename_param_k A>
  432. inline us_char_a_t const* c_str_ptr_null_a(unixstl_ns_qual(basic_file_path_buffer)<us_char_a_t, A> const& b)
  433. {
  434. return stlsoft_ns_qual(c_str_ptr_null_a)(b.c_str());
  435. }
  436. template <ss_typename_param_k A>
  437. inline us_char_w_t const* c_str_ptr_null_w(unixstl_ns_qual(basic_file_path_buffer)<us_char_w_t, A> const& b)
  438. {
  439. return stlsoft_ns_qual(c_str_ptr_null_w)(b.c_str());
  440. }
  441. #endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
  442. /** \brief \ref group__concept__shim__string_access__c_str_ptr_null for unixstl::basic_file_path_buffer
  443. *
  444. * \ingroup group__concept__shim__string_access
  445. */
  446. template< ss_typename_param_k C
  447. , ss_typename_param_k A
  448. >
  449. inline C const* c_str_ptr_null(unixstl_ns_qual(basic_file_path_buffer)<C, A> const& b)
  450. {
  451. return stlsoft_ns_qual(c_str_ptr_null)(b.c_str());
  452. }
  453. /** \brief \ref group__concept__shim__stream_insertion "stream insertion shim" for unixstl::basic_file_path_buffer
  454. *
  455. * \ingroup group__concept__shim__stream_insertion
  456. */
  457. template< ss_typename_param_k S
  458. , ss_typename_param_k C
  459. , ss_typename_param_k A
  460. >
  461. inline S& operator <<(S& s, unixstl_ns_qual(basic_file_path_buffer)<C, A> const& b)
  462. {
  463. s << b.c_str();
  464. return s;
  465. }
  466. /* /////////////////////////////////////////////////////////////////////////
  467. * Unit-testing
  468. */
  469. #ifdef STLSOFT_UNITTEST
  470. # include "./unittest/file_path_buffer_unittest_.h"
  471. #endif /* STLSOFT_UNITTEST */
  472. /* ////////////////////////////////////////////////////////////////////// */
  473. #ifndef _UNIXSTL_NO_NAMESPACE
  474. # if defined(_STLSOFT_NO_NAMESPACE) || \
  475. defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
  476. } // namespace unixstl
  477. # else
  478. } // namespace unixstl_project
  479. } // namespace stlsoft
  480. # endif /* _STLSOFT_NO_NAMESPACE */
  481. #endif /* !_UNIXSTL_NO_NAMESPACE */
  482. /* In the special case of Intel behaving as VC++ 7.0 or earlier on Win32, we
  483. * illegally insert into the std namespace.
  484. */
  485. #if defined(STLSOFT_CF_std_NAMESPACE)
  486. # if ( ( defined(STLSOFT_COMPILER_IS_INTEL) && \
  487. defined(_MSC_VER))) && \
  488. _MSC_VER < 1310
  489. namespace std
  490. {
  491. template< ss_typename_param_k C
  492. , ss_typename_param_k A
  493. >
  494. inline void swap(unixstl_ns_qual(basic_file_path_buffer)<C, A>& lhs, unixstl_ns_qual(basic_file_path_buffer)<C, A>& rhs)
  495. {
  496. lhs.swap(rhs);
  497. }
  498. } // namespace std
  499. # endif /* INTEL && _MSC_VER < 1310 */
  500. #endif /* STLSOFT_CF_std_NAMESPACE */
  501. /* /////////////////////////////////////////////////////////////////////////
  502. * Namespace
  503. *
  504. * The string access shims exist either in the stlsoft namespace, or in the
  505. * global namespace. This is required by the lookup rules.
  506. *
  507. */
  508. #ifndef _UNIXSTL_NO_NAMESPACE
  509. # if !defined(_STLSOFT_NO_NAMESPACE) && \
  510. !defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
  511. namespace stlsoft
  512. {
  513. # else /* ? _STLSOFT_NO_NAMESPACE */
  514. /* There is no stlsoft namespace, so must define in the global namespace */
  515. # endif /* !_STLSOFT_NO_NAMESPACE */
  516. using ::unixstl::c_str_data;
  517. using ::unixstl::c_str_data_a;
  518. using ::unixstl::c_str_data_w;
  519. using ::unixstl::c_str_len;
  520. using ::unixstl::c_str_len_a;
  521. using ::unixstl::c_str_len_w;
  522. using ::unixstl::c_str_ptr;
  523. using ::unixstl::c_str_ptr_a;
  524. using ::unixstl::c_str_ptr_w;
  525. using ::unixstl::c_str_ptr_null;
  526. using ::unixstl::c_str_ptr_null_a;
  527. using ::unixstl::c_str_ptr_null_w;
  528. # if !defined(_STLSOFT_NO_NAMESPACE) && \
  529. !defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
  530. } // namespace stlsoft
  531. # else /* ? _STLSOFT_NO_NAMESPACE */
  532. /* There is no stlsoft namespace, so must define in the global namespace */
  533. # endif /* !_STLSOFT_NO_NAMESPACE */
  534. #endif /* !_UNIXSTL_NO_NAMESPACE */
  535. /* ////////////////////////////////////////////////////////////////////// */
  536. #endif /* UNIXSTL_INCL_UNIXSTL_FILESYSTEM_HPP_FILE_PATH_BUFFER */
  537. /* ///////////////////////////// end of file //////////////////////////// */