diff options
author | Gary Houston <ghouston@arglist.com> | 2000-01-31 18:29:56 +0000 |
---|---|---|
committer | Gary Houston <ghouston@arglist.com> | 2000-01-31 18:29:56 +0000 |
commit | bd9e24b30126cb31005ca286118609eb6f4dfbba (patch) | |
tree | 33a2cc729eb2990f3bf27ef0faa888c6e59392c6 /libguile/strings.h | |
parent | 505ede188182b40c34dba6745c768f42c7caca09 (diff) | |
download | guile-bd9e24b30126cb31005ca286118609eb6f4dfbba.tar.gz |
* strings.h: don't use SCM_P. don't include <string.h>.
* error.c, gh_data.c, ports.c, script.c, strop.c: include <string.h>.
* strings.c (scm_string_ref): make the 2nd argument compulsory.
previously it defaulted to zero for no good reason that I can see.
use a local variable for SCM_INUM (k). replace
SCM_VALIDATE_INUM_DEF with SCM_VALIDATE_INUM_COPY.
(scm_makfromstr): cosmetic changes.
(scm_string): Accept only chars in the list, not strings, for
conformance to R5RS (particularly for list->string, which is
supposed to be the inverse of string->list.) remove
SCM_DEFER_INTS/SCM_ALLOW_INTS, which is unnecessary since
scm_makstr handles the cell allocation. when reporting wrong-type
arg, don't report the position as 1.
* posix.c (scm_init_posix): intern PIPE_BUF if it's defined.
* boot-9.scm (find-and-link-dynamic-module): pass strings, not symbols,
to string-append.
Diffstat (limited to 'libguile/strings.h')
-rw-r--r-- | libguile/strings.h | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/libguile/strings.h b/libguile/strings.h index d7decc92f..b91aba0c9 100644 --- a/libguile/strings.h +++ b/libguile/strings.h @@ -49,13 +49,9 @@ #include "libguile/__scm.h" -#ifdef HAVE_STRING_H -#include <string.h> -#endif - -#define SCM_SLOPPY_STRINGP(x) ((SCM_TYP7S(x)==scm_tc7_string)) +#define SCM_SLOPPY_STRINGP(x) (SCM_TYP7S(x)==scm_tc7_string) #define SCM_STRINGP(x) (SCM_NIMP(x) && SCM_SLOPPY_STRINGP(x)) #define SCM_NSTRINGP(x) (!SCM_STRINGP(x)) @@ -66,23 +62,23 @@ -extern SCM scm_string_p SCM_P ((SCM x)); -extern SCM scm_read_only_string_p SCM_P ((SCM x)); -extern SCM scm_string SCM_P ((SCM chrs)); -extern SCM scm_makstr SCM_P ((long len, int slots)); -extern SCM scm_makfromstrs SCM_P ((int argc, char **argv)); -extern SCM scm_take_str SCM_P ((char *s, int len)); -extern SCM scm_take0str SCM_P ((char *s)); -extern SCM scm_makfromstr SCM_P ((const char *src, scm_sizet len, int slots)); -extern SCM scm_makfrom0str SCM_P ((const char *src)); -extern SCM scm_makfrom0str_opt SCM_P ((const char *src)); -extern SCM scm_make_string SCM_P ((SCM k, SCM chr)); -extern SCM scm_string_length SCM_P ((SCM str)); -extern SCM scm_string_ref SCM_P ((SCM str, SCM k)); -extern SCM scm_string_set_x SCM_P ((SCM str, SCM k, SCM chr)); -extern SCM scm_substring SCM_P ((SCM str, SCM start, SCM end)); -extern SCM scm_string_append SCM_P ((SCM args)); -extern SCM scm_make_shared_substring SCM_P ((SCM str, SCM frm, SCM to)); -extern void scm_init_strings SCM_P ((void)); +extern SCM scm_string_p (SCM x); +extern SCM scm_read_only_string_p (SCM x); +extern SCM scm_string (SCM chrs); +extern SCM scm_makstr (long len, int slots); +extern SCM scm_makfromstrs (int argc, char **argv); +extern SCM scm_take_str (char *s, int len); +extern SCM scm_take0str (char *s); +extern SCM scm_makfromstr (const char *src, scm_sizet len, int slots); +extern SCM scm_makfrom0str (const char *src); +extern SCM scm_makfrom0str_opt (const char *src); +extern SCM scm_make_string (SCM k, SCM chr); +extern SCM scm_string_length (SCM str); +extern SCM scm_string_ref (SCM str, SCM k); +extern SCM scm_string_set_x (SCM str, SCM k, SCM chr); +extern SCM scm_substring (SCM str, SCM start, SCM end); +extern SCM scm_string_append (SCM args); +extern SCM scm_make_shared_substring (SCM str, SCM frm, SCM to); +extern void scm_init_strings (void); #endif /* STRINGSH */ |