32-way branching in intmap.scm, not 16-way
[bpt/guile.git] / libguile / strports.h
CommitLineData
0f2d19dd
JB
1/* classes: h_files */
2
dee01b01
DH
3#ifndef SCM_STRPORTS_H
4#define SCM_STRPORTS_H
5
dc7da0be 6/* Copyright (C) 1995,1996,2000,2001,2002, 2006, 2008, 2010, 2011 Free Software Foundation, Inc.
dee01b01 7 *
73be1d9e 8 * This library is free software; you can redistribute it and/or
53befeb7
NJ
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 3 of
11 * the License, or (at your option) any later version.
dee01b01 12 *
53befeb7
NJ
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
73be1d9e
MV
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
dee01b01 17 *
73be1d9e
MV
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
53befeb7
NJ
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 * 02110-1301 USA
73be1d9e 22 */
dee01b01 23
0f2d19dd
JB
24\f
25
b4309c3c 26#include "libguile/__scm.h"
0f2d19dd 27
0f2d19dd 28\f
0f2d19dd 29
e87a03fc 30
dc7da0be 31#define SCM_STRPORTP(x) (SCM_HAS_TYP16 (x, scm_tc16_strport))
e87a03fc
MG
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
33b001fd 41SCM_API scm_t_bits scm_tc16_strport;
e87a03fc
MG
42
43\f
44
33b001fd
MV
45SCM_API SCM scm_mkstrport (SCM pos, SCM str, long modes, const char * caller);
46SCM_API SCM scm_strport_to_string (SCM port);
47SCM_API SCM scm_object_to_string (SCM obj, SCM printer);
48SCM_API SCM scm_call_with_output_string (SCM proc);
49SCM_API SCM scm_call_with_input_string (SCM str, SCM proc);
50SCM_API SCM scm_open_input_string (SCM str);
51SCM_API SCM scm_open_output_string (void);
52SCM_API SCM scm_get_output_string (SCM port);
53SCM_API SCM scm_c_read_string (const char *expr);
54SCM_API SCM scm_c_eval_string (const char *expr);
209b52fe 55SCM_API SCM scm_c_eval_string_in_module (const char *expr, SCM module);
33b001fd 56SCM_API SCM scm_eval_string (SCM string);
209b52fe 57SCM_API SCM scm_eval_string_in_module (SCM string, SCM module);
102dbb6f 58SCM_INTERNAL void scm_init_strports (void);
0f2d19dd 59
dee01b01 60#endif /* SCM_STRPORTS_H */
89e00824
ML
61
62/*
63 Local Variables:
64 c-file-style: "gnu"
65 End:
66*/