  | 
		
HP OpenVMS/Hanzi RTL Chinese Processing (HSY$)
Manual
 
 
 
HSY$LOCC
 
HSY$LOCC locates the position of the first occurrence of the specified
character.
 
 
Format
HSY$LOCC chr,str,len
  
 
RETURNS
  
    | 
      VMS usage:
     | 
    
      longword_unsigned
     | 
   
  
    | 
      type:
     | 
    
      longword integer (unsigned)
     | 
   
  
    | 
      access:
     | 
    
      write only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
The returned character pointer.
  
  
    | 
      0
     | 
    
      -
     | 
    
       No such character found in the specified string.
     | 
   
  
    | 
      Non-zero
     | 
    
       -
     | 
    
      The address of the position of the first occurrence of the specified
      character found in the input string.
     | 
   
 
 
Arguments
chr
 
  
    | 
      VMS usage:
     | 
    
      longword_unsigned
     | 
   
  
    | 
      type:
     | 
    
      longword integer (unsigned)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
       The specified character to be located in the input string.
str
 
  
    | 
      VMS usage:
     | 
    
      longword_unsigned
     | 
   
  
    | 
      type:
     | 
    
      longword integer (unsigned)
     | 
   
  
    | 
      access:
     | 
    
      modify
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
        The address of the starting position of the input string.
len
 
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
       The length in bytes of the input string.
 
 
Description
chr can either be one-byte or multi-byte character.
 
  
HSY$POSITION
 
HSY$POSITION searches the first occurrence of a specified substring in
the input string.
 
 
Format
HSY$POSITION str,str-len,sub-str,sub-str-len
  
 
RETURNS
  
    | 
      VMS usage:
     | 
    
      longword_unsigned
     | 
   
  
    | 
      type:
     | 
    
      longword integer (unsigned)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
The return address.
  
  
    | 
      0
     | 
    
      -
     | 
    
      The specified substring is not found in the input string.
     | 
   
  
    | 
      Non-zero
     | 
    
       -
     | 
    
      The address of the starting position of the substring located in the
      input string.
     | 
   
 
 
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.
str-len
 
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
        The length in bytes of str.
sub-str
 
  
    | 
      VMS usage:
     | 
    
      longword_unsigned
     | 
   
  
    | 
      type:
     | 
    
      longword integer (unsigned)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
The address of the starting position of the specified substring to be
located.
sub-str-len
 
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
The length in bytes of sub-str.
 
 
Description
str and sub-str can contain one-byte
and multi-byte characters.
 
  
HSY$STR_SEARCH
 
HSY$STR_SEARCH searches the first occurrence of a specified substring
in the input string with conversion performed prior to comparing the
characters.
 
 
Format
HSY$STR_SEARCH str,str-len,sub-str,sub-str-len,   [conv-flag]
  
 
RETURNS
  
    | 
      VMS usage:
     | 
    
      longword_unsigned
     | 
   
  
    | 
      type:
     | 
    
      longword integer (unsigned)
     | 
   
  
    | 
      access:
     | 
    
      write only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
The return address.
  
  
    | 
      0
     | 
    
       -
     | 
    
       The specified substring is not found in the input string.
     | 
   
  
    | 
      Non-zero
     | 
    
       -
     | 
    
       The address of the starting position of the substring located in the
       input string.
     | 
   
 
 
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.
str-len
 
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
     The length in bytes of str.
sub-str
 
  
    | 
      VMS usage:
     | 
    
      longword_unsigned
     | 
   
  
    | 
      type:
     | 
    
      longword integer (unsigned)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
     The address of the starting position of the specified substring.
sub-str-len
 
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
     The length in bytes of sub-str.
