1
/*===========================================================================
2
* Filename : scmport-file.h
3
* About : A ScmBytePort implementation for file stream of the standard C
6
* Copyright (C) 2005-2006 YAMAMOTO Kengo <yamaken AT bp.iij4u.or.jp>
7
* Copyright (c) 2007 SigScheme Project <uim AT freedesktop.org>
11
* Redistribution and use in source and binary forms, with or without
12
* modification, are permitted provided that the following conditions
15
* 1. Redistributions of source code must retain the above copyright
16
* notice, this list of conditions and the following disclaimer.
17
* 2. Redistributions in binary form must reproduce the above copyright
18
* notice, this list of conditions and the following disclaimer in the
19
* documentation and/or other materials provided with the distribution.
20
* 3. Neither the name of authors nor the names of its contributors
21
* may be used to endorse or promote products derived from this software
22
* without specific prior written permission.
24
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
25
* IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
26
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
28
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
30
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
31
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
32
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
33
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
34
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
===========================================================================*/
38
* This file is intended to be portable. Don't depend on SigScheme and don't
39
* merge into another file.
42
#ifndef __SCM_SCMPORT_FILE_H
43
#define __SCM_SCMPORT_FILE_H
53
/*=======================================
55
=======================================*/
57
/*=======================================
59
=======================================*/
61
/*=======================================
63
=======================================*/
64
SCM_EXTERN(const ScmBytePortVTbl *const ScmFilePort_vptr);
66
/*=======================================
68
=======================================*/
69
SCM_EXPORT void scm_fileport_init(void);
71
SCM_EXPORT ScmBytePort *ScmFilePort_new(FILE *file, const char *aux_info);
72
SCM_EXPORT ScmBytePort *ScmFilePort_new_shared(FILE *file,
73
const char *aux_info);
74
SCM_EXPORT ScmBytePort *ScmFilePort_open_input_file(const char *path);
75
SCM_EXPORT ScmBytePort *ScmFilePort_open_output_file(const char *path);
81
#endif /* __SCM_SCMPORT_FILE_H */