Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove some more of the evil trailing white spaces & tabs

  • Loading branch information...
commit 708366d9ae704f41dfe4d8ff4d9a9de0d179eb81 1 parent 43d0f6d
@Un1matr1x Un1matr1x authored
View
22 Csocket.cpp
@@ -301,7 +301,7 @@ int GetAddrInfo( const CS_STRING & sHostname, Csock *pSock, CSSockAddr & csSockA
if( iRet == EAI_AGAIN )
return( EAGAIN ); // need to return telling the user to try again
else if( ( iRet == 0 ) && ( res ) )
- {
+ {
std::list<struct addrinfo *> lpTryAddrs;
bool bFound = false;
for( struct addrinfo *pRes = res; pRes; pRes = pRes->ai_next )
@@ -312,7 +312,7 @@ int GetAddrInfo( const CS_STRING & sHostname, Csock *pSock, CSSockAddr & csSockA
if( ( pRes->ai_socktype != SOCK_STREAM ) || ( pRes->ai_protocol != IPPROTO_TCP ) )
#endif /* __sun work around broken impl of getaddrinfo */
continue;
-
+
if( ( csSockAddr.GetAFRequire() != CSSockAddr::RAF_ANY ) && ( pRes->ai_family != csSockAddr.GetAFRequire() ) )
continue; // they requested a special type, so be certain we woop past anything unwanted
lpTryAddrs.push_back( pRes );
@@ -1050,7 +1050,7 @@ cs_sock_t Csock::Accept( CS_STRING & sHost, u_short & iRPort )
if ( !m_bBLOCK )
{
- // make it none blocking
+ // make it none blocking
set_non_blocking( iSock );
}
@@ -1328,7 +1328,7 @@ bool Csock::ConnectSSL( const CS_STRING & sBindhost )
bPass = true;
#ifdef _WIN32
else if( sslErr == SSL_ERROR_SYSCALL && iErr < 0 && GetLastError() == WSAENOTCONN )
- {
+ {
// this seems to be an issue with win32 only. I've seen it happen on slow connections
// the issue is calling this before select(), which isn't a problem on unix. Allowing this
// to pass in this case is fine because subsequent ssl transactions will occur and the handshake
@@ -1657,12 +1657,12 @@ CS_STRING Csock::ConvertAddress( void *addr, bool bIPv6 )
{
CS_STRING sRet;
- if( !bIPv6 )
+ if( !bIPv6 )
{
in_addr *p = (in_addr*) addr;
sRet = inet_ntoa(*p);
- }
- else
+ }
+ else
{
char straddr[INET6_ADDRSTRLEN];
if( inet_ntop( AF_INET6, addr, straddr, sizeof(straddr) ) > 0 )
@@ -2180,7 +2180,7 @@ int Csock::GetPending()
int iBytes = SSL_pending( m_ssl );
ERR_pop_to_mark();
return( iBytes );
-#else
+#else
int iBytes = SSL_pending( m_ssl );
ERR_clear_error(); // to get safer handling, upgrade your openssl version!
return( iBytes );
@@ -2394,18 +2394,18 @@ cs_sock_t Csock::CreateSocket( bool bListen )
cs_sock_t iRet = socket( PF_INET, SOCK_STREAM, IPPROTO_TCP );
#endif /* HAVE_IPV6 */
- if ( iRet != CS_INVALID_SOCK )
+ if ( iRet != CS_INVALID_SOCK )
{
set_close_on_exec( iRet );
- if ( bListen )
+ if ( bListen )
{
const int on = 1;
if ( setsockopt( iRet, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof( on ) ) != 0 )
PERROR( "SO_REUSEADDR" );
}
- }
+ }
else
PERROR( "socket" );
View
18 Csocket.h
@@ -775,7 +775,7 @@ class Csock
unsigned int GetRequireClientCertFlags();
//! legacy, deprecated @see SetRequireClientCertFlags
void SetRequiresClientCert( bool bRequiresCert );
- //! bitwise flags, 0 means don't require cert, SSL_VERIFY_PEER verifies peers, SSL_VERIFY_FAIL_IF_NO_PEER_CERT will cause the connection to fail if no cert
+ //! bitwise flags, 0 means don't require cert, SSL_VERIFY_PEER verifies peers, SSL_VERIFY_FAIL_IF_NO_PEER_CERT will cause the connection to fail if no cert
void SetRequireClientCertFlags( unsigned int iRequireClientCertFlags ) { m_iRequireClientCertFlags = iRequireClientCertFlags; }
#endif /* HAVE_LIBSSL */
@@ -919,7 +919,7 @@ class Csock
time_t GetLastCheckTimeout() { return( m_iLastCheckTimeoutTime ); }
//! Returns the time when CheckTimeout() should be called next
- time_t GetNextCheckTimeout( time_t iNow = 0 )
+ time_t GetNextCheckTimeout( time_t iNow = 0 )
{
if( iNow == 0 )
iNow = time( NULL );
@@ -1222,7 +1222,7 @@ class CSListener
void SetPemPass( const CS_STRING & s ) { m_sPemPass = s; }
//! set to true if require a client certificate (deprecated @see SetRequireClientCertFlags)
void SetRequiresClientCert( bool b ) { m_iRequireCertFlags = ( b ? SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT : 0 ); }
- //! bitwise flags, 0 means don't require cert, SSL_VERIFY_PEER verifies peers, SSL_VERIFY_FAIL_IF_NO_PEER_CERT will cause the connection to fail if no cert
+ //! bitwise flags, 0 means don't require cert, SSL_VERIFY_PEER verifies peers, SSL_VERIFY_FAIL_IF_NO_PEER_CERT will cause the connection to fail if no cert
void SetRequireClientCertFlags( unsigned int iRequireCertFlags ) { m_iRequireCertFlags = iRequireCertFlags; }
#endif /* HAVE_LIBSSL */
private:
@@ -2029,7 +2029,7 @@ class TSocketManager : public std::vector<T *>
continue;
}
#endif /* CSOCK_USE_POLL */
-
+
#ifdef HAVE_C_ARES
ares_channel pChannel = pcSock->GetAresChannel();
if( pChannel )
@@ -2096,12 +2096,12 @@ class TSocketManager : public std::vector<T *>
}
}
- }
+ }
else
{
FDSetCheck( iRSock, miiReadyFds, eCheckRead );
}
-
+
if( pcSock->GetSSL() && pcSock->GetType() != Csock::LISTENER )
{
if ( ( pcSock->GetPending() > 0 ) && ( !pcSock->IsReadPaused() ) )
@@ -2152,7 +2152,7 @@ class TSocketManager : public std::vector<T *>
m_errno = SUCCESS;
return;
- }
+ }
else if ( iSel == -1 )
{
if ( mpeSocks.empty() )
@@ -2161,7 +2161,7 @@ class TSocketManager : public std::vector<T *>
m_errno = SUCCESS;
return;
- }
+ }
else
{
m_errno = SUCCESS;
@@ -2217,7 +2217,7 @@ class TSocketManager : public std::vector<T *>
SelectSock( mpeSocks, iErrno, pcSock );
- }
+ }
else if ( FDHasCheck( iRSock, miiReadyFds, eCheckRead ) )
{
if ( iSel > 0 )
View
2  IRCSock.cpp
@@ -709,7 +709,7 @@ void CIRCSock::ReadLine(const CString& sData) {
sArgs.Trim();
MODULECALL(OnServerCapResult(sArgs, false), m_pUser, NULL, NOTHING);
}
-
+
SendNextCap();
}
// Don't forward any CAP stuff to the client
View
2  Socket.h
@@ -115,7 +115,7 @@ class CSockManager : public TSocketManager<CZNCSock> {
* @brief Base Csock implementation to be used by modules
*
* By all means, this class should be used as a base for sockets originating from modules. It handles removing instances of itself
- * from the module as it unloads, and simplifies use in general.
+ * from the module as it unloads, and simplifies use in general.
* - EnableReadLine is default to true in this class
* - MaxBuffer for readline is set to 10240, in the event this is reached the socket is closed (@see ReachedMaxBuffer)
*/
View
2  Template.h
@@ -137,7 +137,7 @@ class CTemplate : public MCString {
return m_vspTagHandlers;
}
-
+
CString ResolveLiteral(const CString& sString);
void Init();
View
2  modules/data/webadmin/tmpl/settings.tmpl
@@ -89,7 +89,7 @@
<div><input type="text" name="anoniplimit" value="<? VAR AnonIPLimit ?>" /></div>
</div>
<div style="clear: both;"></div>
-
+
<div class="subsection">
<div class="inputlabel">Protect Web Sessions:</div>
<div class="checkbox"><input type="checkbox" name="protectwebsessions" id="protectwebsessions_checkbox"<? IF ProtectWebSessions ?> checked="checked"<? ENDIF ?> />
View
2  modules/extra/flooddetach.cpp
@@ -100,7 +100,7 @@ class CFloodDetachMod : public CModule {
// We don't track detached channels
if (Channel.IsDetached())
return;
-
+
// This is the first message for this channel, start a
// new timeout.
std::pair<time_t, unsigned int> tmp(now, 1);
View
10 modules/modpython/codegen.pl
@@ -69,7 +69,7 @@
inline int SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) {
#if PY_VERSION_HEX>=0x03000000
if (PyUnicode_Check(obj))
-#else
+#else
if (PyString_Check(obj))
#endif
{
@@ -90,7 +90,7 @@
#endif
if (cptr) {
if (alloc) {
- /*
+ /*
In python the user should not be able to modify the inner
string representation. To warranty that, if you define
SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
@@ -98,11 +98,11 @@
The default behavior is just to return the pointer value,
so, be careful.
- */
+ */
#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
- if (*alloc != SWIG_OLDOBJ)
+ if (*alloc != SWIG_OLDOBJ)
#else
- if (*alloc == SWIG_NEWOBJ)
+ if (*alloc == SWIG_NEWOBJ)
#endif
{
*cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
View
2  modules/modpython/compiler.cpp
@@ -27,7 +27,7 @@ int main(int argc, char** argv) {
PyObject* pyFunc = PyObject_GetAttrString(pyModule, "compile");
fail(pyFunc, 2);
-
+
std::string cfile = argv[2];
if (cfile.find('/') == std::string::npos) {
cfile = "./" + cfile;
View
62 modules/modpython/cstring.i
@@ -9,7 +9,7 @@
%{
#include <string>
%}
-
+
%feature("naturalvar") CString;
class CString;
@@ -18,7 +18,7 @@ class CString;
/*@SWIG:/usr/share/swig1.3/typemaps/std_strings.swg,4,%std_string_asptr@*/
%fragment("SWIG_" "AsPtr" "_" {CString},"header",fragment="SWIG_AsCharPtrAndSize") {
SWIGINTERN int
-SWIG_AsPtr_std_string (PyObject * obj, CString **val)
+SWIG_AsPtr_std_string (PyObject * obj, CString **val)
{
char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
@@ -107,8 +107,8 @@ SWIG_From_std_string (const CString& s)
%typemap(in,fragment="SWIG_" "AsPtr" "_" {CString}) CString {
CString *ptr = (CString *)0;
int res = SWIG_AsPtr_std_string($input, &ptr);
- if (!SWIG_IsOK(res) || !ptr) {
- SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "$symname" "', argument " "$argnum"" of type '" "$type""'");
+ if (!SWIG_IsOK(res) || !ptr) {
+ SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "$symname" "', argument " "$argnum"" of type '" "$type""'");
}
$1 = *ptr;
if (SWIG_IsNewObj(res)) free((char*)ptr);
@@ -129,8 +129,8 @@ SWIG_From_std_string (const CString& s)
%typemap(varin,fragment="SWIG_" "AsPtr" "_" {CString}) CString {
CString *ptr = (CString *)0;
int res = SWIG_AsPtr_std_string($input, &ptr);
- if (!SWIG_IsOK(res) || !ptr) {
- SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in variable '""$name""' of type '""$type""'");
+ if (!SWIG_IsOK(res) || !ptr) {
+ SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in variable '""$name""' of type '""$type""'");
}
$1 = *ptr;
if (SWIG_IsNewObj(res)) free((char*)ptr);
@@ -140,7 +140,7 @@ SWIG_From_std_string (const CString& s)
%typemap(directorargout,noblock=1,fragment="SWIG_" "AsPtr" "_" {CString}) CString *DIRECTOROUT ($*ltype temp) {
CString *swig_optr = 0;
int swig_ores = $input ? SWIG_AsPtr_std_string($input, &swig_optr) : 0;
- if (!SWIG_IsOK(swig_ores) || !swig_optr) {
+ if (!SWIG_IsOK(swig_ores) || !swig_optr) {
Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""$type""'");
}
temp = *swig_optr;
@@ -151,7 +151,7 @@ SWIG_From_std_string (const CString& s)
%typemap(directorout,noblock=1,fragment="SWIG_" "AsPtr" "_" {CString}) CString {
CString *swig_optr = 0;
int swig_ores = SWIG_AsPtr_std_string($input, &swig_optr);
- if (!SWIG_IsOK(swig_ores) || !swig_optr) {
+ if (!SWIG_IsOK(swig_ores) || !swig_optr) {
Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""$type""'");
}
$result = *swig_optr;
@@ -161,9 +161,9 @@ SWIG_From_std_string (const CString& s)
%typemap(directorout,noblock=1,fragment="SWIG_" "AsPtr" "_" {CString},warning= "473:Returning a pointer or reference in a director method is not recommended." ) CString* {
CString *swig_optr = 0;
int swig_ores = SWIG_AsPtr_std_string($input, &swig_optr);
- if (!SWIG_IsOK(swig_ores)) {
+ if (!SWIG_IsOK(swig_ores)) {
Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_ores)), "in output value of type '""$type""'");
- }
+ }
$result = swig_optr;
if (SWIG_IsNewObj(swig_ores)) {
swig_acquire_ownership(swig_optr);
@@ -179,13 +179,13 @@ SWIG_From_std_string (const CString& s)
%typemap(directorout,noblock=1,fragment="SWIG_" "AsPtr" "_" {CString},warning= "473:Returning a pointer or reference in a director method is not recommended." ) CString& {
CString *swig_optr = 0;
int swig_ores = SWIG_AsPtr_std_string($input, &swig_optr);
- if (!SWIG_IsOK(swig_ores)) {
+ if (!SWIG_IsOK(swig_ores)) {
Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_ores)), "in output value of type '""$type""'");
} else {
- if (!swig_optr) {
+ if (!swig_optr) {
Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ValueError), "invalid null reference " "in output value of type '""$type""'");
- }
- }
+ }
+ }
$result = swig_optr;
if (SWIG_IsNewObj(swig_ores)) {
swig_acquire_ownership(swig_optr);
@@ -208,26 +208,26 @@ SWIG_From_std_string (const CString& s)
$1 = SWIG_CheckState(res);
}
-%typemap(typecheck,noblock=1,precedence=135,fragment="SWIG_" "AsPtr" "_" {CString}) CString, const CString& {
+%typemap(typecheck,noblock=1,precedence=135,fragment="SWIG_" "AsPtr" "_" {CString}) CString, const CString& {
int res = SWIG_AsPtr_std_string($input, (CString**)(0));
$1 = SWIG_CheckState(res);
}
/*@SWIG@*/;
- /*@SWIG:/usr/share/swig1.3/typemaps/inoutlist.swg,254,%ptr_input_typemap@*/
+ /*@SWIG:/usr/share/swig1.3/typemaps/inoutlist.swg,254,%ptr_input_typemap@*/
/*@SWIG:/usr/share/swig1.3/typemaps/inoutlist.swg,117,%_ptr_input_typemap@*/
- %typemap(in,noblock=1,fragment="SWIG_" "AsPtr" "_" {CString}) CString *INPUT(int res = 0) {
+ %typemap(in,noblock=1,fragment="SWIG_" "AsPtr" "_" {CString}) CString *INPUT(int res = 0) {
res = SWIG_AsPtr_std_string($input, &$1);
if (!SWIG_IsOK(res)) {
SWIG_exception_fail(SWIG_ArgError(res), "in method '" "$symname" "', argument " "$argnum"" of type '" "$type""'");
}
res = SWIG_AddTmpMask(res);
}
- %typemap(in,noblock=1,fragment="SWIG_" "AsPtr" "_" {CString}) CString &INPUT(int res = 0) {
+ %typemap(in,noblock=1,fragment="SWIG_" "AsPtr" "_" {CString}) CString &INPUT(int res = 0) {
res = SWIG_AsPtr_std_string($input, &$1);
- if (!SWIG_IsOK(res)) {
+ if (!SWIG_IsOK(res)) {
SWIG_exception_fail(SWIG_ArgError(res), "in method '" "$symname" "', argument " "$argnum"" of type '" "$type""'");
- }
- if (!$1) {
+ }
+ if (!$1) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "$symname" "', argument " "$argnum"" of type '" "$type""'");
}
res = SWIG_AddTmpMask(res);
@@ -245,10 +245,10 @@ SWIG_From_std_string (const CString& s)
/*@SWIG:/usr/share/swig1.3/typemaps/valtypes.swg,184,%typemaps_from@*/
/*@SWIG:/usr/share/swig1.3/typemaps/valtypes.swg,55,%value_out_typemap@*/
%typemap(out,noblock=1,fragment="SWIG_" "From" "_" {CString}) CString, const CString {
- $result = SWIG_From_std_string((CString)($1));
+ $result = SWIG_From_std_string((CString)($1));
}
%typemap(out,noblock=1,fragment="SWIG_" "From" "_" {CString}) const CString& {
- $result = SWIG_From_std_string((CString)(*$1));
+ $result = SWIG_From_std_string((CString)(*$1));
}
/*@SWIG@*/;
/*@SWIG:/usr/share/swig1.3/typemaps/valtypes.swg,79,%value_varout_typemap@*/
@@ -263,10 +263,10 @@ SWIG_From_std_string (const CString& s)
/*@SWIG@*/;
/*@SWIG:/usr/share/swig1.3/typemaps/valtypes.swg,98,%value_directorin_typemap@*/
%typemap(directorin,noblock=1,fragment="SWIG_" "From" "_" {CString}) CString *DIRECTORIN {
- $input = SWIG_From_std_string((CString)(*$1_name));
+ $input = SWIG_From_std_string((CString)(*$1_name));
}
%typemap(directorin,noblock=1,fragment="SWIG_" "From" "_" {CString}) CString, const CString& {
- $input = SWIG_From_std_string((CString)($1_name));
+ $input = SWIG_From_std_string((CString)($1_name));
}
/*@SWIG@*/;
/*@SWIG:/usr/share/swig1.3/typemaps/valtypes.swg,154,%value_throws_typemap@*/
@@ -274,10 +274,10 @@ SWIG_From_std_string (const CString& s)
SWIG_Python_Raise(SWIG_From_std_string((CString)($1)), "$type", 0); SWIG_fail;
}
/*@SWIG@*/;
- /*@SWIG:/usr/share/swig1.3/typemaps/inoutlist.swg,258,%value_output_typemap@*/
+ /*@SWIG:/usr/share/swig1.3/typemaps/inoutlist.swg,258,%value_output_typemap@*/
/*@SWIG:/usr/share/swig1.3/typemaps/inoutlist.swg,175,%_value_output_typemap@*/
- %typemap(in,numinputs=0,noblock=1)
- CString *OUTPUT ($*1_ltype temp, int res = SWIG_TMPOBJ),
+ %typemap(in,numinputs=0,noblock=1)
+ CString *OUTPUT ($*1_ltype temp, int res = SWIG_TMPOBJ),
CString &OUTPUT ($*1_ltype temp, int res = SWIG_TMPOBJ) {
$1 = &temp;
}
@@ -292,10 +292,10 @@ SWIG_From_std_string (const CString& s)
/*@SWIG@*/
/*@SWIG@*/;
/*@SWIG@*/;
- /*@SWIG:/usr/share/swig1.3/typemaps/inoutlist.swg,258,%value_output_typemap@*/
+ /*@SWIG:/usr/share/swig1.3/typemaps/inoutlist.swg,258,%value_output_typemap@*/
/*@SWIG:/usr/share/swig1.3/typemaps/inoutlist.swg,175,%_value_output_typemap@*/
- %typemap(in,numinputs=0,noblock=1)
- CString *OUTPUT ($*1_ltype temp, int res = SWIG_TMPOBJ),
+ %typemap(in,numinputs=0,noblock=1)
+ CString *OUTPUT ($*1_ltype temp, int res = SWIG_TMPOBJ),
CString &OUTPUT ($*1_ltype temp, int res = SWIG_TMPOBJ) {
$1 = &temp;
}
View
2  modules/savebuff.cpp
@@ -69,7 +69,7 @@ class CSaveBuff : public CModule
}
}
else if( sArgs.empty() )
- m_sPassword = CBlowfish::MD5( CRYPT_LAME_PASS );
+ m_sPassword = CBlowfish::MD5( CRYPT_LAME_PASS );
else
m_sPassword = CBlowfish::MD5(sArgs);
View
2  modules/watch.cpp
@@ -175,7 +175,7 @@ class CWatcherMod : public CModule {
}
virtual void OnKick(const CNick& OpNick, const CString& sKickedNick, CChan& Channel, const CString& sMessage) {
- Process(OpNick, "* " + OpNick.GetNick() + " kicked " + sKickedNick + " from " +
+ Process(OpNick, "* " + OpNick.GetNick() + " kicked " + sKickedNick + " from " +
Channel.GetName() + " because [" + sMessage + "]", Channel.GetName());
}
View
4 modules/webadmin.cpp
@@ -580,7 +580,7 @@ class CWebAdminMod : public CGlobalModule {
FOR_EACH_MODULE(it, pUser) {
(*it)->OnEmbeddedWebRequest(WebSock, "webadmin/channel", TmplMod);
}
-
+
if (!CZNC::Get().WriteConfig()) {
WebSock.PrintErrorPage("Channel added/modified, but config was not written");
return true;
@@ -852,7 +852,7 @@ class CWebAdminMod : public CGlobalModule {
FOR_EACH_MODULE(it, pUser) {
(*it)->OnEmbeddedWebRequest(WebSock, "webadmin/user", TmplMod);
}
-
+
if (!CZNC::Get().WriteConfig()) {
WebSock.PrintErrorPage("User " + sAction + ", but config was not written");
return true;
View
2  znc.cpp
@@ -579,7 +579,7 @@ CString CZNC::MakeConfigHeader() {
bool CZNC::WriteNewConfig(const CString& sConfigFile) {
CString sAnswer, sUser;
VCString vsLines;
-
+
vsLines.push_back(MakeConfigHeader());
m_sConfigFile = ExpandConfigPath(sConfigFile);
Please sign in to comment.
Something went wrong with that request. Please try again.