| 2 |
|
/* |
| 3 |
|
* Miscellaneous definitions required by many routines. |
| 4 |
|
*/ |
| 5 |
– |
|
| 5 |
|
#ifndef _RAD_STANDARD_H_ |
| 6 |
|
#define _RAD_STANDARD_H_ |
| 7 |
+ |
#ifdef __cplusplus |
| 8 |
+ |
extern "C" { |
| 9 |
+ |
#endif |
| 10 |
|
|
| 11 |
|
#include "copyright.h" |
| 12 |
|
|
| 18 |
|
#include <stdlib.h> |
| 19 |
|
#include <string.h> |
| 20 |
|
|
| 21 |
< |
#include "platform.h" |
| 21 |
> |
#include "tifftypes.h" |
| 22 |
> |
|
| 23 |
|
#include "mat4.h" |
| 24 |
|
|
| 25 |
|
/* regular transformation */ |
| 41 |
|
#endif |
| 42 |
|
#endif |
| 43 |
|
|
| 44 |
+ |
/* XXX include paths.h instead */ |
| 45 |
|
#ifndef F_OK /* mode bits for access(2) call */ |
| 46 |
|
#define R_OK 4 /* readable */ |
| 47 |
|
#define W_OK 2 /* writable */ |
| 49 |
|
#define F_OK 0 /* exists */ |
| 50 |
|
#endif |
| 51 |
|
|
| 48 |
– |
#ifndef int2 |
| 49 |
– |
#define int2 short /* two-byte integer */ |
| 50 |
– |
#endif |
| 51 |
– |
#ifndef int4 |
| 52 |
– |
#define int4 int /* four-byte integer */ |
| 53 |
– |
#endif |
| 54 |
– |
|
| 52 |
|
/* error codes */ |
| 53 |
|
#define WARNING 0 /* non-fatal error */ |
| 54 |
|
#define USER 1 /* fatal user-caused error */ |
| 78 |
|
#define tsin sin |
| 79 |
|
#define ttan tan |
| 80 |
|
#else |
| 81 |
< |
extern double tcos(); /* table-based cosine approximation */ |
| 81 |
> |
/* table-based cosine approximation */ |
| 82 |
|
#define tsin(x) tcos((x)-(PI/2.)) |
| 83 |
|
#define ttan(x) (tsin(x)/tcos(x)) |
| 84 |
|
#endif |
| 105 |
|
#endif |
| 106 |
|
extern off_t lseek(); |
| 107 |
|
|
| 108 |
< |
#ifdef MSDOS |
| 108 |
> |
#ifdef _WIN32 |
| 109 |
|
#define NIX 1 |
| 110 |
|
#endif |
| 111 |
|
#ifdef AMIGA |
| 190 |
|
/* defined in zeroes.c */ |
| 191 |
|
extern int quadtratic(double *r, double a, double b, double c); |
| 192 |
|
/* defined in dircode.c */ |
| 193 |
< |
extern int4 encodedir(FVECT dv); |
| 194 |
< |
extern void decodedir(FVECT dv, int4 dc); |
| 195 |
< |
extern double dir2diff(int4 dc1, int4 dc2); |
| 196 |
< |
extern double fdir2diff(int4 dc1, FVECT v2); |
| 193 |
> |
extern int32 encodedir(FVECT dv); |
| 194 |
> |
extern void decodedir(FVECT dv, int32 dc); |
| 195 |
> |
extern double dir2diff(int32 dc1, int32 dc2); |
| 196 |
> |
extern double fdir2diff(int32 dc1, FVECT v2); |
| 197 |
> |
/* defined in lamp.c */ |
| 198 |
> |
extern float * matchlamp(char *s); |
| 199 |
> |
extern int loadlamps(char *file); |
| 200 |
> |
extern void freelamps(void); |
| 201 |
|
/* miscellaneous */ |
| 202 |
|
extern void eputs(char *s); |
| 203 |
|
extern void wputs(char *s); |
| 204 |
|
extern void quit(int code); |
| 205 |
|
|
| 206 |
|
|
| 207 |
+ |
#ifdef __cplusplus |
| 208 |
+ |
} |
| 209 |
+ |
#endif |
| 210 |
|
#endif /* _RAD_STANDARD_H_ */ |
| 211 |
+ |
|