QUADOPS(3) — C LIBRARY FUNCTIONS
NAME
ltoq, q_cons, q_high, q_low, q_add, q_sub, q_neg, q_lshift, q_rshift, q_cmp − quad_t operations
SYNOPSIS
#include <quadops.h>
quad_t ltoq(offset)
long offset;
quad_t q_cons(high, low)
long high, low;
long q_high(q)
quad_t q;
long q_low(q)
quad_t q;
quad_t q_add(q1, q2)
quad_t q1, q2;
quad_t q_sub(q1, q2)
quad_t q1, q2;
quad_t q_neg(q)
quad_t q;
quad_t q_lshift(q, n)
quad_t q;
int n;
quad_t q_rshift(q, n)
quad_t q;
int n;
int q_cmp(q1, q2)
quad_t q1, q2;
DESCRIPTION
These functions provide some basic operations on the quad_t data type, which represents 64-bit signed integers using a pair of 32-bit longs. Functions are provided for constructing, decomposing, and comparing quad_t values, and for doing simple arithmetic.
ltoq() converts a 32-bit value into a quad_t. q_cons() constructs a quad_t value from a pair of 32-bit values. The first argument contains the upper (most significant) 32 bits, and the second argument contains the lower 32 bits. q_high() returns the most significant 32 bits of a quad_t value; q_low() returns the least significant 32 bits. q_add() returns the sum of its two arguments. q_sub() returns the difference between the first and second arguments. q_neg() returns the negative of its arguments. q_cmp() compares its two arguments and returns a negative, zero, or positive result, according as the first argument is less than, equal to, or greater than the second.
SEE ALSO
Sun Online: DiskSuite Administration Guide
Sun Release 4.1 — Last change: 1 July 1991