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 1.6 by greg, Fri Apr 12 13:55:33 1991 UTC vs.
Revision 2.31 by greg, Fri Jun 27 06:53:22 2003 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1990 Regents of the University of California */
2 <
3 < /* SCCSid "$SunId$ LBL" */
4 <
1 > /* RCSid $Id$ */
2   /*
3 < *      Miscellaneous definitions required by many routines.
3 > *      Collected includes required by many Radiance callers
4   */
5 + #ifndef _RAD_STANDARD_H_
6 + #define _RAD_STANDARD_H_
7  
8 < #include  <stdio.h>
8 > #include  "copyright.h"
9  
10 < #include  <math.h>
10 > #include  "rtio.h"
11 > #include  "rtmisc.h"
12 > #include  "rtmath.h"
13 > #include  "rterror.h"
14  
15 < #include  <errno.h>
15 > #endif /* _RAD_STANDARD_H_ */
16  
15 #include  "mat4.h"
16                                /* regular transformation */
17 typedef struct {
18        MAT4  xfm;                              /* transform matrix */
19        double  sca;                            /* scalefactor */
20 }  XF;
21                                /* complemetary tranformation */
22 typedef struct {
23        XF  f;                                  /* forward */
24        XF  b;                                  /* backward */
25 }  FULLXF;
26
27 #define  FHUGE          (1e10)          /* large real number */
28 #define  FTINY          (1e-6)          /* small real number */
29
30 #ifdef  M_PI
31 #define  PI             M_PI
32 #else
33 #define  PI             3.14159265358979323846
34 #endif
35
36 #ifndef  F_OK                   /* mode bits for access(2) call */
37 #define  R_OK           4               /* readable */
38 #define  W_OK           2               /* writable */
39 #define  X_OK           1               /* executable */
40 #define  F_OK           0               /* exists */
41 #endif
42                                /* error codes */
43 #define  WARNING        1               /* non-fatal error */
44 #define  USER           2               /* fatal user-caused error */
45 #define  SYSTEM         3               /* fatal system-related error */
46 #define  INTERNAL       4               /* fatal program-related error */
47 #define  CONSISTENCY    5               /* bad consistency check, abort */
48 #define  COMMAND        6               /* interactive error */
49
50 extern char  errmsg[];                  /* global buffer for error messages */
51
52 extern int  errno;                      /* system error number */
53
54                                        /* memory operations */
55 #ifdef  STRUCTASSIGN
56 #define  copystruct(d,s)        (*(d) = *(s))
57 #else
58 #define  copystruct(d,s)        bcopy((char *)(s),(char *)(d),sizeof(*(d)))
59 #endif
60
61 #ifndef  BSD
62 #define  bcopy(s,d,n)           (void)memcpy(d,s,n)
63 #define  bzero(d,n)             (void)memset(d,0,n)
64 #define  bcmp(b1,b2,n)          memcmp(b1,b2,n)
65 extern char  *memcpy(), *memset();
66 #define  index                  strchr
67 #define  rindex                 strrchr
68 #endif
69
70 extern char  *sskip();
71 extern char  *getpath(), *getenv();
72 extern char  *malloc(), *calloc(), *realloc();
73 extern char  *bmalloc(), *savestr(), *savqstr();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines