(scm_threads_mark_stacks): Correction sizet -> size_t.
[bpt/guile.git] / libguile / gh_predicates.c
CommitLineData
58ade102 1/* Copyright (C) 1995,1996,1997, 2000, 2001 Free Software Foundation, Inc.
ee2a8b9b 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.
ee2a8b9b 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.
ee2a8b9b 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 */
ee2a8b9b
JB
17\f
18
19/* type predicates and equality predicates */
20
a0599745 21#include "libguile/gh.h"
ee2a8b9b
JB
22
23/* type predicates: tell you if an SCM object has a given type */
24int
25gh_boolean_p (SCM val)
26{
e69ebe6a 27 return (SCM_NFALSEP (scm_boolean_p (val)));
ee2a8b9b
JB
28}
29int
30gh_symbol_p (SCM val)
31{
e69ebe6a 32 return (SCM_NFALSEP (scm_symbol_p (val)));
ee2a8b9b
JB
33}
34int
35gh_char_p (SCM val)
36{
e69ebe6a 37 return (SCM_NFALSEP (scm_char_p (val)));
ee2a8b9b
JB
38}
39int
40gh_vector_p (SCM val)
41{
e69ebe6a 42 return (SCM_NFALSEP (scm_vector_p (val)));
ee2a8b9b
JB
43}
44int
45gh_pair_p (SCM val)
46{
e69ebe6a 47 return (SCM_NFALSEP (scm_pair_p (val)));
ee2a8b9b
JB
48}
49int
50gh_number_p (SCM val)
51{
e69ebe6a 52 return (SCM_NFALSEP (scm_number_p (val)));
ee2a8b9b
JB
53}
54int
55gh_string_p (SCM val)
56{
e69ebe6a 57 return (SCM_NFALSEP (scm_string_p (val)));
ee2a8b9b
JB
58}
59int
60gh_procedure_p (SCM val)
61{
e69ebe6a 62 return (SCM_NFALSEP (scm_procedure_p (val)));
ee2a8b9b
JB
63}
64int
65gh_list_p (SCM val)
66{
e69ebe6a 67 return (SCM_NFALSEP (scm_list_p (val)));
ee2a8b9b
JB
68}
69int
70gh_inexact_p (SCM val)
71{
e69ebe6a 72 return (SCM_NFALSEP (scm_inexact_p (val)));
ee2a8b9b
JB
73}
74int
75gh_exact_p (SCM val)
76{
e69ebe6a 77 return (SCM_NFALSEP (scm_exact_p (val)));
ee2a8b9b
JB
78}
79
80/* the three types of equality */
81int
82gh_eq_p (SCM x, SCM y)
83{
e69ebe6a 84 return (SCM_NFALSEP (scm_eq_p (x, y)));
ee2a8b9b
JB
85}
86int
87gh_eqv_p (SCM x, SCM y)
88{
e69ebe6a 89 return (SCM_NFALSEP (scm_eqv_p (x, y)));
ee2a8b9b
JB
90}
91int
92gh_equal_p (SCM x, SCM y)
93{
e69ebe6a 94 return (SCM_NFALSEP (scm_equal_p (x, y)));
ee2a8b9b 95}
7fee59bd
MG
96
97/* equivalent to (string=? ...), but returns 0 or 1 rather than Scheme
98 booleans */
99int
100gh_string_equal_p(SCM s1, SCM s2)
101{
102 return (SCM_NFALSEP (scm_string_equal_p(s1, s2)));
103}
104
105/* equivalent to (null? ...), but returns 0 or 1 rather than Scheme
106 booleans */
107int
108gh_null_p(SCM l)
109{
110 return (SCM_NFALSEP(scm_null_p(l)));
111}
89e00824
ML
112
113/*
114 Local Variables:
115 c-file-style: "gnu"
116 End:
117*/