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.9 by greg, Thu Oct 24 08:37:58 1991 UTC vs.
Revision 2.7 by greg, Wed Jan 10 09:10:58 1996 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1990 Regents of the University of California */
1 > /* Copyright (c) 1992 Regents of the University of California */
2  
3   /* SCCSid "$SunId$ LBL" */
4  
# Line 8 | Line 8
8  
9   #include  <stdio.h>
10  
11 + #include  <fcntl.h>
12 +
13   #include  <math.h>
14  
15   #include  <errno.h>
# Line 24 | Line 26 | typedef struct {
26          XF  b;                                  /* backward */
27   }  FULLXF;
28  
29 < #ifdef  M_PI
30 < #define  PI             M_PI
29 > #ifndef  PI
30 > #ifdef  M_PI
31 > #define  PI             M_PI
32   #else
33 < #define  PI             3.14159265358979323846
33 > #define  PI             3.14159265358979323846
34   #endif
35 + #endif
36  
37 < #ifndef  F_OK                   /* mode bits for access(2) call */
38 < #define  R_OK           4               /* readable */
39 < #define  W_OK           2               /* writable */
40 < #define  X_OK           1               /* executable */
41 < #define  F_OK           0               /* exists */
37 > #ifndef  F_OK                   /* mode bits for access(2) call */
38 > #define  R_OK           4               /* readable */
39 > #define  W_OK           2               /* writable */
40 > #define  X_OK           1               /* executable */
41 > #define  F_OK           0               /* exists */
42   #endif
43                                  /* error codes */
44 < #define  WARNING        1               /* non-fatal error */
45 < #define  USER           2               /* fatal user-caused error */
46 < #define  SYSTEM         3               /* fatal system-related error */
47 < #define  INTERNAL       4               /* fatal program-related error */
48 < #define  CONSISTENCY    5               /* bad consistency check, abort */
49 < #define  COMMAND        6               /* interactive error */
44 > #define  WARNING        1               /* non-fatal error */
45 > #define  USER           2               /* fatal user-caused error */
46 > #define  SYSTEM         3               /* fatal system-related error */
47 > #define  INTERNAL       4               /* fatal program-related error */
48 > #define  CONSISTENCY    5               /* bad consistency check, abort */
49 > #define  COMMAND        6               /* interactive error */
50  
51   extern char  errmsg[];                  /* global buffer for error messages */
52  
49 extern int  errno;                      /* system error number */
50
53                                          /* memory operations */
54 < #ifdef  NOSTRUCTASS
55 < #define  copystruct(d,s)        bcopy((char *)(s),(char *)(d),sizeof(*(d)))
54 > #ifdef  NOSTRUCTASS
55 > #define  copystruct(d,s)        bcopy((char *)(s),(char *)(d),sizeof(*(d)))
56   #else
57 < #define  copystruct(d,s)        (*(d) = *(s))
57 > #define  copystruct(d,s)        (*(d) = *(s))
58   #endif
59  
60 < #ifndef  BSD
61 < #define  bcopy(s,d,n)           (void)memcpy(d,s,n)
62 < #define  bzero(d,n)             (void)memset(d,0,n)
63 < #define  bcmp(b1,b2,n)          memcmp(b1,b2,n)
64 < extern char  *memcpy(), *memset();
65 < #define  index                  strchr
64 < #define  rindex                 strrchr
60 > #ifndef  BSD
61 > #define  bcopy(s,d,n)           (void)memcpy(d,s,n)
62 > #define  bzero(d,n)             (void)memset(d,0,n)
63 > #define  bcmp(b1,b2,n)          memcmp(b1,b2,n)
64 > #define  index                  strchr
65 > #define  rindex                 strrchr
66   #endif
67  
68   extern char  *sskip();
69   extern char  *getpath(), *getenv();
70 + #ifndef malloc
71   extern char  *malloc(), *calloc(), *realloc();
72 + #endif
73   extern char  *bmalloc(), *savestr(), *savqstr();
74 +
75 + #ifdef  DCL_ATOF
76 + extern double  atof();
77 + #endif
78 +
79 + #ifdef MSDOS
80 + #define NIX 1
81 + #endif
82 + #ifdef AMIGA
83 + #define NIX 1
84 + #endif
85 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines