-/* Copyright (C) 1995,1996 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 2000, 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
*
* As a special exception, the Free Software Foundation gives permission
* for additional uses of the text contained in its release of GUILE.
*
* If you write modifications of your own for GUILE, it is your choice
* whether to permit this exception to apply to your modifications.
- * If you do not wish that, delete this exception notice.
- */
-\f
+ * If you do not wish that, delete this exception notice. */
-#include <stdio.h>
-#include "_scm.h"
-#include "boolean.h"
\f
+#include "libguile/_scm.h"
+
+#include "libguile/validate.h"
+#include "libguile/boolean.h"
+#include "libguile/lang.h"
+\f
-SCM_PROC(s_not, "not", 1, 0, 0, scm_not);
-SCM
-scm_not(x)
- SCM x;
+SCM_DEFINE (scm_not, "not", 1, 0, 0,
+ (SCM x),
+ "Return @code{#t} iff @var{x} is @code{#f}, else return @code{#f}.")
+#define FUNC_NAME s_scm_not
{
- return SCM_FALSEP(x) ? SCM_BOOL_T : SCM_BOOL_F;
+ return SCM_BOOL(SCM_FALSEP (x) || SCM_NILP (x));
}
+#undef FUNC_NAME
-SCM_PROC(s_boolean_p, "boolean?", 1, 0, 0, scm_boolean_p);
-
-SCM
-scm_boolean_p(obj)
- SCM obj;
+SCM_DEFINE (scm_boolean_p, "boolean?", 1, 0, 0,
+ (SCM obj),
+ "Return @code{#t} iff @var{obj} is either @code{#t} or @code{#f}.")
+#define FUNC_NAME s_scm_boolean_p
{
- if (SCM_BOOL_F==obj) return SCM_BOOL_T;
- if (SCM_BOOL_T==obj) return SCM_BOOL_T;
- return SCM_BOOL_F;
+ return SCM_BOOL (SCM_BOOLP (obj) || SCM_NILP (obj));
}
+#undef FUNC_NAME
void
scm_init_boolean ()
{
-#include "boolean.x"
+#ifndef SCM_MAGIC_SNARFER
+#include "libguile/boolean.x"
+#endif
}
+
+/*
+ Local Variables:
+ c-file-style: "gnu"
+ End:
+*/