diff --git a/src/syncterm/bbslist.c b/src/syncterm/bbslist.c index c93aba244f7ead7ef6576ff4ceb329ac8daca2bf..5c5fce36b451fd66210ffff5007c2eb24c219413 100644 --- a/src/syncterm/bbslist.c +++ b/src/syncterm/bbslist.c @@ -195,6 +195,12 @@ static struct sort_order_info sort_order[] = { offsetof(struct bbslist, force_lcf), sizeof(((struct bbslist *)NULL)->force_lcf) }, + { + "Yellow Is Yellow", + 0, + offsetof(struct bbslist, yellow_is_yellow), + sizeof(((struct bbslist *)NULL)->yellow_is_yellow) + }, { NULL, 0, @@ -763,6 +769,7 @@ read_item(str_list_t listfile, struct bbslist *entry, char *bbsname, int id, int entry->hidepopups = iniGetBool(section, NULL, "HidePopups", false); entry->rip = iniGetEnum(section, NULL, "RIP", rip_versions, RIP_VERSION_NONE); entry->force_lcf = iniGetBool(section, NULL, "ForceLCF", false); + entry->yellow_is_yellow = iniGetBool(section, NULL, "YellowIsYellow", false); iniGetString(section, NULL, "DownloadPath", home, entry->dldir); iniGetString(section, NULL, "UploadPath", home, entry->uldir); @@ -1030,7 +1037,7 @@ get_rip_version(int oldver, int *changed) int edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdefault) { - char opt[19][69]; /* 21=Holds number of menu items, 80=Number of columns */ + char opt[21][69]; /* 21=Holds number of menu items, 80=Number of columns */ char *opts[(sizeof(opt) / sizeof(opt[0])) + 1]; int changed = 0; int copt = 0, i, j; @@ -1115,6 +1122,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef sprintf(opt[i++], "Hide Popups %s", item->hidepopups ? "Yes" : "No"); sprintf(opt[i++], "RIP %s", rip_versions[item->rip]); sprintf(opt[i++], "Force LCF Mode %s", item->force_lcf ? "Yes" : "No"); + sprintf(opt[i++], "Yellow is Yellow %s", item->yellow_is_yellow ? "Yes" : "No"); opt[i][0] = 0; uifc.changes = 0; @@ -1156,6 +1164,9 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef " Enable/Disable RIP modes\n\n" "~ Force LCF Mode ~\n" " Force Last Column Flag mode as used in VT terminals\n\n" + "~ Yellow Is Yellow ~\n" + " Make the dark yellow colour actually yellow instead of the brown\n" + " used in IBM CGA monitors\n\n" ; } else { @@ -1200,6 +1211,9 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef " Enable/Disable RIP modes\n\n" "~ Force LCF Mode ~\n" " Force Last Column Flag mode as used in VT terminals\n\n" + "~ Yellow Is Yellow ~\n" + " Make the dark yellow colour actually yellow instead of the brown\n" + " used in IBM CGA monitors\n\n" ; } i = uifc.list(WIN_MID | WIN_SAV | WIN_ACT, 0, 0, 0, &copt, &bar, @@ -1637,6 +1651,11 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef changed = 1; iniSetBool(&inifile, itemname, "ForceLCF", item->force_lcf, &ini_style); break; + case 19: + item->yellow_is_yellow = !item->yellow_is_yellow; + changed = 1; + iniSetBool(&inifile, itemname, "YellowIsYellow", item->yellow_is_yellow, &ini_style); + break; } if (uifc.changes) changed = 1; @@ -1691,6 +1710,7 @@ add_bbs(char *listpath, struct bbslist *bbs) iniSetEnum(&inifile, bbs->name, "RIP", rip_versions, bbs->rip, &ini_style); iniSetString(&inifile, bbs->name, "Comment", bbs->comment, &ini_style); iniSetBool(&inifile, bbs->name, "ForceLCF", bbs->force_lcf, &ini_style); + iniSetBool(&inifile, bbs->name, "YellowIsYellow", bbs->yellow_is_yellow, &ini_style); if ((listfile = fopen(listpath, "w")) != NULL) { iniWriteFile(listfile, inifile); fclose(listfile); diff --git a/src/syncterm/bbslist.h b/src/syncterm/bbslist.h index 35cc0393971072b1b5515c176a1c4a7fb73f602f..d0f7247f23bc0ed3a75670ff673d4c915d582f3b 100644 --- a/src/syncterm/bbslist.h +++ b/src/syncterm/bbslist.h @@ -139,6 +139,7 @@ struct bbslist { int flow_control; char comment[1024]; bool force_lcf; + bool yellow_is_yellow; }; extern char *music_names[]; diff --git a/src/syncterm/syncterm.c b/src/syncterm/syncterm.c index dd6f95ce44087a23427b467696eb6494d24a8f8b..27aa5f76906f5dec9f17311c39673c6783f432d6 100644 --- a/src/syncterm/syncterm.c +++ b/src/syncterm/syncterm.c @@ -1391,6 +1391,9 @@ main(int argc, char **argv) double sf; int default_hidepopups = -1; int default_nostatus = -1; + unsigned char saved_red = dac_default[3].red; + unsigned char saved_green = dac_default[3].green; + unsigned char saved_blue = dac_default[3].blue; const char syncterm_termcap[] = "\n# terminfo database entry for SyncTERM\n" "# compile with tic -x to get the user-defined capabilities for vim (bracketed pasted)\n" "syncterm|SyncTERM,\n" @@ -1908,8 +1911,16 @@ main(int argc, char **argv) } load_font_files(); setfont(find_font_id(bbs->font), true, 1); + if (bbs->yellow_is_yellow) { + dac_default[3].red = dac_default[1].red; + dac_default[3].green = dac_default[2].green; + dac_default[3].blue = dac_default[0].blue; + } if (doterm(bbs)) quitting = true; + dac_default[3].red = saved_red; + dac_default[3].green = saved_green; + dac_default[3].blue = saved_blue; fake_mode = -1; setvideoflags(0);