1 /* Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
3 * Permission to use, copy, modify, and distribute this software
4 * is freely granted, provided that this notice is preserved.
14 argz_create (char *const argv
[],
33 *argz_len
+= (strlen(argv
[argc
]) + 1);
37 /* There are argc strings to copy into argz. */
38 if(!(*argz
= (char *)malloc(*argz_len
)))
42 for(i
= 0; i
< argc
; i
++)
44 len
= strlen(argv
[i
]) + 1;
45 memcpy(iter
, argv
[i
], len
);