Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 48e7520e authored by rswindell's avatar rswindell

Support bright background colors:

- for PETSCII, this is automatic and you don't lose blink, but you do lose
  colored foreground when enabling a bright background ("reverse video")
- for ANSI, this mode is typically referred to as "iCE colors" and disables
  blinking-text support
- Ctrl-AE (^AE) is the new attribute code to enable bright-background
  (will have no effect on ANSI terminals that are not iCE color enabled)
  "E" is now valid in the ctrl/attr.cfg file and string values for JS
  console.attributes assignments, as well
- Ctrl-AI (^AI) - blink - now does nothing for ANSI/ICE color terminals
  (blinking is not supported in combination with bright-background)
- Using a new/non-standard CGA attribute bit-flag to indicate the selection of
  bright-background colors (BG_BRIGHT, bit 10), separate from BLINK.
  This change required all/most char/uchar attribute representations to be
  converted to int/uint.

New text.dat strings:
- PetTerminalDetected (renamed from PetTermDetected)
- PetTerminalQ
- TerminalAutoDetect
- TerminalColumns
- TerminalRows
- TerminalMonochrome
- TerminalColor
- TerminalIceColor
- IceColorTerminalQ
This also moved the MsgCarbonCopyList definition to the end of the file
for now.

PETSCII reverse-video attribute fix:
When a CR is sent to the terminal, the reverse-video attibute is auto-disabled
so update our "current attribute" (curatr) value to match the remote.

Support new printfile/putmsg mode flag: P_WRAP to force an ungraceful
line-wrap (splitting) to the specified column width. If no column width is
specified (0), then this mode will force an ungraceful wrap before the last
terminal column where some terminals *may* auto-wrap.

JS console.printfile() and printtail() methods now support an optional
"orig_columns" argument, similar to console.putmsg(). Must specify P_WORDWRAP
or P_WRAP for this argument to have any effect.

