xref: /freebsd/bin/sh/arith.h (revision 90aea514c6249118e880d75972d063362f4bf492)
1069428afSPeter Wemm /*-
2069428afSPeter Wemm  * Copyright (c) 1995
3069428afSPeter Wemm  *      The Regents of the University of California.  All rights reserved.
4069428afSPeter Wemm  *
5069428afSPeter Wemm  * Redistribution and use in source and binary forms, with or without
6069428afSPeter Wemm  * modification, are permitted provided that the following conditions
7069428afSPeter Wemm  * are met:
8069428afSPeter Wemm  * 1. Redistributions of source code must retain the above copyright
9069428afSPeter Wemm  *    notice, this list of conditions and the following disclaimer.
10069428afSPeter Wemm  * 2. Redistributions in binary form must reproduce the above copyright
11069428afSPeter Wemm  *    notice, this list of conditions and the following disclaimer in the
12069428afSPeter Wemm  *    documentation and/or other materials provided with the distribution.
13*fbbd9655SWarner Losh  * 3. Neither the name of the University nor the names of its contributors
14069428afSPeter Wemm  *    may be used to endorse or promote products derived from this software
15069428afSPeter Wemm  *    without specific prior written permission.
16069428afSPeter Wemm  *
17069428afSPeter Wemm  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18069428afSPeter Wemm  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19069428afSPeter Wemm  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20069428afSPeter Wemm  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21069428afSPeter Wemm  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22069428afSPeter Wemm  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23069428afSPeter Wemm  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24069428afSPeter Wemm  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25069428afSPeter Wemm  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26069428afSPeter Wemm  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27069428afSPeter Wemm  * SUCH DAMAGE.
28069428afSPeter Wemm  */
29069428afSPeter Wemm 
3039376f45SStefan Farfeleder #include "shell.h"
3139376f45SStefan Farfeleder 
3239376f45SStefan Farfeleder #define DIGITS(var) (3 + (2 + CHAR_BIT * sizeof((var))) / 3)
3339376f45SStefan Farfeleder 
342cac6e36SJilles Tjoelker arith_t arith(const char *);
35