#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
extern "C" {
#ifndef HAVE_STRERROR
char *strerror(int);
#endif
const char *i_to_a(int);
const char *ui_to_a(unsigned int);
const char *if_to_a(int, int);
}
#if !(defined(__sgi) \
|| (defined(__osf__) && defined(__alpha)) \
|| defined(_UWIN) \
|| defined(__EMX__) \
|| defined(__CYGWIN__))
#include <groff-getopt.h>
#else
#include <getopt.h>
#endif
char *strsave(const char *s);
int is_prime(unsigned);
#include <stdio.h>
#include <string.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#ifndef HAVE_SNPRINTF
#include <stdarg.h>
extern "C" {
int snprintf(char *, size_t, const char *, ...);
int vsnprintf(char *, size_t, const char *, va_list);
}
#endif
#ifndef HAVE_MKSTEMP
int mkstemp(char *tmpl);
#endif
int mksdir(char *tmpl);
FILE *xtmpfile(char **namep = 0,
const char *postfix_long = 0, const char *postfix_short = 0,
int do_unlink = 1);
char *xtmptemplate(const char *postfix_long, const char *postfix_short);
#ifdef NEED_DECLARATION_POPEN
extern "C" { FILE *popen(const char *, const char *); }
#endif
#ifdef NEED_DECLARATION_PCLOSE
extern "C" { int pclose (FILE *); }
#endif
size_t file_name_max(const char *fname);
int interpret_lf_args(const char *p);
extern char invalid_char_table[];
inline int invalid_input_char(int c)
{
return c >= 0 && invalid_char_table[c];
}
#ifdef HAVE_STRCASECMP
#ifdef NEED_DECLARATION_STRCASECMP
extern "C" {
int strcasecmp(const char *, const char *);
}
#endif
#endif
#if !defined(_AIX) && !defined(sinix) && !defined(__sinix__)
#ifdef HAVE_STRNCASECMP
#ifdef NEED_DECLARATION_STRNCASECMP
extern "C" {
int strncasecmp(const char *, const char *, int);
}
#endif
#endif
#endif
#ifndef HAVE_STRCASECMP
#define strcasecmp(a,b) strcmp((a),(b))
#endif
#ifndef HAVE_STRNCASECMP
#define strncasecmp(a,b,c) strncmp((a),(b),(c))
#endif
#ifdef HAVE_CC_LIMITS_H
#include <limits.h>
#else
#define INT_MAX 2147483647
#endif
#ifdef INT_MIN
#undef INT_MIN
#endif
#ifdef CFRONT_ANSI_BUG
#define INT_MIN ((long)(-INT_MAX-1))
#else
#define INT_MIN (-INT_MAX-1)
#endif
#define INT_DIGITS 10
#ifdef PI
#undef PI
#endif
const double PI = 3.14159265358979323846;
#ifdef ARRAY_DELETE_NEEDS_SIZE
#define ad_delete(size) delete [size]
#define a_delete delete
#else
#define ad_delete(size) delete []
#define a_delete delete []
#endif