From 8da527e16edb455823caeeaa1f7af85042450685 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Tue, 3 Jun 2014 22:16:40 +0100 Subject: [PATCH] [misc] minor pre-release fixes * mention KolibriOS in the license * duprintf usage improvements --- src/license.h | 4 ++++ src/parser.c | 12 ++++++------ src/rufus.c | 1 + src/rufus.h | 3 +-- src/rufus.rc | 12 ++++++------ src/smart.c | 6 ++---- 6 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/license.h b/src/license.h index 77e1e334..0b20a59d 100644 --- a/src/license.h +++ b/src/license.h @@ -84,6 +84,10 @@ const char* additional_copyrights = "http://www.gnu.org/software/fdisk\\line\n" "GNU General Public License (GPL) v3 or later\\line\n" "\\line\n" +"Additional bootloaders from KolibriOS:\\line\n" +"http://kolibrios.org\\line\n" +"GNU General Public License (GPL) v2 or later\\line\n" +"\\line\n" "About and License dialogs inspired by WinSCP by Martin Prikryl\\line\n" "http://winscp.net\\line\n" "GNU General Public License (GPL) v3 or later\\line\n" diff --git a/src/parser.c b/src/parser.c index 010f8eb5..0345e2ea 100644 --- a/src/parser.c +++ b/src/parser.c @@ -40,8 +40,8 @@ static const wchar_t wspace[] = L" \t"; const struct {char c; int flag;} attr_parse[] = { { 'r', LOC_RIGHT_TO_LEFT }, - { 'a', LOC_ARABIC_NUMERALS }, - { 'j', LOC_JAPANESE_NUMERALS }, + { 'a', LOC_ARABIC_NUMERALS }, // NOT IMPLEMENTED + { 'j', LOC_JAPANESE_NUMERALS }, // NOT IMPLEMENTED }; /* @@ -842,8 +842,8 @@ char* insert_section_data(const char* filename, const char* section, const char* break; } fseek(fd_in, 0, SEEK_SET); -// uprintf("'%s' was detected as %s\n", filename, -// (mode==0)?"ANSI/UTF8 (no BOM)":((mode==1)?"UTF8 (with BOM)":"UTF16 (with BOM")); + duprintf("'%s' was detected as %s\n", filename, + (mode==0)?"ANSI/UTF8 (no BOM)":((mode==1)?"UTF8 (with BOM)":"UTF16 (with BOM")); wtmpname = (wchar_t*)calloc(wcslen(wfilename)+2, sizeof(wchar_t)); @@ -982,8 +982,8 @@ char* replace_in_token_data(const char* filename, const char* token, const char* break; } fseek(fd_in, 0, SEEK_SET); -// uprintf("'%s' was detected as %s\n", filename, -// (mode==0)?"ANSI/UTF8 (no BOM)":((mode==1)?"UTF8 (with BOM)":"UTF16 (with BOM")); + duprintf("'%s' was detected as %s\n", filename, + (mode==0)?"ANSI/UTF8 (no BOM)":((mode==1)?"UTF8 (with BOM)":"UTF16 (with BOM")); wtmpname = (wchar_t*)calloc(wcslen(wfilename)+2, sizeof(wchar_t)); diff --git a/src/rufus.c b/src/rufus.c index dca7875f..c52fba10 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -2412,6 +2412,7 @@ out: SetWindowPos(GetConsoleWindow(), HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE); FreeConsole(); } + // Unconditional delete, just in case... DeleteFileA(cmdline_hogger); CloseHandle(mutex); CLOSE_OPENED_LIBRARIES; diff --git a/src/rufus.h b/src/rufus.h index 4dac1bb8..74e96583 100644 --- a/src/rufus.h +++ b/src/rufus.h @@ -104,8 +104,7 @@ extern void _uprintf(const char *format, ...); #define uprintf(...) _uprintf(__VA_ARGS__) #define vuprintf(...) if (verbose) _uprintf(__VA_ARGS__) #define vvuprintf(...) if (verbose > 1) _uprintf(__VA_ARGS__) -#ifdef _CRTDBG_MAP_ALLOC -// Use the _CRTDBG as our general debug flag +#ifdef _DEBUG #define duprintf(...) _uprintf(__VA_ARGS__) #else #define duprintf(...) diff --git a/src/rufus.rc b/src/rufus.rc index 494cdd99..2921dfb9 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 206, 329 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Rufus 1.4.8.503" +CAPTION "Rufus 1.4.8.504" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Start",IDC_START,94,291,50,14 @@ -165,7 +165,7 @@ END RTL_IDD_DIALOG DIALOGEX 12, 12, 206, 329 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL -CAPTION "Rufus 1.4.8.503" +CAPTION "Rufus 1.4.8.504" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN DEFPUSHBUTTON "Start",IDC_START,94,291,50,14 @@ -428,8 +428,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,4,8,503 - PRODUCTVERSION 1,4,8,503 + FILEVERSION 1,4,8,504 + PRODUCTVERSION 1,4,8,504 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -446,13 +446,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "1.4.8.503" + VALUE "FileVersion", "1.4.8.504" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2014 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "1.4.8.503" + VALUE "ProductVersion", "1.4.8.504" END END BLOCK "VarFileInfo" diff --git a/src/smart.c b/src/smart.c index 4ef7714a..33bb8c25 100644 --- a/src/smart.c +++ b/src/smart.c @@ -417,7 +417,7 @@ BOOL SmartGetVersion(HANDLE hdevice) * from HDDs. But short of a crystal ball, this remains just a guess, which may be * way off mark. Still, you are also reminded that Rufus does produce PROMINENT * warnings before you format a drive, and also provides extensive info about the - * drive (from the toolips and the log) => PAY ATTENTION TO THESE OR PAY THE PRICE! + * drive (from the tooltips and the log) => PAY ATTENTION TO THESE OR PAY THE PRICE! * * But let me just elaborate further on why differentiating UFDs from HDDs is not as * 'simple' as it seems: @@ -489,8 +489,6 @@ int IsHDD(DWORD DriveIndex, uint16_t vid, uint16_t pid, const char* strid) } // TODO: try to perform inquiry if below a specific threshold (Verbatim, etc)? -#if defined(_DEBUG) - uprintf(" Score: %d\n", score); -#endif + duprintf(" Score: %d\n", score); return score; }