Commit 509c5576 authored by deuce's avatar deuce
Browse files

Use the same (fixed) helpbuf and option list in both places where ANSI

music can be configured.

Reported by DigitalMan.
Twice.
parent 89f2b1eb
...@@ -185,6 +185,27 @@ char *rate_names[]={"300", "600", "1200", "2400", "4800", "9600", "19200", "3840 ...@@ -185,6 +185,27 @@ char *rate_names[]={"300", "600", "1200", "2400", "4800", "9600", "19200", "3840
int rates[]={300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 76800, 115200, 0}; int rates[]={300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 76800, 115200, 0};
char *music_names[]={"ESC [ | only", "BANSI Style", "All ANSI Music enabled", NULL}; char *music_names[]={"ESC [ | only", "BANSI Style", "All ANSI Music enabled", NULL};
char music_helpbuf[] = "`ANSI Music Setup`\n\n"
"~ ESC [ | only ~ Only CSI | (SyncTERM) ANSI music is supported.\n"
" Enables Delete Line\n"
"~ BANSI Style ~ Also enables BANSI-Style (CSI N)\n"
" Enables Delete Line\n"
"~ All ANSI Music Enabled ~ Enables both CSI M and CSI N ANSI music.\n"
" Delete Line is disabled.\n"
"\n"
"So-Called ANSI Music has a long and troubled history. Although the\n"
"original ANSI standard has well defined ways to provide private\n"
"extensions to the spec, none of these methods were used. Instead,\n"
"so-called ANSI music replaced the Delete Line ANSI sequence. Many\n"
"full-screen editors use DL, and to this day, some programs (Such as\n"
"BitchX) require it to run.\n\n"
"To deal with this, BananaCom decided to use what *they* though was an\n"
"unspecified escape code ESC[N for ANSI music. Unfortunately, this is\n"
"broken also. Although rarely implemented in BBS clients, ESC[N is\n"
"the erase field sequence.\n\n"
"SyncTERM has now defined a third ANSI music sequence which *IS* legal\n"
"according to the ANSI spec. Specifically ESC[|.";
char *address_families[]={"PerDNS", "IPv4", "IPv6", NULL}; char *address_families[]={"PerDNS", "IPv4", "IPv6", NULL};
char *address_family_names[]={"As per DNS", "IPv4 only", "IPv6 only", NULL}; char *address_family_names[]={"As per DNS", "IPv4 only", "IPv6 only", NULL};
...@@ -1084,27 +1105,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd ...@@ -1084,27 +1105,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
} }
break; break;
case 16: case 16:
uifc.helpbuf="`ANSI Music Setup`\n\n" uifc.helpbuf=music_helpbuf; i=item->music;
"~ ANSI Music Disabled ~ Completely disables ANSI music\n"
" Enables Delete Line\n"
"~ ESC[N ~ Enables BANSI-Style ANSI music\n"
" Enables Delete Line\n"
"~ ANSI Music Enabled ~ Enables both ESC[M and ESC[N ANSI music.\n"
" Delete Line is disabled.\n"
"\n"
"So-Called ANSI Music has a long and troubled history. Although the\n"
"original ANSI standard has well defined ways to provide private\n"
"extensions to the spec, none of these methods were used. Instead,\n"
"so-called ANSI music replaced the Delete Line ANSI sequence. Many\n"
"full-screen editors use DL, and to this day, some programs (Such as\n"
"BitchX) require it to run.\n\n"
"To deal with this, BananaCom decided to use what *they* though was an\n"
"unspecified escape code ESC[N for ANSI music. Unfortunately, this is\n"
"broken also. Although rarely implemented in BBS clients, ESC[N is\n"
"the erase field sequence.\n\n"
"SyncTERM has now defined a third ANSI music sequence which *IS* legal\n"
"according to the ANSI spec. Specifically ESC[|.";
i=item->music;
if(uifc.list(WIN_SAV,0,0,0,&i,NULL,"ANSI Music Setup",music_names)!=-1) { if(uifc.list(WIN_SAV,0,0,0,&i,NULL,"ANSI Music Setup",music_names)!=-1) {
item->music=i; item->music=i;
iniSetInteger(&inifile,itemname,"ANSIMusic",item->music,&ini_style); iniSetInteger(&inifile,itemname,"ANSIMusic",item->music,&ini_style);
......
...@@ -93,6 +93,9 @@ struct bbslist { ...@@ -93,6 +93,9 @@ struct bbslist {
char font[80]; char font[80];
}; };
extern char *music_names[];
extern char music_helpbuf[];
struct bbslist *show_bbslist(char *current, int connected); struct bbslist *show_bbslist(char *current, int connected);
extern char *log_levels[]; extern char *log_levels[];
extern char *rate_names[]; extern char *rate_names[];
......
...@@ -1803,11 +1803,6 @@ void music_control(struct bbslist *bbs) ...@@ -1803,11 +1803,6 @@ void music_control(struct bbslist *bbs)
struct text_info txtinfo; struct text_info txtinfo;
struct ciolib_screen *savscrn; struct ciolib_screen *savscrn;
int i; int i;
char *opts[4]={
"ESC[| ANSI Music only"
,"ESC[N (BANSI-Style) and ESC[| ANSI Music"
,"ANSI Music Enabled"
};
gettextinfo(&txtinfo); gettextinfo(&txtinfo);
savscrn = savescreen(); savscrn = savescreen();
...@@ -1818,27 +1813,8 @@ void music_control(struct bbslist *bbs) ...@@ -1818,27 +1813,8 @@ void music_control(struct bbslist *bbs)
init_uifc(FALSE, FALSE); init_uifc(FALSE, FALSE);
i=cterm->music_enable; i=cterm->music_enable;
uifc.helpbuf="`ANSI Music Setup`\n\n" uifc.helpbuf=music_helpbuf;
"~ ANSI Music Disabled ~ Completely disables ANSI music\n" if(uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,NULL,"ANSI Music Setup",music_names)!=-1)
" Enables Delete Line\n"
"~ ESC[N ~ Enables BANSI-Style ANSI music\n"
" Enables Delete Line\n"
"~ ANSI Music Enabled ~ Enables both ESC[M and ESC[N ANSI music.\n"
" Delete Line is disabled.\n"
"\n"
"So-Called ANSI Music has a long and troubled history. Although the\n"
"original ANSI standard has well defined ways to provide private\n"
"extensions to the spec, none of these methods were used. Instead,\n"
"so-called ANSI music replaced the Delete Line ANSI sequence. Many\n"
"full-screen editors use DL, and to this day, some programs (Such as\n"
"BitchX) require it to run.\n\n"
"To deal with this, BananaCom decided to use what *they* thought was an\n"
"unspecified escape code, ESC[N, for ANSI music. Unfortunately, this is\n"
"broken also. Although rarely implemented in BBS clients, ESC[N is\n"
"the erase field sequence.\n\n"
"SyncTERM has now defined a third ANSI music sequence which *IS* legal\n"
"according to the ANSI spec. Specifically ESC[|.";
if(uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,NULL,"ANSI Music Setup",opts)!=-1)
cterm->music_enable=i; cterm->music_enable=i;
else else
check_exit(FALSE); check_exit(FALSE);
......
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