mirror of https://github.com/macssh/macssh.git
Replace internal pstrcat() with PLstrcat()
This commit is contained in:
parent
6f46df7db9
commit
d59263d9df
|
@ -62,7 +62,7 @@ void PathNameFromDirID(long dirID, short vRefNum, StringPtr fullPathName)
|
||||||
block.dirInfo.ioFDirIndex = -1;
|
block.dirInfo.ioFDirIndex = -1;
|
||||||
block.dirInfo.ioDrDirID = block.dirInfo.ioDrParID;
|
block.dirInfo.ioDrDirID = block.dirInfo.ioDrParID;
|
||||||
if ((err = PBGetCatInfoSync(&block)) != noErr) return;
|
if ((err = PBGetCatInfoSync(&block)) != noErr) return;
|
||||||
pstrcat(directoryName, (StringPtr)"\p/");
|
PLstrcat(directoryName, (StringPtr)"\p/");
|
||||||
pstrinsert(fullPathName, directoryName);
|
pstrinsert(fullPathName, directoryName);
|
||||||
} while (block.dirInfo.ioDrDirID != 2);
|
} while (block.dirInfo.ioDrDirID != 2);
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,7 @@ Boolean VSopencapture(short scrn_num, short w)
|
||||||
NumToString(captNumber++, numstring);
|
NumToString(captNumber++, numstring);
|
||||||
GetIndString(filename, MISC_STRINGS, CAPTFILENAME);
|
GetIndString(filename, MISC_STRINGS, CAPTFILENAME);
|
||||||
filename[++(filename[0])] = ' ';
|
filename[++(filename[0])] = ' ';
|
||||||
pstrcat(filename, numstring);
|
PLstrcat(filename, numstring);
|
||||||
|
|
||||||
GetIndString(tempString,MISC_STRINGS,SAVE_CAPTURED_TEXT_STRING);
|
GetIndString(tempString,MISC_STRINGS,SAVE_CAPTURED_TEXT_STRING);
|
||||||
SFPutFile(where,tempString, filename, NULL, &sfr);
|
SFPutFile(where,tempString, filename, NULL, &sfr);
|
||||||
|
|
|
@ -834,7 +834,7 @@ static OSErr BoolItemToFile(short refNum, short index, Boolean value)
|
||||||
Str255 tempStr;
|
Str255 tempStr;
|
||||||
|
|
||||||
GetIndString( tempStr, SAVE_SET_STRINGS_ID, index );
|
GetIndString( tempStr, SAVE_SET_STRINGS_ID, index );
|
||||||
pstrcat( tempStr, (value) ? "\p = yes\015" : "\p = no\015" );
|
PLstrcat( tempStr, (value) ? "\p = yes\015" : "\p = no\015" );
|
||||||
count = tempStr[0];
|
count = tempStr[0];
|
||||||
theErr = FSWrite( refNum, &count, (Ptr)tempStr + 1 );
|
theErr = FSWrite( refNum, &count, (Ptr)tempStr + 1 );
|
||||||
return theErr;
|
return theErr;
|
||||||
|
@ -852,9 +852,9 @@ static OSErr IntItemToFile(short refNum, short index, int value)
|
||||||
|
|
||||||
GetIndString( tempStr, SAVE_SET_STRINGS_ID, index );
|
GetIndString( tempStr, SAVE_SET_STRINGS_ID, index );
|
||||||
NumToString( value, numStr );
|
NumToString( value, numStr );
|
||||||
pstrcat( tempStr, "\p = " );
|
PLstrcat( tempStr, "\p = " );
|
||||||
pstrcat( tempStr, numStr );
|
PLstrcat( tempStr, numStr );
|
||||||
pstrcat( tempStr, "\p\015" );
|
PLstrcat( tempStr, "\p\015" );
|
||||||
count = tempStr[0];
|
count = tempStr[0];
|
||||||
theErr = FSWrite( refNum, &count, (Ptr)tempStr + 1 );
|
theErr = FSWrite( refNum, &count, (Ptr)tempStr + 1 );
|
||||||
return theErr;
|
return theErr;
|
||||||
|
@ -874,7 +874,7 @@ static OSErr CStringItemToFile(short refNum, short index, char *value)
|
||||||
len = strlen(value);
|
len = strlen(value);
|
||||||
if ( len ) {
|
if ( len ) {
|
||||||
GetIndString( tempStr, SAVE_SET_STRINGS_ID, index );
|
GetIndString( tempStr, SAVE_SET_STRINGS_ID, index );
|
||||||
pstrcat( tempStr, "\p = \"" );
|
PLstrcat( tempStr, "\p = \"" );
|
||||||
count = tempStr[0];
|
count = tempStr[0];
|
||||||
theErr = FSWrite( refNum, &count, (Ptr)tempStr + 1 );
|
theErr = FSWrite( refNum, &count, (Ptr)tempStr + 1 );
|
||||||
if ( !theErr ) {
|
if ( !theErr ) {
|
||||||
|
@ -903,7 +903,7 @@ static OSErr PStringItemToFile(short refNum, short index, StringPtr value)
|
||||||
|
|
||||||
if ( value[0] ) {
|
if ( value[0] ) {
|
||||||
GetIndString( tempStr, SAVE_SET_STRINGS_ID, index );
|
GetIndString( tempStr, SAVE_SET_STRINGS_ID, index );
|
||||||
pstrcat( tempStr, "\p = \"" );
|
PLstrcat( tempStr, "\p = \"" );
|
||||||
count = tempStr[0];
|
count = tempStr[0];
|
||||||
theErr = FSWrite( refNum, &count, (Ptr)tempStr + 1 );
|
theErr = FSWrite( refNum, &count, (Ptr)tempStr + 1 );
|
||||||
if ( !theErr ) {
|
if ( !theErr ) {
|
||||||
|
|
|
@ -795,15 +795,6 @@ void StandardFileCenter(Point *where, short id)
|
||||||
|
|
||||||
/* Pascal string utilities */
|
/* Pascal string utilities */
|
||||||
|
|
||||||
/* pstrcat - add string 'src' to end of string 'dst' */
|
|
||||||
void pstrcat(StringPtr dst, StringPtr src)
|
|
||||||
{
|
|
||||||
/* copy string in */
|
|
||||||
BlockMoveData(src + 1, dst + *dst + 1, *src);
|
|
||||||
/* adjust length byte */
|
|
||||||
*dst += *src;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* pstrinsert - insert string 'src' at beginning of string 'dst' */
|
/* pstrinsert - insert string 'src' at beginning of string 'dst' */
|
||||||
void pstrinsert(StringPtr dst, StringPtr src)
|
void pstrinsert(StringPtr dst, StringPtr src)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,6 @@ void SecondThirdCenterDialog(short id);
|
||||||
void SecondThirdCenterRectIn(Rect *inner,Rect *outer);
|
void SecondThirdCenterRectIn(Rect *inner,Rect *outer);
|
||||||
|
|
||||||
void StandardFileCenter(Point *where, short id);
|
void StandardFileCenter(Point *where, short id);
|
||||||
void pstrcat(StringPtr dst, StringPtr src);
|
|
||||||
void pstrinsert(StringPtr dst, StringPtr src);
|
void pstrinsert(StringPtr dst, StringPtr src);
|
||||||
pascal short DLOGwOK( DialogPtr dptr, EventRecord *evt, short *item);
|
pascal short DLOGwOK( DialogPtr dptr, EventRecord *evt, short *item);
|
||||||
PROTO_UPP(DLOGwOK, ModalFilter);
|
PROTO_UPP(DLOGwOK, ModalFilter);
|
||||||
|
|
|
@ -112,9 +112,9 @@ void OpenPortSpecial(MenuHandle menuh, short item)
|
||||||
if ( !(**theParams).WindowName[0] && memcmp(scratchPstring, gDefaultName, gDefaultName[0] + 1) ) {
|
if ( !(**theParams).WindowName[0] && memcmp(scratchPstring, gDefaultName, gDefaultName[0] + 1) ) {
|
||||||
BlockMoveData(scratchPstring, (**theParams).WindowName, scratchPstring[0] + 1);
|
BlockMoveData(scratchPstring, (**theParams).WindowName, scratchPstring[0] + 1);
|
||||||
NumToString(numWind++, scratchPstring);
|
NumToString(numWind++, scratchPstring);
|
||||||
pstrcat((**theParams).WindowName, "\p (");
|
PLstrcat((**theParams).WindowName, "\p (");
|
||||||
pstrcat((**theParams).WindowName, scratchPstring);
|
PLstrcat((**theParams).WindowName, scratchPstring);
|
||||||
pstrcat((**theParams).WindowName, "\p)");
|
PLstrcat((**theParams).WindowName, "\p)");
|
||||||
}
|
}
|
||||||
success = CreateConnectionFromParams(theParams);
|
success = CreateConnectionFromParams(theParams);
|
||||||
}
|
}
|
||||||
|
@ -216,10 +216,10 @@ static void SetCurrentSession(DialogPtr dptr, Str255 scratchPstring)
|
||||||
|
|
||||||
if ((**tempSessHdl).port != getDefaultPort((**tempSessHdl).protocol)) {
|
if ((**tempSessHdl).port != getDefaultPort((**tempSessHdl).protocol)) {
|
||||||
NumToString((unsigned short)(**tempSessHdl).port, scritchPstring);
|
NumToString((unsigned short)(**tempSessHdl).port, scritchPstring);
|
||||||
pstrcat(scratchPstring, "\p:");
|
PLstrcat(scratchPstring, "\p:");
|
||||||
if ((**tempSessHdl).portNegative)
|
if ((**tempSessHdl).portNegative)
|
||||||
pstrcat(scratchPstring, "\p-");
|
PLstrcat(scratchPstring, "\p-");
|
||||||
pstrcat(scratchPstring, scritchPstring);
|
PLstrcat(scratchPstring, scritchPstring);
|
||||||
}
|
}
|
||||||
/* recall last hostname seen if none */
|
/* recall last hostname seen if none */
|
||||||
if ( !scratchPstring[0] && sLastHostName[0] ) {
|
if ( !scratchPstring[0] && sLastHostName[0] ) {
|
||||||
|
@ -561,9 +561,9 @@ Boolean PresentOpenConnectionDialog(void)
|
||||||
if ( !(**InitParams).WindowName[0] && memcmp(favoriteString, gDefaultName, gDefaultName[0] + 1) ) {
|
if ( !(**InitParams).WindowName[0] && memcmp(favoriteString, gDefaultName, gDefaultName[0] + 1) ) {
|
||||||
BlockMoveData(favoriteString, (**InitParams).WindowName, favoriteString[0] + 1);
|
BlockMoveData(favoriteString, (**InitParams).WindowName, favoriteString[0] + 1);
|
||||||
NumToString(numWind++, favoriteString);
|
NumToString(numWind++, favoriteString);
|
||||||
pstrcat((**InitParams).WindowName, "\p (");
|
PLstrcat((**InitParams).WindowName, "\p (");
|
||||||
pstrcat((**InitParams).WindowName, favoriteString);
|
PLstrcat((**InitParams).WindowName, favoriteString);
|
||||||
pstrcat((**InitParams).WindowName, "\p)");
|
PLstrcat((**InitParams).WindowName, "\p)");
|
||||||
}
|
}
|
||||||
|
|
||||||
success = CreateConnectionFromParams(InitParams);
|
success = CreateConnectionFromParams(InitParams);
|
||||||
|
@ -685,13 +685,13 @@ Boolean CreateConnectionFromParams( ConnInitParams **Params)
|
||||||
StrLength((**(**Params).session).hostname)+1);
|
StrLength((**(**Params).session).hostname)+1);
|
||||||
if (SessPtr->port != getDefaultPort(SessPtr->protocol)) {
|
if (SessPtr->port != getDefaultPort(SessPtr->protocol)) {
|
||||||
NumToString((unsigned short)SessPtr->port, numPstring);
|
NumToString((unsigned short)SessPtr->port, numPstring);
|
||||||
pstrcat((**Params).WindowName, "\p:");
|
PLstrcat((**Params).WindowName, "\p:");
|
||||||
pstrcat((**Params).WindowName, numPstring);
|
PLstrcat((**Params).WindowName, numPstring);
|
||||||
}
|
}
|
||||||
NumToString(numWind++, numPstring);
|
NumToString(numWind++, numPstring);
|
||||||
pstrcat((**Params).WindowName, "\p (");
|
PLstrcat((**Params).WindowName, "\p (");
|
||||||
pstrcat((**Params).WindowName, numPstring); // tack the number onto the end.
|
PLstrcat((**Params).WindowName, numPstring); // tack the number onto the end.
|
||||||
pstrcat((**Params).WindowName, "\p)");
|
PLstrcat((**Params).WindowName, "\p)");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SessPtr->hostname[0] == 0) {
|
if (SessPtr->hostname[0] == 0) {
|
||||||
|
|
Loading…
Reference in New Issue