1 /*
2  * The Spar Library - modular math parser
3  * Copyright (C) 2000,2001 Davide Angelocola <davide178@inwind.it>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA  02111-1307, USA.
19  *
20  */
21 
22 #include <spar/sl_bool.h>
23 #include <spar/sl_conf.h>
24 
25 inline bool
sl_bool_and(bool a,bool b)26 sl_bool_and (bool a, bool b)
27 {
28   return (a && b);
29 }
30 
31 inline bool
sl_bool_or(bool a,bool b)32 sl_bool_or (bool a, bool b)
33 {
34   return (a || b);
35 }
36 
37 inline bool
sl_bool_not(bool a)38 sl_bool_not (bool a)
39 {
40   return !(a);
41 }
42 
43 inline bool
sl_bool_nand(bool a,bool b)44 sl_bool_nand (bool a, bool b)
45 {
46 	  return !(a && b);
47 }
48 
49 inline bool
sl_bool_nor(bool a,bool b)50 sl_bool_nor (bool a, bool b)
51 {
52 	  return !(a || b);
53 }
54