Much improved terminal-type selection/configuration in the user defaults
menu and abort (^C) at any of the yes/no prompts is now detected/handled much
better (to answers to the prompted questions are not saved to the user
settings).
parent fc529baa
......@@ -53,6 +53,7 @@ const char *sbbs_t::ansi(int atr)
case ANSI_NORMAL:
return("\x1b[0m");
case BLINK:
case BG_BRIGHT:
return("\x1b[5m");
/* Foreground */
......@@ -195,7 +196,16 @@ extern "C" char* ansi_attr(int atr, int curatr, char* str, BOOL color)
char* sbbs_t::ansi(int atr, int curatr, char* str)
{
return ::ansi_attr(atr, curatr, str, term_supports(COLOR) ? TRUE:FALSE);
long term = term_supports();
if(term&ICE_COLOR) {
switch(atr&(BG_BRIGHT|BLINK)) {
case BG_BRIGHT:
case BLINK:
atr ^= BLINK;
break;
}
}
return ::ansi_attr(atr, curatr, str, (term&COLOR) ? TRUE:FALSE);
}
void sbbs_t::ansi_getlines()
......
......@@ -335,7 +335,7 @@ long sbbs_t::term_supports(long cmp_flags)
long flags = ((sys_status&SS_USERON) && !(useron.misc&AUTOTERM)) ? useron.misc : autoterm;
if((sys_status&SS_USERON) && (useron.misc&AUTOTERM))
flags |= useron.misc & (NO_EXASCII | SWAP_DELETE);
flags |= useron.misc & (NO_EXASCII | SWAP_DELETE | COLOR | ICE_COLOR);
return(cmp_flags ? ((flags&cmp_flags)==cmp_flags) : (flags&TERM_FLAGS));
}
......@@ -450,6 +450,8 @@ int sbbs_t::outchar(char ch)
outcom(pet);
if(pet == PETSCII_SOLID)
outcom(PETSCII_REVERSE_OFF);
if(ch == '\r' && (curatr&0xf0) != 0) // reverse video is disabled upon CR
curatr >>= 4;
} else
outcom(ch);
}
......@@ -677,7 +679,8 @@ void sbbs_t::cleartoeos(void)
/****************************************************************************/
void sbbs_t::ctrl_a(char x)
{
char tmp1[128],atr=curatr;
char tmp1[128];
uint atr = curatr;
struct tm tm;
if(x && (uchar)x<=CTRL_Z) { /* Ctrl-A through Ctrl-Z for users with MF only */
......@@ -689,6 +692,9 @@ void sbbs_t::ctrl_a(char x)
cursor_right((uchar)x-0x7f);
return;
}
if(isdigit(x)) { /* background color */
atr &= (BG_BRIGHT|BLINK|0x0f);
}
switch(toupper(x)) {
case '!': /* level 10 or higher */
if(useron.level<10)
......@@ -823,9 +829,13 @@ void sbbs_t::ctrl_a(char x)
atr|=HIGH;
attr(atr);
break;
case 'I': /* Blink */
atr|=BLINK;
attr(atr);
case 'I':
if((term_supports()&(ICE_COLOR|PETSCII)) != ICE_COLOR)
attr(atr|BLINK);
break;
case 'E': /* Bright Background */
if(term_supports()&(ICE_COLOR|PETSCII))
attr(atr|BG_BRIGHT);
break;
case 'F': /* Blink, only if alt Blink Font is loaded */
if(((atr&HIGH) && (console&CON_HBLINK_FONT)) || (!(atr&HIGH) && (console&CON_BLINK_FONT)))
......@@ -869,36 +879,28 @@ void sbbs_t::ctrl_a(char x)
attr(atr);
break;
case '0': /* Black Background */
atr=(atr&0x8f);
attr(atr);
break;
case '1': /* Red Background */
atr=(atr&0x8f)|(uchar)BG_RED;
attr(atr);
attr(atr | BG_RED);
break;
case '2': /* Green Background */
atr=(atr&0x8f)|(uchar)BG_GREEN;
attr(atr);
attr(atr | BG_GREEN);
break;
case '3': /* Yellow Background */
atr=(atr&0x8f)|(uchar)BG_BROWN;
attr(atr);
attr(atr | BG_BROWN);
break;
case '4': /* Blue Background */
atr=(atr&0x8f)|(uchar)BG_BLUE;
attr(atr);
attr(atr | BG_BLUE);
break;
case '5': /* Magenta Background */
atr=(atr&0x8f)|(uchar)BG_MAGENTA;
attr(atr);
attr(atr |BG_MAGENTA);
break;
case '6': /* Cyan Background */
atr=(atr&0x8f)|(uchar)BG_CYAN;
attr(atr);
attr(atr | BG_CYAN);
break;
case '7': /* White Background */
atr=(atr&0x8f)|(uchar)BG_LIGHTGRAY;
attr(atr);
attr(atr | BG_LIGHTGRAY);
break;
}
}
......@@ -913,8 +915,12 @@ int sbbs_t::attr(int atr)
long term = term_supports();
if(term&PETSCII) {
if(atr&0x70) {
atr >>= 4;
if(atr&(0x70|BG_BRIGHT)) { // background color (reverse video for PETSCII)
if(atr&BG_BRIGHT)
atr |= HIGH;
else
atr &= ~HIGH;
atr = (atr&(BLINK|HIGH)) | ((atr&0x70)>>4);
outcom(PETSCII_REVERSE_ON);
} else
outcom(PETSCII_REVERSE_OFF);
......@@ -1003,8 +1009,8 @@ bool sbbs_t::msgabort()
int sbbs_t::backfill(const char* instr, float pct, int full_attr, int empty_attr)
{
int atr;
int save_atr = curatr;
uint atr;
uint save_atr = curatr;
int len;
char* str = strip_ctrl(instr, NULL);
......@@ -1042,8 +1048,8 @@ void sbbs_t::progress(const char* text, int count, int total, int interval)
struct savedline {
char buf[LINE_BUFSIZE+1]; /* Line buffer (i.e. ANSI-encoded) */
char beg_attr; /* Starting attribute of each line */
char end_attr; /* Ending attribute of each line */
uint beg_attr; /* Starting attribute of each line */
uint end_attr; /* Ending attribute of each line */
long column; /* Current column number */
};
......
......@@ -524,7 +524,7 @@ long sbbs_t::getkeys(const char *keys, ulong max, long mode)
void sbbs_t::pause()
{
char ch;
uchar tempattrs=curatr; /* was lclatr(-1) */
uint tempattrs=curatr; /* was lclatr(-1) */
int i,j;
long l=K_UPPER;
......
......@@ -50,7 +50,7 @@ size_t sbbs_t::getstr(char *strout, size_t maxlen, long mode, const str_list_t h
/* x&z=misc */
char str1[256],str2[256],undo[256];
uchar ch;
uchar atr;
uint atr;
int hidx = -1;
long term = term_supports();
......@@ -691,7 +691,7 @@ void sbbs_t::insert_indicator(void)
if(term_supports(ANSI)) {
ansi_save();
ansi_gotoxy(cols,1);
uchar z=curatr; /* and go to EOL */
uint z=curatr; /* and go to EOL */
if(console&CON_INSERT) {
attr(BLINK|BLACK|(LIGHTGRAY<<4));
outchar('I');
......
......@@ -1202,6 +1202,7 @@ js_printfile(JSContext *cx, uintN argc, jsval *arglist)
{
jsval *argv=JS_ARGV(cx, arglist);
int32 mode=0;
int32 columns=0;
JSString* str;
sbbs_t* sbbs;
char* cstr;
......@@ -1218,12 +1219,16 @@ js_printfile(JSContext *cx, uintN argc, jsval *arglist)
if(!JS_ValueToInt32(cx,argv[1],&mode))
return JS_FALSE;
}
if(argc>2 && JSVAL_IS_NUMBER(argv[2])) {
if(!JS_ValueToInt32(cx,argv[2],&columns))
return JS_FALSE;
}
JSSTRING_TO_MSTRING(cx, str, cstr, NULL);
if(cstr==NULL)
return JS_FALSE;
rc=JS_SUSPENDREQUEST(cx);
bool result = sbbs->printfile(cstr,mode);
bool result = sbbs->printfile(cstr,mode,columns);
free(cstr);
JS_RESUMEREQUEST(cx, rc);
......@@ -1238,6 +1243,7 @@ js_printtail(JSContext *cx, uintN argc, jsval *arglist)
jsval *argv=JS_ARGV(cx, arglist);
int32 lines=0;
int32 mode=0;
int32 columns=0;
uintN i;
sbbs_t* sbbs;
JSString* js_str=NULL;
......@@ -1253,10 +1259,14 @@ js_printtail(JSContext *cx, uintN argc, jsval *arglist)
if(!JS_ValueToInt32(cx,argv[i],&lines))
return JS_FALSE;
}
else {
else if(!mode){
if(!JS_ValueToInt32(cx,argv[i],&mode))
return JS_FALSE;
}
else {
if(!JS_ValueToInt32(cx,argv[i],&columns))
return JS_FALSE;
}
} else if(JSVAL_IS_STRING(argv[i]))
js_str = JS_ValueToString(cx, argv[i]);
}
......@@ -1271,7 +1281,7 @@ js_printtail(JSContext *cx, uintN argc, jsval *arglist)
if(cstr==NULL)
return JS_FALSE;
rc=JS_SUSPENDREQUEST(cx);
bool result = sbbs->printtail(cstr,lines,mode);
bool result = sbbs->printtail(cstr,lines,mode,columns);
free(cstr);
JS_RESUMEREQUEST(cx, rc);
......@@ -1947,11 +1957,12 @@ static jsSyncMethodSpec js_console_functions[] = {
,JSDOCSTR("returns the number of characters in text, excluding Ctrl-A codes")
,310
},
{"printfile", js_printfile, 1, JSTYPE_BOOLEAN, JSDOCSTR("filename [,mode=<tt>P_NONE</tt>]")
,JSDOCSTR("print a message text file with optional mode")
{"printfile", js_printfile, 1, JSTYPE_BOOLEAN, JSDOCSTR("filename [,mode=<tt>P_NONE</tt>] [,orig_columns=0")
,JSDOCSTR("print a message text file with optional mode.<br>"
"When <tt>P_WORDWRAP</tt> mode flag is specified, <i>orig_columns</i> specifies the original text column width, if known")
,310
},
{"printtail", js_printtail, 2, JSTYPE_BOOLEAN, JSDOCSTR("filename, lines [,mode=<tt>P_NONE</tt>]")
{"printtail", js_printtail, 2, JSTYPE_BOOLEAN, JSDOCSTR("filename, lines [,mode=<tt>P_NONE</tt>] [,orig_columns=0]")
,JSDOCSTR("print last x lines of file with optional mode")
,310
},
......
......@@ -344,7 +344,7 @@ BOOL md(char *inpath)
/****************************************************************************/
BOOL read_attr_cfg(scfg_t* cfg, char* error)
{
char* p;
uint* clr;
char str[256],fname[13];
long offset=0;
FILE *instream;
......@@ -356,7 +356,7 @@ BOOL read_attr_cfg(scfg_t* cfg, char* error)
return(FALSE);
}
FREE_AND_NULL(cfg->color);
if((cfg->color=malloc(MIN_COLORS))==NULL) {
if((cfg->color=malloc(MIN_COLORS * sizeof(uint)))==NULL) {
sprintf(error,"Error allocating memory (%u bytes) for colors"
,MIN_COLORS);
fclose(instream);
......@@ -370,9 +370,9 @@ BOOL read_attr_cfg(scfg_t* cfg, char* error)
if(readline(&offset,str,4,instream)==NULL)
break;
if(cfg->total_colors>=MIN_COLORS) {
if((p=realloc(cfg->color,cfg->total_colors+1))==NULL)
if((clr=realloc(cfg->color,(cfg->total_colors+1) * sizeof(uint)))==NULL)
break;
cfg->color=p;
cfg->color=clr;
}
cfg->color[cfg->total_colors]=attrstr(str);
}
......
......@@ -179,7 +179,7 @@ BOOL sbbs_t::newuser()
useron.misc |= SWAP_DELETE;
}
else if(key == PETSCII_DELETE)
useron.misc |= (AUTOTERM|PETSCII);
useron.misc |= (AUTOTERM|PETSCII|COLOR);
else {
bprintf(text[InvalidBackspaceKeyFmt], key, key);
if(text[ContinueQ][0] && !yesno(text[ContinueQ]))
......@@ -191,7 +191,7 @@ BOOL sbbs_t::newuser()
if(useron.misc&PETSCII) {
autoterm |= PETSCII;
outcom(PETSCII_UPPERLOWER);
bputs(text[PetTermDetected]);
bputs(text[PetTerminalDetected]);
} else {
if(!yesno(text[ExAsciiTerminalQ]))
useron.misc|=NO_EXASCII;
......
......@@ -43,7 +43,7 @@
/* for pauses, aborts and ANSI. 'str' is the path of the file to print */
/* Called from functions menu and text_sec */
/****************************************************************************/
bool sbbs_t::printfile(const char* fname, long mode)
bool sbbs_t::printfile(const char* fname, long mode, long org_cols)
{
char* buf;
char fpath[MAX_PATH+1];
......@@ -105,7 +105,7 @@ bool sbbs_t::printfile(const char* fname, long mode)
errormsg(WHERE,ERR_READ,fpath,length);
else {
buf[l]=0;
putmsg(buf,mode);
putmsg(buf,mode,org_cols);
}
free(buf);
......@@ -119,7 +119,7 @@ bool sbbs_t::printfile(const char* fname, long mode)
return true;
}
bool sbbs_t::printtail(const char* fname, int lines, long mode)
bool sbbs_t::printtail(const char* fname, int lines, long mode, long org_cols)
{
char* buf;
char fpath[MAX_PATH+1];
......@@ -177,7 +177,7 @@ bool sbbs_t::printtail(const char* fname, int lines, long mode)
}
p--;
}
putmsg(p,mode);
putmsg(p,mode,org_cols);
}
if(mode&P_NOABORT && online==ON_REMOTE) {
SYNC;
......
......@@ -49,7 +49,8 @@
/****************************************************************************/
char sbbs_t::putmsg(const char *buf, long mode, long org_cols)
{
char tmpatr,tmp2[256],tmp3[128];
uint tmpatr;
char tmp2[256],tmp3[128];
char ret;
char* str=(char*)buf;
uchar exatr=0;
......@@ -92,17 +93,28 @@ char sbbs_t::putmsg(const char *buf, long mode, long org_cols)
}
while(str[l] && (mode&P_NOABORT || !msgabort()) && online) {
if((mode&P_TRUNCATE) && column >= (cols - 1)) {
switch(str[l]) {
case '\r':
case '\n':
case FF:
case CTRL_A:
break;
default:
switch(str[l]) {
case '\r':
case '\n':
case FF:
case CTRL_A:
break;
default: // printing char
if((mode&P_TRUNCATE) && column >= (cols - 1)) {
l++;
continue;
}
} else if(mode&P_WRAP) {
if(org_cols) {
if(column > (org_cols - 1)) {
CRLF;
}
} else {
if(column >= (cols - 1)) {
CRLF;
}
}
}
break;
}
if(str[l]==CTRL_A && str[l+1]!=0) {
if(str[l+1]=='"' && !(sys_status&SS_NEST_PF)) { /* Quote a file */
......
......@@ -463,8 +463,8 @@ public:
ulong dte_rate; /* Current COM Port (DTE) Rate */
time_t timeout; /* User inactivity timeout reference */
ulong timeleft_warn; /* low timeleft warning flag */
uchar curatr; /* Current Text Attributes Always */
uchar attr_stack[64]; /* Saved attributes (stack) */
uint curatr; /* Current Text Attributes Always */
uint attr_stack[64]; /* Saved attributes (stack) */
int attr_sp; /* Attribute stack pointer */
long lncntr; /* Line Counter - for PAUSE */
bool tos; /* Cursor is currently at the Top of Screen */
......@@ -480,7 +480,7 @@ public:
link_list_t savedlines;
char lbuf[LINE_BUFSIZE+1];/* Temp storage for each line output */
int lbuflen; /* Number of characters in line buffer */
char latr; /* Starting attribute of line buffer */
uint latr; /* Starting attribute of line buffer */
ulong console; /* Defines current Console settings */
char wordwrap[81]; /* Word wrap buffer */
time_t now, /* Used to store current time in Unix format */
......@@ -759,8 +759,8 @@ public:
char handle_ctrlkey(char ch, long mode=0);
/* prntfile.cpp */
bool printfile(const char* fname, long mode);
bool printtail(const char* fname, int lines, long mode);
bool printfile(const char* fname, long mode, long org_cols = 0);
bool printtail(const char* fname, int lines, long mode, long org_cols = 0);
bool menu(const char *code, long mode = 0);
bool menu_exists(const char *code, const char* ext=NULL, char* realpath=NULL);
......
......@@ -655,8 +655,9 @@ typedef enum { /* Values for xtrn_t.event */
#define CTERM_FONTS (1L<<25) /* Loadable fonts are supported */
#define PETSCII (1L<<26) /* Commodore PET/CBM terminal */
#define SWAP_DELETE (1L<<27) /* Swap Delete and Backspace keys */
#define ICE_COLOR (1L<<28) /* Bright background color support */
#define TERM_FLAGS (ANSI|COLOR|NO_EXASCII|RIP|WIP|HTML|CTERM_FONTS|PETSCII|SWAP_DELETE)
#define TERM_FLAGS (ANSI|COLOR|NO_EXASCII|RIP|WIP|HTML|CTERM_FONTS|PETSCII|SWAP_DELETE|ICE_COLOR)
/* Special terminal key mappings */
#define TERM_KEY_HOME CTRL_B
......@@ -755,6 +756,7 @@ typedef enum { /* Values for xtrn_t.event */
#define P_TRUNCATE (1<<9) /* Truncate (don't display) long lines */
#define P_NOERROR (1<<10) /* Don't report error if file doesn't exist */
#define P_PETSCII (1<<11) /* Message is native PETSCII */
#define P_WRAP (1<<12) /* Wrap/split long-lines, ungracefully */
/* Bits in 'mode' for listfiles */
#define FL_ULTIME (1<<0) /* List files by upload time */
......@@ -944,6 +946,7 @@ enum COLORS {
#define ANSI_NORMAL 0x100
#define BG_BLACK 0x200
#define BG_BRIGHT 0x400 // Not an IBM-CGA/ANSI.SYS compatible attribute
#define BG_BLUE (BLUE<<4)
#define BG_GREEN (GREEN<<4)
#define BG_CYAN (CYAN<<4)
......
......@@ -601,7 +601,7 @@ typedef struct
uint16_t sec_warn; /* Seconds before inactivity warning */
uint16_t sec_hangup; /* Seconds before inactivity hang-up */
char* color; /* Different colors for the BBS */
uint* color; /* Different colors for the BBS */
uint32_t total_colors;
uint32_t ctrlkey_passthru; /* Bits represent control keys NOT handled by inkey() */
......
......@@ -85,7 +85,7 @@ void free_chat_cfg(scfg_t* cfg);
long aftol(char *str); /* Converts flag string to long */
char* ltoaf(long l, char *str); /* Converts long to flag string */
uchar attrstr(char *str); /* Convert ATTR string into attribute int */
uint attrstr(char *str); /* Convert ATTR string into attribute int */
#ifdef __cplusplus
}
......
......@@ -892,9 +892,9 @@ char *ltoaf(long l,char *str)
/****************************************************************************/
/* Returns the actual attribute code from a string of ATTR characters */
/****************************************************************************/
uchar attrstr(char *str)
uint attrstr(char *str)
{
uchar atr;
int atr;
ulong l=0;
atr=LIGHTGRAY;
......@@ -906,6 +906,9 @@ uchar attrstr(char *str)
case 'I': /* Blink */
atr|=BLINK;
break;
case 'E': /* iCE color */
atr|=BG_BRIGHT;
break;
case 'K': /* Black */
atr=(atr&0xf8)|BLACK;
break;
......
......@@ -521,6 +521,7 @@ BOOL DLLCALL valid_ctrl_a_attr(char a)
case 'C': /* cyan fg */
case 'G': /* green fg */
case 'H': /* high fg */
case 'E': /* high bg */
case 'I': /* blink */
case 'K': /* black fg */
case 'M': /* magenta fg */
......
......@@ -825,7 +825,15 @@ enum {
,CharacterReceivedFmt
,InvalidBackspaceKeyFmt
,SwapDeleteKeyQ
,PetTermDetected
,PetTerminalDetected
,PetTerminalQ
,TerminalAutoDetect
,TerminalColumns
,TerminalRows
,TerminalMonochrome
,TerminalColor
,TerminalIceColor
,IceColorTerminalQ
,MsgCarbonCopyList
,TOTAL_TEXT
......
......@@ -593,14 +593,15 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x55\x73\x65\x20\x61\x75\x74\x6f\x6d\x61\x74\x69\x63\x20\x74\x65\x72\x6d\x69\x6e\x61\x6c\x20\x74\x79\x70\x65\x20\x64\x65\x74\x65"
"\x63\x74\x69\x6f\x6e" // 365 AutoTerminalQ
,"\x44\x6f\x65\x73\x20\x79\x6f\x75\x72\x20\x74\x65\x72\x6d\x69\x6e\x61\x6c\x20\x73\x75\x70\x70\x6f\x72\x74\x20\x41\x4e\x53\x49" // 366 AnsiTerminalQ
,"\x44\x6f\x20\x79\x6f\x75\x20\x68\x61\x76\x65\x20\x61\x20\x63\x6f\x6c\x6f\x72\x20\x74\x65\x72\x6d\x69\x6e\x61\x6c" // 367 ColorTerminalQ
,"\x44\x6f\x65\x73\x20\x79\x6f\x75\x72\x20\x74\x65\x72\x6d\x69\x6e\x61\x6c\x20\x64\x69\x73\x70\x6c\x61\x79\x20\x63\x6f\x6c\x6f\x72"
"\x73" // 367 ColorTerminalQ
,"\x01\x6e\x01\x67\x41\x72\x65\x20\x79\x6f\x75\x20\x75\x73\x69\x6e\x67\x20\x01\x68\x52\x49\x50\x74\x65\x72\x6d\x01\x6e\x01\x67\x20"
"\x6f\x72\x20\x61\x20\x01\x68\x52\x49\x50\x73\x63\x72\x69\x70\x20\x01\x6e\x01\x67\x63\x6f\x6d\x70\x61\x74\x69\x62\x6c\x65\x20\x74"
"\x65\x72\x6d\x69\x6e\x61\x6c\x20\x70\x72\x6f\x67\x72\x61\x6d\x3f\x0d\x0a\x01\x68\x01\x77\x49\x4d\x50\x4f\x52\x54\x41\x4e\x54\x3a"
"\x01\x6e\x01\x67\x20\x49\x66\x20\x79\x6f\x75\x20\x61\x72\x65\x20\x6e\x6f\x74\x20\x61\x62\x73\x6f\x6c\x75\x74\x65\x6c\x79\x20\x73"
"\x75\x72\x65\x2c\x20\x68\x69\x74\x20\x01\x68\x01\x77\x01\x69\x4e\x01\x6e\x01\x62\x01\x68" // 368 RipTerminalQ
,"\x44\x6f\x65\x73\x20\x79\x6f\x75\x72\x20\x74\x65\x72\x6d\x69\x6e\x61\x6c\x20\x73\x75\x70\x70\x6f\x72\x74\x20\x49\x42\x4d\x20\x65"
"\x78\x74\x65\x6e\x64\x65\x64\x20\x41\x53\x43\x49\x49" // 369 ExAsciiTerminalQ
"\x78\x74\x65\x6e\x64\x65\x64\x20\x41\x53\x43\x49\x49\x20\x28\x43\x50\x34\x33\x37\x29" // 369 ExAsciiTerminalQ
,"\x01\x6e\x59\x6f\x75\x20\x63\x61\x6e\x27\x74\x20\x75\x73\x65\x20\x74\x68\x61\x74\x20\x6e\x61\x6d\x65\x20\x28\x64\x75\x70\x6c\x69"
"\x63\x61\x74\x65\x20\x6f\x72\x20\x69\x6e\x76\x61\x6c\x69\x64\x29\x2e\x0d\x0a" // 370 YouCantUseThatName
,"\x01\x6c\x01\x2d\x01\x67\x59\x6f\x75\x72\x20\x70\x61\x73\x73\x77\x6f\x72\x64\x20\x69\x73\x20\x01\x68\x25\x73\x0d\x0a" // 371 YourPasswordIs
......@@ -776,7 +777,8 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x01\x6e\x01\x62\x5b\x01\x68\x01\x77\x45\x01\x6e\x01\x62\x5d\x20\x01\x68\x45\x78\x74\x65\x72\x6e\x61\x6c\x20\x45\x64\x69\x74\x6f"
"\x72\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x01\x6e\x01\x62\x01\x5c\x3a\x20\x01\x63\x25\x73\x0d\x0a" // 476 UserDefaultsXeditor
,"\x01\x6e\x01\x62\x5b\x01\x68\x01\x77\x4c\x01\x6e\x01\x62\x5d\x20\x01\x68\x53\x63\x72\x65\x65\x6e\x20\x4c\x65\x6e\x67\x74\x68\x20"
"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x01\x6e\x01\x62\x01\x5c\x3a\x20\x01\x63\x25\x73\x0d\x0a" // 477 UserDefaultsRows
"\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x01\x6e\x01\x62\x01\x5c\x3a\x20\x01\x63\x25\x73\x20\x25\x73\x0d\x0a"
"" // 477 UserDefaultsRows
,"\x01\x6e\x01\x62\x5b\x01\x68\x01\x77\x58\x01\x6e\x01\x62\x5d\x20\x01\x68\x45\x78\x70\x65\x72\x74\x20\x4d\x65\x6e\x75\x20\x4d\x6f"
"\x64\x65\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x01\x6e\x01\x62\x3a\x20\x01\x63\x25\x73\x0d\x0a" // 478 UserDefaultsMenuMode
,"\x01\x6e\x01\x62\x5b\x01\x68\x01\x77\x50\x01\x6e\x01\x62\x5d\x20\x01\x68\x53\x63\x72\x65\x65\x6e\x20\x50\x61\x75\x73\x65\x20\x20"
......@@ -1330,8 +1332,8 @@ 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
,"\x0d\x0a\x01\x68\x01\x79\x48\x49\x54\x20\x79\x6f\x75\x72\x20\x01\x77\x42\x41\x43\x4b\x53\x50\x41\x43\x45\x01\x79\x20\x6f\x72\x20"
"\x44\x45\x4c\x45\x54\x45\x2d\x4c\x45\x46\x54\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"
......@@ -1339,6 +1341,18 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\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
,"\x0d\x0a\xb3\x20\x01\x62\x43\x43\x20\x20\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x25\x2e\x37\x30\x73" // 816 MsgCarbonCopyList
"\x65\x63\x74\x65\x64\x2e\x0d\x0a" // 815 PetTerminalDetected
,"\x41\x72\x65\x20\x79\x6f\x75\x20\x75\x73\x69\x6e\x67\x20\x61\x20\x43\x42\x4d\x2f\x50\x45\x54\x53\x43\x49\x49\x20\x74\x65\x72\x6d"
"\x69\x6e\x61\x6c" // 816 PetTerminalQ
,"\x41\x75\x74\x6f\x20\x44\x65\x74\x65\x63\x74\x20" // 817 TerminalAutoDetect
,"\x63\x6f\x6c\x75\x6d\x6e\x73" // 818 TerminalColumns
,"\x72\x6f\x77\x73" // 819 TerminalRows
,"\x28\x6d\x6f\x6e\x6f\x29\x20" // 820 TerminalMonochrome
,"\x28\x63\x6f\x6c\x6f\x72\x29\x20" // 821 TerminalColor
,"\x28\x69\x43\x45\x20\x63\x6f\x6c\x6f\x72\x29\x20" // 822 TerminalIceColor
,"\x44\x6f\x65\x73\x20\x79\x6f\x75\x72\x20\x74\x65\x72\x6d\x69\x6e\x61\x6c\x20\x64\x69\x73\x70\x6c\x61\x79\x20\x62\x72\x69\x67\x68"
"\x74\x20\x62\x61\x63\x6b\x67\x72\x6f\x75\x6e\x64\x20\x28\x69\x43\x45\x29\x20\x63\x6f\x6c\x6f\x72\x73\x0d\x0a\x20\x20\x20\x20\x01"
"\x6e\x01\x69\x01\x6b\x01\x33\x54\x68\x69\x73\x20\x74\x65\x78\x74\x01\x6e\x20\x69\x73\x20\x62\x6c\x61\x63\x6b\x20\x6f\x6e\x20\x79"
"\x65\x6c\x6c\x6f\x77\x20\x61\x6e\x64\x20\x4e\x4f\x54\x20\x42\x4c\x49\x4e\x4b\x49\x4e\x47" // 823 IceColorTerminalQ
,"\x0d\x0a\xb3\x20\x01\x62\x43\x43\x20\x20\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x25\x2e\x37\x30\x73" // 824 MsgCarbonCopyList
};
......@@ -812,29 +812,29 @@ void sbbs_t::maindflts(user_t* user)
bprintf(text[UserDefaultsHdr],user->alias,user->number);
long term = (user == &useron) ? term_supports() : user->misc;
if(term&PETSCII)
safe_snprintf(str,sizeof(str),"%sPETSCII %lu columns"
,user->misc&AUTOTERM ? "Auto Detect ":nulstr
,cols);
safe_snprintf(str,sizeof(str),"%sPETSCII %lu %s"
,user->misc&AUTOTERM ? text[TerminalAutoDetect]:nulstr
,cols, text[TerminalColumns]);
else
safe_snprintf(str,sizeof(str),"%s%s%s%s%s%s"
,user->misc&AUTOTERM ? "Auto Detect ":nulstr
,user->misc&AUTOTERM ? text[TerminalAutoDetect]:nulstr
,term&ANSI ? "ANSI ":"TTY "
,term&COLOR ? "(Color) ":"(Mono) "
,term&COLOR ? (term&ICE_COLOR ? text[TerminalIceColor] : text[TerminalColor]) : text[TerminalMonochrome]
,term&RIP ? "RIP " : nulstr
,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");
if(user->rows)
ultoa(user->rows,tmp,10);
else
SAFEPRINTF(tmp,"Auto Detect (%ld)",rows);
bprintf(text[UserDefaultsRows],tmp);