From 4053dd2e9a934fd9da1105b9cb42e2cf374cc1ef Mon Sep 17 00:00:00 2001 From: upstream svn Date: Wed, 9 Mar 2016 07:01:35 +0000 Subject: [PATCH] Whitespace --- .svn-revision | 2 +- src/CFile.cpp | 10 ++-- src/CatDialog.cpp | 2 +- src/DirectoryTreeCtrl.cpp | 2 +- src/DownloadListCtrl.cpp | 6 +-- src/ExternalConnector.cpp | 4 +- src/GenericClientListCtrl.cpp | 2 +- src/GetTickCount.cpp | 2 +- src/IPFilter.cpp | 2 +- src/IPFilterScanner.cpp | 86 ++++++++++++++++----------------- src/KadDlg.cpp | 2 +- src/KnownFileList.cpp | 2 +- src/LibSocketAsio.cpp | 2 +- src/Logger.h | 2 +- src/MuleListCtrl.cpp | 2 +- src/MuleNotebook.h | 2 +- src/OtherFunctions.cpp | 6 +-- src/Parser.cpp | 10 ++-- src/PartFileConvertDlg.cpp | 4 +- src/PlatformSpecific.cpp | 6 +-- src/PlatformSpecific.h | 6 +-- src/Preferences.cpp | 8 +-- src/PrefsUnifiedDlg.cpp | 6 +-- src/Proxy.cpp | 2 +- src/Scanner.cpp | 86 ++++++++++++++++----------------- src/Scanner.h | 6 +-- src/TextClient.cpp | 2 +- src/ThreadTasks.cpp | 2 +- src/TransferWnd.cpp | 2 +- src/Types.h | 4 +- src/UploadQueue.cpp | 2 +- src/amule.cpp | 6 +-- src/amule.h | 10 ++-- src/amuleAppCommon.cpp | 10 ++-- src/amuleDlg.cpp | 8 +-- src/amuled.cpp | 12 ++--- src/libs/common/MuleDebug.cpp | 4 +- src/libs/common/Path.cpp | 10 ++-- src/utils/aLinkCreator/src/alcframe.cpp | 6 +-- src/utils/aLinkCreator/src/alcpix.cpp | 10 ++-- src/utils/aLinkCreator/src/alcpix.h | 2 +- src/utils/plasmamule/qt-emc.cpp | 2 +- src/utils/wxCas/src/wxcas.cpp | 2 +- src/utils/wxCas/src/wxcascte.cpp | 4 +- src/utils/wxCas/src/wxcasframe.cpp | 8 +-- src/utils/wxCas/src/wxcasframe.h | 2 +- src/utils/wxCas/src/wxcaspix.cpp | 6 +-- src/utils/wxCas/src/wxcaspix.h | 2 +- src/webserver/src/WebInterface.cpp | 6 +-- src/webserver/src/WebInterface.h | 4 +- src/webserver/src/WebServer.cpp | 6 +-- src/webserver/src/WebSocket.cpp | 2 +- src/webserver/src/php_parser.h | 10 ++-- 53 files changed, 207 insertions(+), 207 deletions(-) diff --git a/.svn-revision b/.svn-revision index 702b1785..6a8daa1d 100644 --- a/.svn-revision +++ b/.svn-revision @@ -1 +1 @@ -10909 +10910 diff --git a/src/CFile.cpp b/src/CFile.cpp index 7c6f3ef1..039976d0 100644 --- a/src/CFile.cpp +++ b/src/CFile.cpp @@ -39,7 +39,7 @@ #endif // standard -#if defined(__WINDOWS__ ) && !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__WXMICROWIN__) +#if defined(__WINDOWS__) && !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__WXMICROWIN__) # include # ifndef __SALFORDC__ # define WIN32_LEAN_AND_MEAN @@ -92,14 +92,14 @@ char* mktemp( char * path ) { return path ;} # define O_BINARY (0) #endif //__UNIX__ -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ #include #endif // The following defines handle different names across platforms, // and ensures that we use 64b IO on windows (only 32b by default). -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ #define FLUSH_FD(x) _commit(x) #define SEEK_FD(x, y, z) _lseeki64(x, y, z) #define TELL_FD(x) _telli64(x) @@ -271,7 +271,7 @@ bool CFile::Open(const CPath& fileName, OpenMode mode, int accessMode) } // Windows needs wide character file names -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ m_fd = _wopen(m_filePath.GetRaw().c_str(), flags, accessMode); #else Unicode2CharBuf tmpFileName = filename2char(m_filePath.GetRaw()); @@ -427,7 +427,7 @@ bool CFile::SetLength(uint64 new_len) { MULE_VALIDATE_STATE(IsOpened(), wxT("CFile: Cannot set length when no file is open.")); -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ #ifdef _MSC_VER // MSVC has a 64bit version bool result = _chsize_s(m_fd, new_len) == 0; diff --git a/src/CatDialog.cpp b/src/CatDialog.cpp index 9232b1af..9f667964 100644 --- a/src/CatDialog.cpp +++ b/src/CatDialog.cpp @@ -26,7 +26,7 @@ #include #include -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ #include // Do_not_auto_remove #endif diff --git a/src/DirectoryTreeCtrl.cpp b/src/DirectoryTreeCtrl.cpp index d4f1cba5..1e7486e8 100644 --- a/src/DirectoryTreeCtrl.cpp +++ b/src/DirectoryTreeCtrl.cpp @@ -104,7 +104,7 @@ void CDirectoryTreeCtrl::Init() new CItemData(CPath())); if (!m_IsRemote) { - #ifndef __WINDOWS__ + #ifndef __WINDOWS__ AddChildItem(m_root, CPath(wxT("/"))); #else // this might take awhile, so change the cursor diff --git a/src/DownloadListCtrl.cpp b/src/DownloadListCtrl.cpp index 612cae38..5c5dd848 100644 --- a/src/DownloadListCtrl.cpp +++ b/src/DownloadListCtrl.cpp @@ -241,7 +241,7 @@ void CDownloadListCtrl::UpdateItem(const void* toupdate) // support the GetVisibleLines function long first = 0, last = GetItemCount(); -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ // Get visible lines if we need them if ( rangeIt.first != rangeIt.second ) { GetVisibleLines( &first, &last ); @@ -1412,7 +1412,7 @@ void CDownloadListCtrl::DrawFileStatusBar( } } -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ # define QUOTE wxT("\"") #else # define QUOTE wxT("\'") @@ -1458,7 +1458,7 @@ void CDownloadListCtrl::PreviewFile(CPartFile* file) } } -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ // We have to escape quote characters in the file name, otherwise arbitrary // options could be passed to the player. partFile.Replace(QUOTE, wxT("\\") QUOTE); diff --git a/src/ExternalConnector.cpp b/src/ExternalConnector.cpp index 76d22a75..c91a73a0 100644 --- a/src/ExternalConnector.cpp +++ b/src/ExternalConnector.cpp @@ -234,7 +234,7 @@ void CaMuleExternalConnector::Show(const wxString &s) { if( !m_KeepQuiet ) { printf("%s", (const char *)unicode2char(s)); -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ fflush(stdout); #endif } @@ -554,7 +554,7 @@ void CaMuleExternalConnector::SaveConfigFile() bool CaMuleExternalConnector::OnInit() { -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ #if wxUSE_ON_FATAL_EXCEPTION // catch fatal exceptions wxHandleFatalExceptions(true); diff --git a/src/GenericClientListCtrl.cpp b/src/GenericClientListCtrl.cpp index 4ed068e6..19d8b3b2 100644 --- a/src/GenericClientListCtrl.cpp +++ b/src/GenericClientListCtrl.cpp @@ -319,7 +319,7 @@ void CGenericClientListCtrl::UpdateItem(uint32 toupdate, SourceItemType type) // support the GetVisibleLines function long first = 0, last = GetItemCount(); - #ifndef __WINDOWS__ + #ifndef __WINDOWS__ // Get visible lines if we need them GetVisibleLines( &first, &last ); #endif diff --git a/src/GetTickCount.cpp b/src/GetTickCount.cpp index 264a1af7..7aa79682 100644 --- a/src/GetTickCount.cpp +++ b/src/GetTickCount.cpp @@ -28,7 +28,7 @@ uint32 TheTime = 0; -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ void StartTickTimer(){}; diff --git a/src/IPFilter.cpp b/src/IPFilter.cpp index e95cd394..3ac9cca5 100644 --- a/src/IPFilter.cpp +++ b/src/IPFilter.cpp @@ -115,7 +115,7 @@ private: thePrefs::UseIPFilterSystem() ) { // Load from system wide IP filter file wxStandardPathsBase &spb(wxStandardPaths::Get()); -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ wxString dataDir(spb.GetPluginsDir()); #elif defined(__WXMAC__) wxString dataDir(spb.GetDataDir()); diff --git a/src/IPFilterScanner.cpp b/src/IPFilterScanner.cpp index 206602b2..7cd5ae01 100644 --- a/src/IPFilterScanner.cpp +++ b/src/IPFilterScanner.cpp @@ -53,7 +53,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -70,7 +70,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ @@ -181,7 +181,7 @@ extern FILE *yyipin, *yyipout; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -243,7 +243,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -730,7 +730,7 @@ extern int yyipwrap (void ); #endif static void yyunput (int c,char *buf_ptr ); - + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -854,7 +854,7 @@ YY_DECL register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; - + #line 106 "./IPFilterScanner.l" @@ -1288,7 +1288,7 @@ static int yy_get_next_buffer (void) { register yy_state_type yy_current_state; register char *yy_cp; - + yy_current_state = (yy_start); yy_current_state += YY_AT_BOL(); @@ -1343,7 +1343,7 @@ static int yy_get_next_buffer (void) static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; - + yy_cp = (yy_c_buf_p); /* undo effects of setting up yyiptext */ @@ -1386,7 +1386,7 @@ static int yy_get_next_buffer (void) { int c; - + *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) @@ -1455,12 +1455,12 @@ static int yy_get_next_buffer (void) /** Immediately switch to a different input stream. * @param input_file A readable stream. - * + * * @note This function does not reset the start condition to @c INITIAL . */ void yyiprestart (FILE * input_file ) { - + if ( ! YY_CURRENT_BUFFER ){ yyipensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = @@ -1473,11 +1473,11 @@ static int yy_get_next_buffer (void) /** Switch to a different input buffer. * @param new_buffer The new input buffer. - * + * */ void yyip_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { - + /* TODO. We should be able to replace this entire function body * with * yyippop_buffer_state(); @@ -1517,13 +1517,13 @@ static void yyip_load_buffer_state (void) /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * + * * @return the allocated buffer state. */ YY_BUFFER_STATE yyip_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) yyipalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yyip_create_buffer()" ); @@ -1546,11 +1546,11 @@ static void yyip_load_buffer_state (void) /** Destroy the buffer. * @param b a buffer created with yyip_create_buffer() - * + * */ void yyip_delete_buffer (YY_BUFFER_STATE b ) { - + if ( ! b ) return; @@ -1566,7 +1566,7 @@ static void yyip_load_buffer_state (void) #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ - + /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyiprestart() or at EOF. @@ -1575,7 +1575,7 @@ extern int isatty (int ); { int oerrno = errno; - + yyip_flush_buffer(b ); b->yy_input_file = file; @@ -1591,13 +1591,13 @@ extern int isatty (int ); } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * + * */ void yyip_flush_buffer (YY_BUFFER_STATE b ) { @@ -1626,7 +1626,7 @@ extern int isatty (int ); * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. - * + * */ void yyippush_buffer_state (YY_BUFFER_STATE new_buffer ) { @@ -1656,7 +1656,7 @@ void yyippush_buffer_state (YY_BUFFER_STATE new_buffer ) /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. - * + * */ void yyippop_buffer_state (void) { @@ -1680,7 +1680,7 @@ void yyippop_buffer_state (void) static void yyipensure_buffer_stack (void) { int num_to_alloc; - + if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this @@ -1693,9 +1693,9 @@ static void yyipensure_buffer_stack (void) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyipensure_buffer_stack()" ); - + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; @@ -1723,13 +1723,13 @@ static void yyipensure_buffer_stack (void) /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. + * + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yyip_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -1758,14 +1758,14 @@ YY_BUFFER_STATE yyip_scan_buffer (char * base, yy_size_t size ) /** Setup the input buffer state to scan a string. The next call to yyiplex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan - * + * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yyip_scan_bytes() instead. */ YY_BUFFER_STATE yyip_scan_string (yyconst char * yystr ) { - + return yyip_scan_bytes(yystr,strlen(yystr) ); } @@ -1773,7 +1773,7 @@ YY_BUFFER_STATE yyip_scan_string (yyconst char * yystr ) * scan from a @e copy of @a bytes. * @param bytes the byte buffer to scan * @param len the number of bytes in the buffer pointed to by @a bytes. - * + * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yyip_scan_bytes (yyconst char * yybytes, int _yybytes_len ) @@ -1782,7 +1782,7 @@ YY_BUFFER_STATE yyip_scan_bytes (yyconst char * yybytes, int _yybytes_len ) char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyipalloc(n ); @@ -1836,16 +1836,16 @@ static void yy_fatal_error (yyconst char* msg ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. - * + * */ int yyipget_lineno (void) { - + return yyiplineno; } /** Get the input stream. - * + * */ FILE *yyipget_in (void) { @@ -1853,7 +1853,7 @@ FILE *yyipget_in (void) } /** Get the output stream. - * + * */ FILE *yyipget_out (void) { @@ -1861,7 +1861,7 @@ FILE *yyipget_out (void) } /** Get the length of the current token. - * + * */ int yyipget_leng (void) { @@ -1869,7 +1869,7 @@ int yyipget_leng (void) } /** Get the current token. - * + * */ char *yyipget_text (void) @@ -1879,18 +1879,18 @@ char *yyipget_text (void) /** Set the current line number. * @param line_number - * + * */ void yyipset_lineno (int line_number ) { - + yyiplineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. - * + * * @see yyip_switch_to_buffer */ void yyipset_in (FILE * in_str ) @@ -1944,7 +1944,7 @@ static int yy_init_globals (void) /* yyiplex_destroy is for both reentrant and non-reentrant scanners. */ int yyiplex_destroy (void) { - + /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yyip_delete_buffer(YY_CURRENT_BUFFER ); diff --git a/src/KadDlg.cpp b/src/KadDlg.cpp index ac7353e1..ae65cf2b 100644 --- a/src/KadDlg.cpp +++ b/src/KadDlg.cpp @@ -72,7 +72,7 @@ void CKadDlg::Init() m_kad_scope->SetRanges(0.0, thePrefs::GetStatsMax()); m_kad_scope->SetYUnits(wxT("Nodes")); -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ // // Get label with line breaks out of muuli.wdr, because generated code fails // to compile in Windows. diff --git a/src/KnownFileList.cpp b/src/KnownFileList.cpp index c4ff87cb..d445e0d0 100644 --- a/src/KnownFileList.cpp +++ b/src/KnownFileList.cpp @@ -270,7 +270,7 @@ bool CKnownFileList::Append(CKnownFile *Record, bool afterHashing) if (Record->GetFileSize() > 0) { // sanity check if the number of part hashes is correct here if (Record->GetHashCount() != Record->GetED2KPartHashCount()) { - AddDebugLogLineC(logKnownFiles, CFormat(wxT("%s with size %d should have %d part hashes, but only %d are available")) + AddDebugLogLineC(logKnownFiles, CFormat(wxT("%s with size %d should have %d part hashes, but only %d are available")) % Record->GetFileName().GetPrintable() % Record->GetFileSize() % Record->GetED2KPartHashCount() % Record->GetHashCount()); return false; } diff --git a/src/LibSocketAsio.cpp b/src/LibSocketAsio.cpp index 29d302d4..4bbd8e25 100644 --- a/src/LibSocketAsio.cpp +++ b/src/LibSocketAsio.cpp @@ -855,7 +855,7 @@ private: void StartAccept() { m_currentSocket.reset(new CAsioSocketImpl(NULL)); - async_accept(m_currentSocket->GetAsioSocket(), + async_accept(m_currentSocket->GetAsioSocket(), m_strand.wrap(boost::bind(& CAsioSocketServerImpl::HandleAccept, this, placeholders::error))); } diff --git a/src/Logger.h b/src/Logger.h index 285bf07e..1c0eeac6 100644 --- a/src/Logger.h +++ b/src/Logger.h @@ -112,7 +112,7 @@ enum DebugType logEC, //! Warnings/Errors related to HTTP traffic logHTTP, - //! Warnings/Errors related to Boost Asio networking + //! Warnings/Errors related to Boost Asio networking logAsio // IMPORTANT NOTE: when you add values to this enum, update the g_debugcats // array in Logger.cpp! diff --git a/src/MuleListCtrl.cpp b/src/MuleListCtrl.cpp index ef1aedf1..a80d8df5 100644 --- a/src/MuleListCtrl.cpp +++ b/src/MuleListCtrl.cpp @@ -48,7 +48,7 @@ // Global constants #ifdef __WXGTK__ const int COL_SIZE_MIN = 10; -#elif defined(__WINDOWS__ ) || defined(__WXMAC__) || defined(__WXCOCOA__) +#elif defined(__WINDOWS__) || defined(__WXMAC__) || defined(__WXCOCOA__) const int COL_SIZE_MIN = 0; #else #error Need to define COL_SIZE_MIN for your OS diff --git a/src/MuleNotebook.h b/src/MuleNotebook.h index a5735745..9685eb64 100644 --- a/src/MuleNotebook.h +++ b/src/MuleNotebook.h @@ -147,7 +147,7 @@ protected: DECLARE_EVENT_TABLE() }; -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ #define MULE_NOTEBOOK_TAB_HEIGHT 26 #else #define MULE_NOTEBOOK_TAB_HEIGHT 40 diff --git a/src/OtherFunctions.cpp b/src/OtherFunctions.cpp index 42d23f72..36c735bb 100644 --- a/src/OtherFunctions.cpp +++ b/src/OtherFunctions.cpp @@ -1121,7 +1121,7 @@ wxString GetConfigDir(const wxString &configFileBase) /*************************** Locale specific stuff ***************************/ -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ # define SETWINLANG(LANG, SUBLANG) #else # define SETWINLANG(LANG, SUBLANG) \ @@ -1151,7 +1151,7 @@ void InitLocale(wxLocale& locale, int language) { locale.Init(language, wxLOCALE_LOAD_DEFAULT); -#if defined(__WXMAC__) || defined(__WINDOWS__ ) +#if defined(__WXMAC__) || defined(__WINDOWS__) locale.AddCatalogLookupPathPrefix(JoinPaths(wxStandardPaths::Get().GetDataDir(), wxT("locale"))); #endif locale.AddCatalog(wxT(PACKAGE)); @@ -1209,7 +1209,7 @@ CMD4Hash GetPassword(bool allowEmptyPassword) { wxString pass_plain; CMD4Hash password; -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ pass_plain = char2unicode(getpass("Enter password for mule connection: ")); #else //#warning This way, pass enter is not hidden on windows. Bad thing. diff --git a/src/Parser.cpp b/src/Parser.cpp index 80e6b839..4d78febb 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -1,20 +1,20 @@ /* A Bison parser, made by GNU Bison 2.4.2. */ /* Skeleton implementation for Bison's Yacc-like parsers in C - + Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software Foundation, Inc. - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -27,7 +27,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ diff --git a/src/PartFileConvertDlg.cpp b/src/PartFileConvertDlg.cpp index 967daea0..a082b95d 100644 --- a/src/PartFileConvertDlg.cpp +++ b/src/PartFileConvertDlg.cpp @@ -38,7 +38,7 @@ CPartFileConvertDlg* CPartFileConvertDlg::s_convertgui = NULL; -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ /* XPM */ static const char * convert_xpm[] = { "16 16 9 1", @@ -67,7 +67,7 @@ static const char * convert_xpm[] = { " #$%$# ", " #$# ", " # "}; -#endif /* ! __WINDOWS__ */ +#endif /* ! __WINDOWS__ */ // Modeless Dialog Implementation // CPartFileConvertDlg dialog diff --git a/src/PlatformSpecific.cpp b/src/PlatformSpecific.cpp index a39474eb..59500e1d 100644 --- a/src/PlatformSpecific.cpp +++ b/src/PlatformSpecific.cpp @@ -29,7 +29,7 @@ #endif // NTFS Sparse Files (only for MSW) -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ #include "common/Format.h" #include "Logger.h" #include @@ -113,7 +113,7 @@ bool PlatformSpecific::CreateSparseFile(const CPath& name, uint64_t WXUNUSED(siz #endif -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ #include #include @@ -152,7 +152,7 @@ int PlatformSpecific::GetMaxConnections() #endif -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ #include #include diff --git a/src/PlatformSpecific.h b/src/PlatformSpecific.h index 827b0a88..42e10718 100644 --- a/src/PlatformSpecific.h +++ b/src/PlatformSpecific.h @@ -49,7 +49,7 @@ bool CreateSparseFile(const CPath& name, uint64_t size); * * Currently anything but windows will return the default value (-1); */ -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ int GetMaxConnections(); #else inline int GetMaxConnections() { return -1; } @@ -92,7 +92,7 @@ EFSType GetFilesystemType(const CPath& path); * * Based on http://en.wikipedia.org/wiki/Comparison_of_file_systems */ -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ inline bool CanFSHandleSpecialChars(const CPath& WXUNUSED(path)) { return false; } #else // Other filesystem types may be added @@ -138,7 +138,7 @@ inline bool CanFSHandleLargeFiles(const CPath& path) * Disable / enable computer's energy saving "standby" mode. * */ -#if defined __WINDOWS__ || defined __WXMAC__ +#if defined __WINDOWS__ || defined __WXMAC__ #define PLATFORMSPECIFIC_CAN_PREVENT_SLEEP_MODE 1 #else #define PLATFORMSPECIFIC_CAN_PREVENT_SLEEP_MODE 0 diff --git a/src/Preferences.cpp b/src/Preferences.cpp index a07ce0e7..7ecd9de1 100644 --- a/src/Preferences.cpp +++ b/src/Preferences.cpp @@ -874,7 +874,7 @@ public: } else { dataDir = wxStandardPaths::Get().GetResourcesDir(); } -#if !defined(__WINDOWS__ ) && !defined(__WXMAC__) +#if !defined(__WINDOWS__) && !defined(__WXMAC__) dataDir = dataDir.BeforeLast(wxT('/')) + wxT("/amule"); #endif wxString systemDir(JoinPaths(dataDir,folder)); @@ -1067,7 +1067,7 @@ void CPreferences::BuildItemList( const wxString& appdir ) **/ NewCfgItem(IDC_TEMPFILES, (new Cfg_Path( wxT("/eMule/TempDir"), s_tempdir, appdir + wxT("Temp") ))); - #if defined(__WXMAC__) || defined(__WINDOWS__ ) + #if defined(__WXMAC__) || defined(__WINDOWS__) wxString incpath = wxStandardPaths::Get().GetDocumentsDir(); if (incpath.IsEmpty()) { // There is a built-in possibility for this call to fail, though I can't imagine a reason for that. @@ -1705,7 +1705,7 @@ bool CPreferences::UpdateCategory( wxString CPreferences::GetBrowser() { wxString cmd(s_CustomBrowser); -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ if( s_BrowserTab ) { // This is certainly not the best way to do it, but I'm lazy if ((wxT("mozilla") == cmd.Right(7)) || (wxT("firefox") == cmd.Right(7)) @@ -1722,7 +1722,7 @@ wxString CPreferences::GetBrowser() cmd += wxT(" -remote 'openURLs(%s,new-tab)'"); } } -#endif /* !__WINDOWS__ */ +#endif /* !__WINDOWS__ */ return cmd; } diff --git a/src/PrefsUnifiedDlg.cpp b/src/PrefsUnifiedDlg.cpp index ae7087a8..b81d74c5 100644 --- a/src/PrefsUnifiedDlg.cpp +++ b/src/PrefsUnifiedDlg.cpp @@ -243,9 +243,9 @@ wxDialog(parent, -1, _("Preferences"), if (pages[i].m_function == PreferencesGeneralTab) { // This must be done now or pages won't Fit(); - #ifdef __WINDOWS__ + #ifdef __WINDOWS__ CastChild(IDC_BROWSERTABS, wxCheckBox)->Enable(false); - #endif /* __WINDOWS__ */ + #endif /* __WINDOWS__ */ CastChild(IDC_PREVIEW_NOTE, wxStaticText)->SetLabel(_("The following variables will be substituted:\n %PARTFILE - full path to the file\n %PARTNAME - file name only")); #ifdef __WXMAC__ FindWindow(IDC_ENABLETRAYICON)->Show(false); @@ -1036,7 +1036,7 @@ void PrefsUnifiedDlg::OnButtonBrowseApplication(wxCommandEvent& event) return; } wxString wildcard = CFormat(_("Executable%s")) -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ % wxT(" (*.exe)|*.exe"); #else % wxT("|*"); diff --git a/src/Proxy.cpp b/src/Proxy.cpp index 332d4a79..cc555b85 100644 --- a/src/Proxy.cpp +++ b/src/Proxy.cpp @@ -938,7 +938,7 @@ void CSocks4StateMachine::process_send_command_request(bool entry) switch (m_proxyData.m_proxyType) { case PROXY_SOCKS4a: { unsigned int offsetDomain = offsetUser + lenUser + 1; - // The Hostname() method was used here before, but I don't see why we can't use + // The Hostname() method was used here before, but I don't see why we can't use // the IP address which we actually know instead here. wxString hostname(m_peerAddress->IPAddress()); unsigned char lenDomain = hostname.Len(); diff --git a/src/Scanner.cpp b/src/Scanner.cpp index 549e416d..35478ac7 100644 --- a/src/Scanner.cpp +++ b/src/Scanner.cpp @@ -34,7 +34,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -51,7 +51,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ @@ -162,7 +162,7 @@ extern FILE *yyin, *yyout; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) - + /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ @@ -224,7 +224,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -640,7 +640,7 @@ extern int yywrap (void ); #endif static void yyunput (int c,char *buf_ptr ); - + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -761,7 +761,7 @@ YY_DECL register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; - + #line 40 "./Scanner.l" @@ -1281,7 +1281,7 @@ static int yy_get_next_buffer (void) { register yy_state_type yy_current_state; register char *yy_cp; - + yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) @@ -1335,7 +1335,7 @@ static int yy_get_next_buffer (void) static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; - + yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ @@ -1378,7 +1378,7 @@ static int yy_get_next_buffer (void) { int c; - + *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) @@ -1445,12 +1445,12 @@ static int yy_get_next_buffer (void) /** Immediately switch to a different input stream. * @param input_file A readable stream. - * + * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { - + if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = @@ -1463,11 +1463,11 @@ static int yy_get_next_buffer (void) /** Switch to a different input buffer. * @param new_buffer The new input buffer. - * + * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { - + /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); @@ -1507,13 +1507,13 @@ static void yy_load_buffer_state (void) /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * + * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; - + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1536,11 +1536,11 @@ static void yy_load_buffer_state (void) /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() - * + * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { - + if ( ! b ) return; @@ -1556,7 +1556,7 @@ static void yy_load_buffer_state (void) #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ - + /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. @@ -1565,7 +1565,7 @@ extern int isatty (int ); { int oerrno = errno; - + yy_flush_buffer(b ); b->yy_input_file = file; @@ -1581,13 +1581,13 @@ extern int isatty (int ); } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; - + errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * + * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { @@ -1616,7 +1616,7 @@ extern int isatty (int ); * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. - * + * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { @@ -1646,7 +1646,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. - * + * */ void yypop_buffer_state (void) { @@ -1670,7 +1670,7 @@ void yypop_buffer_state (void) static void yyensure_buffer_stack (void) { int num_to_alloc; - + if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this @@ -1683,9 +1683,9 @@ static void yyensure_buffer_stack (void) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); - + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - + (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; @@ -1713,13 +1713,13 @@ static void yyensure_buffer_stack (void) /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer - * - * @return the newly allocated buffer state object. + * + * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; - + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) @@ -1748,14 +1748,14 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan - * + * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { - + return yy_scan_bytes(yystr,strlen(yystr) ); } @@ -1763,7 +1763,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) * scan from a @e copy of @a bytes. * @param bytes the byte buffer to scan * @param len the number of bytes in the buffer pointed to by @a bytes. - * + * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) @@ -1772,7 +1772,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) yyalloc(n ); @@ -1826,16 +1826,16 @@ static void yy_fatal_error (yyconst char* msg ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. - * + * */ int yyget_lineno (void) { - + return yylineno; } /** Get the input stream. - * + * */ FILE *yyget_in (void) { @@ -1843,7 +1843,7 @@ FILE *yyget_in (void) } /** Get the output stream. - * + * */ FILE *yyget_out (void) { @@ -1851,7 +1851,7 @@ FILE *yyget_out (void) } /** Get the length of the current token. - * + * */ int yyget_leng (void) { @@ -1859,7 +1859,7 @@ int yyget_leng (void) } /** Get the current token. - * + * */ char *yyget_text (void) @@ -1869,18 +1869,18 @@ char *yyget_text (void) /** Set the current line number. * @param line_number - * + * */ void yyset_lineno (int line_number ) { - + yylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. - * + * * @see yy_switch_to_buffer */ void yyset_in (FILE * in_str ) @@ -1934,7 +1934,7 @@ static int yy_init_globals (void) /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { - + /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer(YY_CURRENT_BUFFER ); diff --git a/src/Scanner.h b/src/Scanner.h index e52986cc..3c36c214 100644 --- a/src/Scanner.h +++ b/src/Scanner.h @@ -38,7 +38,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -55,7 +55,7 @@ typedef uint32_t flex_uint32_t; typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; +typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; #endif /* ! C99 */ @@ -171,7 +171,7 @@ struct yy_buffer_state int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ - + /* Whether to try to fill the input buffer when we reach the * end of it. */ diff --git a/src/TextClient.cpp b/src/TextClient.cpp index 5d11093e..067c8430 100644 --- a/src/TextClient.cpp +++ b/src/TextClient.cpp @@ -32,7 +32,7 @@ #include "TextClient.h" -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ #include // Do_not_auto_remove #endif diff --git a/src/ThreadTasks.cpp b/src/ThreadTasks.cpp index 8affee48..327ab7ec 100644 --- a/src/ThreadTasks.cpp +++ b/src/ThreadTasks.cpp @@ -560,7 +560,7 @@ void CAllocateFileTask::Entry() CFile file; file.Open(m_file->GetFullName().RemoveExt(), CFile::read_write); -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ try { // File is already created as non-sparse, so we only need to set the length. // This will fail to allocate the file e.g. under wine on linux/ext3, diff --git a/src/TransferWnd.cpp b/src/TransferWnd.cpp index 7394e3aa..2464f122 100644 --- a/src/TransferWnd.cpp +++ b/src/TransferWnd.cpp @@ -31,7 +31,7 @@ // This include must be before amuleDlg.h -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ #include // Needed for windows compilation #endif diff --git a/src/Types.h b/src/Types.h index f6d98142..b7dc8524 100644 --- a/src/Types.h +++ b/src/Types.h @@ -142,7 +142,7 @@ static const wxString EmptyString = wxEmptyString; #endif -#ifdef _WIN32 // Used in non-wx-apps too (ed2k), so don't use __WINDOWS__ here ! +#ifdef _WIN32 // Used in non-wx-apps too (ed2k), so don't use __WINDOWS__ here ! #ifndef NOMINMAX #define NOMINMAX #endif @@ -157,7 +157,7 @@ static const wxString EmptyString = wxEmptyString; R_OK = 4 // read }; #endif // W_OK - #ifdef __WINDOWS__ + #ifdef __WINDOWS__ #include // Do_not_auto_remove #endif #undef GetUserName diff --git a/src/UploadQueue.cpp b/src/UploadQueue.cpp index ab022b4f..23e37586 100644 --- a/src/UploadQueue.cpp +++ b/src/UploadQueue.cpp @@ -34,7 +34,7 @@ #include "Types.h" // Do_not_auto_remove (win32) -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ #include // Do_not_auto_remove #else #include // Do_not_auto_remove diff --git a/src/amule.cpp b/src/amule.cpp index 397bc742..fcb984e8 100644 --- a/src/amule.cpp +++ b/src/amule.cpp @@ -377,7 +377,7 @@ bool CamuleApp::OnInit() m_localip = StringHosttoUint32(::wxGetFullHostName()); -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ // get rid of sigpipe signal(SIGPIPE, SIG_IGN); #else @@ -452,7 +452,7 @@ bool CamuleApp::OnInit() AddLogLineNS(_("Password set and external connections enabled.")); } -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ if (getuid() == 0) { wxString msg = wxT("Warning! You are running aMule as root.\n") @@ -640,7 +640,7 @@ bool CamuleApp::OnInit() } #endif -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ # define QUOTE wxT("\"") #else # define QUOTE wxT("\'") diff --git a/src/amule.h b/src/amule.h index 64cee8d8..f25702f6 100644 --- a/src/amule.h +++ b/src/amule.h @@ -34,10 +34,10 @@ #include "Types.h" // Needed for int32, uint16 and uint64 #include -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ #include // #include -#endif // __WINDOWS__ +#endif // __WINDOWS__ #ifdef HAVE_CONFIG_H # include "config.h" // Needed for ASIO_SOCKETS @@ -443,14 +443,14 @@ extern CamuleGuiApp *theApp; #define AMULED28_EVENTLOOP // wx 2.8 also needs extra socket code, unless we have ASIO sockets - // + // #ifdef HAVE_CONFIG_H # include "config.h" // defines ASIO_SOCKETS #endif #ifndef ASIO_SOCKETS // MSW: can't run amuled with 2.8 without ASIO sockets, just get it compiled - #ifndef __WINDOWS__ + #ifndef __WINDOWS__ #define AMULED28_SOCKETS #endif #endif @@ -494,7 +494,7 @@ public: // which stops working with wx 2.9.5. // So disable it there (no idea if this has a noticeable impact). -#if !wxCHECK_VERSION(2, 9, 5) && !defined(__WINDOWS__ ) +#if !wxCHECK_VERSION(2, 9, 5) && !defined(__WINDOWS__) #define AMULED_APPTRAITS #endif diff --git a/src/amuleAppCommon.cpp b/src/amuleAppCommon.cpp index 54e7d0eb..78f7c731 100644 --- a/src/amuleAppCommon.cpp +++ b/src/amuleAppCommon.cpp @@ -229,7 +229,7 @@ bool CamuleAppCommon::InitCommon(int argc, wxChar ** argv) cmdline.AddSwitch(wxT("e"), wxT("ec-config"), wxT("Configure EC (External Connections).")); #else -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ // MSW shows help otions in a dialog box, and the formatting doesn't fit there #define HELPTAB wxT("\t") #else @@ -251,7 +251,7 @@ bool CamuleAppCommon::InitCommon(int argc, wxChar ** argv) // Change webserver path. This is also a config option, so this switch will go at some time. cmdline.AddOption(wxT("w"), wxT("use-amuleweb"), wxT("Specify location of amuleweb binary.")); #endif -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ cmdline.AddSwitch(wxT("d"), wxT("disable-fatal"), wxT("Do not handle fatal exception.")); // Keep stdin open to run valgrind --gen_suppressions cmdline.AddSwitch(wxT("i"), wxT("enable-stdin"), wxT("Do not disable stdin.")); @@ -293,10 +293,10 @@ bool CamuleAppCommon::InitCommon(int argc, wxChar ** argv) } // Backtracing works in MSW. - // Problem is just that the backtraces are useless, because apparently the context gets lost + // Problem is just that the backtraces are useless, because apparently the context gets lost // in the try/catch somewhere. // So leave it out. -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ #if wxUSE_ON_FATAL_EXCEPTION if ( !cmdline.Found(wxT("disable-fatal")) ) { // catch fatal exceptions @@ -413,7 +413,7 @@ bool CamuleAppCommon::InitCommon(int argc, wxChar ** argv) } #endif -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ // Close standard-input if ( !cmdline.Found(wxT("enable-stdin")) ) { // The full daemon will close all std file-descriptors by itself, diff --git a/src/amuleDlg.cpp b/src/amuleDlg.cpp index 3e797d03..744af1ac 100644 --- a/src/amuleDlg.cpp +++ b/src/amuleDlg.cpp @@ -76,7 +76,7 @@ #endif #include "IPFilter.h" -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ #include "aMule.xpm" #endif @@ -210,7 +210,7 @@ m_clientSkinNames(CLIENT_SKIN_SIZE) wxInitAllImageHandlers(); Apply_Clients_Skin(); -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ wxSystemOptions::SetOption(wxT("msw.remap"), 0); #endif @@ -1059,7 +1059,7 @@ void CamuleDlg::DoIconize(bool iconize) void CamuleDlg::OnMinimize(wxIconizeEvent& evt) { // Evil Hack: check if the mouse is inside the window -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ if (GetScreenRect().Contains(wxGetMousePosition())) #endif { @@ -1213,7 +1213,7 @@ bool CamuleDlg::Check_and_Init_Skin() wxString userDir(JoinPaths(thePrefs::GetConfigDir(), wxT("skins")) + wxFileName::GetPathSeparator()); wxStandardPathsBase &spb(wxStandardPaths::Get()); -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ wxString dataDir(spb.GetPluginsDir()); #elif defined(__WXMAC__) wxString dataDir(spb.GetDataDir()); diff --git a/src/amuled.cpp b/src/amuled.cpp index d5240499..486da597 100644 --- a/src/amuled.cpp +++ b/src/amuled.cpp @@ -65,7 +65,7 @@ #include // Do_not_auto_remove #endif -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ #ifdef HAVE_SYS_WAIT_H #include // Do_not_auto_remove #endif @@ -558,7 +558,7 @@ pid_t AmuleWaitPid(pid_t pid, int *status, int options, wxString *msg) #endif // AMULED_APPTRAITS -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ // // CTRL-C-Handler // see http://msdn.microsoft.com/en-us/library/windows/desktop/ms685049%28v=vs.85%29.aspx @@ -583,7 +583,7 @@ static BOOL CtrlHandler(DWORD fdwCtrlType) } } -#endif // __WINDOWS__ +#endif // __WINDOWS__ int CamuleDaemonApp::OnRun() @@ -596,9 +596,9 @@ int CamuleDaemonApp::OnRun() return 0; } -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ SetConsoleCtrlHandler((PHANDLER_ROUTINE) CtrlHandler, TRUE); -#endif // __WINDOWS__ +#endif // __WINDOWS__ #ifdef AMULED_APPTRAITS // Process the return code of dead children so that we do not create @@ -660,7 +660,7 @@ bool CamuleDaemonApp::OnInit() int CamuleDaemonApp::InitGui(bool ,wxString &) { -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ if ( !enable_daemon_fork ) { return 0; } diff --git a/src/libs/common/MuleDebug.cpp b/src/libs/common/MuleDebug.cpp index e6c22795..5d8d7589 100644 --- a/src/libs/common/MuleDebug.cpp +++ b/src/libs/common/MuleDebug.cpp @@ -49,7 +49,7 @@ #endif -#if wxUSE_STACKWALKER && defined(__WINDOWS__ ) +#if wxUSE_STACKWALKER && defined(__WINDOWS__) #include // Do_not_auto_remove #elif defined(HAVE_BFD) #include // Do_not_auto_remove @@ -119,7 +119,7 @@ void InstallMuleExceptionHandler() // Make it 1 for getting the file path also #define TOO_VERBOSE_BACKTRACE 0 -#if wxUSE_STACKWALKER && defined(__WINDOWS__ ) +#if wxUSE_STACKWALKER && defined(__WINDOWS__) // Derived class to define the actions to be done on frame print. // I was tempted to name it MuleSkyWalker diff --git a/src/libs/common/Path.cpp b/src/libs/common/Path.cpp index 1274847d..7dbd665d 100644 --- a/src/libs/common/Path.cpp +++ b/src/libs/common/Path.cpp @@ -26,7 +26,7 @@ #include "StringFunctions.h" // Needed for filename2char() #include -#if defined __WINDOWS__ || defined __IRIX__ +#if defined __WINDOWS__ || defined __IRIX__ # include #endif #include @@ -38,7 +38,7 @@ // case-insensitive cmp for that platform. TODO: // Perhaps it would be better to simply lowercase // m_filesystem in the constructor ... -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ #define PATHCMP(a, b) wxStricmp(a, b) #define PATHNCMP(a, b, n) wxStrnicmp(a, b, n) #else @@ -178,7 +178,7 @@ wxString DoRemoveExt(const wxString& path) /** Readies a path for use with wxAccess.. */ wxString DoCleanPath(const wxString& path) { -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ // stat fails on windows if there are trailing path-separators. wxString cleanPath = StripSeparators(path, wxString::trailing); @@ -249,7 +249,7 @@ CPath::CPath(const wxString& filename) // saved as UTF8, even if the system is not unicode enabled, // preserving the original filename till the user has fixed // his system ... -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ // Magic fails on Windows where we always work with wide char file names. m_filesystem = DeepCopy(filename); m_printable = m_filesystem; @@ -583,7 +583,7 @@ bool CPath::BackupFile(const CPath& src, const wxString& appendix) if (CPath::CloneFile(src, dst, true)) { // Try to ensure that the backup gets physically written -#if defined __WINDOWS__ || defined __IRIX__ +#if defined __WINDOWS__ || defined __IRIX__ wxFFile backupFile; #else wxFile backupFile; diff --git a/src/utils/aLinkCreator/src/alcframe.cpp b/src/utils/aLinkCreator/src/alcframe.cpp index 4b085325..45797195 100644 --- a/src/utils/aLinkCreator/src/alcframe.cpp +++ b/src/utils/aLinkCreator/src/alcframe.cpp @@ -48,7 +48,7 @@ #include #include -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ #include #include #elif defined(__WXMAC__) @@ -72,7 +72,7 @@ AlcFrame::AlcFrame (const wxString & title): wxFrame ((wxFrame *) NULL, -1, title) { // Give it an icon -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ wxIcon icon(wxT("alc")); #else wxIcon icon; @@ -325,7 +325,7 @@ AlcFrame::OnBrowseButton (wxCommandEvent & WXUNUSED(event)) void AlcFrame::SetFileToHash() { -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ wxString browseroot; LPITEMIDLIST pidl; HRESULT hr = SHGetSpecialFolderLocation(NULL, CSIDL_PERSONAL, &pidl); diff --git a/src/utils/aLinkCreator/src/alcpix.cpp b/src/utils/aLinkCreator/src/alcpix.cpp index 25931d74..215d0893 100644 --- a/src/utils/aLinkCreator/src/alcpix.cpp +++ b/src/utils/aLinkCreator/src/alcpix.cpp @@ -35,7 +35,7 @@ wxBitmap AlcPix::getPixmap(const wxString& name) wxBitmap bitmap(m_about_xpm); return bitmap; } -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ else if (name == wxT("alc")) { wxBitmap bitmap(m_alc_xpm); @@ -361,7 +361,7 @@ AlcPix::m_about_xpm[]= "JXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJXJX" }; -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ const char * AlcPix::m_alc_xpm[]= { /* XPM */ @@ -543,7 +543,7 @@ AlcPix::m_alc_xpm[]= "c.c.c.c.c.c. . . . . c.c.c.c.c.c. . . c.c.c.c.", "c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c." }; -#endif /* !__WINDOWS__ */ +#endif /* !__WINDOWS__ */ const char * AlcPix::m_copy_xpm[]= @@ -1565,7 +1565,7 @@ AlcPix::m_about_xpm[]= " " }; -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ const char * AlcPix::m_alc_xpm[]= { /* XPM */ @@ -1747,7 +1747,7 @@ AlcPix::m_alc_xpm[]= "c.c.c.c.c.c. . . . . c.c.c.c.c.c. . . c.c.c.c.", "c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c.c." }; -#endif /* !__WINDOWS__ */ +#endif /* !__WINDOWS__ */ const char * AlcPix::m_copy_xpm[]= diff --git a/src/utils/aLinkCreator/src/alcpix.h b/src/utils/aLinkCreator/src/alcpix.h index 74d0c72c..a71eabb6 100644 --- a/src/utils/aLinkCreator/src/alcpix.h +++ b/src/utils/aLinkCreator/src/alcpix.h @@ -38,7 +38,7 @@ class AlcPix { private: static const char *m_about_xpm[]; -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ static const char *m_alc_xpm[]; #endif static const char *m_copy_xpm[]; diff --git a/src/utils/plasmamule/qt-emc.cpp b/src/utils/plasmamule/qt-emc.cpp index 6f61d1cd..b71114eb 100644 --- a/src/utils/plasmamule/qt-emc.cpp +++ b/src/utils/plasmamule/qt-emc.cpp @@ -87,7 +87,7 @@ const QString qtEmc::getErrorMessage() return QString("Your collection file was corrupted and ends to Early"); } } - + return QString("Unknown Error-Code"); } diff --git a/src/utils/wxCas/src/wxcas.cpp b/src/utils/wxCas/src/wxcas.cpp index be2e97d4..d91d148d 100644 --- a/src/utils/wxCas/src/wxcas.cpp +++ b/src/utils/wxCas/src/wxcas.cpp @@ -61,7 +61,7 @@ WxCas::OnInit () wxImage::AddHandler ( new wxJPEGHandler ); #endif -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ SetPrintMode ( wxPRINT_WINDOWS ); #else SetPrintMode ( wxPRINT_POSTSCRIPT ); diff --git a/src/utils/wxCas/src/wxcascte.cpp b/src/utils/wxCas/src/wxcascte.cpp index 96cae5ef..908a1209 100644 --- a/src/utils/wxCas/src/wxcascte.cpp +++ b/src/utils/wxCas/src/wxcascte.cpp @@ -38,7 +38,7 @@ #include // Do_not_auto_remove #endif #include // Do_not_auto_remove -#elif defined(__WINDOWS__ ) +#elif defined(__WINDOWS__) #include // Do_not_auto_remove #include // Do_not_auto_remove #include @@ -142,7 +142,7 @@ wxString GetDefaultAmulesigPath() #endif } -#elif defined(__WINDOWS__ ) +#elif defined(__WINDOWS__) LPITEMIDLIST pidl; diff --git a/src/utils/wxCas/src/wxcasframe.cpp b/src/utils/wxCas/src/wxcasframe.cpp index f874c1c3..1c8b6939 100644 --- a/src/utils/wxCas/src/wxcasframe.cpp +++ b/src/utils/wxCas/src/wxcasframe.cpp @@ -51,7 +51,7 @@ WxCasFrame::WxCasFrame ( const wxString & title ) : wxFrame ( ( wxFrame * ) NULL, -1, title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE ) { // Give it an icon -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ wxIcon icon(wxT("wxcas")); #else wxIcon icon; @@ -102,7 +102,7 @@ WxCasFrame::WxCasFrame ( const wxString & title ) : // Main Panel static line m_staticLine = new wxStaticLine ( m_mainPanel, -1 ); -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ m_BottomStaticLine = new wxStaticLine ( m_mainPanel, -1 ); #endif @@ -181,7 +181,7 @@ WxCasFrame::WxCasFrame ( const wxString & title ) : m_mainPanelVBox->Add ( m_absHitPanelSBoxSizer, 0, wxALL | wxALIGN_CENTER | wxGROW, 10 ); -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ m_mainPanelVBox->Add ( m_BottomStaticLine, 0, wxALL | wxALIGN_CENTER | wxGROW ); #endif @@ -277,7 +277,7 @@ WxCasFrame::GetStatImage () const wxMemoryDC memdc; memdc.SelectObject ( statBitmap ); -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ memdc. SetFont ( wxFont ( 6, wxSWISS, wxNORMAL, wxBOLD ) ); diff --git a/src/utils/wxCas/src/wxcasframe.h b/src/utils/wxCas/src/wxcasframe.h index 6cbe8a9b..564cdbf5 100644 --- a/src/utils/wxCas/src/wxcasframe.h +++ b/src/utils/wxCas/src/wxcasframe.h @@ -63,7 +63,7 @@ private: wxPanel *m_mainPanel; wxStaticLine *m_staticLine; -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ wxStaticLine *m_BottomStaticLine; #endif diff --git a/src/utils/wxCas/src/wxcaspix.cpp b/src/utils/wxCas/src/wxcaspix.cpp index 58db5a7a..e043b143 100644 --- a/src/utils/wxCas/src/wxcaspix.cpp +++ b/src/utils/wxCas/src/wxcaspix.cpp @@ -53,7 +53,7 @@ wxBitmap WxCasPix::getPixmap( const wxString& name ) } else if ( name == wxT( "stop" ) ) { wxBitmap bitmap( m_stop_xpm ); return bitmap; -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ } else if ( name == wxT( "wxcas" ) ) { wxBitmap bitmap( m_wxcas_xpm ); return bitmap; @@ -1448,7 +1448,7 @@ WxCasPix::m_stop_xpm[] = "!!!!!!!!!!!!!*!!!!!!!!!!!!!!!!!!" }; -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ const char * WxCasPix::m_wxcas_xpm[] = { /* XPM */ @@ -1678,5 +1678,5 @@ WxCasPix::m_wxcas_xpm[] = "+X+X+X4.%.7.7.| '.+.&./ ^ +X+X+X+X_.+X+X+X+X+X+X+X+X+X+X+X+X+X+X", "+X+X+X+X3.+./ +.+X+X1.].+X+X+X+X+X_.+X+X+X+X+X+X+X+X+X+X+X+X+X+X" }; -#endif /* !__WINDOWS__ */ +#endif /* !__WINDOWS__ */ // File_checked_for_headers diff --git a/src/utils/wxCas/src/wxcaspix.h b/src/utils/wxCas/src/wxcaspix.h index 90b96a4b..190cb933 100644 --- a/src/utils/wxCas/src/wxcaspix.h +++ b/src/utils/wxCas/src/wxcaspix.h @@ -43,7 +43,7 @@ private: static const char *m_save_xpm[]; static const char *m_stat_xpm[]; static const char *m_stop_xpm[]; -#ifndef __WINDOWS__ +#ifndef __WINDOWS__ static const char *m_wxcas_xpm[]; #endif diff --git a/src/webserver/src/WebInterface.cpp b/src/webserver/src/WebInterface.cpp index 535f224b..3b3657a5 100644 --- a/src/webserver/src/WebInterface.cpp +++ b/src/webserver/src/WebInterface.cpp @@ -364,7 +364,7 @@ wxAppTraits *CamulewebApp::CreateTraits() #endif #ifdef AMULEWEB28_EVENTLOOP -CamulewebApp::CamulewebApp() +CamulewebApp::CamulewebApp() #ifdef AMULEWEB28_SOCKETS : m_table(new CWebserverGSocketFuncTable) #endif @@ -530,7 +530,7 @@ bool CamulewebApp::GetTemplateDir(const wxString& templateName, wxString& templa #endif dir = wxStandardPaths::Get().GetResourcesDir(); // Returns 'aMule' when we use 'amule' elsewhere -#if !defined(__WINDOWS__ ) && !defined(__WXMAC__) +#if !defined(__WINDOWS__) && !defined(__WXMAC__) dir = dir.BeforeLast(wxFileName::GetPathSeparator()); dir = JoinPaths(dir, wxT("amule")); #endif @@ -855,7 +855,7 @@ wxString CamulewebApp::SetLocale(const wxString& language) if (m_localTemplate) { DebugShow(wxT("no\n")); } -#if defined __WXMAC__ || defined __WINDOWS__ +#if defined __WXMAC__ || defined __WINDOWS__ // on Mac, the bundle may be tried, too dir = wxStandardPaths::Get().GetDataDir(); #elif defined(__UNIX__) diff --git a/src/webserver/src/WebInterface.h b/src/webserver/src/WebInterface.h index c2491da7..f231e682 100644 --- a/src/webserver/src/WebInterface.h +++ b/src/webserver/src/WebInterface.h @@ -36,14 +36,14 @@ #define AMULEWEB28_EVENTLOOP // wx 2.8 also needs extra socket code, unless we have ASIO sockets - // + // #ifdef HAVE_CONFIG_H # include "config.h" // defines ASIO_SOCKETS #endif #ifndef ASIO_SOCKETS // MSW: can't run amuled with 2.8 without ASIO sockets, just get it compiled - #ifndef __WINDOWS__ + #ifndef __WINDOWS__ #define AMULEWEB28_SOCKETS #endif #endif diff --git a/src/webserver/src/WebServer.cpp b/src/webserver/src/WebServer.cpp index 59e6c877..b5650f63 100644 --- a/src/webserver/src/WebServer.cpp +++ b/src/webserver/src/WebServer.cpp @@ -250,7 +250,7 @@ CWebServerBase::CWebServerBase(CamulewebApp *webApp, const wxString& templateDir } -// Probably always terminated by Ctrl-C or kill, but make a clean shutdown of the service anyway +// Probably always terminated by Ctrl-C or kill, but make a clean shutdown of the service anyway CWebServerBase::~CWebServerBase() { #ifdef ASIO_SOCKETS @@ -320,7 +320,7 @@ void CWebServerBase::OnWebSocketServerEvent(wxSocketEvent& WXUNUSED(event)) #endif CWebLibSocketServer::CWebLibSocketServer(const class amuleIPV4Address& adr, int flags, CWebServerBase * webServerBase) - : CLibSocketServer(adr, flags), + : CLibSocketServer(adr, flags), m_webServerBase(webServerBase) { } @@ -974,7 +974,7 @@ CFileImage::CFileImage(const wxString& name) : CAnyImage(0) { m_size = 0; m_name = name; -#ifdef __WINDOWS__ +#ifdef __WINDOWS__ wxFFile fis(m_name, wxT("rb")); #else wxFFile fis(m_name); diff --git a/src/webserver/src/WebSocket.cpp b/src/webserver/src/WebSocket.cpp index e53eb5e1..0fd4e5c0 100644 --- a/src/webserver/src/WebSocket.cpp +++ b/src/webserver/src/WebSocket.cpp @@ -199,7 +199,7 @@ void CWebSocket::OnRequestReceived(char* pHeader, char* pData, uint32 dwDataLen) char *current_cookie = strstr(pHeader, "Cookie: "); if ( current_cookie == NULL ) { current_cookie = strstr(pHeader, "cookie: "); - } + } if ( current_cookie ) { current_cookie = strstr(current_cookie, "amuleweb_session_id"); if ( current_cookie ) { diff --git a/src/webserver/src/php_parser.h b/src/webserver/src/php_parser.h index 94b75238..5236cf73 100644 --- a/src/webserver/src/php_parser.h +++ b/src/webserver/src/php_parser.h @@ -1,20 +1,20 @@ /* A Bison parser, made by GNU Bison 2.4.2. */ /* Skeleton interface for Bison's Yacc-like parsers in C - + Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software Foundation, Inc. - + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -27,7 +27,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -- 2.11.4.GIT