() Paul Smith <[email protected]>
() Sat, 17 Sep 2011 20:10:16 -0400
char *str = scm_to_locale_string (scm_object_to_string (scm_c_eval_string
(argv[0]),
SCM_UNDEFINED));
char *s = str;
unsigned int l = strlen (s);
if (s[0] == '"' && s[l-1] == '"')
{
s[l-1] = '\0';
++s;
l -= 2;
}
o = variable_buffer_output (o, s, l);
free (str);
The double-quote stripping is kind of hacky. I would create a port and
‘display’ the result of ‘scm_c_eval_string’ to it. Perhaps you could
expose a ‘write’ variant, as well, for complete user control.
Similarly for the other funcs. Overall, i get the vague impression that
points of exposure could be improved -- made more orthogonal, w/ fewer
(but more powerful) funcs, but that's probably simply my ignorance of Make
internals speaking.