]> git.donarmstrong.com Git - lilypond.git/blob - guile18/libguile/strports.h
New upstream version 2.19.65
[lilypond.git] / guile18 / libguile / strports.h
1 /* classes: h_files */
2
3 #ifndef SCM_STRPORTS_H
4 #define SCM_STRPORTS_H
5
6 /* Copyright (C) 1995,1996,2000,2001,2002, 2006 Free Software Foundation, Inc.
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22
23 \f
24
25 #include "libguile/__scm.h"
26
27 \f
28
29
30 #define SCM_STRPORTP(x)      (!SCM_IMP (x) && \
31                               (SCM_TYP16 (x) == scm_tc16_strport))
32 #define SCM_OPSTRPORTP(x)    (SCM_STRPORTP (x) && \
33                               (SCM_CELL_WORD_0 (x) & SCM_OPN))
34 #define SCM_OPINSTRPORTP(x)  (SCM_OPSTRPORTP (x) && \
35                               (SCM_CELL_WORD_0 (x) & SCM_RDNG))
36 #define SCM_OPOUTSTRPORTP(x) (SCM_OPSTRPORTP (x) && \
37                               (SCM_CELL_WORD_0 (x) & SCM_WRTNG))
38
39 \f
40
41 SCM_API scm_t_bits scm_tc16_strport;
42
43 \f
44
45 SCM_API SCM scm_mkstrport (SCM pos, SCM str, long modes, const char * caller);
46 SCM_API SCM scm_strport_to_string (SCM port);
47 SCM_API SCM scm_object_to_string (SCM obj, SCM printer);
48 SCM_API SCM scm_call_with_output_string (SCM proc);
49 SCM_API SCM scm_call_with_input_string (SCM str, SCM proc);
50 SCM_API SCM scm_open_input_string (SCM str);
51 SCM_API SCM scm_open_output_string (void);
52 SCM_API SCM scm_get_output_string (SCM port);
53 SCM_API SCM scm_c_read_string (const char *expr);
54 SCM_API SCM scm_c_eval_string (const char *expr);
55 SCM_API SCM scm_c_eval_string_in_module (const char *expr, SCM module);
56 SCM_API SCM scm_eval_string (SCM string);
57 SCM_API SCM scm_eval_string_in_module (SCM string, SCM module);
58 SCM_API void scm_init_strports (void);
59
60 #endif  /* SCM_STRPORTS_H */
61
62 /*
63   Local Variables:
64   c-file-style: "gnu"
65   End:
66 */