/********************************************************************************************************************************/ /* Created: 9-Mar-2021 22:28:08 by OpenVMS SDL EV3-3 */ /* Source: 24-AUG-2005 09:35:46 $1$DGA8085:[STARLET.SRC]STR$ROUTINES.SDL;1 */ /********************************************************************************************************************************/ /*** MODULE str$routines ***/ #ifndef __STR_ROUTINES_LOADED #define __STR_ROUTINES_LOADED 1 #pragma __nostandard /* This file uses non-ANSI-Standard features */ #pragma __member_alignment __save #pragma __nomember_alignment #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __save /* Save the previously-defined required ptr size */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif #ifdef __cplusplus extern "C" { #define __unknown_params ... #define __optional_params ... #else #define __unknown_params #define __optional_params ... #endif #ifndef __struct #if !defined(__VAXC) #define __struct struct #else #define __struct variant_struct #endif #endif #ifndef __union #if !defined(__VAXC) #define __union union #else #define __union variant_union #endif #endif /**************************************************************************** */ /* * */ /* COPYRIGHT (c) 1988, 1994, 1995 BY * */ /* DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS. * */ /* ALL RIGHTS RESERVED. * */ /* * */ /* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED * */ /* ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE * */ /* INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER * */ /* COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY * */ /* OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY * */ /* TRANSFERRED. * */ /* * */ /* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE * */ /* AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT * */ /* CORPORATION. * */ /* * */ /* DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS * */ /* SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. * */ /* * */ /* * */ /**************************************************************************** */ #ifdef __INITIAL_POINTER_SIZE #pragma __required_pointer_size __long #endif /* STR$ADD */ /* */ /* Add Two Decimal Strings */ /* */ /* The Add Two Decimal Strings routine */ /* adds two decimal strings of digits. */ /* */ #define str$add STR$ADD #ifdef __NEW_STARLET unsigned int str$add( unsigned int *asign, int *aexp, void *adigits, unsigned int *bsign, int *bexp, void *bdigits, unsigned int *csign, int *cexp, void *cdigits); #else /* __OLD_STARLET */ unsigned int str$add(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$ANALYZE_SDESC */ /* */ /* Analyze String Descriptor */ /* */ /* The Analyze String Descriptor routine extracts the */ /* length and starting address of the data */ /* for a variety of string descriptor classes. */ /* */ #define str$analyze_sdesc STR$ANALYZE_SDESC #ifdef __NEW_STARLET unsigned short int str$analyze_sdesc( void *input_descriptor, unsigned short int *word_integer_length, void *data_address); #else /* __OLD_STARLET */ unsigned short int str$analyze_sdesc(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$ANALYZE_SDESC_64 */ /* */ /* Analyze String Descriptor (quadword output parameters) */ /* */ /* The Analyze String Descriptor routine extracts the */ /* length and starting address of the data */ /* for a variety of string descriptor classes. */ /* */ #define str$analyze_sdesc_64 STR$ANALYZE_SDESC_64 #ifdef __NEW_STARLET unsigned int str$analyze_sdesc_64( void *input_descriptor, unsigned __int64 *quad_integer_length, void *(*(data_address)), __optional_params); #else /* __OLD_STARLET */ unsigned int str$analyze_sdesc_64(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$APPEND */ /* */ /* Append String */ /* */ /* The Append String routine appends a source string to the end of a */ /* destination string. The destination string must be a dynamic or */ /* varying-length string. */ /* */ #define str$append STR$APPEND #ifdef __NEW_STARLET unsigned int str$append( void *destination_string, void *source_string); #else /* __OLD_STARLET */ unsigned int str$append(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$CASE_BLIND_COMPARE */ /* */ /* Compare Strings Without Regard to Case */ /* */ /* The Compare Strings Without Regard to Case routine compares two input */ /* strings of any supported class and data type without regard to whether */ /* the alphabetic characters are uppercase or lowercase. */ /* */ #define str$case_blind_compare STR$CASE_BLIND_COMPARE #ifdef __NEW_STARLET int str$case_blind_compare( void *first_source_string, void *second_source_string); #else /* __OLD_STARLET */ int str$case_blind_compare(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$COMPARE */ /* */ /* Compare Two Strings */ /* */ /* The Compare Two Strings routine compares the */ /* contents of two strings. */ /* */ #define str$compare STR$COMPARE #ifdef __NEW_STARLET int str$compare( void *first_source_string, void *second_source_string); #else /* __OLD_STARLET */ int str$compare(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$COMPARE_EQL */ /* */ /* Compare Two Strings for Equality */ /* */ /* The Compare Two Strings for Equality routine, compares two */ /* strings to see if they have the same length and contents. */ /* Uppercase and lowercase characters are not considered equal. */ /* */ #define str$compare_eql STR$COMPARE_EQL #ifdef __NEW_STARLET unsigned int str$compare_eql( void *first_source_string, void *second_source_string); #else /* __OLD_STARLET */ unsigned int str$compare_eql(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$COMPARE_MULTI */ /* */ /* Compare Two Strings for Equality Using Multinational Character Set */ /* */ /* The Compare Two Strings for Equality Using Multinational Character */ /* Set routine compares two character strings for equality using the */ /* DEC Multinational character set. */ /* */ #define str$compare_multi STR$COMPARE_MULTI #ifdef __NEW_STARLET int str$compare_multi( void *first_source_string, void *second_source_string, __optional_params ); #else /* __OLD_STARLET */ int str$compare_multi(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$CONCAT */ /* */ /* Concatenate Two or More Strings */ /* */ /* The Concatenate Two or More Strings routine concatenates all specified */ /* source strings into a single destination string. */ /* */ #define str$concat STR$CONCAT #ifdef __NEW_STARLET unsigned int str$concat( void *destination_string, void *source_string_1, __optional_params); #else /* __OLD_STARLET */ unsigned int str$concat(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$COPY_DX */ /* */ /* Copy a Source String Passed by Descriptor to a Destination String */ /* */ /* The Copy a Source String Passed by Descriptor to */ /* a Destination String routine copies a source string to */ /* a destination string. Both strings are */ /* passed by descriptor. */ /* */ #define str$copy_dx STR$COPY_DX #ifdef __NEW_STARLET unsigned int str$copy_dx( void *destination_string, void *source_string); #else /* __OLD_STARLET */ unsigned int str$copy_dx(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$COPY_R */ /* */ /* Copy a Source String Passed by Reference to a Destination String */ /* */ /* The Copy a Source String Passed by Reference to a Destination String */ /* routine copies a source string passed by reference to a destination */ /* string. */ /* */ #define str$copy_r STR$COPY_R #ifdef __NEW_STARLET unsigned int str$copy_r( void *destination_string, unsigned short int *word_integer_source_length, char *source_string_address); #else /* __OLD_STARLET */ unsigned int str$copy_r(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$COPY_R_64 */ /* */ /* Copy a Source String Passed by Reference to a Destination String */ /* */ /* The Copy a Source String Passed by Reference to a Destination String */ /* routine copies a source string passed by reference to a destination */ /* string. */ /* */ #define str$copy_r_64 STR$COPY_R_64 #ifdef __NEW_STARLET unsigned int str$copy_r_64( void *destination_string, unsigned __int64 *quad_integer_source_length, char *source_string_address); #else /* __OLD_STARLET */ unsigned int str$copy_r_64(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$DIVIDE */ /* */ /* Divide Two Decimal Strings */ /* */ /* The Divide Two Decimal Strings routine divides two decimal strings. */ /* */ #define str$divide STR$DIVIDE #ifdef __NEW_STARLET unsigned int str$divide( unsigned int *asign, int *aexp, void *adigits, unsigned int *bsign, int *bexp, void *bdigits, int *total_digits, unsigned int *round_truncate_indicator, unsigned int *csign, int *cexp, void *cdigits); #else /* __OLD_STARLET */ unsigned int str$divide(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$DUPL_CHAR */ /* */ /* Duplicate Character Times */ /* */ /* The Duplicate Character empty Times routine generates a string */ /* containing n duplicates of the input character. If the destination */ /* string is an empty dynamic string descriptor, STR$DUPL_CHAR will */ /* allocate and initialize the string. */ /* */ #define str$dupl_char STR$DUPL_CHAR #ifdef __NEW_STARLET unsigned int str$dupl_char( void *destination_string, __optional_params ); #else /* __OLD_STARLET */ unsigned int str$dupl_char(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$ELEMENT */ /* */ /* Extract Delimited Element Substring */ /* */ /* The Extract Delimited Element Substring routine extracts an */ /* element from a string in which the elements are separated */ /* by a specified delimiter. */ /* */ #define str$element STR$ELEMENT #ifdef __NEW_STARLET unsigned int str$element( void *destination_string, int *element_number, void *delimiter_string, void *source_string); #else /* __OLD_STARLET */ unsigned int str$element(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$FIND_FIRST_IN_SET */ /* */ /* Find First Character in a Set of Characters */ /* */ /* The Find First Character in a Set of Characters routine searches a */ /* string one character at a time, from left to right, comparing each */ /* character in the string to every character in a specified set of */ /* characters for which it is searching. */ /* */ #define str$find_first_in_set STR$FIND_FIRST_IN_SET #ifdef __NEW_STARLET int str$find_first_in_set( void *source_string, void *set_of_characters); #else /* __OLD_STARLET */ int str$find_first_in_set(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$FIND_FIRST_NOT_IN_SET */ /* */ /* Find First Character that Does Not Occur in Set */ /* */ /* The Find First Character that Does Not Occur in Set routine searches */ /* a string, comparing each character to the characters in a specified */ /* set of characters. The string is searched character by character, */ /* from left to right. STR$FIND_FIRST_NOT_IN_SET returns the position of */ /* the first character in the string that does not match any of the */ /* characters in the selected set of characters. */ /* */ #define str$find_first_not_in_set STR$FIND_FIRST_NOT_IN_SET #ifdef __NEW_STARLET int str$find_first_not_in_set( void *source_string, void *set_of_characters); #else /* __OLD_STARLET */ int str$find_first_not_in_set(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$FIND_FIRST_SUBSTRING */ /* */ /* Find First Substring in Input String */ /* */ /* The Find First Substring in Input String routine */ /* finds the first substring (in a provided list of */ /* substrings) occurring in a given string. */ /* */ #define str$find_first_substring STR$FIND_FIRST_SUBSTRING #ifdef __NEW_STARLET unsigned int str$find_first_substring( void *source_string, int *index, int *substring_index, __optional_params); #else /* __OLD_STARLET */ unsigned int str$find_first_substring(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$FREE1_DX */ /* */ /* Free One Dynamic String */ /* */ /* The Free One Dynamic String routine deallocates one dynamic string. */ /* */ #define str$free1_dx STR$FREE1_DX #ifdef __NEW_STARLET unsigned int str$free1_dx( void *string_descriptor); #else /* __OLD_STARLET */ unsigned int str$free1_dx(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$GET1_DX */ /* */ /* Allocate One Dynamic String */ /* */ /* The Allocate One Dynamic String routine allocates a specified number */ /* of bytes of dynamic virtual memory to a specified dynamic string */ /* descriptor. */ /* */ #define str$get1_dx STR$GET1_DX #ifdef __NEW_STARLET unsigned int str$get1_dx( unsigned short int *word_integer_length, void *character_string); #else /* __OLD_STARLET */ unsigned int str$get1_dx(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$GET1_DX_64 */ /* */ /* Allocate One Dynamic String (quadword parameter) */ /* */ /* The Allocate One Dynamic String routine allocates a specified number */ /* of bytes of dynamic virtual memory to a specified dynamic string */ /* descriptor. */ /* */ #define str$get1_dx_64 STR$GET1_DX_64 #ifdef __NEW_STARLET unsigned int str$get1_dx_64( unsigned __int64 *quad_integer_length, void *character_string); #else /* __OLD_STARLET */ unsigned int str$get1_dx_64(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$LEFT */ /* */ /* Extract a Substring of a String */ /* */ /* The Extract a Substring of a String routine copies a substring of a */ /* source string into a destination string. The relative starting */ /* position in the source string is 1. */ /* */ #define str$left STR$LEFT #ifdef __NEW_STARLET unsigned int str$left( void *destination_string, void *source_string, int *end_position); #else /* __OLD_STARLET */ unsigned int str$left(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$LEN_EXTR */ /* */ /* Extract a Substring of a String */ /* */ /* The Extract a Substring of a String routine copies a substring of */ /* a source string into a destination string. */ /* */ #define str$len_extr STR$LEN_EXTR #ifdef __NEW_STARLET unsigned int str$len_extr( void *destination_string, void *source_string, int *start_position, int *longword_integer_length); #else /* __OLD_STARLET */ unsigned int str$len_extr(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$MATCH_WILD */ /* */ /* Match Wildcard Specification */ /* */ /* The Match Wildcard Specification routine is used to compare a pattern */ /* string that includes wildcard characters with a candidate string. It */ /* returns a condition value of STR$_MATCH if the strings match and */ /* line_break STR$_NOMATCH if they do not match. */ /* */ #define str$match_wild STR$MATCH_WILD #ifdef __NEW_STARLET unsigned int str$match_wild( void *candidate_string, void *pattern_string); #else /* __OLD_STARLET */ unsigned int str$match_wild(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$MUL */ /* */ /* Multiply Two Decimal Strings */ /* */ /* The Multiply Two Decimal Strings routine multiplies two decimal strings. */ /* */ #define str$mul STR$MUL #ifdef __NEW_STARLET unsigned int str$mul( unsigned int *asign, int *aexp, void *adigits, unsigned int *bsign, int *bexp, void *bdigits, unsigned int *csign, int *cexp, void *cdigits); #else /* __OLD_STARLET */ unsigned int str$mul(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$POSITION */ /* */ /* Return Relative Position of Substring */ /* */ /* The Return Relative Position of Substring routine searches for the */ /* first occurrence of a single substring within a source string. If */ /* STR$POSITION finds the substring, it returns the relative position */ /* of that substring. If the substring is not found, STR$POSITION */ /* returns a zero. */ /* */ #define str$position STR$POSITION #ifdef __NEW_STARLET unsigned int str$position( void *source_string, void *substring, __optional_params); #else /* __OLD_STARLET */ unsigned int str$position(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$POS_EXTR */ /* */ /* Extract a Substring of a String */ /* */ /* The Extract a Substring of a String routine copies a substring of a */ /* source string into a destination string. */ /* */ #define str$pos_extr STR$POS_EXTR #ifdef __NEW_STARLET unsigned int str$pos_extr( void *destination_string, void *source_string, int *start_position, int *end_position); #else /* __OLD_STARLET */ unsigned int str$pos_extr(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$PREFIX */ /* */ /* Prefix a String */ /* */ /* The Prefix a String routine inserts a source string at the */ /* beginning of a destination string. The destination string */ /* must be dynamic or varying length. */ /* */ #define str$prefix STR$PREFIX #ifdef __NEW_STARLET unsigned int str$prefix( void *destination_string, void *source_string); #else /* __OLD_STARLET */ unsigned int str$prefix(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$RECIP */ /* */ /* Reciprocal of a Decimal String */ /* */ /* The Reciprocal of a Decimal String routine takes the reciprocal of the */ /* first decimal string to the precision limit specified by the second */ /* decimal string and returns the result as a decimal string. */ /* */ #define str$recip STR$RECIP #ifdef __NEW_STARLET unsigned int str$recip( unsigned int *asign, int *aexp, void *adigits, unsigned int *bsign, int *bexp, void *bdigits, unsigned int *csign, int *cexp, void *cdigits); #else /* __OLD_STARLET */ unsigned int str$recip(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$REPLACE */ /* */ /* Replace a Substring */ /* */ /* The Replace a Substring routine copies a source string to a */ /* destination string, replacing part of the string with another */ /* string. The substring to be replaced is specified by its starting */ /* and ending positions. */ /* */ #define str$replace STR$REPLACE #ifdef __NEW_STARLET unsigned int str$replace( void *destination_string, void *source_string, int *start_position, int *end_position, void *replacement_string); #else /* __OLD_STARLET */ unsigned int str$replace(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$RIGHT */ /* */ /* Extract a Substring of a String */ /* */ /* The Extract a Substring of a String routine copies a substring */ /* of a source string into a destination string. */ /* */ #define str$right STR$RIGHT #ifdef __NEW_STARLET unsigned int str$right( void *destination_string, void *source_string, int *start_position); #else /* __OLD_STARLET */ unsigned int str$right(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$ROUND */ /* */ /* Round or Truncate a Decimal String */ /* */ /* The Round or Truncate a Decimal String routine rounds or truncates a */ /* decimal string to a specified number of significant digits and places */ /* the result in another decimal string. */ /* */ #define str$round STR$ROUND #ifdef __NEW_STARLET unsigned int str$round( int *places, unsigned int *flags, unsigned int *asign, int *aexp, void *adigits, unsigned int *csign, int *cexp, void *cdigits); #else /* __OLD_STARLET */ unsigned int str$round(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$TRANSLATE */ /* */ /* Translate Matched Characters */ /* */ /* The Translate Matched Characters routine successively compares each */ /* character in a source string to all characters in a match string. */ /* If a source character has a match, the destination character is taken */ /* from the translate string. Otherwise, STR$TRANSLATE moves the source */ /* character to the destination string. */ /* */ #define str$translate STR$TRANSLATE #ifdef __NEW_STARLET unsigned int str$translate( void *destination_string, void *source_string, void *translation_string, void *match_string); #else /* __OLD_STARLET */ unsigned int str$translate(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$TRIM */ /* */ /* Trim Trailing Blanks and Tabs */ /* */ /* The Trim Trailing Blanks and Tabs routine copies a source string */ /* to a destination string and deletes the trailing blank and tab */ /* characters. */ /* */ #define str$trim STR$TRIM #ifdef __NEW_STARLET unsigned int str$trim( void *destination_string, void *source_string, __optional_params); #else /* __OLD_STARLET */ unsigned int str$trim(__unknown_params); #endif /* #ifdef __NEW_STARLET */ /* STR$UPCASE */ /* */ /* Convert String to All Uppercase Characters */ /* */ /* The Convert String to All Uppercase Characters routine */ /* converts a source string to uppercase. */ /* */ #define str$upcase STR$UPCASE #ifdef __NEW_STARLET unsigned int str$upcase( void *destination_string, void *source_string); #else /* __OLD_STARLET */ unsigned int str$upcase(__unknown_params); #endif /* #ifdef __NEW_STARLET */ #pragma __member_alignment __restore #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __restore /* Restore the previously-defined required ptr size */ #endif #ifdef __cplusplus } #endif #pragma __standard #endif /* __STR_ROUTINES_LOADED */