conv-flag
 
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
 Conversion flag indicating what conversion is done before comparing the
 characters. Only bit 0 to bit 2 of this flag are used.
  
    | 
      Bit 0 = 0:
     | 
    
       Performs uppercasing conversion. Uppercasing can be done to both full
       form and half form letters.
     | 
   
  
    | 
      Bit 1 = 0:
     | 
    
       Performs full form to half form conversion.
     | 
   
  
    | 
      Bit 2 = 0:
     | 
    
       Performs Kana to Hiragana conversion. This is only valid for Japanese
       Kana characters.
     | 
   
 
No conversion will be done prior to comparing the characters if this
optional parameter is not specified.
 
 
Description
str and sub-str can contain one-byte
and multi-byte characters.
 
  
HSY$STR_START
 
HSY$STR_START checks if the specified substring is found in another
input string and starts from the first byte of the input string.
 
 
Format
HSY$STR_START str,str-len,sub-str,sub-str-len,   [conv-flag]
  
 
RETURNS
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      write only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
The returned status.
  
  
    | 
      0 -
     | 
    
       Cannot find the substring starting from the start of the input string.
     | 
   
  
    | 
      1 -
     | 
    
       Finds the substring starting from the start of the input string.
     | 
   
 
 
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.
str-len
 
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
The length in bytes of the str.
sub-str
 
  
    | 
      VMS usage:
     | 
    
      longword_unsigned
     | 
   
  
    | 
      type:
     | 
    
      longword integer (unsigned)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
The address of the starting position of the substring.
sub-str-len
 
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
The length in bytes of sub-str.
conv-flag
 
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
Conversion flag indicating what conversion is done before comparing the
characters. Only bit 0 to bit 2 of this flag is used.
  
    | 
      Bit 0 = 0:
     | 
    
       Performs uppercasing conversion. Uppercasing can be done to both full
       form and half form letters.
     | 
   
  
    | 
      Bit 1 = 0:
     | 
    
       Performs full form to half form conversion.
     | 
   
  
    | 
      Bit 2 = 0:
     | 
    
       Performs Kana to Hiragana conversion. This is only valid for Japanese
       Kana characters.
     | 
   
 
No conversion will be done prior to comparing the characters if this
optional parameter is not specified.
 
 
Description
str and sub-str can contain one-byte
and multi-byte characters.
 
  
HSY$CH_NBYTE
 
HSY$CH_NBYTE counts the number of bytes of a character string.
 
 
Format
HSY$CH_NBYTE str,nof-chr
  
 
RETURNS
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      write only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
The number of bytes counted in the specified number of characters.
  
 
Arguments
str
 
  
    | 
      VMS usage:
     | 
    
      longword_unsigned
     | 
   
  
    | 
      type:
     | 
    
      longword integer (unsigned)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
The address of the starting position of the specified string.
nof-chr
 
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
The number of characters to be scanned from the starting position of
the input string for counting the number of bytes.
 
 
Description
The routine accepts the number of characters and returns the number of
bytes contained in the string of characters.
 
  
HSY$CH_NCHAR
 
HSY$CH_NCHAR returns the number of characters in a specified string.
 
 
Format
HSY$CH_NCHAR str,len
  
 
RETURNS
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      write only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
The number of characters in the specified string.
  
 
Arguments
str
 
  
    | 
      VMS usage:
     | 
    
      longword_unsigned
     | 
   
  
    | 
      type:
     | 
    
      longword integer (unsigned)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
The address of the starting position of the specified 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.
len
 
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
The length in byte of the specified string.
 
 
Description
This routine returns the number of characters found in the input string
up to the position specified by len. All one-byte
7-bit control characters and one-byte 8-bit characters (e.g. an 8-bit
character followed by a 7-bit control character) are treated as a
character. If the last character specified by len is a
multi-byte character with its last byte located beyond the input string
terminating position as specified by len, this
multi-byte character is also counted by the routine.
 
  
HSY$CH_SIZE
 
HSY$CH_SIZE tells the byte length of the specified character.
 
 
Format
HSY$CH_SIZE chr
  
 
RETURNS
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      write only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
The size in bytes of the specified character.
  
 
Arguments
chr
 
  
    | 
      VMS usage:
     | 
    
      longword_unsigned
     | 
   
  
    | 
      type:
     | 
    
      longword integer (unsigned)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
