Sources/PLStrs.c

/*
    PLStrs.c
    
    Version 3.1
    
    Copyright © 1995 Apple Computer, Inc., all rights reserved.
    
    MenuScripter by Nigel Humphreys and Jon Lansdell
    AppleEvent to script extensions by Greg Sutton
*/
 
#include "PLStrs.h"
 
#include <memory.h>
 
pascal StringPtr    PLstrcpy(StringPtr str1, StringPtr str2)
    {
      BlockMove(str2, str1, str2[0] + 1);
      return(str1);
    }
    
pascal StringPtr    PLstrcat(StringPtr str1, StringPtr str2)
    {
        long copyLen;
        
      if (str1[0] + 1 + str2[0]>255)
        copyLen = 255 - str1[0];
      else
        copyLen = str2[0];
        
      BlockMove(&str2[1], str1 + 1 + str1[0], copyLen);
      str1[0] += copyLen;
      
      return(str1);
    }