[chocolate-doom] 16/79: Rename i_net_module -> net_sdl_module. Fix the AddrToString method.

Jonathan Dowland jmtd at moszumanska.debian.org
Mon Jan 30 15:07:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

jmtd pushed a commit to annotated tag chocolate-doom-0.1.3
in repository chocolate-doom.

commit 693828adb286b6c1ec6d0b90f49c6947e6c6dd6e
Author: Simon Howard <fraggle at gmail.com>
Date:   Mon Jan 2 20:11:49 2006 +0000

    Rename i_net_module -> net_sdl_module. Fix the AddrToString method.
    
    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 244
---
 src/net_sdl.c | 16 +++++++++-------
 src/net_sdl.h |  7 +++++--
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/net_sdl.c b/src/net_sdl.c
index c202673..98730dd 100644
--- a/src/net_sdl.c
+++ b/src/net_sdl.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: net_sdl.c 231 2005-12-29 17:47:47Z fraggle $
+// $Id: net_sdl.c 244 2006-01-02 20:11:49Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -21,6 +21,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.3  2006/01/02 20:11:49  fraggle
+// Rename i_net_module -> net_sdl_module.  Fix the AddrToString method.
+//
 // Revision 1.2  2005/12/29 17:47:47  fraggle
 // Automatically initialise the address table
 //
@@ -37,7 +40,6 @@
 #include <string.h>
 #include <stdio.h>
 
-#include "i_net.h"
 #include "i_system.h"
 #include "m_argv.h"
 #include "net_defs.h"
@@ -141,7 +143,7 @@ static net_addr_t *NET_SDL_FindAddress(IPaddress *addr)
 
     new_entry->sdl_addr = *addr;
     new_entry->net_addr.handle = &new_entry->sdl_addr;
-    new_entry->net_addr.module = &i_net_module;
+    new_entry->net_addr.module = &net_sdl_module;
 
     addr_table[empty_entry] = new_entry;
 
@@ -258,10 +260,10 @@ void NET_SDL_AddrToString(net_addr_t *addr, char *buffer, int buffer_len)
     
     snprintf(buffer, buffer_len, 
              "%i.%i.%i.%i",
-             (ip->host >> 24) & 0xff,
-             (ip->host >> 16) & 0xff,
+             ip->host & 0xff,
              (ip->host >> 8) & 0xff,
-             ip->host & 0xff);
+             (ip->host >> 16) & 0xff,
+             (ip->host >> 24) & 0xff);
 }
 
 net_addr_t *NET_SDL_ResolveAddress(char *address)
@@ -280,7 +282,7 @@ net_addr_t *NET_SDL_ResolveAddress(char *address)
 
 // Complete module
 
-net_module_t i_net_module =
+net_module_t net_sdl_module =
 {
     NET_SDL_InitClient,
     NET_SDL_InitServer,
diff --git a/src/net_sdl.h b/src/net_sdl.h
index edc3c00..4343096 100644
--- a/src/net_sdl.h
+++ b/src/net_sdl.h
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*- 
 //-----------------------------------------------------------------------------
 //
-// $Id: net_sdl.h 229 2005-10-30 19:56:15Z fraggle $
+// $Id: net_sdl.h 244 2006-01-02 20:11:49Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -21,6 +21,9 @@
 // 02111-1307, USA.
 //
 // $Log$
+// Revision 1.2  2006/01/02 20:11:49  fraggle
+// Rename i_net_module -> net_sdl_module.  Fix the AddrToString method.
+//
 // Revision 1.1  2005/10/30 19:56:15  fraggle
 // Add foundation code for the new networking system
 //
@@ -35,7 +38,7 @@
 
 #include "net_defs.h"
 
-extern net_module_t i_net_module;
+extern net_module_t net_sdl_module;
 
 #endif /* #ifndef NET_SDL_H */
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/chocolate-doom.git



More information about the Pkg-games-commits mailing list