diff options
author | Martin Grabmüller <mgrabmue@cs.tu-berlin.de> | 2001-03-15 11:24:45 +0000 |
---|---|---|
committer | Martin Grabmüller <mgrabmue@cs.tu-berlin.de> | 2001-03-15 11:24:45 +0000 |
commit | e87a03fce7820f2146704b7ce5aa2c2a3f395b85 (patch) | |
tree | 0046f478a5d51aa69cc0459b68c5d7ca3b8883e1 /libguile/strports.h | |
parent | 160bb34a53c1d775bc0cb71b45c9a2eb289749cf (diff) | |
download | guile-e87a03fce7820f2146704b7ce5aa2c2a3f395b85.tar.gz |
* validate.h (SCM_VALIDATE_OPOUTSTRPORT): New macro.
* strports.h (SCM_STRPORTP, SCM_OPSTRPORTP, SCM_OPINSTRPORTP),
(SCM_OPOUTSTRPORTP): New predicate macros.
(scm_open_input_string, scm_open_output_string),
(scm_get_output_string): New prototypes.
* strports.c (scm_open_input_string, scm_open_output_string),
(scm_get_output_string): New procedures (SRFI-6 compliant).
Made scm_tc16_strport non-static.
Diffstat (limited to 'libguile/strports.h')
-rw-r--r-- | libguile/strports.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libguile/strports.h b/libguile/strports.h index 6767bd2b7..9388c2dcd 100644 --- a/libguile/strports.h +++ b/libguile/strports.h @@ -48,11 +48,30 @@ + +#define SCM_STRPORTP(x) (!SCM_IMP (x) && \ + (SCM_TYP16 (x) == scm_tc16_strport)) +#define SCM_OPSTRPORTP(x) (SCM_STRPORTP (x) && \ + (SCM_CELL_WORD_0 (x) & SCM_OPN)) +#define SCM_OPINSTRPORTP(x) (SCM_OPSTRPORTP (x) && \ + (SCM_CELL_WORD_0 (x) & SCM_RDNG)) +#define SCM_OPOUTSTRPORTP(x) (SCM_OPSTRPORTP (x) && \ + (SCM_CELL_WORD_0 (x) & SCM_WRTNG)) + + + +extern scm_bits_t scm_tc16_strport; + + + extern SCM scm_mkstrport (SCM pos, SCM str, long modes, const char * caller); extern SCM scm_strport_to_string (SCM port); extern SCM scm_object_to_string (SCM obj, SCM printer); extern SCM scm_call_with_output_string (SCM proc); extern SCM scm_call_with_input_string (SCM str, SCM proc); +extern SCM scm_open_input_string (SCM str); +extern SCM scm_open_output_string (void); +extern SCM scm_get_output_string (SCM port); extern SCM scm_read_0str (char *expr); extern SCM scm_eval_0str (const char *expr); extern SCM scm_eval_string (SCM string); |