Main Page | Modules | File List | Globals | Related Pages

posh.c File Reference


Detailed Description

Portable Open Source Harness primary source file.

Author:
Brian Hook
Date:
2002

Definition in file posh.c.

#include "posh.h"

Go to the source code of this file.

Functions

const char * POSH_GetArchString (void)
 Returns a string describing this platform's basic attributes.

posh_u16_t POSH_SwapU16 (posh_u16_t v)
 Byte swaps a 16-bit unsigned value.

posh_i16_t POSH_SwapI16 (posh_i16_t v)
 Byte swaps a 16-bit signed value.

posh_u32_t POSH_SwapU32 (posh_u32_t v)
 Byte swaps a 32-bit unsigned value.

posh_i32_t POSH_SwapI32 (posh_i32_t v)
 Byte swaps a 32-bit signed value.

posh_u64_t POSH_SwapU64 (posh_u64_t v)
 Byte swaps a 64-bit unsigned value.

posh_i64_t POSH_SwapI64 (posh_i64_t v)
 Byte swaps a 64-bit signed value.

posh_u16_tPOSH_WriteU16ToLittle (void *dst, posh_u16_t value)
 Writes an unsigned 16-bit value to a little endian buffer.

posh_i16_tPOSH_WriteI16ToLittle (void *dst, posh_i16_t value)
 Writes a signed 16-bit value to a little endian buffer.

posh_u32_tPOSH_WriteU32ToLittle (void *dst, posh_u32_t value)
 Writes an unsigned 32-bit value to a little endian buffer.

posh_i32_tPOSH_WriteI32ToLittle (void *dst, posh_i32_t value)
 Writes a signed 32-bit value to a little endian buffer.

posh_u16_tPOSH_WriteU16ToBig (void *dst, posh_u16_t value)
 Writes an unsigned 16-bit value to a big endian buffer.

posh_i16_tPOSH_WriteI16ToBig (void *dst, posh_i16_t value)
 Writes a signed 16-bit value to a big endian buffer.

posh_u32_tPOSH_WriteU32ToBig (void *dst, posh_u32_t value)
 Writes an unsigned 32-bit value to a big endian buffer.

posh_i32_tPOSH_WriteI32ToBig (void *dst, posh_i32_t value)
 Writes a signed 32-bit value to a big endian buffer.

posh_u64_tPOSH_WriteU64ToLittle (void *dst, posh_u64_t value)
 Writes an unsigned 64-bit value to a little-endian buffer.

posh_i64_tPOSH_WriteI64ToLittle (void *dst, posh_i64_t value)
 Writes a signed 64-bit value to a little-endian buffer.

posh_u64_tPOSH_WriteU64ToBig (void *dst, posh_u64_t value)
 Writes an unsigned 64-bit value to a big-endian buffer.

posh_i64_tPOSH_WriteI64ToBig (void *dst, posh_i64_t value)
 Writes a signed 64-bit value to a big-endian buffer.

posh_u16_t POSH_ReadU16FromLittle (const void *src)
 Reads an unsigned 16-bit value from a little-endian buffer.

posh_i16_t POSH_ReadI16FromLittle (const void *src)
 Reads a signed 16-bit value from a little-endian buffer.

posh_u32_t POSH_ReadU32FromLittle (const void *src)
 Reads an unsigned 32-bit value from a little-endian buffer.

posh_i32_t POSH_ReadI32FromLittle (const void *src)
 Reads a signed 32-bit value from a little-endian buffer.

posh_u16_t POSH_ReadU16FromBig (const void *src)
 Reads an unsigned 16-bit value from a big-endian buffer.

posh_i16_t POSH_ReadI16FromBig (const void *src)
 Reads a signed 16-bit value from a big-endian buffer.

posh_u32_t POSH_ReadU32FromBig (const void *src)
 Reads an unsigned 32-bit value from a big-endian buffer.

posh_i32_t POSH_ReadI32FromBig (const void *src)
 Reads a signed 32-bit value from a big-endian buffer.

posh_u64_t POSH_ReadU64FromLittle (const void *src)
 Reads an unsigned 64-bit value from a little-endian buffer.

posh_i64_t POSH_ReadI64FromLittle (const void *src)
 Reads a signed 64-bit value from a little-endian buffer.

posh_u64_t POSH_ReadU64FromBig (const void *src)
 Reads an unsigned 64-bit value from a big-endian buffer.

posh_i64_t POSH_ReadI64FromBig (const void *src)
 Reads an signed 64-bit value from a big-endian buffer.

posh_u32_t POSH_LittleFloatBits (float f)
posh_u32_t POSH_BigFloatBits (float f)
 Extracts raw big-endian bits from a 32-bit floating point value.

void POSH_DoubleBits (double d, posh_byte_t dst[8])
 Extracts raw, little-endian bit representation from a 64-bit double.

double POSH_DoubleFromBits (const posh_byte_t src[8])
 Creates a double-precision, 64-bit floating point value from a set of raw, little-endian bits.

float POSH_FloatFromLittleBits (posh_u32_t bits)
 Creates a floating point number from little endian bits.

float POSH_FloatFromBigBits (posh_u32_t bits)
 Creates a floating point number from big-endian bits.


Function Documentation

posh_i64_t POSH_ReadI64FromBig const void *  src  ) 
 

Reads an signed 64-bit value from a big-endian buffer.

Parameters:
src [in] source buffer
Returns:
host-endian signed 32-bit value

Definition at line 818 of file posh.c.

References posh_i64_t, and POSH_ReadU64FromBig().

posh_i64_t POSH_ReadI64FromLittle const void *  src  ) 
 

Reads a signed 64-bit value from a little-endian buffer.

Parameters:
src [in] source buffer
Returns:
host-endian signed 32-bit value

Definition at line 787 of file posh.c.

References posh_i64_t, and POSH_ReadU64FromLittle().

posh_u64_t POSH_ReadU64FromBig const void *  src  ) 
 

Reads an unsigned 64-bit value from a big-endian buffer.

Parameters:
src [in] source buffer
Returns:
host-endian unsigned 32-bit value

Definition at line 798 of file posh.c.

References posh_byte_t, and posh_u64_t.

Referenced by POSH_ReadI64FromBig().

posh_u64_t POSH_ReadU64FromLittle const void *  src  ) 
 

Reads an unsigned 64-bit value from a little-endian buffer.

Parameters:
src [in] source buffer
Returns:
host-endian unsigned 32-bit value

Definition at line 767 of file posh.c.

References posh_byte_t, and posh_u64_t.

Referenced by POSH_ReadI64FromLittle().


Generated on Tue Jan 31 18:27:35 2006 for POSH by doxygen 1.3.7