#include /* This outputs: dhansen@localhorst ~/tmp $ ./a.out foo,bar bar */ static void inner_main (void *data, int argc, char **argv) { char *cstr; SCM string = scm_from_latin1_string ("foo,bar"); SCM tokens = scm_string_split (string, SCM_MAKE_CHAR (',')); SCM tok; for (tok = tokens; !scm_is_null (tok); tok = scm_cdr (tok)) { cstr = scm_to_latin1_string (scm_car (tok)); printf ("%s\n", cstr); free (cstr); } } int main (int argc, char **argv) { scm_boot_guile (argc, argv, inner_main, NULL); } /* Local Variables: */ /* compile-command: "gcc `pkg-config --cflags --libs guile-2.0` main.c" */ /* End: */