mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 05:50:26 +02:00
* print.c (scm_print_options): Fixed texinfo in docstring.
* net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if the underlying functions getservent, getprotoent or getnetent return NULL instead of signalling an error.
This commit is contained in:
parent
2772dc1af3
commit
1dd05fd8aa
3 changed files with 23 additions and 17 deletions
|
@ -1,3 +1,11 @@
|
|||
2001-03-05 Martin Grabmueller <mgrabmue@cs.tu-berlin.de>
|
||||
|
||||
* print.c (scm_print_options): Fixed texinfo in docstring.
|
||||
|
||||
* net_db.c (scm_getserv, scm_getproto, scm_getnet): Return #f if
|
||||
the underlying functions getservent, getprotoent or getnetent
|
||||
return NULL instead of signalling an error.
|
||||
|
||||
2001-03-04 Gary Houston <ghouston@arglist.com>
|
||||
|
||||
* socket.c (scm_fill_sockaddr): don't allow buffer overflows when
|
||||
|
|
|
@ -340,14 +340,13 @@ SCM_DEFINE (scm_getnet, "getnet", 0, 1, 0,
|
|||
ve = SCM_VELTS (ans);
|
||||
if (SCM_UNBNDP (net))
|
||||
{
|
||||
errno = 0;
|
||||
entry = getnetent ();
|
||||
if (! entry)
|
||||
{
|
||||
if (errno)
|
||||
SCM_SYSERROR;
|
||||
else
|
||||
return SCM_BOOL_F;
|
||||
/* There's no good way to tell whether zero means an error
|
||||
or end-of-file, so we always return #f. See `gethost'
|
||||
for details. */
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
}
|
||||
else if (SCM_STRINGP (net))
|
||||
|
@ -392,14 +391,13 @@ SCM_DEFINE (scm_getproto, "getproto", 0, 1, 0,
|
|||
ve = SCM_VELTS (ans);
|
||||
if (SCM_UNBNDP (protocol))
|
||||
{
|
||||
errno = 0;
|
||||
entry = getprotoent ();
|
||||
if (! entry)
|
||||
{
|
||||
if (errno)
|
||||
SCM_SYSERROR;
|
||||
else
|
||||
return SCM_BOOL_F;
|
||||
/* There's no good way to tell whether zero means an error
|
||||
or end-of-file, so we always return #f. See `gethost'
|
||||
for details. */
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
}
|
||||
else if (SCM_STRINGP (protocol))
|
||||
|
@ -456,14 +454,13 @@ SCM_DEFINE (scm_getserv, "getserv", 0, 2, 0,
|
|||
struct servent *entry;
|
||||
if (SCM_UNBNDP (name))
|
||||
{
|
||||
errno = 0;
|
||||
entry = getservent ();
|
||||
if (!entry)
|
||||
{
|
||||
if (errno)
|
||||
SCM_SYSERROR;
|
||||
else
|
||||
return SCM_BOOL_F;
|
||||
/* There's no good way to tell whether zero means an error
|
||||
or end-of-file, so we always return #f. See `gethost'
|
||||
for details. */
|
||||
return SCM_BOOL_F;
|
||||
}
|
||||
return scm_return_entry (entry);
|
||||
}
|
||||
|
|
|
@ -136,8 +136,9 @@ scm_option scm_print_opts[] = {
|
|||
SCM_DEFINE (scm_print_options, "print-options-interface", 0, 1, 0,
|
||||
(SCM setting),
|
||||
"Option interface for the print options. Instead of using\n"
|
||||
"this procedure directly, use the procedures @code{print-enable},\n"
|
||||
"@code{print-disable}, @code{print-set!} and @var{print-options}.")
|
||||
"this procedure directly, use the procedures\n"
|
||||
"@code{print-enable}, @code{print-disable}, @code{print-set!}\n"
|
||||
"and @code{print-options}.")
|
||||
#define FUNC_NAME s_scm_print_options
|
||||
{
|
||||
SCM ans = scm_options (setting,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue