Don't use .Xo/.Xc. Fix date format.
[netbsd-mini2440.git] / gnu / usr.bin / groff / libgroff / lib.h
blobff6eba6439ccbcd1ba1234cb7b67ac9f8a88bbbf
1 /*-
2 * This code is derived from software copyrighted by the Free Software
3 * Foundation.
5 * Modified 1991 by Donn Seeley at UUNET Technologies, Inc.
7 * @(#)lib.h 6.4 (Berkeley) 5/8/91
8 */
10 /* Copyright (C) 1989, 1990 Free Software Foundation, Inc.
11 Written by James Clark (jjc@jclark.uucp)
13 This file is part of groff.
15 groff is free software; you can redistribute it and/or modify it under
16 the terms of the GNU General Public License as published by the Free
17 Software Foundation; either version 1, or (at your option) any later
18 version.
20 groff is distributed in the hope that it will be useful, but WITHOUT ANY
21 WARRANTY; without even the implied warranty of MERCHANTABILITY or
22 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 for more details.
25 You should have received a copy of the GNU General Public License along
26 with groff; see the file LICENSE. If not, write to the Free Software
27 Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
29 /* This file is included in both C and C++ compilations. */
31 #ifdef __cplusplus
32 extern "C" {
33 // const char *strerror(int);
34 // const char *itoa(int);
35 // const char *iftoa(int, int);
38 const char *itoa(int);
39 const char *iftoa(int, int);
41 char *strsave(const char *s);
43 int interpret_lf_args(const char *p);
45 inline int illegal_input_char(int c)
47 return c == 000 || (c > 012 && c < 040) || (c >= 0200 && c < 0240);
50 #endif
52 #ifndef INT_MAX
53 #define INT_MAX 2147483647
54 #endif
56 /* It's not safe to rely on people getting INT_MIN right (ie signed). */
58 #ifdef INT_MIN
59 #undef INT_MIN
60 #endif
62 #ifdef CFRONT_ANSI_BUG
64 /* This works around a bug in cfront 2.0 used with ANSI C compilers. */
66 #define INT_MIN ((long)(-INT_MAX-1))
68 #else /* CFRONT_ANSI_BUG */
70 #define INT_MIN (-INT_MAX-1)
72 #endif /* CFRONT_ANSI_BUG */
74 /* Maximum number of digits in the decimal representation of an int
75 (not including the -). */
77 #define INT_DIGITS 10
79 /* From the old GNU math.h; does some standard actually require these? */
80 #define M_E 2.7182818284590452354
81 #define M_LOG2E 1.4426950408889634074
82 #define M_LOG10E 0.43429448190325182765
83 #define M_LN2 0.69314718055994530942
84 #define M_LN10 2.30258509299404568402
85 #define M_PI 3.14159265358979323846
86 #define M_PI_2 1.57079632679489661923
87 #define M_1_PI 0.31830988618379067154
88 #define M_PI_4 0.78539816339744830962
89 #define M_2_PI 0.63661977236758134308
90 #define M_2_SQRTPI 1.12837916709551257390
91 #define M_SQRT2 1.41421356237309504880
92 #define M_SQRT1_2 0.70710678118654752440
93 #define PI M_PI
94 #define PI2 M_PI_2