72 |
#include "libguile/ports.h" |
#include "libguile/ports.h" |
73 |
#include "libguile/strings.h" |
#include "libguile/strings.h" |
74 |
#include "libguile/deprecation.h" |
#include "libguile/deprecation.h" |
75 |
|
#include "libguile/lang.h" |
76 |
#include "libguile/validate.h" |
#include "libguile/validate.h" |
77 |
|
|
78 |
/* Create a new C argv array from a scheme list of strings. */ |
/* Create a new C argv array from a scheme list of strings. */ |
98 |
argc = scm_ilength (args); |
argc = scm_ilength (args); |
99 |
SCM_ASSERT (argc >= 0, args, argn, subr); |
SCM_ASSERT (argc >= 0, args, argn, subr); |
100 |
argv = (char **) scm_must_malloc ((argc + 1) * sizeof (char *), subr); |
argv = (char **) scm_must_malloc ((argc + 1) * sizeof (char *), subr); |
101 |
for (i = 0; !SCM_NULLP (args); args = SCM_CDR (args), ++i) { |
for (i = 0; !SCM_NULL_OR_NIL_P (args); args = SCM_CDR (args), ++i) { |
102 |
SCM arg = SCM_CAR (args); |
SCM arg = SCM_CAR (args); |
103 |
size_t len; |
size_t len; |
104 |
char *dst; |
char *dst; |