$save nolist /* *============================================================================ * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE * * Permission to use for any purpose, modify, copy, and make enhancements * and derivative works of the software is granted if attribution is given to * R.M. Gillmore, dba the ACME Software Deli, as the author * * While the ACME Software Deli does not work for money, there is nonetheless * a significant amount of work involved. The ACME Software Deli maintains the * rights to all code written, though it may be used and distributed as long as * the following conditions are maintained. * * 1. The copyright statement at the top of each code block is maintained in * your distribution. * 2. You do not identify yourself as the ACME Software Deli * 3. Any changes made to the software are sent to the ACME Software Deli *============================================================================ */ /* * $Id: string.ext 1157 2025-05-05 00:35:39Z rmgillmore $ */ $if not STRING_EXT_INCLUDED $set (STRING_EXT_INCLUDED) $include (..\lib\comnDefs.ext) declare stringArray_t literally ' structure ( stringSegments pointer, /* a pointer to an array of pointers to strings */ numberSegments integer /* the number of defined strings */ )'; $if not memsetSource memset: procedure ( basePtr, byteToWrite, arrayLength ) external; declare basePtr pointer, byteToWrite byte, arrayLength word; end memset; $endif $if not memcpySource memcpy: procedure ( destinationPtr, sourcePtr, arrayLength ) external; declare destinationPtr pointer, sourcePtr pointer, arrayLength word; end memcpy; $endif $if not memcmpSource memcmp: procedure ( leftBlockPtr, rightBlockPtr, arrayLength ) boolean external; declare leftBlockPtr pointer, rightBlockPtr pointer, arrayLength word; end memcmp; $endif $if not toupperSource toupper: procedure ( charIn ) char external; declare charIn char; end toupper; $endif $if not tolowerSource tolower: procedure ( charIn ) char external; declare charIn char; end tolower; $endif $if not strlenSource strlen: procedure ( stringPtr ) word external; declare stringPtr pointer; end strlen; $endif $if not strchrSource strchr: procedure ( stringPtr, charIn ) pointer external; declare stringPtr pointer, charIn char; end strchr; $endif $if not strrchrSource strrchr: procedure ( stringPtr, charIn ) pointer external; declare stringPtr pointer, charIn char; end strrchr; $endif $if not struprSource strupr: procedure ( stringPtr ) external; declare stringPtr pointer; end strupr; $endif $if not strlwrSource strlwr: procedure ( stringPtr ) external; declare stringPtr pointer; end strlwr; $endif $if not strcpySource strcpy: procedure ( destinationPtr, sourcePtr ) external; declare destinationPtr pointer, sourcePtr pointer; end strcpy; $endif $if not strncpySource strncpy: procedure ( destinationPtr, sourcePtr, maxStringLength ) external; declare destinationPtr pointer, sourcePtr pointer, maxStringLength word; end strncpy; $endif $if not strdupSource strdup: procedure ( inputStringPtr ) pointer external; declare inputStringPtr pointer; end strdup; $endif $if not strcatSource strcat: procedure ( destinationPtr, sourcePtr ) external; declare destinationPtr pointer, sourcePtr pointer; end strcat; $endif $if not strncatSource strncat: procedure ( destinationPtr, sourcePtr, maxNumberBytes ) external; declare destinationPtr pointer, sourcePtr pointer, maxNumberBytes word; end strncat; $endif $if not strcmpSource strcmp: procedure ( leftPtr, rightPtr ) integer external; declare leftPtr pointer, rightPtr pointer; end strcmp; $endif $if not stricmpSource stricmp: procedure ( leftPtr, rightPtr ) integer external; declare leftPtr pointer, rightPtr pointer; end stricmp; $endif $if not stringCharSource insertCharAtIndex: procedure ( stringPtr, charToInsert, stringIndex ) external; declare stringPtr pointer, charToInsert char, stringIndex integer; end insertCharAtIndex; removeCharAtIndex: procedure ( stringPtr, stringIndex ) external; declare stringPtr pointer, stringIndex integer; end removeCharAtIndex; $endif $if not strSplitSource /* * returns a pointer to a stringArray_t */ strSplit: procedure ( initialAllowance, maxLineLength, stringToDivide ) pointer external; declare initialAllowance integer, maxLineLength integer, stringToDivide pointer; /* the address of the character array */ end strSplit; $endif $endif $restore