Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ btoc(K) — OpenDesktop Software Development System 1.0.0d

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     BTOC(K)                   UNIX System V                   BTOC(K)



     Name
          btoc, btoms, ctob - converts between bytes and clicks
          (memory pages)

     Syntax
          #include "sys/sysmacros.h"

          unsigned
          btoc(bytes)
          unsigned bytes;

          unsigned
          btoms(bytes)
          unsigned bytes;

          unsigned
          ctob(clicks)
          unsigned clicks;

     Description
          The btoc and ctob macros convert between bytes and clicks
          (memory pages).  btoms is an alias for btoc.  btoc (or
          btoms) returns the number of memory pages that are needed to
          contain the specified number of bytes.  For example, if the
          page size is 4096 bytes, then btoc(5000) returns 2.

          ctob returns the number of bytes contained in the specified
          memory pages.  For example, if the page size is 4096 bytes,
          then ctob(2) returns 8192.

          btoc(0), btoms(0), or ctob(0) each return 0 (zero).

                                                      (printed 7/6/89)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026