libowfat Documentation - uint.a

uint16_pack - write an unsigned little-endian 16-bit integer
uint16_pack_big - write an unsigned big-endian 16-bit integer
uint16_unpack - read an unsigned little-endian 16-bit integer
uint16_unpack_big - read an unsigned big-endian 16-bit integer
uint32_pack - write an unsigned little-endian 32-bit integer
uint32_pack_big - write an unsigned big-endian 32-bit integer
uint32_unpack - read an unsigned little-endian 32-bit integer
uint32_unpack_big - read an unsigned big-endian 32-bit integer

Table of Contents

Synopsis

#include <uint16.h>
uint16 u;
void uint16_pack(char s[2], uint16 u);
void uint16_pack_big(char s[2], uint16 u);
void uint16_unpack(const char s[2], uint16 *u);
void uint16_unpack_big(const char s[2], uint16 *u);

#include <uint32.h>
uint32 u;
void uint32_pack(char s[4], uint32 u);
void uint32_pack_big(char s[4], uint32 u);
void uint32_unpack(const char s[4], uint32 *u);
void uint32_unpack_big(const char s[4], uint32 *u);

Description

uint16 is a 16-bit unsigned integer type, normally either unsigned int or unsigned long.

uint16_unpack portably reads a uint16 as stored on a little-endian architecture from s and writes it info r in the native byte order.

uint16_unpack_big portably reads a uint16 as stored on a big-endian architecture (i.e. in network byte order) from s and writes it info r in the native byte order.

uint16_unpack portably reads a uint16 as stored on a little-endian architecture from s and writes it info r in the native byte order.

uint16_unpack_big portably reads a uint16 as stored on a big-endian architecture (i.e. in network byte order) from s and writes it info r in the native byte order.

uint32 is a 32-bit unsigned integer type, normally either unsigned int or unsigned long.

uint32_unpack portably reads a uint32 as stored on a little-endian architecture from s and writes it info r in the native byte order.

uint32_unpack_big portably reads a uint32 as stored on a big-endian architecture (i.e. in network byte order) from s and writes it info r in the native byte order.

uint32_unpack portably reads a uint32 as stored on a little-endian architecture from s and writes it info r in the native byte order.

uint32_unpack_big portably reads a uint32 as stored on a big-endian architecture (i.e. in network byte order) from s and writes it info r in the native byte order.

Tino Reichardt <der@mcmilk.de>, Felix von Leitner <der@fefe.de>
Version: 5.2, Date: 2001/05/26