Exemple #1
0
static void
make_argv (repv list, int *argc, char ***argv)
{
    int c = rep_INT (Flength (list)), i;
    char **v;

    v = (char **)rep_alloc ((c+1) * sizeof(char**));
    for (i = 0; i < c; i++, list = rep_CDR (list))
    {
	if (!rep_STRINGP (rep_CAR (list)))
	{
	    rep_free ((char *)v);
	    return;
	}
	v[i] = strdup (rep_STR (rep_CAR (list)));
    }
    v[c] = NULL;
  
    *argv = v;
    *argc = c;
}
Exemple #2
0
unsigned long gh_length(repv l)
{
    repv len = Flength (l);
    return len && rep_INTP (len) ? rep_INT (len) : 0;
}
Exemple #3
0
char gh_scm2char(repv obj)
{
    return rep_INTP (obj) && rep_INT (obj);
}