static wchar_t * main_source(wchar_t * data){{size_t data_len=wcslen(data);if(FILENAME_MAX-data_len > 1){fgetws(data+data_len, (int)(FILENAME_MAX-data_len), stdin);data_len=wcslen(data);if (data_len > 0){data[data_len-1]=L'\0';}}}return data;}void _main(){wchar_t * data;wchar_t data_buf[FILENAME_MAX]=BASEPATH;data=data_buf;data=main_source(data);{HANDLE hFile;hFile=CreateFileW(data, (GENERIC_WRITE|GENERIC_READ), 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);if (hFile!=INVALID_HANDLE_VALUE){CloseHandle(hFile);}}}
static wchar_t * main_source(wchar_t * data){wcscat(data, L"file.txt");return data;}static void main(){wchar_t * data;wchar_t data_buf[FILENAME_MAX]=BASEPATH;data=data_buf;data=main_source(data);{HANDLE hFile;hFile=CreateFileW(data, (GENERIC_WRITE|GENERIC_READ), 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);if (hFile!=INVALID_HANDLE_VALUE){CloseHandle(hFile);}}}