-
Notifications
You must be signed in to change notification settings - Fork 1
/
argize.h
41 lines (31 loc) · 825 Bytes
/
argize.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* Copyright (c) 1998 by Christopher Nebel. All Rights Reserved.
*
* Please see the accompanying license file, LICENSE.TXT, for information
* on using and copying this software.
*/
/*
Name
argize.h
Function
Break a string into argc/argv-style arguments.
Notes
none
Modified
07/04/98 CNebel - Created based on older Mac-specific argize source.
*/
#ifndef _ARGIZE_
#define _ARGIZE_
#include <stddef.h>
/*
* Return what argc would be if this string were fed to argize.
*/
int countargs(const char *cmdline);
/*
* Break a string <cmdline> into argc/argv arguments, removing quotes in
* the process. Returns 0 on success, 1 if there were too many
* arguments to fit into argv.
*/
int argize(char *cmdline, int * const argc, char *argv[],
const size_t argvlen);
#endif