[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP OpenVMS/Hanzi RTL Chinese Processing (HSY$) Manual


Previous Contents


HSY$CH_CURR

HSY$CH_CURR points to the first byte of the current character.

Format

HSY$CH_CURR str,cur


RETURNS

VMS usage: longword_unsigned
type: longword integer (unsigned)
access: write only
mechanism: by value

The address of the first byte of the current character.


Arguments

str


VMS usage: longword_unsigned
type: longword integer (unsigned)
access: read only
mechanism: by value

The address of the starting position of the input string. Note that this address must be on the proper character boundary, e.g. it should not point to the second byte of a two-byte character.

cur


VMS usage: longword_unsigned
type: longword integer (unsigned)
access: read only
mechanism: by value

The address of the current position of the specified current character. Note that cur may not point to the first byte of a multi-byte character if the current character is a multi-byte character.

Description

This routine provides the function of locating a character pointer on the proper character boundary if the current character is a multi-byte character. It checks if cur is specifying a position before str. It also checks if the current character is a 7-bit or 8-bit control character. In both cases, cur will be returned to the caller.

str can contain one-byte and multi-byte characters.


HSY$CH_NEXT

HSY$CH_NEXT points to the first byte of the next character.

Format

HSY$CH_NEXT cur


RETURNS

VMS usage: longword_unsigned
type: longword integer (unsigned)
access: write only
mechanism: by value

The address of the first byte of the next character.


Arguments

cur


VMS usage: longword_unsigned
type: longword integer (unsigned)
access: read only
mechanism: by value

The address of the first byte of the current character. Note that this character pointer must be on the proper character boundary, e.g. it should not point to the second byte of a two-byte character.

Description

This routine does not check if the next character position contains garbage or if it is passing beyond the buffer end since no buffer end position is specified.


HSY$CH_PREV

HSY$CH_PREV points to the first byte of the previous character.

Format

HSY$CH_PREV str,cur


RETURNS

VMS usage: longword_unsigned
type: longword integer (unsigned)
access: write only
mechanism: by value

The address of the first byte of the previous character.


Arguments

str


VMS usage: longword_unsigned
type: longword integer (unsigned)
access: read only
mechanism: by value

The address of the starting position of the input string. Note that this address must be on the proper character boundary, e.g. it should not point to the second byte of a two-byte character.

cur


VMS usage: longword_unsigned
type: longword integer (unsigned)
access: read only
mechanism: by value

The address of the current position of the current character. Note that this character pointer must be on the proper character boundary, e.g. it should not point to the second byte of a two-byte character.

Description

This routine checks if the previous character position appears before the starting position of the input string. It also checks if the previous character is a 7-bit or 8-bit control character. In both cases, cur will be returned to the caller.

str can contain one-byte and multi-byte characters.


HSY$DX_POS_CURR

HSY$DX_POS_CURR points to the first byte of the current character.

Format

HSY$DX_POS_CURR str,pos


RETURNS

VMS usage: longword_signed
type: longword integer (signed)
access: write only
mechanism: by value

The return byte position.

0 - Procedure completed unsuccessfully.
Non-zero - Byte position from the starting position of the input string that points to the first byte of the current character.

Arguments

str


VMS usage: char_string
type: character string
access: read only
mechanism: by descriptor

Input string.

pos


VMS usage: longword_signed
type: longword integer (signed)
access: read only
mechanism: by reference

Byte position from the starting position of the input string which indicates the position of the current character. Note that this position may not be on the proper character boundary, e.g. it may point to the second byte of a two-byte character.

Description

HSY$DX_POS_CURR lets you position the character pointer at the first byte of a multi-byte character. E.g. if pos is pointing to the second byte of a two-byte character, HSY$DX_POS_CURR will return the byte position of the first byte of the two-byte character.

str can contain one-byte and multi-byte characters.


HSY$DX_POS_NEXT

HSY$DX_POS_NEXT points to the first byte of the next character.

Format

HSY$DX_POS_NEXT str,pos


RETURNS

VMS usage: longword_signed
type: longword integer (signed)
access: write only
mechanism: by value

The return byte position.

0 - Procedure completed unsuccessfully.
Non-zero - Byte position from the starting position of the input string that points to the first byte of the next character.

Arguments

str


VMS usage: char_string
type: character string
access: read only
mechanism: by descriptor

Input string.

pos


VMS usage: longword_signed
type: longword integer (signed)
access: read only
mechanism: by reference

Byte position from the starting position of the input string which indicates the position of the current character. Note that this position need not be on the proper character boundary, e.g. it may point to the second byte of a two-byte character.

Description

This routine allows pos to point at a non-character boundary position. If pos is pointing to the second byte of a two-byte character, the two-byte character will be treated as the current character and the next character will be returned to the caller. This routine does not check if pos is beyond the end of the string.

str can contain one-byte and multi-byte characters.


HSY$DX_POS_PREV

HSY$DX_POS_PREV points to the first byte of the previous character.

Format

HSY$DX_POS_PREV str,pos


RETURNS

VMS usage: longword_signed
type: longword integer (signed)
access: write only
mechanism: by value

The return byte position.

0 - Procedure completed unsuccessfully.
Non-zero - Byte position from the starting position of the specified input string that points to the first byte of the previous character.

Arguments

str


VMS usage: char_string
type: character string
access: read only
mechanism: by descriptor

Input string.

pos


VMS usage: longword_signed
type: longword integer (signed)
access: read only
mechanism: by reference

Byte position from the starting position of the specified input string which indicates the position of the current character. Note that this position need not be on the proper character boundary, e.g. it may point to the second byte of a two-byte character.

Description

This routine allows pos to point at a non-character boundary position. If pos is pointing to the second byte of a two-byte character, the two-byte character will be treated as the current character and the previous character will be returned to the caller. This routine does not check if pos is beyond the end of the string.

str can contain one-byte and multi-byte characters.


HSY$DX_SKPC

HSY$DX_SKPC skips a specified character.

Format

HSY$DX_SKPC chr,str


RETURNS

VMS usage: longword_signed
type: longword integer (signed)
access: write only
mechanism: by value

The return byte position.

0 - Either all characters in the input string are equal to the specified character or procedure is completed unsuccessfully due to corrupted input descriptor.
Non-zero - Byte position from the starting position of the input string that points to the first character that does not match chr.

Arguments

chr


VMS usage: char_string
type: character string
access: read only
mechanism: by descriptor

The specified input character to be skipped.

str


VMS usage: char_string
type: character string
access: read only
mechanism: by descriptor

Input string.

Description

This routine skips the specified character chr at the start of the input string str. The position of the first character that does not match with the specified character chr will be returned to the caller.

str and chr can contain one-byte and multi-byte characters. If chr contains more than one characters, only the first character specified by the descriptor will be used.


HSY$POS_CURR

HSY$POS_CURR points to the first byte of the current character.

Format

HSY$POS_CURR str,cur,end


RETURNS

VMS usage: longword_unsigned
type: longword integer (unsigned)
access: write only
mechanism: by value

The address of the first byte of the current character.


Arguments

str


VMS usage: longword_unsigned
type: longword integer (unsigned)
access: read only
mechanism: by value

The address of the starting position of the input string. Note that this address must be on the proper character boundary, e.g. it should not point to the second byte of a two-byte character.

cur


VMS usage: longword_unsigned
type: longword integer (unsigned)
access: read only
mechanism: by value

The address of the current position of the specified current character. Note that this character pointer may not be on the proper character boundary, e.g. it may point to the second byte of a two-byte character.

end


VMS usage: longword_unsigned
type: longword integer (unsigned)
access: read only
mechanism: by value

The address of the string terminating position plus one as illustrated below:



 +---+---+          +---+---+---+
 |   |   |  ......  |   |   |   |
 +---+---+          +---+---+---+
  ^                              ^
 str                            end

Description

This routine provides the function of locating a character pointer on the proper character boundary of a multi-byte character.

str can contain one-byte and multi-byte characters.


HSY$POS_NEXT

HSY$POS_NEXT points to the first byte of the next character.

Format

HSY$POS_NEXT cur,end


RETURNS

VMS usage: longword_unsigned
type: longword integer (unsigned)
access: write only
mechanism: by value

The address of the first byte of the next character.


Arguments

cur


VMS usage: longword_unsigned
type: longword integer (unsigned)
access: read only
mechanism: by value

The address of the current position of the specified current character. Note that this address must be on the proper character boundary, e.g. it should not point to the second byte of a two-byte character.

end


VMS usage: longword_unsigned
type: longword integer (unsigned)
access: read only
mechanism: by value

The address of the string terminating position plus one as illustrated below:



   +---+---+---+---+
.. |   |   |   |   |
   +---+---+---+---+
 string             ^
                   end

Description

This routine provides more checking than HSY$CH_NEXT. If cur is greater than or equal to end, cur will be returned to the caller. If cur is pointing at a single-byte 7-bit or 8-bit control character, cur+1 will be returned. If cur is pointing at a 8-bit character which is at the end of the input string, end will be returned. In general, if cur is pointing at an invalid character (e.g. a single 8-bit followed by a control character), it will skip the invalid character and return the next character positon.

str can contain one-byte and multi-byte characters.


HSY$POS_PREV

HSY$POS_PREV points to the first byte of the previous character.

Format

HSY$POS_PREV str,cur,end


RETURNS

VMS usage: longword_unsigned
type: longword integer (unsigned)
access: write only
mechanism: by value

The address of the previous character of the specified current character.


Arguments

str


VMS usage: longword_unsigned
type: longword integer (unsigned)
access: read only
mechanism: by value

The address of the starting position of the input string. Note that this address must be on the proper byte boundary, e.g. it should not point to the second byte of a two-byte character.

cur


VMS usage: longword_unsigned
type: longword integer (unsigned)
access: read only
mechanism: by value

The address of the current position of the string. Note that this character pointer must be on the proper character boundary, e.g. it should not point to the second byte of a two-byte character.

end


VMS usage: longword_unsigned
type: longword integer (unsigned)
access: read only
mechanism: by value

The address of the string terminating position plus one as illustrated below:


+---+---+          +---+---+---+
|   |   |  ......  |   |   |   |
+---+---+          +---+---+---+
  ^                              ^
 str                            end


Description

This routine provides more checking than HSY$CH_PREV. If cur is outside the range of the string as specified by str and end, no previous character position will be returned. Instead, cur will be returned to the caller.

str can contain one-byte and multi-byte characters.


Previous Next Contents