ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/rtmisc.h
Revision: 3.1
Committed: Fri Jun 27 06:53:21 2003 UTC (20 years, 10 months ago) by greg
Content type: text/plain
Branch: MAIN
Log Message:
Broke standard.h into rtio.h, rterror.h, rtmath.h, and rtmisc.h

File Contents

# User Rev Content
1 greg 3.1 /* RCSid $Id: standard.h,v 2.30 2003/06/26 00:58:09 schorsch Exp $ */
2     /*
3     * Miscellaneous Radiance definitions
4     */
5     #ifndef _RAD_RTMISC_H_
6     #define _RAD_RTMISC_H_
7     #ifdef __cplusplus
8     extern "C" {
9     #endif
10    
11     #include <stdlib.h>
12     /* memory operations */
13     #ifdef NOSTRUCTASS
14     #define copystruct(d,s) bcopy((void *)(s),(void *)(d),sizeof(*(d)))
15     #else
16     #define copystruct(d,s) (*(d) = *(s))
17     #endif
18    
19     #ifndef BSD
20     #define bcopy(s,d,n) (void)memcpy(d,s,n)
21     #define bzero(d,n) (void)memset(d,0,n)
22     #define bcmp(b1,b2,n) memcmp(b1,b2,n)
23     #endif
24    
25     #ifdef _WIN32
26     #define NIX 1
27     #endif
28     #ifdef AMIGA
29     #define NIX 1
30     #endif
31     /* defined in bmalloc.c */
32     extern char *bmalloc(unsigned int n);
33     extern void bfree(char *p, unsigned int n);
34    
35     #ifdef __cplusplus
36     }
37     #endif
38     #endif /* _RAD_RTMISC_H_ */
39