Text Manager
[System]


Defines

#define ALP_TEXT_ERR_BUFFER_TOO_BIG   (ALP_CLASS_TEXT | 0x00030000)
 error code: source buffer is too big
#define ALP_TEXT_ERR_BUFFER_TOO_SMALL   (ALP_CLASS_TEXT | 0x00020000)
 error code: source or destination buffer is too small
#define ALP_TEXT_ERR_ILLEGAL_CHARACTER   (ALP_CLASS_TEXT | 0x00010000)
 error code: illegal character in source buffer
#define ALP_TEXT_ERR_ILLEGAL_FORMAT   (ALP_CLASS_TEXT | 0x00060000)
 error code: illegal format
#define ALP_TEXT_ERR_NUMBER_TOO_BIG   (ALP_CLASS_TEXT | 0x00050000)
 error code: number is too large
#define ALP_TEXT_ERR_OUT_OF_MEMORY   (ALP_CLASS_TEXT | 0x00040000)
 error code: out of memory
#define ALP_TEXT_FLAGS_DONT_CONVERT_CHARS   0x0002
 flags: don't silently convert illegal characters to question marks
#define ALP_TEXT_FLAGS_TRIM   0x0001
 flags: trim formatted string

Enumerations

enum  AlpDateFormatType {
  AlpDateFormatMDYWithSlashes, AlpDateFormatDMYWithSlashes, AlpDateFormatDMYWithDots, AlpDateFormatDMYWithDashes,
  AlpDateFormatYMDWithSlashes, AlpDateFormatYMDWithDots, AlpDateFormatYMDWithDashes, AlpDateFormatMDYLongWithComma,
  AlpDateFormatDMYLong, AlpDateFormatDMYLongWithDot, AlpDateFormatDMYLongNoDay, AlpDateFormatDMYLongWithComma,
  AlpDateFormatYMDLongWithDot, AlpDateFormatYMDLongWithSpace, AlpDateFormatMYMed, AlpDateFormatMYMedNoPost,
  AlpDateFormatMDYWithDashes
}
enum  AlpDateTimeFormatType {
  AlpDateTimeFormatDMYShort, AlpDateTimeFormatDMYShortWithDay, AlpDateTimeFormatDMShort, AlpDateTimeFormatDMYLong,
  AlpDateTimeFormatDMYLongWithDay, AlpDateTimeFormatDMLong, AlpDateTimeFormatMYLong, AlpDateTimeFormatHHMM
}
enum  AlpDayDateFormatType {
  AlpDayDateFormatBeginCommaSpace, AlpDayDateFormatBeginNoCommaSpace, AlpDayDateFormatBeginCommaNoSpace, AlpDayDateFormatBeginNoCommaNoSpace,
  AlpDayDateFormatEndCommaSpace, AlpDayDateFormatEndNoCommaSpace, AlpDayDateFormatEndCommaNoSpace, AlpDayDateFormatEndNoCommaNoSpace
}
enum  AlpTextNumberFormatType {
  AlpNumberFormatCommaPeriod, AlpNumberFormatPeriodComma, AlpNumberFormatSpaceComma, AlpNumberFormatApostrophePeriod,
  AlpNumberFormatApostropheComma, AlpNumberFormatSpacePeriod
}
enum  AlpTimeFormatType {
  AlpTimeFormatColon, AlpTimeFormatColonAMPM, AlpTimeFormatColon24h, AlpTimeFormatDot,
  AlpTimeFormatDotAMPM, AlpTimeFormatDot24h, AlpTimeFormatHoursAMPM, AlpTimeFormatHours24h,
  AlpTimeFormatComma24h
}

Functions

alp_status_t alp_txt_dtostr (char *buffer, int buffer_length, double d, int ndigits, int flags)
alp_status_t alp_txt_strfdate_format (char *buffer, int buffer_length, AlpDateFormatType nType, struct tm *pTime, int *length)
alp_status_t alp_txt_strftime (char *buffer, int buffer_length, AlpDateTimeFormatType nType, struct tm *pTime, int *length)
alp_status_t alp_txt_strftime_format (char *buffer, int buffer_length, AlpTimeFormatType nType, struct tm *pTime, int *length)
alp_status_t alp_txt_utf8_from_gsm (unsigned char *src, int slength, unsigned char *dst, int dlength, int *size, int flags)
alp_status_t alp_txt_utf8_from_ucs2 (unsigned char *src, int slength, unsigned char *dst, int dlength, int *size, int flags)
alp_status_t alp_txt_utf8_to_gsm (unsigned char *src, int slength, unsigned char *dst, int dlength, int *size, int flags)
alp_status_t alp_txt_utf8_to_ucs2 (unsigned char *src, int slength, unsigned char *dst, int dlength, int *size, int flags)


