L3TOL(3C)

NAME
l3tol, ltol3 - convert between 3-byte integers and long integers

SYNOPSIS
#include <stdlib.h>
void l3tol (lp, cp, n)
long *lp;
const char *cp;
int n;

void ltol3 (cp, lp, n)
char *cp;
const long *lp;
int n;

DESCRIPTION

l3tol() converts a list of n three-byte integers packed into a character string pointed to by cp into a list of long integers pointed to by lp.

ltol3() performs the reverse conversion from long integers (lp) to three-byte integers (cp).

These functions are useful for filesystem maintenance where the block numbers are three bytes long.

SEE ALSO
fs(5)

WARNINGS

Because of possible differences in byte ordering, the numerical values of the long integers are machine-dependent.