From 74084db9a8def6b4045ebd00df4e81e7b9d387ed Mon Sep 17 00:00:00 2001 From: Don Ho Date: Mon, 23 Apr 2012 23:49:25 +0000 Subject: [PATCH] [BUG_FIXED] Fix a file detection bug on opening file. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@901 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/installer/APIs/python.xml | 1242 +++++++++++++++++++------ PowerEditor/src/Notepad_plus.cpp | 2 +- PowerEditor/src/Notepad_plus.h | 7 - 3 files changed, 947 insertions(+), 304 deletions(-) diff --git a/PowerEditor/installer/APIs/python.xml b/PowerEditor/installer/APIs/python.xml index e36d7536..84ca0b73 100644 --- a/PowerEditor/installer/APIs/python.xml +++ b/PowerEditor/installer/APIs/python.xml @@ -1,296 +1,946 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index f360bf1f..88a78e57 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -862,7 +862,7 @@ int Notepad_plus::getHtmlXmlEncoding(const TCHAR *fileName) const NppParameters *pNppParamInst = NppParameters::getInstance(); LangType langT = pNppParamInst->getLangFromExt(ext); - if (langT != L_XML && langT != L_HTML && langT == L_PHP) + if ((langT != L_XML) && (langT != L_HTML)) return -1; // Get the begining of file data diff --git a/PowerEditor/src/Notepad_plus.h b/PowerEditor/src/Notepad_plus.h index 17eba19f..9785a91c 100644 --- a/PowerEditor/src/Notepad_plus.h +++ b/PowerEditor/src/Notepad_plus.h @@ -622,13 +622,6 @@ private: return randomNumber; return (rand() % rangeMax); }; - - /* - static int getRandomNumber(int rangeMax) { - srand((unsigned int)time(NULL)); - return ((int)((double)rand() / ((double)RAND_MAX + 1) * rangeMax)); - }; - */ };