Blame include/sys/cmd.h

b85b1f
#ifndef _SYS_CMD_H
b85b1f
#define _SYS_CMD_H
b85b1f
b85b1f
#ifdef __cplusplus
b85b1f
extern "C" {
b85b1f
#endif
b85b1f
b85b1f
#define __NEED_size_t
b85b1f
b85b1f
#include <bits/alltypes.h>
b85b1f
b85b1f
/***************************************************************************/
b85b1f
/* int (*cmd_args_to_argv)(                                                */
b85b1f
/*      const char * args,                                                 */
b85b1f
/*      char * argbuf, size_t buflen,                                      */
b85b1f
/*      char ** argv, size_t nptrs);                                       */
b85b1f
/*                                                                         */
b85b1f
/* arguments:                                                              */
b85b1f
/*   args:       command to parse                                          */
b85b1f
/*   argbuf:     buffer to receive the corresponding sequence of           */
b85b1f
/*                 null-terminated arguments.                              */
b85b1f
/*   buflen:     size of argbuf, including final null-terminator.          */
b85b1f
/*   argv:       argument vector to receive pointers to the above          */
b85b1f
/*                 null-terminated arguments.                              */
b85b1f
/*   nptrs:      number of available argv pointers, including              */
b85b1f
/*                 including the terminating null pointer.                 */
b85b1f
/*                                                                         */
b85b1f
/* return value:                                                           */
b86e92
/*   zero upon successful parsing and buffer initialization;               */
b86e92
/*   otherwise, -1 shall be returned and errno set to indicate the error.  */
b85b1f
/*                                                                         */
b85b1f
/* implementation:                                                         */
b85b1f
/*   the above interface is async-safe, thread-safe, and re-entrant.       */
b85b1f
/*                                                                         */
b85b1f
/***************************************************************************/
b85b1f
b85b1f
int __cmd_args_to_argv(const char *, char *, size_t, char **, size_t);
b85b1f
b85b1f
#ifdef __cplusplus
b85b1f
}
b85b1f
#endif
b85b1f
b85b1f
#endif