This commit is contained in:
chombier 2001-04-27 15:40:22 +00:00
parent 786f32cd93
commit eefaf65e55
6 changed files with 273 additions and 233 deletions

View File

@ -19,6 +19,10 @@
#define BLOCKCURSOR 0 /* BYU 2.4.11 */
#define UNDERSCORECURSOR 1 /* BYU 2.4.11 */
#define VERTICALCURSOR 2 /* BYU 2.4.11 */
#define NOCURSOR 3
#define LOWER_THIRDCURSOR 4
#define LOWER_HALFCURSOR 5
#define TWO_THIRDSCURSOR 6
/* Capable of shifting the text to the right some # of pixels */
#define CVO 0
@ -26,6 +30,8 @@
#define LOCKWIDTH 16
#define CURS_BLINK_PERIOD 30
#define INFINITY 20000 // Will screens ever be this large?
#define MAXATTR 16
@ -89,8 +95,10 @@ struct RSdata {
Boolean
skip; /* TRUE if we are skipping the output */
Boolean
active;
};
active; /* true if window is currently active */
short
cursType;
};
typedef struct RSdata RSdata;

View File

@ -55,10 +55,10 @@ void InitDebug(void)
DetachResource((Handle) termHdl);
HLock((Handle)termHdl);
RSsetcolor( console->vs, 0, &(*termHdl)->nfcolor);
RSsetcolor( console->vs, 1, &(*termHdl)->nbcolor);
RSsetcolor( console->vs, 2, &(*termHdl)->bfcolor);
RSsetcolor( console->vs, 3, &(*termHdl)->bbcolor);
RSsetcolors( console->vs, 0, &(*termHdl)->nfcolor);
RSsetcolors( console->vs, 1, &(*termHdl)->nbcolor);
RSsetcolors( console->vs, 2, &(*termHdl)->bfcolor);
RSsetcolors( console->vs, 3, &(*termHdl)->bbcolor);
DisposeHandle((Handle)termHdl);
#else

View File

@ -129,10 +129,10 @@ void initftplog( void)
DetachResource((Handle) termHdl);
HLock((Handle)termHdl);
scratchBoolean = RSsetcolor( ftplog->vs, 0, &(*termHdl)->nfcolor);
scratchBoolean = RSsetcolor( ftplog->vs, 1, &(*termHdl)->nbcolor);
scratchBoolean = RSsetcolor( ftplog->vs, 2, &(*termHdl)->bfcolor);
scratchBoolean = RSsetcolor( ftplog->vs, 3, &(*termHdl)->bbcolor);
scratchBoolean = RSsetcolors( ftplog->vs, 0, &(*termHdl)->nfcolor);
scratchBoolean = RSsetcolors( ftplog->vs, 1, &(*termHdl)->nbcolor);
scratchBoolean = RSsetcolors( ftplog->vs, 2, &(*termHdl)->bfcolor);
scratchBoolean = RSsetcolors( ftplog->vs, 3, &(*termHdl)->bbcolor);
DisposeHandle((Handle)termHdl);
VSwrite(ftplog->vs,"\033[24;0H",7); /* Move to bottom of screen */

View File

