| 1 |
< |
/* Copyright (c) 1997 Silicon Graphics, Inc. */ |
| 1 |
> |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
| 2 |
|
|
| 3 |
|
/* SCCSid "$SunId$ SGI" */ |
| 4 |
|
|
| 8 |
|
|
| 9 |
|
#include <stdio.h> |
| 10 |
|
|
| 11 |
+ |
#include <sys/types.h> |
| 12 |
+ |
|
| 13 |
|
#include <fcntl.h> |
| 14 |
|
|
| 15 |
|
#include <math.h> |
| 30 |
|
|
| 31 |
|
#ifndef PI |
| 32 |
|
#ifdef M_PI |
| 33 |
< |
#define PI M_PI |
| 33 |
> |
#define PI ((double)M_PI) |
| 34 |
|
#else |
| 35 |
|
#define PI 3.14159265358979323846 |
| 36 |
|
#endif |
| 43 |
|
#define F_OK 0 /* exists */ |
| 44 |
|
#endif |
| 45 |
|
|
| 46 |
+ |
#ifndef int2 |
| 47 |
+ |
#define int2 short /* two-byte integer */ |
| 48 |
+ |
#endif |
| 49 |
+ |
#ifndef int4 |
| 50 |
+ |
#define int4 int /* four-byte integer */ |
| 51 |
+ |
#endif |
| 52 |
+ |
|
| 53 |
|
extern int eputs(), wputs(); /* standard error output functions */ |
| 54 |
|
|
| 55 |
|
/* error codes */ |
| 83 |
|
#define copystruct(d,s) (*(d) = *(s)) |
| 84 |
|
#endif |
| 85 |
|
|
| 86 |
< |
#ifndef BSD |
| 86 |
> |
#ifdef BSD |
| 87 |
> |
extern long lseek(); |
| 88 |
> |
#else |
| 89 |
|
#define bcopy(s,d,n) (void)memcpy(d,s,n) |
| 90 |
|
#define bzero(d,n) (void)memset(d,0,n) |
| 91 |
|
#define bcmp(b1,b2,n) memcmp(b1,b2,n) |
| 92 |
|
#define index strchr |
| 93 |
|
#define rindex strrchr |
| 94 |
+ |
extern off_t lseek(); |
| 95 |
|
#endif |
| 96 |
+ |
extern long ftell(); |
| 97 |
|
|
| 98 |
|
extern char *sskip(), *sskip2(); |
| 99 |
|
extern char *getpath(), *getenv(); |