X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Flily-guile.hh;h=672a0df804fdd7197d8b2a0154e2fa014ba011f9;hb=f4aad1d9884bd73c04cc89ecc3f943d8295ebab6;hp=dd28743ccfcc5bdad32ba9e90f1452a555dedcbd;hpb=6c0a242bac0f7b3538adce970b5543cc415b46c4;p=lilypond.git diff --git a/lily/include/lily-guile.hh b/lily/include/lily-guile.hh index dd28743ccf..672a0df804 100644 --- a/lily/include/lily-guile.hh +++ b/lily/include/lily-guile.hh @@ -33,7 +33,7 @@ SCM ly_to_symbol (SCM scm); extern SCM global_lily_module; -String gulp_file_to_string (String fn, bool must_exist); +String gulp_file_to_string (String fn, bool must_exist, int size); String ly_scm2string (SCM s); String ly_symbol2string (SCM); @@ -72,9 +72,11 @@ inline SCM ly_assoc_front_x (SCM alist, SCM key, SCM val) { return scm_acons (key, val, scm_assoc_remove_x (alist, key)); } -inline bool ly_c_list_p (SCM x) { return SCM_NFALSEP (scm_list_p (x)); } -inline bool ly_c_procedure_p (SCM x) { return SCM_NFALSEP (scm_procedure_p (x)); } -inline bool ly_c_equal_p (SCM x, SCM y) +inline bool ly_is_list (SCM x) { return SCM_NFALSEP (scm_list_p (x)); } +inline bool ly_is_procedure (SCM x) { return SCM_NFALSEP (scm_procedure_p (x)); } +inline bool ly_is_port (SCM x) { return SCM_NFALSEP (scm_port_p (x)); } + +inline bool ly_is_equal (SCM x, SCM y) { return SCM_NFALSEP (scm_equal_p (x, y)); } @@ -156,4 +158,17 @@ typedef SCM (*Scheme_function_1) (...); typedef SCM (*Scheme_function_2) (...); typedef SCM (*Scheme_function_3) (...); #endif + +#define scm_cdr ly_cdr +#define scm_car ly_car + +#ifndef scm_is_pair +#define scm_is_pair ly_is_pair +#endif + +inline SCM ly_car (SCM x) { return SCM_CAR (x); } +inline SCM ly_cdr (SCM x) { return SCM_CDR (x); } +inline bool ly_is_pair (SCM x) { return SCM_I_CONSP (x); } + + #endif /* LILY_GUILE_HH */