readnum man page on Inferno

Man page or keyword search:  
man Server   579 pages
apropos Keyword Search (all sections)
Output format
Inferno logo
[printable version]

READNUM(10.2)							 READNUM(10.2)

NAME
       readnum, readstr - return values from read from device

SYNOPSIS
       int readstr(ulong off, char *buf, ulong n, char *str)

       int readnum(ulong off, char *buf, ulong n, ulong val, int size)

DESCRIPTION
       Readstr	and  readnum  simplify	the return of strings and numbers from
       device read routines, because they deal with any buffering and boundary
       cases.	Several	 parameters  to	 the  read  call  are  often handed on
       directly to these functions: the file offset, as off;  the  address  of
       the  user's  buffer,  as	 buf; and the number of bytes requested, as n.
       Both functions return the number of bytes they have stored in buf,  and
       which can often be returned directly from the device read routine.

       Readstr	satisfies  a read by copying data into buf from the NUL-termiā€
       nated string in str.  The data transferred is selected and  limited  by
       off, n and the length of str.

       Readnum	converts  the unsigned integer val to a decimal representation
       in buf.	The value is right-justified in a field of size-1  places  and
       is  followed  by	 a  blank.  Size can be the global constant for 32-bit
       integers; the largest size allowed is 64 bytes.

SOURCE
       /os/port/devcons.c
       /emu/port/devcon.c

								 READNUM(10.2)
[top]

List of man pages available for Inferno

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net