exit(1);
cleanup_exit(1);
int console_get_line(const char *prompt, char *str,			    int maxlen, int is_pw){    HANDLE hin, hout;    DWORD savemode, newmode, i;    if (is_pw && console_password) {	static int tried_once = 0;	if (tried_once) {	    return 0;	} else {	    strncpy(str, console_password, maxlen);	    str[maxlen - 1] = '\0';	    tried_once = 1;	    return 1;	}    }    if (console_batch_mode) {	if (maxlen > 0)	    str[0] = '\0';    } else {	hin = GetStdHandle(STD_INPUT_HANDLE);	hout = GetStdHandle(STD_OUTPUT_HANDLE);	if (hin == INVALID_HANDLE_VALUE || hout == INVALID_HANDLE_VALUE) {	    fprintf(stderr, "Cannot get standard input/output handles\n");	    exit(1);	}	GetConsoleMode(hin, &savemode);	newmode = savemode | ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT;	if (is_pw)	    newmode &= ~ENABLE_ECHO_INPUT;	else	    newmode |= ENABLE_ECHO_INPUT;	SetConsoleMode(hin, newmode);	WriteFile(hout, prompt, strlen(prompt), &i, NULL);	ReadFile(hin, str, maxlen - 1, &i, NULL);	SetConsoleMode(hin, savemode);	if ((int) i > maxlen)	    i = maxlen - 1;	else	    i = i - 2;	str[i] = '\0';	if (is_pw)	    WriteFile(hout, "\r\n", 2, &i, NULL);    }    return 1;}