comparison src/lrecord.h @ 430:a5df635868b2 r21-2-23

Import from CVS: tag r21-2-23
author cvs
date Mon, 13 Aug 2007 11:29:08 +0200
parents 3ecd8885ac67
children 3a7e78e1142d
comparison
equal deleted inserted replaced
429:8305706cbb93 430:a5df635868b2
70 }; 70 };
71 71
72 struct lrecord_implementation; 72 struct lrecord_implementation;
73 int lrecord_type_index (CONST struct lrecord_implementation *implementation); 73 int lrecord_type_index (CONST struct lrecord_implementation *implementation);
74 74
75 # define set_lheader_implementation(header,imp) do { \ 75 #define set_lheader_implementation(header,imp) do { \
76 struct lrecord_header* SLI_header = (header); \ 76 struct lrecord_header* SLI_header = (header); \
77 (SLI_header)->type = lrecord_type_index (imp); \ 77 SLI_header->type = lrecord_type_index (imp); \
78 (SLI_header)->mark = 0; \ 78 SLI_header->mark = 0; \
79 (SLI_header)->c_readonly = 0; \ 79 SLI_header->c_readonly = 0; \
80 (SLI_header)->lisp_readonly = 0; \ 80 SLI_header->lisp_readonly = 0; \
81 } while (0) 81 } while (0)
82 82
83 struct lcrecord_header 83 struct lcrecord_header
84 { 84 {
85 struct lrecord_header lheader; 85 struct lrecord_header lheader;
487 487
488 /* Copy the data from one lcrecord structure into another, but don't 488 /* Copy the data from one lcrecord structure into another, but don't
489 overwrite the header information. */ 489 overwrite the header information. */
490 490
491 #define copy_lcrecord(dst, src) \ 491 #define copy_lcrecord(dst, src) \
492 memcpy ((char *) dst + sizeof (struct lcrecord_header), \ 492 memcpy ((char *) (dst) + sizeof (struct lcrecord_header), \
493 (char *) src + sizeof (struct lcrecord_header), \ 493 (char *) (src) + sizeof (struct lcrecord_header), \
494 sizeof (*dst) - sizeof (struct lcrecord_header)) 494 sizeof (*(dst)) - sizeof (struct lcrecord_header))
495 495
496 #define zero_lcrecord(lcr) \ 496 #define zero_lcrecord(lcr) \
497 memset ((char *) lcr + sizeof (struct lcrecord_header), 0, \ 497 memset ((char *) (lcr) + sizeof (struct lcrecord_header), 0, \
498 sizeof (*lcr) - sizeof (struct lcrecord_header)) 498 sizeof (*(lcr)) - sizeof (struct lcrecord_header))
499 499
500 #endif /* _XEMACS_LRECORD_H_ */ 500 #endif /* _XEMACS_LRECORD_H_ */