Define Documentation

#define ALP_TEXT_ERR_BUFFER_TOO_BIG   (ALP_CLASS_TEXT | 0x00030000)
 

error code: source buffer is too big

#define ALP_TEXT_ERR_BUFFER_TOO_SMALL   (ALP_CLASS_TEXT | 0x00020000)
 

error code: source or destination buffer is too small

#define ALP_TEXT_ERR_ILLEGAL_CHARACTER   (ALP_CLASS_TEXT | 0x00010000)
 

error code: illegal character in source buffer

#define ALP_TEXT_ERR_ILLEGAL_FORMAT   (ALP_CLASS_TEXT | 0x00060000)
 

error code: illegal format

#define ALP_TEXT_ERR_NUMBER_TOO_BIG   (ALP_CLASS_TEXT | 0x00050000)
 

error code: number is too large

#define ALP_TEXT_ERR_OUT_OF_MEMORY   (ALP_CLASS_TEXT | 0x00040000)
 

error code: out of memory

#define ALP_TEXT_FLAGS_DONT_CONVERT_CHARS   0x0002
 

flags: don't silently convert illegal characters to question marks

#define ALP_TEXT_FLAGS_TRIM   0x0001
 

flags: trim formatted string


Enumeration Type Documentation

enum AlpDateFormatType
 

Enumerator:
AlpDateFormatMDYWithSlashes 
AlpDateFormatDMYWithSlashes 
AlpDateFormatDMYWithDots 
AlpDateFormatDMYWithDashes 
AlpDateFormatYMDWithSlashes 
AlpDateFormatYMDWithDots 
AlpDateFormatYMDWithDashes 
AlpDateFormatMDYLongWithComma 
AlpDateFormatDMYLong 
AlpDateFormatDMYLongWithDot 
AlpDateFormatDMYLongNoDay 
AlpDateFormatDMYLongWithComma 
AlpDateFormatYMDLongWithDot 
AlpDateFormatYMDLongWithSpace 
AlpDateFormatMYMed 
AlpDateFormatMYMedNoPost 
AlpDateFormatMDYWithDashes 

enum AlpDateTimeFormatType
 

Enumerator:
AlpDateTimeFormatDMYShort 
AlpDateTimeFormatDMYShortWithDay 
AlpDateTimeFormatDMShort 
AlpDateTimeFormatDMYLong 
AlpDateTimeFormatDMYLongWithDay 
AlpDateTimeFormatDMLong 
AlpDateTimeFormatMYLong 
AlpDateTimeFormatHHMM 

enum AlpDayDateFormatType
 

Enumerator:
AlpDayDateFormatBeginCommaSpace 
AlpDayDateFormatBeginNoCommaSpace 
AlpDayDateFormatBeginCommaNoSpace 
AlpDayDateFormatBeginNoCommaNoSpace 
AlpDayDateFormatEndCommaSpace 
AlpDayDateFormatEndNoCommaSpace 
AlpDayDateFormatEndCommaNoSpace 
AlpDayDateFormatEndNoCommaNoSpace 

enum AlpTextNumberFormatType
 

Enumerator:
AlpNumberFormatCommaPeriod 
AlpNumberFormatPeriodComma 
AlpNumberFormatSpaceComma 
AlpNumberFormatApostrophePeriod 
AlpNumberFormatApostropheComma 
AlpNumberFormatSpacePeriod 

enum AlpTimeFormatType
 

Enumerator:
AlpTimeFormatColon 
AlpTimeFormatColonAMPM 
AlpTimeFormatColon24h 
AlpTimeFormatDot 
AlpTimeFormatDotAMPM 
AlpTimeFormatDot24h 
AlpTimeFormatHoursAMPM 
AlpTimeFormatHours24h 
AlpTimeFormatComma24h 


Function Documentation

alp_status_t alp_txt_dtostr char *  buffer,
int  buffer_length,
double  d,
int  ndigits,
int  flags
 

converts a double to a string

Parameters:
[out] buffer formatted string
[in] buffer_length size of buffer
[in] d double
[in] ndigits precision
[in] flags formatting flags
Returns:
ALP_STATUS_OK success

ALP_TEXT_ERR_BUFFER_TOO_SMALL buffer is too small

ALP_TEXT_ERR_NUMBER_TOO_BIG number is too large

Remarks:
The string is formatted according to the settings in the Format Panel

alp_status_t alp_txt_strfdate_format char *  buffer,
int  buffer_length,
AlpDateFormatType  nType,
struct tm *  pTime,
int *  length
 

convert time struct to a string

Parameters:
[out] buffer formatted string
[in] buffer_length size of buffer
[in] nType type of formatted time
[in] pTime time struct
[out] length size of formatted string (if returns success) or size of needed buffer (if returns buffer too small)
Returns:
ALP_STATUS_OK success

