97 |
old = SCM_COERCE_OUTPORT (old); |
old = SCM_COERCE_OUTPORT (old); |
98 |
new = SCM_COERCE_OUTPORT (new); |
new = SCM_COERCE_OUTPORT (new); |
99 |
|
|
100 |
SCM_VALIDATE_OPFPORT (1,old); |
SCM_VALIDATE_OPFPORT (1, old); |
101 |
SCM_VALIDATE_OPFPORT (2,new); |
SCM_VALIDATE_OPFPORT (2, new); |
102 |
oldfd = SCM_FPORT_FDES (old); |
oldfd = SCM_FPORT_FDES (old); |
103 |
fp = SCM_FSTREAM (new); |
fp = SCM_FSTREAM (new); |
104 |
newfd = fp->fdes; |
newfd = fp->fdes; |
138 |
oldfd = SCM_INUM (fd_or_port); |
oldfd = SCM_INUM (fd_or_port); |
139 |
else |
else |
140 |
{ |
{ |
141 |
SCM_VALIDATE_OPFPORT (1,fd_or_port); |
SCM_VALIDATE_OPFPORT (1, fd_or_port); |
142 |
oldfd = SCM_FPORT_FDES (fd_or_port); |
oldfd = SCM_FPORT_FDES (fd_or_port); |
143 |
} |
} |
144 |
|
|
197 |
#define FUNC_NAME s_scm_fileno |
#define FUNC_NAME s_scm_fileno |
198 |
{ |
{ |
199 |
port = SCM_COERCE_OUTPORT (port); |
port = SCM_COERCE_OUTPORT (port); |
200 |
SCM_VALIDATE_OPFPORT (1,port); |
SCM_VALIDATE_OPFPORT (1, port); |
201 |
return SCM_MAKINUM (SCM_FPORT_FDES (port)); |
return SCM_MAKINUM (SCM_FPORT_FDES (port)); |
202 |
} |
} |
203 |
#undef FUNC_NAME |
#undef FUNC_NAME |
238 |
"same as that accepted by @ref{File Ports, open-file}.") |
"same as that accepted by @ref{File Ports, open-file}.") |
239 |
#define FUNC_NAME s_scm_fdopen |
#define FUNC_NAME s_scm_fdopen |
240 |
{ |
{ |
241 |
SCM_VALIDATE_INUM (1,fdes); |
SCM_VALIDATE_INUM (1, fdes); |
242 |
SCM_VALIDATE_STRING (2, modes); |
SCM_VALIDATE_STRING (2, modes); |
243 |
|
|
244 |
return scm_fdes_to_port (SCM_INUM (fdes), SCM_STRING_CHARS (modes), SCM_BOOL_F); |
return scm_fdes_to_port (SCM_INUM (fdes), SCM_STRING_CHARS (modes), SCM_BOOL_F); |
269 |
|
|
270 |
port = SCM_COERCE_OUTPORT (port); |
port = SCM_COERCE_OUTPORT (port); |
271 |
|
|
272 |
SCM_VALIDATE_OPFPORT (1,port); |
SCM_VALIDATE_OPFPORT (1, port); |
273 |
SCM_VALIDATE_INUM (2,fd); |
SCM_VALIDATE_INUM (2, fd); |
274 |
stream = SCM_FSTREAM (port); |
stream = SCM_FSTREAM (port); |
275 |
old_fd = stream->fdes; |
old_fd = stream->fdes; |
276 |
new_fd = SCM_INUM (fd); |
new_fd = SCM_INUM (fd); |
300 |
int int_fd; |
int int_fd; |
301 |
long i; |
long i; |
302 |
|
|
303 |
SCM_VALIDATE_INUM_COPY (1,fd,int_fd); |
SCM_VALIDATE_INUM_COPY (1, fd, int_fd); |
304 |
|
|
305 |
for (i = 0; i < scm_port_table_size; i++) |
for (i = 0; i < scm_port_table_size; i++) |
306 |
{ |
{ |