--- ray/src/common/standard.h 2003/06/06 16:38:47 2.24 +++ ray/src/common/standard.h 2003/06/26 00:58:09 2.30 @@ -1,4 +1,4 @@ -/* RCSid $Id: standard.h,v 2.24 2003/06/06 16:38:47 schorsch Exp $ */ +/* RCSid $Id: standard.h,v 2.30 2003/06/26 00:58:09 schorsch Exp $ */ /* * Miscellaneous definitions required by many routines. */ @@ -18,13 +18,14 @@ extern "C" { #include #include -#include "platform.h" +#include "tifftypes.h" + #include "mat4.h" /* regular transformation */ typedef struct { MAT4 xfm; /* transform matrix */ - FLOAT sca; /* scalefactor */ + RREAL sca; /* scalefactor */ } XF; /* complemetary tranformation */ typedef struct { @@ -40,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 */ @@ -47,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 */ @@ -83,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 @@ -108,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 @@ -139,7 +136,7 @@ extern char *fgetword(char *s, int n, FILE *fp); /* defined in fputword.c */ extern void fputword(char *s, FILE *fp); /* defined in fixargv0.c */ -extern char *fixargv0(char *av0); +/*extern char *fixargv0(char *av0);*/ /* XXX include paths.h instead */ /* defined in fropen.c */ extern FILE *frlibopen(char *fname); /* defined in getlibpath.c */ @@ -154,12 +151,14 @@ extern char *getstr(char *s, FILE *fp); extern long getint(int siz, FILE *fp); extern double getflt(FILE *fp); /* defined in process.c */ +/* extern int open_process(int pd[3], char *av[]); extern int process(int pd[3], char *recvbuf, char *sendbuf, int nbr, int nbs); extern int close_process(int pd[3]); extern int readbuf(int fd, char *bpos, int siz); extern int writebuf(int fd, char *bpos, int siz); +*/ /* defined in rexpr.c */ extern int ecompile(char *sp, int iflg, int wflag); extern char *expsave(void); @@ -195,10 +194,14 @@ 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);