From 5d791bdbbe3c913c031c68653c8a28c9558385a2 Mon Sep 17 00:00:00 2001 From: Szymon Tokarz Date: Sat, 25 Jul 2015 22:29:31 +0000 Subject: MirFox - add MirFoxCommons module as sources instead of lib files git-svn-id: http://svn.miranda-ng.org/main/trunk@14704 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirFox/src/lib/MirFoxCommons_logger.h | 58 ------ .../src/lib/MirFoxCommons_messageQueueBySM.h | 87 --------- plugins/MirFox/src/lib/MirFoxCommons_pch.h | 54 ------ .../MirFox/src/lib/MirFoxCommons_sharedMemory.h | 207 --------------------- .../MirFox/src/lib/v100/MirFoxCommonsDebug32.lib | Bin 2287146 -> 0 bytes .../MirFox/src/lib/v100/MirFoxCommonsDebug32.pdb | Bin 2510848 -> 0 bytes .../MirFox/src/lib/v100/MirFoxCommonsDebug64.lib | Bin 2762848 -> 0 bytes .../MirFox/src/lib/v100/MirFoxCommonsDebug64.pdb | Bin 2519040 -> 0 bytes .../MirFox/src/lib/v100/MirFoxCommonsRelease32.lib | Bin 3429318 -> 0 bytes .../MirFox/src/lib/v100/MirFoxCommonsRelease32.pdb | Bin 2494464 -> 0 bytes .../MirFox/src/lib/v100/MirFoxCommonsRelease64.lib | Bin 3455782 -> 0 bytes .../MirFox/src/lib/v100/MirFoxCommonsRelease64.pdb | Bin 2510848 -> 0 bytes .../src/lib/v120_xp/MirFoxCommonsDebug32.lib | Bin 2539570 -> 0 bytes .../src/lib/v120_xp/MirFoxCommonsDebug32.pdb | Bin 2797568 -> 0 bytes .../src/lib/v120_xp/MirFoxCommonsDebug64.lib | Bin 3108150 -> 0 bytes .../src/lib/v120_xp/MirFoxCommonsDebug64.pdb | Bin 2813952 -> 0 bytes .../src/lib/v120_xp/MirFoxCommonsRelease32.lib | Bin 3725922 -> 0 bytes .../src/lib/v120_xp/MirFoxCommonsRelease32.pdb | Bin 2772992 -> 0 bytes .../src/lib/v120_xp/MirFoxCommonsRelease64.lib | Bin 3753042 -> 0 bytes .../src/lib/v120_xp/MirFoxCommonsRelease64.pdb | Bin 2789376 -> 0 bytes 20 files changed, 406 deletions(-) delete mode 100644 plugins/MirFox/src/lib/MirFoxCommons_logger.h delete mode 100644 plugins/MirFox/src/lib/MirFoxCommons_messageQueueBySM.h delete mode 100644 plugins/MirFox/src/lib/MirFoxCommons_pch.h delete mode 100644 plugins/MirFox/src/lib/MirFoxCommons_sharedMemory.h delete mode 100644 plugins/MirFox/src/lib/v100/MirFoxCommonsDebug32.lib delete mode 100644 plugins/MirFox/src/lib/v100/MirFoxCommonsDebug32.pdb delete mode 100644 plugins/MirFox/src/lib/v100/MirFoxCommonsDebug64.lib delete mode 100644 plugins/MirFox/src/lib/v100/MirFoxCommonsDebug64.pdb delete mode 100644 plugins/MirFox/src/lib/v100/MirFoxCommonsRelease32.lib delete mode 100644 plugins/MirFox/src/lib/v100/MirFoxCommonsRelease32.pdb delete mode 100644 plugins/MirFox/src/lib/v100/MirFoxCommonsRelease64.lib delete mode 100644 plugins/MirFox/src/lib/v100/MirFoxCommonsRelease64.pdb delete mode 100644 plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug32.lib delete mode 100644 plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug32.pdb delete mode 100644 plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug64.lib delete mode 100644 plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug64.pdb delete mode 100644 plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease32.lib delete mode 100644 plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease32.pdb delete mode 100644 plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease64.lib delete mode 100644 plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease64.pdb (limited to 'plugins/MirFox/src/lib') diff --git a/plugins/MirFox/src/lib/MirFoxCommons_logger.h b/plugins/MirFox/src/lib/MirFoxCommons_logger.h deleted file mode 100644 index 20a0cc6ccc..0000000000 --- a/plugins/MirFox/src/lib/MirFoxCommons_logger.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _WSX22_UTILS_LOGGER -#define _WSX22_UTILS_LOGGER - -#define PREFIX_SIZE 6 -typedef void (__cdecl *LogFunction)(const wchar_t* szText); - - -/** - * Universal Logger - * - * Singleton pattern based on - * http://www.codeproject.com/KB/threads/SingletonThreadSafety.aspx - */ -class MFLogger -{ - -public: - - //static method that returns only instance of MFLogger - //////no thread safe so use it first time from only one thread (guaranted in mirfox) - static MFLogger * - getInstance() { - //initialized always from one thread - if (m_pOnlyOneInstance == NULL) { - if (m_pOnlyOneInstance == NULL) { - m_pOnlyOneInstance = new MFLogger(); - } - } - return m_pOnlyOneInstance; - } - - MFLogger(); - - void initLogger(LogFunction logFunction_p); - void set6CharsPrefix(const wchar_t* prefix); - void releaseLogger(); - - void log(const wchar_t* szText); - void log_p(const wchar_t* szText, ...); - void log_d(const wchar_t* szText); - void log_dp(const wchar_t* szText, ...); - -private: - - void log_int(const wchar_t* szText); - - //holds one and only object of MySingleton - static MFLogger* m_pOnlyOneInstance; - - wchar_t m_prefix[PREFIX_SIZE]; - LogFunction logFunction; - - CRITICAL_SECTION logCs; - -}; - - -#endif //#ifndef _WSX22_UTILS_LOGGER diff --git a/plugins/MirFox/src/lib/MirFoxCommons_messageQueueBySM.h b/plugins/MirFox/src/lib/MirFoxCommons_messageQueueBySM.h deleted file mode 100644 index 513b720ee7..0000000000 --- a/plugins/MirFox/src/lib/MirFoxCommons_messageQueueBySM.h +++ /dev/null @@ -1,87 +0,0 @@ -#ifndef _WSX22_IPC_MESSAGEQUEUEBYSM -#define _WSX22_IPC_MESSAGEQUEUEBYSM - - - -//message queue by shared memory related definitions -#define MQCONST_MQSM_TEXT_SIZEC 2042 //number of wchar_t chars in message - now used sharedmemory mode - -#define MQTHREAD_TICK_TIME 100 // 100ms - check exit every this time -#define MQTHREAD_FIRSTRUN_TIME 0 // MQTHREAD_FIRSTRUN_TIME * MQTHREAD_TICK_TIME = 0s - time to first run of checking message queue in mq thread (after thread start) -#define MQTHREAD_NEXTRUN_TIME 1 // MQTHREAD_NEXTRUN_TIME * MQTHREAD_TICK_TIME = 0s - time to next run of checking message queue in mq thread - - - -#include "MirFoxCommons_logger.h" - - - - - - -/** - * MessageQueue Utils - * - * based on Boost Shared Memory, beacouse boost message queue doesn't work between 32bit and 64bit processes (at boost 1.46) - * - * Singleton pattern based on - * http://www.codeproject.com/KB/threads/SingletonThreadSafety.aspx - */ -class MessageQueueUtils -{ - -public: - - //constructor - MessageQueueUtils(); - //destructor - ~MessageQueueUtils(); - - - - std::string getMqName(uint16_t processId); - - //return 0 if success, >0 if error - int createMessageQueue(std::string mqName); - - void unloadMessageQueue(uint16_t unloadedMQProcessId); - - //wchar_t*& - pointer by reference - bool tryReceiveMessage (char& menuItemType, char& userActionType, char& userButton, uint64_t& targetHandle, wchar_t*& userActionSelection, size_t uasBuffCSize); - - void sendMessage(int clientRecordId, char menuItemType, char userActionType, char userButton, uint64_t targetHandle, std::wstring userActionSelection); - - uint16_t volatile unloadedMQProcessId; - - - //static method that returns only instance of SharedMemoryUtils - static MessageQueueUtils * getInstance() - { - //initialized always from one thread at a time - if (m_pOnlyOneInstance == NULL) { - if (m_pOnlyOneInstance == NULL) { - m_pOnlyOneInstance = new MessageQueueUtils(); - } - } - return m_pOnlyOneInstance; - } - - -private: - - boost::interprocess::windows_shared_memory* volatile mqMirSm; - - std::size_t getMqMirSmTotalSize(); - - //CRITICAL_SECTION smCs; - HANDLE smMutex; - - //holds one and only object of MySingleton - static MessageQueueUtils * m_pOnlyOneInstance; - - MFLogger* logger; - -}; - - -#endif //#ifndef _WSX22_IPC_MESSAGEQUEUEBYSM diff --git a/plugins/MirFox/src/lib/MirFoxCommons_pch.h b/plugins/MirFox/src/lib/MirFoxCommons_pch.h deleted file mode 100644 index 8b4e98b41f..0000000000 --- a/plugins/MirFox/src/lib/MirFoxCommons_pch.h +++ /dev/null @@ -1,54 +0,0 @@ - -//used in: all - -// Modify the following defines if you have to target a platform prior to the ones specified below. -// Refer to MSDN for the latest info on corresponding values for different platforms. -#ifndef WINVER // Allow use of features specific to Windows XP or later. -#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows. -#endif - -#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later. -#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows. -#endif - -#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. -#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. -#endif - -#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later. -#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE. -#endif - -#if defined( UNICODE ) && !defined( _UNICODE ) -#define _UNICODE -#endif - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -#include //for [u]intNN_t types -#ifdef _WIN64 // [ -# define SCNoPTR L"%I64o" -# define SCNuPTR L"%I64u" -# define SCNxPTR L"%I64x" -# define SCNXPTR L"%I64X" -#else // WIN64 ][ -# define SCNoPTR L"%lo" -# define SCNuPTR L"%lu" -# define SCNxPTR L"%lx" -# define SCNXPTR L"%lX" -#endif // WIN64 ] -#include //for NULL -#include //for std::string, std::wstring, TEXT and _T macros, operator<< - - -//used in: MirFoxCommons_messageQueueBySM.h and MirFoxCommons_sharedMemory.h -#define BOOST_DATE_TIME_NO_LIB -#include -#include - -//used in: MirFoxCommons_sharedMemory.h -#include //for time -#include //for boost::ptr_list -#include //for boost::tokenizer -#include //for BOOST_FOREACH - - diff --git a/plugins/MirFox/src/lib/MirFoxCommons_sharedMemory.h b/plugins/MirFox/src/lib/MirFoxCommons_sharedMemory.h deleted file mode 100644 index 8ccc1494cf..0000000000 --- a/plugins/MirFox/src/lib/MirFoxCommons_sharedMemory.h +++ /dev/null @@ -1,207 +0,0 @@ -#ifndef _WSX22_IPC_SHAREDMEMORY -#define _WSX22_IPC_SHAREDMEMORY - - -#include "MirFoxCommons_logger.h" - - -//shared memory related definitions -#define CSMTHREAD_TICK_TIME 100 // 100ms - check exit every this time -#define CSMTHREAD_FIRSTRUN_TIME 100 // CSMTHREAD_FIRSTRUN_TIME * CSMTHREAD_TICK_TIME = 10s - time to first run of checking csm state in csm thread (after thread start) -#define CSMTHREAD_NEXTRUN_TIME 100 // CSMTHREAD_NEXTRUN_TIME * CSMTHREAD_TICK_TIME = 10s - time to next run of checking csm state in csm thread - -#define SMUCONST_CSM_RECORD_VISABLETO_SIZEC_DEF 128 -#define SMUCONST_CSM_RECORD_DNAME_SIZEC_DEF 78 -#define SMUCONST_MSM_RECORD_DNAME_SIZEC_DEF 78 - - - -class ClientInstanceClass -{ -public: - std::wstring displayName; //display name - uint16_t recordId; //id -}; - -class ContactClass -{ -public: - std::wstring displayName; //display name - uint64_t handle; //miranda HANDLE to contact (casted pointer) -}; - -class AccountClass -{ -public: - std::wstring displayName; //display name - uint64_t handle; //miranda HANDLE to account (casted pointer) -}; - - - -struct OpenOrCreateSMReturnStruct { - int errorCode; - uint16_t processCsmId; -}; - - - -/** - * SharedMemory Utils - * - * Singleton pattern based on - * http://www.codeproject.com/KB/threads/SingletonThreadSafety.aspx - */ -class SharedMemoryUtils -{ - -public: - - - //constructor - SharedMemoryUtils(); - //destructor - ~SharedMemoryUtils(); - - - /** - * open existing or create new central shared memory - * - * type - char - 'M' - Miranda, 'F' - Firefox - * - * return OpenOrCreateSMReturnStruct - * .errorCode - * 0 - ok, and .processCsmId = id of process record in csm - * -2 - no more available (Empty) records in central shared memory - * -3 - existing csm version is too high (from checkCsmVersion) - * -4 - existing csm version is too low (from checkCsmVersion) - */ - OpenOrCreateSMReturnStruct openOrCreateSM(char type, std::wstring& displayName, std::wstring& visableTo, bool doCommitSM); - - - int addOptionToSM(int optionID, std::wstring& optionValue); - - int addTranslationToSM(int translationId, std::wstring& translationValue ); - - int addAccountToSM(uint64_t mirandaAccountId, std::wstring& displayName); - - // group type: R - root, N - normal - int addGroupToSM(uint64_t mirandaGroupHandle, uint64_t parentGroupHandle, char groupType, std::wstring& displayName); - - int addContactToSM(uint64_t mirandaContactHandle, uint64_t mirandaAccountHandle, uint64_t mirandaGroupHandle, std::wstring& displayName); - - //call after openOrCreateSM and after creating sm thread - int commitSM(); - - //delete returned sm object after use - boost::interprocess::windows_shared_memory* getSmById(const char* smName, std::size_t smSize); - - //returns: - // 0 - ok - // 1 - record error (state != 'W' (working) or wrong displayName) - // -3 - existing csm version is too high (from checkCsmVersion) - // -4 - existing csm version is too low (from checkCsmVersion) - int checkCSM(boost::interprocess::windows_shared_memory* checkedCsm, uint16_t processCsmId, std::wstring& displayNameProfile); - - void updateCsmTimestamp(boost::interprocess::windows_shared_memory& updateCsm, uint16_t processCsmId); - - //for every other CSM records with 'W' status, check if record is outdated, if yes then delete this record - void checkAnotherCsm(boost::interprocess::windows_shared_memory& checkedCsm, uint16_t processCsmId); - - //unload and free shared memory records and structures - void unloadSharedMemory(uint16_t processCsmId); - - //execute before start creating MSMs - void resetMsmParameters(); - - - ////FUNCTIONS FOR FIREFOX - - //return true if any client (miranda instance) is available in csm for current firefox profile - bool isAnyMirandaCsmRecordAvailable(std::wstring& forThisProfileName); - - //return number of records in clientInstanceNamesList, empty list as parameter - int getClientInstances(boost::ptr_list * clientInstancesListPtr, std::wstring& forThisProfileName); - - //return number of records in contactsListPtr, empty list as parameter - int getContacts(boost::ptr_list * contactsListPtr, unsigned short clientRecordNo); - - //return number of records in accountsListPtr, empty list as parameter - int getAccounts(boost::ptr_list * accountsListPtr, unsigned short clientRecordNo); - - ////FUNCTIONS FOR FIREFOX - end - - - - - const char* getCsmName(); - std::string getMsmName(uint16_t id, int currentNumber); - std::size_t getCsmTotalSize(); - std::size_t getMsmTotalSize(); - - - - //static method that returns only instance of SharedMemoryUtils - static SharedMemoryUtils * getInstance() - { - //initialized always from one thread at a time - if (m_pOnlyOneInstance == NULL) { - if (m_pOnlyOneInstance == NULL) { - m_pOnlyOneInstance = new SharedMemoryUtils(); - } - } - return m_pOnlyOneInstance; - } - - -private: - - //holds one and only object of MySingleton - static SharedMemoryUtils* m_pOnlyOneInstance; - - MFLogger* logger; - - - //global variables - boost::interprocess::windows_shared_memory* csm; - boost::ptr_list msmList; - - - - bool isCsmInited(boost::interprocess::windows_shared_memory& csm); - void initCsm(boost::interprocess::windows_shared_memory& csm); - - //return: - // 0 - versions match, - // -3 - existing csm version is too high - // -4 - existing csm version is too low - int checkCsmVersion(boost::interprocess::windows_shared_memory& csm); - - uint16_t allocateRecordInCsm(boost::interprocess::windows_shared_memory& csm, char type, std::wstring& displayName, std::wstring& visableTo, bool doCommitSM); - - time_t mfGetCurrentTimestamp(); - - int addRecordToMsm(char type, uint64_t agcHandle, uint64_t accountHandle, uint64_t groupHandle, char status, std::wstring& value); - - int checkCsmRecord(boost::interprocess::windows_shared_memory& checkedCsm, uint16_t processCsmId, std::wstring& displayNameProfile); - - void freeCsmRecord(boost::interprocess::windows_shared_memory& csm, uint16_t recordNo); - - bool isTokenOnList(std::wstring& token, std::wstring& tokensList); - - //free own record in csm - void unloadFromCSM(uint16_t processCsmId); - - //free msm instances - void unloadMSMs(); - - uint16_t processCsmId; - int freeMsmRecordsCount; - int nextMsmNumber; //from 1 - - -}; - - -#endif //#ifndef _WSX22_IPC_SHAREDMEMORY - diff --git a/plugins/MirFox/src/lib/v100/MirFoxCommonsDebug32.lib b/plugins/MirFox/src/lib/v100/MirFoxCommonsDebug32.lib deleted file mode 100644 index d6f6dd97a9..0000000000 Binary files a/plugins/MirFox/src/lib/v100/MirFoxCommonsDebug32.lib and /dev/null differ diff --git a/plugins/MirFox/src/lib/v100/MirFoxCommonsDebug32.pdb b/plugins/MirFox/src/lib/v100/MirFoxCommonsDebug32.pdb deleted file mode 100644 index c252ddafdf..0000000000 Binary files a/plugins/MirFox/src/lib/v100/MirFoxCommonsDebug32.pdb and /dev/null differ diff --git a/plugins/MirFox/src/lib/v100/MirFoxCommonsDebug64.lib b/plugins/MirFox/src/lib/v100/MirFoxCommonsDebug64.lib deleted file mode 100644 index e7902026c5..0000000000 Binary files a/plugins/MirFox/src/lib/v100/MirFoxCommonsDebug64.lib and /dev/null differ diff --git a/plugins/MirFox/src/lib/v100/MirFoxCommonsDebug64.pdb b/plugins/MirFox/src/lib/v100/MirFoxCommonsDebug64.pdb deleted file mode 100644 index 70860883bc..0000000000 Binary files a/plugins/MirFox/src/lib/v100/MirFoxCommonsDebug64.pdb and /dev/null differ diff --git a/plugins/MirFox/src/lib/v100/MirFoxCommonsRelease32.lib b/plugins/MirFox/src/lib/v100/MirFoxCommonsRelease32.lib deleted file mode 100644 index 67d3893765..0000000000 Binary files a/plugins/MirFox/src/lib/v100/MirFoxCommonsRelease32.lib and /dev/null differ diff --git a/plugins/MirFox/src/lib/v100/MirFoxCommonsRelease32.pdb b/plugins/MirFox/src/lib/v100/MirFoxCommonsRelease32.pdb deleted file mode 100644 index 018e8dbae0..0000000000 Binary files a/plugins/MirFox/src/lib/v100/MirFoxCommonsRelease32.pdb and /dev/null differ diff --git a/plugins/MirFox/src/lib/v100/MirFoxCommonsRelease64.lib b/plugins/MirFox/src/lib/v100/MirFoxCommonsRelease64.lib deleted file mode 100644 index 4491d61a93..0000000000 Binary files a/plugins/MirFox/src/lib/v100/MirFoxCommonsRelease64.lib and /dev/null differ diff --git a/plugins/MirFox/src/lib/v100/MirFoxCommonsRelease64.pdb b/plugins/MirFox/src/lib/v100/MirFoxCommonsRelease64.pdb deleted file mode 100644 index cf6c0ea9b6..0000000000 Binary files a/plugins/MirFox/src/lib/v100/MirFoxCommonsRelease64.pdb and /dev/null differ diff --git a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug32.lib b/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug32.lib deleted file mode 100644 index fd22a9fc05..0000000000 Binary files a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug32.lib and /dev/null differ diff --git a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug32.pdb b/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug32.pdb deleted file mode 100644 index c1a092fec9..0000000000 Binary files a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug32.pdb and /dev/null differ diff --git a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug64.lib b/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug64.lib deleted file mode 100644 index 6eaca61130..0000000000 Binary files a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug64.lib and /dev/null differ diff --git a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug64.pdb b/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug64.pdb deleted file mode 100644 index a2e938f52a..0000000000 Binary files a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsDebug64.pdb and /dev/null differ diff --git a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease32.lib b/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease32.lib deleted file mode 100644 index c221092f1f..0000000000 Binary files a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease32.lib and /dev/null differ diff --git a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease32.pdb b/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease32.pdb deleted file mode 100644 index 679ded1af1..0000000000 Binary files a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease32.pdb and /dev/null differ diff --git a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease64.lib b/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease64.lib deleted file mode 100644 index 5b3ddfc1e7..0000000000 Binary files a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease64.lib and /dev/null differ diff --git a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease64.pdb b/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease64.pdb deleted file mode 100644 index cd43b451e0..0000000000 Binary files a/plugins/MirFox/src/lib/v120_xp/MirFoxCommonsRelease64.pdb and /dev/null differ -- cgit v1.2.3