[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sizeof



In various postings Robby Findler asks about the lisp equivalent
of the c sizeof function.

Here's the example used:
> (make-record :ColorTable :storage :Handle 
>             :length (+ (sizeof :ColorTable)
>                        (* num-colors (sizeof :ColorSpec))))


The "record-length" function is the lisp replacement of the
c sizeof function.

For examples:
    (record-length :TPrint)
returns the size of the :tPrint record or 120.

The following creates a handle to a tPrint record:
      (setq view-print-record (require-trap #_NewHandle :errchk (record-length 
      :TPrint)))

mark