ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/standard.h
(Generate patch)

Comparing ray/src/common/standard.h (file contents):
Revision 2.23 by schorsch, Thu Jun 5 19:29:34 2003 UTC vs.
Revision 2.30 by schorsch, Thu Jun 26 00:58:09 2003 UTC

# Line 2 | Line 2
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  
# Line 16 | Line 18
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 */
26   typedef struct {
27          MAT4  xfm;                              /* transform matrix */
28 <        FLOAT  sca;                             /* scalefactor */
28 >        RREAL  sca;                             /* scalefactor */
29   }  XF;
30                                  /* complemetary tranformation */
31   typedef struct {
# Line 38 | Line 41 | typedef struct {
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 */
# Line 45 | Line 49 | typedef struct {
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 */
# Line 81 | Line 78 | extern char  errmsg[];                 /* global buffer for error me
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
# Line 106 | Line 103 | extern double  tcos();                 /* table-based cosine approxim
103   #define  index                  strchr
104   #define  rindex                 strrchr
105   #endif
109 extern off_t  lseek();
106  
107 < #ifdef MSDOS
107 >                        /* <unistd.h> is missing on some systems */
108 > extern off_t  lseek(int, off_t, int);
109 >
110 > #ifdef _WIN32
111   #define NIX 1
112   #endif
113   #ifdef AMIGA
# Line 137 | Line 136 | extern char    *fgetword(char *s, int n, FILE *fp);
136                                          /* defined in fputword.c */
137   extern void     fputword(char *s, FILE *fp);
138                                          /* defined in fixargv0.c */
139 < extern char     *fixargv0(char *av0);
139 > /*extern char   *fixargv0(char *av0);*/ /* XXX include paths.h instead */
140                                          /* defined in fropen.c */
141   extern FILE     *frlibopen(char *fname);
142                                          /* defined in getlibpath.c */
# Line 152 | Line 151 | extern char    *getstr(char *s, FILE *fp);
151   extern long     getint(int siz, FILE *fp);
152   extern double   getflt(FILE *fp);
153                                          /* defined in process.c */
154 + /*
155   extern int      open_process(int pd[3], char *av[]);
156   extern int      process(int pd[3], char *recvbuf, char *sendbuf,
157                                  int nbr, int nbs);
158   extern int      close_process(int pd[3]);
159   extern int      readbuf(int fd, char *bpos, int siz);
160   extern int      writebuf(int fd, char *bpos, int siz);
161 + */
162                                          /* defined in rexpr.c */
163   extern int      ecompile(char *sp, int iflg, int wflag);
164   extern char     *expsave(void);
# Line 193 | Line 194 | extern int     fullxf(FULLXF *fx, int ac, char *av[]);
194                                          /* defined in zeroes.c */
195   extern int      quadtratic(double *r, double a, double b, double c);
196                                          /* defined in dircode.c */
197 < extern int4     encodedir(FVECT dv);
198 < extern void     decodedir(FVECT dv, int4 dc);
199 < extern double   dir2diff(int4 dc1, int4 dc2);
200 < extern double   fdir2diff(int4 dc1, FVECT v2);
197 > extern int32    encodedir(FVECT dv);
198 > extern void     decodedir(FVECT dv, int32 dc);
199 > extern double   dir2diff(int32 dc1, int32 dc2);
200 > extern double   fdir2diff(int32 dc1, FVECT v2);
201 >                                        /* defined in lamp.c */
202 > extern float * matchlamp(char *s);
203 > extern int loadlamps(char *file);
204 > extern void freelamps(void);
205                                          /* miscellaneous */
206   extern void     eputs(char *s);
207   extern void     wputs(char *s);
208   extern void     quit(int code);
209  
210  
211 + #ifdef __cplusplus
212 + }
213 + #endif
214   #endif /* _RAD_STANDARD_H_ */
215 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines