[enet-cvs] CVS: enet Makefile,1.2,1.3 api.txt,1.1,1.2 design.txt,1.1,1.2 host.c,1.6,1.7 list.c,1.1,1.2 memory.c,1.1,1.2 packet.c,1.2,1.3 peer.c,1.7,1.8 protocol.c,1.9,1.10 unix.c,1.6,1.7 win32.c,1.5,1.6

Lee Salzman enet-discuss@lists.puremagic.com
Fri, 7 Mar 2003 18:49:15 -0700


Update of /home/enet/cvsroot/enet
In directory sferik:/tmp/cvs-serv6604/enet

Modified Files:
	Makefile api.txt design.txt host.c list.c memory.c packet.c 
	peer.c protocol.c unix.c win32.c 
Log Message:
Fixes to includes.


Index: Makefile
===================================================================
RCS file: /home/enet/cvsroot/enet/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makefile	2002/10/28 19:05:59	1.2
+++ Makefile	2003/03/08 01:49:13	1.3
@@ -1,6 +1,6 @@
 CC=gcc
 COPTFLAGS=-Wall -pedantic -O3 -fomit-frame-pointer
-CFLAGS=$(COPTFLAGS) -Iinclude -DHAS_GETHOSTBYNAME_R -DHAS_GETHOSTBYADDR_R -DHAS_POLL -DHAS_FCNTL -DHAS_MSGHDR_FLAGS
+CFLAGS=$(COPTFLAGS) -Iinclude/enet -DHAS_GETHOSTBYNAME_R -DHAS_GETHOSTBYADDR_R -DHAS_POLL -DHAS_FCNTL -DHAS_MSGHDR_FLAGS
 OBJS= \
 	host.o \
 	list.o \

Index: api.txt
===================================================================
RCS file: /home/enet/cvsroot/enet/api.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- api.txt	2003/03/07 20:13:57	1.1
+++ api.txt	2003/03/08 01:49:13	1.2
@@ -1,13 +1,13 @@
 <enet/enet.h> - The file that should be included to use the ENet API.
 
-uint8 - unsigned 8 bit integer
-uint16 - unsigned 16 bit integer
-uint32 - unsigned 32 bit integer
+enet_uint8 - unsigned 8 bit integer
+enet_uint16 - unsigned 16 bit integer
+enet_uint32 - unsigned 32 bit integer
 
 typedef struct
 {  
-  uint32 host; 
-  uint16 port; 
+  enet_uint32 host; 
+  enet_uint16 port; 
 } ENetAddress;
       
   Portable internet address structure. The host must be specified in network 
@@ -16,8 +16,8 @@
 
 typedef struct
 {
-  uint32 flags;
-  uint8 * data;
+  enet_uint32 flags;
+  enet_uint8 * data;
   size_t dataLength;
 } ENetPacket;
 
@@ -37,10 +37,10 @@
   ENetAddress address;
   void * data;
   size_t channelCount;
-  uint32 incomingBandwidth;
-  uint32 outgoingBandwidth;
-  uint32 roundTripTime;
-  uint32 packetLoss;
+  enet_uint32 incomingBandwidth;
+  enet_uint32 outgoingBandwidth;
+  enet_uint32 roundTripTime;
+  enet_uint32 packetLoss;
 } ENetPeer;
 
   An ENet peer which data packets may be sent or received from. No fields should be
@@ -67,7 +67,7 @@
 {
    ENetEventType        type;
    ENetPeer *           peer;
-   uint8                channelID;
+   enet_uint8                channelID;
    ENetPacket *         packet;
 } ENetEvent;
 
@@ -97,8 +97,8 @@
 typedef struct
 {
   ENetAddress address;
-  uint32 incomingBandwidth;
-  uint32 outgoingBandwidth;
+  enet_uint32 incomingBandwidth;
+  enet_uint32 outgoingBandwidth;
   ENetPeer * peers;
   size_t peerCount;
 } ENetHost;
@@ -123,12 +123,12 @@
   Macros that convert from network byte-order (big endian) to host 
 byte-order for unsigned integers of 8 bits, 16 bits, and 32 bits repectively.
 
-uint32 enet_time_get (void);
+enet_uint32 enet_time_get (void);
 
   Returns the wall-time in milliseconds. Its initial value is unspecified unless
 otherwise set.
 
-void enet_time_set (uint32);
+void enet_time_set (enet_uint32);
 
   Sets the current wall-time in milliseconds.
 
@@ -155,7 +155,7 @@
 hostName and nameLength. The host name is always null-delimited and will
 not exceed nameLength in length. Returns 0 on success and -1 on failure.
 
-ENetPacket * enet_packet_create (const void * dataContents, size_t dataLength, uint32 flags);
+ENetPacket * enet_packet_create (const void * dataContents, size_t dataLength, enet_uint32 flags);
 
   Creates a packet that may be sent to a peer. The dataContents parameter
 specifies the initial contents of the packet's data; the packet's data will
@@ -173,7 +173,7 @@
   Attempts to resize the data in the packet to the length specified in the
 dataLength parameter. Returns 0 on success and -1 on failure.
 
-ENetHost * enet_host_create (const ENetAddress * address, size_t peerCount, uint32 incomingBandwidth, uint32 outgoingBandwidth);
+ENetHost * enet_host_create (const ENetAddress * address, size_t peerCount, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth);
 
   Creates a host for communicating with peers. The address parameter specifies 
 the address at which other peers may connect to this host; if the address parameter
@@ -203,7 +203,7 @@
 on failure. The peer returned will have not completed the connection until enet_host_service
 notifies of an ENET_EVENT_TYPE_CONNECT event for the peer.
 
-int enet_host_service (ENetHost * host, ENetEvent * event, uint32 timeout);
+int enet_host_service (ENetHost * host, ENetEvent * event, enet_uint32 timeout);
 
   Waits for events on the host specified by the host parameters and shuttles packets 
 between the host and its peers. The event parameter specifies an event structure
@@ -219,24 +219,24 @@
 the designated peers. This function need only be used in circumstances where one
 wishes to send queued packets earlier than in a call to enet_host_service.
 
-void enet_host_broadcast (ENetHost * host, uint8 channelID, ENetPacket * packet);
+void enet_host_broadcast (ENetHost * host, enet_uint8 channelID, ENetPacket * packet);
 
   Queues a packet to be sent to all peers on the host specified in the host parameter
 over the channel number identified by the channelID parameter.
 
-void enet_host_bandwidth_limit (ENetHost * host, uint32 incomingBandwidth, uint32 outgoingBandwidth);
+void enet_host_bandwidth_limit (ENetHost * host, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth);
 
   Adjusts the bandwidth limits of the host specified in the host parameter. The
 incomingBandwidth and outgoingBandwidth parameters are as specified in a call to 
 enet_host_create.
 
-int enet_peer_send (ENetPeer * peer, uint8 channelID, ENetPacket * packet);
+int enet_peer_send (ENetPeer * peer, enet_uint8 channelID, ENetPacket * packet);
 
   Queues a packet to be sent to the peer specified by the peer parameter over the
 channel number identified by the channelID parameter. Returns 0 on success and -1
 on failure.
 
-ENetPacket * enet_peer_receive (ENetPeer * peer, uint8 channelID);
+ENetPacket * enet_peer_receive (ENetPeer * peer, enet_uint8 channelID);
 
   Attempts to dequeue any incoming queued packets on the peer specified by the peer
 parameter on the channel number identified by the channelID parameter. Returns a packet
@@ -261,7 +261,7 @@
 ENET_EVENT_DISCONNECT event will be generated by enet_host_service once the
 disconnection is complete.
 
-void enet_peer_throttle_configure (ENetPeer * peer, uint32 interval, uint32 acceleration, uint32 deceleration);
+void enet_peer_throttle_configure (ENetPeer * peer, enet_uint32 interval, enet_uint32 acceleration, enet_uint32 deceleration);
 
   Configures throttle parameter for the peer specified by the peer parameter.
 Unreliable packets are dropped by ENet in response to the varying conditions of

Index: design.txt
===================================================================
RCS file: /home/enet/cvsroot/enet/design.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- design.txt	2003/03/07 21:38:42	1.1
+++ design.txt	2003/03/08 01:49:13	1.2
@@ -34,7 +34,7 @@
 
 * Sequencing
     
-    Rather than a a single byte stream that complicates the delineation 
+    Rather than a single byte stream that complicates the delineation 
 of packets, ENet presents connections as multiple, properly sequenced packet
 streams that simplify the transfer of various types of data.
 

Index: host.c
===================================================================
RCS file: /home/enet/cvsroot/enet/host.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- host.c	2003/03/07 22:10:08	1.6
+++ host.c	2003/03/08 01:49:13	1.7
@@ -1,5 +1,5 @@
-#include <enet/memory.h>
-#include <enet/enet.h>
+#include "memory.h"
+#include "enet.h"
 
 ENetHost *
 enet_host_create (const ENetAddress * address, size_t peerCount, enet_uint32 incomingBandwidth, enet_uint32 outgoingBandwidth)

Index: list.c
===================================================================
RCS file: /home/enet/cvsroot/enet/list.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- list.c	2002/02/10 21:27:03	1.1
+++ list.c	2003/03/08 01:49:13	1.2
@@ -1,4 +1,4 @@
-#include <enet/list.h>
+#include "list.h"
 
 void
 enet_list_clear (ENetList * list)

Index: memory.c
===================================================================
RCS file: /home/enet/cvsroot/enet/memory.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- memory.c	2002/02/10 21:27:03	1.1
+++ memory.c	2003/03/08 01:49:13	1.2
@@ -1,5 +1,5 @@
-#include <enet/types.h>
-#include <enet/memory.h>
+#include "types.h"
+#include "memory.h"
 
 void *
 enet_malloc (size_t size)

Index: packet.c
===================================================================
RCS file: /home/enet/cvsroot/enet/packet.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- packet.c	2003/03/07 22:10:08	1.2
+++ packet.c	2003/03/08 01:49:13	1.3
@@ -1,6 +1,6 @@
 #include <string.h>
-#include <enet/memory.h>
-#include <enet/enet.h>
+#include "memory.h"
+#include "enet.h"
 
 ENetPacket *
 enet_packet_create (const void * data, size_t dataLength, enet_uint32 flags)

Index: peer.c
===================================================================
RCS file: /home/enet/cvsroot/enet/peer.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- peer.c	2003/03/07 22:10:08	1.7
+++ peer.c	2003/03/08 01:49:13	1.8
@@ -1,5 +1,5 @@
-#include <enet/memory.h>
-#include <enet/enet.h>
+#include "memory.h"
+#include "enet.h"
 
 void
 enet_peer_throttle_configure (ENetPeer * peer, enet_uint32 interval, enet_uint32 acceleration, enet_uint32 deceleration)

Index: protocol.c
===================================================================
RCS file: /home/enet/cvsroot/enet/protocol.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- protocol.c	2003/03/07 22:10:08	1.9
+++ protocol.c	2003/03/08 01:49:13	1.10
@@ -1,7 +1,7 @@
 #include <stdio.h>
-#include <enet/memory.h>
-#include <enet/time.h>
-#include <enet/enet.h>
+#include "memory.h"
+#include "time.h"
+#include "enet.h"
 
 static enet_uint32 timeCurrent;
 

Index: unix.c
===================================================================
RCS file: /home/enet/cvsroot/enet/unix.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- unix.c	2003/03/07 22:10:08	1.6
+++ unix.c	2003/03/08 01:49:13	1.7
@@ -9,7 +9,7 @@
 #include <string.h>
 #include <errno.h>
 #include <time.h>
-#include <enet/enet.h>
+#include "enet.h"
 
 #ifdef HAS_FCNTL
 #include <fcntl.h>

Index: win32.c
===================================================================
RCS file: /home/enet/cvsroot/enet/win32.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- win32.c	2003/03/07 22:10:08	1.5
+++ win32.c	2003/03/08 01:49:13	1.6
@@ -1,7 +1,7 @@
 #ifdef WIN32
 
 #include <time.h>
-#include <enet/enet.h>
+#include "enet.h"
 
 static enet_uint32 timeBase = 0;