home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
source
/
luschsrc.sit
/
string.c
< prev
next >
Wrap
Text File
|
1990-05-23
|
938b
|
42 lines
/********************************************************************************
* string.c
*
* String Handling Package
*
* Written by Paco Xander Nathan
* ⌐1990, Motorola Inc. Public domain source code.
********************************************************************************/
#include "applic.h"
#include "string.h"
/* Copy a pascal string from p1 to p2
*/
void
StrPCpy (p2, p1)
register StringPtr p1, p2;
{
if (p1 && p2)
BlockMove(p1, p2, (long) (*p1 + 1));
}
/* Get name from chooser desk accessory
*/
OSErr
StrGetChooser (theName)
register StringPtr theName;
{
register StringHandle strHndl;
strHndl = GetString(-16096); /* resID of chooser string */
if (strHndl) { /* if resource actually exists */
StrPCpy(theName, (StringPtr) *strHndl); /* copy string to Name param */
ReleaseResource((Handle) strHndl); /* release the resource */
return(noErr);
}
return(nilHandleErr);
}