Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy up source files. #461

Merged
merged 1 commit into from Apr 12, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions configure
Expand Up @@ -876,8 +876,7 @@ sub writefiles {
open(FILEHANDLE, ">include/config.h.tmp");
print FILEHANDLE <<EOF;
/* Auto generated by configure, do not modify! */
#ifndef __CONFIGURATION_AUTO__
#define __CONFIGURATION_AUTO__
#pragma once

#define BRANCH "$branch"
#define VERSION "$version"
Expand Down Expand Up @@ -946,7 +945,7 @@ print FILEHANDLE "#define MAXBUF " . ($config{MAXBUF}+2) . "\n";
$config{SOCKETENGINE} = "socketengine_select";
}
}
print FILEHANDLE "\n#include \"threadengines/threadengine_pthread.h\"\n\n#endif\n";
print FILEHANDLE "\n#include \"threadengines/threadengine_pthread.h\"\n";
close(FILEHANDLE);

my $file = 'include/config.h';
Expand Down
5 changes: 1 addition & 4 deletions include/bancache.h
Expand Up @@ -18,8 +18,7 @@
*/


#ifndef BANCACHE_H
#define BANCACHE_H
#pragma once

/** Stores a cached ban entry.
* Each ban has one of these hashed in a hash_map to make for faster removal
Expand Down Expand Up @@ -84,5 +83,3 @@ class CoreExport BanCacheManager
}
~BanCacheManager();
};

#endif
5 changes: 1 addition & 4 deletions include/base.h
Expand Up @@ -20,8 +20,7 @@
*/


#ifndef BASE_H
#define BASE_H
#pragma once

#include <map>
#include <deque>
Expand Down Expand Up @@ -255,5 +254,3 @@ class CoreExport ServiceProvider : public classbase
virtual ~ServiceProvider();
};


#endif
5 changes: 1 addition & 4 deletions include/caller.h
Expand Up @@ -19,8 +19,7 @@
*/


#ifndef CALLER_H
#define CALLER_H
#pragma once

/* Pending some sort of C++11 support */
#if 0
Expand Down Expand Up @@ -355,5 +354,3 @@ template <typename ReturnType, typename Param1, typename Param2, typename Param3
class CoreExport NAME : public HandlerBase8<RETURN, V1, V2, V3, V4, V5, V6, V7, V8> { public: NAME() { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6, V7, V8); }

#endif

#endif
5 changes: 1 addition & 4 deletions include/channels.h
Expand Up @@ -20,8 +20,7 @@
*/


#ifndef CHANNELS_H
#define CHANNELS_H
#pragma once

#include "membership.h"
#include "mode.h"
Expand Down Expand Up @@ -354,5 +353,3 @@ class CoreExport Channel : public Extensible, public InviteBase
*/
ModResult GetExtBanStatus(User *u, char type);
};

#endif
5 changes: 1 addition & 4 deletions include/command_parse.h
Expand Up @@ -20,8 +20,7 @@
*/


#ifndef COMMAND_PARSE_H
#define COMMAND_PARSE_H
#pragma once

/** A list of dll/so files containing the command handlers for the core
*/
Expand Down Expand Up @@ -175,5 +174,3 @@ const int duration_multi[] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
};

#endif
6 changes: 2 additions & 4 deletions include/commands/cmd_whowas.h
Expand Up @@ -19,8 +19,8 @@
*/


#ifndef CMD_WHOWAS_H
#define CMD_WHOWAS_H
#pragma once

#include "modules.h"

/* Forward ref for typedefs */
Expand Down Expand Up @@ -114,5 +114,3 @@ class WhoWasGroup
*/
~WhoWasGroup();
};

#endif
4 changes: 2 additions & 2 deletions include/configparser.h
Expand Up @@ -17,6 +17,8 @@
*/


#pragma once

struct fpos
{
std::string filename;
Expand Down Expand Up @@ -76,5 +78,3 @@ struct FileWrapper
}
}
};


5 changes: 1 addition & 4 deletions include/configreader.h
Expand Up @@ -21,8 +21,7 @@
*/


#ifndef INSPIRCD_CONFIGREADER
#define INSPIRCD_CONFIGREADER
#pragma once

#include <sstream>
#include <string>
Expand Down Expand Up @@ -569,5 +568,3 @@ class CoreExport ConfigReaderThread : public Thread
void Finish();
bool IsDone() { return done; }
};

#endif
6 changes: 2 additions & 4 deletions include/consolecolors.h
Expand Up @@ -14,8 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef CONSOLECOLORS_H
#define CONSOLECOLORS_H

#pragma once

#include <ostream>

Expand Down Expand Up @@ -96,5 +96,3 @@ inline std::ostream& con_reset(std::ostream &s)
}

#endif

#endif
5 changes: 1 addition & 4 deletions include/ctables.h
Expand Up @@ -21,8 +21,7 @@
*/


#ifndef CTABLES_H
#define CTABLES_H
#pragma once

/** Used to indicate command success codes
*/
Expand Down Expand Up @@ -252,5 +251,3 @@ class CoreExport SplitCommand : public Command
translation.push_back(x5);translation.push_back(x6);translation.push_back(x7);
#define TRANSLATE8(x1,x2,x3,x4,x5,x6,x7,x8) translation.push_back(x1);translation.push_back(x2);translation.push_back(x3);translation.push_back(x4);\
translation.push_back(x5);translation.push_back(x6);translation.push_back(x7);translation.push_back(x8);

#endif
6 changes: 1 addition & 5 deletions include/cull_list.h
Expand Up @@ -20,8 +20,7 @@
*/


#ifndef CULL_LIST_H
#define CULL_LIST_H
#pragma once