ALP_TEXT_ERR_BUFFER_TOO_SMALL buffer is too small

ALP_TEXT_ERR_ILLEGAL_FORMAT ntype is not a valid AlpDateFormatType

alp_status_t alp_txt_strftime char *  buffer,
int  buffer_length,
AlpDateTimeFormatType  nType,
struct tm *  pTime,
int *  length
 

convert time struct to a string

Parameters:
[out] buffer formatted string
[in] buffer_length size of buffer
[in] nType type of formatted date or time
[in] pTime time struct
[out] length size of formatted string (if returns success) or size of needed buffer (if returns buffer too small)
Returns:
ALP_STATUS_OK success

ALP_TEXT_ERR_BUFFER_TOO_SMALL buffer is too small

ALP_TEXT_ERR_ILLEGAL_FORMAT AlpDateTimeFormatType not compatible with localemgr settings

alp_status_t alp_txt_strftime_format char *  buffer,
int  buffer_length,
AlpTimeFormatType  nType,
struct tm *  pTime,
int *  length
 

convert time struct to a string

Parameters:
[out] buffer formatted string
[in] buffer_length size of buffer
[in] nType type of formatted time
[in] pTime time struct
[out] length size of formatted string (if returns success) or size of needed buffer (if returns buffer too small)
Returns:
ALP_STATUS_OK success

ALP_TEXT_ERR_BUFFER_TOO_SMALL buffer is too small

ALP_TEXT_ERR_ILLEGAL_FORMAT ntype is not a valid AlpTimeFormatType

alp_status_t alp_txt_utf8_from_gsm unsigned char *  src,
int  slength,
unsigned char *  dst,
int  dlength,
int *  size,
int  flags
 

converts a buffer of GSM 0.38 characters to UTF-8 encode unicode characters

Parameters:
[in] src source buffer
[in] slength size in bytes of the source buffer
[out] dst destination buffer
[in] dlength size in bytes of the destination buffer
[out] size number of bytes converted
[in] flags conversion flags
Returns:
ALP_STATUS_OK success

ALP_TEXT_ERR_ILLEGAL_CHARACTER illegal GSM 03.38 character

ALP_TEXT_ERR_BUFFER_TOO_SMALL source or destination buffer is too small

ALP_TEXT_ERR_OUT_OF_MEMORY memory allocation failed

alp_status_t alp_txt_utf8_from_ucs2 unsigned char *  src,
int  slength,
unsigned char *  dst,
int  dlength,
int *  size,
int  flags
 

converts a buffer of UCS-2 characters to UTF-8 encode unicode characters

Parameters:
[in] src source buffer
[in] slength size in bytes of the source buffer
[out] dst destination buffer
[in] dlength size in bytes of the destination buffer
[out] size number of bytes converted
[in] flags conversion flags
Returns:
ALP_STATUS_OK success

ALP_TEXT_ERR_BUFFER_TOO_SMALL source or destination buffer is too small

ALP_TEXT_ERR_OUT_OF_MEMORY memory allocation failed

alp_status_t alp_txt_utf8_to_gsm unsigned char *  src,
int  slength,
unsigned char *  dst,
int  dlength,
int *  size,
int  flags
 

converts a buffer of UTF-8 encoded unicode characters to GSM 03.38

Parameters:
[in] src source buffer
[in] slength size in bytes of the source buffer
[out] dst destination buffer
[in] dlength size in bytes of the destination buffer
[out] size number of bytes converted
[in] flags conversion flags
Returns:
ALP_STATUS_OK success

ALP_TEXT_ERR_ILLEGAL_CHARACTER UTF-8 character could be not convert to GSM 03.38

ALP_TEXT_ERR_BUFFER_TOO_SMALL source or destination buffer is too small

ALP_TEXT_ERR_OUT_OF_MEMORY memory allocation failed

alp_status_t alp_txt_utf8_to_ucs2 unsigned char *  src,
int  slength,
unsigned char *  dst,
int  dlength,
int *  size,
int  flags
 

converts a buffer of UTF-8 encoded unicode characters to UCS-2

Parameters:
[in] src source buffer
[in] slength size in bytes of the source buffer
[out] dst destination buffer
[in] dlength size in bytes of the destination buffer
[out] size number of bytes converted
[in] flags conversion flags
Returns:
ALP_STATUS_OK success

ALP_TEXT_ERR_ILLEGAL_CHARACTER UTF-8 character could be not convert to UCS-2

ALP_TEXT_ERR_BUFFER_TOO_SMALL source or destination buffer is too small

ALP_TEXT_ERR_OUT_OF_MEMORY memory allocation failed


Generated on Wed Jul 30 07:06:44 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.