+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
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))
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))
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);
}
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,