117 |
SCM_ASSERT (SCM_NIMP (MODE) && SCM_STRINGP (MODE), |
SCM_ASSERT (SCM_NIMP (MODE) && SCM_STRINGP (MODE), |
118 |
MODE, SCM_ARG2, FUNC_NAME); |
MODE, SCM_ARG2, FUNC_NAME); |
119 |
|
|
120 |
for (mode_str = SCM_CHARS (MODE); *mode_str; mode_str++) |
for (mode_str = SCM_STRING_CHARS (MODE); *mode_str; mode_str++) |
121 |
switch (*mode_str) |
switch (*mode_str) |
122 |
{ |
{ |
123 |
case 'r': |
case 'r': |
137 |
if (mode & MU_STREAM_READ && mode & MU_STREAM_WRITE) |
if (mode & MU_STREAM_READ && mode & MU_STREAM_WRITE) |
138 |
mode = (mode & ~(MU_STREAM_READ | MU_STREAM_WRITE)) | MU_STREAM_RDWR; |
mode = (mode & ~(MU_STREAM_READ | MU_STREAM_WRITE)) | MU_STREAM_RDWR; |
139 |
|
|
140 |
if (mailbox_create_default (&mbox, SCM_CHARS (URL)) != 0) |
if (mailbox_create_default (&mbox, SCM_STRING_CHARS (URL)) != 0) |
141 |
return SCM_BOOL_F; |
return SCM_BOOL_F; |
142 |
|
|
143 |
if (mailbox_open (mbox, mode) != 0) |
if (mailbox_open (mbox, mode) != 0) |
197 |
if (mailbox_get_stream (mum->mbox, &stream)) |
if (mailbox_get_stream (mum->mbox, &stream)) |
198 |
return SCM_BOOL_F; |
return SCM_BOOL_F; |
199 |
return mu_port_make_from_stream (MBOX, stream, |
return mu_port_make_from_stream (MBOX, stream, |
200 |
scm_mode_bits (SCM_CHARS (MODE))); |
scm_mode_bits (SCM_STRING_CHARS (MODE))); |
201 |
} |
} |
202 |
#undef FUNC_NAME |
#undef FUNC_NAME |
203 |
|
|