--- ray/src/common/standard.h 2003/06/05 19:29:34 2.23 +++ ray/src/common/standard.h 2003/06/21 14:48:54 2.29 @@ -1,10 +1,12 @@ -/* RCSid $Id: standard.h,v 2.23 2003/06/05 19:29:34 schorsch Exp $ */ +/* RCSid $Id: standard.h,v 2.29 2003/06/21 14:48:54 greg Exp $ */ /* * Miscellaneous definitions required by many routines. */ - #ifndef _RAD_STANDARD_H_ #define _RAD_STANDARD_H_ +#ifdef __cplusplus +extern "C" { +#endif #include "copyright.h" @@ -16,7 +18,8 @@ #include #include -#include "platform.h" +#include "tifftypes.h" + #include "mat4.h" /* regular transformation */ @@ -38,6 +41,7 @@ typedef struct { #endif #endif +/* XXX include paths.h instead */ #ifndef F_OK /* mode bits for access(2) call */ #define R_OK 4 /* readable */ #define W_OK 2 /* writable */ @@ -45,13 +49,6 @@ typedef struct { #define F_OK 0 /* exists */ #endif -#ifndef int2 -#define int2 short /* two-byte integer */ -#endif -#ifndef int4 -#define int4 int /* four-byte integer */ -#endif - /* error codes */ #define WARNING 0 /* non-fatal error */ #define USER 1 /* fatal user-caused error */ @@ -81,7 +78,7 @@ extern char errmsg[]; /* global buffer for error me #define tsin sin #define ttan tan #else -extern double tcos(); /* table-based cosine approximation */ + /* table-based cosine approximation */ #define tsin(x) tcos((x)-(PI/2.)) #define ttan(x) (tsin(x)/tcos(x)) #endif @@ -106,9 +103,11 @@ extern double tcos(); /* table-based cosine approxim #define index strchr #define rindex strrchr #endif -extern off_t lseek(); -#ifdef MSDOS + /* is missing on some systems */ +extern off_t lseek(int, off_t, int); + +#ifdef _WIN32 #define NIX 1 #endif #ifdef AMIGA @@ -193,14 +192,22 @@ extern int fullxf(FULLXF *fx, int ac, char *av[]); /* defined in zeroes.c */ extern int quadtratic(double *r, double a, double b, double c); /* defined in dircode.c */ -extern int4 encodedir(FVECT dv); -extern void decodedir(FVECT dv, int4 dc); -extern double dir2diff(int4 dc1, int4 dc2); -extern double fdir2diff(int4 dc1, FVECT v2); +extern int32 encodedir(FVECT dv); +extern void decodedir(FVECT dv, int32 dc); +extern double dir2diff(int32 dc1, int32 dc2); +extern double fdir2diff(int32 dc1, FVECT v2); + /* defined in lamp.c */ +extern float * matchlamp(char *s); +extern int loadlamps(char *file); +extern void freelamps(void); /* miscellaneous */ extern void eputs(char *s); extern void wputs(char *s); extern void quit(int code); +#ifdef __cplusplus +} +#endif #endif /* _RAD_STANDARD_H_ */ +