Unit jinclude |
Classes |
Functions |
JFMWRITE - @\\\*) (*@/// function JFMWRITE(var f : TStream; buf : pointer; sizeofbuf : size_t) : size_t;
JFREAD - function SIZEOF(object) : size_t;
@\\\*) { In ANSI C, and indeed any rational implementation, size_t is also the
type returned by sizeof().
MEMCOPY - @\\\*) (*@/// procedure MEMCOPY(dest, src : pointer; size : size_t);
MEMZERO - @\\\*) { We need the NULL macro and size_t typedef.
Types |
Constants |
Variables |
Functions |
@\\\*) { In ANSI C, and indeed any rational implementation, size_t is also the type returned by sizeof(). However, it seems there are some irrational implementations out there, in which sizeof() returns an int even though size_t is defined as long or unsigned long. To ensure consistent results we always use this SIZEOF() macro in place of using sizeof() directly. } {#define SIZEOF(object) (size_t(sizeof(object))} { The modules that use fread() and fwrite() always invoke them through these macros. On some systems you may need to twiddle the argument casts. CAUTION: argument order is different from underlying functions! } (*@/// function JFREAD(stream:TStream; buf : pointer; sizeofbuf : size_t) : size_t;
@/// procedure MEMZERO(target : pointer; size : size_t);
Types |
Constants |
Variables |