README100644 765 144 3540 6232517321 10462 0ustar kevinusersThis directory contains files implementing some of the VMS 'str$' functions. This is a preliminary release so that anyone can test what is there, but a lot is missing yet. I've never used many of the classes available, so some of the handling for them is probibly very wrong. I've only places a couple of hours on this, so it is very minimal yet. Question: How van yo do a variable arguement list like in VMS using standard C? The only method available (stdarg.h) assumes that the functon can determine how many parameters (and what kind) will be available. All funcitons that haven't been implemented yet are coded as "assert(0)", so using them will cause a crash. The header file "strdef.h" is similiar to "str$routines.h" on VMS, but I've added definitions of "STR$_error" items so I could use them instead of comparing against the external variable versions. I'm using a different name because I'm developing using Linux, and Unix gives me lots of problems with a '$' in file names. Also it doesn't assume variable number of arguements. The header file "descrip.h" was taken from a GNU-C distribution for VMS I uploaded some time back, and I'm not sure of it's legal status. The functions are based upon VMS 5.0 manuals, so other functions may have been added since then. Please let me know of any (I'm stuck at 5.5 for a while). Someone who knows how to do wildcard should set up a str$match_wild, or convert one of the regex routines to handle VMS style wildcards. Also, I've never used any of the string math, so someone who has should work on these. I've defered signals for now because they are going to be dependent on other (as yet) unimplemented libraries. I've placed a DOSIGNAL(x) where a signal should be sent, but defined DOSIGNAL as an 'assert()' for now (really not the right thing, but OK for testing). Kevin Handy Software Solutions, Inc. descrip.h100640 765 0 42301 6227502073 11171 0ustar kevinroot/* * * Descriptor definitions, more useful than those in */ #ifndef _DESCRIP_H #define _DESCRIP_H /* Based on the VAX-11 Procedure Calling and Condition Handling Standard, */ /* Revision 9.0 [7-Dec-81] and updated from VMS V5.5's $DSCDEF, Dec'91 */ /* * General descriptor format - each class of descriptor consists of at * least the following fields, sometimes under variant nams: */ struct dsc$descriptor { unsigned short dsc$w_length; /* specific to descriptor class; typically a 16-bit (unsigned) length */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* descriptor class code */ void *dsc$a_pointer; /* address of first byte of data element */ }; /* * Scalar or static string descriptor: */ struct dsc$descriptor_s { unsigned short dsc$w_length; /* length of data item in bytes, */ /* or if dsc$b_dtype is V, in bits, */ /* or if dsc$b_dtype is P, in digits (4 bit nibbles) */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* class code = DSC$K_CLASS_S */ char *dsc$a_pointer; /* address of first byte of data storage */ }; /* * Dynamic string descriptor: */ struct dsc$descriptor_d { unsigned short dsc$w_length; /* allocated length, maintained by RTL */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* class code = DSC$K_CLASS_D */ char *dsc$a_pointer; /* address */ }; /* * Array descriptor: */ struct dsc$descriptor_a { unsigned short dsc$w_length; /* length of an array element in bytes, bits, or digits */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* class code = DSC$K_CLASS_A */ void *dsc$a_pointer; /* address of first actual byte of data storage */ char dsc$b_scale; /* scale multiplier to convert from internal to external form */ unsigned char dsc$b_digits; /* number of decimal digits in internal representation */ struct { unsigned : 4; /* reserved, must be zero */ unsigned dsc$v_fl_redim : 1; /* if set, indicates the array can be redimensioned */ unsigned dsc$v_fl_column : 1; /* if set, indicates column-major order (FORTRAN) */ unsigned dsc$v_fl_coeff : 1; /* if set, indicates the multipliers block is present */ unsigned dsc$v_fl_bounds : 1; /* if set, indicates the bounds block is present */ } dsc$b_aflags; unsigned char dsc$b_dimct; /* number of dimensions */ unsigned long dsc$l_arsize; /* total size of array in bytes, or if */ /* dsc$b_dtype is DSC$K_DTYPE_P, in digits (4 bit nibbles) */ /* * One or two optional blocks of information may follow contiguously * at this point; the first block contains information about the * dimension multipliers (if present, dsc$b_aflags.dsc$v_fl_coeff is * set), the second block contains information about the dimension * bounds (if present, dsc$b_aflags.dsc$v_fl_bounds is set). If the * bounds information is present, the multipliers information must * also be present. * * The multipliers block has the following format: * char *dsc$a_a0; Address of the element whose subscripts are all zero * long dsc$l_m [DIMCT]; Addressing coefficients (multipliers) * * The bounds block has the following format: * struct { * long dsc$l_l; Lower bound * long dsc$l_u; Upper bound * } dsc$bounds [DIMCT]; * * (DIMCT represents the value contained in dsc$b_dimct.) */ }; /* * Procedure descriptor: */ struct dsc$descriptor_p { unsigned short dsc$w_length; /* length associated with the function value */ unsigned char dsc$b_dtype; /* function value data type code */ unsigned char dsc$b_class; /* class code = DSC$K_CLASS_P */ void *dsc$a_pointer; /* address of function entry mask */ }; /* * Decimal scalar string descriptor: */ struct dsc$descriptor_sd { unsigned short dsc$w_length; /* length of data item in bytes, bits, or digits */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* class code = DSC$K_CLASS_SD */ char *dsc$a_pointer; /* address of first byte of data storage */ char dsc$b_scale; /* scale multiplier to convert from internal to external form */ unsigned char dsc$b_digits; /* number of decimal digits in internal representation */ unsigned : 16; /* reserved for future use, must be zero */ }; /* * Noncontiguous array descriptor: */ struct dsc$descriptor_nca { unsigned short dsc$w_length; /* length of an array element in bytes, bits, or digits */ unsigned char dsc$b_dtype; /* data type code */ unsigned char dsc$b_class; /* class code = DSC$K_CLASS_NCA */ void *dsc$a_pointer; /* address of first actual byte of data storage */ char dsc$b_scale; /* scale multiplier to convert from internal to external form */ unsigned char dsc$b_digits; /* number of decimal digits in internal representation */ struct { unsigned : 4; /* reserved for future standardization, must be zero */ unsigned dsc$v_fl_redim : 1; /* must be zero */ unsigned : 3; /* reserved for future standardization, must be zero */ } dsc$b_aflags; unsigned char dsc$b_dimct; /* number of dimensions */ unsigned long dsc$l_arsize; /* total size of array in bytes, or if */ /* dsc$b_dtype is DSC$K_DTYPE_P, in digits (4 bit nibbles) */ /* * Two blocks of information must follow contiguously at this point; * the first block contains information about the difference between * addresses of two adjacent elements in each dimension (the stride). * The second block contains information about the dimension bounds. * * The strides block has the following format: * char *dsc$a_a0; Address of the element whose subscripts are all zero * unsigned long dsc$l_s [DIMCT]; Strides * * The bounds block has the following format: * struct { * long dsc$l_l; Lower bound * long dsc$l_u; Upper bound * } dsc$bounds [DIMCT]; * * (DIMCT represents the value contained in dsc$b_dimct.) */ }; /* * The varying string descriptor and varying string array descriptor are * used with strings of the following form: * * struct { * unsigned short CURLEN; The current length of BODY in bytes * char BODY[MAXSTRLEN]; A fixed-length area containing the string * }; * * where MAXSTRLEN is the value contained in the dsc$w_maxstrlen field in * the descriptor and CURLEN is never greater than MAXSTRLEN. */ /* * Varying string descriptor: */ struct dsc$descriptor_vs { unsigned short dsc$w_maxstrlen; /* maximum length of the BODY field of varying string, in bytes */ unsigned char dsc$b_dtype; /* data type code = DSC$K_DTYPE_VT */ unsigned char dsc$b_class; /* class code = DSC$K_CLASS_VS */ void *dsc$a_pointer; /* address of the CURLEN field of the varying string */ }; /* * Varying string array descriptor: */ struct dsc$descriptor_vsa { unsigned short dsc$w_maxstrlen; /* maximum length of the BODY field of an array element in bytes */ unsigned char dsc$b_dtype; /* data type code = DSC$K_DTYPE_VT */ unsigned char dsc$b_class; /* class code = DSC$K_CLASS_VSA */ void *dsc$a_pointer; /* address of first actual byte of data storage */ char dsc$b_scale; /* reserved for future standardization, must be zero */ unsigned char dsc$b_digits; /* reserved for future standardization, must be zero */ struct { unsigned : 4; /* reserved for future standardization, must be zero */ unsigned dsc$v_fl_redim : 1; /* must be zero */ unsigned : 3; /* reserved for future standardization, must be zero */ } dsc$b_aflags; unsigned char dsc$b_dimct; /* number of dimensions */ unsigned long dsc$l_arsize; /* total size of array in bytes */ /* * Two blocks of information must follow contiguously at this point; * the first block contains information about the difference between * addresses of two adjacent elements in each dimension (the stride). * The second block contains information about the dimension bounds. * * The strides block has the following format: * char *dsc$a_a0; Address of element whose subscripts are all zero * unsigned long dsc$l_s [DIMCT]; Strides * * The bounds block has the following format: * struct { * long dsc$l_l; Lower bound * long dsc$l_u; Upper bound * } dsc$bounds [DIMCT]; * * (DIMCT represents the value contained in dsc$b_dimct.) */ }; /* * Unaligned bit string descriptor: */ struct dsc$descriptor_ubs { unsigned short dsc$w_length; /* length of data item in bits */ unsigned char dsc$b_dtype; /* data type code = DSC$K_DTYPE_VU */ unsigned char dsc$b_class; /* class code = DSC$K_CLASS_UBS */ char *dsc$a_base; /* address to which dsc$l_pos is relative */ long dsc$l_pos; /* bit position relative to dsc$a_base of first bit in string */ }; /* * Unaligned bit array descriptor: */ struct dsc$descriptor_uba { unsigned short dsc$w_length; /* length of data item in bits */ unsigned char dsc$b_dtype; /* data type code = DSC$K_DTYPE_VU */ unsigned char dsc$b_class; /* class code = DSC$K_CLASS_UBA */ char *dsc$a_base; /* address to which effective bit offset is relative */ char dsc$b_scale; /* reserved for future standardization, must be zero */ unsigned char dsc$b_digits; /* reserved for future standardization, must be zero */ struct { unsigned : 4; /* reserved for future standardization, must be zero */ unsigned dsc$v_fl_redim : 1; /* must be zero */ unsigned : 3; /* reserved for future standardization, must be zero */ } dsc$b_aflags; unsigned char dsc$b_dimct; /* number of dimensions */ unsigned long dsc$l_arsize; /* total size of array in bits */ /* * Three blocks of information must follow contiguously at this point; * the first block contains information about the difference between * the bit addresses of two adjacent elements in each dimension (the * stride). The second block contains information about the dimension * bounds. The third block is the relative bit position with respect * to dsc$a_base of the first actual bit of the array. * * The strides block has the following format: * long dsc$l_v0; Bit offset of the element whose subscripts * are all zero, with respect to dsc$a_base * unsigned long dsc$l_s [DIMCT]; Strides * * The bounds block has the following format: * struct { * long dsc$l_l; Lower bound * long dsc$l_u; Upper bound * } dsc$bounds [DIMCT]; * * The last block has the following format: * long dsc$l_pos; * * (DIMCT represents the value contained in dsc$b_dimct.) */ }; /* * BASIC File Array, supported the VAX BASIC compiler/interpretor and RTL. */ struct dsc$descriptor_bfa { /* WARNING: aggregate has origin of -12 */ int *dsc$a_handle; /* The address of a vector of data concerning the current state of processing of */ /* the array. This is set to zero by the creator of the descriptor, and maintained */ /* thereafter by the BASIC file array processing functions. */ long dsc$l_byteoff; /* Byte offset in the file of element 0,0,...,0 of the array. This need not be within */ /* the array, or even within the file if the array does not have zero origin. */ long dsc$l_logunit; /* The logical unit number (BASIC channel) on which the file containing the array has been */ /* opened. This is set by the creator of the descriptor before first referencing the array. */ /* * This block is a "hidden" prolog for a normal array descriptor, * which must follow (contiguously). The address of _that_ portion * is what should be passed to routines expecting to receive an * array descriptor address. dsc$b_class would be DSC$K_CLASS_BFA. */ }; /* * Codes for data type, dsc$b_dtype: */ /* Atomic data types: */ #define DSC$K_DTYPE_Z 0 /* unspecified */ #define DSC$K_DTYPE_BU 2 /* byte logical; 8-bit unsigned quantity */ #define DSC$K_DTYPE_WU 3 /* word logical; 16-bit unsigned quantity */ #define DSC$K_DTYPE_LU 4 /* longword logical; 32-bit unsigned quantity */ #define DSC$K_DTYPE_QU 5 /* quadword logical; 64-bit unsigned quantity */ #define DSC$K_DTYPE_OU 25 /* octaword logical; 128-bit unsigned quantity */ #define DSC$K_DTYPE_B 6 /* byte integer; 8-bit signed 2's-complement integer */ #define DSC$K_DTYPE_W 7 /* word integer; 16-bit signed 2's-complement integer */ #define DSC$K_DTYPE_L 8 /* longword integer; 32-bit signed 2's-complement integer */ #define DSC$K_DTYPE_Q 9 /* quadword integer; 64-bit signed 2's-complement integer */ #define DSC$K_DTYPE_O 26 /* octaword integer; 128-bit signed 2's-complement integer */ #define DSC$K_DTYPE_F 10 /* F_floating; 32-bit single-precision floating point */ #define DSC$K_DTYPE_D 11 /* D_floating; 64-bit double-precision floating point */ #define DSC$K_DTYPE_G 27 /* G_floating; 64-bit double-precision floating point */ #define DSC$K_DTYPE_H 28 /* H_floating; 128-bit quadruple-precision floating point */ #define DSC$K_DTYPE_FC 12 /* F_floating complex */ #define DSC$K_DTYPE_DC 13 /* D_floating complex */ #define DSC$K_DTYPE_GC 29 /* G_floating complex */ #define DSC$K_DTYPE_HC 30 /* H_floating complex */ #define DSC$K_DTYPE_CIT 31 /* COBOL Intermediate Temporary */ /* String data types: */ #define DSC$K_DTYPE_T 14 /* character-coded text; a single character or a string */ #define DSC$K_DTYPE_T2 38 /* 16-bit Text (Asian workstations) */ #define DSC$K_DTYPE_VT 37 /* varying character-coded text; 16-bit count, followed by a string */ #define DSC$K_DTYPE_NU 15 /* numeric string, unsigned */ #define DSC$K_DTYPE_NL 16 /* numeric string, left separate sign */ #define DSC$K_DTYPE_NLO 17 /* numeric string, left overpunched sign */ #define DSC$K_DTYPE_NR 18 /* numeric string, right separate sign */ #define DSC$K_DTYPE_NRO 19 /* numeric string, right overpunched sign */ #define DSC$K_DTYPE_NZ 20 /* numeric string, zoned sign */ #define DSC$K_DTYPE_P 21 /* packed decimal string */ #define DSC$K_DTYPE_V 1 /* bit; aligned bit string */ #define DSC$K_DTYPE_VU 34 /* bit unaligned; arbitrary bit string */ /* Miscellaneous data types: */ #define DSC$K_DTYPE_ZI 22 /* sequence of instructions */ #define DSC$K_DTYPE_ZEM 23 /* procedure entry mask */ #define DSC$K_DTYPE_DSC 24 /* descriptor */ #define DSC$K_DTYPE_BPV 32 /* bound procedure value */ #define DSC$K_DTYPE_BLV 33 /* bound label value */ #define DSC$K_DTYPE_ADT 35 /* absolute date and time */ /* DSC$K_DTYPE_??? 36 \* DTYPE code 36 is reserved for future definition */ #ifndef NO_VMS_V6 /* Introduced with Alpha-AXP: */ #define DSC$K_DTYPE_FS 52 /* 32-bit S_float IEEE single precision */ #define DSC$K_DTYPE_FT 53 /* 64-bit T_float IEEE double precision */ #define DSC$K_DTYPE_FSC 54 /* 64-bit S_complex IEEE */ #define DSC$K_DTYPE_FTC 55 /* 128-bit T_complex IEEE */ #define DSC$K_DTYPE_FX 57 /* 128-bit X_float IEEE quadruple precision */ #define DSC$K_DTYPE_FXC 58 /* 256-bit X_complex IEEE */ #endif /* Used by the VAX/VMS Debug Facility: */ #define DSC$K_DTYPE_CAD 178 /* Address calculation command (see $DSTDEF) */ #define DSC$K_DTYPE_ENT 179 /* Entry global definition */ #define DSC$K_DTYPE_GBL 180 /* Global symbol definition */ #define DSC$K_DTYPE_EPT 181 /* Entry point to routine. */ #define DSC$K_DTYPE_R11 182 /* Line number relative to R11 correlation table. */ #define DSC$K_DTYPE_FLD 183 /* BLISS FIELD name. */ #define DSC$K_DTYPE_PCT 184 /* PSECT information. */ #define DSC$K_DTYPE_DPC 185 /* PC correlation table for FORTRAN IV+ */ #define DSC$K_DTYPE_LBL 186 /* LITERAL or LABEL */ #define DSC$K_DTYPE_SLB 187 /* Label in non-assembly language modules */ #define DSC$K_DTYPE_MOD 188 /* Beginning of new module */ #define DSC$K_DTYPE_EOM 189 /* End of module */ #define DSC$K_DTYPE_RTN 190 /* Beginning of new routine */ #define DSC$K_DTYPE_EOR 191 /* End of routine */ /* Reserved data type codes: */ /* 39-177 are reserved to DEC; */ /* 192-255 are reserved to CSS and customers. */ /* * Descriptor Class Codes for dsc$b_class: */ #define DSC$K_CLASS_S 1 /* scalar or string descriptor */ #define DSC$K_CLASS_D 2 /* dynamic string descriptor */ #define DSC$K_CLASS_V 3 /* variable buffer descriptor; reserved for use by DIGITAL */ #define DSC$K_CLASS_A 4 /* array descriptor */ #define DSC$K_CLASS_P 5 /* procedure descriptor */ #define DSC$K_CLASS_PI 6 /* procedure incarnation descriptor; obsolete */ #define DSC$K_CLASS_J 7 /* label descriptor; reserved for use by the VAX-11 Debugger */ #define DSC$K_CLASS_JI 8 /* label incarnation descriptor; obsolete */ #define DSC$K_CLASS_SD 9 /* decimal scalar string descriptor */ #define DSC$K_CLASS_NCA 10 /* noncontiguous array descriptor */ #define DSC$K_CLASS_VS 11 /* varying string descriptor */ #define DSC$K_CLASS_VSA 12 /* varying string array descriptor */ #define DSC$K_CLASS_UBS 13 /* unaligned bit string descriptor */ #define DSC$K_CLASS_UBA 14 /* unaligned bit array descriptor */ #define DSC$K_CLASS_SB 15 /* string with bounds descriptor */ #define DSC$K_CLASS_UBSB 16 /* unaligned bit string with bounds descriptor */ /* for internal use only by RTL and debugger */ #define DSC$K_CLASS_BFA 191 /* BASIC File Array Descriptor */ /* Reserved descriptor class codes: */ /* 17-190 are reserved to DEC; */ /* 192-255 are reserved to CSS and customers. */ /* * A simple macro to construct a string descriptor, * for compatability with VAX C's : */ #define $DESCRIPTOR(name,string) struct dsc$descriptor_s name =\ {sizeof(string)-1,DSC$K_DTYPE_T,DSC$K_CLASS_S,string} #endif /*_DESCRIP_H*/ makefile100644 765 144 2461 6232050271 11277 0ustar kevinusersCFLAGS = -fdollars-in-identifiers STROBJ = str.o str__const.o str__is_string_class.o \ str__copy_fill.o str__resize.o \ str_analyze_sdesc.o \ str_append.o str_blind_compare.o \ str_compare.o str_compare_eql.o str_concat.o \ str_copy_dx.o str_copy_r.o \ str_dupl_char.o \ str_free1_dx.o str_get1_dx.o str_left.o \ str_pos_extr.o str_right.o \ str_trim.o str_upcase.o STRLIB = strlib.a all : teststr teststr : teststr.c $(STRLIB) $(STRLIB) : $(STROBJ) ar -rv $(STRLIB) $? str.o : str.c strdef.h str__const.o : str__const.c strdef.h str__is_string_class.o : str__is_string_class.c strdef.h str__copy_fill.o : str__copy_fill.c strdef.h str__resize.o : str__resize.c strdef.h str_analyse_sdesc.o : str_analyse_sdesc.c strdef.h str_append.o : str_append.c strdef.h str_blind_compare.o : str_blind_compare.c strdef.h str_compare.o : str_compare.c strdef.h str_compare_eql.o : str_compare_eql.c strdef.h str_concat.o : str_concat.c strdef.h str_copy_dx.o : str_copy_dx.c strdef.h str_copy_r.o : str_copy_r.c strdef.h str_dupl_char.o : str_dupl_char.c strdef.h str_free1_dx.0 : str_free1_dx.c strdef.h str_get1_dx.o : str_get1_dx.c strdef.h str_left.o : str_left.c strdef.h str_pos_extr.o : str_pos_extr.c strdef.h str_right.o : str_right.c strdef.h str_trim.o : str_trim.c strdef.h str_upcase.o : str_upcase.c strdef.h makefile.old100644 765 144 2341 6232047452 12060 0ustar kevinusersCFLAGS = -fdollars-in-identifiers all : teststr teststr : teststr.c \ str.o str__const.o str__is_string_class.o \ str__copy_fill.o str__resize.o \ str_analyze_sdesc.o \ str_append.o str_blind_compare.o \ str_compare.o str_compare_eql.o str_concat.o \ str_copy_dx.o str_copy_r.o \ str_dupl_char.o \ str_free1_dx.o str_get1_dx.o str_left.c \ str_pos_extr.o str_right.c \ str_trim.o str_upcase.o str.o : str.c strdef.h str__const.o : str__const.c strdef.h str__is_string_class.o : str__is_string_class.c strdef.h str__copy_fill.o : str__copy_fill.c strdef.h str__resize.o : str__resize.c strdef.h str_analyse_sdesc.o : str_analyse_sdesc.c strdef.h str_append.o : str_append.c strdef.h str_blind_compare.o : str_blind_compare.c strdef.h str_compare.o : str_compare.c strdef.h str_compare_eql.o : str_compare_eql.c strdef.h str_concat.o : str_concat.c strdef.h str_copy_dx.o : str_copy_dx.c strdef.h str_copy_r.o : str_copy_r.c strdef.h str_dupl_char.o : str_dupl_char.c strdef.h str_free1_dx.0 : str_free1_dx.c strdef.h str_get1_dx.o : str_get1_dx.c strdef.h str_left.o : str_left.c strdef.h str_pos_extr.o : str_pos_extr.c strdef.h str_right.o : str_right.c strdef.h str_trim.o : str_trim.c strdef.h str_upcase.o : str_upcase.c strdef.h str.c100644 765 0 14410 6232042520 10337 0ustar kevinroot/* * str.c * * Code for VAX STR$ routines * * Description: * * This file contains various 'str$' functions equivalent * to those available in Vax/VMS string library. * * Bugs: * * Not compatible at the binary level. * * No seperate "string zone" to allocate memory from, * uses malloc/free instead. * * Some versions of realloc are broken! Some don't like to be * called hundreds of times. The program may * crash with a segmentation fault in such a case. * * I probibly should be using dsc$descriptor instead of * dsc$descriptor_s, but I prefer to have the type 'char*' * instead of 'void*' which is the only difference. * * Not worrying about the dsc$b_dtype field yet. Assumes it * will always be type DSC$K_DTYPE_T (character coded text). * Type V should mean size is in bits, and P means size is in * digits (4 bit nibbles). * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. Spelling errors are * not my fault! Someone must have snuck them in * there when I wasn't looking. */ #include #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$add * * Add two decimal strings of digits */ unsigned long str$add(const unsigned long* asign, const long* aexp, const struct dsc$descriptor_s* adigits, const unsigned long* bsign, const long*bexp, const struct dsc$descriptor_s* bdigits, unsigned long* csign, long* cexp, struct dsc$descriptor_s* cdigits) { /* Not yet coded */ } /************************************************************* * str$compare_multi * */ long str$compare_multi( const struct dsc$descriptor_s* first_source_string, const struct dsc$descriptor_s* second_source_string, const long* flags_value, const long* foreign_language) { /* Not yet coded */ assert(0); } /************************************************************* * str$divide * */ unsigned long str$divide( const unsigned long* asign, const long* aexp, const struct dsc$descriptor_s* a_digits, const unsigned long* bsign, const long* bexp, const struct dsc$descriptor_s* b_digits, const long* total_digits, const long* round_truncate_indicator, unsigned long* csign, long* cexp, struct dsc$descriptor_s* cdigits) { /* Not yet coded */ assert(0); } /************************************************************* * str$element * */ unsigned long str$element(struct dsc$descriptor_s* destination_string, const long* element_number, const struct dsc$descriptor_s* delimiter_string, const struct dsc$descriptor_s* source_string) { /* Not yet coded */ assert(0); } /************************************************************* * str$find_first_in_set * */ long str$find_first_in_set(const struct dsc$descriptor_s* source_string, const struct dsc$descriptor_s* set_of_characters) { /* Not yet coded */ assert(0); } /************************************************************* * str$find_first_not_in_set * */ long str$find_first_not_in_set( const struct dsc$descriptor_s* source_string, const struct dsc$descriptor_s* set_of_characters) { /* Not yet coded */ assert(0); } /************************************************************* * str$find_first_substring * */ unsigned long str$find_first_substring( const struct dsc$descriptor_s* source_string, long* index, long* substring_index, ...) { /* Not yet coded */ assert(0); } /************************************************************* * str$len_extr * */ unsigned long str$len_extr(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string, const long* start_position, const long* longword_integer_length) { /* Not yet coded */ assert(0); } /************************************************************* * str$match_wild * */ unsigned long str$match_wild(const struct dsc$descriptor_s* candidate_string, const struct dsc$descriptor_s* pattern_string) { /* Not yet coded */ assert(0); } /************************************************************* * str$mul * */ unsigned long str$mul(const unsigned long* asign, const long aexp, const struct dsc$descriptor_s* adigits, const unsigned long* bsign, const long* bexp, const struct dsc$descriptor_s* bdigits, unsigned long* csign, long* cexp, struct dsc$descriptor_s* cdigits) { /* Not yet coded */ assert(0); } /************************************************************* * str$position * */ unsigned long str$position(const struct dsc$descriptor_s* source_string, const struct dsc$descriptor_s* substring, long* start_position) { /* Not yet coded */ assert(0); } /************************************************************* * str$prefix * */ unsigned long str$prefix(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string) { /* Not yet coded */ assert(0); } /************************************************************* * str$recip * */ unsigned long str$recip( const unsigned long* asign, const long* aexp, const struct dsc$descriptor_s* adigits, const unsigned long* bsign, const long* bexp, const struct dsc$descriptor_s* bdigits, unsigned long* csign, long* cexp, struct dsc$descriptor_s* cdigits) { /* Not yet coded */ assert(0); } /************************************************************* * str$replace * */ unsigned long str$replace(struct dsc$descriptor_s* destinstaion_string, const struct dsc$descriptor_s* source_string, const long* start_position, const long* end_position, const struct dsc$descriptor_s* replacement_string) { /* Not yet coded */ assert(0); } /************************************************************* * str$round * */ unsigned long str$round(const long* places, unsigned long* flags, const unsigned long* asign, const long* aexp, const struct dsc$descriptor_s* adigits, const unsigned long* bsign, const long* bexp, const struct dsc$descriptor_s* bdigits, unsigned long* csign, long* cexp, struct dsc$descriptor_s* cdigits) { /* Not yet coded */ assert(0); } /************************************************************* * str$translate * */ unsigned long str$translate(struct dsc$descriptor_s* destinstaion_string, const struct dsc$descriptor_s* source_string, const struct dsc$descriptor_s* translation_string, const struct dsc$descriptor_s* match_string) { /* Not yet coded */ assert(0); } str.o100644 765 144 4634 6263106714 10603 0ustar kevinusersELF4( U]ÐUhjGhh]UhjVhh]Uhjehh]Uhjphh]Uhj|hh]Uhhhh]ÐUhhhh]ÐUhhhh]ÐUhhhh]ÐUhhhh]ÐUhhhh]ÐUhhhh]ÐUhhhh]ÐUhhhh]ÐUhhhh]01.010str.c%s:%u: failed assertion `%s' GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.comment 0:0 EP Qp g ###@#p####0#`#str.cgcc2_compiled.str$addstr$compare_multi__eprintfstr$dividestr$elementstr$find_first_in_setstr$find_first_not_in_setstr$find_first_substringstr$len_extrstr$match_wildstr$mulstr$positionstr$prefixstr$recipstr$replacestr$roundstr$translate@!  +16<&DM`   % 4;@E T[`e t{    #( DNSX t~    4>CH dnsx str__const.c100644 765 144 2410 6231231076 12115 0ustar kevinusers/* * str.c * * Code for VAX STR$ routines * * Description: * * This file contains various constants that are externally * accessable from STR$ routines. * * Bugs: * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. */ #include "descrip.h" #include "strdef.h" /************************************************************* * Error values */ const unsigned long str$_faility = STR$_FACILITY; const unsigned long str$_divby_zer = STR$_DIVBY_ZER; const unsigned long str$_errfredyn = STR$_ERRFREDYN; const unsigned long str$_fatinterr = STR$_FATINTERR; const unsigned long str$_illstrcla = STR$_ILLSTRCLA; const unsigned long str$_illstrpos = STR$_ILLSTRPOS; const unsigned long str$_illstrspe = STR$_ILLSTRSPE; const unsigned long str$_insvirmem = STR$_INSVIRMEM; const unsigned long str$_invdelim = STR$_INVDELIM; const unsigned long str$_match = STR$_MATCH; const unsigned long str$_negstrlen = STR$_NEGSTRLEN; const unsigned long str$_noelem = STR$_NOELEM; const unsigned long str$_nomatch = STR$_NOMATCH; const unsigned long str$_normal = STR$_NORMAL; const unsigned long str$_stris_int = STR$_STRIS_INT; const unsigned long str$_strtoolon = STR$_STRTOOLON; const unsigned long str$_tru = STR$_TRU; const unsigned long str$_wronumarg = STR$_WRONUMARG; str__const.o100644 765 144 2500 6263106714 12136 0ustar kevinusersELF4( 01.01$L$|$D$T$ $$l$$$$$$\$t$$d$GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.data.bss.note.rodata.comment*9H Wfu $(,048<@Dstr__const.cgcc2_compiled.str$_failitystr$_divby_zerstr$_errfredynstr$_fatinterrstr$_illstrclastr$_illstrposstr$_illstrspestr$_insvirmemstr$_invdelimstr$_matchstr$_negstrlenstr$_noelemstr$_nomatchstr$_normalstr$_stris_intstr$_strtoolonstr$_trustr$_wronumarg4!4'4,42HH:C  str__copy_fill.c100644 765 144 1712 6231305304 12747 0ustar kevinusers/* * str.c * * Code for VAX STR$$COPY_FILL routine * * Description: * * * Bugs: * * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. */ #include #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$$copy_fill * * Copies over text from source to dest. */ unsigned long str$$copy_fill(char* dest_ptr, unsigned short dest_length, const char* source_ptr, unsigned short source_length, char fill) { short max_copy; int fill_loop; /* * Copy over however much can. */ max_copy = min(dest_length, source_length); memcpy(dest_ptr, source_ptr, max_copy); /* * Fill in the rest */ for (fill_loop = max_copy; fill_loop < dest_length; fill_loop++) { dest_ptr[fill_loop] = fill; } /* * Figure out what to return */ if (source_length > dest_length) { return STR$_TRU; } else { return STR$_NORMAL; } } str__copy_fill.o100644 765 144 1730 6263106715 12775 0ustar kevinusersELF@4( U WVS] u}f]fuMfEf9EsfEfEEPEPEP MME9E| EEUEfEf9Es&$/ e[^_]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment!0str__copy_fill.cgcc2_compiled.str$$copy_fillmemcpy@! +16<"Eh  7? str__is_string_class.c100644 765 144 1716 6231304610 14160 0ustar kevinusers/* * str.c * * Code for VAX STR$$IS_STRING_CLASS routine * * Description: * * * Bugs: * * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. */ #include #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$$is_string_class * * This function is used to determine if the descriptor * passed in is actually a viable string for this set of * functions. */ unsigned long str$$is_string_class(const struct dsc$descriptor_s* test_string) { /* * Did we get passed anything? */ if (test_string == NULL) { return STR$_FATINTERR; } /* * Make sure it is a atring class we can handle */ switch (test_string->dsc$b_class) { case DSC$K_CLASS_S: case DSC$K_CLASS_SD: case DSC$K_CLASS_VS: case DSC$K_CLASS_D: case DSC$K_CLASS_A: case DSC$K_CLASS_NCA: break; default: return STR$_ILLSTRCLA; } return STR$_NORMAL; } str__is_string_class.o100644 765 144 2014 6263106715 14177 0ustar kevinusersELF4( U}uD$EPB wQ@ppppppT$ ]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment'str__is_string_class.cgcc2_compiled.str$$is_string_class@! `+16< EP  <2@DHLPTX\`dhstr__resize.c100644 765 144 3006 6231305110 12261 0ustar kevinusers/* * str.c * * Code for VAX STR$$RESIZE routine * * Description: * * * Bugs: * * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. */ #include #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$$resize * * Try to resize the destination, giving as close to the * desired final size as possible. */ unsigned int str$$resize(struct dsc$descriptor_s* dest, short int size) { unsigned long result = STR$_NORMAL; int resize; /* * Generate the proper memory to store the result in. * Dependent on the type of string. */ switch(dest->dsc$b_class) { case DSC$K_CLASS_S: case DSC$K_CLASS_SD: case DSC$K_CLASS_A: case DSC$K_CLASS_NCA: /* * We can't change the size of this. Live with * whatever we've got. */ if (dest->dsc$a_pointer == 0) { DOSIGNAL(STR$_FATINTERR); result = STR$_FATINTERR; } break; case DSC$K_CLASS_D: /* * Try to allocate a different size */ result = str$get1_dx(&size, dest); break; case DSC$K_CLASS_VS: /* * Better be pointing at something */ if (dest->dsc$a_pointer == 0) { DOSIGNAL(STR$_FATINTERR); result = STR$_FATINTERR; } resize = min(dest->dsc$w_length, size); *((unsigned short int*)dest->dsc$a_pointer) = resize; break; default: DOSIGNAL(STR$_ILLSTRCLA); result = STR$_ILLSTRCLA; } return result; } str__resize.o100644 765 144 2704 6263106716 12321 0ustar kevinusersELFD4( U S] f]EEPB @ppppExu hj3h hED$EPEPEyExu hjEh hED$EM9~‰UEPfEf%h9jMh hET$E ]]01.012392132 && 0str__resize.c%s:%u: failed assertion `%s' 2392148 && 0GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.commentG*4str__resize.cgcc2_compiled.str$$resize__eprintfstr$get1_dx@G!  +16<FDMD  @+@DHLPTX\`dhz   " str_analyze_sdesc.c100644 765 144 2671 6231302543 13463 0ustar kevinusers/* * str.c * * Code for VAX STR$ANALYSE_SDESC routine * * Description: * * * Bugs: * * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. */ #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$analyze_sdesc * * Analyze String Descriptor extracts the length and * starting address of the data for a variety of * string descriptor classes */ void str$analyze_sdesc(const struct dsc$descriptor_s* input_descriptor, unsigned short* word_integer_length, char** data_address) { /* * Only allow for strings */ if (str$$is_string_class(input_descriptor) != STR$_NORMAL) { DOSIGNAL(STR$_ILLSTRCLA); *word_integer_length = 0; *data_address = NULL; return; } /* * Nothing stored here right now */ if (input_descriptor->dsc$a_pointer == NULL) { assert(input_descriptor->dsc$w_length == 0); *word_integer_length = 0; *data_address = NULL; } /* * Handle weirdness of VS (varying-length) string */ if (input_descriptor->dsc$b_class == DSC$K_CLASS_VS) { /* * VS String */ *word_integer_length = (unsigned short)*(input_descriptor->dsc$a_pointer); *data_address = input_descriptor->dsc$a_pointer + 2; assert(*word_integer_length <= input_descriptor->dsc$w_length); } else { *word_integer_length = input_descriptor->dsc$w_length; *data_address = input_descriptor->dsc$a_pointer; } } str_analyze_sdesc.o100644 765 144 2650 6263106716 13505 0ustar kevinusersELF4( USEPt9hj&h h!E fEExu8Ef8th?j1h h!E fEEx ufE UJffEUZE Uff9s*hcjAh h!%E Uf fEUJ]]01.012392148 && 0str_analyze_sdesc.c%s:%u: failed assertion `%s' input_descriptor->dsc$w_length == 0*word_integer_length <= input_descriptor->dsc$w_lengthGCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.comment$6Kstr_analyze_sdesc.cgcc2_compiled.str$analyze_sdescstr$$is_string_class__eprintf@! @h +`1`6`<tD Mp  0U  $) cjot  str_append.c100644 765 144 3374 6231303352 12106 0ustar kevinusers/* * str.c * * Code for VAX STR$APPEND routine * * Description: * * * Bugs: * * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. */ #include #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$append * */ unsigned long str$append(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string) { char* s1_ptr; /* Pointer to first string */ short s1_length; /* Length of first string */ char* s2_ptr; /* Pointer to second string */ short s2_length; /* Length of second string */ short final_length; /* Final sstring length */ unsigned long result = STR$_NORMAL; /* Result */ /* * Destination MUST be a dynamic string */ if (destination_string->dsc$b_class != DSC$K_CLASS_D) { DOSIGNAL(STR$_ILLSTRCLA); return STR$_ILLSTRCLA; } /* * Analyze strings */ str$analyze_sdesc(destination_string, &s1_length, &s1_ptr); str$analyze_sdesc(source_string, &s2_length, &s2_ptr); final_length = s1_length + s2_length; /* * Extend the destination string * (Assumes that re-sizing will not change the existing data!) */ result = str$$resize(destination_string, final_length); /* * Append the source onto the destination. * Must assume that everything is ok for this. */ if (result == STR$_NORMAL) { /* * We can directly use the pointer here, because we * know that we have a dynamic string, and not one * of the weird ones. Don't need to analyze again. */ memcpy(destination_string->dsc$a_pointer + s1_length, s2_ptr, s2_length); } /* * Done */ return result; } str_append.o100644 765 144 2340 6263106716 12124 0ustar kevinusersELF4( UEExt*hj+h hT$EPEPEP EPEPE P fMfMfMEPEPE}uEPEPEUHP E]01.012392148 && 0str_append.c%s:%u: failed assertion `%s' GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.comment(2DPstr_append.cgcc2_compiled.str$append__eprintfstr$analyze_sdescstr$$resizememcpy@! @ +16<8DPbM  W#( M a ~  str_blind_compare.c100644 765 144 5275 6231232035 13436 0ustar kevinusers/* * str.c * * Code for VAX STR$BLIND_COMPARE routine * * Description: * * Bugs: * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. Spelling errors are * not my fault! Someone must have snuck them in * there when I wasn't looking. */ #include #include #include #include "descrip.h" #include "strdef.h" /* * Local prototypes */ static int str__memicmp(const char* str1, const char* str2, size_t length); /************************************************************* * str$case_blind_compare * * Compares two strings without regard to case. * The contents of the strings are not modified. * * Return: * * -1 = str1 < str2 * 0 = str1 == str2 * 1 = str1 > str2 */ long str$case_blind_compare( const struct dsc$descriptor_s* first_source_string, const struct dsc$descriptor_s* second_source_string) { char* s1_ptr; /* Pointer to first string */ short s1_length; /* Length of first string */ char* s2_ptr; /* Pointer to second string */ short s2_length; /* Length of second string */ short min_length; /* length of shortest string */ long result; /* Result of comparison */ /* * Analyze source strings */ str$analyze_sdesc(first_source_string, &s1_length, &s1_ptr); str$analyze_sdesc(second_source_string, &s2_length, &s2_ptr); /* * Calculate length to compare */ min_length = (s1_length < s2_length) ? s1_length : s2_length; /* * Compare the two strings. * Use 'memcmp' instead of 'strncmp' because we may have NULL's * in our strings. */ result = str__memicmp(s1_ptr, s2_ptr, min_length); /* * Work on the result in case of equal in first part, but * different total lengths. */ if (result == 0) { if (s1_length < s2_length) { result = -1; } else { if (s1_length > s2_length) { result = 1; } } } /* * Normalize the result */ if (result < -1) { result = -1; } if (result > 1) { result = 1; } /* * Return the answer */ return result; } /************************************************************* * str__memicmp * * This function does a memory-memory comparison (like * memcmp), ignoring cases. It returns an integer less than, * equal to, or greater than zero if str1 is found, respectively * to be less than, to match, or be greater than str2. * * stricmp, strcasecmp won't work, because they stop at * the first null character, and we need to compare all * characters. */ static int str__memicmp(const char* str1, const char* str2, size_t length) { int result = 0; /* * Do the comparison */ while((length != 0) && (result == 0)) { result = tolower(*str1++) - tolower(*str2++); length--; } /* * Return the result */ return result; } str_blind_compare.o100644 765 144 2310 6263106717 13451 0ustar kevinusersELF4( UEPEPEP EPEPE P fEf9E}fEfEEPEPEPn E}u3fEf9E~E fEf9E}E}}E}~EE]ÐUSE}t }uNEREËE RE )MM뫐E ]]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment$1HZstr_blind_compare.cgcc2_compiled.str__memicmpstr$case_blind_comparestr$analyze_sdesctolower@G!  +16<E  b '   str_compare.c100644 765 144 3406 6231233202 12255 0ustar kevinusers/* * str.c * * Code for VAX STR$COMPARE routine * * Description: * * * Bugs: * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. */ #include #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$compare * * Compares two strings for the same contents. This * routine distinguishes between upper and lower case * strings. * * returns: * -1 if first < second * 0 if equal * 1 if first > second */ long str$compare( const struct dsc$descriptor_s* first_source_string, const struct dsc$descriptor_s* second_source_string) { char* s1_ptr; /* Pointer to first string */ short s1_length; /* Length of first string */ char* s2_ptr; /* Pointer to second string */ short s2_length; /* Length of second string */ short min_length; /* length of shortest string */ long result; /* Result of comparison */ /* * Analyze source strings */ str$analyze_sdesc(first_source_string, &s1_length, &s1_ptr); str$analyze_sdesc(second_source_string, &s2_length, &s2_ptr); /* * Calculate length to compare */ min_length = (s1_length < s2_length) ? s1_length : s2_length; /* * Compare the two strings. * Use 'memcmp' instead of 'strncmp' because we may have NULL's * in our strings. */ result = memcmp(s1_ptr, s2_ptr, min_length); /* * Work on the result in case of equal in first part, but * different total lengths. */ if (result == 0) { if (s1_length < s2_length) { result = -1; } else { if (s1_length > s2_length) { result = 1; } } } /* * Normalize the result */ if (result < -1) { result = -1; } if (result > 1) { result = 1; } /* * Return the answer */ return result; } str_compare.o100644 765 144 1774 6263106717 12316 0ustar kevinusersELFT4( UEPEPEP EPEPE P fEf9E}fEfEEPEPEP E}u3fEf9E~E fEf9E}E}}E}~EE]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment*<str_compare.cgcc2_compiled.str$comparestr$analyze_sdescmemcmp@! +16<E`  C ' N str_compare_eql.c100644 765 144 2247 6231234757 13140 0ustar kevinusers/* * str.c * * Code for VAX STR$OMPARE_EQL routine * * Description: * * * Bugs: * * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. */ #include #include #include #include "descrip.h" #include "strdef.h" /************************************************************ * str$compare_eql * * Compares two strings for equality, in both length * and contents. */ long str$compare_eql( const struct dsc$descriptor_s* first_source_string, const struct dsc$descriptor_s* second_source_string) { char* s1_ptr; /* Pointer to first string */ short s1_length; /* Length of first string */ char* s2_ptr; /* Pointer to second string */ short s2_length; /* Length of second string */ long result; /* Result of comparison */ /* * Analyze source strings */ str$analyze_sdesc(first_source_string, &s1_length, &s1_ptr); str$analyze_sdesc(second_source_string, &s2_length, &s2_ptr); /* * Failure if not same length */ if (s1_length != s2_length) { return 1; } /* * Failure if not identical contents */ if (memcmp(s1_ptr, s2_ptr, s2_length) != 0) { return 1; } /* * Must be equal */ return 0; } str_compare_eql.o100644 765 144 1724 6263106720 13144 0ustar kevinusersELF,4( UEPEPEP EPEPE P fEf9EtAEPEPEP t1 ]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment"2Dstr_compare_eql.cgcc2_compiled.str$compare_eqlstr$analyze_sdescmemcmp@! +16<E0  K ' N str_concat.c100644 765 144 2060 6232045072 12100 0ustar kevinusers/* * str.c * * Code for VAX STR$CONACT routine * * Description: * * * Bugs: * * List MUST be terminated will a null item, because there's * no standard way to determine where the list ends. * * History * * Oct 18, 1996 - Kevin Handy * Preliminary design. */ #include #include #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$concat * */ unsigned long str$concat(struct dsc$descriptor_s* destination_string, ...) { va_list vlist; unsigned long result; struct dsc$descriptor_s* Item; /* * Blank out current string */ result = str$free1_dx(destination_string); /* * Set up for varargs */ va_start(vlist, destination_string); /* * Loop until we get a null (BUG) */ while((Item = va_arg(vlist, struct dsc$descriptor_s*), Item != NULL) && (result == STR$_NORMAL)) { result = str$append(destination_string, Item); } /* * Terminate varargs */ va_end(vlist); /* * Done */ return result; } str_concat.o100644 765 144 1700 6263106720 12116 0ustar kevinusersELF 4( U EPEE EEEU}t}t.EPEPE붐E ]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment(5str_concat.cgcc2_compiled.str$concatstr$free1_dxstr$append@! +16<E0  @  Y str_copy_dx.c100644 765 144 1602 6231244116 12276 0ustar kevinusers/* * str.c * * Code for VAX STR$COPY_DX routine * * Description: * * * Bugs: * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. */ #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$copy_dx * */ unsigned long str$copy_dx(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string) { char* s1_ptr; /* Pointer to first string */ short s1_length; /* Length of first string */ unsigned long result = STR$_NORMAL; /* Working result */ /* * Get information about source string */ str$analyze_sdesc(source_string, &s1_length, &s1_ptr); /* * Now, we can copy things over using str$copy_r */ result = str$copy_r(destination_string, &s1_length, s1_ptr); /* * If we get here, it must have worked */ return result; } str_copy_dx.o100644 765 144 1610 6263106720 12314 0ustar kevinusersELF4( U EEPEPE P EPEPEP EE]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.commentD*<str_copy_dx.cgcc2_compiled.str$copy_dxstr$analyze_sdescstr$copy_r@D! x+16<E  G . str_copy_r.c100644 765 144 2550 6231303003 12116 0ustar kevinusers/* * str.c * * Code for VAX STR$COPY_R routine * * Description: * * This file contains various 'str$' functions equivalent * to those available in Vax/VMS string library. * * Bugs: * * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. */ #include #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$copy_r * */ unsigned long str$copy_r(struct dsc$descriptor_s* destination_string, const short* word_integer_source_length, const void* source_string_address) { char* s1_ptr; /* Pointer to first string */ short s1_length; /* Length of first string */ unsigned long result = STR$_NORMAL; /* Working result */ /* * Do the normal sort of tests */ if ((result = str$$is_string_class(destination_string)) != STR$_NORMAL) { DOSIGNAL(result); return result; } /* * Try to resize the destination */ result = str$$resize(destination_string, *word_integer_source_length); if (result = STR$_NORMAL) { /* * Analyze the string we now have */ str$analyze_sdesc(destination_string, &s1_length, &s1_ptr); /* * Jam in the text */ result = str$$copy_fill(s1_ptr, s1_length, source_string_address, *word_integer_source_length, ' '); } /* * If we get here, it must have worked */ return result; } str_copy_r.o100644 765 144 2374 6263106721 12153 0ustar kevinusersELF4( U EEPE}t,hj+h hEnE REPEEEPEPEP j E REPEPEPEE]01.01result && 0str_copy_r.c%s:%u: failed assertion `%s' GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.comment(=GSestr_copy_r.cgcc2_compiled.str$copy_rstr$$is_string_class__eprintfstr$$resizestr$analyze_sdescstr$$copy_fill@! @ +16<7D?QM  t %,16 \ z str_dupl_char.c100644 765 144 3466 6231304302 12576 0ustar kevinusers/* * str.c * * Code for VAX STR$DUPL_CHAR routine * * Description: * * * Bugs: * * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. */ #include #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$dupl_char * */ unsigned long str$dupl_char(struct dsc$descriptor_s* destination_string, const long* repetition_count, const char* ascii_character) { char* s1_ptr; /* Pointer to first string */ short s1_length; /* Length of first string */ char* s2_ptr; /* Pointer to second string */ short s2_length; /* Length of second string */ unsigned long result = STR$_NORMAL; char UseChar = ' '; /* Character to use for duplication */ long UseCount; unsigned long alt_result; /* * Get the repitition count */ if (repetition_count == NULL) { UseCount = 1; } else { UseCount = *repetition_count; } /* * Check out the source string. It better have one * single character in it. */ if (ascii_character != NULL) { UseChar = *ascii_character; } /* * Validate the repitition count */ if (UseCount < 0) { UseCount = 0; result = STR$_NEGSTRLEN; } if (UseCount > 65535L) { DOSIGNAL(STR$_STRTOOLON); return STR$_STRTOOLON; } /* * Resize the destination string */ alt_result = str$$resize(destination_string, UseCount); if (alt_result != STR$_NORMAL) { result = alt_result; } else { /* * Now, see what we've got for a destination */ str$analyze_sdesc(destination_string, &s1_length, &s1_ptr); memset(s1_ptr, UseChar, min(s1_length, UseCount)); /* * Did we truncate? */ if (UseCount > s1_length) { result = STR$_TRU; } } /* * Done! */ return result; } str_dupl_char.o100644 765 144 2444 6263106721 12617 0ustar kevinusersELF44( U EE } u EE U}tEU}}EE$}~-hjIh ht$EPEPE}tEEPEPEPEP E9E}EPEPEP E9E~E$E ]01.012392180 && 0str_dupl_char.c%s:%u: failed assertion `%s' GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.comment .8DVstr_dupl_char.cgcc2_compiled.str$dupl_char__eprintfstr$$resizestr$analyze_sdescmemset@! 8 +D1D6D<X;DM  ]T[`e    str_free1_dx.c100644 765 144 1775 6231303726 12344 0ustar kevinusers/* * str.c * * Code for VAX STR$FREE1_DX routine * * Description: * * * Bugs: * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. */ #include #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$free1_dx * * Deallocates the described string space and flags * the descriptor as no string at all (dsc$a_pointer = 0, * dsc$w_length = 0). */ unsigned long str$free1_dx(struct dsc$descriptor_s* string_descriptor) { /* * Validate class */ if (str$$is_string_class(string_descriptor) != STR$_NORMAL) { DOSIGNAL(STR$_ILLSTRCLA); return STR$_ILLSTRCLA; } /* * Validate address */ if (string_descriptor->dsc$a_pointer == NULL) { DOSIGNAL(STR$_FATINTERR); return STR$_FATINTERR; } free(string_descriptor->dsc$a_pointer); string_descriptor->dsc$a_pointer = NULL; string_descriptor->dsc$w_length = 0; /* * Succussful operation */ return STR$_NORMAL; } str_free1_dx.o100644 765 144 2310 6263106721 12343 0ustar kevinusersELF4( UEPt*hj%h hT$jExu'h:j.h hD$7EPRE@Ef]01.012392148 && 0str_free1_dx.c%s:%u: failed assertion `%s' 2392132 && 0GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.comment,AKstr_free1_dx.cgcc2_compiled.str$free1_dxstr$$is_string_class__eprintffree@! xP +16<GD?QM  pP #( JQV[ x str_get1_dx.c100644 765 144 3517 6231304102 12163 0ustar kevinusers/* * str.c * * Code for VAX STR$GET1_DX routine * * Description: * * * Bugs: * * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design. */ #include #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$get1_dx * * Allocates a specified number of bytes of virtual memory * to a specified string descriptor. The descriptor must * be dynamic. * * If the string descriptor already has dynamic memory * allocated to it, but the amount is less than what is * asked for, the space will be deallocated before it * allocates new space. */ unsigned long str$get1_dx(unsigned short* word_integer_length, struct dsc$descriptor_s* character_string) { char* new_memory; /* * Validate string class */ if (character_string->dsc$b_class != DSC$K_CLASS_D) { DOSIGNAL(STR$_ILLSTRCLA); return(STR$_ILLSTRCLA); } /* * If memory is already allocated, redo the allocation */ if (character_string->dsc$a_pointer != NULL) { /* * Do we really need to change anything? */ if (character_string->dsc$w_length != *word_integer_length) { /* * Reallocate old memory */ new_memory = (char*)realloc(character_string->dsc$a_pointer, *word_integer_length); if (new_memory == NULL) { DOSIGNAL(STR$_INSVIRMEM); return STR$_INSVIRMEM; } character_string->dsc$a_pointer = new_memory; character_string->dsc$w_length = *word_integer_length; } } else { /* * Allocate some new memory */ character_string->dsc$a_pointer = (char*)malloc(*word_integer_length); if (character_string->dsc$a_pointer == NULL) { DOSIGNAL(STR$_INSVIRMEM); return STR$_INSVIRMEM; } character_string->dsc$w_length = *word_integer_length; } /* * Successful */ return STR$_NORMAL; } str_get1_dx.o100644 765 144 2534 6263106722 12212 0ustar kevinusersELF44( UE xt1hj.h hT$E xtwE Uff9t^ERE PRE}u*h9jCh hl$E UPE Uf fUERU BE xu h9jSh hl$ E Uf f ]01.012392148 && 0str_get1_dx.c%s:%u: failed assertion `%s' 2392172 && 0GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.comment$*4<str_get1_dx.cgcc2_compiled.str$get1_dx__eprintfreallocmalloc@$! p +d1d6d<xFDM   C! f w~   str_left.c100644 765 144 2341 6231311564 11566 0ustar kevinusers/* * str_left.c * * Code for VAX STR$LEFT routine * * Description: * * * Bugs: * * History * * Oct 15, 1996 - Kevin Handy * Preliminary design. */ #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$left * */ unsigned long str$left(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string, const long* end_position) { char* s2_ptr; /* Pointer to second string */ short s2_length; /* Length of second string */ int final_length; /* Signed final length */ unsigned short real_final_length; /* Usable final length */ unsigned long result; /* Result */ unsigned long second_result = STR$_NORMAL; /* * Determine how much we can use */ str$analyze_sdesc(source_string, &s2_length, &s2_ptr); final_length = min(s2_length, *end_position); if (final_length < 0) { real_final_length = 0; second_result = STR$_STRTOOLON; } else { real_final_length = (unsigned short) final_length; } /* * Move over the left part of the string */ result = str$copy_r(destination_string, &real_final_length, s2_ptr); /* * Done */ return result; } str_left.o100644 765 144 1704 6263106723 11610 0ustar kevinusersELF$4( UEEPEPE P UE9}E}}fEEt$fEfEEPEPEP EE ]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment $6str_left.cgcc2_compiled.str$leftstr$analyze_sdescstr$copy_r@! +16<E0  A e str_pos_extr.c100644 765 144 3420 6231317132 12473 0ustar kevinusers/* * str_right.c * * Code for VAX STR$POS_EXTR routine * * Description: * * * Bugs: * * History * * Oct 15, 1996 - Kevin Handy * Preliminary design. */ #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$pos_extr * */ unsigned long str$pos_extr(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string, const long* start_position, const long* end_position) { char* s2_ptr; /* Pointer to second string */ short s2_length; /* Length of second string */ int final_length; /* Signed final length */ unsigned short real_final_length; /* Usable final length */ unsigned long result; /* Result */ unsigned long second_result = STR$_NORMAL; /* Another possible result */ int start_offset = *start_position; /* Real start character */ /* * Validate input */ if (start_offset <= 0) { start_offset = 1; second_result = STR$_STRTOOLON; } /* * Determine how much we can use */ str$analyze_sdesc(source_string, &s2_length, &s2_ptr); final_length = s2_length - start_offset + 1; /* * Handle the end position business */ if (final_length > *end_position - *start_position + 1) { final_length = (*end_position - *start_position + 1); } /* * Now validate the final; length */ if (final_length < 0) { real_final_length = 0; second_result = STR$_STRTOOLON; } else { real_final_length = (unsigned short) final_length; } /* * Move over the left part of the string */ s2_ptr += start_offset - 1; result = str$copy_r(destination_string, &real_final_length, s2_ptr); /* * Done */ if (result == STR$_NORMAL) { return second_result; } else { return result; } } str_pos_extr.o100644 765 144 2074 6263106723 12522 0ustar kevinusersELF4( UEEU}EEt$EPEPE P E+UJMEU+P9U~EU+HM}}fEEt$fEfEEHEEPEPEP E}u"E-E ]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment,>str_pos_extr.cgcc2_compiled.str$pos_extrstr$analyze_sdescstr$copy_r@! ,+41464<HZE  PI6  str_right.c100644 765 144 3124 6263104066 11753 0ustar kevinusers/* * str_right.c * * Code for VAX STR$RIGHT routine * * Description: * * * Bugs: * * History * * Oct 15, 1996 - Kevin Handy * Preliminary design. * * 01/02/1996 - Kevin Handy * Fix starting position by one. */ #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$right * */ unsigned long str$right(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string, const long* start_position) { char* s2_ptr; /* Pointer to second string */ short s2_length; /* Length of second string */ int final_length; /* Signed final length */ unsigned short real_final_length; /* Usable final length */ unsigned long result; /* Result */ unsigned long second_result = STR$_NORMAL; /* Another possible result */ int start_offset = *start_position - 1; /* Real start character */ /* * Validate input */ if (start_offset <= 0) { start_offset = 1; second_result = STR$_STRTOOLON; } /* * Determine how much we can use */ str$analyze_sdesc(source_string, &s2_length, &s2_ptr); final_length = s2_length - start_offset; if (final_length < 0) { real_final_length = 0; second_result = STR$_STRTOOLON; } else { real_final_length = (unsigned short) final_length; } /* * Move over the left part of the string */ s2_ptr += start_offset; result = str$copy_r(destination_string, &real_final_length, s2_ptr); /* * Done */ if (result == STR$_NORMAL) { return second_result; } else { return result; } } str_right.o100644 765 144 2004 6263106724 11766 0ustar kevinusersELFd4( UEEJU}EEt$EPEPE P E+UU}}fEEt$ fEfEUUEPEPEP E}u#E.E ]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment &8str_right.cgcc2_compiled.str$rightstr$analyze_sdescstr$copy_r@! +16<*Ep   C7 { str_trim.c100644 765 144 2160 6263106473 11614 0ustar kevinusers/* * str.c * * Code for VAX STR$TRIM routine * * Description: * * Removes trailing spaces and tabs from the end of a * string. * * Bugs: * * * History * * Oct 16, 1996 - Kevin Handy * Preliminary design. */ #include #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$trim * */ unsigned long str$trim(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string, unsigned short* resultant_length) { char* s2_ptr; /* Pointer to string */ short s2_length; /* Length of string */ unsigned long result; /* Result */ int i; /* * Look at the original string */ str$analyze_sdesc(source_string, &s2_length, &s2_ptr); /* * Determine the end of the string */ while ((s2_length > 0) && ((s2_ptr[s2_length-1] == ' ') || (s2_ptr[s2_length-1] == '\t'))) { s2_length--; } /* * Now, copy that much to the destination */ result = str$copy_r(destination_string, &s2_length, s2_ptr); *resultant_length = s2_length; /* * Done */ return result; } str_trim.o100644 765 144 1744 6263106724 11636 0ustar kevinusersELFD4( UEPEPE P f}~/EUB8 t.EUB8 t fM봐EPEPEP EEfUfE]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment $6str_trim.cgcc2_compiled.str$trimstr$analyze_sdescstr$copy_r@! +16< EP  A } str_upcase.c100644 765 144 2072 6231310631 12107 0ustar kevinusers/* * str.c * * Code for VAX STR$UPCASE routine * * Description: * * * Bugs: * * * History * * Oct 16, 1996 - Kevin Handy * Preliminary design. */ #include #include #include #include #include "descrip.h" #include "strdef.h" /************************************************************* * str$upcase * */ unsigned long str$upcase(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string) { char* s1_ptr; /* Pointer to string */ short s1_length; /* Length of string */ unsigned long result; /* Working result */ /* * Copy over the string, retaining original case */ result = str$copy_dx(destination_string, source_string); /* * Analyze destination string */ if ((result & 1) == 1) { /* * Analyse the copies string */ str$analyze_sdesc(destination_string, &s1_length, &s1_ptr); /* * Transform it to upper case */ while(s1_length > 0) { *s1_ptr = toupper(*s1_ptr); s1_ptr++; s1_length--; } } /* * Done */ return result; } str_upcase.o100644 765 144 2000 6263106724 12125 0ustar kevinusersELFX4( U E PEPEEt[EPEPEP f}>EU ʍ  EfMÐE ]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment(4Fstr_upcase.cgcc2_compiled.str$upcasestr$copy_dxstr$analyze_sdesc__ctype_toupper@! +16<E@  V 2 d strdef.h100640 765 144 17453 6232045120 11257 0ustar kevinusers/* * str.h * * Code for VAX STR$ routines * * Description: * * This file contains various 'str$' functions equivalent * to those available in Vax/VMS string library. * * Bugs: * * Not compatible at the binary level. * * No seperate "string zone" to allocate memory from, * uses malloc/free instead. * * History * * Oct 10, 1996 - Kevin Handy * Preliminary design */ /* * Used for differences between C and C++ */ #ifdef __cplusplus #define PROTO #else #define PROTO #endif #define DOSIGNAL(x) assert(x && 0) #ifndef min #define min(x,y) ((x)<(y) ? (x) : (y)) #define max(x,y) ((x)>(y) ? (x) : (y)) #endif /* * String error messages */ #define STR$_FACILITY 36 #define STR$_FATINTERR 2392132 #define STR$_DIVBY_ZER 2392140 #define STR$_ILLSTRCLA 2392148 #define STR$_STRIS_INT 2392156 #define STR$_WRONUMARG 2392164 #define STR$_INSVIRMEM 2392172 #define STR$_STRTOOLON 2392180 #define STR$_ERRFREDYN 2392188 #define STR$_TRU 2392576 #define STR$_NOMATCH 2392584 #define STR$_INVDELIM 2392592 #define STR$_NOELEM 2392600 #define STR$_NEGSTRLEN 2393089 #define STR$_ILLSTRPOS 2393097 #define STR$_ILLSTRSPE 2393105 #define STR$_MATCH 2393113 #define STR$_NORMAL 1 /* * Constants */ extern const unsigned long str$_facility; extern const unsigned long str$_fatinterr; extern const unsigned long str$_divby_zer; extern const unsigned long str$_errfredyn; extern const unsigned long str$_illstrcla; extern const unsigned long str$_illstrpos; extern const unsigned long str$_illstrspe; extern const unsigned long str$_insvirmem; extern const unsigned long str$_invdelim; extern const unsigned long str$_match; extern const unsigned long str$_negstrlen; extern const unsigned long str$_noelem; extern const unsigned long str$_nomatch; extern const unsigned long str$_normal; extern const unsigned long str$_strtoolon; extern const unsigned long str$_stris_int; extern const unsigned long str$_tru; extern const unsigned long str$_wronumarg; /* * Prototypes */ PROTO unsigned long str$add(const unsigned long* asign, const long* aexp, const struct dsc$descriptor_s* adigits, const unsigned long* bsign, const long* bexp, const struct dsc$descriptor_s* bdigits, unsigned long* csign, long* cexp, struct dsc$descriptor_s* cdigits); PROTO void str$analyze_sdesc(const struct dsc$descriptor_s* input_descriptor, unsigned short* word_integer_length, char** data_address); PROTO unsigned long str$append(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string); PROTO long str$case_blind_compare( const struct dsc$descriptor_s* first_source_string, const struct dsc$descriptor_s* second_source_string); PROTO long str$compare( const struct dsc$descriptor_s* first_source_string, const struct dsc$descriptor_s* second_source_string); PROTO long str$compare_eql( const struct dsc$descriptor_s* first_source_string, const struct dsc$descriptor_s* second_source_string); PROTO long str$compare_multi( const struct dsc$descriptor_s* first_source_string, const struct dsc$descriptor_s* second_source_string, const long* flags_value, const long* foreign_language); PROTO unsigned long str$concat(struct dsc$descriptor_s* destination_string, ...); PROTO unsigned long str$copy_dx(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string); PROTO unsigned long str$copy_r(struct dsc$descriptor_s* destination_string, const short* word_integer_source_length, const void* source_string_address); PROTO unsigned long str$divide( const unsigned long* asign, const long* aexp, const struct dsc$descriptor_s* a_digits, const unsigned long* bsign, const long* bexp, const struct dsc$descriptor_s* b_digits, const long* total_digits, const long* round_truncate_indicator, unsigned long* csign, long* cexp, struct dsc$descriptor_s* cdigits); PROTO unsigned long str$dupl_char(struct dsc$descriptor_s* destination_string, const long* repetition_count, const char* ascii_character); PROTO unsigned long str$element(struct dsc$descriptor_s* destination_string, const long* element_number, const struct dsc$descriptor_s* delimiter_string, const struct dsc$descriptor_s* source_string); PROTO long str$find_first_in_set(const struct dsc$descriptor_s* source_string, const struct dsc$descriptor_s* set_of_characters); PROTO long str$find_first_not_in_set( const struct dsc$descriptor_s* source_string, const struct dsc$descriptor_s* set_of_characters); PROTO unsigned long str$find_first_substring( const struct dsc$descriptor_s* source_string, long* index, long* substring_index, ...); PROTO unsigned long str$free1_dx(struct dsc$descriptor_s* string_descriptor); PROTO unsigned long str$get1_dx(unsigned short* word_integer_length, struct dsc$descriptor_s* character_string); PROTO unsigned long str$left(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string, const long* end_position); PROTO unsigned long str$len_extr(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string, const long* start_position, const long* longword_integer_length); PROTO unsigned long str$match_wild(const struct dsc$descriptor_s* candidate_string, const struct dsc$descriptor_s* pattern_string); PROTO unsigned long str$mul(const unsigned long* asign, const long aexp, const struct dsc$descriptor_s* adigits, const unsigned long* bsign, const long* bexp, const struct dsc$descriptor_s* bdigits, unsigned long* csign, long* cexp, struct dsc$descriptor_s* cdigits); PROTO unsigned long str$position(const struct dsc$descriptor_s* source_string, const struct dsc$descriptor_s* substring, long* start_position); PROTO unsigned long str$pos_extr(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* cource_string, const long* start_position, const long* end_position); PROTO unsigned long str$prefix(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string); PROTO unsigned long str$recip( const unsigned long* asign, const long* aexp, const struct dsc$descriptor_s* adigits, const unsigned long* bsign, const long* bexp, const struct dsc$descriptor_s* bdigits, unsigned long* csign, long* cexp, struct dsc$descriptor_s* cdigits); PROTO unsigned long str$replace(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string, const long* start_position, const long* end_position, const struct dsc$descriptor_s* replacement_string); PROTO unsigned long str$right(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string, const long* start_position); PROTO unsigned long str$round(const long* places, unsigned long* flags, const unsigned long* asign, const long* aexp, const struct dsc$descriptor_s* adigits, const unsigned long* bsign, const long* bexp, const struct dsc$descriptor_s* bdigits, unsigned long* csign, long* cexp, struct dsc$descriptor_s* cdigits); PROTO unsigned long str$translate(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string, const struct dsc$descriptor_s* translation_string, const struct dsc$descriptor_s* match_string); PROTO unsigned long str$trim(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string, unsigned short* resultant_length); PROTO unsigned long str$upcase(struct dsc$descriptor_s* destination_string, const struct dsc$descriptor_s* source_string); /* * Some special functions that are not really part of str$, * but are used internally be them */ PROTO unsigned long str$$is_string_class( const struct dsc$descriptor_s* test_string); PROTO unsigned int str$$resize(struct dsc$descriptor_s* dest, short int size); PROTO unsigned long str$$copy_fill(char* dest_ptr, unsigned short dest_length, const char* source_ptr, unsigned short source_length, char fill); strlib.a100644 765 144 66256 6263106725 11306 0ustar kevinusers! / 852266453 0 0 0 946 ` 5FZ"Z(>-Z2^6:>BfGLRW[`dRhrstr$addstr$compare_multistr$dividestr$elementstr$find_first_in_setstr$find_first_not_in_setstr$find_first_substringstr$len_extrstr$match_wildstr$mulstr$positionstr$prefixstr$recipstr$replacestr$roundstr$translatestr$_failitystr$_divby_zerstr$_errfredynstr$_fatinterrstr$_illstrclastr$_illstrposstr$_illstrspestr$_insvirmemstr$_invdelimstr$_matchstr$_negstrlenstr$_noelemstr$_nomatchstr$_normalstr$_stris_intstr$_strtoolonstr$_trustr$_wronumargstr$$is_string_classstr$$copy_fillstr$$resizestr$analyze_sdescstr$appendstr$case_blind_comparestr$comparestr$compare_eqlstr$concatstr$copy_dxstr$copy_rstr$dupl_charstr$free1_dxstr$get1_dxstr$leftstr$pos_extrstr$rightstr$trimstr$upcase// 120 ` str__is_string_class.o/ str__copy_fill.o/ str_analyze_sdesc.o/ str_blind_compare.o/ str_compare_eql.o/ str_dupl_char.o/ str.o/ 852266444 501 100 100644 2460 ` ELF4( U]ÐUhjGhh]UhjVhh]Uhjehh]Uhjphh]Uhj|hh]Uhhhh]ÐUhhhh]ÐUhhhh]ÐUhhhh]ÐUhhhh]ÐUhhhh]ÐUhhhh]ÐUhhhh]ÐUhhhh]ÐUhhhh]01.010str.c%s:%u: failed assertion `%s' GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.comment 0:0 EP Qp g ###@#p####0#`#str.cgcc2_compiled.str$addstr$compare_multi__eprintfstr$dividestr$elementstr$find_first_in_setstr$find_first_not_in_setstr$find_first_substringstr$len_extrstr$match_wildstr$mulstr$positionstr$prefixstr$recipstr$replacestr$roundstr$translate@!  +16<&DM`   % 4;@E T[`e t{    #( DNSX t~    4>CH dnsx str__const.o/ 852266444 501 100 100644 1344 ` ELF4( 01.01$L$|$D$T$ $$l$$$$$$\$t$$d$GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.data.bss.note.rodata.comment*9H Wfu $(,048<@Dstr__const.cgcc2_compiled.str$_failitystr$_divby_zerstr$_errfredynstr$_fatinterrstr$_illstrclastr$_illstrposstr$_illstrspestr$_insvirmemstr$_invdelimstr$_matchstr$_negstrlenstr$_noelemstr$_nomatchstr$_normalstr$_stris_intstr$_strtoolonstr$_trustr$_wronumarg4!4'4,42HH:C  /0 852266445 501 100 100644 1036 ` ELF4( U}uD$EPB wQ@ppppppT$ ]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment'str__is_string_class.cgcc2_compiled.str$$is_string_class@! `+16< EP  <2@DHLPTX\`dh/24 852266445 501 100 100644 984 ` ELF@4( U WVS] u}f]fuMfEf9EsfEfEEPEPEP MME9E| EEUEfEf9Es&$/ e[^_]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment!0str__copy_fill.cgcc2_compiled.str$$copy_fillmemcpy@! +16<"Eh  7? str__resize.o/ 852266446 501 100 100644 1476 ` ELFD4( U S] f]EEPB @ppppExu hj3h hED$EPEPEyExu hjEh hED$EM9~‰UEPfEf%h9jMh hET$E ]]01.012392132 && 0str__resize.c%s:%u: failed assertion `%s' 2392148 && 0GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.commentG*4str__resize.cgcc2_compiled.str$$resize__eprintfstr$get1_dx@G!  +16<FDMD  @+@DHLPTX\`dhz   " /42 852266446 501 100 100644 1448 ` ELF4( USEPt9hj&h h!E fEExu8Ef8th?j1h h!E fEEx ufE UJffEUZE Uff9s*hcjAh h!%E Uf fEUJ]]01.012392148 && 0str_analyze_sdesc.c%s:%u: failed assertion `%s' input_descriptor->dsc$w_length == 0*word_integer_length <= input_descriptor->dsc$w_lengthGCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.comment$6Kstr_analyze_sdesc.cgcc2_compiled.str$analyze_sdescstr$$is_string_class__eprintf@! @h +`1`6`<tD Mp  0U  $) cjot  str_append.o/ 852266446 501 100 100644 1248 ` ELF4( UEExt*hj+h hT$EPEPEP EPEPE P fMfMfMEPEPE}uEPEPEUHP E]01.012392148 && 0str_append.c%s:%u: failed assertion `%s' GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.comment(2DPstr_append.cgcc2_compiled.str$append__eprintfstr$analyze_sdescstr$$resizememcpy@! @ +16<8DPbM  W#( M a ~  /63 852266447 501 100 100644 1224 ` ELF4( UEPEPEP EPEPE P fEf9E}fEfEEPEPEPn E}u3fEf9E~E fEf9E}E}}E}~EE]ÐUSE}t }uNEREËE RE )MM뫐E ]]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment$1HZstr_blind_compare.cgcc2_compiled.str__memicmpstr$case_blind_comparestr$analyze_sdesctolower@G!  +16<E  b '   str_compare.o/ 852266447 501 100 100644 1020 ` ELFT4( UEPEPEP EPEPE P fEf9E}fEfEEPEPEP E}u3fEf9E~E fEf9E}E}}E}~EE]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment*<str_compare.cgcc2_compiled.str$comparestr$analyze_sdescmemcmp@! +16<E`  C ' N /84 852266448 501 100 100644 980 ` ELF,4( UEPEPEP EPEPE P fEf9EtAEPEPEP t1 ]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment"2Dstr_compare_eql.cgcc2_compiled.str$compare_eqlstr$analyze_sdescmemcmp@! +16<E0  K ' N str_concat.o/ 852266448 501 100 100644 960 ` ELF 4( U EPEE EEEU}t}t.EPEPE붐E ]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment(5str_concat.cgcc2_compiled.str$concatstr$free1_dxstr$append@! +16<E0  @  Y str_copy_dx.o/ 852266448 501 100 100644 904 ` ELF4( U EEPEPE P EPEPEP EE]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.commentD*<str_copy_dx.cgcc2_compiled.str$copy_dxstr$analyze_sdescstr$copy_r@D! x+16<E  G . str_copy_r.o/ 852266449 501 100 100644 1276 ` ELF4( U EEPE}t,hj+h hEnE REPEEEPEPEP j E REPEPEPEE]01.01result && 0str_copy_r.c%s:%u: failed assertion `%s' GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.comment(=GSestr_copy_r.cgcc2_compiled.str$copy_rstr$$is_string_class__eprintfstr$$resizestr$analyze_sdescstr$$copy_fill@! @ +16<7D?QM  t %,16 \ z /103 852266449 501 100 100644 1316 ` ELF44( U EE } u EE U}tEU}}EE$}~-hjIh ht$EPEPE}tEEPEPEPEP E9E}EPEPEP E9E~E$E ]01.012392180 && 0str_dupl_char.c%s:%u: failed assertion `%s' GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.comment .8DVstr_dupl_char.cgcc2_compiled.str$dupl_char__eprintfstr$$resizestr$analyze_sdescmemset@! 8 +D1D6D<X;DM  ]T[`e    str_free1_dx.o/ 852266449 501 100 100644 1224 ` ELF4( UEPt*hj%h hT$jExu'h:j.h hD$7EPRE@Ef]01.012392148 && 0str_free1_dx.c%s:%u: failed assertion `%s' 2392132 && 0GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.comment,AKstr_free1_dx.cgcc2_compiled.str$free1_dxstr$$is_string_class__eprintffree@! xP +16<GD?QM  pP #( JQV[ x str_get1_dx.o/ 852266450 501 100 100644 1372 ` ELF44( UE xt1hj.h hT$E xtwE Uff9t^ERE PRE}u*h9jCh hl$E UPE Uf fUERU BE xu h9jSh hl$ E Uf f ]01.012392148 && 0str_get1_dx.c%s:%u: failed assertion `%s' 2392172 && 0GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.rodata.comment$*4<str_get1_dx.cgcc2_compiled.str$get1_dx__eprintfreallocmalloc@$! p +d1d6d<xFDM   C! f w~   str_left.o/ 852266451 501 100 100644 964 ` ELF$4( UEEPEPE P UE9}E}}fEEt$fEfEEPEPEP EE ]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment $6str_left.cgcc2_compiled.str$leftstr$analyze_sdescstr$copy_r@! +16<E0  A e str_pos_extr.o/ 852266451 501 100 100644 1084 ` ELF4( UEEU}EEt$EPEPE P E+UJMEU+P9U~EU+HM}}fEEt$fEfEEHEEPEPEP E}u"E-E ]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment,>str_pos_extr.cgcc2_compiled.str$pos_extrstr$analyze_sdescstr$copy_r@! ,+41464<HZE  PI6  str_right.o/ 852266452 501 100 100644 1028 ` ELFd4( UEEJU}EEt$EPEPE P E+UU}}fEEt$ fEfEUUEPEPEP E}u#E.E ]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment &8str_right.cgcc2_compiled.str$rightstr$analyze_sdescstr$copy_r@! +16<*Ep   C7 { str_trim.o/ 852266452 501 100 100644 996 ` ELFD4( UEPEPE P f}~/EUB8 t.EUB8 t fM봐EPEPEP EEfUfE]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment $6str_trim.cgcc2_compiled.str$trimstr$analyze_sdescstr$copy_r@! +16< EP  A } str_upcase.o/ 852266452 501 100 100644 1024 ` ELFX4( U E PEPEEt[EPEPEP f}>EU ʍ  EfMÐE ]01.01GCC: (GNU) 2.7.0.symtab.strtab.shstrtab.text.rel.text.data.bss.note.comment(4Fstr_upcase.cgcc2_compiled.str$upcasestr$copy_dxstr$analyze_sdesc__ctype_toupper@! +16<E@  V 2 d temp.log100644 765 144 4563 6231751740 11264 0ustar kevinusersStarting tests . . . Analyzing 'GlobalString1': Type: 14 Class: 1 Length: 15 Value: 'This is global1' Analyzing 'GlobalString2': Type: 14 Class: 1 Length: 28 Value: 'This is GlObAl2 . . . Longer' Analyzing 'Pre Test1': Type: 14 Class: 1 Length: 15 Value: 'This is global1' get1dx = 1 Analyzing 'get1_dx test': Type: 14 Class: 2 Length: 10 Value: 'qwertyuiop' str$append = 1 Analyzing 'appended': Type: 14 Class: 2 Length: 25 Value: 'qwertyuiopThis is global1' dupl_char = 1 Analyzing 'dupl': Type: 14 Class: 2 Length: 17 Value: 'RRRRRRRRRRRRRRRRR' left = 1 Analyzing 'left': Type: 14 Class: 2 Length: 8 Value: 'This is ' right = 1 Analyzing 'right': Type: 14 Class: 2 Length: 21 Value: ' GlObAl2 . . . Longer' upcase = 1 Analyzing 'upcase': Type: 14 Class: 2 Length: 28 Value: 'THIS IS GLOBAL2 . . . LONGER' trim = 1 (15) Analyzing 'trim': Type: 14 Class: 2 Length: 15 Value: 'This has spaces' pos_extr = 1Analyzing 'pos_extr': Type: 14 Class: 2 Length: 1 Value: ' ' free1dx = 1 Analyzing 'free1_dx test': Type: 14 Class: 2 Length: 0 Analyzing 'Global1': Type: 14 Class: 1 Length: 15 Value: 'This is global1' Analyzing 'Global2': Type: 14 Class: 1 Length: 28 Value: 'This is GlObAl2 . . . Longer' str$compare(1,1) = 0 str$compare(1,2) = 1 str$compare(2,1) = -1 str$compare(2,2) = 0 str$compare_eql(1,1) = 0 str$compare_eql(1,2) = 1 str$compare_eql(2,1) = 1 str$compare_eql(2,2) = 0 str$case_blind_compare(1,1) = 0 str$case_blind_compare(1,2) = -1 str$case_blind_compare(2,1) = 1 str$case_blind_compare(2,2) = 0 Copy_r = 1 Analyzing 'Test1': Type: 14 Class: 2 Length: 10 Value: 'A Test Str' Copy_r = 1 Analyzing 'Test3': Type: 14 Class: 1 Length: 20 Value: 'A Test Str ' Analyzing 'Global3': Type: 14 Class: 1 Length: 28 Value: 'This is GlObAl2 . . . Longer' copy_dx = 2392576 Analyzing 'Test3': Type: 14 Class: 1 Length: 20 Value: 'This is GlObAl2 . . ' KEVIN job terminated at 18-OCT-1996 11:28:21.62 Accounting information: Buffered I/O count: 95 Peak working set size: 559 Direct I/O count: 71 Peak page file size: 3206 Page faults: 1030 Mounted volumes: 0 Charged CPU time: 0 00:00:02.39 Elapsed time: 0 00:00:07.24 test.linux100644 765 144 3752 6231751705 11654 0ustar kevinusersStarting tests . . . Analyzing 'GlobalString1': Type: 14 Class: 1 Length: 15 Value: 'This is global1' Analyzing 'GlobalString2': Type: 14 Class: 1 Length: 28 Value: 'This is GlObAl2 . . . Longer' Analyzing 'Pre Test1': Type: 14 Class: 1 Length: 15 Value: 'This is global1' get1dx = 1 Analyzing 'get1_dx test': Type: 14 Class: 2 Length: 10 Value: 'qwertyuiop' str$append = 1 Analyzing 'appended': Type: 14 Class: 2 Length: 25 Value: 'qwertyuiopThis is global1' dupl_char = 1 Analyzing 'dupl': Type: 14 Class: 2 Length: 17 Value: 'RRRRRRRRRRRRRRRRR' left = 1 Analyzing 'left': Type: 14 Class: 2 Length: 8 Value: 'This is ' right = 1 Analyzing 'right': Type: 14 Class: 2 Length: 21 Value: ' GlObAl2 . . . Longer' upcase = 1 Analyzing 'upcase': Type: 14 Class: 2 Length: 28 Value: 'THIS IS GLOBAL2 . . . LONGER' trim = 1 (15) Analyzing 'trim': Type: 14 Class: 2 Length: 15 Value: 'This has spaces' pos_extr = 1Analyzing 'pos_extr': Type: 14 Class: 2 Length: 1 Value: ' ' free1dx = 1 Analyzing 'free1_dx test': Type: 14 Class: 2 Length: 0 Analyzing 'Global1': Type: 14 Class: 1 Length: 15 Value: 'This is global1' Analyzing 'Global2': Type: 14 Class: 1 Length: 28 Value: 'This is GlObAl2 . . . Longer' str$compare(1,1) = 0 str$compare(1,2) = 1 str$compare(2,1) = -1 str$compare(2,2) = 0 str$compare_eql(1,1) = 0 str$compare_eql(1,2) = 1 str$compare_eql(2,1) = 1 str$compare_eql(2,2) = 0 str$case_blind_compare(1,1) = 0 str$case_blind_compare(1,2) = -1 str$case_blind_compare(2,1) = 1 str$case_blind_compare(2,2) = 0 Copy_r = 1 Analyzing 'Test1': Type: 14 Class: 2 Length: 10 Value: 'A Test Str' Copy_r = 1 Analyzing 'Test3': Type: 14 Class: 1 Length: 20 Value: 'A Test Str ' Analyzing 'Global3': Type: 14 Class: 1 Length: 28 Value: 'This is GlObAl2 . . . Longer' copy_dx = 2392576 Analyzing 'Test3': Type: 14 Class: 1 Length: 20 Value: 'This is GlObAl2 . . ' teststr100755 765 144 42637 6263106725 11300 0ustar kevinusersELFP4D54 (44!!!1l"2/lib/ld-linux.so.1    X("2h<"2X.x6=3I"P3`1 jPp@vF1! "3I0 81(>8Q$22 3libc.so.5printf_DYNAMICmemcpy_IO_stderr_tolowermalloc___brk_addrfflush__ctype_toupper__environabort_init__libc_initenvironfprintf__fpu_controlreallocmemcmpmemset_finiatexit_GLOBAL_OFFSET_TABLE_exit__setfpucwfree_etext_edata__bss_start_end233 3111111 1 111222 2251%1%1h%1h%1h%1h%1h %1h(%1h0%1h8p%1h@`%1hHP%2hP@%2hX0%2h` % 2hh%2hpYЃPSQ̀-̀3D$13Ph0`KP][̀S1=1t Ѓ;u[ÐÐU(fE EEERh0h1hh1hfEEEEh1hEPEP Phj hEP EPhyh1EP(PhEPhGEPEPEPs PhKEPhEPh1EP- PhEPh EPh1EP Ph%EPh2h1EPPh8EPhFtEPh1EP PhMwEPhXeEPh_,EPEPh1EP Phd+EPhsEP6 Ph|EPhh1hh1hh1h1oPhh1h1MPhh1h1+Phch1h1 PhAh4h1h1Phh1h1xPh!h1h1VPh<h1h14PhWhh1h1Phr}h1h1Ph[h1h1Ph9h1h1Phh hEPEPM PhEPhfEEEjEhEPEP PhEPhYh1h"Gh1EPfPh*NEPh]ÐUEPh9EPEPE Px E PRhJE PRhVEPhc}tEPEPEPhqh]ÐUSEP3 t9hj&hhE fEExu8Ef8thj1hhE fEEx ufE UJffEUZE Uff9s*hjAhh$%E Uf fEUJ]]ÐUEExt*h j+h* h7  T$EPEPEP EPEPE P{ fMfMfMEPEP E}uEPEPEUHP E]ÐUEPEPEP EPEPE P fEf9E}fEfEEPEPEPn E}u3fEf9E~E fEf9E}E}}E}~EE]ÐUSE}t }uNEREËE RE )MM뫐E ]]ÐUEPEPEP EPEPE P fEf9E}fEfEEPEPEP E}u3fEf9E~E fEf9E}E}}E}~EE]ÐUEPEPEP EPEPE P fEf9EtAEPEPEP t1 ]ÐU EEPEPE PR EPEPEP EE]ÐU EEPJE}t,hU j+ha hn  EnE REPpEEEPEPEP j E REPEPEPtEE]ÐU EE } u EE U}tEU}}EE$}~-h jIh h t$EPEPE}tEEPEPEPEP E9E}EPEPEP E9E~E$E ]ÐUEPt*h j%h h $T$jExu'h!j.h h D$7EPR<E@Ef]ÐUE xt1h!j.h!h)!{T$E xtwE Uff9t^ERE PR>E}u*hG!jCh!h)!l$E UPE Uf fUERU BE xu hG!jSh!h)!l$ E Uf f ]ÐUEEPEPE PR UE9}E}}fEEt$fEfEEPEPEP EE ]ÐUEEU}EEt$EPEPE P E+UJMEU+P9U~EU+HM}}fEEt$fEfEEHEEPEPEP E}u"E-E ]ÐUEEJU}EEt$EPEPE P E+UU}}fEEt$ fEfEUUEPEPEPA E}u#E.E ]ÐUEPEPE P f}~/EUB8 t.EUB8 t fM봐EPEPEPo EEfUfE]ÐU E PEPEEt[EPEPEP* f}>EU ʍ 3 EfMÐE ]ÐU}uD$EPB wQPT$ ]ÐU WVS] u}f]fuMfEf9EsfEfEEPEPEPe MME9E| EEUEfEf9Es&$/ e[^_]ÐU S] f]EEPB  @Exu hT!j3ha!ho!ED$EPEPEyExu hT!jEha!ho!qED$EM9~‰UEPfEf%h!jMha!ho!*ET$E ]]ÐUS]M UEPRQSh2h2S1=1t Ѓ;u[ÐÐThis is global1This is GlObAl2 . . . LongerThis has spaces Starting tests . . . GlobalString1GlobalString2Pre Test1get1dx = %d qwertyuiopget1_dx teststr$append = %ld appendeddupl_char = %ld duplleft = %ld leftright = %ld rightupcase = %ld upcasetrim = %ld (%d) trimpos_extr = %ldpos_extrfree1dx = %d free1_dx testGlobal1Global2str$compare(1,1) = %d str$compare(1,2) = %d str$compare(2,1) = %d str$compare(2,2) = %d str$compare_eql(1,1) = %d str$compare_eql(1,2) = %d str$compare_eql(2,1) = %d str$compare_eql(2,2) = %d str$case_blind_compare(1,1) = %d str$case_blind_compare(1,2) = %d str$case_blind_compare(2,1) = %d str$case_blind_compare(2,2) = %d A Test StringCopy_r = %ld Test1Test3Global3copy_dx = %ld Analyzing '%s': Type: %d Class: %d Length: %d Value: '%*.*s' 2392148 && 0str_analyze_sdesc.c%s:%u: failed assertion `%s' input_descriptor->dsc$w_length == 0*word_integer_length <= input_descriptor->dsc$w_length2392148 && 0str_append.c%s:%u: failed assertion `%s' result && 0str_copy_r.c%s:%u: failed assertion `%s' 2392180 && 0str_dupl_char.c%s:%u: failed assertion `%s' 2392148 && 0str_free1_dx.c%s:%u: failed assertion `%s' 2392132 && 02392148 && 0str_get1_dx.c%s:%u: failed assertion `%s' 2392172 && 02392132 && 0str__resize.c%s:%u: failed assertion `%s' 2392148 && 08He2^n~.> @ 0  1x m# d)dP<_5y0]x=l58_)?wtBC DEF)H4I?LJRWuv*":#I'V(c)o*}+,-23456789M^ M ~  ;  L M $v v w x y @v @w @x @ydlibgcc2.c/home/dist/linux/usr/bin/gcc//opt/release/pub/gcc-2.7.0/./libgcc2.cgcc2_compiled.int:t1=r1;-2147483648;2147483647;char:t2=r2;0;127;long int:t3=r1;-2147483648;2147483647;unsigned int:t4=r1;0;-1;long unsigned int:t5=r1;0;-1;long long int:t6=r1;01000000000000000000000;0777777777777777777777;long long unsigned int:t7=r1;0000000000000;01777777777777777777777;short int:t8=r1;-32768;32767;short unsigned int:t9=r1;0;65535;signed char:t10=r1;-128;127;unsigned char:t11=r1;0;255;float:t12=r1;4;0;double:t13=r1;8;0;long double:t14=r1;12;0;complex int:t15=s8real:1,0,32;imag:1,32,32;;complex float:t16=r16;4;0;complex double:t17=r17;8;0;complex long double:t18=r18;12;0;void:t19=19reg_class:T20=eNO_REGS:0,AREG:1,DREG:2,\CREG:3,BREG:4,AD_REGS:5,Q_REGS:6,\SIREG:7,DIREG:8,INDEX_REGS:9,GENERAL_REGS:10,\FP_TOP_REG:11,FP_SECOND_REG:12,FLOAT_REGS:13,\ALL_REGS:14,LIM_REG_CLASSES:15,;i386_args:T21=s12words:1,0,32;nregs:1,32,32;\regno:1,64,32;;CUMULATIVE_ARGS:t21machine_mode:T22=eVOIDmode:0,QImode:1,HImode:2,\PSImode:3,SImode:4,PDImode:5,DImode:6,\TImode:7,OImode:8,QFmode:9,HFmode:10,\TQFmode:11,SFmode:12,DFmode:13,XFmode:14,\TFmode:15,SCmode:16,DCmode:17,XCmode:18,\TCmode:19,CQImode:20,CHImode:21,CSImode:22,\CDImode:23,CTImode:24,COImode:25,\BLKmode:26,CCmode:27,CCFPEQmode:28,\MAX_MACHINE_MODE:29,;mode_class:T23=eMODE_RANDOM:0,MODE_INT:1,MODE_FLOAT:2,\MODE_PARTIAL_INT:3,MODE_CC:4,MODE_COMPLEX_INT:5,\MODE_COMPLEX_FLOAT:6,MAX_MODE_CLASS:7,;ptrdiff_t:t1size_t:t4wchar_t:t3UQItype:t11SItype:t1USItype:t4DItype:t6UDItype:t7SFtype:t12DFtype:t13XFtype:t14word_type:t1DIstruct:T24=s8low:1,0,32;high:1,32,32;;DIunion:t25=u8s:24,0,64;ll:6,0,64;;__long_double_t:t14_G_clock_t:t3_G_dev_t:t9_G_fpos_t:t3_G_gid_t:t9_G_ino_t:t5_G_mode_t:t9_G_nlink_t:t9_G_off_t:t3_G_pid_t:t1_G_ptrdiff_t:t1_G_sigset_t:t5_G_size_t:t4_G_time_t:t3_G_uid_t:t9_G_wchar_t:t3_G_ssize_t:t1_G_wint_t:t1_G_va_list:t26=*19_G_int8_t:t10_G_uint8_t:t11_G_int16_t:t8_G_uint16_t:t9_G_int32_t:t1_G_uint32_t:t4_G_int64_t:t6_G_uint64_t:t7_IO_lock_t:T27=s8ptr:26,0,32;field1:8,32,16;\field2:8,48,16;;_IO_marker:T28=s12_next:29=*28,0,32;_sbuf:30=*31=xs_IO_FILE:,32,32;\_pos:1,64,32;;_IO_FILE:T31=s80_flags:1,0,32;_IO_read_ptr:32=*2,32,32;\_IO_read_end:32,64,32;_IO_read_base:32,96,32;\_IO_write_base:32,128,32;_IO_write_ptr:32,160,32;\_IO_write_end:32,192,32;_IO_buf_base:32,224,32;\_IO_buf_end:32,256,32;_IO_save_base:32,288,32;_IO_backup_base:32,320,32;\_IO_save_end:32,352,32;_markers:29,384,32;_chain:30,416,32;\_fileno:1,448,32;_blksize:1,480,32;_offset:3,512,32;\_cur_column:9,544,16;_unused:2,560,8;_shortbuf:33=ar1;0;0;2,568,8;\_IO_lock:27,576,64;;_IO_FILE:t31FILE:t31fpos_t:t3__eprintf:F19string:p34=*2expression:p34line:p1filename:p34string:r34expression:r34line:r1filename:r34GCC: (GNU) 2.6.4 snapshot 950518GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.7.0GCC: (GNU) 2.6.4 snapshot 950518.symtab.strtab.shstrtab.interp.hash.dynsym.dynstr.rel.bss.rel.plt.init.plt.text.fini.rodata.data.ctors.dtors.got.dynamic.bss.stab.stabstr.comment#) 1 9  B xK@@QHHVPP\00b88bj1!p1!w1!~1!H2"2"h"( '# 249pP tA+        11 >  I1 W1dk   p 1 I1 1               ` '  4 p D  S 0 a ` l  {     p       X("0 2$h<2XG x'. 9  D3P"W3g1 qPw@}F1! "0   3P p P ` p   !0$ -29I@" E N1 \  n 0 81 `D 21 31  (>  8Q crtstuff.cgcc2_compiled.__do_global_ctors_aux__CTOR_END__init_dummyforce_to_data__DTOR_END__crt0.Sdone__do_global_dtors_aux__DTOR_LIST__fini_dummy__CTOR_LIST__teststr.cstr_analyze_sdesc.cstr_append.cstr_blind_compare.cstr__memicmpstr_compare.cstr_compare_eql.cstr_copy_dx.cstr_copy_r.cstr_dupl_char.cstr_free1_dx.cstr_get1_dx.cstr_left.cstr_pos_extr.cstr_right.cstr_trim.cstr_upcase.cstr__is_string_class.cstr__copy_fill.cstr__resize.clibgcc2.cprintf__eprintf_DYNAMIC_etextmemcpy_IO_stderr_str$$resizetolowermallocstr$copy_rstr$append___brk_addrfflush__ctype_toupper__environabort_init__libc_initenvironfprintftestanalstr$compare_eql__fpu_control_startstr$upcase___crt_dummy__reallocstr$leftstr$dupl_charmemcmpstr$free1_dxstr$pos_extrstr$get1_dx__bss_startmemsetmainstr$trimGlobalString2str$analyze_sdescstr$$is_string_class_finiatexitGlobalString1str$copy_dx_edata_GLOBAL_OFFSET_TABLE__endexitGlobalString3str$$copy_fill__setfpucwstr$comparestr$rightfreestr$case_blind_compareteststr.c100644 765 144 10760 6231751611 11501 0ustar kevinusers/* * teststr.c * * Test program for str functions * * Notes: * * This program should be run using the Free-VMS packages * 'str$' functions, Vax/VMS's, and Alpha/VMS's to make * sure they all happily work the same. * * History: * * Oct 10, 1996 - Kevin Handy * Initial version */ #include #include "descrip.h" #include "strdef.h" /* * Prototypes */ void testanal(char* Title, struct dsc$descriptor_s* strptr); /* * Some local constants */ $DESCRIPTOR(GlobalString1, "This is global1"); $DESCRIPTOR(GlobalString2, "This is GlObAl2 . . . Longer"); $DESCRIPTOR(GlobalString3, "This has spaces "); main() { struct dsc$descriptor_s Test1; struct dsc$descriptor_s Test2; struct dsc$descriptor_s Test3; unsigned short ten = 10; long seventeen = 17; long eight = 8; char TextChar = 'R'; short answer1; /* * Lets prove we started */ printf("Starting tests . . .\n"); /* * See if $DESCRIPTOR works */ testanal("GlobalString1", &GlobalString1); testanal("GlobalString2", &GlobalString2); /* * Let's try str$get1_dx */ Test1.dsc$w_length = 0; Test1.dsc$b_class = DSC$K_CLASS_D; Test1.dsc$b_dtype = DSC$K_DTYPE_T; Test1.dsc$a_pointer = NULL; testanal("Pre Test1", &GlobalString1); printf("get1dx = %d\n", str$get1_dx(&ten, &Test1)); memcpy(Test1.dsc$a_pointer, "qwertyuiop", 10); /* Force out garbage */ testanal("get1_dx test", &Test1); /* * Let's try an append while we have a dynamic string */ printf("str$append = %ld\n", str$append(&Test1, &GlobalString1)); testanal("appended", &Test1); /* * Now test dupl_char */ printf("dupl_char = %ld\n", str$dupl_char(&Test1, &seventeen, &TextChar)); testanal("dupl", &Test1); printf("left = %ld\n", str$left(&Test1, &GlobalString2, &eight)); testanal("left", &Test1); printf("right = %ld\n", str$right(&Test1, &GlobalString2, &eight)); testanal("right", &Test1); printf("upcase = %ld\n", str$upcase(&Test1, &GlobalString2)); testanal("upcase", &Test1); printf("trim = %ld", str$trim(&Test1, &GlobalString3, &answer1)); printf(" (%d)\n", answer1); testanal("trim", &Test1); printf("pos_extr = %ld", str$pos_extr(&Test1, &GlobalString2, &eight, &eight)); testanal("pos_extr", &Test1); /* * Free1_dx */ printf("free1dx = %d\n", str$free1_dx(&Test1)); testanal("free1_dx test", &Test1); /* * Comparisons */ testanal("Global1", &GlobalString1); testanal("Global2", &GlobalString2); printf("str$compare(1,1) = %d\n", str$compare(&GlobalString1, &GlobalString1)); printf("str$compare(1,2) = %d\n", str$compare(&GlobalString1, &GlobalString2)); printf("str$compare(2,1) = %d\n", str$compare(&GlobalString2, &GlobalString1)); printf("str$compare(2,2) = %d\n", str$compare(&GlobalString2, &GlobalString2)); printf("\n"); printf("str$compare_eql(1,1) = %d\n", str$compare_eql(&GlobalString1, &GlobalString1)); printf("str$compare_eql(1,2) = %d\n", str$compare_eql(&GlobalString1, &GlobalString2)); printf("str$compare_eql(2,1) = %d\n", str$compare_eql(&GlobalString2, &GlobalString1)); printf("str$compare_eql(2,2) = %d\n", str$compare_eql(&GlobalString2, &GlobalString2)); printf("\n"); printf("str$case_blind_compare(1,1) = %d\n", str$case_blind_compare(&GlobalString1, &GlobalString1)); printf("str$case_blind_compare(1,2) = %d\n", str$case_blind_compare(&GlobalString1, &GlobalString2)); printf("str$case_blind_compare(2,1) = %d\n", str$case_blind_compare(&GlobalString2, &GlobalString1)); printf("str$case_blind_compare(2,2) = %d\n", str$case_blind_compare(&GlobalString2, &GlobalString2)); printf("\n"); printf("Copy_r = %ld\n", str$copy_r(&Test1, &ten, &"A Test String")); testanal("Test1", &Test1); Test3.dsc$w_length = 20; Test3.dsc$b_class = DSC$K_CLASS_S; Test3.dsc$b_dtype = DSC$K_DTYPE_T; Test3.dsc$a_pointer = (char*)malloc(20); printf("Copy_r = %ld\n", str$copy_r(&Test3, &ten, &"A Test String")); testanal("Test3", &Test3); testanal("Global3", &GlobalString2); printf("copy_dx = %ld\n", str$copy_dx(&Test3, &GlobalString2)); testanal("Test3", &Test3); } void testanal(char* Title, struct dsc$descriptor_s* strptr) { char* s1_ptr; /* Pointer to first string */ short s1_length; /* Length of first string */ printf("Analyzing '%s':\n", Title); str$analyze_sdesc(strptr, &s1_length, &s1_ptr); printf(" Type: %d\n", strptr->dsc$b_dtype); printf(" Class: %d\n", strptr->dsc$b_class); printf(" Length: %d\n", s1_length); if (s1_ptr != NULL) { printf(" Value: '%*.*s'\n", s1_length, s1_length, s1_ptr); } printf("\n"); }