plan9port/man/man3/venti-zero.3
Russ Cox 977b25a76a tmac: introduce real manual reference macro instead of overloading IR
The overloading of IR emits magic \X'...' sequences that turn into HTML manual links.
But not all such IR invocations should be manual links;
those had to be written to avoid the IR macro before.
Worse, the \X'...' ending the IR causes troff to emit only a single space after a period.

Defining a new IM macro for manual references fixes both problems.

Fixes #441.
2020-08-13 23:43:43 -04:00

56 lines
1 KiB
Groff

.TH VENTI-ZERO 3
.SH NAME
vtzerotruncate, vtzeroextend, vtzeroscore \- Venti block truncation
.SH SYNOPSIS
.ft L
#include <u.h>
.br
#include <libc.h>
.br
#include <venti.h>
.ta +\w'\fLuint 'u
.PP
.B
uint vtzerotruncate(int type, uchar *buf, uint size)
.PP
.B
void vtzeroextend(int type, uchar *buf, uint size, uint newsize)
.PP
.B
extern uchar vtzeroscore[VtScoreSize];
.SH DESCRIPTION
These utility functions compute how to truncate or replace
trailing zeros (for data blocks) or trailing zero scores
(for pointer blocks) to canonicalize the blocks before
storing them to Venti.
.PP
.I Vtzerotruncate
returns the size of the
.IR size -byte
buffer pointed to by
.I buf
ignoring trailing zeros or zero scores,
according to the given
.IR type .
.PP
.I Vtzeroextend
pads
.I buf
with zeros or zero scores,
according to the given
.IR type ,
to grow it from
.I size
bytes to
.I newsize
bytes.
.PP
.I Vtzeroscore
is the score of the zero-length block.
.SH SOURCE
.B \*9/src/libventi/zero.c
.br
.B \*9/src/libventi/zeroscore.c
.SH SEE ALSO
.IM venti (3) ,
.IM venti (7)