[manual index]

Plan 9 from Bell Labs - Section 2 - System and Library Calls


0intro - introduction to library functions
intro
9p - 9P file service
Srv, dirread9p, emalloc9p, erealloc9p, estrdup9p, postfd, postmountsrv, readbuf, readstr, respond, responderror, threadpostmountsrv, srv
9pcmdbuf - control message parsing
Cmdbuf, parsecmd, respondcmderror, lookupcmd
9pfid - 9P fid, request tracking
Fid, Fidpool, allocfidpool, freefidpool, allocfid, closefid, lookupfid, removefid, Req, Reqpool, allocreqpool, freereqpool, allocreq, closereq, lookupreq, removereq
9pfile - in-memory file hierarchy
Tree, alloctree, freetree, File, createfile, closefile, removefile, walkfile, opendirfile, readdirfile, closedirfile, hasperm
abort - generate a fault
abort
abs - integer absolute values
abs, labs
access - determine accessibility of file
access
addpt - arithmetic on points and rectangles
addpt, subpt, mulpt, divpt, rectaddpt, rectsubpt, insetrect, canonrect, eqpt, eqrect, ptinrect, rectinrect, rectXrect, rectclip, combinerect, Dx, Dy, Pt, Rect, Rpt
aes - advanced encryption standard (rijndael)
setupAESstate, aesCBCencrypt, aesCBCdecrypt
allocimage - allocating, freeing, reading, writing images
allocimage, allocimagemix, freeimage, nameimage, namedimage, setalpha, loadimage, cloadimage, unloadimage, readimage, writeimage, bytesperline, wordsperline
arg - process option letters from argv
ARGBEGIN, ARGEND, ARGC, ARGF, EARGF, arginit, argopt
arith3 - operations on 3-d points and planes
add3, sub3, neg3, div3, mul3, eqpt3, closept3, dot3, cross3, len3, dist3, unit3, midpt3, lerp3, reflect3, nearseg3, pldist3, vdiv3, vrem3, pn2f3, ppp2f3, fff2p3, pdiv4, add4, sub4
assert - check program invariants
assert
atof - convert text to numbers
atof, atoi, atol, atoll, charstod, strtod, strtol, strtoll, strtoul, strtoull
auth -
amount, newns, addns, login, noworld, auth_proxy, fauth_proxy, auth_allocrpc, auth_freerpc, auth_rpc, auth_getkey, amount_getkey, auth_freeAI, auth_chuid, auth_challenge, auth_response, auth_freechal, auth_respond, auth_userpasswd, auth_getuserpasswd, auth_getinfo\- routines for authenticating users
authsrv - routines for communicating with authentication servers
authdial, passtokey, nvcsum, readnvram, convT2M, convM2T, convTR2M, convM2TR, convA2M, convM2A, convPR2M, convM2PR, _asgetticket, _asrdresp
bin - grouped memory allocation
binalloc, bingrow, binfree
bind - change name space
bind, mount, unmount
bio - buffered input/output
Bopen, Binit, Binits, Brdline, Brdstr, Bgetc, Bgetrune, Bgetd, Bungetc, Bungetrune, Bread, Bseek, Boffset, Bfildes, Blinelen, Bputc, Bputrune, Bprint, Bvprint, Bwrite, Bflush, Bterm, Bbuffered
blowfish - blowfish encryption
setupBFstate, bfCBCencrypt, bfCBCdecrypt, bfECBencrypt, bfECBdecrypt
brk - change memory allocation
brk, sbrk
cachechars - font utilities
cachechars, agefont, loadchar, Subfont, Fontchar, Font
chdir - change working directory
chdir
cleanname - clean a path name
cleanname
color - colors and color maps
cmap2rgb, cmap2rgba, rgb2cmap
complete - file name completion
complete
control - interactive graphical controls
Control, Controlset, activate, closecontrol, closecontrolset, controlcalled, controlwire, createbox, createboxbox, createbutton, createcolumn, createentry, createkeyboard, createlabel, createmenu, createradiobutton, createrow, createscribble, createslider, createstack, createtab, createtext, createtextbutton, ctlerror, ctlmalloc, ctlrealloc, ctlstrdup, ctlprint, deactivate, freectlfont, freectlimage, initcontrols, namectlfont, namectlimage, newcontrolset, resizecontrolset
cputime - cpu time in this process and children
cputime, times
ctime - convert date and time
ctime, localtime, gmtime, asctime, tm2sec, timezone
ctype - ASCII character classification
isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, isgraph, iscntrl, isascii, toascii, _toupper, _tolower, toupper, tolower
debugger - machine-independent debugger functions
cisctrace, risctrace, ciscframe, riscframe, localaddr, symoff, fpformat, beieee80ftos, beieeesftos, beieeedftos, leieee80ftos, leieeesftos, leieeedftos, ieeesftos, ieeedftos
des - single and triple digital encryption standard
setupDESstate, des_key_setup, block_cipher, desCBCencrypt, desCBCdecrypt, desECBencrypt, desECBdecrypt, des3CBCencrypt, des3CBCdecrypt, des3ECBencrypt, des3ECBdecrypt, key_setup, des56to64, des64to56, setupDES3state, triple_block_cipher,
dial - make and break network connections
dial, hangup, announce, listen, accept, reject, netmkaddr, setnetmtpt, getnetconninfo, freenetconninfo
dirread - read directory
dirread, dirreadall
disk - generic disk device interface
opendisk, Disk
draw - graphics functions PB L
Image, draw, gendraw, drawreplxy, drawrepl, replclipr, line, poly, fillpoly, bezier, bezspline, fillbezier, fillbezspline, ellipse, fillellipse, arc, fillarc, icossin, icossin2, border, string, stringn, runestring, runestringn, stringbg, stringnbg, runestringbg, runestringnbg, _string, ARROW, drawsetdebug
dsa - digital signature algorithm
dsagen, dsasign, dsaverify, dsapuballoc, dsapubfree, dsaprivalloc, dsaprivfree, dsasigalloc, dsasigfree, dsaprivtopub
dup - duplicate an open file descriptor
dup
elgamal - elgamal encryption
eggen, egencrypt, egdecrypt, egsign, egverify, egpuballoc, egpubfree, egprivalloc, egprivfree, egsigalloc, egsigfree, egprivtopub
encode - encoding byte arrays as strings
dec64, enc64, dec32, enc32, dec16, enc16, encodefmt
encrypt - DES encryption
encrypt, decrypt, netcrypt
errstr - description of last system call error
errstr, rerrstr, werrstr
event - graphics events
event, einit, estart, estartfn, etimer, eread, emouse, ekbd, ecanread, ecanmouse, ecankbd, ereadmouse, eatomouse, eresized, egetrect, edrawgetrect, emenuhit, emoveto, esetcursor, Event, Mouse, Menu
exec - execute a file
exec, execl, _privates, _nprivates, _tos
exits - terminate process, process cleanup
exits, _exits, atexit, atexitdont, terminate
exp - exponential, logarithm, power, square root
exp, log, log10, pow, pow10, sqrt
fauth - set up authentication on a file descriptor to a file server
fauth
fcall - interface to Plan 9 File protocol
Fcall, convS2M, convD2M, convM2S, convM2D, fcallfmt, dirfmt, dirmodefmt, read9pmsg, statcheck, sizeS2M, sizeD2M
fd2path - return file name associated with file descriptor
fd2path
fgetc - Stdio input and output
fgetc, getc, getchar, fputc, putc, putchar, ungetc, fgets, gets, fputs, puts, fread, fwrite
flate - deflate compression
deflateinit, deflate, deflatezlib, deflateblock, deflatezlibblock, inflateinit, inflate, inflatezlib, inflateblock, inflatezlibblock, flateerr, mkcrctab, blockcrc, adler32
floor - absolute value, remainder, floor, ceiling functions
fabs, fmod, floor, ceil
fmtinstall - support for user-defined print formats and output routines
fmtinstall, dofmt, dorfmt, fmtprint, fmtvprint, fmtrune, fmtstrcpy, fmtrunestrcpy, fmtfdinit, fmtfdflush, fmtstrinit, fmtstrflush, runefmtstrinit, runefmtstrflush, errfmt
fopen - standard buffered input/output package
fopen, freopen, fdopen, fileno, fclose, sopenr, sopenw, sclose, fflush, setvbuf, setbuf, fgetpos, ftell, fsetpos, fseek, rewind, feof, ferror, clearerr
fork - manipulate process resources
fork, rfork
fprintf - print formatted output
fprintf, printf, sprintf, snprintf, vfprintf, vprintf, vsprintf, vsnprintf
frame - frames of text
frinit, frsetrects, frinittick, frclear, frcharofpt, frptofchar, frinsert, frdelete, frselect, frtick, frselectpaint, frdrawsel, frdrawsel0, frgetmouse
frexp - split into mantissa and exponent
frexp, ldexp, modf
fscanf - scan formatted input
fscanf, scanf, sscanf, vfscanf
fversion - initialize 9P connection and negotiate version
fversion
genrandom - random number generation
genrandom, prng
getcallerpc - fetch return PC of current function
getcallerpc
getenv - access environment variables
getenv, putenv
getfcr - control floating point
getfcr, setfcr, getfsr, setfsr
getfields - break a string into fields
getfields, gettokens, tokenize
getpid - get process ids
getpid, getppid
getuser - get user or system name
getuser, sysname
getwd - get current directory
getwd
graphics - interactive graphics
Display, Point, Rectangle, Cursor, initdraw, geninitdraw, drawerror, initdisplay, closedisplay, getdefont, getwindow, gengetwindow, flushimage, bufimage, lockdisplay, unlockdisplay, openfont, buildfont, freefont, Pfmt, Rfmt, strtochan, chantostr, chantodepth
html - HTML parser
parsehtml, printitems, validitems, freeitems, freedocinfo, dimenkind, dimenspec, targetid, targetname, fromStr, toStr
httpd - routines for creating an http server
HConnect, HContent, HContents, HETag, HFields, Hio, Htmlesc, HttpHead, HttpReq, HRange, HSPairs, hmydomain, hversion, htmlesc, halloc, hbodypush, hbuflen, hcheckcontent, hclose, hdate2sec, hdatefmt, hfail, hflush, hgetc, hgethead, hinit, hiserror, hload, hlower, hmkcontent, hmkhfields, hmkmimeboundary, hmkspairs, hmoved, hokheaders, hparseheaders, hparsequery, hparsereq, hprint, hputc, hreadbuf, hredirected, hreqcleanup, hrevhfields, hrevspairs, hstrdup, http11, httpfmt, httpunesc, hunallowed, hungetc, hunload, hurlfmt, hurlunesc, hvprint, hwrite, hxferenc,
hypot - Euclidean distance
hypot
intmap - integer to data structure maps
Intmap, allocmap, freemap, insertkey, caninsertkey, lookupkey, deletekey
ioproc - slave I/O processes for threaded programs
closeioproc, iocall, ioclose, iointerrupt, iodial, ioopen, ioproc, ioread, ioreadn, iowrite
iounit - return size of atomic I/O unit for file descriptor
iounit
ip - Internet protocol
eipfmt, parseip, parseipmask, v4parseip, v4parsecidr, parseether, myipaddr, myetheraddr, maskip, equivip4, equivip6, defmask, isv4, v4tov6, v6tov4, nhgetv, nhgetl, nhgets, hnputv, hnputl, hnputs, ptclbsum, readipifc
isalpharune - Unicode character classes and cases
isalpharune, islowerrune, isspacerune, istitlerune, isupperrune, tolowerrune, totitlerune, toupperrune
keyboard - keyboard control
initkeyboard, ctlkeyboard, closekeyboard
lock - spin locks, queueing rendezvous locks, reader-writer locks, rendezvous points, and reference counts
lock, canlock, unlock, qlock, canqlock, qunlock, rlock, canrlock, runlock, wlock, canwlock, wunlock, rsleep, rwakeup, rwakeupall incref, decref
mach - machine-independent access to executable files
crackhdr, machbytype, machbyname, newmap, setmap, findseg, unusemap, loadmap, attachproc, get1, get2, get4, get8, put1, put2, put4, put8, beswab, beswal, beswav, leswab, leswal, leswav
malloc - memory allocator
malloc, mallocalign, mallocz, free, realloc, calloc, msize, setmalloctag, setrealloctag, getmalloctag, getrealloctag, malloctopoolblock
matrix - Geometric transformations
ident, matmul, matmulr, determinant, adjoint, invertmat, xformpoint, xformpointd, xformplane, pushmat, popmat, rot, qrot, scale, move, xform, ixform, persp, look, viewport
memdraw - drawing routines for memory-resident images
Memimage, Memdata, Memdrawparam, memimageinit, wordaddr, byteaddr, memimagemove, allocmemimage, allocmemimaged, readmemimage, creadmemimage, writememimage, freememimage, memsetchan, loadmemimage, cloadmemimage, unloadmemimage, memfillcolor, memarc, mempoly, memellipse, memfillpoly, memimageline, memimagedraw, drawclip, memlinebbox, memlineendsize, allocmemsubfont, openmemsubfont, freememsubfont, memsubfontwidth, getmemdefont, memimagestring, iprint, hwdraw
memlayer - windows of memory-resident images
memdraw, memlalloc, memldelete, memlexpose, memlfree, memlhide, memline, memlnorefresh, memload, memunload, memlorigin, memlsetrefresh, memltofront, memltofrontn, memltorear, memltorearn
memory - memory operations
memccpy, memchr, memcmp, memcpy, memmove, memset
mktemp - make a unique file name
mktemp
mouse - mouse control
initmouse, readmouse, closemouse, moveto, getrect, drawgetrect, menuhit, setcursor
mp - extended precision arithmetic
mpsetminbits, mpnew, mpfree, mpbits, mpnorm, mpcopy, mpassign, mprand, strtomp, mpfmt,mptoa, betomp, mptobe, letomp, mptole, mptoui, uitomp, mptoi, itomp, uvtomp, mptouv, vtomp, mptov, mpdigdiv, mpadd, mpsub, mpleft, mpright, mpmul, mpexp, mpmod, mpdiv, mpcmp, mpextendedgcd, mpinvert, mpsignif, mplowbits0, mpvecdigmuladd, mpvecdigmulsub, mpvecadd, mpvecsub, mpveccmp, mpvecmul, mpmagcmp, mpmagadd, mpmagsub, crtpre, crtin, crtout, crtprefree, crtresfree
muldiv - high-precision multiplication and division
muldiv, umuldiv
nan - not-a-number and infinity functions
NaN, Inf, isNaN, isInf
ndb - network database
ndbopen, ndbcat, ndbchanged, ndbclose, ndbreopen, ndbsearch, ndbsnext, ndbgetvalue, ndbfree, ipattr, ndbgetipaddr, ndbipinfo, csipinfo, ndbhash, ndbparse, csgetvalue, ndbfindattr, dnsquery, ndbdiscard, ndbconcatenate, ndbreorder, ndbsubstitute, ndbgetval, csgetval, ndblookval
notify - handle asynchronous process notification
notify, noted, atnotify
object - object file interpretation functions
objtype, readobj, objtraverse, isar, nextar, readar
open - open a file for reading or writing, create file
open, create, close
perror - system error messages
perror, syslog, sysfatal
pipe - create an interprocess channel
pipe
plumb - plumb messages
eplumb, plumbfree, plumbopen, plumbsend, plumbsendtext, plumblookup, plumbpack, plumbpackattr, plumbaddattr, plumbdelattr, plumbrecv, plumbunpack, plumbunpackpartial, plumbunpackattr, Plumbmsg
pool - general memory management routines
poolalloc, poolallocalignspan, poolfree, poolmsize, poolrealloc, poolcompact, poolcheck, poolblockcheck, pooldump
postnote - send a note to a process or process group
postnote
prime - prime number generation
genprime, gensafeprime, genstrongprime, DSAprimes, probably_prime, smallprimetest
print - print formatted output
print, fprint, sprint, snprint, seprint, smprint, runesprint, runesnprint, runeseprint, runesmprint, vfprint, vsnprint, vseprint, vsmprint, runevsnprint, runevseprint, runevsmprint
privalloc - per-process private storage management
privalloc, privfree
proto - parse and process a proto file listing
rdproto
pushssl - attach SSL version 2 encryption to a communication channel
pushssl
pushtls - attach TLS1 or SSL3 encryption to a communication channel
pushtls, tlsClient, tlsServer, initThumbprints, freeThumbprints, okThumbprint, readcert, readcertchain
qball - 3-d rotation controller
qball
qsort - quicker sort
qsort
quaternion - Quaternion arithmetic
qtom, mtoq, qadd, qsub, qneg, qmul, qdiv, qunit, qinv, qlen, slerp, qmid, qsqrt
quote - quoted character strings
quotestrdup, quoterunestrdup, unquotestrdup, unquoterunestrdup, quotestrfmt, quoterunestrfmt, quotefmtinstall, doquote, needsrcquote
rand - random number generator
rand, lrand, frand, nrand, lnrand, srand, truerand, ntruerand, fastrand, nfastrand
rc4 - alleged rc4 encryption
setupRC4state, rc4, rc4skip, rc4back
read - read or write file
read, readn, write, pread, pwrite
readcolmap - access display color map
RGB, readcolmap, writecolmap
readv - scatter/gather read and write
readv, writev, preadv, pwritev
regexp - regular expression
regcomp, regcomplit, regcompnl, regexec, regsub, rregexec, rregsub, regerror
remove - remove a file
remove
rendezvous - user level process synchronization
rendezvous
rsa - RSA encryption algorithm
asn1dump, asn1toRSApriv, decodePEM, rsadecrypt, rsaencrypt, rsagen, rsaprivalloc, rsaprivfree, rsaprivtopub, rsapuballoc, rsapubfree, X509toRSApub, X509gen, X509verify
rune - rune/UTF conversion
runetochar, chartorune, runelen, runenlen, fullrune, utfecpy, utflen, utfnlen, utfrune, utfrrune, utfutf
runestrcat - rune string operations
runestrcat, runestrncat, runestrcmp, runestrncmp, runestrcpy, runestrncpy, runestrecpy, runestrlen, runestrchr, runestrrchr, runestrdup, runestrstr
scribble - character recognition
scribblealloc, recognize
scsi - SCSI device operations
openscsi, scsiready, scsi, scsicmd, scsierror
sechash - cryptographically secure hashes
md4, md5, sha1, hmac_md5, hmac_sha1, md5pickle, md5unpickle, sha1pickle, sha1unpickle
seek - change file offset
seek
segattach - map/unmap a segment in virtual memory
segattach, segdetach, segfree
segbrk - change memory allocation
segbrk
segflush - flush instruction and data caches
segflush
setjmp - non-local goto
setjmp, longjmp, notejmp
sin - trigonometric functions
sin, cos, tan, asin, acos, atan, atan2
sinh - hyperbolic functions
sinh, cosh, tanh
sleep - delay, ask for delayed note
sleep, alarm
stat - get and put file status
stat, fstat, wstat, fwstat, dirstat, dirfstat, dirwstat, dirfwstat, nulldir
strcat - string operations
strcat, strncat, strcmp, strncmp, cistrcmp, cistrncmp, strcpy, strncpy, strecpy, strlen, strchr, strrchr, strpbrk, strspn, strcspn, strtok, strdup, strstr, cistrstr
string - extensible strings
s_alloc, s_append, s_array, s_copy, s_error, s_free, s_incref, s_memappend, s_nappend, s_new, s_newalloc, s_parse, s_reset, s_restart, s_terminate, s_tolower, s_putc, s_unique, s_grow, s_read, s_read_line, s_getline
stringsize - graphical size of strings
stringsize, stringwidth, stringnwidth, runestringsize, runestringwidth, runestringnwidth
subfont - subfont manipulation
allocsubfont, freesubfont, installsubfont, lookupsubfont, uninstallsubfont, subfontname, readsubfont, readsubfonti, writesubfont, stringsubfont, strsubfontwidth, mkfont
symbol - symbol table access functions
syminit, getsym, symbase, pc2sp, pc2line, textseg, line2addr, lookup, findlocal, getauto, findsym, localsym, globalsym, textsym, file2pc, fileelem, filesym, fileline, fnbound
thread - thread and proc management
alt, chancreate, chanfree, chaninit, chanprint, mainstacksize, proccreate, procdata, procexec, procexecl, procrfork, recv, recvp, recvul, send, sendp, sendul, nbrecv, nbrecvp, nbrecvul, nbsend, nbsendp, nbsendul, threadcreate, threaddata, threadexits, threadexitsall, threadgetgrp, threadgetname, threadint, threadintgrp, threadkill, threadkillgrp, threadmain, threadnotify, threadid, threadpid, threadsetgrp, threadsetname, threadwaitchan, yield
time - time in seconds and nanoseconds since epoch
time, nsec
tmpfile - Stdio temporary files
tmpfile, tmpnam
wait - wait for a process to exit
await, wait, waitpid
window - window management
Screen, allocscreen, publicscreen, freescreen, allocwindow, bottomwindow, bottomnwindows, topwindow, topnwindows, originwindow