*** empty log message ***
[bpt/guile.git] / libguile / boolean.c
CommitLineData
58ade102 1/* Copyright (C) 1995, 1996, 2000, 2001 Free Software Foundation, Inc.
0f2d19dd 2 *
73be1d9e
MV
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
0f2d19dd 7 *
73be1d9e
MV
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
0f2d19dd 12 *
73be1d9e
MV
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 */
1bbd0b84 17
1bbd0b84 18
0f2d19dd
JB
19\f
20
a0599745 21#include "libguile/_scm.h"
20e6290e 22
a0599745
MD
23#include "libguile/validate.h"
24#include "libguile/boolean.h"
c96d76b8 25#include "libguile/lang.h"
0f2d19dd
JB
26\f
27
28
3b3b36dd 29SCM_DEFINE (scm_not, "not", 1, 0, 0,
da4a1dba 30 (SCM x),
cdbc7418 31 "Return @code{#t} iff @var{x} is @code{#f}, else return @code{#f}.")
1bbd0b84 32#define FUNC_NAME s_scm_not
0f2d19dd 33{
c96d76b8 34 return SCM_BOOL(SCM_FALSEP (x) || SCM_NILP (x));
0f2d19dd 35}
1bbd0b84 36#undef FUNC_NAME
0f2d19dd
JB
37
38
3b3b36dd 39SCM_DEFINE (scm_boolean_p, "boolean?", 1, 0, 0,
1bbd0b84 40 (SCM obj),
cdbc7418 41 "Return @code{#t} iff @var{obj} is either @code{#t} or @code{#f}.")
1bbd0b84 42#define FUNC_NAME s_scm_boolean_p
0f2d19dd 43{
c96d76b8 44 return SCM_BOOL (SCM_BOOLP (obj) || SCM_NILP (obj));
0f2d19dd 45}
1bbd0b84 46#undef FUNC_NAME
0f2d19dd
JB
47
48
1cc91f1b 49
0f2d19dd
JB
50void
51scm_init_boolean ()
0f2d19dd 52{
a0599745 53#include "libguile/boolean.x"
0f2d19dd
JB
54}
55
89e00824
ML
56
57/*
58 Local Variables:
59 c-file-style: "gnu"
60 End:
61*/