2
* Copyright 2007 Massachusetts Institute of Technology.
5
* Export of this software from the United States of America may
6
* require a specific license from the United States Government.
7
* It is the responsibility of any person or organization contemplating
8
* export to obtain such a license before exporting.
10
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
11
* distribute this software and its documentation for any purpose and
12
* without fee is hereby granted, provided that the above copyright
13
* notice appear in all copies and that both that copyright notice and
14
* this permission notice appear in supporting documentation, and that
15
* the name of M.I.T. not be used in advertising or publicity pertaining
16
* to distribution of the software without specific, written prior
17
* permission. Furthermore if you modify this software you must label
18
* your software as modified software and not distribute it in such a
19
* fashion that it might be confused with the original M.I.T. software.
20
* M.I.T. makes no representations about the suitability of
21
* this software for any purpose. It is provided "as is" without express
22
* or implied warranty.
2
25
* Copyright 1987, 1988 by MIT Student Information Processing Board
4
27
* For copyright info, see copyright.h.
23
46
* Where to put the "argc" (number of tokens) value.
26
* Series of pointers to parsed tokens.
49
* Series of pointers to parsed tokens in the original string.
29
52
#define NEW_ARGV(old,n) (char **)realloc((char *)old,\
67
91
/* go to quoted-string mode */
68
92
parse_mode = QUOTED_STRING;
70
argv = NEW_ARGV (argv, argc);
94
newargv = NEW_ARGV (argv, argc);
95
if (newargv == NULL) {
98
ss_error(sci_idx, errno, "Can't allocate storage");
71
103
argv[argc++] = cp;
72
104
argv[argc] = NULL;