Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

Miscellaneous Functions
[C Runtime Library.]

Complementary runtime support. More...

Defines

#define EEPROM_READ(addr, dst)
 Read multibyte types from the EEPROM.

#define EEPROM_WRITE(addr, src)
 Write multibyte types to the EEPROM.


Typedefs

typedef unsigned char ureg_t
 Unsigned register type.

typedef signed char reg_t
 Unsigned register type.

typedef unsigned short uptr_t
 Unsigned pointer value type.


Functions

char * strsep_rs (char **pp_str, const char *p_delim, char *p_term)
 Thread safe variant of strsep.

char * strsep_r (char **pp_str, const char *p_delim)
 Thread safe version of strsep.


Detailed Description

Complementary runtime support.

The functions strtok_r(), strsep_r() and strsep_rs() are intended as a replacement for the strtok() function. While the strtok() function should be preferred for portability reasons (it conforms to ISO/IEC 9899:1990 ("ISO C89")) it may not be able to be used in a multi-threaded environment (that is it is not reentrant). Functions strsep_r() and strsep_rs() can handle empty fields, (i.e. detect fields delimited by two adjacent delimiter characters). Function strsep() first appeared in 4.4BSD.


Define Documentation

#define EEPROM_READ addr,
dst   
 

Read multibyte types from the EEPROM.

#define EEPROM_WRITE addr,
src   
 

Write multibyte types to the EEPROM.


Typedef Documentation

typedef signed char reg_t
 

Unsigned register type.

Similar to ureg_t, but for signed values from -128 to +127.

typedef unsigned short uptr_t
 

Unsigned pointer value type.

The size of this type is at least the size of a memory pointer. For CPUs with 16 address bits this will be an unsigned short.

typedef unsigned char ureg_t
 

Unsigned register type.

The size of this type is equal to the size of a register, the hardware datapath or whatever might fit to give optimum performance for values from 0 to 255.

Typically 8 bit CPUs will use unsigned characters, 16 bit CPUs will use unsigned shorts etc.


Function Documentation

char* strsep_r char **    pp_str,
const char *    p_delim
 

Thread safe version of strsep.

This function locates, in the string referenced by *str, the first occurrence of any character in the string delim (or the terminating `' character) and replaces it with a `'. The location of the next character after the delimiter character (or NULL, if the end of the string was reached) is stored in *str. The original value of *str is returned.

An "empty" field, i.e. one caused by two adjacent delimiter characters, can be detected by comparing the location referenced by the pointer returned in *str to `'.

If *str is initially NULL, strsep_r() returns NULL.

If delim is NULL or the empty string, strsep_r() returns *str.

char* strsep_rs char **    pp_str,
const char *    p_delim,
char *    p_sep
 

Thread safe variant of strsep.

This function is identical in operation to strsep_r(), except it returns the deliminating character.


© 2000-2003 by egnite Software GmbH - visit http://www.ethernut.de/