| Defines | |
| #define | CHK(rc, x) do { if ((rc = (x)) != ESR_SUCCESS) goto CLEANUP; } while (0) | 
| #define | HAS_ASSERT | 
| #define | passert(exp) assert(exp) | 
| #define | EXTERN extern | 
| #define | PINLINE _inline | 
| #define | P_PATH_MAX _MAX_PATH | 
| #define | P_CMDLINE_MAX 4000 | 
| #define | UINT16_TMIN 0 | 
| #define | UINT16_TMAX 65535 | 
| #define | L(x) x | 
| #define | LSTRCAT strcat | 
| #define | LSTRCHR strchr | 
| #define | LSTRRCHR strrchr | 
| #define | LSTRCMP strcmp | 
| #define | LSTRNCMP strncmp | 
| #define | LSTRCPY strcpy | 
| #define | LSTRFTIME strftime | 
| #define | LSTRLEN strlen | 
| #define | LSTRNCPY strncpy | 
| #define | LMEMMOVE memmove | 
| #define | LSTRSTR strstr | 
| #define | LSTRLWR lstrlwr | 
| #define | LSTRUPR lstrupr | 
| #define | LSTRTOD strtod | 
| #define | LSTRTOL strtol | 
| #define | LSTRTOUL strtoul | 
| #define | LISSPACE(c) isspace((unsigned char) c) | 
| #define | LSTRCSPN strcspn | 
| #define | LISALPHA isalpha | 
| #define | LISALNUM isalnum | 
| #define | LISDIGIT isdigit | 
| #define | LSTRTOK strtok | 
| #define | LGETENV getenv | 
| #define | LTOUPPER toupper | 
| #define | LTOLOWER tolower | 
| #define | LPRINTF printf | 
| #define | LFPRINTF fprintf | 
| #define | LSPRINTF sprintf | 
| #define | psprintf sprintf | 
| #define | pvsprintf vsprintf | 
| #define | LOG_10_2 (0.30102999566398) | 
| #define | MAX_UINT_DIGITS ((size_t) ((CHAR_BIT * sizeof(int) * LOG_10_2) + 1)) | 
| #define | MAX_INT_DIGITS ((size_t) (MAX_UINT_DIGITS + 1)) | 
| Typedefs | |
| typedef enum ESR_ReturnCode_t | ESR_ReturnCode | 
| typedef unsigned int | asr_uint32_t | 
| typedef int | asr_int32_t | 
| typedef unsigned short | asr_uint16_t | 
| typedef short | asr_int16_t | 
| typedef unsigned char | asr_uint8_t | 
| typedef signed char | asr_int8_t | 
| typedef char | LCHAR | 
| typedef int | LINT | 
| Enumerations | |
| enum | ESR_ReturnCode_t { ESR_SUCCESS, ESR_CONTINUE_PROCESSING, ESR_FATAL_ERROR, ESR_BUFFER_OVERFLOW, ESR_OPEN_ERROR, ESR_ALREADY_OPEN, ESR_CLOSE_ERROR, ESR_ALREADY_CLOSED, ESR_READ_ERROR, ESR_WRITE_ERROR, ESR_FLUSH_ERROR, ESR_SEEK_ERROR, ESR_OUT_OF_MEMORY, ESR_ARGUMENT_OUT_OF_BOUNDS, ESR_NO_MATCH_ERROR, ESR_INVALID_ARGUMENT, ESR_NOT_SUPPORTED, ESR_INVALID_STATE, ESR_THREAD_CREATION_ERROR, ESR_IDENTIFIER_COLLISION, ESR_TIMED_OUT, ESR_INVALID_RESULT_TYPE, ESR_NOT_IMPLEMENTED, ESR_CONNECTION_RESET_BY_PEER, ESR_PROCESS_CREATE_ERROR, ESR_TTS_NO_ENGINE, ESR_MUTEX_CREATION_ERROR, ESR_DEADLOCK } | 
| Functions | |
| PORTABLE_API const LCHAR * | ESR_rc2str (const ESR_ReturnCode rc) | 
| PORTABLE_API void _cdecl | _penter (void) | 
| PORTABLE_API void _cdecl | _pexit (void) | 
| PORTABLE_API void | swap_byte_order (void *buffer, size_t count, size_t itemSize) | 
| PORTABLE_API ESR_BOOL | isNumber (const LCHAR *text) | 
| #define CHK | ( | rc, | |||
| x | ) | do { if ((rc = (x)) != ESR_SUCCESS) goto CLEANUP; } while (0) | 
Checks the function return-code and if it is not ESR_SUCCESS, returns it.
| #define EXTERN extern | 
Exports C-style symbols; avoids name-mangling.
| #define HAS_ASSERT | 
Checks if platform supports ASSERT.
| #define L | ( | x | ) | x | 
LCHAR version of string-constant
| #define LFPRINTF fprintf | 
Portable fprintf().
| #define LGETENV getenv | 
LCHAR version of getenv()
| #define LISALNUM isalnum | 
LCHAR version of isalnum()
| #define LISALPHA isalpha | 
LCHAR version of isalpha()
| #define LISDIGIT isdigit | 
LCHAR version of isdigit()
| #define LISSPACE | ( | c | ) | isspace((unsigned char) c) | 
LCHAR version of isspace()
| #define LMEMMOVE memmove | 
LCHAR version of memmove()
| #define LOG_10_2 (0.30102999566398) | 
Log of 2 in base 10.
| #define LPRINTF printf | 
Portable printf().
| #define LSPRINTF sprintf | 
Portable sprintf().
| #define LSTRCAT strcat | 
LCHAR version of strcat()
| #define LSTRCHR strchr | 
LCHAR version of strchr()
| #define LSTRCMP strcmp | 
LCHAR version of strcmp()
| #define LSTRCPY strcpy | 
LCHAR version of strcpy()
| #define LSTRCSPN strcspn | 
LCHAR version of strcspn()
| #define LSTRFTIME strftime | 
LCHAR version of strftime()
| #define LSTRLEN strlen | 
LCHAR version of strlen()
| #define LSTRLWR lstrlwr | 
LCHAR version of strlwr() which converts a string to lowercase.
| #define LSTRNCMP strncmp | 
LCHAR version of strncmp()
| #define LSTRNCPY strncpy | 
LCHAR version of strncpy()
| #define LSTRRCHR strrchr | 
LCHAR version of strrchr()
| #define LSTRSTR strstr | 
LCHAR version of strstr()
| #define LSTRTOD strtod | 
LCHAR version of strtod()
| #define LSTRTOK strtok | 
LCHAR version of strtok()
| #define LSTRTOL strtol | 
LCHAR version of strtol()
| #define LSTRTOUL strtoul | 
LCHAR version of strtoul()
| #define LSTRUPR lstrupr | 
LCHAR version of strupr() which converts a string to lowercase.
| #define LTOLOWER tolower | 
Converts LCHAR character to lowercase.
| #define LTOUPPER toupper | 
Converts LCHAR character to uppercase.
| #define MAX_INT_DIGITS ((size_t) (MAX_UINT_DIGITS + 1)) | 
Maximum number of digits used to represent an int as a string in base 10. +1 for sign character [+, -]
| #define MAX_UINT_DIGITS ((size_t) ((CHAR_BIT * sizeof(int) * LOG_10_2) + 1)) | 
Maximum number of digits used to represent an unsigned int as a string in base 10. The +1 is for taking into account the fact that the fractional part is removed and that we really need to take the ceiling.
| #define P_CMDLINE_MAX 4000 | 
Platform-independant maximum command-line length. In reality this value is shell-specific and is around 32k for WindowsNT however we can't spare that much stack-space and we assume such a large value will never actually occur so we settle for 4k instead.
| #define P_PATH_MAX _MAX_PATH | 
Platform-independant maximum filename path length.
| #define passert | ( | exp | ) | assert(exp) | 
Portable assert().
| #define PINLINE _inline | 
Portable 'inline' keyword
| #define psprintf sprintf | 
Portable sprintf().
| #define pvsprintf vsprintf | 
Portable svprintf().
| #define UINT16_TMAX 65535 | 
Maximum value of UINT16_T.
| #define UINT16_TMIN 0 | 
Minimum value of UINT16_T.
| typedef short asr_int16_t | 
Portable 16-bit signed integer.
| typedef int asr_int32_t | 
Portable 32-bit signed integer.
| typedef signed char asr_int8_t | 
Portable 8-bit signed integer.
| typedef unsigned short asr_uint16_t | 
Portable 16-bit unsigned integer.
| typedef unsigned int asr_uint32_t | 
Portable 32-bit unsigned integer.
| typedef unsigned char asr_uint8_t | 
Portable 8-bit unsigned integer.
| typedef enum ESR_ReturnCode_t ESR_ReturnCode | 
Return-code values.
| typedef char LCHAR | 
Locale-independant character.
| typedef int LINT | 
Locale-independant integer-representation of a character. Used by fgetc() and others.
| enum ESR_ReturnCode_t | 
Return-code values.
| PORTABLE_API void _cdecl _penter | ( | void | ) | 
Called before entering any function.
| PORTABLE_API void _cdecl _pexit | ( | void | ) | 
Called after exiting any function.
| PORTABLE_API const LCHAR* ESR_rc2str | ( | const ESR_ReturnCode | rc | ) | 
Given a return-code, returns its string representation.
| rc | Return-code | 
| PORTABLE_API ESR_BOOL isNumber | ( | const LCHAR * | text | ) | 
Indicates if text contains a number (and nothing else).
| text | String to check | 
| PORTABLE_API void swap_byte_order | ( | void * | buffer, | |
| size_t | count, | |||
| size_t | itemSize | |||
| ) | 
Swaps bytes of each item in buffer.
| buffer | Buffer containing items to swap. | |
| count | Number of items to swap. | |
| itemSize | Size of each items. | 
 1.5.3
 1.5.3