@ -209,6 +209,9 @@ Boolean PresentOpenConnectionDialog(void)
LinkedListNode *theHead;
Boolean portSet;
Boolean wasAlias;
Boolean typedHost;
Boolean parseAliases;
SetCursor(theCursors[normcurs]);
@ -274,9 +277,11 @@ Boolean PresentOpenConnectionDialog(void)
defaultSessHdl = GetDefaultSession();
HLock((Handle)defaultSessHdl);
BlockMoveData("\p<Default>", scratchPstring, 15);
GetHostNameFromSession(scratchPstring);
SetTEText(dptr, NCfavoritename, scratchPstring);
GetHostNameFromSession(scratchPstring);
if ((**defaultSessHdl).port != getDefaultPort((**defaultSessHdl).protocol)) {
NumToString((unsigned short)(**defaultSessHdl).port, scritchPstring);
pstrcat(scratchPstring, "\p:");
@ -305,6 +310,8 @@ Boolean PresentOpenConnectionDialog(void)
DisposeHandle((Handle)defaultSessHdl);
setSessStates(dptr);
typedHost = false;
while (ditem > NCcancel) {
movableModalDialog(POCdlogfilterUPP, &ditem);
switch(ditem)
@ -327,6 +334,7 @@ Boolean PresentOpenConnectionDialog(void)
case NChostname:
if ( gApplicationPrefs->parseAliases ) {
// check if the string matches a favorite name
typedHost = true;
GetTEText(dptr, NChostname, scratchPstring);
scratchshort = FindMenuItemText(SessPopupHdl, scratchPstring);
/* revert to default if not found */
@ -382,6 +390,7 @@ Boolean PresentOpenConnectionDialog(void)
DeleteMenu(668);
if (scratchlong)
{
typedHost = false;
scratchshort = scratchlong & 0xFFFF; // Apple sez ignore the high word
SetItemMark(SessPopupHdl, sessMark, 0);
sessMark = scratchshort;
@ -416,6 +425,7 @@ Boolean PresentOpenConnectionDialog(void)
}
break;
case 1001:
typedHost = false;
SetItemMark(SessPopupHdl, sessMark, 0);
sessMark--;
if (sessMark < 1)
@ -445,6 +455,7 @@ Boolean PresentOpenConnectionDialog(void)
}
break;
case 1000:
typedHost = false;
SetItemMark(SessPopupHdl, sessMark, 0);
sessMark++;
if (sessMark > CountMItems(SessPopupHdl))
@ -510,7 +521,13 @@ Boolean PresentOpenConnectionDialog(void)
MaxMem(&junk);
GetMenuItemText(SessPopupHdl, sessMark, scritchPstring);
/* don't try to convert hostname to alias if nothing has been typed */
parseAliases = gApplicationPrefs->parseAliases;
if (!typedHost)
gApplicationPrefs->parseAliases = false;
InitParams = NameToConnInitParams(scratchPstring, FALSE, scritchPstring, &wasAlias);
gApplicationPrefs->parseAliases = parseAliases;
if (InitParams == NULL)
{
DisposeMenu(SessPopupHdl); // drh Ñ Bug fix: memory leak
@ -967,10 +984,10 @@ Boolean CreateConnectionFromParams( ConnInitParams **Params)
theScreen->pastemethod = SessPtr->pastemethod;
theScreen->pastesize = SessPtr->pasteblocksize;
scratchBoolean = RSsetcolor( theScreen->vs, 0, &TermPtr->nfcolor);
scratchBoolean = RSsetcolor( theScreen->vs, 1, &TermPtr->nbcolor);
scratchBoolean = RSsetcolor( theScreen->vs, 2, &TermPtr->bfcolor);
scratchBoolean = RSsetcolor( theScreen->vs, 3, &TermPtr->bbcolor);
scratchBoolean = RSsetcolors( theScreen->vs, 0, &TermPtr->nfcolor);
scratchBoolean = RSsetcolors( theScreen->vs, 1, &TermPtr->nbcolor);
scratchBoolean = RSsetcolors( theScreen->vs, 2, &TermPtr->bfcolor);
scratchBoolean = RSsetcolors( theScreen->vs, 3, &TermPtr->bbcolor);
addinmenu(cur, (**Params).WindowName, diamondMark);
theScreen->active = CNXN_DNRWAIT; // Signal we are waiting for DNR.

View File

@ -1426,7 +1426,7 @@ void HandleMenuCommand( long mResult, short modifiers)
EditConfigType(TERMINALPREFS_RESTYPE, &EditTerminal);
break;
case EDmacros+6:
EditConfigType(FTPUSER, &EditFTPUser);
EditConfigType(FTPUSERPREFS_RESTYPE, &EditFTPUser);
default:
break;
@ -1434,193 +1434,32 @@ void HandleMenuCommand( long mResult, short modifiers)
}
break;
case connMenu:
case NconnMenu:
if (theItem == COnext)
{
if (TelInfo->numwindows >1)
{
short scratchshort;
if (!(modifiers & shiftKey)) //go forward
{
scratchshort = WindowPtr2ScreenIndex(FrontWindow()) + 1;
// Skip over inactive connections
while( (screens[scratchshort].active != CNXN_ACTIVE) &&
(screens[scratchshort].active != CNXN_ISCORPSE) &&
(scratchshort <= TelInfo->numwindows+1))
scratchshort++;
if ((scratchshort < 0) || (scratchshort >= TelInfo->numwindows))
scratchshort = 0;
}
else //go backward
{
scratchshort = WindowPtr2ScreenIndex(FrontWindow()) - 1;
// Skip over inactive connections
while( (screens[scratchshort].active != CNXN_ACTIVE) &&
(screens[scratchshort].active != CNXN_ISCORPSE) &&
(scratchshort >= 0))
scratchshort--;
if ((scratchshort < 0) || (scratchshort >= TelInfo->numwindows))
scratchshort = TelInfo->numwindows - 1;
}
SelectWindow(screens[scratchshort].wind);
}
break;
}
if (theItem == COtitle) {
ChangeWindowName(FrontWindow());
break;
}
if (theItem >= FIRST_CNXN_ITEM) {
if ((theItem - FIRST_CNXN_ITEM-1)>(TelInfo->numwindows+1)) break; /* rotten danish */
if (screens[theItem - FIRST_CNXN_ITEM].active != CNXN_ACTIVE) {
displayStatus(theItem - FIRST_CNXN_ITEM); /* Tell them about it..... */
break;
}
else {
HiliteWindow(screens[scrn].wind, FALSE);
changeport(scrn,(theItem - FIRST_CNXN_ITEM));
if (!(modifiers & optionKey)) SelectWindow(screens[scrn].wind);
else HiliteWindow(screens[scrn].wind, TRUE);
}
}
break;
case netMenu:
case NnetMenu:
switch(theItem) {
case NEftp: /* Send FTP command */
case NEip: /* Send IP Number */
if (TelInfo->numwindows<1) break;
{ char tmpout[30]; /* Basically the same except for */
unsigned char tmp[4]; /* The ftp -n phrase in NEftp */
if (screens[scrn].echo && (screens[scrn].kblen>0)) {
netwrite( screens[scrn].port, screens[scrn].kbbuf,
screens[scrn].kblen);/* if not empty send buffer */
screens[scrn].kblen=0;
}
netgetip(tmp);
if (theItem == NEftp) {
if ((gFTPServerPrefs->ServerState == 1) && !(modifiers & shiftKey))
sprintf(tmpout,"ftp -n %d.%d.%d.%d\015\012",tmp[0],tmp[1],tmp[2],tmp[3]);
else
sprintf(tmpout,"ftp %d.%d.%d.%d\015\012",tmp[0],tmp[1],tmp[2],tmp[3]);
}
else
sprintf(tmpout,"%d.%d.%d.%d",tmp[0],tmp[1],tmp[2],tmp[3]);
netwrite(screens[scrn].port,tmpout,strlen(tmpout));
if (screens[scrn].echo)
VSwrite(screens[scrn].vs,tmpout, strlen(tmpout));
}
break;
case NEayt: /* Send "Are You There?"*/
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\366",2);
break;
case NEao: /* Send "Abort Output"*/
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\365",2);
screens[ scrn].timing = 1; /* set emulate to TMwait */
netwrite(screens[scrn].port, "\377\375\006",3); /* send TM */
break;
case NEinter: /* Send "Interrupt Process"*/
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\364",2);
screens[ scrn].timing = 1; /* set emulate to TMwait */
netwrite(screens[scrn].port, "\377\375\006",3); /* send TM */
break;
case NEbrk:
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\363",2); // IAC BRK
break;
case NEsync:
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netUrgent(); // This must be sent TCP Urgent.
netwrite(screens[scrn].port, "\377\362",2); // IAC DM
break;
case NEipsync:
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\364", 2); // IAC IP
netpush(screens[scrn].port);
netUrgent(); // This must also be sent TCP Urgent.
netwrite(screens[scrn].port, "\377\362", 2); // IAC DM
netpush(screens[scrn].port);
screens[scrn].timing = 1; // set emulate to TMwait
netwrite(screens[scrn].port, "\377\375\006", 3); // send Timing Mark
break;
case NEeof: // End Of File
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\354", 2);
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\375\006", 3);
break;
case NEsusp:
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\355", 2);
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\375\006", 3);
break;
case NEabort: // Abort
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\356", 2);
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\375\006", 3);
break;
case NEec: /* Send "Erase Character"*/
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\367",2);
break;
case NEel: /* Send "Erase Line"*/
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\370",2);
break;
case NEscroll: /* Suspend Network */
TelInfo->ScrlLock=!TelInfo->ScrlLock;
if (TelInfo->ScrlLock)
CheckItem(myMenus[Net], NEscroll,TRUE);
else
CheckItem(myMenus[Net], NEscroll,FALSE);
break;
case NEnet: /* Show Network Numbers */
showNetNumbers();
break;
default:
break;
}
break;
/* Session */
case termMenu:
case NtermMenu:
switch(theItem) {
case EMscreensize:
if (TelInfo->numwindows<1) break; /* NCSA: SB */
SetScreenDimensions((short)scrn, modifiers); /* NCSA: SB */
break;
case EMsetup: /* need dialog to enter new key values */
setupkeys();
break;
case EMcolor: /* Set color */
if (TelInfo->numwindows<1) break;
if (TelInfo->haveColorQuickDraw)
RScprompt(screens[scrn].vs);
break;
case EMAnsiColor:
if (TelInfo->haveColorQuickDraw) {
AnsiPrompt(0, 0);
RSUpdatePalette();
}
return;
case EMsuspend:
if (TelInfo->numwindows < 1) break;
screens[scrn].enabled = !screens[scrn].enabled;
@ -1819,11 +1658,6 @@ void HandleMenuCommand( long mResult, short modifiers)
CheckItem(myMenus[Emul],EMclear, FALSE);
break;
case EMscreensize:
if (TelInfo->numwindows<1) break; /* NCSA: SB */
SetScreenDimensions((short)scrn, modifiers); /* NCSA: SB */
break;
case EMreset: /* Reset Screen */
//RESTORE WRAP AFTER THE RESET!!! BUGG
if (TelInfo->numwindows<1) break;
@ -1840,23 +1674,6 @@ void HandleMenuCommand( long mResult, short modifiers)
FlushNetwork(scrn); /* Flush it */
break;
case EMsetup: /* need dialog to enter new key values */
setupkeys();
break;
case EMcolor: /* Set color */
if (TelInfo->numwindows<1) break;
if (TelInfo->haveColorQuickDraw)
RScprompt(screens[scrn].vs);
break;
case EMAnsiColor:
if (TelInfo->haveColorQuickDraw) {
SetUpMovableModalMenus();
AnsiPrompt(0, 0);
ResetMenus();
RSUpdatePalette();
}
return;
case EMqprint:
screens[scrn].qprint = !screens[scrn].qprint;
CheckItem(myMenus[Emul], EMqprint, screens[scrn].qprint);
@ -1880,6 +1697,204 @@ void HandleMenuCommand( long mResult, short modifiers)
break;
}
break;
/* Net */
case netMenu:
case NnetMenu:
switch(theItem) {
case NEftp: /* Send FTP command */
case NEip: /* Send IP Number */
if (TelInfo->numwindows<1) break;
{ char tmpout[30]; /* Basically the same except for */
unsigned char tmp[4]; /* The ftp -n phrase in NEftp */
if (screens[scrn].echo && (screens[scrn].kblen>0)) {
netwrite( screens[scrn].port, screens[scrn].kbbuf,
screens[scrn].kblen);/* if not empty send buffer */
screens[scrn].kblen=0;
}
netgetip(tmp);
if (theItem == NEftp) {
if ((gFTPServerPrefs->ServerState == 1) && !(modifiers & shiftKey))
sprintf(tmpout,"ftp -n %d.%d.%d.%d\015\012",tmp[0],tmp[1],tmp[2],tmp[3]);
else
sprintf(tmpout,"ftp %d.%d.%d.%d\015\012",tmp[0],tmp[1],tmp[2],tmp[3]);
}
else
sprintf(tmpout,"%d.%d.%d.%d",tmp[0],tmp[1],tmp[2],tmp[3]);
netwrite(screens[scrn].port,tmpout,strlen(tmpout));
if (screens[scrn].echo)
VSwrite(screens[scrn].vs,tmpout, strlen(tmpout));
}
break;
case NEayt: /* Send "Are You There?"*/
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\366",2);
break;
case NEao: /* Send "Abort Output"*/
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\365",2);
screens[ scrn].timing = 1; /* set emulate to TMwait */
netwrite(screens[scrn].port, "\377\375\006",3); /* send TM */
break;
case NEinter: /* Send "Interrupt Process"*/
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\364",2);
screens[ scrn].timing = 1; /* set emulate to TMwait */
netwrite(screens[scrn].port, "\377\375\006",3); /* send TM */
break;
case NEbrk:
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\363",2); // IAC BRK
break;
case NEsync:
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netUrgent(); // This must be sent TCP Urgent.
netwrite(screens[scrn].port, "\377\362",2); // IAC DM
break;
case NEipsync:
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\364", 2); // IAC IP
netpush(screens[scrn].port);
netUrgent(); // This must also be sent TCP Urgent.
netwrite(screens[scrn].port, "\377\362", 2); // IAC DM
netpush(screens[scrn].port);
screens[scrn].timing = 1; // set emulate to TMwait
netwrite(screens[scrn].port, "\377\375\006", 3); // send Timing Mark
break;
case NEeof: // End Of File
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\354", 2);
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\375\006", 3);
break;
case NEsusp:
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\355", 2);
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\375\006", 3);
break;
case NEabort: // Abort
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\356", 2);
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\375\006", 3);
break;
case NEec: /* Send "Erase Character"*/
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\367",2);
break;
case NEel: /* Send "Erase Line"*/
if (TelInfo->numwindows<1) break;
netpush(screens[scrn].port);
netwrite(screens[scrn].port, "\377\370",2);
break;
case NEscroll: /* Suspend Network */
TelInfo->ScrlLock=!TelInfo->ScrlLock;
if (TelInfo->ScrlLock)
CheckItem(myMenus[Net], NEscroll,TRUE);
else
CheckItem(myMenus[Net], NEscroll,FALSE);
break;
case NEnet: /* Show Network Numbers */
showNetNumbers();
break;
default:
break;
}
break;
/* Favorites */
case opspecMenu: // JMB
switch (theItem) {
case 1:
EditConfigType(SESSIONPREFS_RESTYPE, &EditSession);
CheckOpSpecSubmenu();
break;
default:
OpenPortSpecial(myMenus[OpSpec], theItem);
}
break; // JMB
/* Window */
case connMenu:
case NconnMenu:
if (theItem == COnext)
{
if (TelInfo->numwindows >1)
{
short scratchshort;
if (!(modifiers & shiftKey)) //go forward
{
scratchshort = WindowPtr2ScreenIndex(FrontWindow()) + 1;
// Skip over inactive connections
while( (screens[scratchshort].active != CNXN_ACTIVE) &&
(screens[scratchshort].active != CNXN_ISCORPSE) &&
(scratchshort <= TelInfo->numwindows+1))
scratchshort++;
if ((scratchshort < 0) || (scratchshort >= TelInfo->numwindows))
scratchshort = 0;
}
else //go backward
{
scratchshort = WindowPtr2ScreenIndex(FrontWindow()) - 1;
// Skip over inactive connections
while( (screens[scratchshort].active != CNXN_ACTIVE) &&
(screens[scratchshort].active != CNXN_ISCORPSE) &&
(scratchshort >= 0))
scratchshort--;
if ((scratchshort < 0) || (scratchshort >= TelInfo->numwindows))
scratchshort = TelInfo->numwindows - 1;
}
SelectWindow(screens[scratchshort].wind);
}
break;
}
if (theItem == COtitle) {
ChangeWindowName(FrontWindow());
break;
}
if (theItem >= FIRST_CNXN_ITEM) {
if ((theItem - FIRST_CNXN_ITEM-1)>(TelInfo->numwindows+1)) break; /* rotten danish */
if (screens[theItem - FIRST_CNXN_ITEM].active != CNXN_ACTIVE) {
displayStatus(theItem - FIRST_CNXN_ITEM); /* Tell them about it..... */
break;
}
else {
HiliteWindow(screens[scrn].wind, FALSE);
changeport(scrn,(theItem - FIRST_CNXN_ITEM));
if (!(modifiers & optionKey)) SelectWindow(screens[scrn].wind);
else HiliteWindow(screens[scrn].wind, TRUE);
}
}
break;
case fontMenu:
if (TelInfo->numwindows>0) {
short itemFontNum;
@ -1935,16 +1950,6 @@ void HandleMenuCommand( long mResult, short modifiers)
CheckFonts();
}
break;
case opspecMenu: // JMB
switch (theItem) {
case 1:
EditConfigType(SESSIONPREFS_RESTYPE, &EditSession);
CheckOpSpecSubmenu();
break;
default:
OpenPortSpecial(myMenus[OpSpec], theItem);
}
break; // JMB
case prefsMenu:
switch(theItem) {
case prfGlobal:
@ -1961,7 +1966,7 @@ void HandleMenuCommand( long mResult, short modifiers)
EditConfigType(TERMINALPREFS_RESTYPE, &EditTerminal);
break;
case prfFTPUser:
EditConfigType(FTPUSER, &EditFTPUser);
EditConfigType(FTPUSERPREFS_RESTYPE, &EditFTPUser);
}
break;
case transMenu:

View File

@ -830,7 +830,6 @@ char *getpass( const char *prompt )
char *password;
Boolean valid;
LockDialog();
if ( wind && strstr(prompt, "assword for") ) {
/* password authentication */
password = wind->sshdata.currentpass;
@ -839,11 +838,17 @@ char *getpass( const char *prompt )
strcpy(cprompt, prompt);
strncat(cprompt, (char *)wind->sshdata.host + 1, wind->sshdata.host[0]);
if ( gApplicationPrefs->cachePassphrase
&& getnextcachedpassphrase(cprompt, password, &context->_pindex) ) {
return password;
}
LockDialog();
if ( gApplicationPrefs->cachePassphrase
&& getnextcachedpassphrase(cprompt, password, &context->_pindex) ) {
UnlockDialog();
return password;
}
if ( wind->sshdata.password[0] ) {
memcpy(password, wind->sshdata.password + 1, wind->sshdata.password[0]);
password[wind->sshdata.password[0]] = '\0';
@ -867,6 +872,11 @@ char *getpass( const char *prompt )
/* encrypted private key */
int plen;
assert(context != NULL);
if ( gApplicationPrefs->cachePassphrase
&& getnextcachedpassphrase(prompt, context->_kpassword, &context->_kindex) ) {
return context->_kpassword;
}
LockDialog();
if ( gApplicationPrefs->cachePassphrase
&& getnextcachedpassphrase(prompt, context->_kpassword, &context->_kindex) ) {
UnlockDialog();