Commit 455b06aa authored by rswindell's avatar rswindell
Browse files

Complete the terminal DEL->backspace key swap user setting stuff.

New text.dat strings:
 - HitYourBackspaceKey
 - CharacterReceivedFmt
 - InvalidBackspaceKeyFmt
 - SwapDeleteKeyQ
 - PetTermDetected
parent 5ee3bc1d
......@@ -166,11 +166,36 @@ BOOL sbbs_t::newuser()
useron.misc&=~COLOR;
}
else
useron.rows=24;
if(!(useron.misc&PETSCII) && !yesno(text[ExAsciiTerminalQ]))
useron.misc|=NO_EXASCII;
else
useron.misc&=~NO_EXASCII;
useron.rows = TERM_ROWS_DEFAULT;
while(text[HitYourBackspaceKey][0] && !(useron.misc&(PETSCII|SWAP_DELETE)) && online) {
bputs(text[HitYourBackspaceKey]);
char key = getkey(K_NONE);
bprintf(text[CharacterReceivedFmt], key, key);
if(key == '\b')
break;
if(key == DEL) {
if(text[SwapDeleteKeyQ][0] == 0 || yesno(text[SwapDeleteKeyQ]))
useron.misc |= SWAP_DELETE;
}
else if(key == PETSCII_DELETE)
useron.misc |= PETSCII;
else {
bprintf(text[InvalidBackspaceKeyFmt], key, key);
if(text[ContinueQ][0] && !yesno(text[ContinueQ]))
return FALSE;
newline();
}
}
if(useron.misc&PETSCII)
bputs(text[PetTermDetected]);
else {
if(!yesno(text[ExAsciiTerminalQ]))
useron.misc|=NO_EXASCII;
else
useron.misc&=~NO_EXASCII;
}
if(rlogin_name[0])
SAFECOPY(useron.alias,rlogin_name);
......
......@@ -821,6 +821,11 @@ enum {
,Scanning
,Done
,Scanned
,HitYourBackspaceKey
,CharacterReceivedFmt
,InvalidBackspaceKeyFmt
,SwapDeleteKeyQ
,PetTermDetected
,TOTAL_TEXT
};
......
......@@ -15,14 +15,14 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x0d\x0a\xb3\x20\x01\x62\x54\x6f\x20\x20\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x25\x2e\x37\x30\x73" // 003 MsgTo
,"\x20\x23\x25\x73" // 004 MsgToExt
,"\x20\x28\x25\x2e\x34\x30\x73\x29" // 005 MsgToNet
,"\x0d\x0a\x01\x77\xb3\x20\x01\x62\x46\x72\x6f\x6d\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x25\x2e\x33\x33\x73" // 006 MsgFrom
,"\x0d\x0a\x01\x77\xb3\x20\x01\x62\x46\x72\x6f\x6d\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x25\x2e\x37\x30\x73" // 006 MsgFrom
,"\x20\x23\x25\x73" // 007 MsgFromExt
,"\x20\x28\x25\x2e\x33\x35\x73\x29" // 008 MsgFromNet
,"\x20\x28\x25\x2e\x34\x30\x73\x29" // 008 MsgFromNet
,"\x0d\x0a\x01\x77\xb3\x20\x01\x62\x44\x61\x74\x65\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x25\x2e\x32\x34\x73\x20\x25\x73\x20\x28"
"\x25\x73\x29\x0d\x0a\x01\x77\xc0\xc4\xc4\xc4\xc4\xc4\xc4\x01\x63\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\x01\x6e\xc4\xc4\xc4\xc4\xc4"
"\xc4\xc4\xc4\xc4\xc4\x01\x68\x01\x6b\xc4\xc4\xc4\xc4\xc4\xc4\xc4\xc4\x01\x6e\x01\x63\xc4\xc4\xc4\xc4\xc4\xc4\xc4\x01\x62\xc4\xc4"
"\xc4\xc4\xc4\xc4\xc4\xfa\xfa\xfa\xfa\xfa\xfa\x01\x6e" // 009 MsgDate
,"\x01\x5f\x01\x3f\x01\x62\x01\x68\x45\x2d\x6d\x61\x69\x6c\x20\x28\x55\x73\x65\x72\x20\x6e\x61\x6d\x65\x20\x6f\x72\x20\x6e\x75\x6d"
,"\x01\x5f\x0d\x0a\x01\x62\x01\x68\x45\x2d\x6d\x61\x69\x6c\x20\x28\x55\x73\x65\x72\x20\x6e\x61\x6d\x65\x20\x6f\x72\x20\x6e\x75\x6d"
"\x62\x65\x72\x29\x3a\x20\x01\x77" // 010 Email
,"\x0d\x0a\x50\x6f\x73\x74\x20\x6f\x6e\x20\x25\x73\x01\x5c\x20\x25\x73" // 011 Post
,"\x01\x72\x01\x68\x0d\x0a\x07\x59\x6f\x75\x20\x68\x61\x76\x65\x20\x73\x65\x6e\x74\x20\x74\x6f\x6f\x20\x6d\x61\x6e\x79\x20\x45\x2d"
......@@ -36,9 +36,9 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x01\x6e\x0d\x0a\x59\x6f\x75\x20\x63\x61\x6e\x27\x74\x20\x70\x6f\x73\x74\x20\x6d\x65\x73\x73\x61\x67\x65\x73\x2e\x0d\x0a" // 016 R_Post
,"\x01\x6e\x0d\x0a\x59\x6f\x75\x20\x63\x61\x6e\x27\x74\x20\x73\x65\x6e\x64\x20\x45\x2d\x6d\x61\x69\x6c\x20\x74\x6f\x20\x25\x73\x2e"
"\x0d\x0a" // 017 R_Feedback
,"\x01\x6e\x01\x3f\x01\x6d\x53\x65\x6e\x64\x69\x6e\x67\x20\x45\x2d\x6d\x61\x69\x6c\x20\x74\x6f\x20\x01\x68\x25\x73\x20\x01\x6e\x01"
,"\x01\x6e\x01\x6d\x0d\x0a\x53\x65\x6e\x64\x69\x6e\x67\x20\x45\x2d\x6d\x61\x69\x6c\x20\x74\x6f\x20\x01\x68\x25\x73\x20\x01\x6e\x01"
"\x6d\x23\x25\x75\x01\x6e\x0d\x0a" // 018 Emailing
,"\x01\x6e\x01\x3f\x01\x6d\x50\x6f\x73\x74\x69\x6e\x67\x20\x6f\x6e\x20\x01\x68\x25\x73\x01\x6e\x01\x6d\x20\x25\x73\x0d\x0a" // 019 Posting
,"\x01\x6e\x01\x6d\x0d\x0a\x50\x6f\x73\x74\x69\x6e\x67\x20\x6f\x6e\x20\x01\x68\x25\x73\x01\x6e\x01\x6d\x20\x25\x73\x0d\x0a" // 019 Posting
,"\x0d\x0a\x4e\x65\x77\x20\x66\x69\x6c\x65\x2e\x0d\x0a" // 020 NewFile
,"\x01\x5f\x0d\x0a\x01\x79\x01\x68\x53\x75\x62\x6a\x65\x63\x74\x3a\x20" // 021 SubjectPrompt
,"\x01\x6e\x01\x67\x0d\x0a\x45\x6e\x74\x65\x72\x20\x6d\x65\x73\x73\x61\x67\x65\x20\x6e\x6f\x77\x20\x28\x01\x68\x25\x64\x01\x6e\x01"
......@@ -54,7 +54,7 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x49\x6e\x76\x61\x6c\x69\x64\x20\x6c\x69\x6e\x65\x20\x6e\x75\x6d\x62\x65\x72\x0d\x0a" // 027 InvalidLineNumber
,"\x01\x6e\x4d\x65\x73\x73\x61\x67\x65\x20\x63\x6c\x65\x61\x72\x65\x64\x2e\x0d\x0a" // 028 MsgCleared
,"\x57\x69\x74\x68\x20\x6c\x69\x6e\x65\x20\x6e\x75\x6d\x62\x65\x72\x73" // 029 WithLineNumbersQ
,"\x01\x3f\x01\x72\x01\x68\x01\x69\x41\x62\x6f\x72\x74\x65\x64\x2e\x01\x6e\x0d\x0a" // 030 Aborted
,"\x0d\x0a\x01\x72\x01\x68\x01\x69\x41\x62\x6f\x72\x74\x65\x64\x2e\x01\x6e\x0d\x0a" // 030 Aborted
,"\x0d\x0a\x41\x6e\x6f\x6e\x79\x6d\x6f\x75\x73" // 031 AnonymousQ
,"\x41\x4e\x4f\x4e\x59\x4d\x4f\x55\x53" // 032 Anonymous
,"\x01\x6e\x01\x68\x0d\x0a\x53\x61\x76\x69\x6e\x67\x2e\x2e\x2e" // 033 Saving
......@@ -109,7 +109,7 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x01\x6e\x0d\x0a\x01\x63\xfe\x20\x01\x68\x01\x62\x52\x65\x61\x64\x69\x6e\x67\x20\x53\x65\x6e\x74\x20\x45\x2d\x6d\x61\x69\x6c\x20"
"\x01\x6e\x01\x63\xfe\x20\x01\x68\x01\x62\x28\x01\x77\x3f\x01\x62\x3d\x4d\x65\x6e\x75\x29\x20\x28\x01\x77\x25\x75\x01\x62\x20\x6f"
"\x66\x20\x01\x77\x25\x75\x01\x62\x29\x3a\x20\x01\x6e" // 061 ReadingSentMail
,"\x01\x68\x01\x3f\x01\x6d\x53\x65\x6e\x64\x69\x6e\x67\x20\x49\x6e\x74\x65\x72\x6e\x65\x74\x20\x4d\x61\x69\x6c\x20\x54\x6f\x3a\x20"
,"\x01\x68\x01\x6d\x0d\x0a\x53\x65\x6e\x64\x69\x6e\x67\x20\x49\x6e\x74\x65\x72\x6e\x65\x74\x20\x4d\x61\x69\x6c\x20\x54\x6f\x3a\x20"
"\x01\x77\x25\x73\x01\x6d\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x46\x72\x6f\x6d"
"\x3a\x20\x01\x77\x25\x73\x0d\x0a" // 062 InternetMailing
,"\x01\x6e\x0d\x0a\x4e\x6f\x20\x6d\x61\x69\x6c\x20\x6f\x6e\x20\x73\x79\x73\x74\x65\x6d\x2e\x0d\x0a" // 063 NoMailOnSystem
......@@ -198,7 +198,7 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x01\x72\x01\x69\x61\x62\x6f\x72\x74\x65\x64\x2e\x01\x6e\x0d\x0a" // 118 MessageScanAborted
,"\x0d\x0a\x4c\x6f\x67\x20\x6f\x66\x66" // 119 LogOffQ
,"\x0d\x0a\x59\x6f\x75\x20\x63\x61\x6e\x27\x74\x20\x70\x6f\x73\x74\x20\x6f\x6e\x20\x74\x68\x69\x73\x20\x73\x75\x62\x2e\x0d\x0a" // 120 CantPostOnSub
,"\x01\x6e\x01\x3f\x01\x6d\x53\x65\x6e\x64\x69\x6e\x67\x20\x6d\x65\x73\x73\x61\x67\x65\x20\x74\x6f\x20\x01\x68\x25\x73\x0d\x0a" // 121 SendingMessageToUser
,"\x0d\x0a\x01\x6e\x01\x6d\x53\x65\x6e\x64\x69\x6e\x67\x20\x6d\x65\x73\x73\x61\x67\x65\x20\x74\x6f\x20\x01\x68\x25\x73\x0d\x0a" // 121 SendingMessageToUser
,"\x0d\x0a\x01\x72\x01\x68\x4e\x6f\x20\x6f\x74\x68\x65\x72\x20\x61\x63\x74\x69\x76\x65\x20\x6e\x6f\x64\x65\x73\x2e\x01\x6e\x0d\x0a"
"" // 122 NoOtherActiveNodes
,"\x0d\x0a\x0d\x0a\x59\x6f\x75\x20\x63\x61\x6e\x27\x74\x20\x75\x73\x65\x20\x74\x68\x65\x20\x65\x78\x74\x65\x72\x6e\x61\x6c\x20\x70"
......@@ -262,7 +262,7 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x0d\x0a\x43\x6c\x65\x61\x72\x20\x63\x72\x69\x74\x69\x63\x61\x6c\x20\x65\x72\x72\x6f\x72\x20\x63\x6f\x75\x6e\x74\x65\x72\x73\x20"
"\x6f\x6e\x20\x61\x6c\x6c\x20\x6e\x6f\x64\x65\x73" // 160 ClearErrCounter
,"\x0d\x0a\x49\x6e\x76\x61\x6c\x69\x64\x20\x6e\x6f\x64\x65\x2e\x0d\x0a" // 161 InvalidNode
,"\x01\x6e\x01\x3f\x01\x6d\x53\x65\x6e\x64\x69\x6e\x67\x20\x74\x65\x6c\x65\x67\x72\x61\x6d\x20\x74\x6f\x20\x01\x68\x25\x73\x20\x23"
,"\x01\x6e\x0d\x0a\x01\x6d\x53\x65\x6e\x64\x69\x6e\x67\x20\x74\x65\x6c\x65\x67\x72\x61\x6d\x20\x74\x6f\x20\x01\x68\x25\x73\x20\x23"
"\x25\x75\x01\x6e\x01\x6d\x0d\x0a\x28\x4d\x61\x78\x69\x6d\x75\x6d\x20\x6f\x66\x20\x35\x20\x6c\x69\x6e\x65\x73\x2c\x20\x42\x6c\x61"
"\x6e\x6b\x20\x6c\x69\x6e\x65\x20\x65\x6e\x64\x73\x2c\x20\x43\x74\x72\x6c\x2d\x43\x20\x74\x6f\x20\x61\x62\x6f\x72\x74\x29\x3a\x0d"
"\x0a\x01\x67\x01\x68" // 162 SendingTelegramToUser
......@@ -1031,7 +1031,7 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x01\x6e\x0d\x0a\x4e\x6f\x20\x4e\x65\x74\x4d\x61\x69\x6c\x20\x61\x6c\x6c\x6f\x77\x65\x64\x2e\x0d\x0a" // 617 NoNetMailAllowed
,"\x0d\x0a\x49\x74\x20\x77\x69\x6c\x6c\x20\x63\x6f\x73\x74\x20\x79\x6f\x75\x20\x25\x75\x20\x63\x72\x65\x64\x69\x74\x73\x20\x74\x6f"
"\x20\x73\x65\x6e\x64\x20\x4e\x65\x74\x4d\x61\x69\x6c\x2e\x20\x43\x6f\x6e\x74\x69\x6e\x75\x65" // 618 NetMailCostContinueQ
,"\x01\x6e\x01\x3f\x01\x6d\x53\x65\x6e\x64\x69\x6e\x67\x20\x4e\x65\x74\x4d\x61\x69\x6c\x20\x54\x6f\x3a\x20\x01\x68\x25\x73\x01\x6e"
,"\x01\x6e\x01\x6d\x0d\x0a\x53\x65\x6e\x64\x69\x6e\x67\x20\x4e\x65\x74\x4d\x61\x69\x6c\x20\x54\x6f\x3a\x20\x01\x68\x25\x73\x01\x6e"
"\x01\x6d\x20\x28\x01\x68\x25\x73\x01\x6e\x01\x6d\x29\x0d\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x46\x72\x6f"
"\x6d\x3a\x20\x01\x68\x25\x73\x01\x6e\x01\x6d\x20\x28\x01\x68\x25\x73\x01\x6e\x01\x6d\x29\x0d\x0a" // 619 NetMailing
,"\x52\x65\x6d\x6f\x76\x65\x20\x74\x68\x69\x73\x20\x73\x75\x62\x2d\x62\x6f\x61\x72\x64\x20\x66\x72\x6f\x6d\x20\x79\x6f\x75\x72\x20"
......@@ -1106,7 +1106,7 @@ const char * const text_defaults[TOTAL_TEXT]={
"\x68\x01\x79\x5b\x01\x77\x42\x01\x79\x5d\x61\x74\x63\x68\x20\x20\x5b\x01\x77\x56\x01\x79\x5d\x69\x65\x77\x20\x43\x6f\x6e\x74\x65"
"\x6e\x74\x20\x20\x5b\x01\x77\x45\x01\x79\x5d\x78\x74\x65\x6e\x64\x65\x64\x20\x49\x6e\x66\x6f\x20\x20\x5b\x01\x77\x50\x01\x79\x5d"
"\x72\x65\x76\x69\x6f\x75\x73\x20\x50\x61\x67\x65\x20\x20\x5b\x01\x77\x51\x01\x79\x5d\x75\x69\x74\x01\x3e\x01\x6e\x0d\x0a" // 661 FileListBatchCommands
,"\x01\x3f\x44\x6f\x77\x6e\x6c\x6f\x61\x64\x20\x61\x74\x74\x61\x63\x68\x65\x64\x20\x66\x69\x6c\x65\x3a\x20\x01\x77\x25\x73\x01\x62"
,"\x0d\x0a\x44\x6f\x77\x6e\x6c\x6f\x61\x64\x20\x61\x74\x74\x61\x63\x68\x65\x64\x20\x66\x69\x6c\x65\x3a\x20\x01\x77\x25\x73\x01\x62"
"\x20\x28\x25\x73\x20\x62\x79\x74\x65\x73\x29" // 662 DownloadAttachedFileQ
,"\x0d\x0a\x0d\x0a\x01\x6e\x54\x69\x6d\x65\x20\x6c\x65\x66\x74\x20\x3a\x20\x25\x31\x33\x75\x0d\x0a" // 663 FreeMinLeft
,"\x01\x62\x01\x68\x0d\x0a\x54\x69\x6d\x65\x20\x6c\x65\x66\x74\x20\x74\x6f\x20\x64\x65\x70\x6f\x73\x69\x74\x20\x69\x6e\x20\x6d\x69"
......@@ -1330,4 +1330,14 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x53\x63\x61\x6e\x6e\x69\x6e\x67" // 808 Scanning
,"\x44\x6f\x6e\x65" // 809 Done
,"\x01\x5b\x01\x3e" // 810 Scanned
,"\x01\x68\x01\x79\x48\x69\x74\x20\x79\x6f\x75\x72\x20\x01\x77\x62\x61\x63\x6b\x73\x70\x61\x63\x65\x01\x79\x20\x6f\x72\x20\x64\x65"
"\x6c\x65\x74\x65\x2d\x6c\x65\x66\x74\x20\x6b\x65\x79\x3a\x20" // 811 HitYourBackspaceKey
,"\x01\x5c\x01\x6e\x01\x63\x43\x68\x61\x72\x61\x63\x74\x65\x72\x20\x01\x68\x25\x75\x20\x28\x25\x30\x32\x58\x68\x29\x20\x01\x6e\x01"
"\x63\x72\x65\x63\x65\x69\x76\x65\x64\x2e\x0d\x0a" // 812 CharacterReceivedFmt
,"\x01\x72\x01\x68\x55\x6e\x73\x75\x70\x70\x6f\x72\x74\x65\x64\x20\x62\x61\x63\x6b\x73\x70\x61\x63\x65\x20\x6b\x65\x79\x3a\x20\x01"
"\x77\x25\x30\x32\x58\x68\x20" // 813 InvalidBackspaceKeyFmt
,"\x53\x77\x61\x70\x20\x74\x68\x65\x20\x64\x65\x6c\x65\x74\x65\x20\x28\x44\x45\x4c\x2c\x20\x5e\x42\x53\x29\x20\x61\x6e\x64\x20\x62"
"\x61\x63\x6b\x73\x70\x61\x63\x65\x20\x28\x42\x53\x2c\x20\x5e\x48\x29\x20\x6b\x65\x79\x73" // 814 SwapDeleteKeyQ
,"\x01\x6e\x01\x68\x43\x42\x4d\x2f\x01\x79\x50\x45\x54\x53\x43\x49\x49\x01\x77\x20\x74\x65\x72\x6d\x69\x6e\x61\x6c\x20\x64\x65\x74"
"\x65\x63\x74\x65\x64\x2e\x0d\x0a" // 815 PetTermDetected
};
......@@ -816,13 +816,14 @@ void sbbs_t::maindflts(user_t* user)
,user->misc&AUTOTERM ? "Auto Detect ":nulstr
,cols);
else
safe_snprintf(str,sizeof(str),"%s%s%s%s%s"
safe_snprintf(str,sizeof(str),"%s%s%s%s%s%s"
,user->misc&AUTOTERM ? "Auto Detect ":nulstr
,term&ANSI ? "ANSI ":"TTY "
,term&COLOR ? "(Color) ":"(Mono) "
,term&RIP ? "RIP " : nulstr
,term&NO_EXASCII ? "ASCII":"CP437");
bprintf(text[UserDefaultsTerminal],str);
,term&NO_EXASCII ? "ASCII ":"CP437 "
,term&SWAP_DELETE ? "DEL=BS " : nulstr);
bprintf(text[UserDefaultsTerminal], truncsp(str));
if(cfg.total_xedits)
bprintf(text[UserDefaultsXeditor]
,user->xedit ? cfg.xedit[user->xedit-1]->name : "None");
......@@ -916,10 +917,16 @@ void sbbs_t::maindflts(user_t* user)
else
user->misc&=~COLOR;
}
if(!(user->misc&PETSCII) && !yesno(text[ExAsciiTerminalQ]))
user->misc|=NO_EXASCII;
else
user->misc&=~NO_EXASCII;
if(!(user->misc&PETSCII)) {
if(!yesno(text[ExAsciiTerminalQ]))
user->misc|=NO_EXASCII;
else
user->misc&=~NO_EXASCII;
if(!noyes(text[SwapDeleteKeyQ]))
user->misc|=SWAP_DELETE;
else
user->misc&=~SWAP_DELETE;
}
if(!(user->misc&AUTOTERM) && (user->misc&(ANSI|NO_EXASCII)) == ANSI) {
if(!noyes(text[RipTerminalQ]))
user->misc|=RIP;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment