| 1 | 
schorsch | 
3.2 | 
/* RCSid $Id: rtmisc.h,v 3.1 2003/06/27 06:53:21 greg Exp $ */ | 
| 2 | 
greg | 
3.1 | 
/* | 
| 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 | 
schorsch | 
3.2 | 
#include  <string.h> | 
| 15 | 
  | 
  | 
#define  copystruct(d,s)        memcpy((void *)(d),(void *)(s),sizeof(*(d))) | 
| 16 | 
greg | 
3.1 | 
#else | 
| 17 | 
  | 
  | 
#define  copystruct(d,s)        (*(d) = *(s)) | 
| 18 | 
  | 
  | 
#endif | 
| 19 | 
  | 
  | 
 | 
| 20 | 
  | 
  | 
                                        /* defined in bmalloc.c */ | 
| 21 | 
  | 
  | 
extern char     *bmalloc(unsigned int n); | 
| 22 | 
  | 
  | 
extern void     bfree(char *p, unsigned int n); | 
| 23 | 
  | 
  | 
 | 
| 24 | 
  | 
  | 
#ifdef __cplusplus | 
| 25 | 
  | 
  | 
} | 
| 26 | 
  | 
  | 
#endif | 
| 27 | 
  | 
  | 
#endif /* _RAD_RTMISC_H_ */ | 
| 28 | 
  | 
  | 
 |