/**
* The CullList class is used to delete objects at the end of the main loop to
Expand Down Expand Up @@ -58,6 +57,3 @@ class CoreExport ActionList
void Run();

};

#endif

8 changes: 2 additions & 6 deletions include/dns.h
Expand Up @@ -18,7 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


/*
dns.h - dns library very very loosely based on
firedns, Copyright (C) 2002 Ian Gulliver
Expand All @@ -37,8 +36,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef DNS_H
#define DNS_H

#pragma once

#include "socket.h"
#include "hashcomp.h"
Expand Down Expand Up @@ -438,6 +437,3 @@ class CoreExport DNS : public EventHandler
*/
int PruneCache();
};

#endif

6 changes: 1 addition & 5 deletions include/dynamic.h
Expand Up @@ -20,8 +20,7 @@
*/


#ifndef DLL_H
#define DLL_H
#pragma once

/** The DLLManager class is able to load a module file by filename,
* and locate its init_module symbol.
Expand Down Expand Up @@ -65,6 +64,3 @@ class CoreExport DLLManager : public classbase
/** Get detailed version information from the module file */
std::string GetVersion();
};

#endif

6 changes: 1 addition & 5 deletions include/exitcodes.h
Expand Up @@ -19,8 +19,7 @@
*/


#ifndef EXITCODE_H
#define EXITCODE_H
#pragma once

/** Valid exit codes to be used with InspIRCd::Exit()
*/
Expand Down Expand Up @@ -52,6 +51,3 @@ enum ExitStatus
* human-readable strings to be shown on shutdown.
*/
extern const char * ExitCodes[];

#endif

5 changes: 1 addition & 4 deletions include/extensible.h
Expand Up @@ -17,8 +17,7 @@
*/


#ifndef EXTENSIBLE_H
#define EXTENSIBLE_H
#pragma once

#include <stdint.h>

Expand Down Expand Up @@ -190,5 +189,3 @@ class CoreExport StringExtItem : public ExtensionItem
void unset(Extensible* container);
void free(void* item);
};

#endif
6 changes: 1 addition & 5 deletions include/filelogger.h
Expand Up @@ -18,8 +18,7 @@
*/


#ifndef FILELOGGER_H
#define FILELOGGER_H
#pragma once

#include "logger.h"

Expand Down Expand Up @@ -51,6 +50,3 @@ class CoreExport FileLogStream : public LogStream

virtual void OnLog(int loglevel, const std::string &type, const std::string &msg);
};

#endif

5 changes: 1 addition & 4 deletions include/hashcomp.h
Expand Up @@ -22,8 +22,7 @@
*/


#ifndef HASHCOMP_H
#define HASHCOMP_H
#pragma once

#include <cstring>
#include <string>
Expand Down Expand Up @@ -600,5 +599,3 @@ namespace std

}
}

#endif
6 changes: 1 addition & 5 deletions include/inspircd.h
Expand Up @@ -23,8 +23,7 @@
*/


#ifndef INSPIRCD_H
#define INSPIRCD_H
#pragma once

#define _FILE_OFFSET_BITS 64
#ifndef _LARGEFILE_SOURCE
Expand Down Expand Up @@ -877,6 +876,3 @@ class CommandModule : public Module
return Version(cmd.name, VF_VENDOR|VF_CORE);
}
};

#endif

4 changes: 1 addition & 3 deletions include/inspsocket.h
Expand Up @@ -21,8 +21,7 @@
*/


#ifndef INSPSOCKET_H
#define INSPSOCKET_H
#pragma once

#include "timer.h"

Expand Down Expand Up @@ -234,4 +233,3 @@ class CoreExport BufferedSocket : public StreamSocket
inline Module* StreamSocket::GetIOHook() { return IOHook; }
inline void StreamSocket::AddIOHook(Module* m) { IOHook = m; }
inline void StreamSocket::DelIOHook() { IOHook = NULL; }
#endif
7 changes: 1 addition & 6 deletions include/inspstring.h
Expand Up @@ -18,13 +18,11 @@
*/


#ifndef INSPSTRING_H
#define INSPSTRING_H
#pragma once

// This (config) is needed as inspstring doesn't pull in the central header
#include "config.h"
#include <cstring>
//#include <cstddef>

#ifndef HAS_STRLCPY
/** strlcpy() implementation for systems that don't have it (linux) */
Expand Down Expand Up @@ -52,6 +50,3 @@ CoreExport std::string BinToHex(const std::string& data);
CoreExport std::string BinToBase64(const std::string& data, const char* table = NULL, char pad = 0);
/** Base64 decode */
CoreExport std::string Base64ToBin(const std::string& data, const char* table = NULL);

#endif

1 change: 1 addition & 0 deletions include/listmode.h
Expand Up @@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


#pragma once

/** The base class for list modes, should be inherited.
Expand Down
5 changes: 1 addition & 4 deletions include/logger.h
Expand Up @@ -18,8 +18,7 @@
*/


#ifndef LOGGER_H
#define LOGGER_H
#pragma once

/** Simple wrapper providing periodic flushing to a disk-backed file.
*/
Expand Down Expand Up @@ -211,5 +210,3 @@ class CoreExport LogManager
*/
void Log(const std::string &type, int loglevel, const char *fmt, ...) CUSTOM_PRINTF(4, 5);
};

#endif
5 changes: 1 addition & 4 deletions include/membership.h
Expand Up @@ -17,8 +17,7 @@
*/


#ifndef MEMBERSHIP_H
#define MEMBERSHIP_H
#pragma once

class CoreExport Membership : public Extensible
{
Expand Down Expand Up @@ -59,5 +58,3 @@ class Invitation : public classbase
static void Create(Channel* c, LocalUser* u, time_t timeout);
static Invitation* Find(Channel* c, LocalUser* u, bool check_expired = true);
};

#endif