netbsd man page for ctob

Query: ctob

OS: netbsd

Section: 9

Links: netbsd man pages   all man pages

Forums: unix linux community   forum categories

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

CTOD(9) 						   BSD Kernel Developer's Manual						   CTOD(9)

NAME
ctod -- macros related to bytes, pages, and disk blocks
SYNOPSIS
#include <sys/param.h> size ctod(size x); size dtoc(size x); size ctob(size x); size btoc(size x); size dbtob(size x); size btodb(size x);
DESCRIPTION
The ctod family of macros can be used to convert between bytes, pages (``clicks''), and disk blocks. The following table lists the possible conversions: Macro From To ctod() pages disk blocks dtoc() disk blocks pages ctob() pages bytes btoc() bytes pages dbtob() disk blocks bytes btodb() bytes disk blocks These are typical macros that may appear with different names in other operating systems. Examples include btop() and btopr() in Solaris.
SEE ALSO
param(3)
HISTORY
Some of these macros appeared in Version 7 AT&T UNIX.
CAVEATS
The described macros make no assumptions about the type of the input parameter. A caller should ensure that neither integer overflow nor integer underflow are possible.
BSD
April 8, 2011 BSD
Related Man Pages
max(3) - netbsd
param(3) - netbsd
roundup(9) - netbsd
btop(9f) - sunos
btop(9f) - linux
Similar Topics in the Unix Linux Community
Underground candidate list October 2009
UNIX/Linux Forums Post Of The Week 41, October, 2009
Minutes from the October 23, 2009 SCO Bankruptcy Hearing
UNIX/Linux Forums Post Of The Week 44, October, 2009
Ocean Park Files its October Bill - It's 13th So Far in SCO Bankruptcy - Plus Aug. 23rd Hearing Tran