MHEG5  22.11.0
Macros | Typedefs | Functions
glue_ulong.h File Reference
#include "techtype.h"

Go to the source code of this file.

Macros

#define USE_TRUE_64BIT
 
#define MAX_64BIT_DECIMAL_STRING   22
 
#define INVALID_64BIT_VAL   0xffffffffffffffffULL
 
#define ULL_Get32(variable)   ((U32BIT)variable)
 
#define ULL_Add(variable, value)   variable += (value)
 
#define ULL_Add32(variable, value)   variable += ((U64BIT)value)
 
#define ULL_Sub(variable, value)   variable -= (value)
 
#define ULL_Sub32(variable, value)   variable -= ((U64BIT)value)
 
#define ULL_Mul32(variable, value)   variable *= ((U64BIT)value)
 
#define ULL_Div32(variable, value)   variable /= ((U64BIT)value)
 
#define ULL_ShiftLeft(variable, value)   variable <<= (value)
 
#define ULL_ShiftRight(variable, value)   variable >>= (value)
 
#define ULL_Set32(variable, value)   variable = (U64BIT)value
 
#define ULL_SetInvalid(variable)   variable = INVALID_64BIT_VAL
 
#define ULL_IsValid(variable)   variable != INVALID_64BIT_VAL
 
#define ULL_IsEqual(variable, value)   (variable == value)
 
#define ULL_Mod32(variable, value)   (variable % (value))
 
#define ULL_Compare(first, second)   (first > second) ? 1 : (first == second) ? 0 : -1
 
#define ULL_Compare32(first, second)   UL_Compare(first, ((U64BIT)second))
 
#define ULL_Itoa(variable, str)   ULONG_Itoa(variable, str)
 

Typedefs

typedef U64BIT U64HL
 

Functions

U64HL ULONG_Atoi (char *str)
 Convert a string to unsigned 64 bit. Only the numeric part of the string is converted (up to the first non-digit character). The string value should be less than 2**64-1. More...
 
void ULONG_Itoa (U64HL variable, char *str)
 Convert unsigned 64 bit to a string. The string should be able to hold at least 21 characters, as the largest unsigned 64 bit is 18446744073709551615 (2**64-1). More...
 

Detailed Description

Date
20/12/2012
Author
Adam Sturtridge

Function Documentation

U64HL ULONG_Atoi ( char *  str)

Convert a string to unsigned 64 bit. Only the numeric part of the string is converted (up to the first non-digit character). The string value should be less than 2**64-1.

USE_TRUE_64BIT

Parameters
strString value
Returns
Unsigned 64 bit

Convert a string to unsigned 64 bit. Only the numeric part of the string is converted (up to the first non-digit character). The string value should be less than 2**64-1.

Parameters
strString value
Returns
Unsigned 64 bit
void ULONG_Itoa ( U64HL  variable,
char *  str 
)

Convert unsigned 64 bit to a string. The string should be able to hold at least 21 characters, as the largest unsigned 64 bit is 18446744073709551615 (2**64-1).

Parameters
variableUnsigned 64 bit
strBuffer for string value (at least 22 bytes)
Returns
Nothing

Convert unsigned 64 bit to a string. The string should be able to hold at least 21 characters, as the largest unsigned 64 bit is 18446744073709551615 (2**64-1).

Parameters
variableUnsigned 64 bit
strBuffer for string value (at least 22 bytes)
Returns
Nothing