Input character.
 
 
Description
This routine returns the number of bytes of the specified character. If
the character is an ASCII character, 1 will be returned. If it is a
multi-byte character, the number of bytes of the character will be
returned.
 
  
HSY$DX_NOF_BYTE
 
HSY$DX_NOF_BYTE counts the number of bytes of a character string.
 
 
Format
HSY$DX_NOF_BYTE str,nof-chr
  
 
RETURNS
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      write only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
The returned number of bytes.
  
  
    | 
      0
     | 
    
       -
     | 
    
      Procedure completed unsuccessfully due to either invalid descriptor
      specified or
      nof-chr less than 1.
     | 
   
  
    | 
      Non-zero
     | 
    
       -
     | 
    
       The number of bytes.
     | 
   
 
 
Arguments
str
 
  
    | 
      VMS usage:
     | 
    
      char_string
     | 
   
  
    | 
      type:
     | 
    
      character string
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by descriptor
     | 
   
 
 
Input string.
nof-chr
 
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by reference
     | 
   
 
 
The number of characters to be scanned from the starting position of
the input string for counting the number of bytes.
 
 
Description
This routine accepts the number of characters and returns the number of
bytes contained in the string of characters.
 
  
HSY$DX_NOF_CHAR
 
HSY$DX_NOF_CHAR returns the number of characters in a specified number
of bytes.
 
 
Format
HSY$DX_NOF_CHAR str
  
 
RETURNS
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      write only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
The returned number of characters.
  
  
    | 
      0
     | 
    
       -
     | 
    
       Procedure completed unsuccessfully due to either invalid descriptor
       specified or
      nof-chr less than 1.
     | 
   
  
    | 
      Non-zero
     | 
    
       -
     | 
    
      The number of characters.
     | 
   
 
 
Arguments
str
 
  
    | 
      VMS usage:
     | 
    
      char_string
     | 
   
  
    | 
      type:
     | 
    
      character string
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by descriptor
     | 
   
 
 
Input string.
 
 
Description
This routine returns the number of characters found in the input string
up to the position specified by the length field of the descriptor. All
one-byte 7-bit control characters and one-byte 8-bit characters (e.g.
an 8-bit character followed by a 7-bit control character) are treated
as a character. If the last character specified by the length field of
the descriptor is a multi-byte character with its last byte located
beyond the input string terminating position, this multi-byte character
is also counted by the routine.
 
  
HSY$IS_ALPHA
 
HSY$IS_ALPHA checks if the input character is a Greek, Russian or Roman
letter.
 
 
Format
HSY$IS_ALPHA chr
  
 
RETURNS
  
    | 
      VMS usage:
     | 
    
      longword_signed
     | 
   
  
    | 
      type:
     | 
    
      longword integer (signed)
     | 
   
  
    | 
      access:
     | 
    
      write only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
The returned flag.
  
  
    | 
      0 -
     | 
    
      The input character is not a letter character.
     | 
   
  
    | 
      1 -
     | 
    
      The input character is a letter character.
     | 
   
 
Note that "letter character" here means one of the following:
 
  
    | 
      (1)
     | 
    
      one-byte English letter
     | 
   
  
    | 
      (2)
     | 
    
      multi-byte English letter
     | 
   
  
    | 
      (3)
     | 
    
      multi-byte Greek letter
     | 
   
  
    | 
      (4)
     | 
    
      multi-byte Russian letter
     | 
   
 
 
Arguments
chr
 
  
    | 
      VMS usage:
     | 
    
      longword_unsigned
     | 
   
  
    | 
      type:
     | 
    
      longword integer (unsigned)
     | 
   
  
    | 
      access:
     | 
    
      read only
     | 
   
  
    | 
      mechanism:
     | 
    
      by value
     | 
   
 
 
Input character.
 
 
Description
None.
 
 
  
  
		 |