diff options
author | Gary Houston <ghouston@arglist.com> | 1997-03-13 21:54:02 +0000 |
---|---|---|
committer | Gary Houston <ghouston@arglist.com> | 1997-03-13 21:54:02 +0000 |
commit | ae2fa5bc81407b0d7591f2b801c7ecf0ae0dc0ae (patch) | |
tree | cb71eb425237900d2f404bd937b22c81820a523e /libguile/socket.c | |
parent | 216fb10850c791ad58a0a72476cf9937104b843f (diff) | |
download | guile-ae2fa5bc81407b0d7591f2b801c7ecf0ae0dc0ae.tar.gz |
* ioext.c (scm_read_delimited_x): use RO string macros for delims.
(scm_freopen): use RO string macros for filename and modes.
(scm_duplicate_port, scm_fdopen): use RO string macros for modes.
* posix.c (scm_getgrgid): simplify conversion of name to C string.
(scm_mknod): use RO string macros for path.
* socket.c (scm_fill_sockaddr, scm_send, scm_sendto):
use SCM_ROSTRINGP, SCM_ROCHARS, SCM_ROLENGTH.
* net_db.c (scm_gethost, scm_getnet, scm_getproto, scm_getserv):
use SCM_ROSTRINGP and SCM_ROCHARS.
Diffstat (limited to 'libguile/socket.c')
-rw-r--r-- | libguile/socket.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/libguile/socket.c b/libguile/socket.c index e4a817796..1dcccb3d6 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -356,9 +356,10 @@ scm_fill_sockaddr (fam, address, args, which_arg, proc, size) soka = (struct sockaddr_un *) scm_must_malloc (sizeof (struct sockaddr_un), proc); soka->sun_family = AF_UNIX; - SCM_ASSERT (SCM_NIMP (address) && SCM_STRINGP (address), address, - which_arg, proc); - memcpy (soka->sun_path, SCM_CHARS (address), 1 + SCM_LENGTH (address)); + SCM_ASSERT (SCM_NIMP (address) && SCM_ROSTRINGP (address), address, + which_arg, proc); + memcpy (soka->sun_path, SCM_ROCHARS (address), + 1 + SCM_ROLENGTH (address)); *size = sizeof (struct sockaddr_un); return (struct sockaddr *) soka; } @@ -599,7 +600,7 @@ scm_send (sock, message, flags) int flg; SCM_ASSERT (SCM_NIMP (sock) && SCM_FPORTP (sock), sock, SCM_ARG1, s_send); - SCM_ASSERT (SCM_NIMP (message) && SCM_STRINGP (message), message, SCM_ARG2, s_send); + SCM_ASSERT (SCM_NIMP (message) && SCM_ROSTRINGP (message), message, SCM_ARG2, s_send); fd = fileno ((FILE *)SCM_STREAM (sock)); if (SCM_UNBNDP (flags)) @@ -607,7 +608,7 @@ scm_send (sock, message, flags) else flg = scm_num2ulong (flags, (char *) SCM_ARG3, s_send); - SCM_SYSCALL (rv = send (fd, SCM_CHARS (message), SCM_LENGTH (message), flg)); + SCM_SYSCALL (rv = send (fd, SCM_ROCHARS (message), SCM_ROLENGTH (message), flg)); if (rv == -1) scm_syserror (s_send); return SCM_MAKINUM (rv); @@ -697,7 +698,8 @@ scm_sendto (sock, message, fam, address, args_and_flags) scm_sizet size; SCM_ASSERT (SCM_NIMP (sock) && SCM_FPORTP (sock), sock, SCM_ARG1, s_sendto); - SCM_ASSERT (SCM_NIMP (message) && SCM_STRINGP (message), message, SCM_ARG2, s_sendto); + SCM_ASSERT (SCM_NIMP (message) && SCM_ROSTRINGP (message), message, + SCM_ARG2, s_sendto); SCM_ASSERT (SCM_INUMP (fam), fam, SCM_ARG3, s_sendto); fd = fileno ((FILE *)SCM_STREAM (sock)); SCM_DEFER_INTS; @@ -711,8 +713,8 @@ scm_sendto (sock, message, fam, address, args_and_flags) args_and_flags, SCM_ARG5, s_sendto); flg = scm_num2ulong (SCM_CAR (args_and_flags), (char *) SCM_ARG5, s_sendto); } - SCM_SYSCALL (rv = sendto (fd, SCM_CHARS (message), SCM_LENGTH (message), flg, - soka, size)); + SCM_SYSCALL (rv = sendto (fd, SCM_ROCHARS (message), SCM_ROLENGTH (message), + flg, soka, size)); if (rv == -1) scm_syserror (s_sendto); scm_must_free ((char *) soka); |