summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchatty1998-12-22 10:16:42 +0000
committerchatty1998-12-22 10:16:42 +0000
commit5203ffb335095327793b3b2d6bdadfb657fda52a (patch)
tree9715603633a9665d935a3ac5b7bb56d41c10509f
parentc86c53b326d5f35a6ad205720fcae9b1c0e1e8ff (diff)
downloadivy-c-5203ffb335095327793b3b2d6bdadfb657fda52a.zip
ivy-c-5203ffb335095327793b3b2d6bdadfb657fda52a.tar.gz
ivy-c-5203ffb335095327793b3b2d6bdadfb657fda52a.tar.bz2
ivy-c-5203ffb335095327793b3b2d6bdadfb657fda52a.tar.xz
Mise au propre
-rw-r--r--src/ivy.h13
-rw-r--r--src/ivychannel.h14
-rw-r--r--src/ivyloop.c15
-rw-r--r--src/ivyloop.h14
-rw-r--r--src/ivysocket.c16
-rw-r--r--src/ivysocket.h14
-rw-r--r--src/ivyxtloop.c14
-rw-r--r--src/ivyxtloop.h14
-rw-r--r--src/timer.c14
-rw-r--r--src/timer.h15
10 files changed, 142 insertions, 1 deletions
diff --git a/src/ivy.h b/src/ivy.h
index 7b450d0..911f830 100644
--- a/src/ivy.h
+++ b/src/ivy.h
@@ -1,3 +1,16 @@
+/*
+ *
+ * Ivy, C interface
+ *
+ * Copyright 1997-1998
+ * Centre d'Etudes de la Navigation Aerienne
+ *
+ * Main functions
+ *
+ * $Id$
+ *
+ */
+
#ifndef _IVY_H
#define _IVY_H
diff --git a/src/ivychannel.h b/src/ivychannel.h
index 3c893b4..b92ee93 100644
--- a/src/ivychannel.h
+++ b/src/ivychannel.h
@@ -1,3 +1,16 @@
+/*
+ *
+ * Ivy, C interface
+ *
+ * Copyright 1997-1998
+ * Centre d'Etudes de la Navigation Aerienne
+ *
+ * Basic I/O handling
+ *
+ * $Id$
+ *
+ */
+
#ifndef _IVYCHANNEL_H
#define _IVYCHANNEL_H
@@ -41,3 +54,4 @@ void BusSetChannelManagement( ChannelInit init_chan, ChannelSetUp setup_chan, Ch
#endif
#endif
+
diff --git a/src/ivyloop.c b/src/ivyloop.c
index e02800c..92f6301 100644
--- a/src/ivyloop.c
+++ b/src/ivyloop.c
@@ -1,3 +1,16 @@
+/*
+ *
+ * Ivy, C interface
+ *
+ * Copyright 1997-1998
+ * Centre d'Etudes de la Navigation Aerienne
+ *
+ * Main loop handling around select
+ *
+ * $Id$
+ *
+ */
+
#ifdef WIN32
#include <windows.h>
#endif
@@ -108,6 +121,7 @@ static void BusLoopChannelHandleRead(fd_set *current)
}
}
}
+
static void BusLoopChannelHandleExcpt(fd_set *current)
{
Channel channel,next;
@@ -147,6 +161,7 @@ void BusLoopChannelStop(void)
{
MainLoop = 0;
}
+
void BusLoopChannelMainLoop(void(*hook)(void))
{
diff --git a/src/ivyloop.h b/src/ivyloop.h
index 1eb7166..9dbb52d 100644
--- a/src/ivyloop.h
+++ b/src/ivyloop.h
@@ -1,3 +1,16 @@
+/*
+ *
+ * Ivy, C interface
+ *
+ * Copyright 1997-1998
+ * Centre d'Etudes de la Navigation Aerienne
+ *
+ * Main loop based on select
+ *
+ * $Id$
+ *
+ */
+
#ifndef _IVYLOOP_H
#define _IVYLOOP_H
@@ -37,3 +50,4 @@ extern void BusLoopChannelClose( Channel channel );
#endif
#endif
+
diff --git a/src/ivysocket.c b/src/ivysocket.c
index 131813d..c785de2 100644
--- a/src/ivysocket.c
+++ b/src/ivysocket.c
@@ -1,3 +1,16 @@
+/*
+ *
+ * Ivy, C interface
+ *
+ * Copyright 1997-1998
+ * Centre d'Etudes de la Navigation Aerienne
+ *
+ * Sockets
+ *
+ * $Id$
+ *
+ */
+
#ifdef WIN32
#include <windows.h>
#endif
@@ -142,6 +155,7 @@ static void HandleSocket( Channel channel, HANDLE fd, void *data)
client->ptr = client->buffer;
}
}
+
static void HandleServer(Channel channel, HANDLE fd, void *data)
{
Server server = ( Server ) data;
@@ -172,6 +186,7 @@ static void HandleServer(Channel channel, HANDLE fd, void *data)
client->data = (*server->create)( client );
}
+
Server SocketServer(unsigned short port,
void*(*create)(Client client),
void(*handle_delete)(Client client, void *data),
@@ -527,3 +542,4 @@ void SocketSendBroadcast( Client client, unsigned long host, unsigned short port
perror( "*** send ***");
} va_end ( ap );
}
+
diff --git a/src/ivysocket.h b/src/ivysocket.h
index e1dd1f4..4641bfa 100644
--- a/src/ivysocket.h
+++ b/src/ivysocket.h
@@ -1,3 +1,16 @@
+/*
+ *
+ * Ivy, C interface
+ *
+ * Copyright 1997-1998
+ * Centre d'Etudes de la Navigation Aerienne
+ *
+ * Sockets
+ *
+ * $Id$
+ *
+ */
+
#ifndef _IVYSOCKET_H
#define _IVYSOCKET_H
@@ -73,3 +86,4 @@ extern void SocketSendBroadcast( Client client, unsigned long host, unsigned sho
#endif
#endif
+
diff --git a/src/ivyxtloop.c b/src/ivyxtloop.c
index e2620aa..3a17b61 100644
--- a/src/ivyxtloop.c
+++ b/src/ivyxtloop.c
@@ -1,3 +1,17 @@
+/*
+ *
+ * Ivy, C interface
+ *
+ * Copyright 1997-1998
+ * Centre d'Etudes de la Navigation Aerienne
+ *
+ * Main loop based on X Toolkit
+ *
+ * $Id$
+ *
+ */
+
+
#ifdef WIN32
#include <windows.h>
#endif
diff --git a/src/ivyxtloop.h b/src/ivyxtloop.h
index 17e053f..0784714 100644
--- a/src/ivyxtloop.h
+++ b/src/ivyxtloop.h
@@ -1,3 +1,16 @@
+/*
+ *
+ * Ivy, C interface
+ *
+ * Copyright 1997-1998
+ * Centre d'Etudes de la Navigation Aerienne
+ *
+ * Main loop based on X Toolkit
+ *
+ * $Id$
+ *
+ */
+
#ifndef _IVYXTLOOP_H
#define _IVYXTLOOP_H
@@ -38,3 +51,4 @@ extern void BusXtChannelAppContext( XtAppContext cntx );
#endif
#endif
+
diff --git a/src/timer.c b/src/timer.c
index dfa10bd..7d23b43 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -1,3 +1,17 @@
+/*
+ *
+ * Ivy, C interface
+ *
+ * Copyright 1997-1998
+ * Centre d'Etudes de la Navigation Aerienne
+ *
+ * Timers used in select based main loop
+ *
+ * $Id$
+ *
+ */
+
+
/* Module de gestion des timers autour d'un select */
#include <stdio.h>
#include <sys/types.h>
diff --git a/src/timer.h b/src/timer.h
index 7aa425f..b36838c 100644
--- a/src/timer.h
+++ b/src/timer.h
@@ -1,9 +1,22 @@
+/*
+ *
+ * Ivy, C interface
+ *
+ * Copyright 1997-1998
+ * Centre d'Etudes de la Navigation Aerienne
+ *
+ * Timers for select-based main loop
+ *
+ * $Id$
+ *
+ */
+
/* Module de gestion des timers autour d'un select */
typedef struct _timer *TimerId;
typedef void (*TimerCb)( TimerId id , void *user_data, unsigned long delta );
-/* API le temp est en milli secondes */
+/* API le temps est en millisecondes */
#define TIMER_LOOP -1 /* timer en boucle infinie */
TimerId TimerRepeatAfter( int count, long time, TimerCb cb, void *user_data );