if (be_verbose_global)
progress_indication ("[" + s);
- int n = size;
- char *str = gulp_file (s, &n);
- string result (str, n);
- delete[] str;
+ vector<char> chars = gulp_file (s, size);
+ string result (&chars[0], chars.size ());
if (be_verbose_global)
progress_indication ("]");
return result;
}
-extern "C" {
- // maybe gdb 5.0 becomes quicker if it doesn't do fancy C++ typing?
- void
- ly_display_scm (SCM s)
- {
- scm_display (s, scm_current_output_port ());
- scm_newline (scm_current_output_port ());
- }
-};
+void
+ly_display_scm (void *s)
+{
+ scm_display ((SCM)s, scm_current_output_port ());
+ scm_newline (scm_current_output_port ());
+}
string
ly_scm2string (SCM str)
{
assert (scm_is_string (str));
return string (scm_i_string_chars (str),
- (int) scm_i_string_length (str));
+ (int) scm_i_string_length (str));
}
char *
string s = symbols;
replace_all (s, '\n', ' ');
replace_all (s, '\t', ' ');
- return ly_string_array_to_scm (split_string (s, ' '));
+ return ly_string_array_to_scm (string_split (s, ' '));
}
SCM
return pa < pb ? -1 : 1;
}
-/* Modify LST in place: qsort it. */
+/* Modify LST in place: qsort it.
+
+FIXME: unused, junk? */
SCM
ly_list_qsort_uniq_x (SCM lst)
{
return o;
}
+string
+robust_scm2string (SCM k, string s)
+{
+ if (scm_is_string (k))
+ s = ly_scm2string (k);
+ return s;
+}
+
int
robust_scm2int (SCM k, int o)
{
cxx_id = replace_all (cxx_id, '_', '-');
return cxx_id;
}
+