Permalink
Browse files

Added comments, fixed warnings

  • Loading branch information...
nickgammon committed Sep 18, 2010
1 parent fdf8af1 commit 62566887d0706c5aad9252d252390b38ef8fe55a
Showing with 109 additions and 88 deletions.
  1. +9 −7 luacom/LuaCompat.h
  2. +17 −0 luacom/readme.txt
  3. +70 −70 plugins.h
  4. +11 −10 sqlite3/readme.txt
  5. +2 −1 zlib/readme.txt
View
@@ -1,11 +1,13 @@
// pragmas added by Nick Gammon
-#pragma warning( disable : 4100) // unreferenced formal parameter
-#pragma warning( disable : 4189) // warning C4189: 'iVersion' : local variable is initialized but not referenced
-#pragma warning( disable : 4244) // conversion from 'int' to 'unsigned short', possible loss of data
-#pragma warning( disable : 4310) // cast truncates constant value
-#pragma warning( disable : 4245) // conversion from 'long' to 'unsigned long', signed/unsigned mismatch
-#pragma warning( disable : 4127) // conditional expression is constant
-#pragma warning( disable : 4701) // local variable 'xxx' may be used without having been initialized
+#pragma warning ( disable : 4100) // unreferenced formal parameter
+#pragma warning ( disable : 4189) // warning C4189: 'iVersion' : local variable is initialized but not referenced
+#pragma warning ( disable : 4244) // conversion from 'int' to 'unsigned short', possible loss of data
+#pragma warning ( disable : 4310) // cast truncates constant value
+#pragma warning ( disable : 4245) // conversion from 'long' to 'unsigned long', signed/unsigned mismatch
+#pragma warning ( disable : 4127) // conditional expression is constant
+#pragma warning ( disable : 4701) // local variable 'xxx' may be used without having been initialized
+#pragma warning ( disable : 4702) // unreachable code
+#pragma warning ( disable : 4710) // function 'x' not inlined
/*
View
@@ -0,0 +1,17 @@
+LuaCOM built as follows:

This comment has been minimized.

Show comment Hide comment
@worstje

worstje Sep 18, 2010

Contributor

I take it you intend to remove all files but the readme from the luacom directory still, or did that slip your mind?

@worstje

worstje Sep 18, 2010

Contributor

I take it you intend to remove all files but the readme from the luacom directory still, or did that slip your mind?

This comment has been minimized.

Show comment Hide comment
@nickgammon

nickgammon Sep 18, 2010

Owner

Er, maybe not. I was just documenting the pragmas really.

So point 1 might be incorrect, but it shows where to get the upgrade from.

@nickgammon

nickgammon Sep 18, 2010

Owner

Er, maybe not. I was just documenting the pragmas really.

So point 1 might be incorrect, but it shows where to get the upgrade from.

+
+1. Download recent version from http://github.com/davidm/luacom/
+
+
+2. Edit: LuaCompat.h and add the following lines to the start of it:
+
+// pragmas added by Nick Gammon
+#pragma warning ( disable : 4100) // unreferenced formal parameter
+#pragma warning ( disable : 4189) // warning C4189: 'iVersion' : local variable is initialized but not referenced
+#pragma warning ( disable : 4244) // conversion from 'int' to 'unsigned short', possible loss of data
+#pragma warning ( disable : 4310) // cast truncates constant value
+#pragma warning ( disable : 4245) // conversion from 'long' to 'unsigned long', signed/unsigned mismatch
+#pragma warning ( disable : 4127) // conditional expression is constant
+#pragma warning ( disable : 4701) // local variable 'xxx' may be used without having been initialized
+#pragma warning ( disable : 4702) // unreachable code
+#pragma warning ( disable : 4710) // function 'x' not inlined
View
140 plugins.h
@@ -133,75 +133,75 @@ typedef CTypedPtrList <CPtrList, CPlugin*> CPluginList;
// plugin callback routines - start with OnPlugin so that we can advise
// users not to use that string for their own routines
-// install / remove
-extern const string ON_PLUGIN_INSTALL;
-extern const string ON_PLUGIN_CLOSE;
-extern const string ON_PLUGIN_LIST_CHANGED;
-
-// connect / disconnect
-extern const string ON_PLUGIN_CONNECT;
-extern const string ON_PLUGIN_DISCONNECT;
-
-// saving
-extern const string ON_PLUGIN_SAVE_STATE;
-extern const string ON_PLUGIN_WORLD_SAVE;
-
-// enable / disable
-extern const string ON_PLUGIN_ENABLE;
-extern const string ON_PLUGIN_DISABLE;
-
-// the focus
-extern const string ON_PLUGIN_GETFOCUS;
-extern const string ON_PLUGIN_LOSEFOCUS;
-
-// capture stuff
-extern const string ON_PLUGIN_TRACE;
-extern const string ON_PLUGIN_BROADCAST;
-extern const string ON_PLUGIN_SCREENDRAW;
-
-// sounds
-extern const string ON_PLUGIN_PLAYSOUND;
-
-// stuff received/sent
-extern const string ON_PLUGIN_SEND;
-extern const string ON_PLUGIN_SENT;
-extern const string ON_PLUGIN_PARTIAL_LINE;
-extern const string ON_PLUGIN_LINE_RECEIVED;
-extern const string ON_PLUGIN_PACKET_RECEIVED;
-
-// telnet negotiation
-extern const string ON_PLUGIN_TELNET_OPTION;
-extern const string ON_PLUGIN_TELNET_REQUEST;
-extern const string ON_PLUGIN_TELNET_SUBNEGOTIATION;
-extern const string ON_PLUGIN_IAC_GA;
-
-// commands
-extern const string ON_PLUGIN_COMMAND;
-extern const string ON_PLUGIN_COMMAND_ENTERED;
-extern const string ON_PLUGIN_COMMAND_CHANGED;
-extern const string ON_PLUGIN_TABCOMPLETE;
-
-// resizing, ticking, moving, rhythm
-extern const string ON_PLUGIN_WORLD_OUTPUT_RESIZED;
-extern const string ON_PLUGIN_TICK;
-extern const string ON_PLUGIN_MOUSE_MOVED;
-
-// MXP stuff
-extern const string ON_PLUGIN_MXP_START;
-extern const string ON_PLUGIN_MXP_STOP;
-extern const string ON_PLUGIN_MXP_OPENTAG;
-extern const string ON_PLUGIN_MXP_CLOSETAG;
-extern const string ON_PLUGIN_MXP_SETVARIABLE;
-extern const string ON_PLUGIN_MXP_SETENTITY;
-extern const string ON_PLUGIN_MXP_ERROR;
-
-// chat stuff
-extern const string ON_PLUGIN_CHAT_ACCEPT;
-extern const string ON_PLUGIN_CHAT_MESSAGE;
-extern const string ON_PLUGIN_CHAT_MESSAGE_OUT;
-extern const string ON_PLUGIN_CHAT_DISPLAY;
-extern const string ON_PLUGIN_CHAT_NEWUSER;
-extern const string ON_PLUGIN_CHAT_USERDISCONNECT;
-
+// install / remove
+extern const string ON_PLUGIN_INSTALL; // "OnPluginInstall"
+extern const string ON_PLUGIN_CLOSE; // "OnPluginClose"
+extern const string ON_PLUGIN_LIST_CHANGED; // "OnPluginListChanged"
+
+// connect / disconnect
+extern const string ON_PLUGIN_CONNECT; // "OnPluginConnect"
+extern const string ON_PLUGIN_DISCONNECT; // "OnPluginDisconnect"
+
+// saving
+extern const string ON_PLUGIN_SAVE_STATE; // "OnPluginSaveState"
+extern const string ON_PLUGIN_WORLD_SAVE; // "OnPluginWorldSave"
+
+// enable / disable
+extern const string ON_PLUGIN_ENABLE; // "OnPluginEnable"
+extern const string ON_PLUGIN_DISABLE; // "OnPluginDisable"
+
+// the focus
+extern const string ON_PLUGIN_GETFOCUS; // "OnPluginGetFocus"
+extern const string ON_PLUGIN_LOSEFOCUS; // "OnPluginLoseFocus"
+
+// capture stuff
+extern const string ON_PLUGIN_TRACE; // "OnPluginTrace"
+extern const string ON_PLUGIN_BROADCAST; // "OnPluginBroadcast"
+extern const string ON_PLUGIN_SCREENDRAW; // "OnPluginScreendraw"
+
+// sounds
+extern const string ON_PLUGIN_PLAYSOUND; // "OnPluginPlaySound"
+
+// stuff received/sent
+extern const string ON_PLUGIN_SEND; // "OnPluginSend"
+extern const string ON_PLUGIN_SENT; // "OnPluginSent"
+extern const string ON_PLUGIN_PARTIAL_LINE; // "OnPluginPartialLine"
+extern const string ON_PLUGIN_LINE_RECEIVED; // "OnPluginLineReceived"
+extern const string ON_PLUGIN_PACKET_RECEIVED; // "OnPluginPacketReceived"
+
+// telnet negotiation
+extern const string ON_PLUGIN_TELNET_OPTION; // "OnPluginTelnetOption"
+extern const string ON_PLUGIN_TELNET_REQUEST; // "OnPluginTelnetRequest"
+extern const string ON_PLUGIN_TELNET_SUBNEGOTIATION;// "OnPluginTelnetSubnegotiation"
+extern const string ON_PLUGIN_IAC_GA; // "OnPlugin_IAC_GA"
+
+// commands
+extern const string ON_PLUGIN_COMMAND; // "OnPluginCommand"
+extern const string ON_PLUGIN_COMMAND_ENTERED; // "OnPluginCommandEntered"
+extern const string ON_PLUGIN_COMMAND_CHANGED; // "OnPluginCommandChanged"
+extern const string ON_PLUGIN_TABCOMPLETE; // "OnPluginTabComplete"
+
+// resizing, ticking, moving, rhythm
+extern const string ON_PLUGIN_WORLD_OUTPUT_RESIZED; // "OnPluginWorldOutputResized"
+extern const string ON_PLUGIN_TICK; // "OnPluginTick"
+extern const string ON_PLUGIN_MOUSE_MOVED; // "OnPluginMouseMoved"
+
+// MXP stuff
+extern const string ON_PLUGIN_MXP_START; // "OnPluginMXPstart"
+extern const string ON_PLUGIN_MXP_STOP; // "OnPluginMXPstop"
+extern const string ON_PLUGIN_MXP_OPENTAG; // "OnPluginMXPopenTag"
+extern const string ON_PLUGIN_MXP_CLOSETAG; // "OnPluginMXPcloseTag"
+extern const string ON_PLUGIN_MXP_SETVARIABLE; // "OnPluginMXPsetVariable"
+extern const string ON_PLUGIN_MXP_SETENTITY; // "OnPluginMXPsetEntity"
+extern const string ON_PLUGIN_MXP_ERROR; // "OnPluginMXPerror"
+
+// chat stuff
+extern const string ON_PLUGIN_CHAT_ACCEPT; // "OnPluginChatAccept"
+extern const string ON_PLUGIN_CHAT_MESSAGE; // "OnPluginChatMessage"
+extern const string ON_PLUGIN_CHAT_MESSAGE_OUT; // "OnPluginChatMessageOut"
+extern const string ON_PLUGIN_CHAT_DISPLAY; // "OnPluginChatDisplay"
+extern const string ON_PLUGIN_CHAT_NEWUSER; // "OnPluginChatNewUser"
+extern const string ON_PLUGIN_CHAT_USERDISCONNECT; // "OnPluginChatUserDisconnect"
+
// table of callbacks
extern string PluginCallbacksNames [];
View
@@ -15,16 +15,17 @@ sqlite3ext.h
// These first few lines added by NJG
// version 3.7.2
-# pragma warning(disable : 4022) // pointer mismatch for actual parameter x
-# pragma warning(disable : 4047) // 'void ** ' differs in levels of indirection from 'long *'
-# pragma warning(disable : 4049) // terminating line number emission
-# pragma warning(disable : 4100) // unreferenced formal parameter
-# pragma warning(disable : 4115) // named type definition in parentheses
-# pragma warning(disable : 4127) // conditional expression is constant
-# pragma warning(disable : 4132) // const object should be initialized
-# pragma warning(disable : 4244) // conversion from 'int ' to 'char ', possible loss of data
-# pragma warning(disable : 4305) // truncation from 'int ' to 'short '
-# pragma warning(disable : 4761) // integral size mismatch in argument; conversion supplied
+# pragma warning (disable : 4022) // pointer mismatch for actual parameter x
+# pragma warning (disable : 4047) // 'void ** ' differs in levels of indirection from 'long *'
+# pragma warning (disable : 4049) // terminating line number emission
+# pragma warning (disable : 4100) // unreferenced formal parameter
+# pragma warning (disable : 4115) // named type definition in parentheses
+# pragma warning (disable : 4127) // conditional expression is constant
+# pragma warning (disable : 4132) // const object should be initialized
+# pragma warning (disable : 4244) // conversion from 'int ' to 'char ', possible loss of data
+# pragma warning (disable : 4305) // truncation from 'int ' to 'short '
+# pragma warning (disable : 4702) // unreachable code
+# pragma warning (disable : 4761) // integral size mismatch in argument; conversion supplied
#define SQLITE_SOUNDEX 1
#define SQLITE_ENABLE_FTS3 1
View
@@ -47,6 +47,7 @@ add:
4. Edit: zlib.h and at the start add the lines:
// pragmas added by Nick Gammon
-#pragma warning( disable : 4131) // uses old-style declarator
#pragma warning( disable : 4127) // conditional expression is constant
+#pragma warning( disable : 4131) // uses old-style declarator
#pragma warning( disable : 4244) // conversion from 'int' to 'unsigned short', possible loss of data
+#pragma warning( disable : 4702) // unreachable code

0 comments on commit 6256688

Please sign in to comment.