GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > XLX / V7-0-0

Constituent: parser     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

util.h File Reference

General character/conversion utilities. More...

This graph shows which files directly or indirectly include this file:


Functions

unsigned XLX_pow (unsigned exp)
 calculates 16 to the power x
unsigned XLX_isEnabled (const char **attribute, int *enabled)
 Reads the attribute list and sets enabled accordingly.
unsigned XLX_getAttribute (const char **attribute, const char *name, int *value)
 Find name in the attribute list and sets value accordingly.
unsigned int xtoi (const char *string)
 Convert a hexedecimal string into an unsigned integer.
unsigned long long xtoll (const char *string)
 Convert a hexedecimal string into an unsigned long long.
unsigned int ishex (const char *string)
 Test a string to see if it is a hexadecimal number.
unsigned int dtoi (const char *string)
 Convert a decimal string into an unsigned integer.
unsigned long long dtoll (const char *string)
 Convert a decimal string into an unsigned long long.
unsigned int isdec (const char *string)
 Test a string to see if it is a hexadecimal number.
unsigned int ischar (const char *string)
 Test a string to see if it is a valid register wide character element.

Detailed Description

General character/conversion utilities.

Author:
James Swain -- jswain@slac.stanford.edu

Function Documentation

unsigned int dtoi const char *  string  ) 
 

Convert a decimal string into an unsigned integer.

Parameters:
string Decimal string to convert
Returns:
integer value of the string

unsigned long long dtoll const char *  string  ) 
 

Convert a decimal string into an unsigned long long.

Parameters:
string Decimal string to convert
Returns:
long long value of the string

unsigned int ischar const char *  string  ) 
 

Test a string to see if it is a valid register wide character element.

Parameters:
string Layer address string to convert
Return values:
1 if the string has valid characters before the start of the next tag
0 if the string does not have valid characters before the start of the next tag
Checks that the string has valid characters after any leading whitespace and before the start of the next tag.

unsigned int isdec const char *  string  ) 
 

Test a string to see if it is a hexadecimal number.

Parameters:
string Hex string to convert
Return values:
1 if the string is a valid dec string
0 if the string is not a valid dec string
Test is quite weak, checks that the string starts with zero or more whitespace characters followed by "one or more numerical characters ('0' to '9').

unsigned int ishex const char *  string  ) 
 

Test a string to see if it is a hexadecimal number.

Parameters:
string Hex string to convert
Return values:
1 if the string is a valid hex string
0 if the string is not a valid hex string
Test is quite weak, checks that the string starts with zero or more whitespace characters followed by "0x" followed by one or more hex characters ('0' to '9', 'a' to 'f' and 'A' to 'f').

unsigned XLX_getAttribute const char **  attribute,
const char *  name,
int *  value
 

Find name in the attribute list and sets value accordingly.

Parameters:
attribute Attribute list from the start tag of the element
name Attribute to find and return
value Location to put value of attribute
Return values:
0 If the name is found in the attribute list
-1 If the name is missing from the attribute list

unsigned XLX_isEnabled const char **  attribute,
int *  enabled
 

Reads the attribute list and sets enabled accordingly.

Parameters:
attribute Attribute list from the start tag of the element
enabled Location to write 0 (FALSE) or 1 (TRUE)
Return values:
0 If the attribute list was read correctly
-1 If there was a bad attribute

unsigned XLX_pow unsigned  exp  ) 
 

calculates 16 to the power x

Parameters:
exp Exponent
Returns:
16 raised to the power exp

unsigned int xtoi const char *  string  ) 
 

Convert a hexedecimal string into an unsigned integer.

Parameters:
string Hex string to convert
Returns:
integer value of the string

unsigned long long xtoll const char *  string  ) 
 

Convert a hexedecimal string into an unsigned long long.

Parameters:
string Hex string to convert
Returns:
long long value of the string


Generated on Mon Nov 28 21:57:03 2005 by  doxygen 1.4.4