Skip to content
Snippets Groups Projects
Commit 8f7cfadf authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Replace BOOL/TRUE/FALSE with bool/true/false

There's no reason to be aggressively ancient.
parent 7c808a9d
Branches
Tags
No related merge requests found
Showing
with 437 additions and 430 deletions
......@@ -309,15 +309,15 @@ void viewofflinescroll(void)
textmode(scrollback_mode);
switch(ciolib_to_screen(scrollback_mode)) {
case SCREEN_MODE_C64:
setfont(33,TRUE,1);
setfont(33,true,1);
break;
case SCREEN_MODE_C128_40:
case SCREEN_MODE_C128_80:
setfont(35,TRUE,1);
setfont(35,true,1);
break;
case SCREEN_MODE_ATARI:
case SCREEN_MODE_ATARI_XEP80:
setfont(36,TRUE,1);
setfont(36,true,1);
break;
}
/* Set up a shadow palette */
......@@ -325,10 +325,10 @@ void viewofflinescroll(void)
for (i=0; i < sizeof(dac_default)/sizeof(struct dac_colors); i++)
setpalette(i + 16, dac_default[i].red << 8 | dac_default[i].red, dac_default[i].green << 8 | dac_default[i].green, dac_default[i].blue << 8 | dac_default[i].blue);
}
setfont(0, FALSE, 1);
setfont(0, FALSE, 2);
setfont(0, FALSE, 3);
setfont(0, FALSE, 4);
setfont(0, false, 1);
setfont(0, false, 2);
setfont(0, false, 3);
setfont(0, false, 4);
drawwin();
set_modepalette(palettes[COLOUR_PALETTE]);
top=scrollback_lines;
......@@ -358,7 +358,7 @@ void viewofflinescroll(void)
case 0:
switch(key|getch()<<8) {
case CIO_KEY_QUIT:
check_exit(TRUE);
check_exit(true);
if (quitting)
i=1;
break;
......@@ -389,7 +389,7 @@ void viewofflinescroll(void)
top+=sbtxtinfo.screenheight;
break;
case CIO_KEY_F(1):
init_uifc(FALSE, FALSE);
init_uifc(false, false);
uifc.helpbuf= "`Scrollback Buffer`\n\n"
"~ J ~ or ~ Up Arrow ~ Scrolls up one line\n"
"~ K ~ or ~ Down Arrow ~ Scrolls down one line\n"
......@@ -424,7 +424,7 @@ void viewofflinescroll(void)
}
textmode(txtinfo.currmode);
init_uifc(TRUE,TRUE);
init_uifc(true, true);
return;
}
......@@ -533,7 +533,7 @@ void write_sortorder(void)
strListPush(&sortorders, str);
}
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, FALSE);
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, false);
if((inifile=fopen(inipath,"r"))!=NULL) {
inicontents=iniReadFile(inifile);
fclose(inifile);
......@@ -590,7 +590,7 @@ void edit_sorting(struct bbslist **list, int *listcount, int *ocur, int *obar, c
,0,0,0,&curr,&bar,"Sort Order",opts);
if(ret==-1) {
if (uifc.exit_flags & UIFC_XF_QUIT) {
if (!check_exit(FALSE))
if (!check_exit(false))
continue;
}
break;
......@@ -606,7 +606,7 @@ void edit_sorting(struct bbslist **list, int *listcount, int *ocur, int *obar, c
if(j==0) {
uifc.helpbuf= "All sort orders are present in the list.";
uifc.msg("No more sort orders.");
if(check_exit(FALSE))
if(check_exit(false))
break;
}
else {
......@@ -629,7 +629,7 @@ void edit_sorting(struct bbslist **list, int *listcount, int *ocur, int *obar, c
}
}
else {
if(check_exit(FALSE))
if(check_exit(false))
break;
}
}
......@@ -661,7 +661,7 @@ void read_item(str_list_t listfile, struct bbslist *entry, char *bbsname, int id
char home[MAX_PATH+1];
str_list_t section;
get_syncterm_filename(home, sizeof(home), SYNCTERM_DEFAULT_TRANSFER_PATH, FALSE);
get_syncterm_filename(home, sizeof(home), SYNCTERM_DEFAULT_TRANSFER_PATH, false);
if(bbsname != NULL) {
#if 0
switch(type) {
......@@ -687,18 +687,18 @@ void read_item(str_list_t listfile, struct bbslist *entry, char *bbsname, int id
iniGetString(section,NULL,"UserName","",entry->user);
iniGetString(section,NULL,"Password","",entry->password);
iniGetString(section,NULL,"SystemPassword","",entry->syspass);
if(iniGetBool(section,NULL,"BeDumb",FALSE)) /* Legacy */
if(iniGetBool(section,NULL,"BeDumb",false)) /* Legacy */
entry->conn_type=CONN_TYPE_RAW;
entry->screen_mode=iniGetEnum(section,NULL,"ScreenMode",screen_modes_enum,SCREEN_MODE_CURRENT);
entry->nostatus=iniGetBool(section,NULL,"NoStatus",FALSE);
entry->hidepopups=iniGetBool(section,NULL,"HidePopups",FALSE);
entry->nostatus=iniGetBool(section,NULL,"NoStatus",false);
entry->hidepopups=iniGetBool(section,NULL,"HidePopups",false);
entry->rip=iniGetEnum(section,NULL,"RIP",rip_versions,RIP_VERSION_NONE);
iniGetString(section,NULL,"DownloadPath",home,entry->dldir);
iniGetString(section,NULL,"UploadPath",home,entry->uldir);
/* Log Stuff */
iniGetString(section,NULL,"LogFile","",entry->logfile);
entry->append_logfile=iniGetBool(section,NULL,"AppendLogFile",TRUE);
entry->append_logfile=iniGetBool(section,NULL,"AppendLogFile",true);
entry->xfer_loglevel=iniGetEnum(section,NULL,"TransferLogLevel",log_levels,LOG_INFO);
entry->telnet_loglevel=iniGetEnum(section,NULL,"TelnetLogLevel",log_levels,LOG_INFO);
......@@ -766,7 +766,7 @@ void read_list(char *listpath, struct bbslist **list, struct bbslist *defaults,
read_item(inilines,defaults,NULL,-1,type);
bbses=iniGetSectionList(inilines,NULL);
while((bbsname=strListRemove(&bbses,0))!=NULL) {
if(!list_name_check(list, bbsname, NULL, FALSE)) {
if(!list_name_check(list, bbsname, NULL, false)) {
if((list[*i]=(struct bbslist *)malloc(sizeof(struct bbslist)))==NULL) {
free(bbsname);
break;
......@@ -867,7 +867,7 @@ void configure_log(struct bbslist *item, const char *itemname, str_list_t inifil
*changed = 1;
}
else
check_exit(FALSE);
check_exit(false);
break;
case 1:
uifc.helpbuf= "`File Transfer Log Level`\n\n"
......@@ -878,7 +878,7 @@ void configure_log(struct bbslist *item, const char *itemname, str_list_t inifil
switch(uifc.list(WIN_SAV|WIN_BOT|WIN_RHT, 0, 0, 0, &(item->xfer_loglevel), NULL, "File Transfer Log Level", log_level_desc)) {
case -1:
item->xfer_loglevel = i;
check_exit(FALSE);
check_exit(false);
break;
default:
if (item->xfer_loglevel != i) {
......@@ -896,7 +896,7 @@ void configure_log(struct bbslist *item, const char *itemname, str_list_t inifil
switch(uifc.list(WIN_SAV|WIN_BOT|WIN_RHT, 0, 0, 0, &(item->telnet_loglevel), NULL, "Telnet Command Log Level", log_level_desc)) {
case -1:
item->telnet_loglevel = i;
check_exit(FALSE);
check_exit(false);
break;
default:
if (item->telnet_loglevel != i) {
......@@ -925,7 +925,7 @@ get_rip_version(int oldver, int *changed)
"works in any screen mode.";
switch(uifc.list(WIN_SAV,0,0,0,&cur,NULL,"RIP Mode",rip_versions)) {
case -1:
check_exit(FALSE);
check_exit(false);
break;
case RIP_VERSION_NONE:
case RIP_VERSION_1:
......@@ -957,7 +957,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
"must be copied into your personal directory.\n";
i=0;
if(uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,NULL,"Copy from system directory?",YesNo)!=0) {
check_exit(FALSE);
check_exit(false);
return(0);
}
item->type=USER_BBSLIST;
......@@ -1110,15 +1110,15 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
i++; /* no port number */
switch(i) {
case -1:
check_exit(FALSE);
check_exit(false);
if((!isdefault) && (itemname!=NULL) && (itemname[0]==0)) {
uifc.helpbuf= "`Cancel Save`\n\n"
"This entry has no name and can therefore not be saved.\n"
"Selecting `No` will return to editing mode.\n";
i=0;
if(uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,NULL,"Cancel Save?",YesNo)!=0) {
quitting=FALSE;
check_exit(FALSE);
quitting=false;
check_exit(false);
break;
}
strListFree(&inifile);
......@@ -1138,22 +1138,22 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
"Enter the name of the entry as it is to appear in the directory.";
strcpy(tmp,itemname);
uifc.input(WIN_MID|WIN_SAV,0,0,"Name",tmp,LIST_NAME_MAX,K_EDIT);
check_exit(FALSE);
check_exit(false);
if(quitting)
break;
if(stricmp(tmp,itemname) && list_name_check(list, tmp, NULL, FALSE)) {
if(stricmp(tmp,itemname) && list_name_check(list, tmp, NULL, false)) {
uifc.helpbuf= "`Entry Name Already Exists`\n\n"
"An entry with that name already exists in the directory.\n"
"Please choose a unique name.\n";
uifc.msg("Entry Name Already Exists!");
check_exit(FALSE);
check_exit(false);
}
else {
if(tmp[0]==0) {
uifc.helpbuf= "`Can Not Use and Empty Name`\n\n"
"Entry names can not be empty. Please enter an entry name.\n";
uifc.msg("Can not use an empty name");
check_exit(FALSE);
check_exit(false);
}
else {
iniRenameSection(&inifile,itemname,tmp);
......@@ -1171,7 +1171,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
:item->conn_type==CONN_TYPE_SHELL ? "Command"
: "Address"
,item->addr,LIST_ADDR_MAX,K_EDIT);
check_exit(FALSE);
check_exit(false);
iniSetString(&inifile,itemname,"Address",item->addr,&ini_style);
break;
case 3:
......@@ -1183,7 +1183,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
j = i;
switch (uifc.list(WIN_SAV, 0, 0, 0, &j, NULL, "Flow Control", fc_names)) {
case -1:
check_exit(FALSE);
check_exit(false);
break;
default:
item->flow_control = fc_from_enum(j);
......@@ -1202,7 +1202,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
"Telnet is generally port 23, RLogin is generally 513 and SSH is\n"
"generally 22\n";
uifc.input(WIN_MID|WIN_SAV,0,0,"TCP Port",str,5,K_EDIT|K_NUMBER);
check_exit(FALSE);
check_exit(false);
j=atoi(str);
if(j<1 || j>65535)
j=conn_ports[item->conn_type];
......@@ -1225,7 +1225,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
"For SSH, this must be the SSH user name.";
}
uifc.input(WIN_MID|WIN_SAV,0,0,"Username",item->user,MAX_USER_LEN,K_EDIT);
check_exit(FALSE);
check_exit(false);
iniSetString(&inifile,itemname,"UserName",item->user,&ini_style);
break;
case 5:
......@@ -1239,7 +1239,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
"For SSH, this must be the SSH password if it exists.\n";
}
uifc.input(WIN_MID|WIN_SAV,0,0,"Password",item->password,MAX_PASSWD_LEN,K_EDIT);
check_exit(FALSE);
check_exit(false);
iniSetString(&inifile,itemname,"Password",item->password,&ini_style);
break;
case 6:
......@@ -1255,7 +1255,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
"scripting.";
}
uifc.input(WIN_MID|WIN_SAV,0,0,"System Password",item->syspass,MAX_SYSPASS_LEN,K_EDIT);
check_exit(FALSE);
check_exit(false);
iniSetString(&inifile,itemname,"SystemPassword",item->syspass,&ini_style);
break;
case 2:
......@@ -1264,7 +1264,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
uifc.helpbuf=conn_type_help;
switch(uifc.list(WIN_SAV,0,0,0,&(item->conn_type),NULL,"Connection Type",&(conn_types[1]))) {
case -1:
check_exit(FALSE);
check_exit(false);
item->conn_type=i;
break;
default:
......@@ -1305,7 +1305,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
j = i;
switch(uifc.list(WIN_SAV,0,0,0,&(item->screen_mode),&j,"Screen Mode",screen_modes)) {
case -1:
check_exit(FALSE);
check_exit(false);
item->screen_mode=i;
break;
default:
......@@ -1362,7 +1362,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
if(uifc.input(WIN_MID|WIN_SAV,0,0,"Download Path",item->dldir,MAX_PATH,K_EDIT)>=0)
iniSetString(&inifile,itemname,"DownloadPath",item->dldir,&ini_style);
else
check_exit(FALSE);
check_exit(false);
break;
case 10:
uifc.helpbuf= "`Upload Path`\n\n"
......@@ -1370,7 +1370,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
if(uifc.input(WIN_MID|WIN_SAV,0,0,"Upload Path",item->uldir,MAX_PATH,K_EDIT)>=0)
iniSetString(&inifile,itemname,"UploadPath",item->uldir,&ini_style);
else
check_exit(FALSE);
check_exit(false);
break;
case 11:
configure_log(item, itemname, inifile, &changed);
......@@ -1386,7 +1386,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
i=get_rate_num(item->bpsrate);
switch(uifc.list(WIN_SAV,0,0,0,&i,NULL,"Comm Rate (BPS)",rate_names)) {
case -1:
check_exit(FALSE);
check_exit(false);
break;
default:
item->bpsrate=rates[i];
......@@ -1402,7 +1402,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
changed=1;
}
else
check_exit(FALSE);
check_exit(false);
break;
case 14:
uifc.helpbuf=address_family_help;
......@@ -1413,7 +1413,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
changed=1;
}
else
check_exit(FALSE);
check_exit(false);
break;
case 15:
uifc.helpbuf= "`Font`\n\n"
......@@ -1423,7 +1423,7 @@ int edit_list(struct bbslist **list, struct bbslist *item,char *listpath,int isd
i=j=find_font_id(item->font);
switch(uifc.list(WIN_SAV,0,0,0,&i,&j,"Font",font_names)) {
case -1:
check_exit(FALSE);
check_exit(false);
break;
default:
if(i!=find_font_id(item->font)) {
......@@ -1473,8 +1473,8 @@ void add_bbs(char *listpath, struct bbslist *bbs)
*/
iniSetString(&inifile,bbs->name,"Address",bbs->addr,&ini_style);
iniSetShortInt(&inifile,bbs->name,"Port",bbs->port,&ini_style);
iniSetDateTime(&inifile,bbs->name,"Added",/* include time */TRUE,time(NULL),&ini_style);
iniSetDateTime(&inifile,bbs->name,"LastConnected",/* include time */TRUE,bbs->connected,&ini_style);
iniSetDateTime(&inifile,bbs->name,"Added",/* include time */true,time(NULL),&ini_style);
iniSetDateTime(&inifile,bbs->name,"LastConnected",/* include time */true,bbs->connected,&ini_style);
iniSetInteger(&inifile,bbs->name,"TotalCalls",bbs->calls,&ini_style);
iniSetString(&inifile,bbs->name,"UserName",bbs->user,&ini_style);
iniSetString(&inifile,bbs->name,"Password",bbs->password,&ini_style);
......@@ -1574,7 +1574,7 @@ custom_mode_adjusted(int *cur, char **opt)
vparams[cvmode].aspect_height = settings.custom_ah;
textmode(ti.currmode);
}
init_uifc(TRUE, TRUE);
init_uifc(true, true);
// Draw BBS List
uifc.list((*glob_listcount<MAX_OPTS?WIN_XTR:0)
......@@ -1601,7 +1601,7 @@ void change_settings(int connected)
char str[64];
int cur=0;
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, FALSE);
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, false);
if((inifile=fopen(inipath,"r"))!=NULL) {
inicontents=iniReadFile(inifile);
fclose(inifile);
......@@ -1667,7 +1667,7 @@ void change_settings(int connected)
}
switch(uifc.list(WIN_MID|WIN_SAV|WIN_ACT,0,0,0,&cur,NULL,"Program Settings",opt)) {
case -1:
check_exit(FALSE);
check_exit(false);
goto write_ini;
case 0:
settings.confirm_close=!settings.confirm_close;
......@@ -1684,7 +1684,7 @@ void change_settings(int connected)
i = sizeof(screen_modes)/sizeof(screen_modes[0]);
switch(i=uifc.list(WIN_SAV,0,0,0,&j,&i,"Startup Screen Mode",screen_modes)) {
case -1:
check_exit(FALSE);
check_exit(false);
continue;
default:
settings.startup_mode=j;
......@@ -1750,7 +1750,7 @@ void change_settings(int connected)
;
switch(i=uifc.list(WIN_SAV,0,0,0,&j,NULL,"Video Output Mode",output_types)) {
case -1:
check_exit(FALSE);
check_exit(false);
continue;
default:
settings.output_mode=output_map[j];
......@@ -1770,7 +1770,7 @@ void change_settings(int connected)
if(j<1) {
uifc.helpbuf= "There must be at least one line in the scrollback buffer.";
uifc.msg("Cannot set lines to less than one.");
check_exit(FALSE);
check_exit(false);
}
else {
tmpscroll=realloc(scrollback_buf,80*sizeof(*scrollback_buf)*j);
......@@ -1779,7 +1779,7 @@ void change_settings(int connected)
uifc.helpbuf="The selected scrollback size is too large.\n"
"Please reduce the number of lines.";
uifc.msg("Cannot allocate space for scrollback.");
check_exit(FALSE);
check_exit(false);
}
else {
if(scrollback_lines > (unsigned)j)
......@@ -1790,7 +1790,7 @@ void change_settings(int connected)
}
}
else
check_exit(FALSE);
check_exit(false);
break;
case 5:
uifc.helpbuf= "`Modem/Comm Device`\n\n"
......@@ -1801,7 +1801,7 @@ void change_settings(int connected)
if(uifc.input(WIN_MID|WIN_SAV,0,0,"Modem/Comm Device",settings.mdm.device_name,INI_MAX_VALUE_LEN,K_EDIT)>=0)
iniSetString(&inicontents,"SyncTERM","ModemDevice",settings.mdm.device_name,&ini_style);
else
check_exit(FALSE);
check_exit(false);
break;
case 6:
uifc.helpbuf= "`Modem/Comm Rate`\n\n"
......@@ -1816,7 +1816,7 @@ void change_settings(int connected)
iniSetLongInt(&inicontents,"SyncTERM","ModemComRate",settings.mdm.com_rate,&ini_style);
}
else
check_exit(FALSE);
check_exit(false);
break;
case 7:
......@@ -1842,7 +1842,7 @@ void change_settings(int connected)
if(uifc.input(WIN_MID|WIN_SAV,0,0,"Modem Init String",settings.mdm.init_string,INI_MAX_VALUE_LEN-1,K_EDIT)>=0)
iniSetString(&inicontents,"SyncTERM","ModemInit",settings.mdm.init_string,&ini_style);
else
check_exit(FALSE);
check_exit(false);
break;
case 8:
uifc.helpbuf= "`Modem Dial String`\n\n"
......@@ -1851,7 +1851,7 @@ void change_settings(int connected)
if(uifc.input(WIN_MID|WIN_SAV,0,0,"Modem Dial String",settings.mdm.dial_string,INI_MAX_VALUE_LEN-1,K_EDIT)>=0)
iniSetString(&inicontents,"SyncTERM","ModemDial",settings.mdm.dial_string,&ini_style);
else
check_exit(FALSE);
check_exit(false);
break;
case 9:
uifc.helpbuf= "`List Path`\n\n"
......@@ -1859,7 +1859,7 @@ void change_settings(int connected)
if(uifc.input(WIN_MID|WIN_SAV,0,0,"List Path",settings.list_path,MAX_PATH,K_EDIT)>=0)
iniSetString(&inicontents,"SyncTERM","ListPath",settings.list_path,&ini_style);
else
check_exit(FALSE);
check_exit(false);
break;
case 10:
uifc.helpbuf= "`TERM For Shell`\n\n"
......@@ -1868,7 +1868,7 @@ void change_settings(int connected)
if(uifc.input(WIN_MID|WIN_SAV,0,0,"TERM",settings.TERM,LIST_NAME_MAX,K_EDIT)>=0)
iniSetString(&inicontents,"SyncTERM","TERM",settings.TERM,&ini_style);
else
check_exit(FALSE);
check_exit(false);
break;
case 11:
settings.blocky = !settings.blocky;
......@@ -1897,7 +1897,7 @@ void change_settings(int connected)
subopts[5] = NULL;
switch (uifc.list(WIN_SAV,0,0,0,&j,NULL,"Video Output Mode",subopts)) {
case -1:
check_exit(FALSE);
check_exit(false);
k = 1;
break;
case 0:
......@@ -1908,7 +1908,7 @@ void change_settings(int connected)
l = atoi(str);
if (l < 14 || l > 255) {
uifc.msg("Rows must be between 14 and 255.");
check_exit(FALSE);
check_exit(false);
}
else {
settings.custom_rows = l;
......@@ -1926,7 +1926,7 @@ void change_settings(int connected)
l = atoi(str);
if (l < 40 || l > 255) {
uifc.msg("Columns must be between 40 and 255.");
check_exit(FALSE);
check_exit(false);
}
else {
settings.custom_cols = l;
......@@ -1955,7 +1955,7 @@ void change_settings(int connected)
}
switch (uifc.list(WIN_SAV, 0, 0, 0, &l, NULL, "Font Size", &subopts[6])) {
case -1:
check_exit(FALSE);
check_exit(false);
break;
case 0:
settings.custom_fontheight = 8;
......@@ -1982,7 +1982,7 @@ void change_settings(int connected)
l = atoi(str);
if (l <= 0) {
uifc.msg("Aspec Ratio Width must be greater than zero");
check_exit(FALSE);
check_exit(false);
}
else {
settings.custom_aw = l;
......@@ -1999,7 +1999,7 @@ void change_settings(int connected)
l = atoi(str);
if (l <= 0) {
uifc.msg("Aspec Ratio Height must be greater than zero");
check_exit(FALSE);
check_exit(false);
}
else {
settings.custom_ah = l;
......@@ -2205,10 +2205,10 @@ struct bbslist *show_bbslist(char *current, int connected)
glob_list_title = list_title;
glob_list = &list;
if(init_uifc(connected?FALSE:TRUE, TRUE))
if(init_uifc(connected ? false : true, true))
return(NULL);
get_syncterm_filename(shared_list, sizeof(shared_list), SYNCTERM_PATH_LIST, TRUE);
get_syncterm_filename(shared_list, sizeof(shared_list), SYNCTERM_PATH_LIST, true);
list = malloc(BBSLIST_SIZE);
if (list == NULL)
return (NULL);
......@@ -2352,7 +2352,7 @@ struct bbslist *show_bbslist(char *current, int connected)
uifc.input(WIN_MID|WIN_SAV,0,0,"Address",addy,LIST_ADDR_MAX,0);
memcpy(&retlist, &defaults, sizeof(defaults));
if(uifc.changes) {
parse_url(addy,&retlist,defaults.conn_type,FALSE);
parse_url(addy,&retlist,defaults.conn_type,false);
free_list(&list[0],listcount);
free(list);
return(&retlist);
......@@ -2361,7 +2361,7 @@ struct bbslist *show_bbslist(char *current, int connected)
break;
case -1: /* ESC */
if(!connected)
if (!check_exit(TRUE))
if (!check_exit(true))
continue;
free_list(&list[0],listcount);
free(list);
......@@ -2378,7 +2378,7 @@ struct bbslist *show_bbslist(char *current, int connected)
"The total combined size of loaded entries is currently the highest\n"
"supported size. You must delete entries before adding more.";
uifc.msg("Max List size reached!");
check_exit(FALSE);
check_exit(false);
break;
}
if(safe_mode) {
......@@ -2386,7 +2386,7 @@ struct bbslist *show_bbslist(char *current, int connected)
"SyncTERM is currently running in safe mode. This means you cannot add to the\n"
"directory.";
uifc.msg("Cannot edit list in safe mode");
check_exit(FALSE);
check_exit(false);
break;
}
tmp[0]=0;
......@@ -2394,17 +2394,17 @@ struct bbslist *show_bbslist(char *current, int connected)
uifc.helpbuf= "`Name`\n\n"
"Enter the name of the entry as it is to appear in the directory.";
if(uifc.input(WIN_MID|WIN_SAV,0,0,"Name",tmp,LIST_NAME_MAX,K_EDIT)==-1) {
if (check_exit(FALSE))
if (check_exit(false))
break;
}
if(!uifc.changes)
break;
if(list_name_check(list, tmp, NULL, FALSE)) {
if(list_name_check(list, tmp, NULL, false)) {
uifc.helpbuf= "`Entry Name Already Exists`\n\n"
"An entry with that name already exists in the directory.\n"
"Please choose a unique name.\n";
uifc.msg("Entry Name Already Exists!");
check_exit(FALSE);
check_exit(false);
break;
}
listcount++;
......@@ -2433,7 +2433,7 @@ struct bbslist *show_bbslist(char *current, int connected)
uifc.changes=1;
}
else {
if (check_exit(FALSE))
if (check_exit(false))
break;
}
......@@ -2447,7 +2447,7 @@ struct bbslist *show_bbslist(char *current, int connected)
:list[listcount-1]->conn_type==CONN_TYPE_SHELL ? "Command"
:"Address"
,list[listcount-1]->addr,LIST_ADDR_MAX,K_EDIT);
check_exit(FALSE);
check_exit(false);
}
if(quitting || !uifc.changes) {
FREE_AND_NULL(list[listcount-1]);
......@@ -2475,7 +2475,7 @@ struct bbslist *show_bbslist(char *current, int connected)
"Reach over to your fridge, grab a cold one...\n"
"Watch the seagulls in their dance...\n";
uifc.msg("It's gone, calm down man!");
check_exit(FALSE);
check_exit(false);
break;
}
if(safe_mode) {
......@@ -2483,14 +2483,14 @@ struct bbslist *show_bbslist(char *current, int connected)
"SyncTERM is currently running in safe mode. This means you cannot remove from the\n"
"directory.";
uifc.msg("Cannot edit list in safe mode");
check_exit(FALSE);
check_exit(false);
break;
}
if(list[opt]->type==SYSTEM_BBSLIST) {
uifc.helpbuf= "`Cannot delete from system list`\n\n"
"This entry was loaded from the system-wide list and cannot be deleted.";
uifc.msg("Cannot delete system list entries");
check_exit(FALSE);
check_exit(false);
break;
}
sprintf(str,"Delete %s?",list[opt]->name);
......@@ -2507,10 +2507,10 @@ struct bbslist *show_bbslist(char *current, int connected)
"SyncTERM is currently running in safe mode. This means you cannot edit the\n"
"directory.";
uifc.msg("Cannot edit list in safe mode");
check_exit(FALSE);
check_exit(false);
break;
}
if(edit_list(list, list[opt],settings.list_path,FALSE)) {
if(edit_list(list, list[opt],settings.list_path,false)) {
load_bbslist(list, BBSLIST_SIZE, &defaults, settings.list_path, sizeof(settings.list_path), shared_list, sizeof(shared_list), &listcount, &opt, &bar, strdup(list[opt]->name));
oldopt=-1;
}
......@@ -2524,9 +2524,9 @@ struct bbslist *show_bbslist(char *current, int connected)
"SyncTERM is currently running in safe mode. This means you cannot edit the\n"
"directory.";
uifc.msg("Cannot edit list in safe mode");
check_exit(FALSE);
check_exit(false);
}
else if(edit_list(list, list[opt],settings.list_path,FALSE)) {
else if(edit_list(list, list[opt],settings.list_path,false)) {
load_bbslist(list, BBSLIST_SIZE, &defaults, settings.list_path, sizeof(settings.list_path), shared_list, sizeof(shared_list), &listcount, &opt, &bar, strdup(list[opt]->name));
oldopt=-1;
}
......@@ -2597,13 +2597,13 @@ struct bbslist *show_bbslist(char *current, int connected)
break;
case -1: /* ESC */
if (!connected)
if (!check_exit(TRUE))
if (!check_exit(true))
continue;
free_list(&list[0],listcount);
free(list);
return(NULL);
case 0: /* Edit default connection settings */
edit_list(NULL, &defaults,settings.list_path,TRUE);
edit_list(NULL, &defaults,settings.list_path,true);
break;
case 1: { /* Screen Mode */
struct text_info ti;
......@@ -2622,7 +2622,7 @@ struct bbslist *show_bbslist(char *current, int connected)
i++;
uifcbail();
textmode(screen_to_ciolib(i));
init_uifc(TRUE, TRUE);
init_uifc(true, true);
uifc.list_height = listcount + 5;
if (uifc.list_height > (uifc.scrn_len - 4))
uifc.list_height = uifc.scrn_len - 4;
......@@ -2633,7 +2633,7 @@ struct bbslist *show_bbslist(char *current, int connected)
,0,0,0,&opt,&bar,list_title,(char **)list);
draw_comment(list[opt]);
}
else if (check_exit(FALSE)) {
else if (check_exit(false)) {
free_list(&list[0],listcount);
free(list);
return(NULL);
......@@ -2652,10 +2652,10 @@ struct bbslist *show_bbslist(char *current, int connected)
oldopt=-1;
break;
case 4: /* File Locations */
get_syncterm_filename(personal_list, sizeof(personal_list), SYNCTERM_PATH_LIST, FALSE);
get_syncterm_filename(setting_file, sizeof(setting_file), SYNCTERM_PATH_INI, FALSE);
get_syncterm_filename(default_download, sizeof(default_download), SYNCTERM_DEFAULT_TRANSFER_PATH, FALSE);
get_syncterm_filename(cache_path, sizeof(cache_path), SYNCTERM_PATH_CACHE, FALSE);
get_syncterm_filename(personal_list, sizeof(personal_list), SYNCTERM_PATH_LIST, false);
get_syncterm_filename(setting_file, sizeof(setting_file), SYNCTERM_PATH_INI, false);
get_syncterm_filename(default_download, sizeof(default_download), SYNCTERM_DEFAULT_TRANSFER_PATH, false);
get_syncterm_filename(cache_path, sizeof(cache_path), SYNCTERM_PATH_CACHE, false);
asprintf(&p, "`SyncTERM File Locations`\n\n"
"~ Global Dialing Directory (Read-Only) ~\n"
" %s\n\n"
......
......@@ -5,6 +5,7 @@
#ifndef _BBSLIST_H_
#define _BBSLIST_H_
#include <stdbool.h>
#include <stdio.h> /* FILE * */
#include "gen_defs.h"
#include "dirwrap.h" /* MAX_PATH */
......@@ -93,7 +94,7 @@ struct bbslist {
char dldir[MAX_PATH+1];
char uldir[MAX_PATH+1];
char logfile[MAX_PATH+1];
BOOL append_logfile;
bool append_logfile;
int xfer_loglevel;
int telnet_loglevel;
int bpsrate;
......
......@@ -255,11 +255,11 @@ size_t conn_buf_wait_cond(struct conn_buffer *buf, size_t bcount, unsigned long
* Connection functions
*/
BOOL conn_connected(void)
bool conn_connected(void)
{
if(conn_api.input_thread_running == 1 && conn_api.output_thread_running == 1)
return(TRUE);
return(FALSE);
return(true);
return(false);
}
int conn_recv_upto(void *vbuffer, size_t buflen, unsigned timeout)
......@@ -544,7 +544,7 @@ connected:
nonblock=0;
ioctlsocket(sock, FIONBIO, &nonblock);
if (!socket_recvdone(sock, 0)) {
int keepalives = TRUE;
int keepalives = true;
setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void*)&keepalives, sizeof(keepalives));
if (!bbs->hidepopups) {
......
......@@ -73,7 +73,7 @@ int conn_send(const void *buffer, size_t buflen, unsigned int timeout);
int conn_send_raw(const void *buffer, size_t buflen, unsigned int timeout);
int conn_connect(struct bbslist *bbs);
int conn_close(void);
BOOL conn_connected(void);
bool conn_connected(void);
size_t conn_data_waiting(void);
void conn_binary_mode_on(void);
void conn_binary_mode_off(void);
......
......@@ -25,7 +25,7 @@ extern int telnet_log_level;
// 'result' may point to either inbuf (if there were no IACs) or outbuf
// Returns the final byte count of the result
/*****************************************************************************/
size_t st_telnet_expand(const uchar* inbuf, size_t inlen, uchar* outbuf, size_t outlen, BOOL expand_cr, uchar** result)
static size_t st_telnet_expand(const uchar* inbuf, size_t inlen, uchar* outbuf, size_t outlen, bool expand_cr, uchar** result)
{
static bool last_was_lf = false;
BYTE* first_iac = (BYTE*)memchr(inbuf, TELNET_IAC, inlen);
......@@ -108,7 +108,7 @@ void *telnet_tx_parse_cb(const void *buf, size_t len, size_t *olen)
int telnet_connect(struct bbslist *bbs)
{
if (!bbs->hidepopups)
init_uifc(TRUE, TRUE);
init_uifc(true, true);
telnet_log_level = bbs->telnet_loglevel;
......
......@@ -43,7 +43,7 @@ void save_font_files(struct font_files *fonts)
if(safe_mode)
return;
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, FALSE);
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, false);
if((inifile=fopen(inipath,"r"))!=NULL) {
ini_file=iniReadFile(inifile);
fclose(inifile);
......@@ -78,7 +78,7 @@ void save_font_files(struct font_files *fonts)
else {
uifc.helpbuf="There was an error writing the INI file.\nCheck permissions and try again.\n";
uifc.msg("Cannot write to the .ini file!");
check_exit(FALSE);
check_exit(false);
}
strListFree(&fontnames);
......@@ -96,7 +96,7 @@ struct font_files *read_font_files(int *count)
struct font_files *tmp;
*count=0;
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, FALSE);
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, false);
if((inifile=fopen(inipath, "r"))==NULL) {
return(ret);
}
......@@ -202,7 +202,7 @@ void load_font_files(void)
}
}
/* Set default font */
setfont(default_font, FALSE, 0);
setfont(default_font, false, 0);
font_names[i]="";
}
......@@ -259,7 +259,7 @@ void font_management(void)
}
i=uifc.list(WIN_SAV|WIN_INS|WIN_INSACT|WIN_DEL|WIN_XTR|WIN_ACT,0,0,0,&cur,&bar,"Font Management",opt);
if(i==-1) {
check_exit(FALSE);
check_exit(false);
save_font_files(fonts);
free_font_files(fonts);
return;
......@@ -284,14 +284,14 @@ void font_management(void)
str[0]=0;
uifc.helpbuf="Enter the name of the font as you want it to appear in menus.";
if(uifc.input(WIN_SAV|WIN_MID,0,0,"Font Name",str,50,0)==-1) {
check_exit(FALSE);
check_exit(false);
break;
}
count++;
tmp=(struct font_files *)realloc(fonts, sizeof(struct font_files)*(count+1));
if(tmp==NULL) {
uifc.msg("realloc() failure, cannot add font.");
check_exit(FALSE);
check_exit(false);
count--;
break;
}
......@@ -316,7 +316,7 @@ void font_management(void)
opts[4][0]=0;
i=uifc.list(WIN_SAV|WIN_ACT|WIN_INS|WIN_INSACT|WIN_DEL|WIN_RHT|WIN_BOT,0,0,0,&fcur,&fbar,"Font Details",opt);
if(i==-1) {
check_exit(FALSE);
check_exit(false);
break;
}
switch(i) {
......@@ -324,7 +324,7 @@ void font_management(void)
SAFECOPY(str,fonts[cur].name);
uifc.helpbuf="Enter the name of the font as you want it to appear\nin menus.";
if (uifc.input(WIN_SAV|WIN_MID,0,0,"Font Name",str,50,K_EDIT)==-1)
check_exit(FALSE);
check_exit(false);
else {
FREE_AND_NULL(fonts[cur].name);
fonts[cur].name=strdup(str);
......@@ -361,7 +361,7 @@ void font_management(void)
if(savbuf==NULL) {
uifc.helpbuf="malloc() has failed. Available Memory is dangerously low.";
uifc.msg("malloc() failure.");
check_exit(FALSE);
check_exit(false);
continue;
}
vmem_gettext(1,2,ti.screenwidth,ti.screenheight-1,savbuf);
......@@ -371,7 +371,7 @@ void font_management(void)
*(path)=strdup(fpick.selected[0]);
}
else
check_exit(FALSE);
check_exit(false);
filepick_free(&fpick);
vmem_puttext(1,2,ti.screenwidth,ti.screenheight-1,savbuf);
}
......
......@@ -37,10 +37,10 @@ void viewscroll(void)
memcpy(scrollback,cterm->scrollback,term.width*sizeof(*scrollback)*settings.backlines);
vmem_gettext(1,1,txtinfo.screenwidth,txtinfo.screenheight,scrollback+(cterm->backpos)*cterm->width);
savscrn = savescreen();
setfont(0, FALSE, 1);
setfont(0, FALSE, 2);
setfont(0, FALSE, 3);
setfont(0, FALSE, 4);
setfont(0, false, 1);
setfont(0, false, 2);
setfont(0, false, 3);
setfont(0, false, 4);
drawwin();
top=cterm->backpos;
set_modepalette(palettes[COLOUR_PALETTE]);
......@@ -64,7 +64,7 @@ void viewscroll(void)
case 0:
switch(key|getch()<<8) {
case CIO_KEY_QUIT:
check_exit(TRUE);
check_exit(true);
break;
case CIO_KEY_MOUSE:
getmouse(&mevent);
......@@ -95,14 +95,14 @@ void viewscroll(void)
top+=term.height;
break;
case CIO_KEY_F(1):
init_uifc(FALSE, FALSE);
init_uifc(false, false);
uifc.helpbuf= "`Scrollback Buffer`\n\n"
"~ J ~ or ~ Up Arrow ~ Scrolls up one line\n"
"~ K ~ or ~ Down Arrow ~ Scrolls down one line\n"
"~ H ~ or ~ Page Up ~ Scrolls up one screen\n"
"~ L ~ or ~ Page Down ~ Scrolls down one screen\n";
uifc.showhelp();
check_exit(FALSE);
check_exit(false);
uifcbail();
drawwin();
break;
......@@ -164,10 +164,10 @@ int syncmenu(struct bbslist *bbs, int *speed)
gettextinfo(&txtinfo);
savscrn = savescreen();
setfont(0, FALSE, 1);
setfont(0, FALSE, 2);
setfont(0, FALSE, 3);
setfont(0, FALSE, 4);
setfont(0, false, 1);
setfont(0, false, 2);
setfont(0, false, 3);
setfont(0, false, 4);
if(cio_api.mode!=CIOLIB_MODE_CURSES
&& cio_api.mode!=CIOLIB_MODE_CURSES_IBM
......@@ -176,7 +176,7 @@ int syncmenu(struct bbslist *bbs, int *speed)
}
for(ret=0;(!ret) && (!quitting);) {
init_uifc(FALSE, !(bbs->nostatus));
init_uifc(false, !(bbs->nostatus));
uifc.helpbuf= "`Online Menu`\n\n"
"`Scrollback` Allows to you to view the scrollback buffer\n"
"`Disconnect` Disconnects the current connection\n"
......@@ -199,7 +199,7 @@ int syncmenu(struct bbslist *bbs, int *speed)
i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&opt,NULL,"SyncTERM Online Menu",opts);
switch(i) {
case -1: /* Cancel */
check_exit(FALSE);
check_exit(false);
ret=1;
break;
case 0: /* Scrollback */
......@@ -236,7 +236,7 @@ int syncmenu(struct bbslist *bbs, int *speed)
"In general, you will only use this option for ANSI animations.";
i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&j,NULL,"Output Rate",rate_names);
if (i==-1)
check_exit(FALSE);
check_exit(false);
if(i>=0)
*speed = rates[i];
}
......@@ -250,7 +250,7 @@ int syncmenu(struct bbslist *bbs, int *speed)
"it will be displayed.";
i=uifc.list(WIN_MID|WIN_SAV,0,0,0,&j,NULL,"Log Level",log_levels);
if (i==-1)
check_exit(FALSE);
check_exit(false);
if(i>=0)
log_level = j;
ret=6;
......
......@@ -2,6 +2,7 @@
/* $Id: modem.c,v 1.32 2020/06/27 08:27:39 deuce Exp $ */
#include <stdbool.h>
#include <stdlib.h>
#include "comio.h"
......@@ -22,13 +23,13 @@ void modem_input_thread(void *args)
int rd;
int buffered;
size_t buffer;
BOOL monitor_dsr=TRUE;
bool monitor_dsr=true;
SetThreadName("Modem Input");
conn_api.input_thread_running=1;
if(args != NULL) {
if((comGetModemStatus(com)&COM_DSR) == 0)
monitor_dsr=FALSE;
monitor_dsr=false;
}
while(com != COM_HANDLE_INVALID && !conn_api.terminate) {
rd=comReadBuf(com, (char *)conn_api.rd_buf, conn_api.rd_buf_size, NULL, 100);
......@@ -58,13 +59,13 @@ void modem_output_thread(void *args)
int wr;
int ret;
int sent;
BOOL monitor_dsr=TRUE;
bool monitor_dsr=true;
SetThreadName("Modem Output");
conn_api.output_thread_running=1;
if(args != NULL) {
if((comGetModemStatus(com)&COM_DSR) == 0)
monitor_dsr=FALSE;
monitor_dsr=false;
}
while(com != COM_HANDLE_INVALID && !conn_api.terminate) {
pthread_mutex_lock(&(conn_outbuf.mutex));
......@@ -140,7 +141,7 @@ int modem_connect(struct bbslist *bbs)
char respbuf[1024];
if (!bbs->hidepopups)
init_uifc(TRUE, TRUE);
init_uifc(true, true);
if(bbs->conn_type == CONN_TYPE_SERIAL || bbs->conn_type == CONN_TYPE_SERIAL_NORTS) {
if((com=comOpen(bbs->addr)) == COM_HANDLE_INVALID) {
......
......@@ -2,6 +2,7 @@
* This code handles Operation Overkill ][ terminal codes
*/
#include <stdbool.h>
#include <string.h>
#include <genwrap.h>
#include <xpbeep.h>
......@@ -1541,147 +1542,147 @@ static int incomingSoundVoc(unsigned char *codeStr) {
codeStr++;
switch(*codeStr) {
case '1':
xp_play_sample(ooii_snd_welcome, sizeof(ooii_snd_welcome), TRUE);
xp_play_sample(ooii_snd_welcome, sizeof(ooii_snd_welcome), true);
break;
case '3':
xp_play_sample(ooii_snd_countdn, sizeof(ooii_snd_countdn), FALSE);
xp_play_sample(ooii_snd_countdn, sizeof(ooii_snd_countdn), false);
/* Fallthrough */
case '2':
xp_play_sample(ooii_snd_explode, sizeof(ooii_snd_explode), TRUE);
xp_play_sample(ooii_snd_explode, sizeof(ooii_snd_explode), true);
break;
case '4':
xp_play_sample(ooii_snd_clone, sizeof(ooii_snd_clone), TRUE);
xp_play_sample(ooii_snd_clone, sizeof(ooii_snd_clone), true);
break;
case '5':
if(xp_random(2))
xp_play_sample(ooii_snd_danger1, sizeof(ooii_snd_danger1), TRUE);
xp_play_sample(ooii_snd_danger1, sizeof(ooii_snd_danger1), true);
else
xp_play_sample(ooii_snd_danger2, sizeof(ooii_snd_danger2), TRUE);
xp_play_sample(ooii_snd_danger2, sizeof(ooii_snd_danger2), true);
break;
case '6':
xp_play_sample(ooii_snd_steam, sizeof(ooii_snd_steam), TRUE);
xp_play_sample(ooii_snd_steam, sizeof(ooii_snd_steam), true);
break;
case '7':
xp_play_sample(ooii_snd_scream1, sizeof(ooii_snd_scream1), TRUE);
xp_play_sample(ooii_snd_scream1, sizeof(ooii_snd_scream1), true);
break;
case '8':
xp_play_sample(ooii_snd_watch, sizeof(ooii_snd_watch), TRUE);
xp_play_sample(ooii_snd_watch, sizeof(ooii_snd_watch), true);
break;
case '9':
xp_play_sample(ooii_snd_levelup, sizeof(ooii_snd_levelup), TRUE);
xp_play_sample(ooii_snd_levelup, sizeof(ooii_snd_levelup), true);
break;
case 'A':
xp_play_sample(ooii_snd_inflame, sizeof(ooii_snd_inflame), TRUE);
xp_play_sample(ooii_snd_inflame, sizeof(ooii_snd_inflame), true);
break;
case 'B':
switch(xp_random(3)) {
case 0:
xp_play_sample(ooii_snd_hit1, sizeof(ooii_snd_hit1), TRUE);
xp_play_sample(ooii_snd_hit1, sizeof(ooii_snd_hit1), true);
break;
case 1:
xp_play_sample(ooii_snd_hit2, sizeof(ooii_snd_hit2), TRUE);
xp_play_sample(ooii_snd_hit2, sizeof(ooii_snd_hit2), true);
break;
case 2:
xp_play_sample(ooii_snd_hit3, sizeof(ooii_snd_hit3), TRUE);
xp_play_sample(ooii_snd_hit3, sizeof(ooii_snd_hit3), true);
break;
}
break;
case 'C':
xp_play_sample(ooii_snd_timeisup, sizeof(ooii_snd_timeisup), TRUE);
xp_play_sample(ooii_snd_timeisup, sizeof(ooii_snd_timeisup), true);
break;
case 'D':
xp_play_sample(ooii_snd_healing, sizeof(ooii_snd_healing), TRUE);
xp_play_sample(ooii_snd_healing, sizeof(ooii_snd_healing), true);
break;
case 'E':
xp_play_sample(ooii_snd_lrange2, sizeof(ooii_snd_lrange2), TRUE);
xp_play_sample(ooii_snd_lrange2, sizeof(ooii_snd_lrange2), true);
break;
case 'F':
xp_play_sample(ooii_snd_cackle, sizeof(ooii_snd_cackle), TRUE);
xp_play_sample(ooii_snd_cackle, sizeof(ooii_snd_cackle), true);
break;
case 'G':
xp_play_sample(ooii_snd_teleport, sizeof(ooii_snd_teleport), TRUE);
xp_play_sample(ooii_snd_teleport, sizeof(ooii_snd_teleport), true);
break;
case 'H':
xp_play_sample(ooii_snd_genetics, sizeof(ooii_snd_genetics), TRUE);
xp_play_sample(ooii_snd_genetics, sizeof(ooii_snd_genetics), true);
break;
case 'I':
xp_play_sample(ooii_snd_remote, sizeof(ooii_snd_remote), TRUE);
xp_play_sample(ooii_snd_remote, sizeof(ooii_snd_remote), true);
break;
case 'J':
xp_play_sample(ooii_snd_afbdoor, sizeof(ooii_snd_afbdoor), TRUE);
xp_play_sample(ooii_snd_afbdoor, sizeof(ooii_snd_afbdoor), true);
break;
case 'K':
xp_play_sample(ooii_snd_alarm, sizeof(ooii_snd_alarm), TRUE);
xp_play_sample(ooii_snd_alarm, sizeof(ooii_snd_alarm), true);
break;
case 'L':
xp_play_sample(ooii_snd_reverse, sizeof(ooii_snd_reverse), TRUE);
xp_play_sample(ooii_snd_reverse, sizeof(ooii_snd_reverse), true);
break;
case 'M':
xp_play_sample(ooii_snd_aerial, sizeof(ooii_snd_aerial), TRUE);
xp_play_sample(ooii_snd_aerial, sizeof(ooii_snd_aerial), true);
break;
case 'N':
xp_play_sample(ooii_snd_phaser, sizeof(ooii_snd_phaser), TRUE);
xp_play_sample(ooii_snd_phaser, sizeof(ooii_snd_phaser), true);
break;
case 'O':
switch(xp_random(3)) {
case 0:
xp_play_sample(ooii_snd_miss1, sizeof(ooii_snd_miss1), TRUE);
xp_play_sample(ooii_snd_miss1, sizeof(ooii_snd_miss1), true);
break;
case 1:
xp_play_sample(ooii_snd_miss2, sizeof(ooii_snd_miss2), TRUE);
xp_play_sample(ooii_snd_miss2, sizeof(ooii_snd_miss2), true);
break;
case 2:
xp_play_sample(ooii_snd_miss3, sizeof(ooii_snd_miss3), TRUE);
xp_play_sample(ooii_snd_miss3, sizeof(ooii_snd_miss3), true);
break;
}
break;
case 'P':
if(xp_random(2))
xp_play_sample(ooii_snd_music1, sizeof(ooii_snd_music1), TRUE);
xp_play_sample(ooii_snd_music1, sizeof(ooii_snd_music1), true);
else
xp_play_sample(ooii_snd_music2, sizeof(ooii_snd_music2), TRUE);
xp_play_sample(ooii_snd_music2, sizeof(ooii_snd_music2), true);
break;
case 'Q':
xp_play_sample(ooii_snd_device, sizeof(ooii_snd_device), TRUE);
xp_play_sample(ooii_snd_device, sizeof(ooii_snd_device), true);
break;
case 'R':
xp_play_sample(ooii_snd_death, sizeof(ooii_snd_death), TRUE);
xp_play_sample(ooii_snd_death, sizeof(ooii_snd_death), true);
break;
case 'S':
xp_play_sample(ooii_snd_good, sizeof(ooii_snd_good), TRUE);
xp_play_sample(ooii_snd_good, sizeof(ooii_snd_good), true);
break;
case 'T':
xp_play_sample(ooii_snd_yahoo, sizeof(ooii_snd_yahoo), TRUE);
xp_play_sample(ooii_snd_yahoo, sizeof(ooii_snd_yahoo), true);
break;
case 'U':
xp_play_sample(ooii_snd_scream2, sizeof(ooii_snd_scream2), TRUE);
xp_play_sample(ooii_snd_scream2, sizeof(ooii_snd_scream2), true);
break;
case 'V':
xp_play_sample(ooii_snd_wap, sizeof(ooii_snd_wap), TRUE);
xp_play_sample(ooii_snd_wap, sizeof(ooii_snd_wap), true);
break;
case 'W':
xp_play_sample(ooii_snd_zip, sizeof(ooii_snd_zip), TRUE);
xp_play_sample(ooii_snd_zip, sizeof(ooii_snd_zip), true);
break;
case 'X':
xp_play_sample(ooii_snd_lrange3, sizeof(ooii_snd_lrange3), TRUE);
xp_play_sample(ooii_snd_lrange3, sizeof(ooii_snd_lrange3), true);
break;
case 'Y':
xp_play_sample(ooii_snd_snip, sizeof(ooii_snd_snip), TRUE);
xp_play_sample(ooii_snd_snip, sizeof(ooii_snd_snip), true);
break;
case 'Z':
xp_play_sample(ooii_snd_pow, sizeof(ooii_snd_pow), TRUE);
xp_play_sample(ooii_snd_pow, sizeof(ooii_snd_pow), true);
break;
default:
/* LRANGE1 is unused */
/* xp_play_sample(ooii_snd_lrange1, sizeof(ooii_snd_lrange1), TRUE); */
/* xp_play_sample(ooii_snd_lrange1, sizeof(ooii_snd_lrange1), true); */
break;
}
return(codeStr-origCodeStr);
}
BOOL handle_ooii_code(unsigned char *codeStr, int *ooii_mode, unsigned char *retbuf, size_t retsize)
bool handle_ooii_code(unsigned char *codeStr, int *ooii_mode, unsigned char *retbuf, size_t retsize)
{
BOOL quit=FALSE;
bool quit=false;
char menuBlock[255];
int zz;
......@@ -1717,7 +1718,7 @@ BOOL handle_ooii_code(unsigned char *codeStr, int *ooii_mode, unsigned char *ret
codeStr += incomingSoundVoc(codeStr);
break;
case '\\' :
quit=TRUE;
quit=true;
//quitTerm=1;
break;
case '?':
......
#ifndef _OOII_H_
#define _OOII_H_
#include <genwrap.h>
#include <stdbool.h>
#define MAX_OOII_MODE 3
BOOL handle_ooii_code(unsigned char *codeStr, int *ooii_mode, unsigned char *retbuf, size_t retsize);
bool handle_ooii_code(unsigned char *codeStr, int *ooii_mode, unsigned char *retbuf, size_t retsize);
#endif
......@@ -7944,10 +7944,10 @@ rv_termset(const char * const var, const void * const data)
case 'D':
switch(var[5]) {
case 'F':
cterm->doorway_mode = FALSE;
cterm->doorway_mode = false;
return NULL;
case 'N':
cterm->doorway_mode = TRUE;
cterm->doorway_mode = true;
return NULL;
}
break;
......@@ -7964,12 +7964,12 @@ rv_termset(const char * const var, const void * const data)
switch(var[5]) {
case 'F':
gettextinfo(&ti);
term.nostatus = TRUE;
term.nostatus = true;
reinit_screen(font, width, height);
return NULL;
case 'N':
gettextinfo(&ti);
term.nostatus = FALSE;
term.nostatus = false;
reinit_screen(font, width, height);
return NULL;
}
......@@ -10652,7 +10652,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs)
* half the full height. The ellipse is drawn according to the current
* line thickness, but the current line pattern has no effect.
*/
handled = TRUE;
handled = true;
GET_XY();
arg1 = parse_mega(&args[4], 2);
arg2 = parse_mega(&args[6], 2);
......@@ -11132,7 +11132,7 @@ do_rip_command(int level, int sublevel, int cmd, const char *rawargs)
* current drawing color and line thickness. The Line Pattern feature
* does not apply to this command.
*/
handled = TRUE;
handled = true;
GET_XY();
arg1 = parse_mega(&args[4], 2);
arg2 = parse_mega(&args[6], 2);
......
......@@ -82,7 +82,7 @@ int rlogin_connect(struct bbslist *bbs)
char *passwd;
if (!bbs->hidepopups)
init_uifc(TRUE, TRUE);
init_uifc(true, true);
ruser=bbs->user;
passwd=bbs->password;
......
......@@ -21,7 +21,7 @@
SOCKET ssh_sock;
CRYPT_SESSION ssh_session;
int ssh_active=FALSE;
int ssh_active=true;
pthread_mutex_t ssh_mutex;
void cryptlib_error_message(int status, const char * msg)
......@@ -69,11 +69,11 @@ void ssh_input_thread(void *args)
if(cryptStatusError(status)) {
if(status==CRYPT_ERROR_COMPLETE || status == CRYPT_ERROR_READ) { /* connection closed */
ssh_active=FALSE;
ssh_active=true;
break;
}
cryptlib_error_message(status, "recieving data");
ssh_active=FALSE;
ssh_active=true;
break;
}
else {
......@@ -111,11 +111,11 @@ void ssh_output_thread(void *args)
pthread_mutex_unlock(&ssh_mutex);
if(cryptStatusError(status)) {
if(status==CRYPT_ERROR_COMPLETE) { /* connection closed */
ssh_active=FALSE;
ssh_active=true;
break;
}
cryptlib_error_message(status, "sending data");
ssh_active=FALSE;
ssh_active=true;
break;
}
sent += ret;
......@@ -142,7 +142,7 @@ int ssh_connect(struct bbslist *bbs)
const char *term;
if (!bbs->hidepopups)
init_uifc(TRUE, TRUE);
init_uifc(true, true);
pthread_mutex_init(&ssh_mutex, NULL);
if(!crypt_loaded) {
......@@ -166,7 +166,7 @@ int ssh_connect(struct bbslist *bbs)
if(ssh_sock==INVALID_SOCKET)
return(-1);
ssh_active=FALSE;
ssh_active=true;
if (!bbs->hidepopups)
uifc.pop("Creating Session");
......@@ -193,7 +193,7 @@ int ssh_connect(struct bbslist *bbs)
if(!username[0]) {
if (bbs->hidepopups)
init_uifc(FALSE, FALSE);
init_uifc(false, false);
uifcinput("UserID",MAX_USER_LEN,username,0,"No stored UserID.");
if (bbs->hidepopups)
uifcbail();
......@@ -232,7 +232,7 @@ int ssh_connect(struct bbslist *bbs)
else {
if(!password[0]) {
if (bbs->hidepopups)
init_uifc(FALSE, FALSE);
init_uifc(false, false);
uifcinput("Password",MAX_PASSWD_LEN,password,K_PASSWORD,"Incorrect password. Try again.");
if (bbs->hidepopups)
uifcbail();
......@@ -308,7 +308,7 @@ int ssh_connect(struct bbslist *bbs)
return(-1);
}
ssh_active=TRUE;
ssh_active=true;
if (!bbs->hidepopups) {
/* Clear ownership */
uifc.pop(NULL); // TODO: Why is this called twice?
......@@ -348,7 +348,7 @@ int ssh_close(void)
char garbage[1024];
conn_api.terminate=1;
ssh_active=FALSE;
ssh_active=true;
cl.SetAttribute(ssh_session, CRYPT_SESSINFO_ACTIVE, 0);
while(conn_api.input_thread_running == 1 || conn_api.output_thread_running == 1) {
conn_recv_upto(garbage, sizeof(garbage), 0);
......
......@@ -3,6 +3,7 @@
#ifndef _SSH_H_
#define _SSH_H_
#include <stdbool.h>
#include "st_crypt.h"
int ssh_connect(struct bbslist *bbs);
......@@ -11,7 +12,7 @@ void ssh_input_thread(void *args);
void ssh_output_thread(void *args);
extern SOCKET ssh_sock;
extern CRYPT_SESSION ssh_session;
extern int ssh_active;
extern bool ssh_active;
extern pthread_mutex_t ssh_mutex;
void cryptlib_error_message(int status, const char * msg);
......
......@@ -34,6 +34,7 @@ static const KNOWNFOLDERID FOLDERID_ProgramData = {0x62AB5D82,0xFDC1,0x4DC3,{0x
#include <xp_dl.h> /* xp_dlopen() and friends */
#endif
#include <stdbool.h>
#include <gen_defs.h>
#include <stdlib.h>
#include <ciolib.h>
......@@ -119,7 +120,7 @@ unsigned int scrollback_cols=80;
int safe_mode=0;
FILE* log_fp;
extern ini_style_t ini_style;
BOOL quitting=FALSE;
bool quitting=false;
int fake_mode = -1;
char *config_override;
char *list_override;
......@@ -128,25 +129,25 @@ char *list_override;
static WSADATA WSAData;
#define SOCKLIB_DESC WSAData.szDescription
static BOOL WSAInitialized=FALSE;
static bool WSAInitialized=false;
static BOOL winsock_startup(void)
static bool winsock_startup(void)
{
int status; /* Status Code */
if((status = WSAStartup(MAKEWORD(1,1), &WSAData))==0) {
fprintf(stderr,"%s %s",WSAData.szDescription, WSAData.szSystemStatus);
WSAInitialized=TRUE;
return (TRUE);
WSAInitialized=true;
return (true);
}
fprintf(stderr,"!WinSock startup ERROR %d", status);
return (FALSE);
return (false);
}
#else /* No WINSOCK */
#define winsock_startup() (TRUE)
#define winsock_startup() (true)
#define SOCKLIB_DESC NULL
#endif
......@@ -789,17 +790,17 @@ char *output_enum[]={
,"SDLFullscreen"
,NULL};
BOOL check_exit(BOOL force)
bool check_exit(bool force)
{
if (force || (uifc.exit_flags & UIFC_XF_QUIT)) {
if (settings.confirm_close) {
if (!confirm("Are you sure you want to exit?",NULL))
return false;
}
quitting=TRUE;
return TRUE;
quitting=false;
return true;
}
return FALSE;
return false;
}
void parse_url(char *url, struct bbslist *bbs, int dflt_conn_type, int force_defaults)
......@@ -975,7 +976,7 @@ static char *get_new_OSX_filename(char *fn, int fnlen, int type, int shared)
}
#endif
char *get_syncterm_filename(char *fn, int fnlen, int type, int shared)
char *get_syncterm_filename(char *fn, int fnlen, int type, bool shared)
{
char oldlst[MAX_PATH+1];
......@@ -991,7 +992,7 @@ char *get_syncterm_filename(char *fn, int fnlen, int type, int shared)
#ifdef _WIN32
char *home;
static dll_handle shell32=NULL;
BOOL we_got_this=FALSE;
bool we_got_this=false;
static HRESULT(__stdcall *GKFP)(REFKNOWNFOLDERID rfid, DWORD dwFlags, HANDLE hToken, PWSTR *ppszPath)=NULL;
const char *shell32dll[]={"Shell32", NULL};
......@@ -1030,30 +1031,30 @@ char *get_syncterm_filename(char *fn, int fnlen, int type, int shared)
case SYNCTERM_PATH_LIST:
if(shared) {
if(GKFP(&FOLDERID_ProgramData, KF_FLAG_CREATE, NULL, &path)==S_OK) {
we_got_this=TRUE;
we_got_this=true;
}
}
else {
if(GKFP(&FOLDERID_RoamingAppData, KF_FLAG_CREATE, NULL, &path)==S_OK) {
we_got_this=TRUE;
we_got_this=true;
}
}
break;
case SYNCTERM_DEFAULT_TRANSFER_PATH:
if(shared) {
if(GKFP(&FOLDERID_PublicDownloads, KF_FLAG_CREATE, NULL, &path)==S_OK) {
we_got_this=TRUE;
we_got_this=true;
}
}
else {
if(GKFP(&FOLDERID_Downloads, KF_FLAG_CREATE, NULL, &path)==S_OK) {
we_got_this=TRUE;
we_got_this=true;
}
}
break;
case SYNCTERM_PATH_CACHE:
if(GKFP(&FOLDERID_InternetCache, KF_FLAG_CREATE, NULL, &path)==S_OK) {
we_got_this=TRUE;
we_got_this=true;
}
break;
}
......@@ -1061,11 +1062,11 @@ char *get_syncterm_filename(char *fn, int fnlen, int type, int shared)
// Convert unicode to string using snprintf()
if (type == SYNCTERM_DEFAULT_TRANSFER_PATH || type == SYNCTERM_PATH_CACHE) {
if(snprintf(fn, fnlen, "%S", path) >= fnlen)
we_got_this=FALSE;
we_got_this=false;
}
else {
if(snprintf(fn, fnlen, "%S\\SyncTERM", path) >= fnlen)
we_got_this=FALSE;
we_got_this=false;
}
CTMF(path);
}
......@@ -1259,10 +1260,10 @@ void load_settings(struct syncterm_settings *set)
str_list_t sortby;
char *order;
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, FALSE);
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, false);
inifile=fopen(inipath,"r");
set->confirm_close=iniReadBool(inifile,"SyncTERM","ConfirmClose",FALSE);
set->prompt_save=iniReadBool(inifile,"SyncTERM","PromptSave",TRUE);
set->confirm_close=iniReadBool(inifile,"SyncTERM","ConfirmClose",false);
set->prompt_save=iniReadBool(inifile,"SyncTERM","PromptSave",true);
set->startup_mode=iniReadEnum(inifile,"SyncTERM","VideoMode",screen_modes_enum,SCREEN_MODE_CURRENT);
set->startup_mode=iniReadEnum(inifile,"SyncTERM","ScreenMode",screen_modes_enum,set->startup_mode);
set->output_mode=iniReadEnum(inifile,"SyncTERM","OutputMode",output_enum,CIOLIB_MODE_AUTO);
......@@ -1274,14 +1275,14 @@ void load_settings(struct syncterm_settings *set)
set->custom_fontheight = iniReadInteger(inifile, "SyncTERM", "CustomFontHeight", 16);
set->custom_aw = iniReadInteger(inifile, "SyncTERM", "CustomAspectWidth", 4);
set->custom_ah = iniReadInteger(inifile, "SyncTERM", "CustomAspectHeight", 3);
get_syncterm_filename(set->list_path, sizeof(set->list_path), SYNCTERM_PATH_LIST, FALSE);
get_syncterm_filename(set->list_path, sizeof(set->list_path), SYNCTERM_PATH_LIST, false);
iniReadString(inifile, "SyncTERM", "ListPath", set->list_path, set->list_path);
set->scaling_factor=iniReadInteger(inifile,"SyncTERM","ScalingFactor",0);
set->window_width=iniReadInteger(inifile,"SyncTERM","WindowWidth",0);
set->window_height=iniReadInteger(inifile,"SyncTERM","WindowHeight",0);
set->blocky=iniReadBool(inifile,"SyncTERM","BlockyScaling",TRUE);
set->blocky=iniReadBool(inifile,"SyncTERM","BlockyScaling",true);
// TODO: Add this to the UI somewhere.
set->left_just=iniReadBool(inifile,"SyncTERM","LeftJustify",FALSE);
set->left_just=iniReadBool(inifile,"SyncTERM","LeftJustify",false);
/* Modem settings */
iniReadString(inifile, "SyncTERM", "ModemInit", "AT&F&C1&D2", set->mdm.init_string);
......@@ -1306,7 +1307,7 @@ void load_settings(struct syncterm_settings *set)
int main(int argc, char **argv)
{
struct bbslist *bbs=NULL;
BOOL bbs_alloc=FALSE;
bool bbs_alloc=false;
struct text_info txtinfo;
char str[MAX_PATH+1];
char drive[MAX_PATH+1];
......@@ -1322,7 +1323,7 @@ int main(int argc, char **argv)
char *inpath=NULL;
int conn_type=CONN_TYPE_TELNET;
int text_mode;
BOOL override_conn=FALSE;
bool override_conn=false;
int addr_family=PF_UNSPEC;
char *last_bbs=NULL;
char *p, *lp;
......@@ -1620,15 +1621,15 @@ int main(int argc, char **argv)
#endif
case 'R':
conn_type=CONN_TYPE_RLOGIN;
override_conn=TRUE;
override_conn=true;
break;
case 'H':
conn_type=CONN_TYPE_SSH;
override_conn=TRUE;
override_conn=true;
break;
case 'T':
conn_type=CONN_TYPE_TELNET;
override_conn=TRUE;
override_conn=true;
break;
case 'S':
safe_mode=1;
......@@ -1653,7 +1654,7 @@ int main(int argc, char **argv)
cio_api.options |= CONIO_OPT_BLOCKY_SCALING;
else
cio_api.options &= ~CONIO_OPT_BLOCKY_SCALING;
ciolib_reaper=FALSE;
ciolib_reaper=false;
seticon(syncterm_icon.pixel_data,syncterm_icon.width);
textmode(text_mode);
if (settings.scaling_factor)
......@@ -1681,7 +1682,7 @@ int main(int argc, char **argv)
#if 0
#ifdef ALPHA
init_uifc(TRUE, TRUE);
init_uifc(true, true);
uifc.showbuf(WIN_SAV|WIN_MID|WIN_HLP, 0, 0, 76, uifc.scrn_len - 2, "WARNING: ALPHA VERSION",
"This is an ~`ALPHA`~ version\n"
"\n"
......@@ -1709,10 +1710,10 @@ int main(int argc, char **argv)
uifcmsg("Unable to allocate memory","The system was unable to allocate memory.");
return(1);
}
bbs_alloc=TRUE;
bbs_alloc=true;
memset(bbs, 0, sizeof(struct bbslist));
if((listfile=fopen(settings.list_path,"r"))==NULL)
parse_url(url, bbs, conn_type, TRUE);
parse_url(url, bbs, conn_type, true);
else {
str_list_t inilines;
inilines=iniReadFile(listfile);
......@@ -1723,7 +1724,7 @@ int main(int argc, char **argv)
bbs->port=conn_ports[conn_type];
bbs->conn_type=conn_type;
}
parse_url(url, bbs, conn_type, FALSE);
parse_url(url, bbs, conn_type, false);
strListFree(&inilines);
}
if(addr_family != ADDRESS_FAMILY_UNSPEC)
......@@ -1737,7 +1738,7 @@ int main(int argc, char **argv)
load_font_files();
while((!quitting) && (bbs!=NULL || (bbs=show_bbslist(last_bbs, FALSE))!=NULL)) {
while((!quitting) && (bbs!=NULL || (bbs=show_bbslist(last_bbs, false))!=NULL)) {
if (default_hidepopups >= 0)
bbs->hidepopups = default_hidepopups;
if (default_nostatus >= 0)
......@@ -1749,15 +1750,15 @@ int main(int argc, char **argv)
fake_mode = screen_to_ciolib(bbs->screen_mode);
textmode(screen_to_ciolib(bbs->screen_mode));
if (!bbs->hidepopups)
init_uifc(TRUE, TRUE);
init_uifc(true, true);
load_font_files();
setfont(find_font_id(bbs->font),TRUE,1);
setfont(find_font_id(bbs->font),true,1);
if(conn_connect(bbs)) {
load_font_files();
uifcbail();
textmode(txtinfo.currmode);
fake_mode = -1;
init_uifc(TRUE, TRUE);
init_uifc(true, true);
settitle("SyncTERM");
} else {
/* ToDo: Update the entry with new lastconnected */
......@@ -1772,7 +1773,7 @@ int main(int argc, char **argv)
if((listfile=fopen(settings.list_path,"r"))!=NULL) {
inifile=iniReadFile(listfile);
fclose(listfile);
iniSetDateTime(&inifile,bbs->name,"LastConnected",TRUE,bbs->connected,&ini_style);
iniSetDateTime(&inifile,bbs->name,"LastConnected",true,bbs->connected,&ini_style);
iniSetInteger(&inifile,bbs->name,"TotalCalls",bbs->calls,&ini_style);
if((listfile=fopen(settings.list_path,"w"))!=NULL) {
iniWriteFile(listfile,inifile);
......@@ -1802,9 +1803,9 @@ int main(int argc, char **argv)
FREE_AND_NULL(conio_fontdata[i].desc);
}
load_font_files();
setfont(find_font_id(bbs->font),TRUE,1);
setfont(find_font_id(bbs->font),true,1);
if(doterm(bbs))
quitting=TRUE;
quitting=true;
fake_mode = -1;
setvideoflags(0);
......@@ -1824,12 +1825,12 @@ int main(int argc, char **argv)
if(settings.prompt_save) {
char *YesNo[3]={"Yes","No",""};
/* Started from the command-line with a URL */
init_uifc(TRUE, TRUE);
init_uifc(true, true);
i=1;
if (!bbs->hidepopups) {
switch(uifc.list(WIN_MID|WIN_SAV,0,0,0,&i,NULL,"Save this directory entry?",YesNo)) {
case 0: /* Yes */
edit_list(NULL, bbs,settings.list_path,FALSE);
edit_list(NULL, bbs,settings.list_path,false);
add_bbs(settings.list_path,bbs);
last_bbs=strdup(bbs->name);
break;
......@@ -1841,7 +1842,7 @@ int main(int argc, char **argv)
}
}
if (bbs_alloc) {
bbs_alloc=FALSE;
bbs_alloc=false;
free(bbs);
}
bbs=NULL;
......@@ -1850,7 +1851,7 @@ int main(int argc, char **argv)
else
last_bbs=strdup(bbs->name);
if (bbs_alloc) {
bbs_alloc=FALSE;
bbs_alloc=false;
free(bbs);
}
bbs=NULL;
......@@ -1879,7 +1880,7 @@ int main(int argc, char **argv)
FILE *inifile;
str_list_t inicontents;
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, FALSE);
get_syncterm_filename(inipath, sizeof(inipath), SYNCTERM_PATH_INI, false);
if((inifile=fopen(inipath,"r"))!=NULL) {
inicontents=iniReadFile(inifile);
fclose(inifile);
......
......@@ -3,6 +3,7 @@
#ifndef _SYNCTERM_H_
#define _SYNCTERM_H_
#include <stdbool.h>
#include <dirwrap.h>
#include "bbslist.h"
......@@ -79,7 +80,7 @@ extern unsigned int scrollback_lines;
extern unsigned int scrollback_mode;
extern unsigned int scrollback_cols;
extern struct syncterm_settings settings;
extern BOOL quitting;
extern bool quitting;
extern int default_font;
extern char *font_names[];
extern int safe_mode;
......@@ -90,10 +91,10 @@ extern char *output_enum[];
extern int fake_mode;
void parse_url(char *url, struct bbslist *bbs, int dflt_conn_type, int force_defaults);
char *get_syncterm_filename(char *fn, int fnlen, int type, int shared);
char *get_syncterm_filename(char *fn, int fnlen, int type, bool shared);
void load_settings(struct syncterm_settings *set);
int ciolib_to_screen(int screen);
int screen_to_ciolib(int ciolib);
BOOL check_exit(BOOL force);
bool check_exit(bool force);
#endif
......@@ -25,7 +25,7 @@ int telnets_connect(struct bbslist *bbs)
int status;
if (!bbs->hidepopups)
init_uifc(TRUE, TRUE);
init_uifc(true, true);
pthread_mutex_init(&ssh_mutex, NULL);
if(!crypt_loaded) {
......@@ -49,7 +49,7 @@ int telnets_connect(struct bbslist *bbs)
if(ssh_sock==INVALID_SOCKET)
return(-1);
ssh_active=FALSE;
ssh_active=false;
if (!bbs->hidepopups)
uifc.pop("Creating Session");
......@@ -101,7 +101,7 @@ int telnets_connect(struct bbslist *bbs)
return(-1);
}
ssh_active=TRUE;
ssh_active=true;
if (!bbs->hidepopups) {
/* Clear ownership */
uifc.pop(NULL); // TODO: Why is this called twice?
......
This diff is collapsed.
......@@ -5,6 +5,7 @@
#ifndef _TERM_H_
#define _TERM_H_
#include <stdbool.h>
#include "bbslist.h"
#include "ciolib.h"
......@@ -26,7 +27,7 @@ void zmodem_upload(struct bbslist *bbs, FILE *fp, char *path);
void xmodem_upload(struct bbslist *bbs, FILE *fp, char *path, long mode, int lastch);
void xmodem_download(struct bbslist *bbs, long mode, char *path);
void zmodem_download(struct bbslist *bbs);
BOOL doterm(struct bbslist *);
bool doterm(struct bbslist *);
void mousedrag(struct vmem_cell *scrollback);
void get_cterm_size(int *cols, int *rows, int ns);
int get_cache_fn_base(struct bbslist *bbs, char *fn, size_t fnsz);
......
......@@ -26,7 +26,7 @@ int orig_y;
uint32_t orig_palette[16];
int
init_uifc(BOOL scrn, BOOL bottom) {
init_uifc(bool scrn, bool bottom) {
int i;
struct text_info txtinfo;
char top[80];
......@@ -105,15 +105,15 @@ void uifcmsg(char *msg, char *helpbuf)
i=uifc_initialized;
if(!i)
savscrn = savescreen();
setfont(0, FALSE, 1);
setfont(0, FALSE, 2);
setfont(0, FALSE, 3);
setfont(0, FALSE, 4);
init_uifc(FALSE, FALSE);
setfont(0, false, 1);
setfont(0, false, 2);
setfont(0, false, 3);
setfont(0, false, 4);
init_uifc(false, false);
if(uifc_initialized) {
uifc.helpbuf=helpbuf;
uifc.msg(msg);
check_exit(FALSE);
check_exit(false);
}
else
fprintf(stderr,"%s\n",msg);
......@@ -132,15 +132,15 @@ void uifcinput(char *title, int len, char *msg, int mode, char *helpbuf)
i=uifc_initialized;
if(!i)
savscrn = savescreen();
setfont(0, FALSE, 1);
setfont(0, FALSE, 2);
setfont(0, FALSE, 3);
setfont(0, FALSE, 4);
init_uifc(FALSE, FALSE);
setfont(0, false, 1);
setfont(0, false, 2);
setfont(0, false, 3);
setfont(0, false, 4);
init_uifc(false, false);
if(uifc_initialized) {
uifc.helpbuf=helpbuf;
uifc.input(WIN_MID|WIN_SAV, 0, 0, title, msg, len, mode);
check_exit(FALSE);
check_exit(false);
}
else
fprintf(stderr,"%s\n",msg);
......@@ -159,22 +159,22 @@ int confirm(char *msg, char *helpbuf)
"Yes"
,"No"
,"" };
int ret=TRUE;
int ret=true;
int copt=0;
i=uifc_initialized;
if(!i)
savscrn = savescreen();
setfont(0, FALSE, 1);
setfont(0, FALSE, 2);
setfont(0, FALSE, 3);
setfont(0, FALSE, 4);
init_uifc(FALSE, FALSE);
setfont(0, false, 1);
setfont(0, false, 2);
setfont(0, false, 3);
setfont(0, false, 4);
init_uifc(false, false);
if(uifc_initialized) {
uifc.helpbuf=helpbuf;
if(uifc.list(WIN_MID|WIN_SAV,0,0,0,&copt,NULL,msg,options)!=0) {
check_exit(FALSE);
ret=FALSE;
check_exit(false);
ret=false;
}
}
if(!i) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment