summaryrefslogtreecommitdiff
path: root/fonts/utilities/afmtopl/clark/util.h
blob: c96a8672f7f60041155ad43eea0972a90e1eae66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/* $Header: /u/jjc/dvitops/RCS/util.h,v 1.2 89/02/01 12:18:22 jjc Rel $  */
 
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <errno.h>
 
#include "config.h"
 
#ifdef STDARG
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#ifndef SEEK_CUR
#define SEEK_CUR 1
#endif
#ifndef SEEK_SET
#define SEEK_SET 0
#endif
#ifndef SEEK_END
#define SEEK_END 2
#endif
#ifdef PROTO
int abs(int);
char *getenv(char *);
int atoi(const char *);
long atol(const char *);
char *calloc(size_t, size_t);
void exit(int);
void free(char *);
char *getenv(char *);
char *malloc(size_t);
void qsort(char *, size_t, size_t, int (*)());
char *realloc(char *, size_t);
double atof(const char *);
int getopt(int argc, char **argv, char *opts);
FILE *xfopen(char *filename, int is_binary, char *area_list,
char *extension);
#else
int abs();
char *getenv();
double atof();
int atoi();
long atol();
char *calloc();
void exit();
void free();
char *getenv();
char *malloc();
void qsort();
char *realloc();
double atof();
long atol();
int getopt();
FILE *xfopen();
#endif

extern int errno;
 
extern int opterr;
extern int optind;
extern int optopt;
extern char *optarg;
 
#define TRUE 1
#define FALSE 0
 
#ifdef BINARY
#define RB "rb"
#else
#define RB "r"
#endif

#define cant_happen() message(FATAL_ERROR, "can't happen: %s, line %d",\
__FILE__, __LINE__);
#define out_of_memory() message(FATAL_ERROR, "out of memory");


enum message_type {INFORMATION = 0, WARNING = 1, ERROR = 2, FATAL_ERROR = 3 };

extern enum message_type history;
extern char *program_name;

#ifdef STDARG
void message(enum message_type, char *,...);
#else
void message();
#endif