Lines Matching defs:theHandle
817 OSErr CopyLongIntToNewHandle(const long inTheLongInt,Handle *theHandle)
825 errCode = CopyCStrToNewHandle(tempString,theHandle);
831 OSErr CopyLongIntToExistingHandle(const long inTheLongInt,Handle theHandle)
839 errCode = CopyCStrToExistingHandle(tempString,theHandle);
847 OSErr CopyCStrToExistingHandle(const char *theCString,Handle theHandle)
858 if (theHandle == nil)
860 SetErrorMessageAndBail(("CopyCStrToExistingHandle: Bad parameter, theHandle == nil"));
863 if (*theHandle == nil)
865 SetErrorMessageAndBail(("CopyCStrToExistingHandle: Bad parameter, *theHandle == nil"));
872 SetHandleSize(theHandle,stringLength);
874 if (GetHandleSize(theHandle) < stringLength)
880 ::BlockMove(theCString,*theHandle,stringLength);
892 OSErr CopyCStrToNewHandle(const char *theCString,Handle *theHandle)
903 if (theHandle == nil)
905 SetErrorMessageAndBail(("CopyCStrToNewHandle: Bad parameter, theHandle == nil"));
912 *theHandle = NewHandle(stringLength);
914 if (*theHandle == nil)
920 ::BlockMove(theCString,**theHandle,stringLength);
930 OSErr CopyPStrToNewHandle(const unsigned char *thePString,Handle *theHandle)
941 if (theHandle == nil)
943 SetErrorMessageAndBail(("CopyPStrToNewHandle: Bad parameter, theHandle == nil"));
950 *theHandle = NewHandle(stringLength);
952 if (*theHandle == nil)
960 BlockMove(thePString + 1,**theHandle,stringLength - 1);
963 (**theHandle)[stringLength - 1] = 0;
972 OSErr AppendPStrToHandle(const unsigned char *thePString,Handle theHandle,long *currentLength)
980 errCode = AppendCStrToHandle(tempString,theHandle,currentLength);
990 OSErr AppendCStrToHandle(const char *theCString,Handle theHandle,long *currentLength,long *maxLength)
1001 if (theHandle == nil)
1003 SetErrorMessageAndBail(("AppendCStrToHandle: Bad parameter, theHandle == nil"));
1014 handleMaxLength = GetHandleSize(theHandle);
1025 handleCurrentLength = CStrLength(*theHandle);
1035 SetHandleSize(theHandle,handleCurrentLength + stringLength + 1);
1039 *maxLength = GetHandleSize(theHandle);
1046 handleMaxLength = GetHandleSize(theHandle);
1056 BlockMove(theCString,*theHandle + handleCurrentLength,stringLength + 1);
1075 OSErr AppendCharsToHandle(const char *theChars,const int numChars,Handle theHandle,long *currentLength,long *maxLength)
1086 if (theHandle == nil)
1088 SetErrorMessageAndBail(("AppendCharsToHandle: Bad parameter, theHandle == nil"));
1099 handleMaxLength = GetHandleSize(theHandle);
1110 handleCurrentLength = CStrLength(*theHandle);
1118 SetHandleSize(theHandle,handleCurrentLength + numChars + 1);
1122 *maxLength = GetHandleSize(theHandle);
1129 handleMaxLength = GetHandleSize(theHandle);
1139 BlockMove(theChars,*theHandle + handleCurrentLength,numChars);
1141 (*theHandle)[handleCurrentLength + numChars] = '\0';
1159 OSErr AppendLongIntToHandle(const long inTheLongInt,Handle theHandle,long *currentLength)
1167 errCode = AppendCStrToHandle(tempString,theHandle,currentLength);
1510 OSErr InsertCStrIntoHandle(const char *theCString,Handle theHandle,const long inInsertOffset)
1519 SetErrorMessageAndBailIfNil(theHandle,"InsertCStrIntoHandle: Bad parameter, theHandle == nil");
1521 currentLength = CStrLength(*theHandle);
1523 if (currentLength + 1 > ::GetHandleSize(theHandle))
1535 ::SetHandleSize(theHandle,currentLength + 1 + insertLength);
1537 if (::GetHandleSize(theHandle) < currentLength + 1 + insertLength)
1542 ::BlockMove(*theHandle + inInsertOffset,*theHandle + inInsertOffset + insertLength,currentLength - inInsertOffset + 1);
1544 ::BlockMove(theCString,*theHandle + inInsertOffset,insertLength);
1698 OSErr CopyCStrAndInsertCStrLongIntIntoHandle(const char *theSrcCStr,const char *theInsertCStr,const long theNum,Handle *theHandle)
1704 if (theHandle != nil)
1708 *theHandle = NewHandle(byteCount);
1710 if (*theHandle == nil)
1716 HLock(*theHandle);
1718 CopyCStrAndInsertCStrLongIntIntoCStr(theSrcCStr,theInsertCStr,theNum,**theHandle,byteCount);
1720 HUnlock(*theHandle);