if ( cfg.logxfovr != LGXF_ASK ) { return ( (cfg.logxfovr==LGXF_OVR) ? 2 : 1); }
int askappend(char *filename) {    static const char mbtitle[] = "PuTTY Log to File";    static const char msgtemplate[] =	"The session log file \"%.*s\" already exists.\n"	"You can overwrite it with a new session log,\n"	"append your session log to the end of it,\n"	"or disable session logging for this session.\n"	"Hit Yes to wipe the file, No to append to it,\n"	"or Cancel to disable logging.";    char message[sizeof(msgtemplate) + FILENAME_MAX];    int mbret;    sprintf(message, msgtemplate, FILENAME_MAX, filename);    mbret = MessageBox(NULL, message, mbtitle,			MB_ICONQUESTION | MB_YESNOCANCEL);    if (mbret == IDYES)	return 2;    else if (mbret == IDNO)	return 1;    else	return 0;}