1/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2   file Copyright.txt or https://cmake.org/licensing#kwsys for details.  */
3#ifndef @KWSYS_NAMESPACE@_System_h
4#define @KWSYS_NAMESPACE@_System_h
5
6#include <@KWSYS_NAMESPACE@/Configure.h>
7
8/* Redefine all public interface symbol names to be in the proper
9   namespace.  These macros are used internally to kwsys only, and are
10   not visible to user code.  Use kwsysHeaderDump.pl to reproduce
11   these macros after making changes to the interface.  */
12#if !defined(KWSYS_NAMESPACE)
13#  define kwsys_ns(x) @KWSYS_NAMESPACE@##x
14#  define kwsysEXPORT @KWSYS_NAMESPACE@_EXPORT
15#endif
16#if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
17#  define kwsysSystem_Parse_CommandForUnix                                    \
18    kwsys_ns(System_Parse_CommandForUnix)
19#endif
20
21#if defined(__cplusplus)
22extern "C" {
23#endif
24
25/**
26 * Parse a unix-style command line string into separate arguments.
27 *
28 * On success, returns a pointer to an array of pointers to individual
29 * argument strings.  Each string is null-terminated and the last
30 * entry in the array is a NULL pointer (just like argv).  It is the
31 * caller's responsibility to free() the strings and the array of
32 * pointers to them.
33 *
34 * On failure, returns NULL.  Failure occurs only on invalid flags or
35 * when memory cannot be allocated; never due to content of the input
36 * string.  Missing close-quotes are treated as if the necessary
37 * closing quote appears.
38 *
39 * By default single- and double-quoted arguments are supported, and
40 * any character may be escaped by a backslash.  The flags argument is
41 * reserved for future use, and must be zero (or the call will fail).
42 */
43kwsysEXPORT char** kwsysSystem_Parse_CommandForUnix(const char* command,
44                                                    int flags);
45
46#if defined(__cplusplus)
47} /* extern "C" */
48#endif
49
50/* If we are building a kwsys .c or .cxx file, let it use these macros.
51   Otherwise, undefine them to keep the namespace clean.  */
52#if !defined(KWSYS_NAMESPACE)
53#  undef kwsys_ns
54#  undef kwsysEXPORT
55#  if !defined(KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
56#    undef kwsysSystem_Parse_CommandForUnix
57#  endif
58#endif
59
60#endif
61