You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2004 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(7) |
Nov
|
Dec
|
| 2005 |
Jan
(2) |
Feb
|
Mar
|
Apr
(12) |
May
(18) |
Jun
(27) |
Jul
(6) |
Aug
|
Sep
(6) |
Oct
(10) |
Nov
|
Dec
(6) |
|
From: Kevin L. M. <kl...@us...> - 2005-12-29 04:37:08
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-12-29 04:36:59 UTC
Modified files:
ChangeLog sock.h
Log message:
oops, typod SHUT_WR
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.64 event/ChangeLog:1.65
--- event/ChangeLog:1.64 Wed Dec 28 20:33:58 2005
+++ event/ChangeLog Wed Dec 28 20:36:49 2005
@@ -1,5 +1,7 @@
2005-12-28 Kevin L. Mitchell <kl...@mi...>
+ * sock.h (SHUT_WR): fix another minor typo
+
* tim.h: tim_p parameter is an out-only parameter
* sockaddr_export.c: add const qualifiers in appropriate places
Index: event/sock.h
diff -u event/sock.h:1.16 event/sock.h:1.17
--- event/sock.h:1.16 Wed Dec 28 20:33:58 2005
+++ event/sock.h Wed Dec 28 20:36:49 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sock.h,v 1.16 2005/12/29 04:33:58 klmitch Exp $
+** @(#)$Id: sock.h,v 1.17 2005/12/29 04:36:49 klmitch Exp $
*/
#ifndef __include_event_sock_h__
#define __include_event_sock_h__
@@ -62,7 +62,7 @@
* closed--further transmissions will be disallowed.
*/
#ifndef SHUT_WR
-#define SHUT_RD 1
+#define SHUT_WR 1
#endif
/** \brief Shut down socket reads and writes.
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-12-29 04:34:16
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-12-29 04:34:08 UTC
Modified files:
ChangeLog engines.h event.h event_int.h sig.h sock.h
sockaddr_atop.c sockaddr_export.c tim.h
Log message:
fix some minor typos; add const qualifiers to sockaddr_atop() and
sockaddr_export() and supporting functions; document socket_*() functions;
add socket_events() function; make sure SHUT_RD, SHUT_WR, and SHUT_RDWR are
defined; document socket flags and flag manipulation functions; put flag
manipulation functions in appropriate places
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.63 event/ChangeLog:1.64
--- event/ChangeLog:1.63 Fri Dec 23 20:24:25 2005
+++ event/ChangeLog Wed Dec 28 20:33:58 2005
@@ -1,3 +1,33 @@
+2005-12-28 Kevin L. Mitchell <kl...@mi...>
+
+ * tim.h: tim_p parameter is an out-only parameter
+
+ * sockaddr_export.c: add const qualifiers in appropriate places
+
+ * sockaddr_atop.c: add const qualifiers in appropriate places
+
+ * sock.h: make sure SHUT_RD, SHUT_WR, and SHUT_RDWR are defined;
+ document EV_SOCK_READ, EV_SOCK_WRITE, and EV_SOCK_EVMASK; clean up
+ and document _so_decev() and _so_encev() macros; document
+ _so_set() and _so_clr() macros; remove _so_*_set() and _so_*_clr()
+ macros to more appropriate places (engines.h and event_int.h);
+ document other added macros; document EV_SOCK_TYPE, EV_SOCK_STATE,
+ EV_SOCK_LOCAL, and EV_SOCK_REMOTE flags; add const qualifiers in
+ sockaddr_atop() and sockaddr_export() declarations; document
+ socket_*() functions; add const qualifiers in appropriate places;
+ add ev_sockattr_t * arguments; add socket_events() declaration and
+ documentation
+
+ * sig.h: sig_p parameter is an out-only parameter
+
+ * event_int.h: add so_uevents_set(), so_uevents_clr(),
+ so_blocked_set(), so_blocked_clr(), so_closed_set(), and
+ so_closed_clr() macros
+
+ * event.h: fix an incredibly minor typo
+
+ * engines.h: add so_eevents_set() and so_eevents_clr() macros
+
2005-12-23 Kevin L. Mitchell <kl...@mi...>
* sock.h: beginning to rough in the basic socket interface
Index: event/engines.h
diff -u event/engines.h:1.17 event/engines.h:1.18
--- event/engines.h:1.17 Sat Dec 17 16:15:11 2005
+++ event/engines.h Wed Dec 28 20:33:58 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: engines.h,v 1.17 2005/12/18 00:15:11 klmitch Exp $
+** @(#)$Id: engines.h,v 1.18 2005/12/29 04:33:58 klmitch Exp $
*/
#ifndef __include_event_engines_h__
#define __include_event_engines_h__
@@ -707,6 +707,28 @@
#define eng_timdata_set(eng, data) \
((eng)->eng_timer.eti_data = (data))
+/** \brief Set engine socket event flags.
+ *
+ * This macro is used to set the engine event flags on a socket.
+ *
+ * \param[in,out] sock A pointer to an #ev_sock_t.
+ * \param[in] flags The flags to set on the socket.
+ */
+#define so_eevents_set(sock, flags) \
+ _so_set((sock), _so_encev((flags), \
+ _EV_SOCK_EEVENTS))
+
+/** \brief Clear engine socket event flags.
+ *
+ * This macro is used to clear the engine event flags on a socket.
+ *
+ * \param[in,out] sock A pointer to an #ev_sock_t.
+ * \param[in] flags The flags to clear on the socket.
+ */
+#define so_eevents_clr(sock, flags) \
+ _so_clr((sock), _so_encev((flags), \
+ _EV_SOCK_EEVENTS))
+
/** \brief Register an engine.
*
* This is used to register an engine descriptor with the library. It
Index: event/event.h
diff -u event/event.h:1.29 event/event.h:1.30
--- event/event.h:1.29 Sat Dec 17 16:15:11 2005
+++ event/event.h Wed Dec 28 20:33:58 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event.h,v 1.29 2005/12/18 00:15:11 klmitch Exp $
+** @(#)$Id: event.h,v 1.30 2005/12/29 04:33:58 klmitch Exp $
*/
#ifndef __include_event_event_h__
#define __include_event_event_h__
@@ -616,7 +616,7 @@
* This flag is used by generator handlers to indicate that a given
* generator is in the process of being deleted.
*/
-#define EV_GEN_DELETED 0X00000002
+#define EV_GEN_DELETED 0x00000002
/** \internal
* \brief Generator header.
Index: event/event_int.h
diff -u event/event_int.h:1.33 event/event_int.h:1.34
--- event/event_int.h:1.33 Sat Dec 17 16:15:11 2005
+++ event/event_int.h Wed Dec 28 20:33:58 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_int.h,v 1.33 2005/12/18 00:15:11 klmitch Exp $
+** @(#)$Id: event_int.h,v 1.34 2005/12/29 04:33:58 klmitch Exp $
*/
#ifndef __include_event_int_h__
#define __include_event_int_h__
@@ -706,6 +706,80 @@
} while (0)
/** \internal
+ * \brief Set user socket event flags.
+ *
+ * This macro is used to set the user event flags on a socket.
+ *
+ * \param[in,out] sock A pointer to an #ev_sock_t.
+ * \param[in] flags The flags to set on the socket.
+ */
+#define so_uevents_set(sock, flags) \
+ _so_set((sock), _so_encev((flags), \
+ _EV_SOCK_UEVENTS))
+
+/** \internal
+ * \brief Clear user socket event flags.
+ *
+ * This macro is used to clear the user event flags on a socket.
+ *
+ * \param[in,out] sock A pointer to an #ev_sock_t.
+ * \param[in] flags The flags to clear on the socket.
+ */
+#define so_uevents_clr(sock, flags) \
+ _so_clr((sock), _so_encev((flags), \
+ _EV_SOCK_UEVENTS))
+
+/** \internal
+ * \brief Set socket blocked flags.
+ *
+ * This macro is used to set the blocked flags on a socket.
+ *
+ * \param[in,out] sock A pointer to an #ev_sock_t.
+ * \param[in] flags The flags to set on the socket.
+ */
+#define so_blocked_set(sock, flags) \
+ _so_set((sock), _so_encev((flags), \
+ _EV_SOCK_BLOCKED))
+
+/** \internal
+ * \brief Clear socket blocked flags.
+ *
+ * This macro is used to clear the blocked flags on a socket.
+ *
+ * \param[in,out] sock A pointer to an #ev_sock_t.
+ * \param[in] flags The flags to clear on the socket.
+ */
+#define so_blocked_clr(sock, flags) \
+ _so_clr((sock), _so_encev((flags), \
+ _EV_SOCK_BLOCKED))
+
+/** \internal
+ * \brief Set socket closed flags.
+ *
+ * This macro is used to set the closed flags on a socket.
+ *
+ * \param[in,out] sock A pointer to an #ev_sock_t.
+ * \param[in] flags The flags to set on the socket.
+ */
+#define so_closed_set(sock, flags) \
+ _so_set((sock), _so_encev((flags), \
+ _EV_SOCK_CLOSED))
+
+/** \internal
+ * \brief Clear socket closed flags.
+ *
+ * This macro is used to clear the closed flags on a socket. This
+ * macro is prvided solely for completeness; the closed flags should
+ * probably never be cleared.
+ *
+ * \param[in,out] sock A pointer to an #ev_sock_t.
+ * \param[in] flags The flags to clear on the socket.
+ */
+#define so_closed_clr(sock, flags) \
+ _so_clr((sock), _so_encev((flags), \
+ _EV_SOCK_CLOSED))
+
+/** \internal
* \brief Log debugging messages.
*
* This function is used when the ev_log() macro is insufficient. It
Index: event/sig.h
diff -u event/sig.h:1.8 event/sig.h:1.9
--- event/sig.h:1.8 Sat Dec 17 16:15:11 2005
+++ event/sig.h Wed Dec 28 20:33:58 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sig.h,v 1.8 2005/12/18 00:15:11 klmitch Exp $
+** @(#)$Id: sig.h,v 1.9 2005/12/29 04:33:58 klmitch Exp $
*/
#ifndef __include_event_sig_h__
#define __include_event_sig_h__
@@ -111,7 +111,7 @@
* \param[in] data Any application-specific data that
* must be passed to the callback
* function.
- * \param[in,out] sig_p A pointer to a pointer to an
+ * \param[out] sig_p A pointer to a pointer to an
* #ev_sig_t. A \c NULL value may be
* passed if the application does not
* need a pointer to the signal
Index: event/sock.h
diff -u event/sock.h:1.15 event/sock.h:1.16
--- event/sock.h:1.15 Fri Dec 23 20:24:25 2005
+++ event/sock.h Wed Dec 28 20:33:58 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sock.h,v 1.15 2005/12/24 04:24:25 klmitch Exp $
+** @(#)$Id: sock.h,v 1.16 2005/12/29 04:33:58 klmitch Exp $
*/
#ifndef __include_event_sock_h__
#define __include_event_sock_h__
@@ -45,6 +45,38 @@
EV_BEGIN_C_DECLS
+/** \brief Shut down socket reads.
+ *
+ * This value, when passed to socket_shutdown() as the \p how
+ * parameter, will cause the read end of the socket to be
+ * closed--further receptions will be disallowed.
+ */
+#ifndef SHUT_RD
+#define SHUT_RD 0
+#endif
+
+/** \brief Shut down socket writes.
+ *
+ * This value, when passed to socket_shutdown() as the \p how
+ * parameter, will cause the write end of the socket to be
+ * closed--further transmissions will be disallowed.
+ */
+#ifndef SHUT_WR
+#define SHUT_RD 1
+#endif
+
+/** \brief Shut down socket reads and writes.
+ *
+ * This value, when passed to socket_shutdown() as the \p how
+ * parameter, will cause both the read and write ends of the socket to
+ * be closed--further receptions and transmissions will be
+ * disallowed. This is functionally equivalent to calling
+ * socket_close().
+ */
+#ifndef SHUT_RDWR
+#define SHUT_RDWR 2
+#endif
+
/** \brief Socket address buffer size (IPv4).
*
* This macro gives the size, in bytes, of the buffer necessary to
@@ -717,35 +749,197 @@
*/
#define EV_SOCK_MAGIC 0x60be0671
+/** \brief Socket readable event flag.
+ *
+ * This flag is used to indicate interest in a readable indication on
+ * a socket.
+ */
#define EV_SOCK_READ 0x00000001
+
+/** \brief Socket writable event flag.
+ *
+ * This flag is used to indicate interest in a writable indication on
+ * a socket.
+ */
#define EV_SOCK_WRITE 0x00000002
+
+/** \brief Socket event mask.
+ *
+ * This mask is used to select the event interest flags.
+ */
#define EV_SOCK_EVMASK (EV_SOCK_READ | EV_SOCK_WRITE)
-#define _so_decev(flags, shft) (((flags) >> (shft)) & EV_SOCK_EVMASK)
-#define _so_encev(flags, shft) (((flags) & EV_SOCK_EVMASK) << (shft))
+/** \internal
+ * \brief Decode event flag set.
+ *
+ * This macro is used to retrieve the appropriate event flags from the
+ * \p flags parameter. The \p shift parameter should be one of
+ * #_EV_SOCK_UEVENTS, #_EV_SOCK_EEVENTS, #_EV_SOCK_BLOCKED, or
+ * #_EV_SOCK_CLOSED, to indicate which flag set is desired.
+ *
+ * \param[in] flags The flags to be decoded.
+ * \param[in] shift A bit-wise shift to apply to recover
+ * the desired flags.
+ *
+ * \return The bit-wise OR of #EV_SOCK_READ and #EV_SOCK_WRITE
+ * from the desired flag set.
+ */
+#define _so_decev(flags, shift) (((flags) >> (shift)) & EV_SOCK_EVMASK)
+
+/** \internal
+ * \brief Encode event flag set.
+ *
+ * This macro is used to encode \p flags as an event flag set,
+ * selected by the \p shift parameter. The \p shift parameter should
+ * be one of #_EV_SOCK_UEVENTS, #_EV_SOCK_EEVENTS, #_EV_SOCK_BLOCKED,
+ * or #_EV_SOCK_CLOSED, to indicate which flag set is desired.
+ *
+ * \param[in] flags The flags to be encoded. Should be a
+ * bit-wise OR of #EV_SOCK_READ and
+ * #EV_SOCK_WRITE.
+ * \param[in] shift A bit-wise shift to apply to encode
+ * the desired flags.
+ *
+ * \return The encoded flag set.
+ */
+#define _so_encev(flags, shift) (((flags) & EV_SOCK_EVMASK) << (shift))
+
+/** \internal
+ * \brief Set event flags.
+ *
+ * This macro is used internally to set the \p flags for the socket.
+ *
+ * \param[in,out] sock A pointer to an #ev_sock_t.
+ * \param[in] flags The flags to set.
+ */
#define _so_set(sock, flags) ((sock)->so_flags |= (flags))
+
+/** \internal
+ * \brief Clear event flags.
+ *
+ * This macro is used internally to clear the \p flags for the socket.
+ *
+ * \param[in,out] sock A pointer to an #ev_sock_t.
+ * \param[in] flags The flags to clear.
+ */
#define _so_clr(sock, flags) ((sock)->so_flags &= ~(flags))
+/** \internal
+ * \brief User events shift.
+ *
+ * This macro specifies the shift to apply to retrieve the user event
+ * set from the socket flags.
+ */
#define _EV_SOCK_UEVENTS 0
-#define so_uevents(sock) _so_decev((sock)->so_flags, _EV_SOCK_UEVENTS)
-#define _so_uevents_set(s, fl) _so_set((s), _so_encev((fl), _EV_SOCK_UEVENTS))
-#define _so_uevents_clr(s, fl) _so_clr((s), _so_encev((fl), _EV_SOCK_UEVENTS))
+
+/** \internal
+ * \brief Engine events shift.
+ *
+ * This macro specifies the shift to apply to retrieve the engine
+ * event set from the socket flags.
+ */
#define _EV_SOCK_EEVENTS 2
-#define so_eevents(sock) _so_decev((sock)->so_flags, _EV_SOCK_EEVENTS)
-#define _so_eevents_set(s, fl) _so_set((s), _so_encev((fl), _EV_SOCK_EEVENTS))
-#define _so_eevents_clr(s, fl) _so_clr((s), _so_encev((fl), _EV_SOCK_EEVENTS))
+
+/** \internal
+ * \brief Blocked flags shift.
+ *
+ * This macro specifies the shift to apply to retrieve the flag set
+ * specifying which socket directions are blocked.
+ */
#define _EV_SOCK_BLOCKED 4
-#define so_blocked(sock) _so_decev((sock)->so_flags, _EV_SOCK_BLOCKED)
-#define _so_blocked_set(s, fl) _so_set((s), _so_encev((fl), _EV_SOCK_BLOCKED))
-#define _so_blocked_clr(s, fl) _so_clr((s), _so_encev((fl), _EV_SOCK_BLOCKED))
+
+/** \internal
+ * \brief Closed flags shift.
+ *
+ * This macro specifies the shift to apply to retrieve the flag set
+ * specifying which socket directions are closed.
+ */
#define _EV_SOCK_CLOSED 6
+
+/** \brief User events.
+ *
+ * This macro retrieves the user event set from the socket.
+ *
+ * \param[in] sock A pointer to the #ev_sock_t from which
+ * to retrieve the user event set.
+ *
+ * \return The user event set--a bit-wise OR of #EV_SOCK_READ and
+ * #EV_SOCK_WRITE.
+ */
+#define so_uevents(sock) _so_decev((sock)->so_flags, _EV_SOCK_UEVENTS)
+
+/** \brief Engine events.
+ *
+ * This macro retrieves the engine event set from the socket.
+ *
+ * \param[in] sock A pointer to the #ev_sock_t from which
+ * to retrieve the engine event set.
+ *
+ * \return The engine event set--a bit-wise OR of #EV_SOCK_READ
+ * and #EV_SOCK_WRITE.
+ */
+#define so_eevents(sock) _so_decev((sock)->so_flags, _EV_SOCK_EEVENTS)
+
+/** \brief Blocked flags.
+ *
+ * This macro retrieves the blocked flag set from the socket.
+ *
+ * \param[in] sock A pointer to the #ev_sock_t from which
+ * to retrieve the blocked flag set.
+ *
+ * \return The blocked flag set--a bit-wise OR of #EV_SOCK_READ
+ * and #EV_SOCK_WRITE.
+ */
+#define so_blocked(sock) _so_decev((sock)->so_flags, _EV_SOCK_BLOCKED)
+
+/** \brief Closed flags.
+ *
+ * This macro retrieves the closed flag set from the socket.
+ *
+ * \param[in] sock A pointer to the #ev_sock_t from which
+ * to retrieve the closed flag set.
+ *
+ * \return The closed flag set--a bit-wise OR of #EV_SOCK_READ
+ * and #EV_SOCK_WRITE.
+ */
#define so_closed(sock) _so_decev((sock)->so_flags, _EV_SOCK_CLOSED)
-#define _so_closed_set(s, fl) _so_set((s), _so_encev((fl), _EV_SOCK_CLOSED))
-#define _so_closed_clr(s, fl) _so_clr((s), _so_encev((fl), _EV_SOCK_CLOSED))
+/** \brief Socket type valid.
+ *
+ * This flag, when set on the socket, indicates that the socket type
+ * is available. When this flag is passed to socket_fdopen(), the
+ * library will not attempt to determine the socket type if #ST_NONE
+ * is passed for the \p type parameter.
+ */
#define EV_SOCK_TYPE 0x80000000
+
+/** \brief Socket state valid.
+ *
+ * This flag, when set on the socket, indicates that the socket state
+ * is available. When this flag is passed to socket_fdopen(), the
+ * library will not attempt to determine the socket state if #SS_NONE
+ * is passed for the \p state parameter.
+ */
#define EV_SOCK_STATE 0x40000000
+
+/** \brief Socket local address valid.
+ *
+ * This flag, when set on the socket, indicates that the local address
+ * of the socket is available. When this flag is passed to
+ * socket_fdopen(), the library will not attempt to determine the
+ * local address if \c NULL or an #AT_NONE address is passed for the
+ * \p local parameter.
+ */
#define EV_SOCK_LOCAL 0x20000000
+
+/** \brief Socket remote address valid.
+ *
+ * This flag, when set on the socket, indicates that the remote
+ * address of the socket is available. When this flag is passed to
+ * socket_fdopen(), the library will not attempt to determine the
+ * remote address if \c NULL or an #AT_NONE address is passed for the
+ * \p local parameter.
+ */
#define EV_SOCK_REMOTE 0x10000000
/** \brief Socket generator verification macro.
@@ -955,7 +1149,7 @@
*
* \retval EINVAL An invalid argument was given.
*/
-extern ev_err_t sockaddr_atop(ev_sockaddr_t *sa, char *buf, int size,
+extern ev_err_t sockaddr_atop(const ev_sockaddr_t *sa, char *buf, int size,
ev_flags_t flags)
_gca_nonnull((1, 2));
@@ -1009,38 +1203,308 @@
* \retval ENOSYS Address type is not natively
* supported.
*/
-extern ev_err_t sockaddr_export(ev_sockaddr_t *sa, struct sockaddr *addr,
+extern ev_err_t sockaddr_export(const ev_sockaddr_t *sa, struct sockaddr *addr,
int *len)
_gca_nonnull((1, 2, 3));
+/** \brief Open a socket.
+ *
+ * This function will create a socket of the given \p type, with the
+ * local address specified by \p local. If a \p remote address is
+ * specified, the socket will be connected; otherwise, in the case of
+ * an #ST_STREAM socket, a listening socket will be created.
+ *
+ * \todo Implement; write test program.
+ *
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] type A socket type--one of the constants
+ * from the #ev_socktype_t enumeration.
+ * \param[in] local The address for the local end of the
+ * connection. If \c NULL, a suitable
+ * default will be chosen. If both \p
+ * local and \p remote are \c NULL, the
+ * socket will be created in the IPv4
+ * domain.
+ * \param[in] remote The address for the remote end of the
+ * connection. If \c NULL, the socket
+ * will be unconnected (a listening
+ * socket, in the case of #ST_STREAM
+ * sockets). If both \p local and \p
+ * remote are \c NULL, the socket will be
+ * created in the IPv4 domain.
+ * \param[in] events The initial set of events--a bit-wise
+ * OR of #EV_SOCK_READ and
+ * #EV_SOCK_WRITE. See the documentation
+ * for socket_events() for more
+ * information.
+ * \param[in] attr Attributes to apply to the socket. If
+ * \c NULL, the library defaults will be
+ * applied.
+ * \param[in] call The callback function for the library
+ * to use. If \c NULL, the library may
+ * not be used in the event loop mode.
+ * \param[in] data Any application-specific data that
+ * must be passed to the callback
+ * function.
+ * \param[out] sock_p A pointer to a pointer to an
+ * #ev_sock_t. A \c NULL value may be
+ * passed if the application does not
+ * need a pointer to the socket
+ * generator.
+ *
+ * \retval EINVAL An invalid argument was given.
+ * \retval ENOMEM Out of memory.
+ * \retval XXX Other errors...
+ */
extern ev_err_t socket_open(ev_ctx_t *ctx, ev_socktype_t type,
- ev_sockaddr_t *local, ev_sockaddr_t *remote,
- ev_flags_t events, ev_call_t call, void *data,
+ const ev_sockaddr_t *local,
+ const ev_sockaddr_t *remote,
+ ev_flags_t events, const ev_sockattr_t *attr,
+ ev_call_t call, void *data,
ev_sock_t **sock_p)
_gca_nonnull((1));
+/** \brief Create an #ev_sock_t for an open socket.
+ *
+ * The library only directly handles sockets used for network
+ * communication. Many systems provide other types of sockets for
+ * communication with the system itself or for other purposes
+ * (including forms of network communications that the library does
+ * not support). This function allows such sockets, as well as
+ * sockets opened by other libraries, to be registered with the
+ * library, so that events may be generated when the sockets become
+ * readable or writable.
+ *
+ * \todo Implement; write test program.
+ *
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] fd The socket file descriptor.
+ * \param[in] type A hint as to the type of the socket.
+ * If none of the library-supplied types
+ * applies, use the #ST_NONE type.
+ * \param[in] state A hint as to the socket state. If
+ * none of the library-supplied states
+ * applies, use the #SS_NONE state.
+ * \param[in] local A hint as to the address of the local
+ * end of the socket. If the local
+ * address cannot be represented by the
+ * library, pass \c NULL.
+ * \param[in] remote A hint as to the address of the remote
+ * end of the socket. If the remote
+ * address cannot be represented by the
+ * library, pass \c NULL.
+ * \param[in] events The initial set of events--a bit-wise
+ * OR of #EV_SOCK_READ and
+ * #EV_SOCK_WRITE. See the documentation
+ * for socket_events() for more
+ * information. The special flags
+ * #EV_SOCK_TYPE, #EV_SOCK_STATE,
+ * #EV_SOCK_LOCAL, and #EV_SOCK_REMOTE
+ * may also be used to inhibit the
+ * library from attempting to query those
+ * attributes.
+ * \param[in] attr Attributes to apply to the socket. If
+ * \c NULL, the library will not attempt
+ * to apply any socket options except
+ * non-blocking. See the
+ * sockattr_nonblock() function for a
+ * means to deactivate this default
+ * behavior.
+ * \param[in] call The callback function for the library
+ * to use. If \c NULL, the library may
+ * not be used in the event loop mode.
+ * \param[in] data Any application-specific data that
+ * must be passed to the callback
+ * function.
+ * \param[out] sock_p A pointer to a pointer to an
+ * #ev_sock_t. A \c NULL value may be
+ * passed if the application does not
+ * need a pointer to the socket
+ * generator.
+ *
+ * \retval EINVAL An invalid argument was given.
+ * \retval ENOMEM Out of memory.
+ * \retval XXX Other errors...
+ */
extern ev_err_t socket_fdopen(ev_ctx_t *ctx, int fd, ev_socktype_t type,
- ev_sockstate_t state, ev_sockaddr_t *local,
- ev_sockaddr_t *remote, ev_flags_t events,
- ev_call_t call, void *data, ev_sock_t **sock_p)
+ ev_sockstate_t state, const ev_sockaddr_t *local,
+ const ev_sockaddr_t *remote, ev_flags_t events,
+ const ev_sockattr_t *attr, ev_call_t call,
+ void *data, ev_sock_t **sock_p)
_gca_nonnull((1));
+/** \brief Open a pair of sockets or a pipe.
+ *
+ * This function will create a pair of sockets, connected to each
+ * other, in the #AT_LOCAL domain. (If \p type is #ST_PIPE, a pipe
+ * will be created instead.)
+ *
+ * \todo Implement; write test program.
+ *
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] type A socket type--one of the constants
+ * from the #ev_socktype_t enumeration.
+ * \param[in] events1 The initial set of events for the
+ * first end of the socket pair (or for
+ * the \c read end of the pipe)--a
+ * bit-wise OR of #EV_SOCK_READ and
+ * #EV_SOCK_WRITE. See the documentation
+ * for socket_events() for more
+ * information.
+ * \param[in] attr1 Attributes to apply to the socket or
+ * pipe. If \c NULL, the library
+ * defaults will be applied.
+ * \param[in] call1 The callback function for the library
+ * to use. If \c NULL, the library may
+ * not be used in the event loop mode.
+ * \param[in] data1 Any application-specific data that
+ * must be passed to the callback
+ * function.
+ * \param[in] events2 The initial set of events for the
+ * second end of the socket pair (or for
+ * the \c write end of the pipe)--a
+ * bit-wise OR of #EV_SOCK_READ and
+ * #EV_SOCK_WRITE. See the documentation
+ * for socket_events() for more
+ * information.
+ * \param[in] attr2 Attributes to apply to the socket or
+ * pipe. If \c NULL, the library
+ * defaults will be applied.
+ * \param[in] call2 The callback function for the library
+ * to use. If \c NULL, the library may
+ * not be used in the event loop mode.
+ * \param[in] data2 Any application-specific data that
+ * must be passed to the callback
+ * function.
+ * \param[out] sock1_p A pointer to a pointer to an
+ * #ev_sock_t. A \c NULL value may be
+ * passed if the application does not
+ * need a pointer to the first socket
+ * generator.
+ * \param[out] sock2_p A pointer to a pointer to an
+ * #ev_sock_t. A \c NULL value may be
+ * passed if the application does not
+ * need a pointer to the second socket
+ * generator.
+ *
+ * \retval EINVAL An invalid argument was given.
+ * \retval ENOMEM Out of memory.
+ * \retval XXX Other errors...
+ */
extern ev_err_t socket_pair(ev_ctx_t *ctx, ev_socktype_t type,
- ev_flags_t events1, ev_call_t call1, void *data1,
- ev_flags_t events2, ev_call_t call2, void *data2,
+ ev_flags_t events1, const ev_sockattr_t *attr1,
+ ev_call_t call1, void *data1,
+ ev_flags_t events2, const ev_sockattr_t *attr2,
+ ev_call_t call2, void *data2,
ev_sock_t **sock1_p, ev_sock_t **sock2_p)
_gca_nonnull((1));
+/** \brief Connect a socket.
+ *
+ * This function calls the connect() function to connect a socket
+ * (typically a datagram socket) to a given remote address. If the
+ * remote address \p addr is \c NULL, the socket will be unconnected.
+ *
+ * \todo Implement; write test program.
+ *
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] sock A pointer to the #ev_sock_t to
+ * connect to \p addr.
+ * \param[in] addr The address to which the socket should
+ * be connected, or \c NULL to unconnect
+ * the socket.
+ *
+ * \retval EINVAL An invalid argument was given.
+ * \retval XXX Other errors...
+ */
extern ev_err_t socket_connect(ev_ctx_t *ctx, ev_sock_t *sock,
- ev_sockaddr_t *addr)
+ const ev_sockaddr_t *addr)
_gca_nonnull((1, 2));
+/** \brief Close a socket.
+ *
+ * This function simply closes the socket, removing it from the engine
+ * and clearing the events set. Note that the socket generator will
+ * \em NOT be destroyed; the application must do that explicitly with
+ * a call to socket_destroy().
+ *
+ * \todo Implement; write test program.
+ *
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] sock A pointer to the #ev_sock_t to close.
+ *
+ * \retval EINVAL An invalid argument was given.
+ * \retval XXX Other errors...
+ */
extern ev_err_t socket_close(ev_ctx_t *ctx, ev_sock_t *sock)
_gca_nonnull((1, 2));
+/** \brief Shutdown one direction of a socket.
+ *
+ * This function shuts down one direction of the socket, clearing the
+ * appropriate event. The \p how argument should be one of #SHUT_RD,
+ * #SHUT_WR, or #SHUT_RDWR. Should the action result in both socket
+ * directions being shutdown (as with a \p how of #SHUT_RDWR), the
+ * socket will be closed as if with socket_close(). Note that the
+ * socket generator will \em NOT be destroyed in this case; the
+ * application must do that explicitly with a call to
+ * socket_destroy().
+ *
+ * \todo Implement; write test program.
+ *
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] sock A pointer to the #ev_sock_t to shut
+ * down.
+ * \param[in] how One of the values #SHUT_RD, #SHUT_WR,
+ * or #SHUT_RDWR to shut down the
+ * appropriate direction.
+ *
+ * \retval EINVAL An invalid argument was given.
+ * \retval XXX Other errors...
+ */
extern ev_err_t socket_shutdown(ev_ctx_t *ctx, ev_sock_t *sock, int how)
_gca_nonnull((1, 2));
+/** \brief Change socket event set.
+ *
+ * This function changes the set of events the user is interested in
+ * on \p sock to \p events. The \p events parameter consists of a
+ * bit-wise OR of #EV_SOCK_READ, indicating interest in readable
+ * conditions on the socket, and #EV_SOCK_WRITE, indicating interest
+ * in writable conditions on the socket. The function only affects
+ * the user's interest set, not the set of events currently being
+ * searched for by the library, which may be modified by blocking
+ * status.
+ *
+ * \todo Implement; write test program.
+ *
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] sock A pointer to the #ev_sock_t to change
+ * the interest set of.
+ * \param[in] events The interest set to change to.
+ *
+ * \retval EINVAL An invalid argument was given.
+ * \retval XXX Other errors...
+ */
+extern ev_err_t socket_events(ev_ctx_t *ctx, ev_sock_t *sock,
+ ev_flags_t events)
+ _gca_nonnull((1, 2));
+
+/** \brief Destroy a socket.
+ *
+ * This function destroys a socket. If the socket is open, unless it
+ * was created with the sockattr_noclose() attribute, it will also be
+ * closed.
+ *
+ * \todo Implement; write test program.
+ *
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] sock A pointer to the #ev_sock_t to
+ * destroy.
+ *
+ * \retval EINVAL An invalid argument was given.
+ * \retval XXX Other errors...
+ */
extern ev_err_t socket_destroy(ev_ctx_t *ctx, ev_sock_t *sock)
_gca_nonnull((1, 2));
Index: event/sockaddr_atop.c
diff -u event/sockaddr_atop.c:1.5 event/sockaddr_atop.c:1.6
--- event/sockaddr_atop.c:1.5 Thu Dec 22 20:07:10 2005
+++ event/sockaddr_atop.c Wed Dec 28 20:33:58 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sockaddr_atop.c,v 1.5 2005/12/23 04:07:10 klmitch Exp $
+** @(#)$Id: sockaddr_atop.c,v 1.6 2005/12/29 04:33:58 klmitch Exp $
*/
/** \internal
* \file
@@ -29,7 +29,7 @@
#include <stdio.h>
#include <string.h>
-RCSTAG("@(#)$Id: sockaddr_atop.c,v 1.5 2005/12/23 04:07:10 klmitch Exp $");
+RCSTAG("@(#)$Id: sockaddr_atop.c,v 1.6 2005/12/29 04:33:58 klmitch Exp $");
/** \brief Build presentation format for an IPv4 address.
*
@@ -51,7 +51,8 @@
* \return This function always returns 0.
*/
static ev_err_t
-atop_v4(ev_sockaddr_t *sa, unsigned char *addr, char *buf, ev_flags_t flags)
+atop_v4(const ev_sockaddr_t *sa, const unsigned char *addr, char *buf,
+ ev_flags_t flags)
{
ev_trace(); /* trace entry to function */
@@ -83,7 +84,8 @@
* \return This function always returns 0.
*/
static ev_err_t
-atop_v6(ev_sockaddr_t *sa, unsigned char *addr, char *buf, ev_flags_t flags)
+atop_v6(const ev_sockaddr_t *sa, const unsigned char *addr, char *buf,
+ ev_flags_t flags)
{
uint16_t cooked[SOCK_ADDRBUFV6_LEN >> 1];
struct {
@@ -157,9 +159,9 @@
}
ev_err_t
-sockaddr_atop(ev_sockaddr_t *sa, char *buf, int size, ev_flags_t flags)
+sockaddr_atop(const ev_sockaddr_t *sa, char *buf, int size, ev_flags_t flags)
{
- char *src = 0;
+ const char *src = 0;
char addrbuf[SOCK_ADDRSTRV6_LEN + 6]; /* v6 address + ".65535" */
ev_init(); /* make sure library is initialized... */
Index: event/sockaddr_export.c
diff -u event/sockaddr_export.c:1.2 event/sockaddr_export.c:1.3
--- event/sockaddr_export.c:1.2 Wed Oct 26 05:53:59 2005
+++ event/sockaddr_export.c Wed Dec 28 20:33:58 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sockaddr_export.c,v 1.2 2005/10/26 12:53:59 klmitch Exp $
+** @(#)$Id: sockaddr_export.c,v 1.3 2005/12/29 04:33:58 klmitch Exp $
*/
/** \internal
* \file
@@ -32,10 +32,10 @@
#include <sys/types.h>
#include <sys/un.h>
-RCSTAG("@(#)$Id: sockaddr_export.c,v 1.2 2005/10/26 12:53:59 klmitch Exp $");
+RCSTAG("@(#)$Id: sockaddr_export.c,v 1.3 2005/12/29 04:33:58 klmitch Exp $");
ev_err_t
-sockaddr_export(ev_sockaddr_t *sa, struct sockaddr *addr, int *len)
+sockaddr_export(const ev_sockaddr_t *sa, struct sockaddr *addr, int *len)
{
int t_len;
Index: event/tim.h
diff -u event/tim.h:1.9 event/tim.h:1.10
--- event/tim.h:1.9 Sat Dec 17 16:15:11 2005
+++ event/tim.h Wed Dec 28 20:33:58 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: tim.h,v 1.9 2005/12/18 00:15:11 klmitch Exp $
+** @(#)$Id: tim.h,v 1.10 2005/12/29 04:33:58 klmitch Exp $
*/
#ifndef __include_event_tim_h__
#define __include_event_tim_h__
@@ -188,7 +188,7 @@
* not be used in the event loop mode.
* \param[in] data Any application-specific data that
* must be passed to the callback function.
- * \param[in,out] tim_p A pointer to a pointer to an
+ * \param[out] tim_p A pointer to a pointer to an
* #ev_tim_t. A \c NULL value may be
* passed if the application does not
* need a pointer to the timer.
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-12-24 04:24:42
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-12-24 04:24:35 UTC
Modified files:
ChangeLog sock.h
Log message:
beginning to rough in the basic socket interface
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.62 event/ChangeLog:1.63
--- event/ChangeLog:1.62 Thu Dec 22 20:07:08 2005
+++ event/ChangeLog Fri Dec 23 20:24:25 2005
@@ -1,3 +1,7 @@
+2005-12-23 Kevin L. Mitchell <kl...@mi...>
+
+ * sock.h: beginning to rough in the basic socket interface
+
2005-12-22 Kevin L. Mitchell <kl...@mi...>
* tests/test-harness.dat: add test program for sa_*() and
Index: event/sock.h
diff -u event/sock.h:1.14 event/sock.h:1.15
--- event/sock.h:1.14 Thu Dec 22 20:07:10 2005
+++ event/sock.h Fri Dec 23 20:24:25 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sock.h,v 1.14 2005/12/23 04:07:10 klmitch Exp $
+** @(#)$Id: sock.h,v 1.15 2005/12/24 04:24:25 klmitch Exp $
*/
#ifndef __include_event_sock_h__
#define __include_event_sock_h__
@@ -90,6 +90,7 @@
* signal handler.)
*/
typedef enum {
+ ST_NONE, /**< Socket type unknown. */
ST_STREAM, /**< Stream socket (TCP). */
ST_DGRAM, /**< Datagram socket (UDP). */
ST_SEQPACKET, /**< Sequenced packet socket (SCTP). */
@@ -102,6 +103,7 @@
* describes those states.
*/
typedef enum {
+ SS_NONE, /**< Socket state unknown. */
SS_CONNECTING, /**< A connection is in progress. */
SS_LISTENING, /**< Socket is a listening socket. */
SS_CONNECTED, /**< Socket is connected to a peer. */
@@ -715,6 +717,37 @@
*/
#define EV_SOCK_MAGIC 0x60be0671
+#define EV_SOCK_READ 0x00000001
+#define EV_SOCK_WRITE 0x00000002
+#define EV_SOCK_EVMASK (EV_SOCK_READ | EV_SOCK_WRITE)
+
+#define _so_decev(flags, shft) (((flags) >> (shft)) & EV_SOCK_EVMASK)
+#define _so_encev(flags, shft) (((flags) & EV_SOCK_EVMASK) << (shft))
+#define _so_set(sock, flags) ((sock)->so_flags |= (flags))
+#define _so_clr(sock, flags) ((sock)->so_flags &= ~(flags))
+
+#define _EV_SOCK_UEVENTS 0
+#define so_uevents(sock) _so_decev((sock)->so_flags, _EV_SOCK_UEVENTS)
+#define _so_uevents_set(s, fl) _so_set((s), _so_encev((fl), _EV_SOCK_UEVENTS))
+#define _so_uevents_clr(s, fl) _so_clr((s), _so_encev((fl), _EV_SOCK_UEVENTS))
+#define _EV_SOCK_EEVENTS 2
+#define so_eevents(sock) _so_decev((sock)->so_flags, _EV_SOCK_EEVENTS)
+#define _so_eevents_set(s, fl) _so_set((s), _so_encev((fl), _EV_SOCK_EEVENTS))
+#define _so_eevents_clr(s, fl) _so_clr((s), _so_encev((fl), _EV_SOCK_EEVENTS))
+#define _EV_SOCK_BLOCKED 4
+#define so_blocked(sock) _so_decev((sock)->so_flags, _EV_SOCK_BLOCKED)
+#define _so_blocked_set(s, fl) _so_set((s), _so_encev((fl), _EV_SOCK_BLOCKED))
+#define _so_blocked_clr(s, fl) _so_clr((s), _so_encev((fl), _EV_SOCK_BLOCKED))
+#define _EV_SOCK_CLOSED 6
+#define so_closed(sock) _so_decev((sock)->so_flags, _EV_SOCK_CLOSED)
+#define _so_closed_set(s, fl) _so_set((s), _so_encev((fl), _EV_SOCK_CLOSED))
+#define _so_closed_clr(s, fl) _so_clr((s), _so_encev((fl), _EV_SOCK_CLOSED))
+
+#define EV_SOCK_TYPE 0x80000000
+#define EV_SOCK_STATE 0x40000000
+#define EV_SOCK_LOCAL 0x20000000
+#define EV_SOCK_REMOTE 0x10000000
+
/** \brief Socket generator verification macro.
*
* This macro verifies that a given pointer actually does point to an
@@ -805,7 +838,7 @@
* This function sets the type of the given #ev_sockaddr_t to the
* specified \p type.
*
- * \todo Write test program.
+ * \test This function is tested in t_sockaddr_fcns.c.
*
* \param[in] sa A pointer to an #ev_sockaddr_t.
* \param[in] type One of the valid type values:
@@ -824,7 +857,7 @@
* is determined by the type set on \p sa. This function is only
* valid for #AT_IPv6 and #AT_IPv4 addresses.
*
- * \todo Write test program.
+ * \test This function is tested in t_sockaddr_fcns.c.
*
* \param[in] sa A pointer to an #ev_sockaddr_t.
* \param[in] address A pointer to <CODE>unsigned
@@ -843,7 +876,7 @@
* #ev_sockaddr_t to \p port. This function is only valid for
* #AT_IPv6 and #AT_IPv4 addresses.
*
- * \todo Write test program.
+ * \test This function is tested in t_sockaddr_fcns.c.
*
* \param[in] sa A pointer to an #ev_sockaddr_t.
* \param[in] port An <CODE>unsigned short</CODE>
@@ -861,7 +894,7 @@
* #ev_sockaddr_t to \p address. This function is only valid for
* #AT_LOCAL addresses.
*
- * \todo Write test program.
+ * \test This function is tested in t_sockaddr_fcns.c.
*
* \param[in] sa A pointer to an #ev_sockaddr_t.
* \param[in] address A pointer to \c char designating the
@@ -878,7 +911,7 @@
* This function parses the string representation of the \p address to
* fill in an #ev_sockaddr_t.
*
- * \todo Write test program.
+ * \test This function is tested in t_sockaddr_fcns.c.
*
* \param[in] sa A pointer to an #ev_sockaddr_t.
* \param[in] address A pointer to \c char designating the
@@ -906,7 +939,7 @@
* truncated so as to not overflow the buffer, and the terminating
* '\\0' will always be present.
*
- * \todo Write test program.
+ * \test This function is tested in t_sockaddr_fcns.c.
*
* \param[in] sa A pointer to an #ev_sockaddr_t.
* \param[out] buf The buffer to fill in with the
@@ -939,7 +972,7 @@
* This function fills in the \p sa socket address given a pointer to
* an initialized <CODE>struct sockaddr</CODE>.
*
- * \todo Write test program.
+ * \test This function is tested in t_sockaddr_fcns.c.
*
* \param[in] sa A pointer to an #ev_sockaddr_t to be
* filled in.
@@ -958,7 +991,7 @@
* This function fills in a <CODE>struct sockaddr</CODE> from the \p
* sa socket address.
*
- * \todo Write test program.
+ * \test This function is tested in t_sockaddr_fcns.c.
*
* \param[in] sa A pointer to an #ev_sockaddr_t to be
* exported.
@@ -980,6 +1013,37 @@
int *len)
_gca_nonnull((1, 2, 3));
+extern ev_err_t socket_open(ev_ctx_t *ctx, ev_socktype_t type,
+ ev_sockaddr_t *local, ev_sockaddr_t *remote,
+ ev_flags_t events, ev_call_t call, void *data,
+ ev_sock_t **sock_p)
+ _gca_nonnull((1));
+
+extern ev_err_t socket_fdopen(ev_ctx_t *ctx, int fd, ev_socktype_t type,
+ ev_sockstate_t state, ev_sockaddr_t *local,
+ ev_sockaddr_t *remote, ev_flags_t events,
+ ev_call_t call, void *data, ev_sock_t **sock_p)
+ _gca_nonnull((1));
+
+extern ev_err_t socket_pair(ev_ctx_t *ctx, ev_socktype_t type,
+ ev_flags_t events1, ev_call_t call1, void *data1,
+ ev_flags_t events2, ev_call_t call2, void *data2,
+ ev_sock_t **sock1_p, ev_sock_t **sock2_p)
+ _gca_nonnull((1));
+
+extern ev_err_t socket_connect(ev_ctx_t *ctx, ev_sock_t *sock,
+ ev_sockaddr_t *addr)
+ _gca_nonnull((1, 2));
+
+extern ev_err_t socket_close(ev_ctx_t *ctx, ev_sock_t *sock)
+ _gca_nonnull((1, 2));
+
+extern ev_err_t socket_shutdown(ev_ctx_t *ctx, ev_sock_t *sock, int how)
+ _gca_nonnull((1, 2));
+
+extern ev_err_t socket_destroy(ev_ctx_t *ctx, ev_sock_t *sock)
+ _gca_nonnull((1, 2));
+
EV_END_C_DECLS
/** @} */
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-12-23 04:10:19
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-12-23 04:09:56 UTC
Modified files:
doc/event.doxytag doc/html/__ev__gen__lookup_8c-source.html
doc/html/__ev__gen__lookup_8c.html
doc/html/__timer__heapify_8c-source.html
doc/html/__timer__heapify_8c.html doc/html/annotated.html
doc/html/classes.html doc/html/confvar.html
doc/html/dir_000000.html doc/html/dirs.html
doc/html/engine__activate_8c-source.html
doc/html/engine__activate_8c.html
doc/html/engine__register_8c-source.html
doc/html/engine__register_8c.html doc/html/engines_8h-source.html
doc/html/engines_8h.html doc/html/engines__int_8h-source.html
doc/html/engines__int_8h.html doc/html/engmodinit_8c-source.html
doc/html/engmodinit_8c.html doc/html/engmodule_8c-source.html
doc/html/engmodule_8c.html doc/html/event-test_8h-source.html
doc/html/event-test_8h.html doc/html/event-test_8h__dep__incl.map
doc/html/event-test_8h__dep__incl.md5
doc/html/event-test_8h__dep__incl.png
doc/html/event_8h-source.html doc/html/event_8h.html
doc/html/event_8h__dep__incl.md5
doc/html/event__attr__confpath_8c-source.html
doc/html/event__attr__confpath_8c.html
doc/html/event__attr__confreg_8c-source.html
doc/html/event__attr__confreg_8c.html
doc/html/event__attr__confvar_8c-source.html
doc/html/event__attr__confvar_8c.html
doc/html/event__attr__destroy_8c-source.html
doc/html/event__attr__destroy_8c.html
doc/html/event__attr__engine_8c-source.html
doc/html/event__attr__engine_8c.html
doc/html/event__attr__init_8c-source.html
doc/html/event__attr__init_8c.html
doc/html/event__attr__libpath_8c-source.html
doc/html/event__attr__libpath_8c.html
doc/html/event__attr__modlist_8c-source.html
doc/html/event__attr__modlist_8c.html
doc/html/event__destroy_8c-source.html
doc/html/event__destroy_8c.html
doc/html/event__gen__alloc_8c-source.html
doc/html/event__gen__alloc_8c.html
doc/html/event__gen__register_8c-source.html
doc/html/event__gen__register_8c.html
doc/html/event__gen__release_8c-source.html
doc/html/event__gen__release_8c.html
doc/html/event__init_8c-source.html doc/html/event__init_8c.html
doc/html/event__int_8h-source.html doc/html/event__int_8h.html
doc/html/event__int_8h__dep__incl.md5
doc/html/event__log_8c-source.html doc/html/event__log_8c.html
doc/html/files.html doc/html/functions.html
doc/html/functions_vars.html doc/html/gcc-attrs_8h-source.html
doc/html/gcc-attrs_8h.html doc/html/gcc-attrs_8h__dep__incl.md5
doc/html/globals.html doc/html/globals_0x61.html
doc/html/globals_0x62.html doc/html/globals_0x63.html
doc/html/globals_0x64.html doc/html/globals_0x65.html
doc/html/globals_0x66.html doc/html/globals_0x67.html
doc/html/globals_0x68.html doc/html/globals_0x6c.html
doc/html/globals_0x6d.html doc/html/globals_0x6e.html
doc/html/globals_0x70.html doc/html/globals_0x72.html
doc/html/globals_0x73.html doc/html/globals_0x74.html
doc/html/globals_0x76.html doc/html/globals_0x78.html
doc/html/globals_defs.html doc/html/globals_defs_0x61.html
doc/html/globals_defs_0x62.html doc/html/globals_defs_0x63.html
doc/html/globals_defs_0x64.html doc/html/globals_defs_0x65.html
doc/html/globals_defs_0x66.html doc/html/globals_defs_0x67.html
doc/html/globals_defs_0x68.html doc/html/globals_defs_0x6c.html
doc/html/globals_defs_0x6d.html doc/html/globals_defs_0x70.html
doc/html/globals_defs_0x72.html doc/html/globals_defs_0x73.html
doc/html/globals_defs_0x74.html doc/html/globals_defs_0x76.html
doc/html/globals_defs_0x78.html doc/html/globals_enum.html
doc/html/globals_eval.html doc/html/globals_func.html
doc/html/globals_type.html doc/html/globals_vars.html
doc/html/graph_legend.html doc/html/group__engines.html
doc/html/group__event.html doc/html/group__signal.html
doc/html/group__socket.html doc/html/group__timer.html
doc/html/index.html doc/html/modules.html doc/html/pages.html
doc/html/sa__ipaddrbuf__set_8c-source.html
doc/html/sa__ipaddrbuf__set_8c.html
doc/html/sa__ipaddrport__set_8c-source.html
doc/html/sa__ipaddrport__set_8c.html
doc/html/sa__localaddr__set_8c-source.html
doc/html/sa__localaddr__set_8c.html
doc/html/sa__type__set_8c-source.html
doc/html/sa__type__set_8c.html doc/html/sig_8h-source.html
doc/html/sig_8h.html doc/html/sig_8h__dep__incl.md5
doc/html/signal__create_8c-source.html
doc/html/signal__create_8c.html
doc/html/signal__destroy_8c-source.html
doc/html/signal__destroy_8c.html doc/html/sock_8h-source.html
doc/html/sock_8h.html doc/html/sock_8h__dep__incl.md5
doc/html/sockaddr__atop_8c-source.html
doc/html/sockaddr__atop_8c.html
doc/html/sockaddr__export_8c-source.html
doc/html/sockaddr__export_8c.html
doc/html/sockaddr__import_8c-source.html
doc/html/sockaddr__import_8c.html
doc/html/sockaddr__ptoa_8c-source.html
doc/html/sockaddr__ptoa_8c.html doc/html/struct__ev__attr__s.html
doc/html/struct__ev__ctx__s.html
doc/html/struct__ev__engine__s.html
doc/html/struct__ev__englink__s.html
doc/html/struct__ev__englist__s.html
doc/html/struct__ev__gendesc__s.html
doc/html/struct__ev__genhdr__s.html
doc/html/struct__ev__genlist__s.html
doc/html/struct__ev__gens__s.html
doc/html/struct__ev__overvars__s.html
doc/html/struct__ev__sig__s.html
doc/html/struct__ev__signals__s.html
doc/html/struct__ev__sock__s.html
doc/html/struct__ev__sockaddr__s.html
doc/html/struct__ev__sockets__s.html
doc/html/struct__ev__tim__s.html
doc/html/struct__ev__timers__s.html
doc/html/struct__ev__timnode__s.html
doc/html/struct__ev__varlist__s.html
doc/html/struct__event__s.html doc/html/structgenerator.html
doc/html/structpartaddr.html doc/html/structrule.html
doc/html/structt__gen.html doc/html/structteng.html
doc/html/structtest__resched.html doc/html/structtest__timer.html
doc/html/t__event__attrs_8c-source.html
doc/html/t__event__attrs_8c.html
doc/html/t__event__init_8c-source.html
doc/html/t__event__init_8c.html
doc/html/t__event__log_8c-source.html
doc/html/t__event__log_8c.html
doc/html/t__evg__alloc_8c-source.html
doc/html/t__evg__alloc_8c.html
doc/html/t__evg__register_8c-source.html
doc/html/t__evg__register_8c.html
doc/html/t__signal__fcns_8c-source.html
doc/html/t__signal__fcns_8c.html
doc/html/t__timer__fcns_8c-source.html
doc/html/t__timer__fcns_8c.html doc/html/test.html
doc/html/tim_8h-source.html doc/html/tim_8h.html
doc/html/tim_8h__dep__incl.md5
doc/html/timer__create_8c-source.html
doc/html/timer__create_8c.html
doc/html/timer__destroy_8c-source.html
doc/html/timer__destroy_8c.html
doc/html/timer__resched_8c-source.html
doc/html/timer__resched_8c.html doc/html/todo.html
doc/latex/dir_000000.tex doc/latex/doxygen.sty
doc/latex/event-test_8h.tex
doc/latex/event-test_8h__dep__incl.eps
doc/latex/event-test_8h__dep__incl.md5
doc/latex/event_8h__dep__incl.md5
doc/latex/event__int_8h__dep__incl.md5 doc/latex/files.tex
doc/latex/gcc-attrs_8h__dep__incl.md5 doc/latex/group__socket.tex
doc/latex/refman.tex doc/latex/sig_8h__dep__incl.md5
doc/latex/sock_8h.tex doc/latex/sock_8h__dep__incl.md5
doc/latex/tim_8h__dep__incl.md5 doc/man/man3/_ev_attr_s.3
doc/man/man3/_ev_ctx_s.3 doc/man/man3/_ev_engine_s.3
doc/man/man3/_ev_englink_s.3 doc/man/man3/_ev_englist_s.3
doc/man/man3/_ev_gen_lookup.c.3 doc/man/man3/_ev_gendesc_s.3
doc/man/man3/_ev_genhdr_s.3 doc/man/man3/_ev_genlist_s.3
doc/man/man3/_ev_gens_s.3 doc/man/man3/_ev_overvars_s.3
doc/man/man3/_ev_sig_s.3 doc/man/man3/_ev_signals_s.3
doc/man/man3/_ev_sock_s.3 doc/man/man3/_ev_sockaddr_s.3
doc/man/man3/_ev_sockets_s.3 doc/man/man3/_ev_tim_s.3
doc/man/man3/_ev_timers_s.3 doc/man/man3/_ev_timnode_s.3
doc/man/man3/_ev_varlist_s.3 doc/man/man3/_event_s.3
doc/man/man3/_home_klmitch_devel_src_event_tests_.3
doc/man/man3/_timer_heapify.c.3 doc/man/man3/confvar.3
doc/man/man3/engine_activate.c.3 doc/man/man3/engine_register.c.3
doc/man/man3/engines.3 doc/man/man3/engines.h.3
doc/man/man3/engines_int.h.3 doc/man/man3/engmodinit.c.3
doc/man/man3/engmodule.c.3 doc/man/man3/event-test.h.3
doc/man/man3/event.3 doc/man/man3/event.h.3
doc/man/man3/event_attr_confpath.c.3
doc/man/man3/event_attr_confreg.c.3
doc/man/man3/event_attr_confvar.c.3
doc/man/man3/event_attr_destroy.c.3
doc/man/man3/event_attr_engine.c.3
doc/man/man3/event_attr_init.c.3
doc/man/man3/event_attr_libpath.c.3
doc/man/man3/event_attr_modlist.c.3
doc/man/man3/event_destroy.c.3 doc/man/man3/event_gen_alloc.c.3
doc/man/man3/event_gen_register.c.3
doc/man/man3/event_gen_release.c.3 doc/man/man3/event_init.c.3
doc/man/man3/event_int.h.3 doc/man/man3/event_log.c.3
doc/man/man3/gcc-attrs.h.3 doc/man/man3/generator.3
doc/man/man3/partaddr.3 doc/man/man3/rule.3
doc/man/man3/sa_ipaddrbuf_set.c.3
doc/man/man3/sa_ipaddrport_set.c.3
doc/man/man3/sa_localaddr_set.c.3 doc/man/man3/sa_type_set.c.3
doc/man/man3/sig.h.3 doc/man/man3/signal.3
doc/man/man3/signal_create.c.3 doc/man/man3/signal_destroy.c.3
doc/man/man3/sock.h.3 doc/man/man3/sockaddr_atop.c.3
doc/man/man3/sockaddr_export.c.3 doc/man/man3/sockaddr_import.c.3
doc/man/man3/sockaddr_ptoa.c.3 doc/man/man3/socket.3
doc/man/man3/t_event_attrs.c.3 doc/man/man3/t_event_init.c.3
doc/man/man3/t_event_log.c.3 doc/man/man3/t_evg_alloc.c.3
doc/man/man3/t_evg_register.c.3 doc/man/man3/t_gen.3
doc/man/man3/t_signal_fcns.c.3 doc/man/man3/t_timer_fcns.c.3
doc/man/man3/teng.3 doc/man/man3/test.3
doc/man/man3/test_resched.3 doc/man/man3/test_timer.3
doc/man/man3/tim.h.3 doc/man/man3/timer.3
doc/man/man3/timer_create.c.3 doc/man/man3/timer_destroy.c.3
doc/man/man3/timer_resched.c.3 doc/man/man3/todo.3
Added files:
doc/html/t__sockaddr__fcns_8c-source.html
doc/html/t__sockaddr__fcns_8c.html
doc/html/t__sockaddr__fcns_8c__incl.map
doc/html/t__sockaddr__fcns_8c__incl.md5
doc/html/t__sockaddr__fcns_8c__incl.png
doc/html/t__sockaddr__fcns_8c_a1_cgraph.map
doc/html/t__sockaddr__fcns_8c_a1_cgraph.md5
doc/html/t__sockaddr__fcns_8c_a1_cgraph.png
doc/latex/t__sockaddr__fcns_8c.tex
doc/latex/t__sockaddr__fcns_8c__incl.eps
doc/latex/t__sockaddr__fcns_8c__incl.md5
doc/latex/t__sockaddr__fcns_8c_a1_cgraph.eps
doc/latex/t__sockaddr__fcns_8c_a1_cgraph.md5
doc/man/man3/t_sockaddr_fcns.c.3 doc/man/man3/value.3
Log message:
documentation update
---------------------- diff included ----------------------
Index: event/doc/event.doxytag
diff -u event/doc/event.doxytag:1.17 event/doc/event.doxytag:1.18
--- event/doc/event.doxytag:1.17 Sat Dec 17 16:20:17 2005
+++ event/doc/event.doxytag Thu Dec 22 20:09:43 2005
@@ -2538,22 +2538,22 @@
<arglist></arglist>
</member>
<member kind="enumvalue">
- <name>AT_IPv6</name>
+ <name>AT_NONE</name>
<anchor>gga59a58</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
- <name>AT_IPv4</name>
+ <name>AT_IPv6</name>
<anchor>gga59a59</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
- <name>AT_LOCAL</name>
+ <name>AT_IPv4</name>
<anchor>gga59a60</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
- <name>AT_NONE</name>
+ <name>AT_LOCAL</name>
<anchor>gga59a61</anchor>
<arglist></arglist>
</member>
@@ -3177,6 +3177,26 @@
</member>
</compound>
<compound kind="file">
+ <name>t_sockaddr_fcns.c</name>
+ <path>/home/klmitch/devel/src/event/tests/</path>
+ <filename>t__sockaddr__fcns_8c</filename>
+ <includes id="event-test_8h" name="event-test.h" local="yes" imported="no">event-test.h</includes>
+ <member kind="function">
+ <type>unsigned int</type>
+ <name>value</name>
+ <anchorfile>t__sockaddr__fcns_8c.html</anchorfile>
+ <anchor>a0</anchor>
+ <arglist>(const char *str)</arglist>
+ </member>
+ <member kind="function">
+ <type>int</type>
+ <name>main</name>
+ <anchorfile>t__sockaddr__fcns_8c.html</anchorfile>
+ <anchor>a1</anchor>
+ <arglist>(int argc, char **argv)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
<name>t_timer_fcns.c</name>
<path>/home/klmitch/devel/src/event/tests/</path>
<filename>t__timer__fcns_8c</filename>
@@ -5971,22 +5991,22 @@
<arglist></arglist>
</member>
<member kind="enumvalue">
- <name>AT_IPv6</name>
+ <name>AT_NONE</name>
<anchor>gga59a58</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
- <name>AT_IPv4</name>
+ <name>AT_IPv6</name>
<anchor>gga59a59</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
- <name>AT_LOCAL</name>
+ <name>AT_IPv4</name>
<anchor>gga59a60</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
- <name>AT_NONE</name>
+ <name>AT_LOCAL</name>
<anchor>gga59a61</anchor>
<arglist></arglist>
</member>
@@ -6158,6 +6178,7 @@
<file>t_evg_alloc.c</file>
<file>t_evg_register.c</file>
<file>t_signal_fcns.c</file>
+ <file>t_sockaddr_fcns.c</file>
<file>t_timer_fcns.c</file>
</compound>
</tagfile>
Index: event/doc/html/__ev__gen__lookup_8c-source.html
diff -u event/doc/html/__ev__gen__lookup_8c-source.html:1.12 event/doc/html/__ev__gen__lookup_8c-source.html:1.13
--- event/doc/html/__ev__gen__lookup_8c-source.html:1.12 Sat Dec 17 16:20:19 2005
+++ event/doc/html/__ev__gen__lookup_8c-source.html Thu Dec 22 20:09:43 2005
@@ -52,7 +52,7 @@
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <a class="code" href="event__int_8h.html#a25">ev_return</a>(ENOENT); <span class="comment">/* failed to find the entry... */</span>
<a name="l00055"></a>00055 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__ev__gen__lookup_8c.html
diff -u event/doc/html/__ev__gen__lookup_8c.html:1.12 event/doc/html/__ev__gen__lookup_8c.html:1.13
--- event/doc/html/__ev__gen__lookup_8c.html:1.12 Sat Dec 17 16:20:19 2005
+++ event/doc/html/__ev__gen__lookup_8c.html Thu Dec 22 20:09:43 2005
@@ -101,7 +101,7 @@
Referenced by <a class="el" href="event__gen__alloc_8c-source.html#l00034">event_gen_alloc()</a>, <a class="el" href="event__gen__release_8c-source.html#l00034">event_gen_release()</a>, and <a class="el" href="t__evg__alloc_8c-source.html#l00068">main()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:57 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:46 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__timer__heapify_8c-source.html
diff -u event/doc/html/__timer__heapify_8c-source.html:1.10 event/doc/html/__timer__heapify_8c-source.html:1.11
--- event/doc/html/__timer__heapify_8c-source.html:1.10 Sat Dec 17 16:20:19 2005
+++ event/doc/html/__timer__heapify_8c-source.html Thu Dec 22 20:09:43 2005
@@ -131,7 +131,7 @@
<a name="l00146"></a>00146
<a name="l00147"></a>00147 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00148"></a>00148 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__timer__heapify_8c.html
diff -u event/doc/html/__timer__heapify_8c.html:1.10 event/doc/html/__timer__heapify_8c.html:1.11
--- event/doc/html/__timer__heapify_8c.html:1.10 Sat Dec 17 16:20:19 2005
+++ event/doc/html/__timer__heapify_8c.html Thu Dec 22 20:09:43 2005
@@ -218,7 +218,7 @@
Referenced by <a class="el" href="__timer__heapify_8c-source.html#l00121">_timer_heapify_down()</a>, and <a class="el" href="__timer__heapify_8c-source.html#l00105">_timer_heapify_up()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:58 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:47 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/annotated.html
diff -u event/doc/html/annotated.html:1.20 event/doc/html/annotated.html:1.21
--- event/doc/html/annotated.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/annotated.html Thu Dec 22 20:09:43 2005
@@ -34,7 +34,7 @@
<tr><td class="indexkey"><a class="el" href="structtest__resched.html">test_resched</a></td><td class="indexvalue">Structure for defining a timer rescheduling to perform </td></tr>
<tr><td class="indexkey"><a class="el" href="structtest__timer.html">test_timer</a></td><td class="indexvalue">Structure for defining a timer to create </td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:42 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:08:34 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/classes.html
diff -u event/doc/html/classes.html:1.20 event/doc/html/classes.html:1.21
--- event/doc/html/classes.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/classes.html Thu Dec 22 20:09:43 2005
@@ -13,7 +13,7 @@
</td></tr><tr><td><a class="el" href="struct__ev__ctx__s.html">_ev_ctx_s</a> </td><td><a class="el" href="struct__ev__gens__s.html">_ev_gens_s</a> </td><td><a class="el" href="struct__ev__tim__s.html">_ev_tim_s</a> </td><td><a class="el" href="structgenerator.html">generator</a> </td><td><a class="el" href="structt__gen.html">t_gen</a> </td></tr><tr><td><a class="el" href="struct__ev__engine__s.html">_ev_engine_s</a> </td><td><a class="el" href="struct__ev__overvars__s.html">_ev_overvars_s</a> </td><td><a class="el" href="struct__ev__timers__s.html">_ev_timers_s</a> </td><td><a name="letter_P"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> P </div></td></tr></table>
</td><td><a class="el" href="structteng.html">teng</a> </td></tr><tr><td><a class="el" href="struct__ev__englink__s.html">_ev_englink_s</a> </td><td><a class="el" href="struct__ev__sig__s.html">_ev_sig_s</a> </td><td><a class="el" href="struct__ev__timnode__s.html">_ev_timnode_s</a> </td><td><a class="el" href="structpartaddr.html">partaddr</a> </td><td><a class="el" href="structtest__resched.html">test_resched</a> </td></tr><tr><td><a class="el" href="struct__ev__englist__s.html">_ev_englist_s</a> </td><td><a class="el" href="struct__ev__signals__s.html">_ev_signals_s</a> </td><td><a class="el" href="struct__ev__varlist__s.html">_ev_varlist_s</a> </td><td><a name="letter_R"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> R </div></td></tr></table>
</td><td><a class="el" href="structtest__timer.html">test_timer</a> </td></tr><tr><td><a class="el" href="struct__ev__gendesc__s.html">_ev_gendesc_s</a> </td><td><a class="el" href="struct__ev__sock__s.html">_ev_sock_s</a> </td></tr></table><p><div class="qindex"><a class="qindex" href="#letter__">_</a> | <a class="qindex" href="#letter_G">G</a> | <a class="qindex" href="#letter_P">P</a> | <a class="qindex" href="#letter_R">R</a> | <a class="qindex" href="#letter_T">T</a></div><p>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:42 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:08:34 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/confvar.html
diff -u event/doc/html/confvar.html:1.20 event/doc/html/confvar.html:1.21
--- event/doc/html/confvar.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/confvar.html Thu Dec 22 20:09:43 2005
@@ -21,7 +21,7 @@
The <a class="el" href="group__event.html#ga11">event_init()</a> function uses the <a class="elRef" doxygen="treeconf.doxytag:http://libevent.sourceforge.net/treeconf/" href="http://libevent.sourceforge.net/treeconf/group__treeconf.html#gga8">tc_path()</a> function to load the configuration from all the files listed in the <code>envpath</code> argument, which is presumed to be passed in by the application from the environment. If the <code>envpath</code> contains an empty field (i.e., "::"), envpath is passed as <code>NULL</code>, or the <a class="el" href="group__event.html#ga61">EV_INIT_SECURE</a> flag is passed to <a class="el" href="group__event.html#ga11">event_init()</a>, then a default path will be searched. Note that the <a class="el" href="group__event.html#ga61">EV_INIT_SECURE</a> flag will also cause files containing the <code>%n</code> or <code>~</code> expandos to be skipped for security reasons.<p>
In addition to the <code>~</code> expandos (<code>~</code> expands to the current user's home directory; <code>~user</code> expands to the home directory of <code>user</code>), the library also defines the <code>%n</code> and <code>%p</code> expandos, which expand to the user name and the application name, respectively. (The application name is passed as the <code>prog</code> argument to the <a class="el" href="group__event.html#ga11">event_init()</a> function. If <code>NULL</code> is passed for <code>prog</code>, file names containing the <code>%p</code> expando will be omitted.)<p>
By default, the default search path contains <code>"event.tc"</code> from the system package configuration directory (often <code>/usr/local/etc/event</code>); <code>".event.tc"</code> from the user's home directory; <code>"%p.tc"</code> from the system configuration directory; and <code>".%p.tc"</code> from the user's home directory. This default may be overridden by passing <a class="el" href="group__event.html#ga11">event_init()</a> an <a class="el" href="group__event.html#ga2">ev_attr_t</a> object which has been modified by a call to <a class="el" href="group__event.html#ga14">event_attr_confpath()</a>.<p>
-Any variables passed in an <a class="el" href="group__event.html#ga2">ev_attr_t</a> (modified by a call to the <a class="el" href="group__event.html#ga18">event_attr_confvar()</a> function) will override any values found in any of the configuration files loaded by <a class="el" href="group__event.html#ga11">event_init()</a>. <hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:57 2005 for event by
+Any variables passed in an <a class="el" href="group__event.html#ga2">ev_attr_t</a> (modified by a call to the <a class="el" href="group__event.html#ga18">event_attr_confvar()</a> function) will override any values found in any of the configuration files loaded by <a class="el" href="group__event.html#ga11">event_init()</a>. <hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:08:49 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/dir_000000.html
diff -u event/doc/html/dir_000000.html:1.20 event/doc/html/dir_000000.html:1.21
--- event/doc/html/dir_000000.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/dir_000000.html Thu Dec 22 20:09:43 2005
@@ -67,13 +67,18 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Test suite for <a class="el" href="group__signal.html#ga1">signal_create()</a> and <a class="el" href="group__signal.html#ga2">signal_destroy()</a> functions. <br></td></tr>
<p>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">file </td><td class="memItemRight" valign="bottom"><a class="el" href="t__sockaddr__fcns_8c.html">t_sockaddr_fcns.c</a> <a href="t__sockaddr__fcns_8c-source.html">[code]</a></td></tr>
+
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Test suite for <a class="el" href="group__socket.html#ga3">sa_type_set()</a>, <a class="el" href="group__socket.html#ga4">sa_ipaddrbuf_set()</a>, <a class="el" href="group__socket.html#ga5">sa_ipaddrport_set()</a>, <a class="el" href="group__socket.html#ga6">sa_localaddr_set()</a>, <a class="el" href="group__socket.html#ga7">sockaddr_ptoa()</a>, <a class="el" href="group__socket.html#ga8">sockaddr_atop()</a>, <a class="el" href="group__socket.html#ga9">sockaddr_import()</a>, and <a class="el" href="group__socket.html#ga10">sockaddr_export()</a>. <br></td></tr>
+
+<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file </td><td class="memItemRight" valign="bottom"><a class="el" href="t__timer__fcns_8c.html">t_timer_fcns.c</a> <a href="t__timer__fcns_8c-source.html">[code]</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Test suite for <a class="el" href="group__timer.html#ga2">timer_create()</a>, <a class="el" href="group__timer.html#ga4">timer_destroy()</a>, and timer_reched() functions. <br></td></tr>
<p>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:19:01 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:08:53 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/dirs.html
diff -u event/doc/html/dirs.html:1.20 event/doc/html/dirs.html:1.21
--- event/doc/html/dirs.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/dirs.html Thu Dec 22 20:09:43 2005
@@ -8,7 +8,7 @@
<h1>event Directories</h1>This directory hierarchy is sorted roughly, but not completely, alphabetically:<ul>
<li><a class="el" href="dir_000000.html">tests</a>
</ul>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:19:01 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:08:53 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__activate_8c-source.html
diff -u event/doc/html/engine__activate_8c-source.html:1.14 event/doc/html/engine__activate_8c-source.html:1.15
--- event/doc/html/engine__activate_8c-source.html:1.14 Sat Dec 17 16:20:19 2005
+++ event/doc/html/engine__activate_8c-source.html Thu Dec 22 20:09:43 2005
@@ -74,7 +74,7 @@
<a name="l00087"></a>00087
<a name="l00088"></a>00088 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* all done! */</span>
<a name="l00089"></a>00089 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__activate_8c.html
diff -u event/doc/html/engine__activate_8c.html:1.14 event/doc/html/engine__activate_8c.html:1.15
--- event/doc/html/engine__activate_8c.html:1.14 Sat Dec 17 16:20:19 2005
+++ event/doc/html/engine__activate_8c.html Thu Dec 22 20:09:43 2005
@@ -91,7 +91,7 @@
Referenced by <a class="el" href="engine__activate_8c-source.html#l00064">engine_activate()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:59 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:48 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__register_8c-source.html
diff -u event/doc/html/engine__register_8c-source.html:1.17 event/doc/html/engine__register_8c-source.html:1.18
--- event/doc/html/engine__register_8c-source.html:1.17 Sat Dec 17 16:20:19 2005
+++ event/doc/html/engine__register_8c-source.html Thu Dec 22 20:09:43 2005
@@ -95,7 +95,7 @@
<a name="l00095"></a>00095
<a name="l00096"></a>00096 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00097"></a>00097 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__register_8c.html
diff -u event/doc/html/engine__register_8c.html:1.17 event/doc/html/engine__register_8c.html:1.18
--- event/doc/html/engine__register_8c.html:1.17 Sat Dec 17 16:20:19 2005
+++ event/doc/html/engine__register_8c.html Thu Dec 22 20:09:43 2005
@@ -38,7 +38,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register an engine. <a href="group__engines.html#ga18"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:00 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:49 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines_8h-source.html
diff -u event/doc/html/engines_8h-source.html:1.20 event/doc/html/engines_8h-source.html:1.21
--- event/doc/html/engines_8h-source.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/engines_8h-source.html Thu Dec 22 20:09:43 2005
@@ -212,7 +212,7 @@
<a name="l00775"></a>00775 <a class="code" href="event_8h.html#a1">EV_END_C_DECLS</a>
<a name="l00776"></a>00776
<a name="l00779"></a>00779 <span class="preprocessor">#endif </span><span class="comment">/* __include_event_engines_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines_8h.html
diff -u event/doc/html/engines_8h.html:1.20 event/doc/html/engines_8h.html:1.21
--- event/doc/html/engines_8h.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/engines_8h.html Thu Dec 22 20:09:43 2005
@@ -210,7 +210,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Engine module descriptor. <a href="group__engines.html#ga0"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:01 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:50 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines__int_8h-source.html
diff -u event/doc/html/engines__int_8h-source.html:1.20 event/doc/html/engines__int_8h-source.html:1.21
--- event/doc/html/engines__int_8h-source.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/engines__int_8h-source.html Thu Dec 22 20:09:43 2005
@@ -76,7 +76,7 @@
<a name="l00239"></a>00239 <span class="preprocessor">} while (0)</span>
<a name="l00240"></a>00240 <span class="preprocessor"></span>
<a name="l00241"></a>00241 <span class="preprocessor">#endif </span><span class="comment">/* __include_engine_int_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines__int_8h.html
diff -u event/doc/html/engines__int_8h.html:1.20 event/doc/html/engines__int_8h.html:1.21
--- event/doc/html/engines__int_8h.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/engines__int_8h.html Thu Dec 22 20:09:43 2005
@@ -628,7 +628,7 @@
Referenced by <a class="el" href="engine__register_8c-source.html#l00034">engine_register()</a>, and <a class="el" href="event__init_8c-source.html#l00333">event_init()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:02 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:51 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodinit_8c-source.html
diff -u event/doc/html/engmodinit_8c-source.html:1.13 event/doc/html/engmodinit_8c-source.html:1.14
--- event/doc/html/engmodinit_8c-source.html:1.13 Sat Dec 17 16:20:19 2005
+++ event/doc/html/engmodinit_8c-source.html Thu Dec 22 20:09:44 2005
@@ -85,7 +85,7 @@
<a name="l00173"></a>00173
<a name="l00174"></a>00174 <span class="keywordflow">return</span> &engine;
<a name="l00175"></a>00175 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodinit_8c.html
diff -u event/doc/html/engmodinit_8c.html:1.13 event/doc/html/engmodinit_8c.html:1.14
--- event/doc/html/engmodinit_8c.html:1.13 Sat Dec 17 16:20:19 2005
+++ event/doc/html/engmodinit_8c.html Thu Dec 22 20:09:44 2005
@@ -479,7 +479,7 @@
Referenced by <a class="el" href="t__event__init_8c-source.html#l00273">main()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:03 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:52 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodule_8c-source.html
diff -u event/doc/html/engmodule_8c-source.html:1.13 event/doc/html/engmodule_8c-source.html:1.14
--- event/doc/html/engmodule_8c-source.html:1.13 Sat Dec 17 16:20:19 2005
+++ event/doc/html/engmodule_8c-source.html Thu Dec 22 20:09:44 2005
@@ -75,7 +75,7 @@
<a name="l00157"></a>00157 <a class="code" href="engmodule_8c.html#a4">em_sock</a>, <a class="code" href="engmodule_8c.html#a4">em_sock</a>, <a class="code" href="engmodule_8c.html#a5">em_sockev</a>,
<a name="l00158"></a>00158 <a class="code" href="engmodule_8c.html#a6">em_sig</a>, <a class="code" href="engmodule_8c.html#a6">em_sig</a>,
<a name="l00159"></a>00159 <a class="code" href="engmodule_8c.html#a7">em_tim</a>, <a class="code" href="engmodule_8c.html#a7">em_tim</a>);
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodule_8c.html
diff -u event/doc/html/engmodule_8c.html:1.13 event/doc/html/engmodule_8c.html:1.14
--- event/doc/html/engmodule_8c.html:1.13 Sat Dec 17 16:20:19 2005
+++ event/doc/html/engmodule_8c.html Thu Dec 22 20:09:44 2005
@@ -445,7 +445,7 @@
Definition at line <a class="el" href="engmodule_8c-source.html#l00146">146</a> of file <a class="el" href="engmodule_8c-source.html">engmodule.c</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:04 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:53 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event-test_8h-source.html
diff -u event/doc/html/event-test_8h-source.html:1.20 event/doc/html/event-test_8h-source.html:1.21
--- event/doc/html/event-test_8h-source.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event-test_8h-source.html Thu Dec 22 20:09:44 2005
@@ -82,7 +82,7 @@
<a name="l00127"></a>00127 } while (0)
<a name="l00128"></a>00128
<a name="l00129"></a>00129 <span class="preprocessor">#endif </span><span class="comment">/* __event_test_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event-test_8h.html
diff -u event/doc/html/event-test_8h.html:1.20 event/doc/html/event-test_8h.html:1.21
--- event/doc/html/event-test_8h.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event-test_8h.html Thu Dec 22 20:09:44 2005
@@ -35,13 +35,14 @@
<p>
This graph shows which files directly or indirectly include this file:<p><center><img src="event-test_8h__dep__incl.png" border="0" usemap="#event-test.hdep_map" alt=""></center>
<map name="event-test.hdep_map">
-<area href="t__event__attrs_8c.html" shape="rect" coords="149,8,258,32" alt="">
-<area href="t__event__init_8c.html" shape="rect" coords="154,56,253,80" alt="">
-<area href="t__event__log_8c.html" shape="rect" coords="153,104,254,128" alt="">
-<area href="t__evg__alloc_8c.html" shape="rect" coords="154,152,253,176" alt="">
-<area href="t__evg__register_8c.html" shape="rect" coords="146,200,261,224" alt="">
-<area href="t__signal__fcns_8c.html" shape="rect" coords="149,248,258,272" alt="">
-<area href="t__timer__fcns_8c.html" shape="rect" coords="151,296,255,320" alt="">
+<area href="t__event__attrs_8c.html" shape="rect" coords="157,8,266,32" alt="">
+<area href="t__event__init_8c.html" shape="rect" coords="162,56,261,80" alt="">
+<area href="t__event__log_8c.html" shape="rect" coords="161,104,262,128" alt="">
+<area href="t__evg__alloc_8c.html" shape="rect" coords="162,152,261,176" alt="">
+<area href="t__evg__register_8c.html" shape="rect" coords="154,200,269,224" alt="">
+<area href="t__signal__fcns_8c.html" shape="rect" coords="157,248,266,272" alt="">
+<area href="t__sockaddr__fcns_8c.html" shape="rect" coords="146,296,277,320" alt="">
+<area href="t__timer__fcns_8c.html" shape="rect" coords="159,344,263,368" alt="">
</map>
<p>
@@ -198,7 +199,7 @@
Referenced by <a class="el" href="t__event__attrs_8c-source.html#l00043">main()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:05 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:54 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event-test_8h__dep__incl.map
diff -u event/doc/html/event-test_8h__dep__incl.map:1.4 event/doc/html/event-test_8h__dep__incl.map:1.5
--- event/doc/html/event-test_8h__dep__incl.map:1.4 Thu Sep 15 11:18:06 2005
+++ event/doc/html/event-test_8h__dep__incl.map Thu Dec 22 20:09:44 2005
@@ -1,8 +1,9 @@
base referer
-rect $t__event__attrs_8c.html 149,8 258,32
-rect $t__event__init_8c.html 154,56 253,80
-rect $t__event__log_8c.html 153,104 254,128
-rect $t__evg__alloc_8c.html 154,152 253,176
-rect $t__evg__register_8c.html 146,200 261,224
-rect $t__signal__fcns_8c.html 149,248 258,272
-rect $t__timer__fcns_8c.html 151,296 255,320
+rect $t__event__attrs_8c.html 157,8 266,32
+rect $t__event__init_8c.html 162,56 261,80
+rect $t__event__log_8c.html 161,104 262,128
+rect $t__evg__alloc_8c.html 162,152 261,176
+rect $t__evg__register_8c.html 154,200 269,224
+rect $t__signal__fcns_8c.html 157,248 266,272
+rect $t__sockaddr__fcns_8c.html 146,296 277,320
+rect $t__timer__fcns_8c.html 159,344 263,368
Index: event/doc/html/event-test_8h__dep__incl.md5
diff -u event/doc/html/event-test_8h__dep__incl.md5:1.4 event/doc/html/event-test_8h__dep__incl.md5:1.5
--- event/doc/html/event-test_8h__dep__incl.md5:1.4 Thu Sep 15 11:18:06 2005
+++ event/doc/html/event-test_8h__dep__incl.md5 Thu Dec 22 20:09:44 2005
@@ -1 +1 @@
-6d5fde01720d1b9aef411d7b13dad3d2
\ No newline at end of file
+79b55fde86a6711bab7e02801c840b35
\ No newline at end of file
Index: event/doc/html/event-test_8h__dep__incl.png
Index: event/doc/html/event_8h-source.html
diff -u event/doc/html/event_8h-source.html:1.20 event/doc/html/event_8h-source.html:1.21
--- event/doc/html/event_8h-source.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event_8h-source.html Thu Dec 22 20:09:44 2005
@@ -258,7 +258,7 @@
<a name="l01015"></a>01015 _gca_nonnull((1, 2));
<a name="l01016"></a>01016
<a name="l01039"></a>01039 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga18">event_attr_confvar</a>(ev_attr_t *attr, const <span class="keywordtype">char</span> *name,
-<a name="l01040"></a>01040 const <span class="keywordtype">char</span> *value)
+<a name="l01040"></a>01040 const <span class="keywordtype">char</span> *<a class="code" href="t__sockaddr__fcns_8c.html#a0">value</a>)
<a name="l01041"></a>01041 _gca_nonnull((1, 2));
<a name="l01042"></a>01042
<a name="l01054"></a>01054 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga19">event_attr_destroy</a>(ev_attr_t *attr)
@@ -288,7 +288,7 @@
<a name="l01206"></a>01206 <a class="code" href="event_8h.html#a1">EV_END_C_DECLS</a>
<a name="l01207"></a>01207
<a name="l01210"></a>01210 #endif <span class="comment">/* __include_event_event_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event_8h.html
diff -u event/doc/html/event_8h.html:1.20 event/doc/html/event_8h.html:1.21
--- event/doc/html/event_8h.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event_8h.html Thu Dec 22 20:09:44 2005
@@ -340,7 +340,7 @@
Definition at line <a class="el" href="event_8h-source.html#l00166">166</a> of file <a class="el" href="event_8h-source.html">event.h</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:06 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:55 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event_8h__dep__incl.md5
diff -u event/doc/html/event_8h__dep__incl.md5:1.13 event/doc/html/event_8h__dep__incl.md5:1.14
--- event/doc/html/event_8h__dep__incl.md5:1.13 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event_8h__dep__incl.md5 Thu Dec 22 20:09:44 2005
@@ -1 +1 @@
-390e5cfc5ed231149591d3f54a5d6193
\ No newline at end of file
+362c47d4415f65bc9407df7066aeafd4
\ No newline at end of file
Index: event/doc/html/event__attr__confpath_8c-source.html
diff -u event/doc/html/event__attr__confpath_8c-source.html:1.20 event/doc/html/event__attr__confpath_8c-source.html:1.21
--- event/doc/html/event__attr__confpath_8c-source.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__confpath_8c-source.html Thu Dec 22 20:09:44 2005
@@ -47,7 +47,7 @@
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00049"></a>00049 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confpath_8c.html
diff -u event/doc/html/event__attr__confpath_8c.html:1.20 event/doc/html/event__attr__confpath_8c.html:1.21
--- event/doc/html/event__attr__confpath_8c.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__confpath_8c.html Thu Dec 22 20:09:44 2005
@@ -35,7 +35,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve and/or set default configuration search path. <a href="group__event.html#ga14"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:07 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:56 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confreg_8c-source.html
diff -u event/doc/html/event__attr__confreg_8c-source.html:1.19 event/doc/html/event__attr__confreg_8c-source.html:1.20
--- event/doc/html/event__attr__confreg_8c-source.html:1.19 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__confreg_8c-source.html Thu Dec 22 20:09:44 2005
@@ -74,7 +74,7 @@
<a name="l00074"></a>00074
<a name="l00075"></a>00075 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00076"></a>00076 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confreg_8c.html
diff -u event/doc/html/event__attr__confreg_8c.html:1.19 event/doc/html/event__attr__confreg_8c.html:1.20
--- event/doc/html/event__attr__confreg_8c.html:1.19 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__confreg_8c.html Thu Dec 22 20:09:44 2005
@@ -37,7 +37,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register a treeconf variable for the application. <a href="group__event.html#ga17"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:08 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:56 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confvar_8c-source.html
diff -u event/doc/html/event__attr__confvar_8c-source.html:1.19 event/doc/html/event__attr__confvar_8c-source.html:1.20
--- event/doc/html/event__attr__confvar_8c-source.html:1.19 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__confvar_8c-source.html Thu Dec 22 20:09:44 2005
@@ -32,7 +32,7 @@
<a name="l00032"></a>00032 <a class="code" href="event__int_8h.html#a5">RCSTAG</a>(<span class="stringliteral">"@(#)$Id: event_attr_confvar.c,v 1.1 2005/06/04 17:57:03 klmitch Exp $"</span>);
<a name="l00033"></a>00033
<a name="l00034"></a>00034 <a class="code" href="group__event.html#ga5">ev_err_t</a>
-<a name="l00035"></a><a class="code" href="group__event.html#ga18">00035</a> <a class="code" href="group__event.html#ga18">event_attr_confvar</a>(<a class="code" href="struct__ev__attr__s.html">ev_attr_t</a> *attr, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> <span class="keywordtype">char</span> *value)
+<a name="l00035"></a><a class="code" href="group__event.html#ga18">00035</a> <a class="code" href="group__event.html#ga18">event_attr_confvar</a>(<a class="code" href="struct__ev__attr__s.html">ev_attr_t</a> *attr, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="t__sockaddr__fcns_8c.html#a0">value</a>)
<a name="l00036"></a>00036 {
<a name="l00037"></a>00037 <span class="keywordtype">int</span> cmp;
<a name="l00038"></a>00038 <a class="code" href="struct__ev__overvars__s.html">ev_overvars_t</a> **ptr, *tmp;
@@ -79,7 +79,7 @@
<a name="l00079"></a>00079
<a name="l00080"></a>00080 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00081"></a>00081 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confvar_8c.html
diff -u event/doc/html/event__attr__confvar_8c.html:1.19 event/doc/html/event__attr__confvar_8c.html:1.20
--- event/doc/html/event__attr__confvar_8c.html:1.19 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__confvar_8c.html Thu Dec 22 20:09:44 2005
@@ -37,7 +37,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Override a treeconf variable setting. <a href="group__event.html#ga18"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:08 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:57 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__destroy_8c-source.html
diff -u event/doc/html/event__attr__destroy_8c-source.html:1.20 event/doc/html/event__attr__destroy_8c-source.html:1.21
--- event/doc/html/event__attr__destroy_8c-source.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__destroy_8c-source.html Thu Dec 22 20:09:44 2005
@@ -61,7 +61,7 @@
<a name="l00062"></a>00062
<a name="l00063"></a>00063 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* all done! */</span>
<a name="l00064"></a>00064 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__destroy_8c.html
diff -u event/doc/html/event__attr__destroy_8c.html:1.20 event/doc/html/event__attr__destroy_8c.html:1.21
--- event/doc/html/event__attr__destroy_8c.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__destroy_8c.html Thu Dec 22 20:09:45 2005
@@ -36,7 +36,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy an attribute set and release all allocated memory. <a href="group__event.html#ga19"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:09 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:58 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__engine_8c-source.html
diff -u event/doc/html/event__attr__engine_8c-source.html:1.15 event/doc/html/event__attr__engine_8c-source.html:1.16
--- event/doc/html/event__attr__engine_8c-source.html:1.15 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__engine_8c-source.html Thu Dec 22 20:09:45 2005
@@ -79,7 +79,7 @@
<a name="l00079"></a>00079
<a name="l00080"></a>00080 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00081"></a>00081 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__engine_8c.html
diff -u event/doc/html/event__attr__engine_8c.html:1.15 event/doc/html/event__attr__engine_8c.html:1.16
--- event/doc/html/event__attr__engine_8c.html:1.15 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__engine_8c.html Thu Dec 22 20:09:45 2005
@@ -39,7 +39,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register an application-specific engine. <a href="group__engines.html#ga20"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:10 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:59 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__init_8c-source.html
diff -u event/doc/html/event__attr__init_8c-source.html:1.20 event/doc/html/event__attr__init_8c-source.html:1.21
--- event/doc/html/event__attr__init_8c-source.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__init_8c-source.html Thu Dec 22 20:09:45 2005
@@ -49,7 +49,7 @@
<a name="l00049"></a>00049
<a name="l00050"></a>00050 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* all done! */</span>
<a name="l00051"></a>00051 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__init_8c.html
diff -u event/doc/html/event__attr__init_8c.html:1.20 event/doc/html/event__attr__init_8c.html:1.21
--- event/doc/html/event__attr__init_8c.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__init_8c.html Thu Dec 22 20:09:45 2005
@@ -36,7 +36,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize a set of attributes for the events library. <a href="group__event.html#ga13"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:11 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:08:00 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__libpath_8c-source.html
diff -u event/doc/html/event__attr__libpath_8c-source.html:1.20 event/doc/html/event__attr__libpath_8c-source.html:1.21
--- event/doc/html/event__attr__libpath_8c-source.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__libpath_8c-source.html Thu Dec 22 20:09:45 2005
@@ -47,7 +47,7 @@
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00049"></a>00049 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:17:56 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:07:44 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__libpath_8c.html
diff -u event/doc/html/event__attr__libpath_8c.html:1.20 event/doc/html/event__attr__libpath_8c.html:1.21
--- event/doc/html/event__attr__libpath_8c.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__libpath_8c.html Thu Dec 22 20:09:45 2005
@@ -35,7 +35,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve and/or set default module search path. <a href="group__event.html#ga15"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Dec 17 19:18:12 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 22 23:08:00 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__modlist_8c-source.html
diff -u event/doc/html/event__attr__modlist_8c-source.html:1.20 event/doc/html/event__attr__modlist_8c-source.html:1.21
--- event/doc/html/event__attr__modlist_8c-source.html:1.20 Sat Dec 17 16:20:19 2005
+++ event/doc/html/event__attr__modlist_8c-source.html Thu Dec 22 20:09:45 2005
@@ -47,7 +47,7 @@
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00049...
[truncated message content] |
|
From: Kevin L. M. <kl...@us...> - 2005-12-23 04:07:28
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-12-23 04:07:20 UTC
Modified files:
ChangeLog sock.h sockaddr_atop.c tests/Makefile.am
tests/test-harness.dat
Added files:
tests/t_sockaddr_fcns.addrs tests/t_sockaddr_fcns.c
Log message:
add test program for sa_*() and sockaddr_*() functions; fix bugs discovered
as part of testing procedure...
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.61 event/ChangeLog:1.62
--- event/ChangeLog:1.61 Sat Dec 17 16:15:10 2005
+++ event/ChangeLog Thu Dec 22 20:07:08 2005
@@ -1,3 +1,25 @@
+2005-12-22 Kevin L. Mitchell <kl...@mi...>
+
+ * tests/test-harness.dat: add test program for sa_*() and
+ sockaddr_*() functions
+
+ * tests/t_sockaddr_fcns.c: test program for sa_*() and
+ sockaddr_*() functions
+
+ * tests/t_sockaddr_fcns.addrs: list of addresses for testing
+ sockaddr_atop() and sockaddr_ptoa()
+
+ * tests/Makefile.am (check_PROGRAMS): add t_sockaddr_fcns
+
+ * sockaddr_atop.c: make sure '::' results in '::', not just ':';
+ increment i to prevent infinite loop (duh); make sure buffer gets
+ terminated
+
+ * sock.h: reorder AT_NONE to beginning of enum so it has value 0
+ (what was I thinking?); fix documentation on sockaddr_ptoa() to
+ indicate len must be _less_than_ 0 for string to be assumed to be
+ terminated
+
2005-12-17 Kevin L. Mitchell <kl...@mi...>
* engine_activate.c, engines.h, engines_int.h,
Index: event/sock.h
diff -u event/sock.h:1.13 event/sock.h:1.14
--- event/sock.h:1.13 Sat Dec 17 16:15:11 2005
+++ event/sock.h Thu Dec 22 20:07:10 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sock.h,v 1.13 2005/12/18 00:15:11 klmitch Exp $
+** @(#)$Id: sock.h,v 1.14 2005/12/23 04:07:10 klmitch Exp $
*/
#ifndef __include_event_sock_h__
#define __include_event_sock_h__
@@ -116,10 +116,10 @@
* corresponding type.
*/
typedef enum {
+ AT_NONE, /**< No specific address type. */
AT_IPv6, /**< IPv6 socket address. */
AT_IPv4, /**< IPv4 socket address. */
- AT_LOCAL, /**< Local domain socket address. */
- AT_NONE /**< No specific address type. */
+ AT_LOCAL /**< Local domain socket address. */
} ev_satype_t;
/** \brief Socket address.
@@ -884,8 +884,9 @@
* \param[in] address A pointer to \c char designating the
* presentation format of the address.
* \param[in] alen The length of the presentation format
- * of the address. If 0, the string will
- * be assumed to end with '\\0'.
+ * of the address. If less than 0, the
+ * string will be assumed to end with
+ * '\\0'.
*
* \retval EINVAL An invalid argument was given.
* \retval EV_ERR_ADDRTOOLONG Address contains too many segments.
Index: event/sockaddr_atop.c
diff -u event/sockaddr_atop.c:1.4 event/sockaddr_atop.c:1.5
--- event/sockaddr_atop.c:1.4 Sat Dec 17 16:15:11 2005
+++ event/sockaddr_atop.c Thu Dec 22 20:07:10 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sockaddr_atop.c,v 1.4 2005/12/18 00:15:11 klmitch Exp $
+** @(#)$Id: sockaddr_atop.c,v 1.5 2005/12/23 04:07:10 klmitch Exp $
*/
/** \internal
* \file
@@ -29,7 +29,7 @@
#include <stdio.h>
#include <string.h>
-RCSTAG("@(#)$Id: sockaddr_atop.c,v 1.4 2005/12/18 00:15:11 klmitch Exp $");
+RCSTAG("@(#)$Id: sockaddr_atop.c,v 1.5 2005/12/23 04:07:10 klmitch Exp $");
/** \brief Build presentation format for an IPv4 address.
*
@@ -126,6 +126,12 @@
*buf++ = ':'; /* Add colon... */
i = best.start + best.len; /* jump to next non-zero entry */
+
+ if (i >= (SOCK_ADDRBUFV6_LEN >> 1)) {
+ *buf++ = ':'; /* Add one more colon... */
+ break; /* and bail out */
+ }
+
continue;
}
@@ -140,6 +146,8 @@
/* OK, now fill in the address component */
buf += sprintf(buf, "%x", cooked[i]);
+
+ i++; /* move on... */
}
if (!(flags & SOCKADDR_ATOP_NOPORT)) /* format the port... */
@@ -181,6 +189,7 @@
}
strncpy(buf, src, size); /* Copy the address into the user's buffer */
+ buf[size - 1] = '\0'; /* make sure buffer gets terminated */
ev_return(0);
}
Index: event/tests/Makefile.am
diff -u event/tests/Makefile.am:1.8 event/tests/Makefile.am:1.9
--- event/tests/Makefile.am:1.8 Thu Sep 15 11:14:11 2005
+++ event/tests/Makefile.am Thu Dec 22 20:07:10 2005
@@ -14,7 +14,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
-## @(#)$Id: Makefile.am,v 1.8 2005/09/15 18:14:11 klmitch Exp $
+## @(#)$Id: Makefile.am,v 1.9 2005/12/23 04:07:10 klmitch Exp $
##
## Process this file with automake to generate Makefile.in
@@ -32,7 +32,8 @@
t_evg_alloc \
\
t_timer_fcns \
- t_signal_fcns
+ t_signal_fcns \
+ t_sockaddr_fcns
check_LTLIBRARIES = engmodinit.la engmodule.la
engmodinit_la_LDFLAGS = -module -avoid-version -rpath @abs_builddir@
Index: event/tests/t_sockaddr_fcns.addrs
diff -u /dev/null event/tests/t_sockaddr_fcns.addrs:1.1
--- /dev/null Thu Dec 22 20:07:20 2005
+++ event/tests/t_sockaddr_fcns.addrs Thu Dec 22 20:07:10 2005
@@ -0,0 +1,37 @@
+# Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# @(#)$Id: t_sockaddr_fcns.addrs,v 1.1 2005/12/23 04:07:10 klmitch Exp $
+
+INVALIDCHAR 10..1.1
+INVALIDCHAR .10.1.1.1
+INVALIDCHAR .10.1.1
+INVALIDCHAR 0x10.0.0.1
+ADDRINCOMPLETE 10.1
+ADDRINCOMPLETE 10.1.3
+ADDRTOOLONG 1::2::3
+COLONEXPECTED :ffff:1.2.3.4
+BADADDR 10
+SUCCESS /foo/bar LOCAL /foo/bar /foo/bar
+SUCCESS 255.255.255.255 IP4 ffffffff:0 255.255.255.255.0
+SUCCESS 0.0.0.0.10 IP4 00000000:10 0.0.0.0.10
+SUCCESS 2002:7f00:0001::1 IP6 20027f00000100000000000000000001:0 2002:7f00:1::1.0
+SUCCESS :: IP6 00000000000000000000000000000000:0 ::.0
+SUCCESS ::1 IP6 00000000000000000000000000000001:0 ::1.0
+SUCCESS ::127.0.0.1.55 IP6 0000000000000000000000007f000001:55 ::127.0.0.1.55
+SUCCESS ::ffff:127.0.0.3.100 IP6 00000000000000000000ffff7f000003:100 ::ffff:127.0.0.3.100
+SUCCESS 8352:0344:0:0:0:0:2001:1204.73 IP6 83520344000000000000000020011204:73 8352:344::2001:1204.73
+SUCCESS 1:2:3:4:5:6:7:8.9 IP6 00010002000300040005000600070008:9 1:2:3:4:5:6:7:8.9
Index: event/tests/t_sockaddr_fcns.c
diff -u /dev/null event/tests/t_sockaddr_fcns.c:1.1
--- /dev/null Thu Dec 22 20:07:20 2005
+++ event/tests/t_sockaddr_fcns.c Thu Dec 22 20:07:10 2005
@@ -0,0 +1,389 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: t_sockaddr_fcns.c,v 1.1 2005/12/23 04:07:10 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Test suite for sa_type_set(), sa_ipaddrbuf_set(),
+ * sa_ipaddrport_set(), sa_localaddr_set(), sockaddr_ptoa(),
+ * sockaddr_atop(), sockaddr_import(), and sockaddr_export().
+ *
+ * This test program is used to test the operation of the socket
+ * address manipulation functions.
+ */
+#include "event-test.h"
+
+#include <netinet/in.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/un.h>
+
+RCSTAG("@(#)$Id: t_sockaddr_fcns.c,v 1.1 2005/12/23 04:07:10 klmitch Exp $");
+
+TEST_PROG(t_sockaddr_fcns, "Test operation of socket address "
+ "manipulation functions")
+ TEST_ARG(t_sockaddr_fcns, "<t_sockaddr_fcns.addrs>")
+ TEST_DEP(t_sockaddr_fcns, t_event_log)
+
+/** \internal
+ * \brief Translate a string into a value.
+ *
+ * This function translates the given string into a numeric value.
+ *
+ * \param[in] str The string to translate.
+ *
+ * \return The numeric value of the string.
+ */
+unsigned int
+value(const char *str)
+{
+ int i;
+ struct {
+ const char *name;
+ unsigned int value;
+ } map[] = {
+ { "SUCCESS", 0 }, /* error codes */
+ { "EINVAL", EINVAL },
+ { "ADDRTOOLONG", EV_ERR_ADDRTOOLONG },
+ { "ADDRINCOMPLETE", EV_ERR_ADDRINCOMPLETE },
+ { "INVALIDCHAR", EV_ERR_INVALIDCHAR },
+ { "COLONEXPECTED", EV_ERR_COLONEXPECTED },
+ { "BADADDR", EV_ERR_BADADDR },
+ { "NONE", AT_NONE }, /* address types */
+ { "LOCAL", AT_LOCAL },
+ { "IP4", AT_IPv4 },
+ { "IP6", AT_IPv6 },
+ { 0, 0 }
+ };
+
+ for (i = 0; map[i].name; i++) /* Search the name map */
+ if (!strcmp(map[i].name, str))
+ return map[i].value; /* found it, return the value */
+
+ return 0;
+}
+
+/** \internal
+ * \brief Socket address test program.
+ *
+ * This program is used for testing the event library's socket address
+ * manipulation routines.
+ */
+int
+main(int argc, char **argv)
+{
+ const char *ta = "/this/is/an/improbable/address";
+ char *prog;
+ ev_err_t err;
+ ev_sockaddr_t addr;
+ int len;
+
+ ev_test_init(t_sockaddr_fcns); /* initialize test program */
+ ev_prog_name(prog, argv);
+
+ /* Clear the socket addresses... */
+ memset(&addr, 0, sizeof(addr));
+
+ /***************************************************************************
+ * First task: Test the sa_* functions. *
+ ***************************************************************************/
+
+ /* Begin with AT_NONE--all except sa_type_set() should fail */
+ TEST(t_sockaddr_fcns, sa_none, "Test that AT_NONE addresses are rejected "
+ "by all sa_* functions except sa_type_set()",
+ (!(err = sa_type_set(&addr, AT_NONE)) && sa_type(&addr) == AT_NONE &&
+ sa_ipaddrbuf_set(&addr, ta) == EINVAL &&
+ sa_ipaddrport_set(&addr, 1234) == EINVAL &&
+ sa_localaddr_set(&addr, ta) == EINVAL), 0,
+ ("sa_type_set() properly set AT_NONE address type and other sa_* "
+ "functions rejected it"),
+ ("sa_type_set() failed to properly set AT_NONE address type or another "
+ "sa_* function failed to reject it; error code %u, address type %u",
+ err, sa_type(&addr)));
+
+ /* Now, try AT_IPv4--before AT_IPv6, note. */
+ TEST(t_sockaddr_fcns, sa_ipv4, "Test that sa_* functions handle IPv4 "
+ "addresses properly",
+ (!(err = sa_type_set(&addr, AT_IPv4)) && sa_type(&addr) == AT_IPv4 &&
+ !(err = sa_ipaddrbuf_set(&addr, ta)) &&
+ !(err = sa_ipaddrport_set(&addr, 1234)) &&
+ !memcmp(sa_ipaddrbuf(&addr), ta, SOCK_ADDRBUFV4_LEN) &&
+ sa_ipaddrbuf(&addr)[SOCK_ADDRBUFV4_LEN] == '\0' &&
+ sa_ipaddrport(&addr) == 1234 &&
+ sa_localaddr_set(&addr, ta) == EINVAL), 0,
+ ("sa_* functions handle IPv4 addresses properly"),
+ ("sa_* functions fail to handle IPv4 addresses properly; error "
+ "code %u, address type %u", err, sa_type(&addr)));
+
+ /* Next, let's try an AT_IPv6 address */
+ TEST(t_sockaddr_fcns, sa_ipv6, "Test that sa_* functions handle IPv6 "
+ "addresses properly",
+ (!(err = sa_type_set(&addr, AT_IPv6)) && sa_type(&addr) == AT_IPv6 &&
+ !(err = sa_ipaddrbuf_set(&addr, ta)) &&
+ !(err = sa_ipaddrport_set(&addr, 0)) &&
+ !memcmp(sa_ipaddrbuf(&addr), ta, SOCK_ADDRBUFV6_LEN) &&
+ /* Note that the memset() above enables this even in the case of
+ * structure padding. We have to set the port to 0 for the no-
+ * padding case in order to make this work.
+ */
+ sa_ipaddrbuf(&addr)[SOCK_ADDRBUFV6_LEN] == '\0' &&
+ sa_ipaddrport(&addr) == 0 &&
+ sa_localaddr_set(&addr, ta) == EINVAL), 0,
+ ("sa_* functions handle IPv6 addresses properly"),
+ ("sa_* functions fail to handle IPv6 addresses properly; error "
+ "code %u, address type %u", err, sa_type(&addr)));
+
+ /* Finally, let's try an AT_LOCAL address */
+ TEST(t_sockaddr_fcns, sa_local, "Test that sa_* functions handle local "
+ "addresses properly",
+ (!(err = sa_type_set(&addr, AT_LOCAL)) && sa_type(&addr) == AT_LOCAL &&
+ sa_ipaddrbuf_set(&addr, ta) == EINVAL &&
+ sa_ipaddrport_set(&addr, 1234) == EINVAL &&
+ !(err = sa_localaddr_set(&addr, ta)) &&
+ !strcmp(sa_localaddr(&addr), ta)), 0,
+ ("sa_* functions handle local addresses properly"),
+ ("sa_* functions fail to handle local addresses properly; error "
+ "code %u, address type %u", err, sa_type(&addr)));
+
+ /***************************************************************************
+ * Next: Test sockaddr_import() and sockaddr_export() *
+ ***************************************************************************/
+
+ TEST_DECL(t_sockaddr_fcns, sockaddr_import,
+ "Test that sockaddr_import() can import socket address structures")
+ TEST_DECL(t_sockaddr_fcns, sockaddr_export,
+ "Test that sockaddr_export() can export socket address structures")
+ do { /* allow us to break out of this test...and groups tests visually */
+ struct sockaddr_un sun_in, sun_out;
+ struct sockaddr_in sin_in, sin_out;
+#ifdef HAVE_SOCKADDR_IN6
+ struct sockaddr_in6 sin6_in, sin6_out;
+#endif /* HAVE_SOCKADDR_IN6 */
+
+ /* Clearing the socket address structures should allow memcmp() tests */
+ memset(&sun_in, 0, sizeof(sun_in));
+ memset(&sun_out, 0, sizeof(sun_out));
+ memset(&sin_in, 0, sizeof(sin_in));
+ memset(&sin_out, 0, sizeof(sin_out));
+#ifdef HAVE_SOCKADDR_IN6
+ memset(&sin6_in, 0, sizeof(sin6_in));
+ memset(&sin6_out, 0, sizeof(sin6_out));
+#endif /* HAVE_SOCKADDR_IN6 */
+
+ /* start with a test of AT_LOCAL--that's simple... */
+ sun_in.sun_family = AF_LOCAL;
+ strcpy(sun_in.sun_path, ta); /* copy the local address over */
+
+ /* Try an import */
+ if ((err = sockaddr_import(&addr, (struct sockaddr *)&sun_in)) ||
+ sa_type(&addr) != AT_LOCAL || strcmp(ta, sa_localaddr(&addr))) {
+ FAIL(TEST_NAME(sockaddr_import), 0,
+ "sockaddr_import() failed to import an AT_LOCAL address; "
+ "error code %u, address type %u", err, sa_type(&addr));
+ break; /* move on with the rest of the tests */
+ }
+
+ /* Next, try an export */
+ len = sizeof(sun_out);
+ if ((err = sockaddr_export(&addr, (struct sockaddr *)&sun_out, &len)) ||
+ len != (sizeof(sun_out) - SOCK_LOCALADDR_LEN + strlen(ta)) ||
+ memcmp(&sun_in, &sun_out, sizeof(sun_out))) {
+ FAIL(TEST_NAME(sockaddr_export), 0,
+ "sockaddr_export() failed to export an AT_LOCAL address; "
+ "error code %u", err);
+ break; /* move on with the rest of the tests */
+ }
+
+ /* Now, let's try an IPv4 address... */
+ sin_in.sin_family = AF_INET;
+ memcpy(&sin_in.sin_addr, ta, SOCK_ADDRBUFV4_LEN);
+ sin_in.sin_port = htons(1234); /* have to be able to test port # */
+
+ /* Try an import */
+ if ((err = sockaddr_import(&addr, (struct sockaddr *)&sin_in)) ||
+ sa_type(&addr) != AT_IPv4 ||
+ memcmp(ta, sa_ipaddrbuf(&addr), SOCK_ADDRBUFV4_LEN) ||
+ sa_ipaddrport(&addr) != 1234) {
+ FAIL(TEST_NAME(sockaddr_import), 0,
+ "sockaddr_import() failed to import an AT_IPv4 address; "
+ "error code %u, address type %u", err, sa_type(&addr));
+ break; /* move on with the rest of the tests */
+ }
+
+ /* Next, try an export */
+ len = sizeof(sin_out);
+ if ((err = sockaddr_export(&addr, (struct sockaddr *)&sin_out, &len)) ||
+ len != sizeof(sin_out) || memcmp(&sin_in, &sin_out, len)) {
+ FAIL(TEST_NAME(sockaddr_export), 0,
+ "sockaddr_export() failed to export an AT_IPv4 address; "
+ "error code %u", err);
+ break; /* move on with the rest of the tests */
+ }
+
+#ifdef HAVE_SOCKADDR_IN6
+ /* Finally, let's try an IPv6 address... */
+ sin6_in.sin6_family = AF_INET6;
+ memcpy(&sin6_in.sin6_addr, ta, SOCK_ADDRBUFV6_LEN);
+ sin6_in.sin6_port = htons(1234); /* have to be able to test port # */
+
+ /* Try an import */
+ if ((err = sockaddr_import(&addr, (struct sockaddr *)&sin6_in)) ||
+ sa_type(&addr) != AT_IPv6 ||
+ memcmp(ta, sa_ipaddrbuf(&addr), SOCK_ADDRBUFV6_LEN) ||
+ sa_ipaddrport(&addr) != 1234) {
+ FAIL(TEST_NAME(sockaddr_import), 0,
+ "sockaddr_import() failed to import an AT_IPv6 address; "
+ "error code %u, address type %u", err, sa_type(&addr));
+ break; /* move on with the rest of the tests */
+ }
+
+ /* Next, try an export */
+ len = sizeof(sin6_out);
+ if ((err = sockaddr_export(&addr, (struct sockaddr *)&sin6_out, &len)) ||
+ len != sizeof(sin6_out) || memcmp(&sin6_in, &sin6_out, len)) {
+ FAIL(TEST_NAME(sockaddr_export), 0,
+ "sockaddr_export() failed to export an AT_IPv6 address; "
+ "error code %u", err);
+ break; /* move on with the rest of the tests */
+ }
+#endif /* HAVE_SOCKADDR_IN6 */
+
+ /* Tests have been passed */
+ PASS(TEST_NAME(sockaddr_import),
+ "sockaddr_import() successfully imported socket addresses");
+ PASS(TEST_NAME(sockaddr_export),
+ "sockaddr_export() successfully exported socket addresses");
+ } while (0);
+
+ /***************************************************************************
+ * Finally: Test sockaddr_ptoa() and sockaddr_atop() *
+ ***************************************************************************/
+
+ TEST_DECL(t_sockaddr_fcns, sockaddr_ptoa,
+ "Test that sockaddr_ptoa() can process socket addresses")
+ TEST_DECL(t_sockaddr_fcns, sockaddr_atop,
+ "Test that sockaddr_atop() can display socket addresses")
+ {
+ char buf[512], presbuf[512], *t;
+ unsigned char addrbuf[SOCK_LOCALADDR_LEN];
+ ev_err_t exp;
+ ev_satype_t type;
+ int len, port;
+ FILE *df;
+
+ /* Just skip the tests if the data file isn't available */
+ if (argc < 2 || !(df = fopen(argv[1], "r")))
+ return 0;
+
+ /* read the data file... */
+ while ((t = fgets(buf, sizeof(buf), df))) {
+ if ((t = strchr(buf, '\r')) || (t = strchr(buf, '\n')))
+ *t = '\0'; /* chomp newline... */
+
+ if (buf[0] == '#' || !(t = strtok(buf, " \t")))
+ continue; /* skip empty lines and comments */
+
+ exp = value(t); /* what's the expected return value? */
+
+ if (!(t = strtok(0, " \t"))) { /* er... */
+ fprintf(stderr, "%s: Expected IP address reading datafile %s\n",
+ prog, argv[1]);
+ continue; /* skip the bogus line */
+ }
+
+ /* OK, let's try to parse it... */
+ if ((err = sockaddr_ptoa(&addr, t, -1)) != exp)
+ FAIL(TEST_NAME(sockaddr_ptoa), FATAL(0),
+ "sockaddr_ptoa() failed with unexpected error %u (expected %u)",
+ err, exp);
+
+ if (exp || /* expected failure, go on to next test input */
+ !(t = strtok(0, " \t"))) /* er, no verification data */
+ continue;
+
+ if (sa_type(&addr) != (type = value(t)))
+ FAIL(TEST_NAME(sockaddr_ptoa), FATAL(0),
+ "sockaddr_ptoa() parsed address type %u (expected %u)",
+ sa_type(&addr), type);
+
+ if (!(t = strtok(0, " \t"))) /* grab the address contents... */
+ continue; /* no contents, just skip it */
+
+ if (type == AT_LOCAL) { /* it's a local address */
+ if (strcmp(sa_localaddr(&addr), t)) /* compare to what we got */
+ FAIL(TEST_NAME(sockaddr_ptoa), FATAL(0),
+ "sockaddr_ptoa() parsed incorrect address: \"%s\" "
+ "(expected \"%s\")", sa_localaddr(&addr), t);
+ } else { /* IP address, have to decode it */
+ port = -1; /* initialize... */
+ memset(addrbuf, 0, sizeof(addrbuf));
+
+ /* decode the IP address... */
+ for (len = 0; *t && *t; t++, len++)
+ if (*t >= '0' && *t <= '9')
+ addrbuf[len >> 1] |= (*t - '0') << (!(len & 0x01) << 2);
+ else if (*t >= 'a' && *t <= 'f')
+ addrbuf[len >> 1] |= (*t - 'a' + 0x0a) << (!(len & 0x01) << 2);
+ else
+ break; /* unrecognized character */
+
+ if (*t == ':') /* got a port number specification */
+ port = atoi(t + 1); /* convert it */
+ else if (*t) {
+ fprintf(stderr, "%s: Invalid character in address string: %c\n",
+ prog, *t);
+ continue; /* skip this line */
+ }
+
+ if (memcmp(sa_ipaddrbuf(&addr), addrbuf, len >> 1) ||
+ (port > 0 && sa_ipaddrport(&addr) != port))
+ FAIL(TEST_NAME(sockaddr_ptoa), FATAL(0),
+ "sockaddr_ptoa() parsed incorrect address or port");
+ }
+
+ if (!(t = strtok(0, " \t"))) /* how about a presentation string? */
+ continue; /* nothing there, just move on */
+
+ /* try sockaddr_atop()... */
+ presbuf[0] = '\0';
+ if ((err = sockaddr_atop(&addr, presbuf, sizeof(presbuf), 0)) ||
+ strcmp(presbuf, t))
+ FAIL(TEST_NAME(sockaddr_atop), FATAL(0),
+ "sockaddr_atop() failed or incorrectly formatted address; "
+ "error code %u; expected: \"%s\"; got: \"%s\"", err, t,
+ presbuf);
+
+ /* Informational message */
+ fprintf(stderr, "%s: INFO: Address formats to: \"%s\"\n", prog,
+ presbuf);
+ }
+
+ /* All tests passed! */
+ PASS(TEST_NAME(sockaddr_ptoa),
+ "sockaddr_ptoa() correctly parsed addresses");
+ PASS(TEST_NAME(sockaddr_atop),
+ "sockaddr_atop() correctly formatted addresses");
+
+ fclose(df); /* close the data file */
+ }
+
+ return 0;
+}
Index: event/tests/test-harness.dat
diff -u event/tests/test-harness.dat:1.12 event/tests/test-harness.dat:1.13
--- event/tests/test-harness.dat:1.12 Thu Sep 15 11:14:11 2005
+++ event/tests/test-harness.dat Thu Dec 22 20:07:10 2005
@@ -15,11 +15,11 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: test-harness.dat,v 1.12 2005/09/15 18:14:11 klmitch Exp $
+** @(#)$Id: test-harness.dat,v 1.13 2005/12/23 04:07:10 klmitch Exp $
*/
# Created by test-harness.pl from these files: t_event_attrs.c t_event_init.c
# t_event_log.c t_evg_alloc.c t_evg_register.c t_signal_fcns.c
-# t_timer_fcns.c
+# t_sockaddr_fcns.c t_timer_fcns.c
program t_event_log t_event_log \
"Test operation of event_log_* functions"
@@ -174,6 +174,28 @@
test signal_destroy t_signal_fcns PASS \
"Test that signal_destroy() destroys a signal generator"
+program t_sockaddr_fcns t_sockaddr_fcns \
+ "Test operation of socket address manipulation functions" \
+ <t_sockaddr_fcns.addrs>
+t_sockaddr_fcns: t_event_log
+
+test sa_none t_sockaddr_fcns PASS \
+ "Test that AT_NONE addresses are rejected by all sa_* functions except sa_type_set()"
+test sa_ipv4 t_sockaddr_fcns PASS \
+ "Test that sa_* functions handle IPv4 addresses properly"
+test sa_ipv6 t_sockaddr_fcns PASS \
+ "Test that sa_* functions handle IPv6 addresses properly"
+test sa_local t_sockaddr_fcns PASS \
+ "Test that sa_* functions handle local addresses properly"
+test sockaddr_import t_sockaddr_fcns PASS \
+ "Test that sockaddr_import() can import socket address structures"
+test sockaddr_export t_sockaddr_fcns PASS \
+ "Test that sockaddr_export() can export socket address structures"
+test sockaddr_ptoa t_sockaddr_fcns PASS \
+ "Test that sockaddr_ptoa() can process socket addresses"
+test sockaddr_atop t_sockaddr_fcns PASS \
+ "Test that sockaddr_atop() can display socket addresses"
+
program t_timer_fcns t_timer_fcns \
"Test operation of timer manipulation functions" \
<event-test.tc> <engmodule.la>
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-12-18 00:15:42
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-12-18 00:15:28 UTC
Modified files:
ChangeLog _timer_heapify.c engine_activate.c engines.h
engines_int.h event.h event_gen_register.c event_init.c
event_int.h event_log.c gcc-attrs.h sig.h sock.h sockaddr_atop.c
sockaddr_ptoa.c tim.h tests/engmodinit.c tests/engmodule.c
tests/event-test.h tests/t_event_init.c tests/t_event_log.c
tests/t_evg_alloc.c tests/t_evg_register.c tests/t_timer_fcns.c
Log message:
add in/out specifications to \param directives
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.60 event/ChangeLog:1.61
--- event/ChangeLog:1.60 Wed Oct 26 05:53:59 2005
+++ event/ChangeLog Sat Dec 17 16:15:10 2005
@@ -1,3 +1,13 @@
+2005-12-17 Kevin L. Mitchell <kl...@mi...>
+
+ * engine_activate.c, engines.h, engines_int.h,
+ event_gen_register.c, event.h, event_init.h, event_log.c,
+ gcc-attrs.h, sig.h, sockaddr_atop.c, sockaddr_ptoa.c, sock.h,
+ tests/engmodinit.c, tests/engmodule.c, tests/event-test.h,
+ tests/t_event_init.c, tests/t_event_log.c, tests/t_evg_alloc.c,
+ tests/t_evg_register.c, tests/t_timer_fcns.c, _timer_heapify.c,
+ tim.h: add in/out specifications to \param directives
+
2005-10-26 Kevin L. Mitchell <kl...@mi...>
* sockaddr_ptoa.c: add sockaddr_ptoa() (and supporting
Index: event/_timer_heapify.c
diff -u event/_timer_heapify.c:1.6 event/_timer_heapify.c:1.7
--- event/_timer_heapify.c:1.6 Mon Jul 18 15:01:40 2005
+++ event/_timer_heapify.c Sat Dec 17 16:15:10 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: _timer_heapify.c,v 1.6 2005/07/18 22:01:40 klmitch Exp $
+** @(#)$Id: _timer_heapify.c,v 1.7 2005/12/18 00:15:10 klmitch Exp $
*/
/** \internal
* \file
@@ -28,7 +28,7 @@
*/
#include "event_int.h"
-RCSTAG("@(#)$Id: _timer_heapify.c,v 1.6 2005/07/18 22:01:40 klmitch Exp $");
+RCSTAG("@(#)$Id: _timer_heapify.c,v 1.7 2005/12/18 00:15:10 klmitch Exp $");
/** \internal
* \brief Swap a node with its parent.
@@ -36,9 +36,9 @@
* This helper function swaps a node with its parent, performing, in
* essence, a tree rotation.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param tim A pointer to an #ev_tim_t specifying the timer to
- * rotate up.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] tim A pointer to an #ev_tim_t specifying
+ * the timer to rotate up.
*
* \return Zero on success, non-zero if an assertion failure
* occurs.
Index: event/engine_activate.c
diff -u event/engine_activate.c:1.3 event/engine_activate.c:1.4
--- event/engine_activate.c:1.3 Mon Jul 18 15:01:40 2005
+++ event/engine_activate.c Sat Dec 17 16:15:10 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: engine_activate.c,v 1.3 2005/07/18 22:01:40 klmitch Exp $
+** @(#)$Id: engine_activate.c,v 1.4 2005/12/18 00:15:10 klmitch Exp $
*/
/** \internal
* \file
@@ -26,7 +26,7 @@
*/
#include "engines_int.h"
-RCSTAG("@(#)$Id: engine_activate.c,v 1.3 2005/07/18 22:01:40 klmitch Exp $");
+RCSTAG("@(#)$Id: engine_activate.c,v 1.4 2005/12/18 00:15:10 klmitch Exp $");
/** \internal
* \brief Link an engine into the specified active linked list.
@@ -34,11 +34,12 @@
* This helper macro simply links the specified engine into the
* specified active engine linked list.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param engine
- * A pointer to an #ev_engine_t specifying the engine to
- * link into the linked list.
- * \param comp A bare word indicating the component to link in.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] engine A pointer to an #ev_engine_t
+ * specifying the engine to link into the
+ * linked list.
+ * \param[in] comp A bare word indicating the component
+ * to link in.
*/
#define eng_link(ctx, engine, comp) \
do { \
Index: event/engines.h
diff -u event/engines.h:1.16 event/engines.h:1.17
--- event/engines.h:1.16 Tue Sep 13 20:45:36 2005
+++ event/engines.h Sat Dec 17 16:15:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: engines.h,v 1.16 2005/09/14 03:45:36 klmitch Exp $
+** @(#)$Id: engines.h,v 1.17 2005/12/18 00:15:11 klmitch Exp $
*/
#ifndef __include_event_engines_h__
#define __include_event_engines_h__
@@ -61,8 +61,9 @@
*
* This macro causes its arguments to be pasted together.
*
- * \param l The left side of the paste operation.
- * \param r The right side of the paste operation.
+ * \param[in] l The left side of the paste operation.
+ * \param[in] r The right side of the paste
+ * operation.
*/
#define _ev__p(l, r) l ## r
@@ -72,8 +73,9 @@
* This macro causes its arguments to be macro expanded, then pasted
* together by use of _ev__p().
*
- * \param l The left side of the paste operation.
- * \param r The right side of the paste operation.
+ * \param[in] l The left side of the paste operation.
+ * \param[in] r The right side of the paste
+ * operation.
*/
#define _ev_paste(l, r) _ev__p(l, r)
@@ -91,7 +93,7 @@
* #ENGINE_MODULE \em MUST be defined prior to any reference to
* engine_mod_init().
*
- * \param ctx A pointer to an #ev_ctx_t.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
*
* \return A pointer to the #ev_engine_t which will be
* initialized by event_init().
@@ -177,7 +179,7 @@
* #ev_engine_t named #engine_module; otherwise, event_init()
* will not be able to load the module.
*
- * \param ctx A pointer to an #ev_ctx_t.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
*
* \return A pointer to the #ev_engine_t which will be
* initialized by event_init().
@@ -190,13 +192,13 @@
* event engine. All engines \em MUST implement this method. This
* method should make calls to engine_activate().
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param engine
- * A pointer to the #ev_engine_t.
- * \param eng_flags
- * A pointer to an #ev_flags_t containing the desired
- * engine flags. This is a value-result parameter that
- * the engine is expected to modify.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] engine A pointer to the #ev_engine_t.
+ * \param[in,out] eng_flags
+ * A pointer to an #ev_flags_t containing
+ * the desired engine flags. This is a
+ * value-result parameter that the engine
+ * is expected to modify.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -209,13 +211,12 @@
* events by the engine. All engines \em MUST implement this method.
* This method should make calls to event_generate().
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param engine
- * A pointer to the #ev_engine_t.
- * \param timeout
- * A pointer to a struct timeval which will contain the
- * current timeout value. This is a value-result
- * parameter that the engine may modify.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] engine A pointer to the #ev_engine_t.
+ * \param[in,out] timeout A pointer to a struct timeval which
+ * will contain the current timeout
+ * value. This is a value-result
+ * parameter that the engine may modify.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -228,9 +229,8 @@
* event engine. Any engine allocating system resources \em SHOULD
* implement this method to do any necessary clean-up.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param engine
- * A pointer to the #ev_engine_t.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] engine A pointer to the #ev_engine_t.
*/
typedef void (*ev_fini_t)(ev_ctx_t *ctx, ev_engine_t *engine);
@@ -240,11 +240,10 @@
* socket with the event engine. Any engine implementing socket
* events \em MUST implement this method.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param engine
- * A pointer to the #ev_engine_t.
- * \param sock A pointer to an #ev_sock_t specifying the socket being
- * registered.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] engine A pointer to the #ev_engine_t.
+ * \param[in] sock A pointer to an #ev_sock_t specifying
+ * the socket being registered.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -257,11 +256,10 @@
* socket from the event engine. Any engine implementing socket
* events \em MUST implement this method.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param engine
- * A pointer to the #ev_engine_t.
- * \param sock A pointer to an #ev_sock_t specifying the socket being
- * removed.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] engine A pointer to the #ev_engine_t.
+ * \param[in] sock A pointer to an #ev_sock_t specifying
+ * the socket being removed.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -274,12 +272,12 @@
* interest set on a socket. Any engine implementing socket events
* \em MUST implement this method.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param engine
- * A pointer to the #ev_engine_t.
- * \param sock A pointer to an #ev_sock_t specifying the socket being
- * manipulated.
- * \param evs An #ev_flags_t specifying the events of interest.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] engine A pointer to the #ev_engine_t.
+ * \param[in] sock A pointer to an #ev_sock_t specifying
+ * the socket being manipulated.
+ * \param[in] evs An #ev_flags_t specifying the events
+ * of interest.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -292,11 +290,10 @@
* signal with the event engine. Any engine implementing signal
* events \em MUST implement this method.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param engine
- * A pointer to the #ev_engine_t.
- * \param sig A pointer to an #ev_sig_t specifying the signal being
- * registered.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] engine A pointer to the #ev_engine_t.
+ * \param[in] sig A pointer to an #ev_sig_t specifying
+ * the signal being registered.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -309,11 +306,10 @@
* signal from the event engine. Any engine implementing signal
* events \em MUST implement this method.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param engine
- * A pointer to the #ev_engine_t.
- * \param sig A pointer to an #ev_sig_t specifying the signal being
- * removed.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] engine A pointer to the #ev_engine_t.
+ * \param[in] sig A pointer to an #ev_sig_t specifying
+ * the signal being removed.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -326,11 +322,10 @@
* timer with the event engine. Any engine implementing timer
* events \em MUST implement this method.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param engine
- * A pointer to the #ev_engine_t.
- * \param tim A pointer to an #ev_tim_t specifying the timer being
- * registered.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] engine A pointer to the #ev_engine_t.
+ * \param[in] tim A pointer to an #ev_tim_t specifying
+ * the timer being registered.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -343,11 +338,10 @@
* timer from the event engine. Any engine implementing timer
* events \em MUST implement this method.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param engine
- * A pointer to the #ev_engine_t.
- * \param tim A pointer to an #ev_tim_t specifying the timer being
- * removed.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] engine A pointer to the #ev_engine_t.
+ * \param[in] tim A pointer to an #ev_tim_t specifying
+ * the timer being removed.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -433,52 +427,58 @@
*
* This macro is used to initialize an #ev_engine_t.
*
- * \param name Engine name.
- * \param desc Optional text description of the engine.
- * \param flags A bit-wise OR of #EV_ENGINE_SOCKET, #EV_ENGINE_SIGNAL,
- * and #EV_ENGINE_TIMER to indicate which components the
- * engine supports.
- *
- * \param init A function pointer compatible with the #ev_init_t
- * type. This method is responsible for initializing the
- * event engine.
- * \param poll A function pointer compatible with the #ev_poll_t
- * type. This method is responsible for polling for
- * events that have occurred.
- * \param fini A function pointer compatible with the #ev_fini_t
- * type. This method is responsible for cleaning up the
- * engine. This is an optional method.
- *
- * \param so_add
- * A function pointer compatible with the #ev_sockadd_t
- * type. This method is called to register a socket with
- * the event engine.
- * \param so_rem
- * A function pointer compatible with the #ev_sockrem_t
- * type. This method is called to remove a socket from
- * the event engine.
- * \param so_ev A function pointer compatible with the #ev_sockev_t
- * type. This method is called to change the set of
- * events the application is interested in for a
- * particular socket.
- *
- * \param si_add
- * A function pointer compatible with the #ev_sigadd_t
- * type. This method is called to register a signal with
- * the event engine.
- * \param si_rem
- * A function pointer compatible with the #ev_sigrem_t
- * type. This method is called to remove a signal from
- * the event engine.
- *
- * \param ti_add
- * A function pointer compatible with the #ev_timadd_t
- * type. This method is called to register a timer with
- * the event engine.
- * \param ti_rem
- * A function pointer compatible with the #ev_timrem_t
- * type. This method is called to remove a timer from
- * the event engine.
+ * \param[in] name Engine name.
+ * \param[in] desc Optional text description of the
+ * engine.
+ * \param[in] flags A bit-wise OR of #EV_ENGINE_SOCKET,
+ * #EV_ENGINE_SIGNAL, and
+ * #EV_ENGINE_TIMER to indicate which
+ * components the engine supports.
+ *
+ * \param[in] init A function pointer compatible with the
+ * #ev_init_t type. This method is
+ * responsible for initializing the event
+ * engine.
+ * \param[in] poll A function pointer compatible with the
+ * #ev_poll_t type. This method is
+ * responsible for polling for events
+ * that have occurred.
+ * \param[in] fini A function pointer compatible with the
+ * #ev_fini_t type. This method is
+ * responsible for cleaning up the
+ * engine. This is an optional method.
+ *
+ * \param[in] so_add A function pointer compatible with the
+ * #ev_sockadd_t type. This method is
+ * called to register a socket with the
+ * event engine.
+ * \param[in] so_rem A function pointer compatible with the
+ * #ev_sockrem_t type. This method is
+ * called to remove a socket from the
+ * event engine.
+ * \param[in] so_ev A function pointer compatible with the
+ * #ev_sockev_t type. This method is
+ * called to change the set of events the
+ * application is interested in for a
+ * particular socket.
+ *
+ * \param[in] si_add A function pointer compatible with the
+ * #ev_sigadd_t type. This method is
+ * called to register a signal with the
+ * event engine.
+ * \param[in] si_rem A function pointer compatible with the
+ * #ev_sigrem_t type. This method is
+ * called to remove a signal from the
+ * event engine.
+ *
+ * \param[in] ti_add A function pointer compatible with the
+ * #ev_timadd_t type. This method is
+ * called to register a timer with the
+ * event engine.
+ * \param[in] ti_rem A function pointer compatible with the
+ * #ev_timrem_t type. This method is
+ * called to remove a timer from the
+ * event engine.
*/
#define EV_ENGINE_INIT(name, desc, flags, init, poll, fini, so_add, so_rem, \
so_ev, si_add, si_rem, ti_add, ti_rem) \
@@ -548,7 +548,7 @@
*
* \warning This macro evaluates the \p eng argument twice.
*
- * \param eng A pointer to an #ev_engine_t.
+ * \param[in] eng A pointer to an #ev_engine_t.
*
* \return Boolean true if \p ctx is a valid event engine or
* false otherwise.
@@ -559,7 +559,7 @@
*
* This macro retrieves the engine name for the #ev_engine_t.
*
- * \param eng A pointer to an #ev_engine_t.
+ * \param[in] eng A pointer to an #ev_engine_t.
*
* \return The name of the #ev_engine_t.
*/
@@ -569,7 +569,7 @@
*
* This macro retrieves the engine description for the #ev_engine_t.
*
- * \param eng A pointer to an #ev_engine_t.
+ * \param[in] eng A pointer to an #ev_engine_t.
*
* \return The description of the #ev_engine_t.
*/
@@ -579,7 +579,7 @@
*
* This macro retrieves the engine flags for the #ev_engine_t.
*
- * \param eng A pointer to an #ev_engine_t.
+ * \param[in] eng A pointer to an #ev_engine_t.
*
* \return The engine flags of the #ev_engine_t.
*/
@@ -590,7 +590,7 @@
* This macro retrieves the run flags for a running engine's
* #ev_engine_t.
*
- * \param eng A pointer to an #ev_engine_t.
+ * \param[in] eng A pointer to an #ev_engine_t.
*
* \return The run flags of the #ev_engine_t.
*/
@@ -601,8 +601,8 @@
* This macro sets a specific (or a set of specific) run flags on the
* given #ev_engine_t.
*
- * \param eng A pointer to an #ev_engine_t.
- * \param fl A set of run flags to set.
+ * \param[in] eng A pointer to an #ev_engine_t.
+ * \param[in] fl A set of run flags to set.
*/
#define eng_runfl_set(eng, fl) ((eng)->eng_runfl |= (fl))
@@ -611,8 +611,8 @@
* This macro clears a specific (or a set of specific) run flags on
* the given #ev_engine_t.
*
- * \param eng A pointer to an #ev_engine_t.
- * \param fl A set of run flags to clear.
+ * \param[in] eng A pointer to an #ev_engine_t.
+ * \param[in] fl A set of run flags to clear.
*/
#define eng_runfl_clr(eng, fl) ((eng)->eng_runfl &= ~(fl))
@@ -620,7 +620,7 @@
*
* This macro retrieves the engine-specific data for the given engine.
*
- * \param eng A pointer to an #ev_engine_t.
+ * \param[in] eng A pointer to an #ev_engine_t.
*
* \return A pointer to \c void specifying the engine-specific
* data for the given engine.
@@ -631,9 +631,10 @@
*
* This macro sets the engine-specific data for the given engine.
*
- * \param eng A pointer to an #ev_engine_t.
- * \param data A pointer to \c void specifying the engine-specific
- * data for the given engine.
+ * \param[in] eng A pointer to an #ev_engine_t.
+ * \param[in] data A pointer to \c void specifying the
+ * engine-specific data for the given
+ * engine.
*/
#define eng_data_set(eng, data) ((eng)->eng_data = (data))
@@ -641,7 +642,7 @@
*
* This macro retrieves the socket-specific data for the given engine.
*
- * \param eng A pointer to an #ev_engine_t.
+ * \param[in] eng A pointer to an #ev_engine_t.
*
* \return A pointer to \c void specifying the socket-specific
* data for the given engine.
@@ -652,9 +653,10 @@
*
* This macro sets the socket-specific data for the given engine.
*
- * \param eng A pointer to an #ev_engine_t.
- * \param data A pointer to \c void specifying the socket-specific
- * data for the given engine.
+ * \param[in] eng A pointer to an #ev_engine_t.
+ * \param[in] data A pointer to \c void specifying the
+ * socket-specific data for the given
+ * engine.
*/
#define eng_sockdata_set(eng, data) \
((eng)->eng_socket.eso_data = (data))
@@ -663,7 +665,7 @@
*
* This macro retrieves the signal-specific data for the given engine.
*
- * \param eng A pointer to an #ev_engine_t.
+ * \param[in] eng A pointer to an #ev_engine_t.
*
* \return A pointer to \c void specifying the signal-specific
* data for the given engine.
@@ -674,9 +676,10 @@
*
* This macro sets the signal-specific data for the given engine.
*
- * \param eng A pointer to an #ev_engine_t.
- * \param data A pointer to \c void specifying the signal-specific
- * data for the given engine.
+ * \param[in] eng A pointer to an #ev_engine_t.
+ * \param[in] data A pointer to \c void specifying the
+ * signal-specific data for the given
+ * engine.
*/
#define eng_sigdata_set(eng, data) \
((eng)->eng_signal.esi_data = (data))
@@ -685,7 +688,7 @@
*
* This macro retrieves the timer-specific data for the given engine.
*
- * \param eng A pointer to an #ev_engine_t.
+ * \param[in] eng A pointer to an #ev_engine_t.
*
* \return A pointer to \c void specifying the timer-specific
* data for the given engine.
@@ -696,9 +699,10 @@
*
* This macro sets the timer-specific data for the given engine.
*
- * \param eng A pointer to an #ev_engine_t.
- * \param data A pointer to \c void specifying the timer-specific
- * data for the given engine.
+ * \param[in] eng A pointer to an #ev_engine_t.
+ * \param[in] data A pointer to \c void specifying the
+ * timer-specific data for the given
+ * engine.
*/
#define eng_timdata_set(eng, data) \
((eng)->eng_timer.eti_data = (data))
@@ -711,10 +715,10 @@
*
* \test This function is tested in t_event_init.c.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param engine
- * A pointer to an #ev_engine_t representing the
- * engine to be registered.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] engine A pointer to an #ev_engine_t
+ * representing the engine to be
+ * registered.
*
* \retval EINVAL An invalid argument was given.
* \retval EBUSY Engine already registered.
@@ -730,13 +734,15 @@
*
* \test This function is tested in t_event_init.c.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param engine
- * A pointer to an #ev_engine_t representing the engine
- * to be activated.
- * \param comps A bit-wise OR of #EV_ENGINE_SOCKET, #EV_ENGINE_SIGNAL,
- * and #EV_ENGINE_TIMER to indicate which components the
- * engine is to be activated for.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] engine A pointer to an #ev_engine_t
+ * representing the engine to be
+ * activated.
+ * \param[in] comps A bit-wise OR of #EV_ENGINE_SOCKET,
+ * #EV_ENGINE_SIGNAL, and
+ * #EV_ENGINE_TIMER to indicate which
+ * components the engine is to be
+ * activated for.
*
* \retval EINVAL An invalid argument was given.
*/
@@ -754,10 +760,10 @@
*
* \test This function is tested in t_event_init.c.
*
- * \param attr A pointer to an #ev_attr_t.
- * \param engine
- * A pointer to an #ev_engine_t representing the
- * application-specific engine to be registered.
+ * \param[in] attr A pointer to an #ev_attr_t.
+ * \param[in] engine A pointer to an #ev_engine_t
+ * representing the application-specific
+ * engine to be registered.
*
* \retval EINVAL An invalid argument was given.
* \retval EBUSY Engine already registered.
Index: event/engines_int.h
diff -u event/engines_int.h:1.11 event/engines_int.h:1.12
--- event/engines_int.h:1.11 Tue Sep 13 20:45:36 2005
+++ event/engines_int.h Sat Dec 17 16:15:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: engines_int.h,v 1.11 2005/09/14 03:45:36 klmitch Exp $
+** @(#)$Id: engines_int.h,v 1.12 2005/12/18 00:15:11 klmitch Exp $
*/
#ifndef __include_engine_int_h__
#define __include_engine_int_h__
@@ -41,11 +41,12 @@
*
* \warning This macro evaluates the \p eng parameter twice.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param eng A pointer to the #ev_engine_t.
- * \param flags A pointer to an #ev_flags_t containing desired engine
- * flags. This is a value-result parameter that the
- * engine is expected to modify.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] eng A pointer to the #ev_engine_t.
+ * \param[in,out] flags A pointer to an #ev_flags_t containing
+ * desired engine flags. This is a
+ * value-result parameter that the engine
+ * is expected to modify.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -60,11 +61,12 @@
*
* \warning This macro evaluates the \p eng parameter twice.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param eng A pointer to the #ev_engine_t.
- * \param timeo A pointer to a struct timeval which will contain the
- * current timeout value. This is a value-result
- * parameter that the engine may modify.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] eng A pointer to the #ev_engine_t.
+ * \param[in,out] timeo A pointer to a struct timeval which
+ * will contain the current timeout
+ * value. This is a value-result
+ * parameter that the engine may modify.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -78,9 +80,10 @@
*
* \warning This macro evaluates the \p eng parameter twice.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param eng A pointer to the #ev_engine_t. The engine may not be
- * used after this call.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] eng A pointer to the #ev_engine_t. The
+ * engine may not be used after this
+ * call.
*/
#define eng_fini(ctx, eng) ((eng)->eng_fini)((ctx), (eng))
@@ -92,10 +95,10 @@
*
* \warning This macro evaluates the \p eng parameter twice.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param eng A pointer to the #ev_engine_t.
- * \param sock A pointer to an #ev_sock_t specifying the socket being
- * registered.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] eng A pointer to the #ev_engine_t.
+ * \param[in] sock A pointer to an #ev_sock_t specifying
+ * the socket being registered.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -111,10 +114,10 @@
*
* \warning This macro evaluates the \p eng parameter twice.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param eng A pointer to the #ev_engine_t.
- * \param sock A pointer to an #ev_sock_t specifying the socket being
- * unregistered.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] eng A pointer to the #ev_engine_t.
+ * \param[in] sock A pointer to an #ev_sock_t specifying
+ * the socket being unregistered.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -130,11 +133,12 @@
*
* \warning This macro evaluates the \p eng parameter twice.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param eng A pointer to the #ev_engine_t.
- * \param sock A pointer to an #ev_sock_t which is having its event
- * set changed.
- * \param evs An #ev_flags_t specifying the events of interest.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] eng A pointer to the #ev_engine_t.
+ * \param[in] sock A pointer to an #ev_sock_t which is
+ * having its event set changed.
+ * \param[in] evs An #ev_flags_t specifying the events
+ * of interest.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -150,10 +154,10 @@
*
* \warning This macro evaluates the \p eng parameter twice.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param eng A pointer to the #ev_engine_t.
- * \param sig A pointer to an #ev_sig_t specifying the signal being
- * registered.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] eng A pointer to the #ev_engine_t.
+ * \param[in] sig A pointer to an #ev_sig_t specifying
+ * the signal being registered.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -169,10 +173,10 @@
*
* \warning This macro evaluates the \p eng parameter twice.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param eng A pointer to the #ev_engine_t.
- * \param sig A pointer to an #ev_sig_t specifying the signal being
- * registered.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] eng A pointer to the #ev_engine_t.
+ * \param[in] sig A pointer to an #ev_sig_t specifying
+ * the signal being registered.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -188,10 +192,10 @@
*
* \warning This macro evaluates the \p eng parameter twice.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param eng A pointer to the #ev_engine_t.
- * \param tim A pointer to an #ev_tim_t specifying the timer being
- * registered.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] eng A pointer to the #ev_engine_t.
+ * \param[in] tim A pointer to an #ev_tim_t specifying
+ * the timer being registered.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -208,10 +212,10 @@
*
* \warning This macro evaluates the \p eng parameter twice.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param eng A pointer to the #ev_engine_t.
- * \param tim A pointer to an #ev_tim_t specifying the timer being
- * registered.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] eng A pointer to the #ev_engine_t.
+ * \param[in] tim A pointer to an #ev_tim_t specifying
+ * the timer being registered.
*
* \return A non-zero error code, or 0 on success.
*/
@@ -225,7 +229,8 @@
*
* This helper macro simply zeros an #_ev_englink_t structure.
*
- * \param ptr A pointer to an #_ev_englink_t to be cleared.
+ * \param[in] ptr A pointer to an #_ev_englink_t to be
+ * cleared.
*/
#define englink_clr(ptr) \
do { \
Index: event/event.h
diff -u event/event.h:1.28 event/event.h:1.29
--- event/event.h:1.28 Mon Oct 24 18:46:17 2005
+++ event/event.h Sat Dec 17 16:15:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event.h,v 1.28 2005/10/25 01:46:17 klmitch Exp $
+** @(#)$Id: event.h,v 1.29 2005/12/18 00:15:11 klmitch Exp $
*/
#ifndef __include_event_event_h__
#define __include_event_event_h__
@@ -167,7 +167,7 @@
#endif
/** \defgroup event Core event system.
- *
+ *
* The core event system includes the basic interfaces for event
* generation and handling. The first thing that must be done in this
* interface is to initialize an event context, using the event_init()
@@ -331,10 +331,12 @@
* is being called, along with a generic pointer for user-defined
* data.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param event A pointer to an #event_t specifying the event.
- * \param data A pointer to \c void containing auxiliary data for the
- * callback function.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] event A pointer to an #event_t specifying
+ * the event.
+ * \param[in] data A pointer to \c void containing
+ * auxiliary data for the callback
+ * function.
*/
typedef void (*ev_call_t)(ev_ctx_t *ctx, event_t *event, void *data);
@@ -349,11 +351,12 @@
* event_log_set(), event_log_reset(), event_log_debug(), and
* event_log_trace().
*
- * \param file The file name.
- * \param line The line number in the file.
- * \param func The name of the containing function, or \c NULL if
- * function names are not available.
- * \param msg The log message.
+ * \param[in] file The file name.
+ * \param[in] line The line number in the file.
+ * \param[in] func The name of the containing function,
+ * or \c NULL if function names are not
+ * available.
+ * \param[in] msg The log message.
*/
typedef void (*ev_log_t)(const char *file, int line, const char *func,
const char *msg);
@@ -365,9 +368,9 @@
* may be called. This type is a pointer to a generator-specific
* release function for active generators.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param gen A pointer to \c void specifying the generator to be
- * released.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] gen A pointer to \c void specifying the
+ * generator to be released.
*/
typedef void (*ev_freegen_t)(ev_ctx_t *ctx, void *gen);
@@ -432,7 +435,7 @@
*
* \warning This macro evaluates the \p ctx argument twice.
*
- * \param ctx A pointer to an #ev_ctx_t.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
*
* \return Boolean true if \p ctx is a valid event context or
* false otherwise.
@@ -443,7 +446,7 @@
*
* This macro retrieves the flags set for the #ev_ctx_t.
*
- * \param ctx A pointer to an #ev_ctx_t.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
*
* \return The flags set for the #ev_ctx_t.
*/
@@ -454,7 +457,7 @@
* This macro retrieves the application name set with the call to
* event_init().
*
- * \param ctx A pointer to an #ev_ctx_t.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
*
* \return A pointer to a constant string containing the
* application name.
@@ -467,7 +470,7 @@
* current configuration of the library. See the #treeconf_ctx_t
* documentation for more information.
*
- * \param ctx A pointer to an #ev_ctx_t.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
*
* \return A pointer to a #treeconf_ctx_t containing the library
* configuration.
@@ -507,7 +510,7 @@
*
* \warning This macro evaluates the \p event argument twice.
*
- * \param event A pointer to an #event_t.
+ * \param[in] event A pointer to an #event_t.
*
* \return Boolean true if \p event is a valid event or false
* otherwise.
@@ -518,7 +521,7 @@
*
* This macro retrieves the context from the given \p event.
*
- * \param event A pointer to an #event_t.
+ * \param[in] event A pointer to an #event_t.
*
* \return A pointer to an #ev_ctx_t.
*/
@@ -528,7 +531,7 @@
*
* This macro retrieves the event type from the given \p event.
*
- * \param event A pointer to an #event_t.
+ * \param[in] event A pointer to an #event_t.
*
* \return An integer specifying a value in #ev_type_t or a
* library-defined or user-defined event type.
@@ -540,7 +543,7 @@
* This macro retrieves the responsible generator from the given \p
* event.
*
- * \param event A pointer to an #event_t.
+ * \param[in] event A pointer to an #event_t.
*
* \return A pointer to an #ev_genhdr_t describing the generator
* of the event.
@@ -553,7 +556,7 @@
* given \p event, if any. It is one of the values in
* #ev_paramtype_t.
*
- * \param event A pointer to an #event_t.
+ * \param[in] event A pointer to an #event_t.
*
* \return A value consistent with #ev_paramtype_t.
*/
@@ -563,7 +566,7 @@
*
* This macro retrieves an integer parameter from the given \p event.
*
- * \param event A pointer to an #event_t.
+ * \param[in] event A pointer to an #event_t.
*
* \return An integer associated with the event.
*/
@@ -573,7 +576,7 @@
*
* This macro retrieves a pointer parameter from the given \p event.
*
- * \param event A pointer to an #event_t.
+ * \param[in] event A pointer to an #event_t.
*
* \return A pointer associated with the event.
*/
@@ -621,8 +624,8 @@
* This macro retrieves a pointer to an #ev_genhdr_t given a
* generator. (All generators \em MUST begin with an #ev_genhdr_t!)
*
- * \param gen A pointer to a structure beginning with an
- * #ev_genhdr_t.
+ * \param[in] gen A pointer to a structure beginning
+ * with an #ev_genhdr_t.
*
* \return A pointer to an #ev_genhdr_t.
*/
@@ -635,8 +638,9 @@
*
* \warning This macro evaluates the \p gen argument twice.
*
- * \param gen A pointer to an #ev_genhdr_t.
- * \param magic A magic number for the specific type of generator.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
+ * \param[in] magic A magic number for the specific type
+ * of generator.
*
* \return Boolean true if \p gen is a valid generator with the
* given \p magic or false otherwise.
@@ -651,7 +655,7 @@
*
* \warning This macro evaluates the \p gen argument twice.
*
- * \param gen A pointer to an #ev_genhdr_t.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
*
* \return An integer describing the type of generator.
*/
@@ -661,7 +665,7 @@
*
* This macro returns the flags set for the generator.
*
- * \param gen A pointer to an #ev_genhdr_t.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
*
* \return The flags set for the #ev_genhdr_t.
*/
@@ -672,8 +676,8 @@
* This macro sets a specific (or a set of specific) flags on the
* given generator.
*
- * \param gen A pointer to an #ev_genhdr_t.
- * \param fl A set of flags to set.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
+ * \param[in] fl A set of flags to set.
*/
#define eg_flags_set(gen, fl) (_eg_hdr(gen)->eg_flags |= (fl))
@@ -682,8 +686,8 @@
* This macro clears a specific (or a set of specific) flags on the
* given generator.
*
- * \param gen A pointer to an #ev_genhdr_t.
- * \param fl A set of flags to clear.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
+ * \param[in] fl A set of flags to clear.
*/
#define eg_flags_clr(gen, fl) (_eg_hdr(gen)->eg_flags &= ~(fl))
@@ -692,7 +696,7 @@
* This macro returns a pointer to the next generator in the generator
* linked list.
*
- * \param gen A pointer to an #ev_genhdr_t.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
*
* \return A pointer to the next #ev_genhdr_t.
*/
@@ -703,7 +707,7 @@
* This macro returns a pointer to the previous generator in the
* generator linked list.
*
- * \param gen A pointer to an #ev_genhdr_t.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
*
* \return A pointer to the previous #ev_genhdr_t.
*/
@@ -714,7 +718,7 @@
* This macro returns a pointer to the context associated with the
* generator.
*
- * \param gen A pointer to an #ev_genhdr_t.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
*
* \return A pointer to an #ev_ctx_t.
*/
@@ -724,7 +728,7 @@
*
* This macro returns the reference count for the generator.
*
- * \param gen A pointer to an #ev_genhdr_t.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
*
* \return An <CODE>unsigned int</CODE> specifying the current
* reference count for the generator.
@@ -736,8 +740,8 @@
* This macro simply increments the reference count for the
* generator.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param gen A pointer to an #ev_genhdr_t.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
*/
#define eg_ref_inc(ctx, gen) (_eg_hdr(gen)->eg_ref++)
@@ -747,8 +751,8 @@
* reference count hits zero and the #EV_GEN_DELETED flag is set, the
* generator will be released by a call to event_gen_release().
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param gen A pointer to an #ev_genhdr_t.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
*/
#define eg_ref_dec(ctx, gen) \
do { \
@@ -762,7 +766,7 @@
* This macro returns a pointer to the event callback function for the
* generator.
*
- * \param gen A pointer to an #ev_genhdr_t.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
*
* \return An #ev_call_t, a pointer to a callback function.
*/
@@ -772,8 +776,9 @@
*
* This macro may be used to set the generator callback function.
*
- * \param gen A pointer to an #ev_genhdr_t.
- * \param call An #ev_call_t pointing to the callback function.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
+ * \param[in] call An #ev_call_t pointing to the callback
+ * function.
*/
#define eg_callback_set(gen, call) \
(_eg_hdr(gen)->eg_callback = (call))
@@ -784,7 +789,7 @@
* passed to the event callback function. It may be used as an lvalue
* to set this data.
*
- * \param gen A pointer to an #ev_genhdr_t.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
*
* \return A pointer to \c void containing the callback function
* data.
@@ -796,9 +801,9 @@
* This macro may be used to set the generator callback function
* data.
*
- * \param gen A pointer to an #ev_genhdr_t.
- * \param data A pointer to \c void containing the callback function
- * data.
+ * \param[in] gen A pointer to an #ev_genhdr_t.
+ * \param[in] data A pointer to \c void containing the
+ * callback function data.
*/
#define eg_calldata_set(gen, data) \
(_eg_hdr(gen)->eg_calldata = (data))
@@ -817,21 +822,24 @@
*
* \test This function is tested in t_event_init.c.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param attr A pointer to an #ev_attr_t containing library
- * options. If \c NULL is passed, the library defaults
- * will be used.
- * \param flags A bit-wise OR of 0 or more flags.
- * \param prog A pointer to the name of the current program. This
- * pointer must \em not go out of scope. It is advised
- * to use a string literal or memory allocated with
- * malloc().
- * \param envpath
- * A pointer to a colon-separated list of configuration
- * files to be located and loaded. If \c NULL, a
- * compiled-in default will be used. Note that an empty
- * element in the list will also cause the default list
- * to be searched.
+ * \param[in,out] ctx A pointer to an #ev_ctx_t.
+ * \param[in] attr A pointer to an #ev_attr_t containing
+ * library options. If \c NULL is
+ * passed, the library defaults will be
+ * used.
+ * \param[in] flags A bit-wise OR of 0 or more flags.
+ * \param[in] prog A pointer to the name of the current
+ * program. This pointer must \em not go
+ * out of scope. It is advised to use a
+ * string literal or memory allocated
+ * with malloc().
+ * \param[in] envpath A pointer to a colon-separated list of
+ * configuration files to be located and
+ * loaded. If \c NULL, a compiled-in
+ * default will be used. Note that an
+ * empty element in the list will also
+ * cause the default list to be
+ * searched.
*
* \retval EINVAL An invalid argument was given.
* \retval ENOMEM Out of memory.
@@ -853,7 +861,8 @@
*
* \test This function is tested in t_event_init.c.
*
- * \param ctx A pointer to an #ev_ctx_t to be destroyed.
+ * \param[in] ctx A pointer to an #ev_ctx_t to be
+ * destroyed.
*
* \retval EINVAL An invalid argument was given.
* \retval EBUSY Context is actively running.
@@ -881,7 +890,7 @@
*
* \test This function is tested in t_event_attrs.c.
*
- * \param attr A pointer to an #ev_attr_t.
+ * \param[in,out] attr A pointer to an #ev_attr_t.
*
* \retval EINVAL An invalid argument was given.
* \retval ENOMEM Out of memory.
@@ -898,14 +907,17 @@
*
* \test This function is tested in t_event_attrs.c.
*
- * \param attr A pointer to an #ev_attr_t.
- * \param path This is a value-result parameter. On return, \p path
- * will be modified to point to the original value of the
- * \c confpath attribute. If the pointer \p path pointed
- * to was \c NULL, no other action is taken; otherwise,
- * the \c confpath attribute will now be this value.
- * Note that this string value is \em not copied; the
- * pointer MUST NOT go out of scope.
+ * \param[in] attr A pointer to an #ev_attr_t.
+ * \param[in,out] path This is a value-result parameter. On
+ * return, \p path will be modified to
+ * point to the original value of the \c
+ * confpath attribute. If the pointer \p
+ * path pointed to was \c NULL, no other
+ * action is taken; otherwise, the \c
+ * confpath attribute will now be this
+ * value. Note that this string value is
+ * \em not copied; the pointer MUST NOT
+ * go out of scope.
*
* \retval EINVAL An invalid argument was given.
*/
@@ -921,14 +933,17 @@
*
* \test This function is tested in t_event_attrs.c.
*
- * \param attr A pointer to an #ev_attr_t.
- * \param path This is a value-result parameter. On return, \p path
- * will be modified to point to the original value of the
- * \c libpath attribute. If the pointer \p path pointed
- * to was \c NULL, no other action is taken; otherwise,
- * the \c libpath attribute will now be this value. Note
- * that this string value is \em not copied; the pointer
- * MUST NOT go out of scope.
+ * \param[in] attr A pointer to an #ev_attr_t.
+ * \param[in,out] path This is a value-result parameter. On
+ * return, \p path will be modified to
+ * point to the original value of the \c
+ * libpath attribute. If the pointer \p
+ * path pointed to was \c NULL, no other
+ * action is taken; otherwise, the \c
+ * libpath attribute will now be this
+ * value. Note that this string value is
+ * \em not copied; the pointer MUST NOT
+ * go out of scope.
*
* \retval EINVAL An invalid argument was given.
*/
@@ -944,14 +959,17 @@
*
* \test This function is tested in t_event_attrs.c.
*
- * \param attr A pointer to an #ev_attr_t.
- * \param list This is a value-result parameter. On return, \p list
- * will be modified to point to the original value of the
- * \c modlist attribute. If the pointer \p list pointed
- * to was \c NULL, no other action is taken; otherwise,
- * the \c modlist attribute will now be this value. Note
- * that this string value is \em not copied; the pointer
- * MUST NOT go out of scope.
+ * \param[in] attr A pointer to an #ev_attr_t.
+ * \param[in,out] list This is a value-result parameter. On
+ * return, \p list will be modified to
+ * point to the original value of the \c
+ * modlist attribute. If the pointer \p
+ * list pointed to was \c NULL, no other
+ * action is taken; otherwise, the \c
+ * modlist attribute will now be this
+ * value. Note that this string value is
+ * \em not copied; the pointer MUST NOT
+ * go out of scope.
*
* \retval EINVAL An invalid argument was given.
*/
@@ -967,22 +985,25 @@
*
* \test This function is tested in t_event_attrs.c.
*
- * \param attr A pointer to an #ev_attr_t.
- * \param name A pointer to \c char indicating the fully-qualified
- * name of the configuration variable.
- * \param def A pointer to \c char indicating the default value of
- * the configuration variable. If \c NULL, a tree node
- * will be created.
- * \param nodown
- * A #treeconf_nodown_t function pointer. See the
- * documentation for tc_register() for more information
- * about this parameter.
- * \param change
- * A #treeconf_change_t function pointer. See the
- * documentation for tc_register() for more information
- * about this parameter.
- * \param assoc A pointer to \c void containing application-specific
- * association data.
+ * \param[in] attr A pointer to an #ev_attr_t.
+ * \param[in] name A pointer to \c char indicating the
+ * fully-qualified name of the
+ * configuration variable.
+ * \param[in] def A pointer to \c char indicating the
+ * default value of the configuration
+ * variable. If \c NULL, a tree node
+ * will be created.
+ * \param[in] nodown A #treeconf_nodown_t function pointer.
+ * See the documentation for
+ * tc_register() for more information
+ * about this parameter.
+ * \param[in] change A #treeconf_change_t function pointer.
+ * See the documentation for
+ * tc_register() for more information
+ * about this parameter.
+ * \param[in] assoc A pointer to \c void containing
+ * application-specific association
+ * data.
*
* \retval EINVAL An invalid argument was given.
* \retval ENOMEM Out of memory.
@@ -1003,12 +1024,14 @@
*
* \test This function is tested in t_event_attrs.c.
*
- * \param attr A pointer to an #ev_attr_t.
- * \param name A pointer to \c char indicating the fully-qualified
- * name of the configuration variable.
- * \param value A pointer to \c char indicating the desired value of
- * the configuration variable. If \c NULL, the variable
- * will be reset to its default value.
+ * \param[in] attr A pointer to an #ev_attr_t.
+ * \param[in] name A pointer to \c char indicating the
+ * fully-qualified name of the
+ * configuration variable.
+ * \param[in] value A pointer to \c char indicating the
+ * desired value of the configuration
+ * variable. If \c NULL, the variable
+ * will be reset to its default value.
*
* \retval EINVAL An invalid argument was given.
* \retval ENOMEM Out of memory.
@@ -1024,7 +1047,7 @@
*
* \test This function is tested in t_event_attrs.c.
*
- * \param attr A pointer to an #ev_attr_t.
+ * \param[in] attr A pointer to an #ev_attr_t.
*
* \retval EINVAL An invalid argument was given.
*/
@@ -1039,18 +1062,16 @@
*
* \test This function is tested in t_evg_register.c.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param gentype
- * A generator type; one of the values from
- * #ev_gentype_t, or a user-allocated offset from
- * #EGT_USER.
- * \param genmagic
- * The magic number used by the generator.
- * \param gensize
- * The size of the generator structure.
- * \param genrel
- * A function to release a generator from
- * event_destroy().
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] gentype A generator type; one of the values
+ * from #ev_gentype_t, or a
+ * user-allocated offset from #EGT_USER.
+ * \param[in] genmagic
+ * The magic number used by the
+ * generator.
+ * \param[in] gensize The size of the generator structure.
+ * \param[in] genrel A function to release a generator from
+ * event_destroy().
*
* \retval EINVAL An invalid argument was given.
* \retval ENOMEM Out of memory.
@@ -1071,15 +1092,16 @@
*
* \test This function is tested in t_evg_alloc.c.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param gentype
- * A generator type previously passed to
- * event_gen_register().
- * \param gen A pointer to a pointer to an event generator
- * structure, which will be used to return the allocated
- * generator to the caller. Note that the argument type
- * is pointer to \c void to stomp a warning having to do
- * with strict aliasing in C99.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] gentype A generator type previously passed to
+ * event_gen_register().
+ * \param[in,out] gen A pointer to a pointer to an event
+ * generator structure, which will be
+ * used to return the allocated generator
+ * to the caller. Note that the argument
+ * type is pointer to \c void to stomp a
+ * warning having to do with strict
+ * aliasing in C99.
*
* \retval EINVAL An invalid argument was given.
* \retval ENOENT No such generator has been
@@ -1097,9 +1119,9 @@
*
* \test This function is tested in t_evg_alloc.c.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param gen A pointer to an #ev_genhdr_t to be released to the
- * system.
+ * \param[in] ctx A pointer to an #ev_ctx_t.
+ * \param[in] gen A pointer to an #ev_genhdr_t to be
+ * released to the system.
*
* \retval EINVAL An invalid argument was given.
* \retval ENOENT No such generator has been
@@ -1117,9 +1139,8 @@
*
* \test This function is tested in t_event_log.c.
*
- * \param logger
- * An #ev_log_t pointing to a user-defined logging
- * function.
+ * \param[in] logger An #ev_log_t pointing to a
+ * user-defined logging function.
*/
extern ev_err_t event_log_set(ev_log_t logger);
@@ -1143,9 +1164,9 @@
*
* \test This function is tested in t_event_log.c.
*
- * \param onoff A \c TRUE value if debug logging is desired;
- * otherwise, a \c FALSE value to turn off debug
- * logging.
+ * \param[in] onoff A \c TRUE value if debug logging is
+ * desired; otherwise, a \c FALSE value
+ * to turn off debug logging.
*/
extern ev_err_t event_log_debug(int onoff);
@@ -1158,9 +1179,9 @@
*
* \test This function is tested in t_event_log.c.
*
- * \param onoff A \c TRUE value if function tracing is desired;
- * otherwise, a \c FALSE value to turn function tracing
- * off.
+ * \param[in] onoff A \c TRUE value if function tracing is
+ * desired; otherwise, a \c FALSE value
+ * to turn function tracing off.
*/
extern ev_err_t event_log_trace(int onoff);
@@ -1176,8 +1197,9 @@
*
* \test This function is tested in t_event_log.c.
*
- * \param onoff A \c TRUE value if aborting is desired; otherwise, a
- * \c FALSE value to turn aborting off.
+ * \param[in] onoff A \c TRUE value if aborting is desired;
+ * otherwise, a \c FALSE value to turn
+ * aborting off.
*/
extern ev_err_t event_log_abort(int onoff);
Index: event/event_gen_register.c
diff -u event/event_gen_register.c:1.6 event/event_gen_register.c:1.7
--- event/event_gen_register.c:1.6 Mon Jul 11 16:34:32 2005
+++ event/event_gen_register.c Sat Dec 17 16:15:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_gen_register.c,v 1.6 2005/07/11 23:34:32 klmitch Exp $
+** @(#)$Id: event_gen_register.c,v 1.7 2005/12/18 00:15:11 klmitch Exp $
*/
/** \internal
* \file
@@ -29,7 +29,7 @@
#include <stdlib.h>
#include <string.h>
-RCSTAG("@(#)$Id: event_gen_register.c,v 1.6 2005/07/11 23:34:32 klmitch Exp $");
+RCSTAG("@(#)$Id: event_gen_register.c,v 1.7 2005/12/18 00:15:11 klmitch Exp $");
/** \internal
* \brief Generator description structure.
@@ -51,9 +51,11 @@
* This helper macro initializes a generator descriptor with the
* specified description.
*
- * \param gd A pointer to the #ev_gendesc_t to be initialized.
- * \param desc A pointer to a struct #generator containing the
- * description of the generator.
+ * \param[in] gd A pointer to the #ev_gendesc_t to be
+ * initialized.
+ * \param[in] desc A pointer to a struct #generator
+ * containing the description of the
+ * generator.
*/
#define gd_init(gd, desc) \
do { \
@@ -79,9 +81,9 @@
* generator descriptors. The \p gens structure must already have its
* \c next and \c prev pointers set.
*
- * \param ctx A pointer to the containing #ev_ctx_t.
- * \param gens A pointer to an #ev_gens_t to be linked into the list
- * of generators.
+ * \param[in] ctx A pointer to the containing #ev_ctx_t.
+ * \param[in] gens A pointer to an #ev_gens_t to be
+ * linked into the list of generators.
*/
#define gens_link(ctx, gens) \
do { \
@@ -102,13 +104,14 @@
* containing a description of one generator, as specified by the \p
* desc parameter.
*
- * \param ctx A pointer to the containing #ev_ctx_t.
- * \param prev A pointer to the previous #ev_gens_t in the generator
- * list.
- * \param next A pointer to the next #ev_gens_t in the generator
- * list.
- * \param desc A pointer to a struct #generator containing the
- * description of the generator.
+ * \param[in] ctx A pointer to the containing #ev_ctx_t.
+ * \param[in] prev A pointer to the previous #ev_gens_t
+ * in the generator list.
+ * \param[in] next A pointer to the next #ev_gens_t in
+ * the generator list.
+ * \param[in] desc A pointer to a struct #generator
+ * containing the description of the
+ * generator.
*
* \retval ENOMEM Out of memory.
*/
@@ -150,10 +153,13 @@
* to include a description of a new generator, as specified by the \p
* desc parameter.
*
- * \param ctx A pointer to the containing #ev_ctx_t.
- * \param gens A pointer to the #ev_gens_t to be extended.
- * \param desc A pointer to a struct #generator containing the
- * description of the generator.
+ * \param[in] ctx A pointer to the containing
+ * #ev_ctx_t.
+ * \param[in] gens A pointer to the #ev_gens_t to be
+ * extended.
+ * \param[in] desc A pointer to a struct #generator
+ * containing the description of the
+ * generator.
*
* \retval ENOMEM Out of memory.
*/
@@ -204,10 +210,13 @@
* first generator in the #ev_gens_t following \p gens in the linked
* list.
*
- * \param ctx A pointer to the containing #ev_ctx_t.
- * \param gens A pointer to the first of two #ev_gens_t to be merged.
- * \param desc A pointer to a struct #generator containing the
- * description of the generator.
+ * \param[in] ctx A pointer to the containing
+ * #ev_ctx_t.
+ * \param[in] gens A pointer to the first of two
+ * #ev_gens_t to be merged.
+ * \param[in] desc A pointer to a struct #generator
+ * containing the description of the
+ * generator.
*
* \retval ENOMEM Out of memory.
*/
Index: event/event_init.c
diff -u event/event_init.c:1.27 event/event_init.c:1.28
--- event/event_init.c:1.27 Sat Jul 16 18:03:08 2005
+++ event/event_init.c Sat Dec 17 16:15:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_init.c,v 1.27 2005/07/17 01:03:08 klmitch Exp $
+** @(#)$Id: event_init.c,v 1.28 2005/12/18 00:15:11 klmitch Exp $
*/
/** \internal
* \file
@@ -30,7 +30,7 @@
#include <stdio.h>
#include <string.h>
-RCSTAG("@(#)$Id: event_init.c,v 1.27 2005/07/17 01:03:08 klmitch Exp $");
+RCSTAG("@(#)$Id: event_init.c,v 1.28 2005/12/18 00:15:11 klmitch Exp $");
/** \internal
* \brief File name buffer length.
@@ -86,8 +86,9 @@
* configuration file located in the system-wide configuration
* directory.
*
- * \param fname The base name of the configuration file, minus any
- * extension.
+ * \param[in] fname The base name of the configuration
+ * file, minus any extension.
+ *
* \return A string containing the configuration file path.
*/
#define confdir(fname) SYSCONFDIR "/" PACKAGE_TARNAME "/" fname ".tc"
@@ -98,8 +99,9 @@
* This helper macro constructs the pathname to a configuration file
* located in the user's home directory.
*
- * \param fname The base name of the configuration file, minus any
- * extension.
+ * \param[in] fname The base name of the configuration
+ * file, minus any extension.
+ *
* \return A string containing the configuration file path.
*/
#define homedir(fname) "~/." fname ".tc"
@@ -134,15 +136,14 @@
* implicit creation of treeconf variables under the event.modules
* hierarchy.
*
- * \param ctx A pointer to a #treeconf_ctx_t.
- * \param parent
- * A pointer to the closest #treeconf_node_t for the
- * node.
- * \param name A #treeconf_str_t containing the remaining name
- * elements.
- * \param elements
- * An int containing the number of remaining name
- * elements.
+ * \param[in] ctx A pointer to a #treeconf_ctx_t.
+ * \param[in] parent A pointer to the closest
+ * #treeconf_node_t for the node.
+ * \param[in] name A #treeconf_str_t containing the
+ * remaining name elements.
+ * \param[in] elements
+ * An int containing the number of
+ * remaining name elements.
*
* \return Boolean true if the node is to be created, or Boolean
* false otherwise.
@@ -167,16 +168,22 @@
* engine_load() will lt_dlclose() the module (if any) and return to
* the caller.
*
- * \param ctx A pointer to the #ev_ctx_t being initialized.
- * \param path The path to search for engine modules, represented as
- * a #treeconf_str_t array.
- * \param path_cnt
- * The number of elements in the \p path array.
- * \param module
- * The name of a module to load, optionally followed by a
- * colon and a set of control flags.
- * \param flag_p
- * A pointer to the initialization flags.
+ * \param[in] ctx A pointer to the #ev_ctx_t being
+ * initialized.
+ * \param[in] path The path to search for engine modules,
+ * represented as a #treeconf_str_t
+ * array.
+ * \param[in] path_cnt
+ * The number of elements in the \p path
+ * array.
+ * \param[in] module The name of a module to load,
+ * optionally followed by a colon and a
+ * set of control flags.
+ * \param[in,out] flag_p A pointer to the initialization
+ * flags.
+ *
+ * \return Zero on success, non-zero if an assertion failure
+ * occurs.
*/
static ev_err_t
engine_load(ev_ctx_t *ctx, treeconf_str_t *path, int path_cnt,
Index: event/event_int.h
diff -u event/event_int.h:1.32 event/event_int.h:1.33
--- event/event_int.h:1.32 Sat Oct 8 18:42:41 2005
+++ event/event_int.h Sat Dec 17 16:15:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_int.h,v 1.32 2005/10/09 01:42:41 klmitch Exp $
+** @(#)$Id: event_int.h,v 1.33 2005/12/18 00:15:11 klmitch Exp $
*/
#ifndef __include_event_int_h__
#define __include_event_int_h__
@@ -62,9 +62,9 @@
* the compiler is *not* GCC, and simplifies the expression for the
* benefit of such ...
[truncated message content] |
|
From: Kevin L. M. <kl...@us...> - 2005-10-26 12:54:22
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-10-26 12:54:09 UTC
Modified files:
ChangeLog Makefile.am event_err.et event_gen_alloc.c
event_gen_release.c sock.h sockaddr_atop.c sockaddr_export.c
sockaddr_import.c
Added files:
sockaddr_ptoa.c
Log message:
add missing RCSTAG() macros; implement sockaddr_ptoa()
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.59 event/ChangeLog:1.60
--- event/ChangeLog:1.59 Mon Oct 24 18:46:17 2005
+++ event/ChangeLog Wed Oct 26 05:53:59 2005
@@ -1,3 +1,24 @@
+2005-10-26 Kevin L. Mitchell <kl...@mi...>
+
+ * sockaddr_ptoa.c: add sockaddr_ptoa() (and supporting
+ macros/variables)
+
+ * sockaddr_import.c: add missing RCSTAG()
+
+ * sockaddr_export.c: add missing RCSTAG()
+
+ * sockaddr_atop.c: add missing RCSTAG()
+
+ * sock.h: document error codes for sockaddr_ptoa()
+
+ * event_gen_release.c: add missing RCSTAG()
+
+ * event_gen_alloc.c: add missing RCSTAG()
+
+ * event_err.et: add error codes for sockaddr_ptoa()
+
+ * Makefile.am (libevent_la_SOURCES): add sockaddr_ptoa.c
+
2005-10-24 Kevin L. Mitchell <kl...@mi...>
* tests/t_evg_alloc.c (main): change signature of
Index: event/Makefile.am
diff -u event/Makefile.am:1.20 event/Makefile.am:1.21
--- event/Makefile.am:1.20 Mon Oct 24 18:46:17 2005
+++ event/Makefile.am Wed Oct 26 05:53:59 2005
@@ -16,7 +16,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
-## @(#)$Id: Makefile.am,v 1.20 2005/10/25 01:46:17 klmitch Exp $
+## @(#)$Id: Makefile.am,v 1.21 2005/10/26 12:53:59 klmitch Exp $
##
## Process this file with automake to generate Makefile.in
@@ -48,7 +48,7 @@
sa_type_set.c sa_ipaddrbuf_set.c sa_ipaddrport_set.c \
sa_localaddr_set.c \
sockaddr_import.c sockaddr_export.c \
- sockaddr_atop.c
+ sockaddr_atop.c sockaddr_ptoa.c
libevent_la_LIBADD = @EVENT_ET_OBJS@ @TREECONF_LIBS@ @LIBLTDL@
libevent_la_DEPENDENCIES = @EVENT_ET_OBJS@
libevent_la_LDFLAGS = -version-info 0:0:0
Index: event/event_err.et
diff -u event/event_err.et:1.19 event/event_err.et:1.20
--- event/event_err.et:1.19 Mon Jul 11 16:34:32 2005
+++ event/event_err.et Wed Oct 26 05:53:59 2005
@@ -14,7 +14,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# @(#)$Id: event_err.et,v 1.19 2005/07/11 23:34:32 klmitch Exp $
+# @(#)$Id: event_err.et,v 1.20 2005/10/26 12:53:59 klmitch Exp $
error_table evnt
@@ -53,5 +53,10 @@
error_code EV_ERR_LIBLTDL, "Unable to initialize libltdl"
error_code EV_ERR_NOENGINE, "Unable to initialize all engine components"
error_code EV_ERR_NOFREE, "Generator not released by release callback"
+error_code EV_ERR_ADDRTOOLONG, "Address contains too many segments"
+error_code EV_ERR_ADDRINCOMPLETE, "Address is incomplete"
+error_code EV_ERR_INVALIDCHAR, "Invalid character in address"
+error_code EV_ERR_COLONEXPECTED, "Expected a colon (':')"
+error_code EV_ERR_BADADDR, "Unable to parse address"
end
Index: event/event_gen_alloc.c
diff -u event/event_gen_alloc.c:1.2 event/event_gen_alloc.c:1.3
--- event/event_gen_alloc.c:1.2 Mon Oct 24 18:46:17 2005
+++ event/event_gen_alloc.c Wed Oct 26 05:53:59 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_gen_alloc.c,v 1.2 2005/10/25 01:46:17 klmitch Exp $
+** @(#)$Id: event_gen_alloc.c,v 1.3 2005/10/26 12:53:59 klmitch Exp $
*/
/** \internal
* \file
@@ -28,6 +28,8 @@
#include <stdlib.h>
+RCSTAG("@(#)$Id: event_gen_alloc.c,v 1.3 2005/10/26 12:53:59 klmitch Exp $");
+
ev_err_t
event_gen_alloc(ev_ctx_t *ctx, unsigned int gentype, void *gen)
{
Index: event/event_gen_release.c
diff -u event/event_gen_release.c:1.1 event/event_gen_release.c:1.2
--- event/event_gen_release.c:1.1 Mon Jul 11 16:34:32 2005
+++ event/event_gen_release.c Wed Oct 26 05:53:59 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_gen_release.c,v 1.1 2005/07/11 23:34:32 klmitch Exp $
+** @(#)$Id: event_gen_release.c,v 1.2 2005/10/26 12:53:59 klmitch Exp $
*/
/** \internal
* \file
@@ -28,6 +28,8 @@
#include <stdlib.h>
+RCSTAG("@(#)$Id: event_gen_release.c,v 1.2 2005/10/26 12:53:59 klmitch Exp $");
+
ev_err_t
event_gen_release(ev_ctx_t *ctx, ev_genhdr_t *gen)
{
Index: event/sock.h
diff -u event/sock.h:1.11 event/sock.h:1.12
--- event/sock.h:1.11 Sat Oct 8 18:42:41 2005
+++ event/sock.h Wed Oct 26 05:53:59 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sock.h,v 1.11 2005/10/09 01:42:41 klmitch Exp $
+** @(#)$Id: sock.h,v 1.12 2005/10/26 12:53:59 klmitch Exp $
*/
#ifndef __include_event_sock_h__
#define __include_event_sock_h__
@@ -875,7 +875,7 @@
* This function parses the string representation of the \p address to
* fill in an #ev_sockaddr_t.
*
- * \todo Implement; write test program.
+ * \todo Write test program.
*
* \param sa A pointer to an #ev_sockaddr_t.
* \param address
@@ -885,7 +885,12 @@
* If 0, the string will be assumed to end with '\\0'.
*
* \retval EINVAL An invalid argument was given.
- * XXX more retvals here
+ * \retval EV_ERR_ADDRTOOLONG Address contains too many segments.
+ * \retval EV_ERR_ADDRINCOMPLETE
+ * Address is incomplete.
+ * \retval EV_ERR_INVALIDCHAR Invalid character in address.
+ * \retval EV_ERR_COLONEXPECTED A colon was expected.
+ * \retval EV_ERR_BADADDR Unable to parse address.
*/
extern ev_err_t sockaddr_ptoa(ev_sockaddr_t *sa, const char *address, int alen)
_gca_nonnull((1, 2));
Index: event/sockaddr_atop.c
diff -u event/sockaddr_atop.c:1.2 event/sockaddr_atop.c:1.3
--- event/sockaddr_atop.c:1.2 Mon Oct 24 18:46:17 2005
+++ event/sockaddr_atop.c Wed Oct 26 05:53:59 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sockaddr_atop.c,v 1.2 2005/10/25 01:46:17 klmitch Exp $
+** @(#)$Id: sockaddr_atop.c,v 1.3 2005/10/26 12:53:59 klmitch Exp $
*/
/** \internal
* \file
@@ -29,6 +29,8 @@
#include <stdio.h>
#include <string.h>
+RCSTAG("@(#)$Id: sockaddr_atop.c,v 1.3 2005/10/26 12:53:59 klmitch Exp $");
+
/** \brief Build presentation format for an IPv4 address.
*
* This helper function formats an IPv4 address in its presentation
Index: event/sockaddr_export.c
diff -u event/sockaddr_export.c:1.1 event/sockaddr_export.c:1.2
--- event/sockaddr_export.c:1.1 Sat Oct 8 18:42:41 2005
+++ event/sockaddr_export.c Wed Oct 26 05:53:59 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sockaddr_export.c,v 1.1 2005/10/09 01:42:41 klmitch Exp $
+** @(#)$Id: sockaddr_export.c,v 1.2 2005/10/26 12:53:59 klmitch Exp $
*/
/** \internal
* \file
@@ -32,6 +32,8 @@
#include <sys/types.h>
#include <sys/un.h>
+RCSTAG("@(#)$Id: sockaddr_export.c,v 1.2 2005/10/26 12:53:59 klmitch Exp $");
+
ev_err_t
sockaddr_export(ev_sockaddr_t *sa, struct sockaddr *addr, int *len)
{
Index: event/sockaddr_import.c
diff -u event/sockaddr_import.c:1.1 event/sockaddr_import.c:1.2
--- event/sockaddr_import.c:1.1 Sat Oct 8 18:42:41 2005
+++ event/sockaddr_import.c Wed Oct 26 05:53:59 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sockaddr_import.c,v 1.1 2005/10/09 01:42:41 klmitch Exp $
+** @(#)$Id: sockaddr_import.c,v 1.2 2005/10/26 12:53:59 klmitch Exp $
*/
/** \internal
* \file
@@ -32,6 +32,8 @@
#include <sys/types.h>
#include <sys/un.h>
+RCSTAG("@(#)$Id: sockaddr_import.c,v 1.2 2005/10/26 12:53:59 klmitch Exp $");
+
ev_err_t
sockaddr_import(ev_sockaddr_t *sa, const struct sockaddr *addr)
{
Index: event/sockaddr_ptoa.c
diff -u /dev/null event/sockaddr_ptoa.c:1.1
--- /dev/null Wed Oct 26 05:54:09 2005
+++ event/sockaddr_ptoa.c Wed Oct 26 05:53:59 2005
@@ -0,0 +1,503 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: sockaddr_ptoa.c,v 1.1 2005/10/26 12:53:59 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * brief Implementation of sockaddr_ptoa().
+ *
+ * This file contains the implementation of the sockaddr_ptoa()
+ * function.
+ */
+#include "event_int.h"
+
+#include <string.h>
+
+RCSTAG("@(#)$Id: sockaddr_ptoa.c,v 1.1 2005/10/26 12:53:59 klmitch Exp $");
+
+/** \internal
+ * \brief Mask to retrieve character value.
+ *
+ * This mask may be ANDed with the value associated with a character
+ * in #cmap in order to obtain the value of that character--for
+ * conversion of decimal and hexadecimal numbers.
+ */
+#define VALMASK 0x0f
+
+/** \internal
+ * \brief Character is a digit.
+ *
+ * This type value, when set in the #cmap character map entry for a
+ * character, indicates that the character is a decimal (or
+ * hexadecimal) digit. The value may be obtained by ANDing the #cmap
+ * entry with VALMASK.
+ */
+#define DIGIT 0x10
+
+/** \internal
+ * \brief Character is a hexadecimal digit.
+ *
+ * This type value, when set in the #cmap character map entry for a
+ * character, indicates that the character is a alphabetic hexadecimal
+ * digit (i.e., a-fA-F). The value may be obtained by ANDing the
+ * #cmap entry with VALMASK.
+ */
+#define XDIGIT 0x20
+
+/** \internal
+ * \brief Character is a colon.
+ *
+ * This type value, when set in the #cmap character map entry for a
+ * character, indicates that the character plays the part of the colon
+ * in an IPv6 address.
+ */
+#define COLON 0x30
+
+/** \internal
+ * \brief Character is a period.
+ *
+ * This type value, when set in the #cmap character map entry for a
+ * character, indicates that the character plays the part of the
+ * period in an IPv4 address, or plays the part of the port separator
+ * character.
+ */
+#define PERIOD 0x40
+
+/** \internal
+ * \brief Character type mask.
+ *
+ * This mask may be ANDed with the #cmap character map entry to obtain
+ * the character type.
+ */
+#define TYPEMASK 0xf0
+
+/** \internal
+ * \brief Obtain character type.
+ *
+ * This macro retrieves the type of the character \p c.
+ *
+ * \param c The character to retrieve the type of.
+ *
+ * \retval DIGIT The character is a numeric digit.
+ * \retval XDIGIT The character is an alphabetic hexadecimal
+ * digit.
+ * \retval COLON The character is a colon.
+ * \retval PERIOD The character is a period.
+ */
+#define ctype(c) (cmap[(int)(c)] & TYPEMASK)
+
+/** \internal
+ * \brief Obtain character value.
+ *
+ * This macro retrieves the value of the given decimal or hexadecimal
+ * character.
+ *
+ * \param c The character to retrieve the value of.
+ *
+ * \return The value of the character \p c.
+ */
+#define cval(c) (cmap[(int)(c)] & VALMASK)
+
+/** \internal
+ * \brief Mapping of characters to type and value.
+ *
+ * This variable maps character values to character type and value.
+ */
+static unsigned char cmap[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x10, 0x11, 0x12, 0x13,
+ 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+/** \internal
+ * \brief Obtain specified digit.
+ *
+ * This macro retrieves the specified digit--counting from zero--of a
+ * hexadecimal or binary-coded-decimal number.
+ *
+ * \param num The number to obtain the digit of.
+ * \param digit The digit, counted from zero, to obtain.
+ *
+ * \return The value of the \p digit specified.
+ */
+#define _bcd(num, digit) (((num) >> ((digit) << 2)) & 0x0f)
+
+/** \internal
+ * \brief Convert a BCD number to an ordinary integer.
+ *
+ * This macro takes the \p num, which is assumed to be a
+ * binary-coded-decimal number, and converts it to an ordinary
+ * integer.
+ *
+ * \warning This macro evaluates the \p num parameter multiple times.
+ *
+ * \param num The number to convert from BCD.
+ *
+ * \return The value of \p num converted to an ordinary integer.
+ */
+#define bcd(num) (_bcd((num), 3) * 1000 + \
+ _bcd((num), 2) * 100 + \
+ _bcd((num), 1) * 10 + \
+ _bcd((num), 0) * 1)
+
+/** \internal
+ * \brief Test a BCD number for IPv4 quad constraints.
+ *
+ * This macro tests the \p num to determine whether it is a valid IPv4
+ * quad (i.e., less than 255).
+ *
+ * \warning This macro evaluates the \p num parameter multiple times.
+ *
+ * \param num The number to test.
+ *
+ * \return Boolean true if \p num contains a valid IPv4 quad,
+ * false otherwise.
+ */
+#define bcd_isquad(num) ((num) <= 0x0255 && _bcd((num), 1) <= 9 && \
+ _bcd((num), 0) <= 9)
+
+/** \internal
+ * \brief Add another digit to a hexadecimal (or BCD) number.
+ *
+ * This macro is used to add another digit to the \p accum
+ * accumulator. The number in \p accum is assumed to be a hexadecimal
+ * or BCD number.
+ *
+ * \warning This macro evaluates the \p accum parameter multiple
+ * times.
+ *
+ * \param accum The accumulator containing the number.
+ * \param c The character to be added to the accumulator. Note
+ * that this is a character value, which will be
+ * converted by cval() to an actual numerical value.
+ */
+#define hex_accum(accum, c) ((accum) = ((accum) << 4) | cval((c)))
+
+/** \internal
+ * \brief Add another digit to a decimal number.
+ *
+ * This macro is used to add another digit to the \p accum
+ * accumulator. The number in \p accum is assumed to be a decimal
+ * number.
+ *
+ * \warning This macro evaluates the \p accum parameter multiple
+ * times.
+ *
+ * \param accum The accumulator containing the number.
+ * \param c The character to be added to the accumulator. Note
+ * that this is a character value, which will be
+ * converted by cval() to an actual numerical value.
+ */
+#define dec_accum(accum, c) ((accum) = ((accum) * 10) + cval((c)))
+
+/** \internal
+ * \brief Parse state.
+ *
+ * This structure is used to store the partial address as it is being
+ * converted from the presentation format.
+ */
+struct partaddr {
+ unsigned char*addr[2]; /**< Pointers to the partial addresses. */
+ unsigned char addr2[SOCK_ADDRBUFV6_LEN];
+ /**< Buffer for second partial address. */
+ int segs[2]; /**< Number of segments for each partial. */
+ int cnt; /**< Number of partials in use (1 or 2). */
+ ev_sockaddr_t*result; /**< Pointer to resultant address. */
+};
+
+/** \internal
+ * \brief Initialize a struct partaddr.
+ *
+ * This macro initializes \p pa given the address of the
+ * #ev_sockaddr_t to be filled in.
+ *
+ * \param pa A pointer to a struct #partaddr to be initialized.
+ * \param res A pointer to the #ev_sockaddr_t to be filled in.
+ */
+#define partaddr_init(pa, res) \
+do { \
+ struct partaddr *_pa = (pa); \
+ ev_sockaddr_t *_res = (res); \
+ int _i; \
+ _pa->addr[0] = sa_ipaddrbuf(_res); /* set partial addr pointers... */ \
+ _pa->addr[1] = _pa->addr2; \
+ for (_i = 0; _i < SOCK_ADDRBUFV6_LEN; _i++) /* initialize addresses */ \
+ _pa->addr[1][_i] = 0; \
+ _pa->segs[0] = _pa->segs[1] = _pa->cnt = 0; /* initialize counters... */ \
+ _pa->result = _res; /* and remember where the result is */ \
+} while (0)
+
+/** \internal
+ * \brief Accumulate an address part.
+ *
+ * This macro accumulates a given value onto a partial address in a
+ * struct partaddr.
+ *
+ * \param pa A pointer to a struct #partaddr.
+ * \param accum The 16-bit value to be accumulated onto the partial
+ * address.
+ */
+#define accumulate(pa, accum) \
+do { \
+ struct partaddr *_pa = (pa); \
+ uint32_t _accum = (accum); \
+ if (_pa->segs[0] + _pa->segs[1] + _pa->cnt + 1 > \
+ (sa_type(_pa->result) == AT_IPv4 ? \
+ SOCK_ADDRBUFV4_LEN : SOCK_ADDRBUFV6_LEN)) \
+ ev_return(EV_ERR_ADDRTOOLONG); /* too many segments, bail out */ \
+ _pa->addr[_pa->cnt][_pa->segs[_pa->cnt]++] = (_accum >> 8) & 0xff; \
+ _pa->addr[_pa->cnt][_pa->segs[_pa->cnt]++] = (_accum ) & 0xff; \
+} while (0)
+
+/** \internal
+ * \brief Test if an address is a fully specified IPv6 address.
+ *
+ * This macro will check to see if an address is a fully specified
+ * IPv6 address, returning an error to the function caller if it is
+ * not.
+ *
+ * \param pa A pointer to a struct #partaddr to test.
+ */
+#define test_v6(pa) \
+do { \
+ struct partaddr *_pa = (pa); \
+ if (!_pa->cnt && _pa->segs[0] != SOCK_ADDRBUFV6_LEN) \
+ ev_return(EV_ERR_ADDRINCOMPLETE); /* malformed address, bail out */ \
+} while (0)
+
+ev_err_t
+sockaddr_ptoa(ev_sockaddr_t *sa, const char *address, int alen)
+{
+ const unsigned char *t = (const unsigned char *)address;
+ unsigned char lastc = '\0';
+ enum { s_unspec, s_inet4, s_inet6, s_inet64, s_port } state = s_unspec;
+ uint32_t accum = 0, accum2 = 0; /* gotta be large enough for overflow */
+ struct partaddr pa;
+ int dots = 0, i, j, doublec = 0, twoc = 0;
+ ev_satype_t subtype = AT_NONE;
+
+ ev_init(); /* make sure library is initialized... */
+
+ if (!sa || !address) /* sanity-check arguments */
+ ev_return(EINVAL);
+
+ sa->sa_type = AT_NONE; /* initialize the resultant ev_sockaddr_t */
+ memset((void *)&sa->sa_addr, 0, sizeof(sa->sa_addr));
+
+ if (alen < 0) /* Length not set? */
+ alen = strlen(address);
+
+ if (*address == '/') { /* Ah ha, we have an AT_LOCAL address... */
+ sa->sa_type = AT_LOCAL; /* set the type */
+ if (alen >= SOCK_LOCALADDR_LEN)
+ ev_return(EV_ERR_ADDRTOOLONG); /* address is too long to fit! */
+ strncpy(sa->sa_addr.saa_localaddr, address, alen); /* copy the address */
+ ev_return(0); /* we're all done! Gee, that was easy... */
+ }
+
+ /* ...but this isn't! Run a state-based parser to disassemble the address */
+
+ partaddr_init(&pa, sa); /* initialize the struct partaddr */
+
+ /* OK, process the address string character by character */
+ for (; alen && *t; lastc = *(t++), alen--)
+ switch (ctype(*t)) {
+ case XDIGIT: /* hexadecimal digit... */
+ if (state == s_unspec) { /* hex digit implies IPv6 address */
+ state = s_inet6;
+ sa->sa_type = AT_IPv6;
+ subtype = AT_IPv6;
+ } else if (state != s_inet6)
+ ev_return(EV_ERR_INVALIDCHAR); /* bad character in address... */
+ /*FALLTHROUGH*/
+ case DIGIT: /* decimal digit */
+ if (doublec) /* expecting a ':'... */
+ ev_return(EV_ERR_COLONEXPECTED);
+ if (state == s_unspec || state == s_inet6)
+ hex_accum(accum, *t); /* accumulate as a hex digit string */
+ else
+ dec_accum(accum, *t); /* accumulate as a decimal digit string */
+
+ if (state == s_unspec && !bcd_isquad(accum)) {
+ /* component is too big to be part of an IPv4 address */
+ state = s_inet6; /* so it must be an IPv6 address! */
+ sa->sa_type = AT_IPv6;
+ subtype = AT_IPv6;
+ }
+
+ if (accum > (state == s_inet4 ? 255 : 65535)) /* check for overflow */
+ ev_return(EV_ERR_ADDRTOOLONG);
+
+ twoc = 0; /* zero twoc... */
+ break;
+
+ case COLON:
+ if (state == s_unspec) { /* OK, ':' implies IPv6 address */
+ state = s_inet6;
+ sa->sa_type = AT_IPv6;
+ subtype = AT_IPv6;
+ if (!lastc) /* first character is a colon? */
+ doublec++; /* must be followed by another! */
+ } else if (state != s_inet6)
+ ev_return(EV_ERR_INVALIDCHAR); /* colon in non-IPv6 address? */
+ else
+ doublec = 0; /* zero doublec... */
+
+ if (lastc == ':') { /* two ':' in a row; segment of zeros... */
+ if (pa.cnt++) /* was there a previous one? */
+ ev_return(EV_ERR_ADDRTOOLONG); /* too many zero runs */
+ twoc++; /* have two colons in a row... */
+ }
+
+ accumulate(&pa, accum); /* OK, add component to address */
+ accum = 0; /* and reset the accumulator */
+ break;
+
+ case PERIOD:
+ if ((!twoc && lastc == ':') || /* . after a :? Only if 2 in a row... */
+ lastc == '.' || /* . after a .? That doesn't make sense! */
+ (dots && *address == '.')) /* .a.b -- malformed IPv4 address */
+ ev_return(EV_ERR_INVALIDCHAR);
+ dots++; /* increment the count of periods */
+ twoc = 0; /* zero twoc */
+ if (state == s_unspec) { /* OK, this is an IPv4 address! */
+ accum2 = bcd(accum); /* store first quad in second accumulator */
+ accum = 0; /* prepare for the next quad */
+ state = s_inet4; /* and switch states */
+ sa->sa_type = AT_IPv4;
+ subtype = AT_IPv4;
+ continue; /* must process next character! */
+ } else if (state == s_inet6) { /* processing an IPv6 address... */
+ if (bcd_isquad(accum)) { /* it's valid as an IPv4 quad... */
+
+ /* The accumulated value could be either an IPv4 quad or an
+ * IPv6 address component. We won't know until later: if we
+ * get another period, then it was a quad followed by a
+ * quad; if we hit the end of the string, then it was an
+ * IPv6 address component followed by a port number.
+ */
+
+ accum2 = accum; /* save this component for later... */
+ accum = 0; /* must zero the accumulator for next component */
+ state = s_inet64; /* switch to the intermediate state */
+ } else { /* definitely an IPv6 address component */
+ accumulate(&pa, accum); /* accumulate it... */
+ accum = 0; /* reset the accumulator */
+ test_v6(&pa); /* verify the address is valid... */
+ state = s_port; /* what follows is definitely a port number */
+ }
+ continue; /* must process next character */
+ } else if (state == s_inet64) { /* a second '.'; must be a v4 address */
+ accum2 = bcd(accum2); /* decode second accumulator */
+ state = s_inet4; /* switch to the IPv4 processing state */
+ subtype = AT_IPv4;
+ /* Drop through to the processing stage */
+ } else if (state == s_inet4) {
+ if (dots == 4) { /* what follows this '.' must be a port number */
+ if (sa->sa_type == AT_IPv6)
+ test_v6(&pa); /* verify it's a valid IPv6 address */
+ state = s_port; /* switch to port processing state */
+ }
+ } else /* a '.' after a port? huh? */
+ ev_return(EV_ERR_INVALIDCHAR); /* malformed address! */
+
+ if (dots & 0x01) { /* OK, if it's odd, we have only one quad so far... */
+ accum2 = accum; /* so save it and zero the accumulator */
+ accum = 0;
+ } else { /* two quads, add them to the address */
+ accumulate(&pa, (accum2 << 8) | accum);
+ accum = 0; /* zero the accumulators */
+ accum2 = 0;
+ }
+ break;
+
+ default: /* unknown character */
+ ev_return(EV_ERR_INVALIDCHAR); /* malformed address! */
+ break;
+ }
+
+ /* OK, we've hit the end of the string. Normalize the state... */
+ if (state == s_unspec || (state == s_inet4 && dots == 1 &&
+ *address == '.')) {
+ if (lastc && !dots) /* there must be at least one '.' */
+ ev_return(EV_ERR_BADADDR);
+
+ /* OK, let's assume an IPv4 wildcard address... */
+ sa->sa_type = AT_IPv4;
+ if (state == s_inet4) /* accumulator will contain a port number */
+ state = s_port;
+ } else if (state == s_inet64) {
+ /* previous segment was an IPv6 address component */
+ accumulate(&pa, accum2);
+ test_v6(&pa); /* verify it's a valid address */
+ state = s_port; /* accumulator will contain a port number */
+ }
+
+ /* At this point, we have the address type, and we have reduced the
+ * set of possible states to { s_inet4, s_inet6, s_port }. If we're
+ * in one of the inet states, the accumulator contains an address
+ * component and the port number will be 0. Otherwise, the
+ * accumulator contains the port number, and the address is
+ * complete.
+ */
+ if (state == s_inet4) { /* IPv4 address component... */
+ if (dots < 3) /* at least 3 dots are necessary */
+ ev_return(EV_ERR_ADDRINCOMPLETE);
+ accumulate(&pa, (accum2 << 8) | accum); /* add the component */
+ if (sa->sa_type == AT_IPv6)
+ test_v6(&pa); /* verify that v6 address is complete */
+ } else if (state == s_inet6) { /* IPv6 address component */
+ if (!twoc && lastc == ':') /* cannot end with ':' except in '::' case */
+ ev_return(EV_ERR_INVALIDCHAR); /* malformed address... */
+ accumulate(&pa, accum); /* add the address component */
+ test_v6(&pa); /* verify that the address is complete */
+ } else /* accumulator contains a port number */
+ sa->sa_addr.saa_ipaddr.saai_port = accum; /* so remember it! */
+
+ /* OK, one final step: If the v6 address contained '::', we need to
+ * merge the two pieces of the address into one. We do this by
+ * walking backwards through the two pieces, starting at the very
+ * end of piece 0 (the result) and at the last segment of piece 1.
+ */
+ for (i = SOCK_ADDRBUFV6_LEN - 1, j = pa.segs[1] - 1; i >= 0 && j >= 0;
+ i--, j--)
+ pa.addr[0][i] = pa.addr[1][j]; /* just do an assignment */
+
+ /* Because of our pointer tricks with the struct partaddr, the final
+ * answer is now contained in the ev_sockaddr_t we were passed to
+ * begin with, and so we are now done.
+ */
+ ev_return(0);
+}
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-10-25 01:49:49
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-10-25 01:49:39 UTC
Modified files:
doc/event.doxytag doc/html/__ev__gen__lookup_8c-source.html
doc/html/__ev__gen__lookup_8c.html
doc/html/__timer__heapify_8c-source.html
doc/html/__timer__heapify_8c.html doc/html/annotated.html
doc/html/classes.html doc/html/confvar.html
doc/html/dir_000000.html doc/html/dirs.html
doc/html/engine__activate_8c-source.html
doc/html/engine__activate_8c.html
doc/html/engine__register_8c-source.html
doc/html/engine__register_8c.html doc/html/engines_8h-source.html
doc/html/engines_8h.html doc/html/engines__int_8h-source.html
doc/html/engines__int_8h.html doc/html/engmodinit_8c-source.html
doc/html/engmodinit_8c.html doc/html/engmodule_8c-source.html
doc/html/engmodule_8c.html doc/html/event-test_8h-source.html
doc/html/event-test_8h.html doc/html/event_8h-source.html
doc/html/event_8h.html
doc/html/event__attr__confpath_8c-source.html
doc/html/event__attr__confpath_8c.html
doc/html/event__attr__confreg_8c-source.html
doc/html/event__attr__confreg_8c.html
doc/html/event__attr__confvar_8c-source.html
doc/html/event__attr__confvar_8c.html
doc/html/event__attr__destroy_8c-source.html
doc/html/event__attr__destroy_8c.html
doc/html/event__attr__engine_8c-source.html
doc/html/event__attr__engine_8c.html
doc/html/event__attr__init_8c-source.html
doc/html/event__attr__init_8c.html
doc/html/event__attr__libpath_8c-source.html
doc/html/event__attr__libpath_8c.html
doc/html/event__attr__modlist_8c-source.html
doc/html/event__attr__modlist_8c.html
doc/html/event__destroy_8c-source.html
doc/html/event__destroy_8c.html
doc/html/event__gen__alloc_8c-source.html
doc/html/event__gen__alloc_8c.html
doc/html/event__gen__register_8c-source.html
doc/html/event__gen__register_8c.html
doc/html/event__gen__release_8c-source.html
doc/html/event__gen__release_8c.html
doc/html/event__init_8c-source.html doc/html/event__init_8c.html
doc/html/event__int_8h-source.html doc/html/event__int_8h.html
doc/html/event__log_8c-source.html doc/html/event__log_8c.html
doc/html/files.html doc/html/functions.html
doc/html/functions_vars.html doc/html/gcc-attrs_8h-source.html
doc/html/gcc-attrs_8h.html doc/html/globals.html
doc/html/globals_0x61.html doc/html/globals_0x63.html
doc/html/globals_0x64.html doc/html/globals_0x65.html
doc/html/globals_0x66.html doc/html/globals_0x67.html
doc/html/globals_0x68.html doc/html/globals_0x6c.html
doc/html/globals_0x6d.html doc/html/globals_0x6e.html
doc/html/globals_0x72.html doc/html/globals_0x73.html
doc/html/globals_0x74.html doc/html/globals_0x76.html
doc/html/globals_defs.html doc/html/globals_enum.html
doc/html/globals_eval.html doc/html/globals_func.html
doc/html/globals_type.html doc/html/globals_vars.html
doc/html/graph_legend.html doc/html/group__engines.html
doc/html/group__event.html doc/html/group__signal.html
doc/html/group__socket.html doc/html/group__timer.html
doc/html/index.html doc/html/modules.html doc/html/pages.html
doc/html/sa__ipaddrbuf__set_8c-source.html
doc/html/sa__ipaddrbuf__set_8c.html
doc/html/sa__ipaddrport__set_8c-source.html
doc/html/sa__ipaddrport__set_8c.html
doc/html/sa__localaddr__set_8c-source.html
doc/html/sa__localaddr__set_8c.html
doc/html/sa__type__set_8c-source.html
doc/html/sa__type__set_8c.html doc/html/sig_8h-source.html
doc/html/sig_8h.html doc/html/signal__create_8c-source.html
doc/html/signal__create_8c.html
doc/html/signal__destroy_8c-source.html
doc/html/signal__destroy_8c.html doc/html/sock_8h-source.html
doc/html/sock_8h.html doc/html/sockaddr__atop_8c-source.html
doc/html/sockaddr__atop_8c.html
doc/html/sockaddr__export_8c-source.html
doc/html/sockaddr__export_8c.html
doc/html/sockaddr__import_8c-source.html
doc/html/sockaddr__import_8c.html
doc/html/struct__ev__attr__s.html
doc/html/struct__ev__ctx__s.html
doc/html/struct__ev__engine__s.html
doc/html/struct__ev__englink__s.html
doc/html/struct__ev__englist__s.html
doc/html/struct__ev__gendesc__s.html
doc/html/struct__ev__genhdr__s.html
doc/html/struct__ev__genlist__s.html
doc/html/struct__ev__gens__s.html
doc/html/struct__ev__overvars__s.html
doc/html/struct__ev__sig__s.html
doc/html/struct__ev__signals__s.html
doc/html/struct__ev__sock__s.html
doc/html/struct__ev__sockaddr__s.html
doc/html/struct__ev__sockets__s.html
doc/html/struct__ev__tim__s.html
doc/html/struct__ev__timers__s.html
doc/html/struct__ev__timnode__s.html
doc/html/struct__ev__varlist__s.html
doc/html/struct__event__s.html doc/html/structgenerator.html
doc/html/structrule.html doc/html/structt__gen.html
doc/html/structteng.html doc/html/structtest__resched.html
doc/html/structtest__timer.html
doc/html/t__event__attrs_8c-source.html
doc/html/t__event__attrs_8c.html
doc/html/t__event__init_8c-source.html
doc/html/t__event__init_8c.html
doc/html/t__event__log_8c-source.html
doc/html/t__event__log_8c.html
doc/html/t__evg__alloc_8c-source.html
doc/html/t__evg__alloc_8c.html
doc/html/t__evg__register_8c-source.html
doc/html/t__evg__register_8c.html
doc/html/t__signal__fcns_8c-source.html
doc/html/t__signal__fcns_8c.html
doc/html/t__timer__fcns_8c-source.html
doc/html/t__timer__fcns_8c.html doc/html/test.html
doc/html/tim_8h-source.html doc/html/tim_8h.html
doc/html/timer__create_8c-source.html
doc/html/timer__create_8c.html
doc/html/timer__destroy_8c-source.html
doc/html/timer__destroy_8c.html
doc/html/timer__resched_8c-source.html
doc/html/timer__resched_8c.html doc/html/todo.html
doc/latex/doxygen.sty doc/latex/event_8h.tex
doc/latex/event__gen__alloc_8c.tex doc/latex/files.tex
doc/latex/group__event.tex doc/latex/group__signal.tex
doc/latex/group__timer.tex doc/latex/refman.tex
doc/latex/sockaddr__atop_8c.tex doc/latex/struct__ev__sig__s.tex
doc/latex/struct__ev__tim__s.tex doc/man/man3/_ev_attr_s.3
doc/man/man3/_ev_ctx_s.3 doc/man/man3/_ev_engine_s.3
doc/man/man3/_ev_englink_s.3 doc/man/man3/_ev_englist_s.3
doc/man/man3/_ev_gen_lookup.c.3 doc/man/man3/_ev_gendesc_s.3
doc/man/man3/_ev_genhdr_s.3 doc/man/man3/_ev_genlist_s.3
doc/man/man3/_ev_gens_s.3 doc/man/man3/_ev_overvars_s.3
doc/man/man3/_ev_sig_s.3 doc/man/man3/_ev_signals_s.3
doc/man/man3/_ev_sock_s.3 doc/man/man3/_ev_sockaddr_s.3
doc/man/man3/_ev_sockets_s.3 doc/man/man3/_ev_tim_s.3
doc/man/man3/_ev_timers_s.3 doc/man/man3/_ev_timnode_s.3
doc/man/man3/_ev_varlist_s.3 doc/man/man3/_event_s.3
doc/man/man3/_home_klmitch_devel_src_event_tests_.3
doc/man/man3/_timer_heapify.c.3 doc/man/man3/confvar.3
doc/man/man3/engine_activate.c.3 doc/man/man3/engine_register.c.3
doc/man/man3/engines.3 doc/man/man3/engines.h.3
doc/man/man3/engines_int.h.3 doc/man/man3/engmodinit.c.3
doc/man/man3/engmodule.c.3 doc/man/man3/event-test.h.3
doc/man/man3/event.3 doc/man/man3/event.h.3
doc/man/man3/event_attr_confpath.c.3
doc/man/man3/event_attr_confreg.c.3
doc/man/man3/event_attr_confvar.c.3
doc/man/man3/event_attr_destroy.c.3
doc/man/man3/event_attr_engine.c.3
doc/man/man3/event_attr_init.c.3
doc/man/man3/event_attr_libpath.c.3
doc/man/man3/event_attr_modlist.c.3
doc/man/man3/event_destroy.c.3 doc/man/man3/event_gen_alloc.c.3
doc/man/man3/event_gen_register.c.3
doc/man/man3/event_gen_release.c.3 doc/man/man3/event_init.c.3
doc/man/man3/event_int.h.3 doc/man/man3/event_log.c.3
doc/man/man3/gcc-attrs.h.3 doc/man/man3/generator.3
doc/man/man3/rule.3 doc/man/man3/sa_ipaddrbuf_set.c.3
doc/man/man3/sa_ipaddrport_set.c.3
doc/man/man3/sa_localaddr_set.c.3 doc/man/man3/sa_type_set.c.3
doc/man/man3/sig.h.3 doc/man/man3/signal.3
doc/man/man3/signal_create.c.3 doc/man/man3/signal_destroy.c.3
doc/man/man3/sock.h.3 doc/man/man3/sockaddr_atop.c.3
doc/man/man3/sockaddr_export.c.3 doc/man/man3/sockaddr_import.c.3
doc/man/man3/socket.3 doc/man/man3/t_event_attrs.c.3
doc/man/man3/t_event_init.c.3 doc/man/man3/t_event_log.c.3
doc/man/man3/t_evg_alloc.c.3 doc/man/man3/t_evg_register.c.3
doc/man/man3/t_gen.3 doc/man/man3/t_signal_fcns.c.3
doc/man/man3/t_timer_fcns.c.3 doc/man/man3/teng.3
doc/man/man3/test.3 doc/man/man3/test_resched.3
doc/man/man3/test_timer.3 doc/man/man3/tim.h.3
doc/man/man3/timer.3 doc/man/man3/timer_create.c.3
doc/man/man3/timer_destroy.c.3 doc/man/man3/timer_resched.c.3
doc/man/man3/todo.3
Log message:
doc update
---------------------- diff included ----------------------
Index: event/doc/event.doxytag
diff -u event/doc/event.doxytag:1.15 event/doc/event.doxytag:1.16
--- event/doc/event.doxytag:1.15 Sat Oct 8 18:45:00 2005
+++ event/doc/event.doxytag Mon Oct 24 18:49:28 2005
@@ -1191,7 +1191,7 @@
<name>event_gen_alloc</name>
<anchorfile>group__event.html</anchorfile>
<anchor>ga21</anchor>
- <arglist>(ev_ctx_t *ctx, unsigned int gentype, ev_genhdr_t **gen)</arglist>
+ <arglist>(ev_ctx_t *ctx, unsigned int gentype, void *gen)</arglist>
</member>
<member kind="function">
<type>ev_err_t</type>
@@ -1363,7 +1363,7 @@
<name>event_gen_alloc</name>
<anchorfile>group__event.html</anchorfile>
<anchor>ga21</anchor>
- <arglist>(ev_ctx_t *ctx, unsigned int gentype, ev_genhdr_t **gen)</arglist>
+ <arglist>(ev_ctx_t *ctx, unsigned int gentype, void *gen)</arglist>
</member>
</compound>
<compound kind="file">
@@ -5294,7 +5294,7 @@
<name>event_gen_alloc</name>
<anchorfile>group__event.html</anchorfile>
<anchor>ga21</anchor>
- <arglist>(ev_ctx_t *ctx, unsigned int gentype, ev_genhdr_t **gen)</arglist>
+ <arglist>(ev_ctx_t *ctx, unsigned int gentype, void *gen)</arglist>
</member>
<member kind="function">
<type>ev_err_t</type>
Index: event/doc/html/__ev__gen__lookup_8c-source.html
diff -u event/doc/html/__ev__gen__lookup_8c-source.html:1.10 event/doc/html/__ev__gen__lookup_8c-source.html:1.11
--- event/doc/html/__ev__gen__lookup_8c-source.html:1.10 Sat Oct 8 18:45:00 2005
+++ event/doc/html/__ev__gen__lookup_8c-source.html Mon Oct 24 18:49:28 2005
@@ -52,7 +52,7 @@
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <a class="code" href="event__int_8h.html#a25">ev_return</a>(ENOENT); <span class="comment">/* failed to find the entry... */</span>
<a name="l00055"></a>00055 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__ev__gen__lookup_8c.html
diff -u event/doc/html/__ev__gen__lookup_8c.html:1.10 event/doc/html/__ev__gen__lookup_8c.html:1.11
--- event/doc/html/__ev__gen__lookup_8c.html:1.10 Sat Oct 8 18:45:00 2005
+++ event/doc/html/__ev__gen__lookup_8c.html Mon Oct 24 18:49:28 2005
@@ -101,7 +101,7 @@
Referenced by <a class="el" href="event__gen__alloc_8c-source.html#l00032">event_gen_alloc()</a>, <a class="el" href="event__gen__release_8c-source.html#l00032">event_gen_release()</a>, and <a class="el" href="t__evg__alloc_8c-source.html#l00068">main()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:03 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:06 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__timer__heapify_8c-source.html
diff -u event/doc/html/__timer__heapify_8c-source.html:1.8 event/doc/html/__timer__heapify_8c-source.html:1.9
--- event/doc/html/__timer__heapify_8c-source.html:1.8 Sat Oct 8 18:45:00 2005
+++ event/doc/html/__timer__heapify_8c-source.html Mon Oct 24 18:49:28 2005
@@ -131,7 +131,7 @@
<a name="l00146"></a>00146
<a name="l00147"></a>00147 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00148"></a>00148 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__timer__heapify_8c.html
diff -u event/doc/html/__timer__heapify_8c.html:1.8 event/doc/html/__timer__heapify_8c.html:1.9
--- event/doc/html/__timer__heapify_8c.html:1.8 Sat Oct 8 18:45:00 2005
+++ event/doc/html/__timer__heapify_8c.html Mon Oct 24 18:49:28 2005
@@ -218,7 +218,7 @@
Referenced by <a class="el" href="__timer__heapify_8c-source.html#l00121">_timer_heapify_down()</a>, and <a class="el" href="__timer__heapify_8c-source.html#l00105">_timer_heapify_up()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:04 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:07 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/annotated.html
diff -u event/doc/html/annotated.html:1.18 event/doc/html/annotated.html:1.19
--- event/doc/html/annotated.html:1.18 Sat Oct 8 18:45:00 2005
+++ event/doc/html/annotated.html Mon Oct 24 18:49:28 2005
@@ -33,7 +33,7 @@
<tr><td class="indexkey"><a class="el" href="structtest__resched.html">test_resched</a></td><td class="indexvalue">Structure for defining a timer rescheduling to perform </td></tr>
<tr><td class="indexkey"><a class="el" href="structtest__timer.html">test_timer</a></td><td class="indexvalue">Structure for defining a timer to create </td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:51 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:53 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/classes.html
diff -u event/doc/html/classes.html:1.18 event/doc/html/classes.html:1.19
--- event/doc/html/classes.html:1.18 Sat Oct 8 18:45:00 2005
+++ event/doc/html/classes.html Mon Oct 24 18:49:28 2005
@@ -12,7 +12,7 @@
</td></tr><tr><td><a class="el" href="struct__ev__ctx__s.html">_ev_ctx_s</a> </td><td><a class="el" href="struct__ev__genlist__s.html">_ev_genlist_s</a> </td><td><a class="el" href="struct__ev__sockaddr__s.html">_ev_sockaddr_s</a> </td><td><a class="el" href="struct__event__s.html">_event_s</a> </td><td><a class="el" href="structt__gen.html">t_gen</a> </td></tr><tr><td><a class="el" href="struct__ev__engine__s.html">_ev_engine_s</a> </td><td><a class="el" href="struct__ev__gens__s.html">_ev_gens_s</a> </td><td><a class="el" href="struct__ev__sockets__s.html">_ev_sockets_s</a> </td><td><a name="letter_G"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> G </div></td></tr></table>
</td><td><a class="el" href="structteng.html">teng</a> </td></tr><tr><td><a class="el" href="struct__ev__englink__s.html">_ev_englink_s</a> </td><td><a class="el" href="struct__ev__overvars__s.html">_ev_overvars_s</a> </td><td><a class="el" href="struct__ev__tim__s.html">_ev_tim_s</a> </td><td><a class="el" href="structgenerator.html">generator</a> </td><td><a class="el" href="structtest__resched.html">test_resched</a> </td></tr><tr><td><a class="el" href="struct__ev__englist__s.html">_ev_englist_s</a> </td><td><a class="el" href="struct__ev__sig__s.html">_ev_sig_s</a> </td><td><a class="el" href="struct__ev__timers__s.html">_ev_timers_s</a> </td><td><a name="letter_R"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> R </div></td></tr></table>
</td><td><a class="el" href="structtest__timer.html">test_timer</a> </td></tr></table><p><div class="qindex"><a class="qindex" href="#letter__">_</a> | <a class="qindex" href="#letter_G">G</a> | <a class="qindex" href="#letter_R">R</a> | <a class="qindex" href="#letter_T">T</a></div><p>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:51 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:53 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/confvar.html
diff -u event/doc/html/confvar.html:1.18 event/doc/html/confvar.html:1.19
--- event/doc/html/confvar.html:1.18 Sat Oct 8 18:45:00 2005
+++ event/doc/html/confvar.html Mon Oct 24 18:49:28 2005
@@ -21,7 +21,7 @@
The <a class="el" href="group__event.html#ga11">event_init()</a> function uses the <a class="elRef" doxygen="treeconf.doxytag:http://libevent.sourceforge.net/treeconf/" href="http://libevent.sourceforge.net/treeconf/group__treeconf.html#gga8">tc_path()</a> function to load the configuration from all the files listed in the <code>envpath</code> argument, which is presumed to be passed in by the application from the environment. If the <code>envpath</code> contains an empty field (i.e., "::"), envpath is passed as <code>NULL</code>, or the <a class="el" href="group__event.html#ga61">EV_INIT_SECURE</a> flag is passed to <a class="el" href="group__event.html#ga11">event_init()</a>, then a default path will be searched. Note that the <a class="el" href="group__event.html#ga61">EV_INIT_SECURE</a> flag will also cause files containing the <code>%n</code> or <code>~</code> expandos to be skipped for security reasons.<p>
In addition to the <code>~</code> expandos (<code>~</code> expands to the current user's home directory; <code>~user</code> expands to the home directory of <code>user</code>), the library also defines the <code>%n</code> and <code>%p</code> expandos, which expand to the user name and the application name, respectively. (The application name is passed as the <code>prog</code> argument to the <a class="el" href="group__event.html#ga11">event_init()</a> function. If <code>NULL</code> is passed for <code>prog</code>, file names containing the <code>%p</code> expando will be omitted.)<p>
By default, the default search path contains <code>"event.tc"</code> from the system package configuration directory (often <code>/usr/local/etc/event</code>); <code>".event.tc"</code> from the user's home directory; <code>"%p.tc"</code> from the system configuration directory; and <code>".%p.tc"</code> from the user's home directory. This default may be overridden by passing <a class="el" href="group__event.html#ga11">event_init()</a> an <a class="el" href="group__event.html#ga2">ev_attr_t</a> object which has been modified by a call to <a class="el" href="group__event.html#ga14">event_attr_confpath()</a>.<p>
-Any variables passed in an <a class="el" href="group__event.html#ga2">ev_attr_t</a> (modified by a call to the <a class="el" href="group__event.html#ga18">event_attr_confvar()</a> function) will override any values found in any of the configuration files loaded by <a class="el" href="group__event.html#ga11">event_init()</a>. <hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:41:07 2005 for event by
+Any variables passed in an <a class="el" href="group__event.html#ga2">ev_attr_t</a> (modified by a call to the <a class="el" href="group__event.html#ga18">event_attr_confvar()</a> function) will override any values found in any of the configuration files loaded by <a class="el" href="group__event.html#ga11">event_init()</a>. <hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:48:08 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/dir_000000.html
diff -u event/doc/html/dir_000000.html:1.18 event/doc/html/dir_000000.html:1.19
--- event/doc/html/dir_000000.html:1.18 Sat Oct 8 18:45:00 2005
+++ event/doc/html/dir_000000.html Mon Oct 24 18:49:28 2005
@@ -73,7 +73,7 @@
<p>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:41:11 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:48:12 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/dirs.html
diff -u event/doc/html/dirs.html:1.18 event/doc/html/dirs.html:1.19
--- event/doc/html/dirs.html:1.18 Sat Oct 8 18:45:00 2005
+++ event/doc/html/dirs.html Mon Oct 24 18:49:28 2005
@@ -8,7 +8,7 @@
<h1>event Directories</h1>This directory hierarchy is sorted roughly, but not completely, alphabetically:<ul>
<li><a class="el" href="dir_000000.html">tests</a>
</ul>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:41:11 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:48:12 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__activate_8c-source.html
diff -u event/doc/html/engine__activate_8c-source.html:1.12 event/doc/html/engine__activate_8c-source.html:1.13
--- event/doc/html/engine__activate_8c-source.html:1.12 Sat Oct 8 18:45:00 2005
+++ event/doc/html/engine__activate_8c-source.html Mon Oct 24 18:49:28 2005
@@ -74,7 +74,7 @@
<a name="l00086"></a>00086
<a name="l00087"></a>00087 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* all done! */</span>
<a name="l00088"></a>00088 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__activate_8c.html
diff -u event/doc/html/engine__activate_8c.html:1.12 event/doc/html/engine__activate_8c.html:1.13
--- event/doc/html/engine__activate_8c.html:1.12 Sat Oct 8 18:45:00 2005
+++ event/doc/html/engine__activate_8c.html Mon Oct 24 18:49:28 2005
@@ -91,7 +91,7 @@
Referenced by <a class="el" href="engine__activate_8c-source.html#l00063">engine_activate()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:05 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:08 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__register_8c-source.html
diff -u event/doc/html/engine__register_8c-source.html:1.15 event/doc/html/engine__register_8c-source.html:1.16
--- event/doc/html/engine__register_8c-source.html:1.15 Sat Oct 8 18:45:00 2005
+++ event/doc/html/engine__register_8c-source.html Mon Oct 24 18:49:28 2005
@@ -95,7 +95,7 @@
<a name="l00095"></a>00095
<a name="l00096"></a>00096 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00097"></a>00097 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__register_8c.html
diff -u event/doc/html/engine__register_8c.html:1.15 event/doc/html/engine__register_8c.html:1.16
--- event/doc/html/engine__register_8c.html:1.15 Sat Oct 8 18:45:00 2005
+++ event/doc/html/engine__register_8c.html Mon Oct 24 18:49:28 2005
@@ -38,7 +38,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register an engine. <a href="group__engines.html#ga18"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:06 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines_8h-source.html
diff -u event/doc/html/engines_8h-source.html:1.18 event/doc/html/engines_8h-source.html:1.19
--- event/doc/html/engines_8h-source.html:1.18 Sat Oct 8 18:45:00 2005
+++ event/doc/html/engines_8h-source.html Mon Oct 24 18:49:28 2005
@@ -212,7 +212,7 @@
<a name="l00769"></a>00769 <a class="code" href="event_8h.html#a1">EV_END_C_DECLS</a>
<a name="l00770"></a>00770
<a name="l00773"></a>00773 <span class="preprocessor">#endif </span><span class="comment">/* __include_event_engines_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines_8h.html
diff -u event/doc/html/engines_8h.html:1.18 event/doc/html/engines_8h.html:1.19
--- event/doc/html/engines_8h.html:1.18 Sat Oct 8 18:45:00 2005
+++ event/doc/html/engines_8h.html Mon Oct 24 18:49:28 2005
@@ -210,7 +210,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Engine module descriptor. <a href="group__engines.html#ga0"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:07 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:10 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines__int_8h-source.html
diff -u event/doc/html/engines__int_8h-source.html:1.18 event/doc/html/engines__int_8h-source.html:1.19
--- event/doc/html/engines__int_8h-source.html:1.18 Sat Oct 8 18:45:00 2005
+++ event/doc/html/engines__int_8h-source.html Mon Oct 24 18:49:28 2005
@@ -76,7 +76,7 @@
<a name="l00234"></a>00234 <span class="preprocessor">} while (0)</span>
<a name="l00235"></a>00235 <span class="preprocessor"></span>
<a name="l00236"></a>00236 <span class="preprocessor">#endif </span><span class="comment">/* __include_engine_int_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines__int_8h.html
diff -u event/doc/html/engines__int_8h.html:1.18 event/doc/html/engines__int_8h.html:1.19
--- event/doc/html/engines__int_8h.html:1.18 Sat Oct 8 18:45:00 2005
+++ event/doc/html/engines__int_8h.html Mon Oct 24 18:49:28 2005
@@ -628,7 +628,7 @@
Referenced by <a class="el" href="engine__register_8c-source.html#l00034">engine_register()</a>, and <a class="el" href="event__init_8c-source.html#l00326">event_init()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:09 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:12 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodinit_8c-source.html
diff -u event/doc/html/engmodinit_8c-source.html:1.11 event/doc/html/engmodinit_8c-source.html:1.12
--- event/doc/html/engmodinit_8c-source.html:1.11 Sat Oct 8 18:45:01 2005
+++ event/doc/html/engmodinit_8c-source.html Mon Oct 24 18:49:28 2005
@@ -85,7 +85,7 @@
<a name="l00177"></a>00177
<a name="l00178"></a>00178 <span class="keywordflow">return</span> &engine;
<a name="l00179"></a>00179 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodinit_8c.html
diff -u event/doc/html/engmodinit_8c.html:1.11 event/doc/html/engmodinit_8c.html:1.12
--- event/doc/html/engmodinit_8c.html:1.11 Sat Oct 8 18:45:01 2005
+++ event/doc/html/engmodinit_8c.html Mon Oct 24 18:49:28 2005
@@ -479,7 +479,7 @@
Referenced by <a class="el" href="t__event__init_8c-source.html#l00277">main()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:10 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:13 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodule_8c-source.html
diff -u event/doc/html/engmodule_8c-source.html:1.11 event/doc/html/engmodule_8c-source.html:1.12
--- event/doc/html/engmodule_8c-source.html:1.11 Sat Oct 8 18:45:01 2005
+++ event/doc/html/engmodule_8c-source.html Mon Oct 24 18:49:28 2005
@@ -75,7 +75,7 @@
<a name="l00161"></a>00161 <a class="code" href="engmodule_8c.html#a4">em_sock</a>, <a class="code" href="engmodule_8c.html#a4">em_sock</a>, <a class="code" href="engmodule_8c.html#a5">em_sockev</a>,
<a name="l00162"></a>00162 <a class="code" href="engmodule_8c.html#a6">em_sig</a>, <a class="code" href="engmodule_8c.html#a6">em_sig</a>,
<a name="l00163"></a>00163 <a class="code" href="engmodule_8c.html#a7">em_tim</a>, <a class="code" href="engmodule_8c.html#a7">em_tim</a>);
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodule_8c.html
diff -u event/doc/html/engmodule_8c.html:1.11 event/doc/html/engmodule_8c.html:1.12
--- event/doc/html/engmodule_8c.html:1.11 Sat Oct 8 18:45:01 2005
+++ event/doc/html/engmodule_8c.html Mon Oct 24 18:49:28 2005
@@ -445,7 +445,7 @@
Definition at line <a class="el" href="engmodule_8c-source.html#l00150">150</a> of file <a class="el" href="engmodule_8c-source.html">engmodule.c</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:11 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:14 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event-test_8h-source.html
diff -u event/doc/html/event-test_8h-source.html:1.18 event/doc/html/event-test_8h-source.html:1.19
--- event/doc/html/event-test_8h-source.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event-test_8h-source.html Mon Oct 24 18:49:28 2005
@@ -82,7 +82,7 @@
<a name="l00123"></a>00123 } while (0)
<a name="l00124"></a>00124
<a name="l00125"></a>00125 <span class="preprocessor">#endif </span><span class="comment">/* __event_test_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event-test_8h.html
diff -u event/doc/html/event-test_8h.html:1.18 event/doc/html/event-test_8h.html:1.19
--- event/doc/html/event-test_8h.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event-test_8h.html Mon Oct 24 18:49:28 2005
@@ -198,7 +198,7 @@
Referenced by <a class="el" href="t__event__attrs_8c-source.html#l00043">main()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:12 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:15 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event_8h-source.html
diff -u event/doc/html/event_8h-source.html:1.18 event/doc/html/event_8h-source.html:1.19
--- event/doc/html/event_8h-source.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event_8h-source.html Mon Oct 24 18:49:28 2005
@@ -22,7 +22,7 @@
<a name="l00015"></a>00015 <span class="comment">** along with this program; if not, write to the Free Software</span>
<a name="l00016"></a>00016 <span class="comment">** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
<a name="l00017"></a>00017 <span class="comment">**</span>
-<a name="l00018"></a>00018 <span class="comment">** @(#)$Id: event.h,v 1.27 2005/09/14 03:45:36 klmitch Exp $</span>
+<a name="l00018"></a>00018 <span class="comment">** @(#)$Id: event.h,v 1.28 2005/10/25 01:46:17 klmitch Exp $</span>
<a name="l00019"></a>00019 <span class="comment">*/</span>
<a name="l00020"></a>00020 <span class="preprocessor">#ifndef __include_event_event_h__</span>
<a name="l00021"></a>00021 <span class="preprocessor"></span><span class="preprocessor">#define __include_event_event_h__</span>
@@ -269,27 +269,26 @@
<a name="l01062"></a>01062 <a class="code" href="group__event.html#ga10">ev_freegen_t</a> genrel)
<a name="l01063"></a>01063 _gca_nonnull((1));
<a name="l01064"></a>01064
-<a name="l01087"></a>01087 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga21">event_gen_alloc</a>(ev_ctx_t *ctx, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> gentype,
-<a name="l01088"></a>01088 ev_genhdr_t **gen)
-<a name="l01089"></a>01089 _gca_nonnull((1, 3));
-<a name="l01090"></a>01090
-<a name="l01108"></a>01108 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga22">event_gen_release</a>(ev_ctx_t *ctx, ev_genhdr_t *gen)
-<a name="l01109"></a>01109 _gca_nonnull((1, 2));
-<a name="l01110"></a>01110
-<a name="l01123"></a>01123 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga23">event_log_set</a>(<a class="code" href="group__event.html#ga9">ev_log_t</a> logger);
-<a name="l01124"></a>01124
-<a name="l01135"></a>01135 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga24">event_log_reset</a>(<span class="keywordtype">void</span>);
-<a name="l01136"></a>01136
-<a name="l01149"></a>01149 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga25">event_log_debug</a>(<span class="keywordtype">int</span> onoff);
-<a name="l01150"></a>01150
-<a name="l01164"></a>01164 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga26">event_log_trace</a>(<span class="keywordtype">int</span> onoff);
-<a name="l01165"></a>01165
-<a name="l01181"></a>01181 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga27">event_log_abort</a>(<span class="keywordtype">int</span> onoff);
-<a name="l01182"></a>01182
-<a name="l01183"></a>01183 <a class="code" href="event_8h.html#a1">EV_END_C_DECLS</a>
-<a name="l01184"></a>01184
-<a name="l01187"></a>01187 #endif <span class="comment">/* __include_event_event_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+<a name="l01089"></a>01089 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga21">event_gen_alloc</a>(ev_ctx_t *ctx, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> gentype, <span class="keywordtype">void</span> *gen)
+<a name="l01090"></a>01090 _gca_nonnull((1, 3));
+<a name="l01091"></a>01091
+<a name="l01109"></a>01109 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga22">event_gen_release</a>(ev_ctx_t *ctx, ev_genhdr_t *gen)
+<a name="l01110"></a>01110 _gca_nonnull((1, 2));
+<a name="l01111"></a>01111
+<a name="l01124"></a>01124 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga23">event_log_set</a>(<a class="code" href="group__event.html#ga9">ev_log_t</a> logger);
+<a name="l01125"></a>01125
+<a name="l01136"></a>01136 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga24">event_log_reset</a>(<span class="keywordtype">void</span>);
+<a name="l01137"></a>01137
+<a name="l01150"></a>01150 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga25">event_log_debug</a>(<span class="keywordtype">int</span> onoff);
+<a name="l01151"></a>01151
+<a name="l01165"></a>01165 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga26">event_log_trace</a>(<span class="keywordtype">int</span> onoff);
+<a name="l01166"></a>01166
+<a name="l01182"></a>01182 extern <a class="code" href="group__event.html#ga5">ev_err_t</a> <a class="code" href="group__event.html#ga27">event_log_abort</a>(<span class="keywordtype">int</span> onoff);
+<a name="l01183"></a>01183
+<a name="l01184"></a>01184 <a class="code" href="event_8h.html#a1">EV_END_C_DECLS</a>
+<a name="l01185"></a>01185
+<a name="l01188"></a>01188 #endif <span class="comment">/* __include_event_event_h__ */</span>
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event_8h.html
diff -u event/doc/html/event_8h.html:1.18 event/doc/html/event_8h.html:1.19
--- event/doc/html/event_8h.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event_8h.html Mon Oct 24 18:49:28 2005
@@ -261,7 +261,7 @@
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__event.html#ga5">ev_err_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__event.html#ga20">event_gen_register</a> (<a class="el" href="struct__ev__ctx__s.html">ev_ctx_t</a> *ctx, unsigned int gentype, <a class="el" href="group__event.html#ga6">ev_magic_t</a> genmagic, size_t gensize, <a class="el" href="group__event.html#ga10">ev_freegen_t</a> genrel)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register a generator. <a href="group__event.html#ga20"></a><br></td></tr>
-<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__event.html#ga5">ev_err_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__event.html#ga21">event_gen_alloc</a> (<a class="el" href="struct__ev__ctx__s.html">ev_ctx_t</a> *ctx, unsigned int gentype, <a class="el" href="struct__ev__genhdr__s.html">ev_genhdr_t</a> **gen)</td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__event.html#ga5">ev_err_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__event.html#ga21">event_gen_alloc</a> (<a class="el" href="struct__ev__ctx__s.html">ev_ctx_t</a> *ctx, unsigned int gentype, void *gen)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocate a generator. <a href="group__event.html#ga21"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__event.html#ga5">ev_err_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__event.html#ga22">event_gen_release</a> (<a class="el" href="struct__ev__ctx__s.html">ev_ctx_t</a> *ctx, <a class="el" href="struct__ev__genhdr__s.html">ev_genhdr_t</a> *gen)</td></tr>
@@ -340,7 +340,7 @@
Definition at line <a class="el" href="event_8h-source.html#l00166">166</a> of file <a class="el" href="event_8h-source.html">event.h</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:13 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:16 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confpath_8c-source.html
diff -u event/doc/html/event__attr__confpath_8c-source.html:1.18 event/doc/html/event__attr__confpath_8c-source.html:1.19
--- event/doc/html/event__attr__confpath_8c-source.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__confpath_8c-source.html Mon Oct 24 18:49:28 2005
@@ -47,7 +47,7 @@
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00049"></a>00049 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confpath_8c.html
diff -u event/doc/html/event__attr__confpath_8c.html:1.18 event/doc/html/event__attr__confpath_8c.html:1.19
--- event/doc/html/event__attr__confpath_8c.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__confpath_8c.html Mon Oct 24 18:49:28 2005
@@ -35,7 +35,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve and/or set default configuration search path. <a href="group__event.html#ga14"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:14 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:16 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confreg_8c-source.html
diff -u event/doc/html/event__attr__confreg_8c-source.html:1.17 event/doc/html/event__attr__confreg_8c-source.html:1.18
--- event/doc/html/event__attr__confreg_8c-source.html:1.17 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__confreg_8c-source.html Mon Oct 24 18:49:28 2005
@@ -74,7 +74,7 @@
<a name="l00074"></a>00074
<a name="l00075"></a>00075 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00076"></a>00076 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confreg_8c.html
diff -u event/doc/html/event__attr__confreg_8c.html:1.17 event/doc/html/event__attr__confreg_8c.html:1.18
--- event/doc/html/event__attr__confreg_8c.html:1.17 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__confreg_8c.html Mon Oct 24 18:49:28 2005
@@ -37,7 +37,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register a treeconf variable for the application. <a href="group__event.html#ga17"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:14 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:17 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confvar_8c-source.html
diff -u event/doc/html/event__attr__confvar_8c-source.html:1.17 event/doc/html/event__attr__confvar_8c-source.html:1.18
--- event/doc/html/event__attr__confvar_8c-source.html:1.17 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__confvar_8c-source.html Mon Oct 24 18:49:28 2005
@@ -79,7 +79,7 @@
<a name="l00079"></a>00079
<a name="l00080"></a>00080 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00081"></a>00081 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confvar_8c.html
diff -u event/doc/html/event__attr__confvar_8c.html:1.17 event/doc/html/event__attr__confvar_8c.html:1.18
--- event/doc/html/event__attr__confvar_8c.html:1.17 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__confvar_8c.html Mon Oct 24 18:49:28 2005
@@ -37,7 +37,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Override a treeconf variable setting. <a href="group__event.html#ga18"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:15 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:18 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__destroy_8c-source.html
diff -u event/doc/html/event__attr__destroy_8c-source.html:1.18 event/doc/html/event__attr__destroy_8c-source.html:1.19
--- event/doc/html/event__attr__destroy_8c-source.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__destroy_8c-source.html Mon Oct 24 18:49:28 2005
@@ -61,7 +61,7 @@
<a name="l00062"></a>00062
<a name="l00063"></a>00063 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* all done! */</span>
<a name="l00064"></a>00064 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__destroy_8c.html
diff -u event/doc/html/event__attr__destroy_8c.html:1.18 event/doc/html/event__attr__destroy_8c.html:1.19
--- event/doc/html/event__attr__destroy_8c.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__destroy_8c.html Mon Oct 24 18:49:28 2005
@@ -36,7 +36,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy an attribute set and release all allocated memory. <a href="group__event.html#ga19"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:16 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:19 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__engine_8c-source.html
diff -u event/doc/html/event__attr__engine_8c-source.html:1.13 event/doc/html/event__attr__engine_8c-source.html:1.14
--- event/doc/html/event__attr__engine_8c-source.html:1.13 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__engine_8c-source.html Mon Oct 24 18:49:28 2005
@@ -79,7 +79,7 @@
<a name="l00079"></a>00079
<a name="l00080"></a>00080 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00081"></a>00081 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__engine_8c.html
diff -u event/doc/html/event__attr__engine_8c.html:1.13 event/doc/html/event__attr__engine_8c.html:1.14
--- event/doc/html/event__attr__engine_8c.html:1.13 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__engine_8c.html Mon Oct 24 18:49:28 2005
@@ -39,7 +39,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register an application-specific engine. <a href="group__engines.html#ga20"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:17 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:20 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__init_8c-source.html
diff -u event/doc/html/event__attr__init_8c-source.html:1.18 event/doc/html/event__attr__init_8c-source.html:1.19
--- event/doc/html/event__attr__init_8c-source.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__init_8c-source.html Mon Oct 24 18:49:28 2005
@@ -49,7 +49,7 @@
<a name="l00049"></a>00049
<a name="l00050"></a>00050 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* all done! */</span>
<a name="l00051"></a>00051 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__init_8c.html
diff -u event/doc/html/event__attr__init_8c.html:1.18 event/doc/html/event__attr__init_8c.html:1.19
--- event/doc/html/event__attr__init_8c.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__init_8c.html Mon Oct 24 18:49:28 2005
@@ -36,7 +36,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize a set of attributes for the events library. <a href="group__event.html#ga13"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:18 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:20 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__libpath_8c-source.html
diff -u event/doc/html/event__attr__libpath_8c-source.html:1.18 event/doc/html/event__attr__libpath_8c-source.html:1.19
--- event/doc/html/event__attr__libpath_8c-source.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__libpath_8c-source.html Mon Oct 24 18:49:28 2005
@@ -47,7 +47,7 @@
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00049"></a>00049 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__libpath_8c.html
diff -u event/doc/html/event__attr__libpath_8c.html:1.18 event/doc/html/event__attr__libpath_8c.html:1.19
--- event/doc/html/event__attr__libpath_8c.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__libpath_8c.html Mon Oct 24 18:49:28 2005
@@ -35,7 +35,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve and/or set default module search path. <a href="group__event.html#ga15"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:19 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:21 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__modlist_8c-source.html
diff -u event/doc/html/event__attr__modlist_8c-source.html:1.18 event/doc/html/event__attr__modlist_8c-source.html:1.19
--- event/doc/html/event__attr__modlist_8c-source.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__modlist_8c-source.html Mon Oct 24 18:49:28 2005
@@ -47,7 +47,7 @@
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00049"></a>00049 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__modlist_8c.html
diff -u event/doc/html/event__attr__modlist_8c.html:1.18 event/doc/html/event__attr__modlist_8c.html:1.19
--- event/doc/html/event__attr__modlist_8c.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__attr__modlist_8c.html Mon Oct 24 18:49:28 2005
@@ -35,7 +35,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve and/or set default module list. <a href="group__event.html#ga16"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:19 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:22 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__destroy_8c-source.html
diff -u event/doc/html/event__destroy_8c-source.html:1.18 event/doc/html/event__destroy_8c-source.html:1.19
--- event/doc/html/event__destroy_8c-source.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__destroy_8c-source.html Mon Oct 24 18:49:28 2005
@@ -134,7 +134,7 @@
<a name="l00134"></a>00134
<a name="l00135"></a>00135 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* All done! */</span>
<a name="l00136"></a>00136 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:01 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:05 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__destroy_8c.html
diff -u event/doc/html/event__destroy_8c.html:1.18 event/doc/html/event__destroy_8c.html:1.19
--- event/doc/html/event__destroy_8c.html:1.18 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__destroy_8c.html Mon Oct 24 18:49:28 2005
@@ -38,7 +38,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Release memory used by events library context. <a href="group__event.html#ga12"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Oct 8 21:40:21 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Mon Oct 24 21:47:23 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__gen__alloc_8c-source.html
diff -u event/doc/html/event__gen__alloc_8c-source.html:1.10 event/doc/html/event__gen__alloc_8c-source.html:1.11
--- event/doc/html/event__gen__alloc_8c-source.html:1.10 Sat Oct 8 18:45:01 2005
+++ event/doc/html/event__gen__alloc_8c-source.html Mon Oct 24 18:49:28 2005
@@ -22,14 +22,14 @@
<a name="l00015"></a>00015 <span class="comment">** along with this program; if not, write to the Free Software</span>
<a name="l00016"></a>00016 <span class="comment">** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span>
<a name="l00017"></a>00017 <span class="comment">**</span>
-<a name="l00018"></a>00018 <span class="comment">** @(#)$Id: event_gen_alloc.c,v 1.1 2005/07/11 23:34:32 klmitch Exp $</span>
+<a name="l00018"></a>00018 <span class="comment">** @(#)$Id: event_gen_alloc.c,v 1.2 2005/10/25 01:46:17 klmitch Exp $</span>
<a name="l00019"></a>00019 <span class="comment">*/</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="event__int_8h.html">event_int.h</a>"</span>
<a name="l00028"></a>00028
<a name="l00029"></a>00029 <...
[truncated message content] |
|
From: Kevin L. M. <kl...@us...> - 2005-10-25 01:46:44
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-10-25 01:46:27 UTC
Modified files:
ChangeLog Makefile.am event.h event_gen_alloc.c signal_create.c
sockaddr_atop.c timer_create.c tests/t_event_init.c
tests/t_evg_alloc.c
Log message:
change signature of event_gen_alloc() to drop a 'strict aliasing' warning;
fix typo in documentation comment; delete _stdint.h on 'make distclean';
fix test to reflect the fact that engines with no timer create/destroy
callbacks are now permitted; make sure t_event_init() calls FAIL() with
FATAL() (discovered when I found both FAIL and PASS for the ea_engine test)
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.58 event/ChangeLog:1.59
--- event/ChangeLog:1.58 Sat Oct 8 18:42:41 2005
+++ event/ChangeLog Mon Oct 24 18:46:17 2005
@@ -1,3 +1,32 @@
+2005-10-24 Kevin L. Mitchell <kl...@mi...>
+
+ * tests/t_evg_alloc.c (main): change signature of
+ event_gen_alloc() in an attempt to drop a warning with strict
+ aliasing
+
+ * tests/t_event_init.c: engines are now permitted to not set
+ set/del callbacks; make failures FATAL so they show up
+
+ * timer_create.c (timer_create): change signature of
+ event_gen_alloc() in an attempt to drop a warning with strict
+ aliasing
+
+ * sockaddr_atop.c: fix a typo in doc comments: this is
+ sockaddr_atop(), not sockaddr_pton()!
+
+ * signal_create.c (signal_create): change signature of
+ event_gen_alloc() in an attempt to drop a warning with strict
+ aliasing
+
+ * event_gen_alloc.c (event_gen_alloc): change signature in an
+ attempt to drop a warning with strict aliasing
+
+ * event.h: change signature for event_gen_alloc() in an attempt to
+ drop a warning with strict aliasing
+
+ * Makefile.am (DISTCLEANFILES): must get rid of _stdint.h on
+ distclean
+
2005-10-08 Kevin L. Mitchell <kl...@mi...>
* m4/ax_create_stdint_h.m4: autoconf macro to support creation of
Index: event/Makefile.am
diff -u event/Makefile.am:1.19 event/Makefile.am:1.20
--- event/Makefile.am:1.19 Sat Oct 8 18:42:41 2005
+++ event/Makefile.am Mon Oct 24 18:46:17 2005
@@ -16,7 +16,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
-## @(#)$Id: Makefile.am,v 1.19 2005/10/09 01:42:41 klmitch Exp $
+## @(#)$Id: Makefile.am,v 1.20 2005/10/25 01:46:17 klmitch Exp $
##
## Process this file with automake to generate Makefile.in
@@ -73,7 +73,7 @@
CLEANFILES = event_version.c event_version.h \
event_err.c event_err.h
-DISTCLEANFILES = event-config.in
+DISTCLEANFILES = event-config.in _stdint.h
DISTHOOKCLEANFILES = $(CLEANFILES)
Index: event/event.h
diff -u event/event.h:1.27 event/event.h:1.28
--- event/event.h:1.27 Tue Sep 13 20:45:36 2005
+++ event/event.h Mon Oct 24 18:46:17 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event.h,v 1.27 2005/09/14 03:45:36 klmitch Exp $
+** @(#)$Id: event.h,v 1.28 2005/10/25 01:46:17 klmitch Exp $
*/
#ifndef __include_event_event_h__
#define __include_event_event_h__
@@ -1075,17 +1075,18 @@
* \param gentype
* A generator type previously passed to
* event_gen_register().
- * \param gen A pointer to a pointer to an #ev_genhdr_t, which will
- * be used to return the allocated generator to the
- * caller.
+ * \param gen A pointer to a pointer to an event generator
+ * structure, which will be used to return the allocated
+ * generator to the caller. Note that the argument type
+ * is pointer to \c void to stomp a warning having to do
+ * with strict aliasing in C99.
*
* \retval EINVAL An invalid argument was given.
* \retval ENOENT No such generator has been
* registered.
* \retval ENOMEM Out of memory.
*/
-extern ev_err_t event_gen_alloc(ev_ctx_t *ctx, unsigned int gentype,
- ev_genhdr_t **gen)
+extern ev_err_t event_gen_alloc(ev_ctx_t *ctx, unsigned int gentype, void *gen)
_gca_nonnull((1, 3));
/** \brief Release a generator.
Index: event/event_gen_alloc.c
diff -u event/event_gen_alloc.c:1.1 event/event_gen_alloc.c:1.2
--- event/event_gen_alloc.c:1.1 Mon Jul 11 16:34:32 2005
+++ event/event_gen_alloc.c Mon Oct 24 18:46:17 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_gen_alloc.c,v 1.1 2005/07/11 23:34:32 klmitch Exp $
+** @(#)$Id: event_gen_alloc.c,v 1.2 2005/10/25 01:46:17 klmitch Exp $
*/
/** \internal
* \file
@@ -29,7 +29,7 @@
#include <stdlib.h>
ev_err_t
-event_gen_alloc(ev_ctx_t *ctx, unsigned int gentype, ev_genhdr_t **gen)
+event_gen_alloc(ev_ctx_t *ctx, unsigned int gentype, void *gen)
{
ev_err_t err;
ev_gendesc_t *gd;
@@ -68,7 +68,7 @@
gd->gd_active.gl_count++; /* and increment the active list count */
- *gen = hdr; /* return the initialized structure... */
+ *((void **)gen) = hdr; /* return the initialized structure... */
ev_return(0); /* all done! */
}
Index: event/signal_create.c
diff -u event/signal_create.c:1.1 event/signal_create.c:1.2
--- event/signal_create.c:1.1 Thu Sep 15 11:14:11 2005
+++ event/signal_create.c Mon Oct 24 18:46:17 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: signal_create.c,v 1.1 2005/09/15 18:14:11 klmitch Exp $
+** @(#)$Id: signal_create.c,v 1.2 2005/10/25 01:46:17 klmitch Exp $
*/
/** \internal
* \file
@@ -28,7 +28,7 @@
#include <string.h>
-RCSTAG("@(#)$Id: signal_create.c,v 1.1 2005/09/15 18:14:11 klmitch Exp $");
+RCSTAG("@(#)$Id: signal_create.c,v 1.2 2005/10/25 01:46:17 klmitch Exp $");
ev_err_t
signal_create(ev_ctx_t *ctx, int signal, ev_call_t call, void *data,
@@ -45,7 +45,7 @@
ev_return(EINVAL);
/* Let's allocate a generator... */
- if ((err = event_gen_alloc(ctx, EGT_SIGNAL, (ev_genhdr_t **)&sig)))
+ if ((err = event_gen_alloc(ctx, EGT_SIGNAL, &sig)))
ev_return(err);
/* Set callback information */
Index: event/sockaddr_atop.c
diff -u event/sockaddr_atop.c:1.1 event/sockaddr_atop.c:1.2
--- event/sockaddr_atop.c:1.1 Sat Oct 8 18:42:41 2005
+++ event/sockaddr_atop.c Mon Oct 24 18:46:17 2005
@@ -15,13 +15,13 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sockaddr_atop.c,v 1.1 2005/10/09 01:42:41 klmitch Exp $
+** @(#)$Id: sockaddr_atop.c,v 1.2 2005/10/25 01:46:17 klmitch Exp $
*/
/** \internal
* \file
- * \brief Implementation of sockaddr_pton().
+ * \brief Implementation of sockaddr_atop().
*
- * This file contains the implementation of the sockaddr_pton()
+ * This file contains the implementation of the sockaddr_atop()
* function.
*/
#include "event_int.h"
Index: event/tests/t_event_init.c
diff -u event/tests/t_event_init.c:1.5 event/tests/t_event_init.c:1.6
--- event/tests/t_event_init.c:1.5 Sun Jul 10 20:48:09 2005
+++ event/tests/t_event_init.c Mon Oct 24 18:46:17 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: t_event_init.c,v 1.5 2005/07/11 03:48:09 klmitch Exp $
+** @(#)$Id: t_event_init.c,v 1.6 2005/10/25 01:46:17 klmitch Exp $
*/
/** \internal
* \file
@@ -31,7 +31,7 @@
#include <stdio.h>
#include <string.h>
-RCSTAG("@(#)$Id: t_event_init.c,v 1.5 2005/07/11 03:48:09 klmitch Exp $");
+RCSTAG("@(#)$Id: t_event_init.c,v 1.6 2005/10/25 01:46:17 klmitch Exp $");
TEST_PROG(t_event_init, "Test operation of event_init() and related functions")
TEST_ARG(t_event_init, "<event-test.tc>")
@@ -187,9 +187,9 @@
0, 0, 0, 0, 0, 0, 0) },
/* Engine with bad timer component. */
- { EINVAL, 0, EV_ENGINE_INIT("badtim", "Test bad timer engine rejection",
- EV_ENGINE_TIMER, ei_init, ei_poll, 0,
- 0, 0, 0, 0, 0, 0, 0) },
+ { 0, 0, EV_ENGINE_INIT("badtim", "Test bad timer engine rejection",
+ EV_ENGINE_TIMER, ei_init, ei_poll, 0,
+ 0, 0, 0, 0, 0, 0, 0) },
/* Socket-only engine. */
{ 0, EV_ENGINE_SOCKET,
@@ -335,7 +335,7 @@
for (i = 0; i < TENG_CNT; i++)
if ((err = event_attr_engine(&attrs, &tengs[i].engine)) !=
tengs[i].err_code)
- FAIL(TEST_NAME(ea_engine), 0, "Failure adding engine \"%s\" to "
+ FAIL(TEST_NAME(ea_engine), FATAL(0), "Failure adding engine \"%s\" to "
"attributes set; error code %u (expected %u)",
eng_name(&tengs[i].engine), err, tengs[i].err_code);
PASS(TEST_NAME(ea_engine), "Successfully added application-specific "
@@ -359,8 +359,8 @@
"initialized properly")
for (i = 0; i < TENG_CNT; i++)
if (tengs[i].comp_flags != (ev_flags_t)eng_data(&tengs[i].engine))
- FAIL(TEST_NAME(ea_enginit), 0, "Failure initializing engine \"%s\"; "
- "init called with flags 0x%08lx, expected 0x%08lx",
+ FAIL(TEST_NAME(ea_enginit), FATAL(0), "Failure initializing engine "
+ "\"%s\"; init called with flags 0x%08lx, expected 0x%08lx",
eng_name(&tengs[i].engine),
(ev_flags_t)eng_data(&tengs[i].engine), tengs[i].comp_flags);
PASS(TEST_NAME(ea_enginit), "All application-specific engines successfully "
Index: event/tests/t_evg_alloc.c
diff -u event/tests/t_evg_alloc.c:1.1 event/tests/t_evg_alloc.c:1.2
--- event/tests/t_evg_alloc.c:1.1 Mon Jul 11 16:34:34 2005
+++ event/tests/t_evg_alloc.c Mon Oct 24 18:46:17 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: t_evg_alloc.c,v 1.1 2005/07/11 23:34:34 klmitch Exp $
+** @(#)$Id: t_evg_alloc.c,v 1.2 2005/10/25 01:46:17 klmitch Exp $
*/
/** \internal
* \file
@@ -26,7 +26,7 @@
*/
#include "event-test.h"
-RCSTAG("@(#)$Id: t_evg_alloc.c,v 1.1 2005/07/11 23:34:34 klmitch Exp $");
+RCSTAG("@(#)$Id: t_evg_alloc.c,v 1.2 2005/10/25 01:46:17 klmitch Exp $");
TEST_PROG(t_evg_alloc, "Test operation of event_gen_alloc() and "
"event_gen_release()")
@@ -91,8 +91,7 @@
TEST_DECL(t_evg_alloc, evg_alloc, "Test that event_gen_alloc() can allocate "
"generators")
for (i = 0; i < cnt(alloc); i++)
- if ((err = event_gen_alloc(&ctx, EGT_RESERVED,
- (ev_genhdr_t **)&alloc[i])))
+ if ((err = event_gen_alloc(&ctx, EGT_RESERVED, &alloc[i])))
FAIL(TEST_NAME(evg_alloc), FATAL(0), "Unable to allocate "
"generator %d; error code %u", i, err);
else
@@ -128,7 +127,7 @@
TEST_DECL(t_evg_alloc, evg_realloc, "Test that event_gen_alloc() can "
"resurrect released generators from the free list")
for (i = 0; i < fcnt; i++)
- if ((err = event_gen_alloc(&ctx, EGT_RESERVED, (ev_genhdr_t **)&gen)))
+ if ((err = event_gen_alloc(&ctx, EGT_RESERVED, &gen)))
FAIL(TEST_NAME(evg_realloc), FATAL(0), "Unable to allocate "
"generator %d; error code %u", i, err);
else if (gen->tg_seq >= cnt(alloc) || gen != alloc[gen->tg_seq])
Index: event/timer_create.c
diff -u event/timer_create.c:1.2 event/timer_create.c:1.3
--- event/timer_create.c:1.2 Thu Sep 15 11:14:11 2005
+++ event/timer_create.c Mon Oct 24 18:46:17 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: timer_create.c,v 1.2 2005/09/15 18:14:11 klmitch Exp $
+** @(#)$Id: timer_create.c,v 1.3 2005/10/25 01:46:17 klmitch Exp $
*/
/** \internal
* \file
@@ -28,7 +28,7 @@
*/
#include "engines_int.h"
-RCSTAG("@(#)$Id: timer_create.c,v 1.2 2005/09/15 18:14:11 klmitch Exp $");
+RCSTAG("@(#)$Id: timer_create.c,v 1.3 2005/10/25 01:46:17 klmitch Exp $");
ev_err_t
_timer_insert(ev_ctx_t *ctx, ev_tim_t *tim)
@@ -94,7 +94,7 @@
ev_return(EINVAL);
/* Let's allocate a generator... */
- if ((err = event_gen_alloc(ctx, EGT_TIMER, (ev_genhdr_t **)&tim)))
+ if ((err = event_gen_alloc(ctx, EGT_TIMER, &tim)))
ev_return(err);
/* Set callback information */
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-10-09 01:43:21
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-10-09 01:43:08 UTC
Added files:
m4/ax_create_stdint_h.m4
Log message:
new autoconf macro
---------------------- diff included ----------------------
Index: event/m4/ax_create_stdint_h.m4
diff -u /dev/null event/m4/ax_create_stdint_h.m4:1.1
--- /dev/null Sat Oct 8 18:43:08 2005
+++ event/m4/ax_create_stdint_h.m4 Sat Oct 8 18:42:58 2005
@@ -0,0 +1,677 @@
+dnl @synopsis AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEDERS-TO-CHECK])]
+dnl
+dnl the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the
+dnl existence of an include file <stdint.h> that defines a set of
+dnl typedefs, especially uint8_t,int32_t,uintptr_t.
+dnl Many older installations will not provide this file, but some will
+dnl have the very same definitions in <inttypes.h>. In other enviroments
+dnl we can use the inet-types in <sys/types.h> which would define the
+dnl typedefs int8_t and u_int8_t respectivly.
+dnl
+dnl This macros will create a local "_stdint.h" or the headerfile given as
+dnl an argument. In many cases that file will just "#include <stdint.h>"
+dnl or "#include <inttypes.h>", while in other environments it will provide
+dnl the set of basic 'stdint's definitions/typedefs:
+dnl int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,intptr_t,uintptr_t
+dnl int_least32_t.. int_fast32_t.. intmax_t
+dnl which may or may not rely on the definitions of other files,
+dnl or using the AC_CHECK_SIZEOF macro to determine the actual
+dnl sizeof each type.
+dnl
+dnl if your header files require the stdint-types you will want to create an
+dnl installable file mylib-int.h that all your other installable header
+dnl may include. So if you have a library package named "mylib", just use
+dnl AX_CREATE_STDINT_H(mylib-int.h)
+dnl in configure.ac and go to install that very header file in Makefile.am
+dnl along with the other headers (mylib.h) - and the mylib-specific headers
+dnl can simply use "#include <mylib-int.h>" to obtain the stdint-types.
+dnl
+dnl Remember, if the system already had a valid <stdint.h>, the generated
+dnl file will include it directly. No need for fuzzy HAVE_STDINT_H things...
+dnl
+dnl @, (status: used on new platforms) (see http://ac-archive.sf.net/gstdint/)
+dnl @version $Id: ax_create_stdint_h.m4,v 1.1 2005/10/09 01:42:58 klmitch Exp $
+dnl @author Guido Draheim <gu...@gm...>
+
+AC_DEFUN([AX_CHECK_DATA_MODEL],[
+ AC_CHECK_SIZEOF(char)
+ AC_CHECK_SIZEOF(short)
+ AC_CHECK_SIZEOF(int)
+ AC_CHECK_SIZEOF(long)
+ AC_CHECK_SIZEOF(void*)
+ ac_cv_char_data_model=""
+ ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char"
+ ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short"
+ ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int"
+ ac_cv_long_data_model=""
+ ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int"
+ ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long"
+ ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp"
+ AC_MSG_CHECKING([data model])
+ case "$ac_cv_char_data_model/$ac_cv_long_data_model" in
+ 122/242) ac_cv_data_model="IP16" ; n="standard 16bit machine" ;;
+ 122/244) ac_cv_data_model="LP32" ; n="standard 32bit machine" ;;
+ 122/*) ac_cv_data_model="i16" ; n="unusual int16 model" ;;
+ 124/444) ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;;
+ 124/488) ac_cv_data_model="LP64" ; n="standard 64bit unixish" ;;
+ 124/448) ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;;
+ 124/*) ac_cv_data_model="i32" ; n="unusual int32 model" ;;
+ 128/888) ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;;
+ 128/*) ac_cv_data_model="i64" ; n="unusual int64 model" ;;
+ 222/*2) ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;;
+ 333/*3) ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;;
+ 444/*4) ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;;
+ 666/*6) ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;;
+ 888/*8) ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;;
+ 222/*|333/*|444/*|666/*|888/*) :
+ ac_cv_data_model="iDSP" ; n="unusual dsptype" ;;
+ *) ac_cv_data_model="none" ; n="very unusual model" ;;
+ esac
+ AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)])
+])
+
+dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF])
+AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[
+AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[
+ ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h)
+ AC_MSG_RESULT([(..)])
+ for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h]) ; do
+ unset ac_cv_type_uintptr_t
+ unset ac_cv_type_uint64_t
+ AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>])
+ AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
+ m4_ifvaln([$1],[$1]) break
+ done
+ AC_MSG_CHECKING([for stdint uintptr_t])
+ ])
+])
+
+AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[
+AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[
+ ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h)
+ AC_MSG_RESULT([(..)])
+ for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h stdint.h]) ; do
+ unset ac_cv_type_uint32_t
+ unset ac_cv_type_uint64_t
+ AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>])
+ AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
+ m4_ifvaln([$1],[$1]) break
+ break;
+ done
+ AC_MSG_CHECKING([for stdint uint32_t])
+ ])
+])
+
+AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[
+AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[
+ ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h)
+ AC_MSG_RESULT([(..)])
+ for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do
+ unset ac_cv_type_u_int32_t
+ unset ac_cv_type_u_int64_t
+ AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>])
+ AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>])
+ m4_ifvaln([$1],[$1]) break
+ break;
+ done
+ AC_MSG_CHECKING([for stdint u_int32_t])
+ ])
+])
+
+AC_DEFUN([AX_CREATE_STDINT_H],
+[# ------ AX CREATE STDINT H -------------------------------------
+AC_MSG_CHECKING([for stdint types])
+ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)`
+# try to shortcircuit - if the default include path of the compiler
+# can find a "stdint.h" header then we assume that all compilers can.
+AC_CACHE_VAL([ac_cv_header_stdint_t],[
+old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS=""
+old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS=""
+old_CFLAGS="$CFLAGS" ; CFLAGS=""
+AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;],
+[ac_cv_stdint_result="(assuming C99 compatible system)"
+ ac_cv_header_stdint_t="stdint.h"; ],
+[ac_cv_header_stdint_t=""])
+CXXFLAGS="$old_CXXFLAGS"
+CPPFLAGS="$old_CPPFLAGS"
+CFLAGS="$old_CFLAGS" ])
+
+v="... $ac_cv_header_stdint_h"
+if test "$ac_stdint_h" = "stdint.h" ; then
+ AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)])
+elif test "$ac_stdint_h" = "inttypes.h" ; then
+ AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)])
+elif test "_$ac_cv_header_stdint_t" = "_" ; then
+ AC_MSG_RESULT([(putting them into $ac_stdint_h)$v])
+else
+ ac_cv_header_stdint="$ac_cv_header_stdint_t"
+ AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)])
+fi
+
+if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit..
+
+dnl .....intro message done, now do a few system checks.....
+dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type,
+dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW
+dnl instead that is triggered with 3 or more arguments (see types.m4)
+
+inttype_headers=`echo $2 | sed -e 's/,/ /g'`
+
+ac_cv_stdint_result="(no helpful system typedefs seen)"
+AX_CHECK_HEADER_STDINT_X(dnl
+ stdint.h inttypes.h sys/inttypes.h $inttype_headers,
+ ac_cv_stdint_result="(seen uintptr_t$and64 in $i)")
+
+if test "_$ac_cv_header_stdint_x" = "_" ; then
+AX_CHECK_HEADER_STDINT_O(dnl,
+ inttypes.h sys/inttypes.h stdint.h $inttype_headers,
+ ac_cv_stdint_result="(seen uint32_t$and64 in $i)")
+fi
+
+if test "_$ac_cv_header_stdint_x" = "_" ; then
+if test "_$ac_cv_header_stdint_o" = "_" ; then
+AX_CHECK_HEADER_STDINT_U(dnl,
+ sys/types.h inttypes.h sys/inttypes.h $inttype_headers,
+ ac_cv_stdint_result="(seen u_int32_t$and64 in $i)")
+fi fi
+
+dnl if there was no good C99 header file, do some typedef checks...
+if test "_$ac_cv_header_stdint_x" = "_" ; then
+ AC_MSG_CHECKING([for stdint datatype model])
+ AC_MSG_RESULT([(..)])
+ AX_CHECK_DATA_MODEL
+fi
+
+if test "_$ac_cv_header_stdint_x" != "_" ; then
+ ac_cv_header_stdint="$ac_cv_header_stdint_x"
+elif test "_$ac_cv_header_stdint_o" != "_" ; then
+ ac_cv_header_stdint="$ac_cv_header_stdint_o"
+elif test "_$ac_cv_header_stdint_u" != "_" ; then
+ ac_cv_header_stdint="$ac_cv_header_stdint_u"
+else
+ ac_cv_header_stdint="stddef.h"
+fi
+
+AC_MSG_CHECKING([for extra inttypes in chosen header])
+AC_MSG_RESULT([($ac_cv_header_stdint)])
+dnl see if int_least and int_fast types are present in _this_ header.
+unset ac_cv_type_int_least32_t
+unset ac_cv_type_int_fast32_t
+AC_CHECK_TYPE(int_least32_t,,,[#include <$ac_cv_header_stdint>])
+AC_CHECK_TYPE(int_fast32_t,,,[#include<$ac_cv_header_stdint>])
+AC_CHECK_TYPE(intmax_t,,,[#include <$ac_cv_header_stdint>])
+
+fi # shortcircut to system "stdint.h"
+# ------------------ PREPARE VARIABLES ------------------------------
+if test "$GCC" = "yes" ; then
+ac_cv_stdint_message="using gnu compiler "`$CC --version | head -1`
+else
+ac_cv_stdint_message="using $CC"
+fi
+
+AC_MSG_RESULT([make use of $ac_cv_header_stdint in $ac_stdint_h dnl
+$ac_cv_stdint_result])
+
+dnl -----------------------------------------------------------------
+# ----------------- DONE inttypes.h checks START header -------------
+AC_CONFIG_COMMANDS([$ac_stdint_h],[
+AC_MSG_NOTICE(creating $ac_stdint_h : $_ac_stdint_h)
+ac_stdint=$tmp/_stdint.h
+
+echo "#ifndef" $_ac_stdint_h >$ac_stdint
+echo "#define" $_ac_stdint_h "1" >>$ac_stdint
+echo "#ifndef" _GENERATED_STDINT_H >>$ac_stdint
+echo "#define" _GENERATED_STDINT_H '"'$PACKAGE $VERSION'"' >>$ac_stdint
+echo "/* generated $ac_cv_stdint_message */" >>$ac_stdint
+if test "_$ac_cv_header_stdint_t" != "_" ; then
+echo "#define _STDINT_HAVE_STDINT_H" "1" >>$ac_stdint
+echo "#include <stdint.h>" >>$ac_stdint
+echo "#endif" >>$ac_stdint
+echo "#endif" >>$ac_stdint
+else
+
+cat >>$ac_stdint <<STDINT_EOF
+
+/* ................... shortcircuit part ........................... */
+
+#if defined HAVE_STDINT_H || defined _STDINT_HAVE_STDINT_H
+#include <stdint.h>
+#else
+#include <stddef.h>
+
+/* .................... configured part ............................ */
+
+STDINT_EOF
+
+echo "/* whether we have a C99 compatible stdint header file */" >>$ac_stdint
+if test "_$ac_cv_header_stdint_x" != "_" ; then
+ ac_header="$ac_cv_header_stdint_x"
+ echo "#define _STDINT_HEADER_INTPTR" '"'"$ac_header"'"' >>$ac_stdint
+else
+ echo "/* #undef _STDINT_HEADER_INTPTR */" >>$ac_stdint
+fi
+
+echo "/* whether we have a C96 compatible inttypes header file */" >>$ac_stdint
+if test "_$ac_cv_header_stdint_o" != "_" ; then
+ ac_header="$ac_cv_header_stdint_o"
+ echo "#define _STDINT_HEADER_UINT32" '"'"$ac_header"'"' >>$ac_stdint
+else
+ echo "/* #undef _STDINT_HEADER_UINT32 */" >>$ac_stdint
+fi
+
+echo "/* whether we have a BSD compatible inet types header */" >>$ac_stdint
+if test "_$ac_cv_header_stdint_u" != "_" ; then
+ ac_header="$ac_cv_header_stdint_u"
+ echo "#define _STDINT_HEADER_U_INT32" '"'"$ac_header"'"' >>$ac_stdint
+else
+ echo "/* #undef _STDINT_HEADER_U_INT32 */" >>$ac_stdint
+fi
+
+echo "" >>$ac_stdint
+
+if test "_$ac_header" != "_" ; then if test "$ac_header" != "stddef.h" ; then
+ echo "#include <$ac_header>" >>$ac_stdint
+ echo "" >>$ac_stdint
+fi fi
+
+echo "/* which 64bit typedef has been found */" >>$ac_stdint
+if test "$ac_cv_type_uint64_t" = "yes" ; then
+echo "#define _STDINT_HAVE_UINT64_T" "1" >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_UINT64_T */" >>$ac_stdint
+fi
+if test "$ac_cv_type_u_int64_t" = "yes" ; then
+echo "#define _STDINT_HAVE_U_INT64_T" "1" >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_U_INT64_T */" >>$ac_stdint
+fi
+echo "" >>$ac_stdint
+
+echo "/* which type model has been detected */" >>$ac_stdint
+if test "_$ac_cv_char_data_model" != "_" ; then
+echo "#define _STDINT_CHAR_MODEL" "$ac_cv_char_data_model" >>$ac_stdint
+echo "#define _STDINT_LONG_MODEL" "$ac_cv_long_data_model" >>$ac_stdint
+else
+echo "/* #undef _STDINT_CHAR_MODEL // skipped */" >>$ac_stdint
+echo "/* #undef _STDINT_LONG_MODEL // skipped */" >>$ac_stdint
+fi
+echo "" >>$ac_stdint
+
+echo "/* whether int_least types were detected */" >>$ac_stdint
+if test "$ac_cv_type_int_least32_t" = "yes"; then
+echo "#define _STDINT_HAVE_INT_LEAST32_T" "1" >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_INT_LEAST32_T */" >>$ac_stdint
+fi
+echo "/* whether int_fast types were detected */" >>$ac_stdint
+if test "$ac_cv_type_int_fast32_t" = "yes"; then
+echo "#define _STDINT_HAVE_INT_FAST32_T" "1" >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_INT_FAST32_T */" >>$ac_stdint
+fi
+echo "/* whether intmax_t type was detected */" >>$ac_stdint
+if test "$ac_cv_type_intmax_t" = "yes"; then
+echo "#define _STDINT_HAVE_INTMAX_T" "1" >>$ac_stdint
+else
+echo "/* #undef _STDINT_HAVE_INTMAX_T */" >>$ac_stdint
+fi
+echo "" >>$ac_stdint
+
+ cat >>$ac_stdint <<STDINT_EOF
+/* .................... detections part ............................ */
+
+/* whether we need to define bitspecific types from compiler base types */
+#ifndef _STDINT_HEADER_INTPTR
+#ifndef _STDINT_HEADER_UINT32
+#ifndef _STDINT_HEADER_U_INT32
+#define _STDINT_NEED_INT_MODEL_T
+#else
+#define _STDINT_HAVE_U_INT_TYPES
+#endif
+#endif
+#endif
+
+#ifdef _STDINT_HAVE_U_INT_TYPES
+#undef _STDINT_NEED_INT_MODEL_T
+#endif
+
+#ifdef _STDINT_CHAR_MODEL
+#if _STDINT_CHAR_MODEL+0 == 122 || _STDINT_CHAR_MODEL+0 == 124
+#ifndef _STDINT_BYTE_MODEL
+#define _STDINT_BYTE_MODEL 12
+#endif
+#endif
+#endif
+
+#ifndef _STDINT_HAVE_INT_LEAST32_T
+#define _STDINT_NEED_INT_LEAST_T
+#endif
+
+#ifndef _STDINT_HAVE_INT_FAST32_T
+#define _STDINT_NEED_INT_FAST_T
+#endif
+
+#ifndef _STDINT_HEADER_INTPTR
+#define _STDINT_NEED_INTPTR_T
+#ifndef _STDINT_HAVE_INTMAX_T
+#define _STDINT_NEED_INTMAX_T
+#endif
+#endif
+
+
+/* .................... definition part ............................ */
+
+/* some system headers have good uint64_t */
+#ifndef _HAVE_UINT64_T
+#if defined _STDINT_HAVE_UINT64_T || defined HAVE_UINT64_T
+#define _HAVE_UINT64_T
+#elif defined _STDINT_HAVE_U_INT64_T || defined HAVE_U_INT64_T
+#define _HAVE_UINT64_T
+typedef u_int64_t uint64_t;
+#endif
+#endif
+
+#ifndef _HAVE_UINT64_T
+/* .. here are some common heuristics using compiler runtime specifics */
+#if defined __STDC_VERSION__ && defined __STDC_VERSION__ >= 199901L
+#define _HAVE_UINT64_T
+#define _HAVE_LONGLONG_UINT64_T
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+
+#elif !defined __STRICT_ANSI__
+#if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
+#define _HAVE_UINT64_T
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+
+#elif defined __GNUC__ || defined __MWERKS__ || defined __ELF__
+/* note: all ELF-systems seem to have loff-support which needs 64-bit */
+#if !defined _NO_LONGLONG
+#define _HAVE_UINT64_T
+#define _HAVE_LONGLONG_UINT64_T
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+#endif
+
+#elif defined __alpha || (defined __mips && defined _ABIN32)
+#if !defined _NO_LONGLONG
+typedef long int64_t;
+typedef unsigned long uint64_t;
+#endif
+ /* compiler/cpu type to define int64_t */
+#endif
+#endif
+#endif
+
+#if defined _STDINT_HAVE_U_INT_TYPES
+/* int8_t int16_t int32_t defined by inet code, redeclare the u_intXX types */
+typedef u_int8_t uint8_t;
+typedef u_int16_t uint16_t;
+typedef u_int32_t uint32_t;
+
+/* glibc compatibility */
+#ifndef __int8_t_defined
+#define __int8_t_defined
+#endif
+#endif
+
+#ifdef _STDINT_NEED_INT_MODEL_T
+/* we must guess all the basic types. Apart from byte-adressable system, */
+/* there a few 32-bit-only dsp-systems that we guard with BYTE_MODEL 8-} */
+/* (btw, those nibble-addressable systems are way off, or so we assume) */
+
+dnl /* have a look at "64bit and data size neutrality" at */
+dnl /* http://unix.org/version2/whatsnew/login_64bit.html */
+dnl /* (the shorthand "ILP" types always have a "P" part) */
+
+#if defined _STDINT_BYTE_MODEL
+#if _STDINT_LONG_MODEL+0 == 242
+/* 2:4:2 = IP16 = a normal 16-bit system */
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned long uint32_t;
+#ifndef __int8_t_defined
+#define __int8_t_defined
+typedef char int8_t;
+typedef short int16_t;
+typedef long int32_t;
+#endif
+#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL == 444
+/* 2:4:4 = LP32 = a 32-bit system derived from a 16-bit */
+/* 4:4:4 = ILP32 = a normal 32-bit system */
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+#ifndef __int8_t_defined
+#define __int8_t_defined
+typedef char int8_t;
+typedef short int16_t;
+typedef int int32_t;
+#endif
+#elif _STDINT_LONG_MODEL+0 == 484 || _STDINT_LONG_MODEL+0 == 488
+/* 4:8:4 = IP32 = a 32-bit system prepared for 64-bit */
+/* 4:8:8 = LP64 = a normal 64-bit system */
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+#ifndef __int8_t_defined
+#define __int8_t_defined
+typedef char int8_t;
+typedef short int16_t;
+typedef int int32_t;
+#endif
+/* this system has a "long" of 64bit */
+#ifndef _HAVE_UINT64_T
+#define _HAVE_UINT64_T
+typedef unsigned long uint64_t;
+typedef long int64_t;
+#endif
+#elif _STDINT_LONG_MODEL+0 == 448
+/* LLP64 a 64-bit system derived from a 32-bit system */
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+#ifndef __int8_t_defined
+#define __int8_t_defined
+typedef char int8_t;
+typedef short int16_t;
+typedef int int32_t;
+#endif
+/* assuming the system has a "long long" */
+#ifndef _HAVE_UINT64_T
+#define _HAVE_UINT64_T
+#define _HAVE_LONGLONG_UINT64_T
+typedef unsigned long long uint64_t;
+typedef long long int64_t;
+#endif
+#else
+#define _STDINT_NO_INT32_T
+#endif
+#else
+#define _STDINT_NO_INT8_T
+#define _STDINT_NO_INT32_T
+#endif
+#endif
+
+/*
+ * quote from SunOS-5.8 sys/inttypes.h:
+ * Use at your own risk. As of February 1996, the committee is squarely
+ * behind the fixed sized types; the "least" and "fast" types are still being
+ * discussed. The probability that the "fast" types may be removed before
+ * the standard is finalized is high enough that they are not currently
+ * implemented.
+ */
+
+#if defined _STDINT_NEED_INT_LEAST_T
+typedef int8_t int_least8_t;
+typedef int16_t int_least16_t;
+typedef int32_t int_least32_t;
+#ifdef _HAVE_UINT64_T
+typedef int64_t int_least64_t;
+#endif
+
+typedef uint8_t uint_least8_t;
+typedef uint16_t uint_least16_t;
+typedef uint32_t uint_least32_t;
+#ifdef _HAVE_UINT64_T
+typedef uint64_t uint_least64_t;
+#endif
+ /* least types */
+#endif
+
+#if defined _STDINT_NEED_INT_FAST_T
+typedef int8_t int_fast8_t;
+typedef int int_fast16_t;
+typedef int32_t int_fast32_t;
+#ifdef _HAVE_UINT64_T
+typedef int64_t int_fast64_t;
+#endif
+
+typedef uint8_t uint_fast8_t;
+typedef unsigned uint_fast16_t;
+typedef uint32_t uint_fast32_t;
+#ifdef _HAVE_UINT64_T
+typedef uint64_t uint_fast64_t;
+#endif
+ /* fast types */
+#endif
+
+#ifdef _STDINT_NEED_INTMAX_T
+#ifdef _HAVE_UINT64_T
+typedef int64_t intmax_t;
+typedef uint64_t uintmax_t;
+#else
+typedef long intmax_t;
+typedef unsigned long uintmax_t;
+#endif
+#endif
+
+#ifdef _STDINT_NEED_INTPTR_T
+#ifndef __intptr_t_defined
+#define __intptr_t_defined
+/* we encourage using "long" to store pointer values, never use "int" ! */
+#if _STDINT_LONG_MODEL+0 == 242 || _STDINT_LONG_MODEL+0 == 484
+typedef unsinged int uintptr_t;
+typedef int intptr_t;
+#elif _STDINT_LONG_MODEL+0 == 244 || _STDINT_LONG_MODEL+0 == 444
+typedef unsigned long uintptr_t;
+typedef long intptr_t;
+#elif _STDINT_LONG_MODEL+0 == 448 && defined _HAVE_UINT64_T
+typedef uint64_t uintptr_t;
+typedef int64_t intptr_t;
+#else /* matches typical system types ILP32 and LP64 - but not IP16 or LLP64 */
+typedef unsigned long uintptr_t;
+typedef long intptr_t;
+#endif
+#endif
+#endif
+
+/* The ISO C99 standard specifies that in C++ implementations these
+ should only be defined if explicitly requested. */
+#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
+#ifndef UINT32_C
+
+/* Signed. */
+# define INT8_C(c) c
+# define INT16_C(c) c
+# define INT32_C(c) c
+# ifdef _HAVE_LONGLONG_UINT64_T
+# define INT64_C(c) c ## L
+# else
+# define INT64_C(c) c ## LL
+# endif
+
+/* Unsigned. */
+# define UINT8_C(c) c ## U
+# define UINT16_C(c) c ## U
+# define UINT32_C(c) c ## U
+# ifdef _HAVE_LONGLONG_UINT64_T
+# define UINT64_C(c) c ## UL
+# else
+# define UINT64_C(c) c ## ULL
+# endif
+
+/* Maximal type. */
+# ifdef _HAVE_LONGLONG_UINT64_T
+# define INTMAX_C(c) c ## L
+# define UINTMAX_C(c) c ## UL
+# else
+# define INTMAX_C(c) c ## LL
+# define UINTMAX_C(c) c ## ULL
+# endif
+
+ /* literalnumbers */
+#endif
+#endif
+
+/* These limits are merily those of a two complement byte-oriented system */
+
+/* Minimum of signed integral types. */
+# define INT8_MIN (-128)
+# define INT16_MIN (-32767-1)
+# define INT32_MIN (-2147483647-1)
+# define INT64_MIN (-__INT64_C(9223372036854775807)-1)
+/* Maximum of signed integral types. */
+# define INT8_MAX (127)
+# define INT16_MAX (32767)
+# define INT32_MAX (2147483647)
+# define INT64_MAX (__INT64_C(9223372036854775807))
+
+/* Maximum of unsigned integral types. */
+# define UINT8_MAX (255)
+# define UINT16_MAX (65535)
+# define UINT32_MAX (4294967295U)
+# define UINT64_MAX (__UINT64_C(18446744073709551615))
+
+/* Minimum of signed integral types having a minimum size. */
+# define INT_LEAST8_MIN INT8_MIN
+# define INT_LEAST16_MIN INT16_MIN
+# define INT_LEAST32_MIN INT32_MIN
+# define INT_LEAST64_MIN INT64_MIN
+/* Maximum of signed integral types having a minimum size. */
+# define INT_LEAST8_MAX INT8_MAX
+# define INT_LEAST16_MAX INT16_MAX
+# define INT_LEAST32_MAX INT32_MAX
+# define INT_LEAST64_MAX INT64_MAX
+
+/* Maximum of unsigned integral types having a minimum size. */
+# define UINT_LEAST8_MAX UINT8_MAX
+# define UINT_LEAST16_MAX UINT16_MAX
+# define UINT_LEAST32_MAX UINT32_MAX
+# define UINT_LEAST64_MAX UINT64_MAX
+
+ /* shortcircuit*/
+#endif
+ /* once */
+#endif
+#endif
+STDINT_EOF
+fi
+ if cmp -s $ac_stdint_h $ac_stdint 2>/dev/null; then
+ AC_MSG_NOTICE([$ac_stdint_h is unchanged])
+ else
+ ac_dir=`AS_DIRNAME(["$ac_stdint_h"])`
+ AS_MKDIR_P(["$ac_dir"])
+ rm -f $ac_stdint_h
+ mv $ac_stdint $ac_stdint_h
+ fi
+],[# variables for create stdint.h replacement
+PACKAGE="$PACKAGE"
+VERSION="$VERSION"
+ac_stdint_h="$ac_stdint_h"
+_ac_stdint_h=AS_TR_CPP(_$PACKAGE-$ac_stdint_h)
+ac_cv_stdint_message="$ac_cv_stdint_message"
+ac_cv_header_stdint_t="$ac_cv_header_stdint_t"
+ac_cv_header_stdint_x="$ac_cv_header_stdint_x"
+ac_cv_header_stdint_o="$ac_cv_header_stdint_o"
+ac_cv_header_stdint_u="$ac_cv_header_stdint_u"
+ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
+ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
+ac_cv_char_data_model="$ac_cv_char_data_model"
+ac_cv_long_data_model="$ac_cv_long_data_model"
+ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
+ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
+ac_cv_type_intmax_t="$ac_cv_type_intmax_t"
+])
+])
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-10-09 01:42:59
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-10-09 01:42:51 UTC
Modified files:
ChangeLog Makefile.am configure.ac event_int.h sa_ipaddrbuf_set.c
sa_ipaddrport_set.c sa_localaddr_set.c sa_type_set.c sock.h
Added files:
sockaddr_atop.c sockaddr_export.c sockaddr_import.c
Log message:
add most of the socket address manipulation functions; add address test
macros
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.57 event/ChangeLog:1.58
--- event/ChangeLog:1.57 Fri Oct 7 20:48:21 2005
+++ event/ChangeLog Sat Oct 8 18:42:41 2005
@@ -1,3 +1,45 @@
+2005-10-08 Kevin L. Mitchell <kl...@mi...>
+
+ * m4/ax_create_stdint_h.m4: autoconf macro to support creation of
+ _stdint.h portably
+
+ * sockaddr_import.c: function to import ev_sockaddr_t from struct
+ sockaddr
+
+ * sockaddr_export.c: function to export ev_sockaddr_t to struct
+ sockaddr
+
+ * sockaddr_atop.c: function + helpers to format an address into
+ presentation format
+
+ * sock.h: add a number of ev_sockaddr_t test macros; use ENOSPC in
+ preference to EFBIG in sa_localaddr_set(); update \todo on
+ sockaddr_atop(); drop SOCKADDR_ATOP_NOADDR flag; update \todo on
+ sockaddr_import(); remove unused len parameter to
+ sockaddr_import(); update \todo on sockaddr_export(); use ENOSPC
+ in preference to EFBIG; document ENOSYS error return to
+ sockaddr_export() to indicate that address type is not natively
+ supported
+
+ * sa_type_set.c (sa_type_set): add omitted ev_init() call
+
+ * sa_localaddr_set.c (sa_localaddr_set): add omitted ev_init()
+ call; use ENOSPC in preference to EFBIG
+
+ * sa_ipaddrport_set.c (sa_ipaddrport_set): add omitted ev_init()
+ call
+
+ * sa_ipaddrbuf_set.c (sa_ipaddrbuf_set): add omitted ev_init()
+ call
+
+ * event_int.h: include generated _stdint.h
+
+ * configure.ac: call macro to create a _stdint.h; add checks for
+ struct sockaddr_in6 and the sa_len member of struct sockaddr
+
+ * Makefile.am (libevent_la_SOURCES): add new sockaddr_import.c,
+ sockaddr_export.c, and sockaddr_atop.c source files
+
2005-10-07 Kevin L. Mitchell <kl...@mi...>
* sock.h: add \todo items so I don't forget what I still need to
Index: event/Makefile.am
diff -u event/Makefile.am:1.18 event/Makefile.am:1.19
--- event/Makefile.am:1.18 Fri Oct 7 20:48:21 2005
+++ event/Makefile.am Sat Oct 8 18:42:41 2005
@@ -16,7 +16,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
-## @(#)$Id: Makefile.am,v 1.18 2005/10/08 03:48:21 klmitch Exp $
+## @(#)$Id: Makefile.am,v 1.19 2005/10/09 01:42:41 klmitch Exp $
##
## Process this file with automake to generate Makefile.in
@@ -46,7 +46,9 @@
timer_create.c timer_resched.c timer_destroy.c \
signal_create.c signal_destroy.c \
sa_type_set.c sa_ipaddrbuf_set.c sa_ipaddrport_set.c \
- sa_localaddr_set.c
+ sa_localaddr_set.c \
+ sockaddr_import.c sockaddr_export.c \
+ sockaddr_atop.c
libevent_la_LIBADD = @EVENT_ET_OBJS@ @TREECONF_LIBS@ @LIBLTDL@
libevent_la_DEPENDENCIES = @EVENT_ET_OBJS@
libevent_la_LDFLAGS = -version-info 0:0:0
Index: event/configure.ac
diff -u event/configure.ac:1.3 event/configure.ac:1.4
--- event/configure.ac:1.3 Thu Jun 9 19:45:19 2005
+++ event/configure.ac Sat Oct 8 18:42:41 2005
@@ -14,7 +14,7 @@
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
dnl
-dnl @(#)$Id: configure.ac,v 1.3 2005/06/10 02:45:19 klmitch Exp $
+dnl @(#)$Id: configure.ac,v 1.4 2005/10/09 01:42:41 klmitch Exp $
dnl
dnl Process this file with autoconf to produce a configure script.
@@ -37,7 +37,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA])
-AC_REVISION($Revision: 1.3 $)
+AC_REVISION($Revision: 1.4 $)
AC_CONFIG_SRCDIR([event_int.h])
AC_CONFIG_MACRO_DIR([m4])
@@ -62,8 +62,19 @@
dnl Checks for libraries.
dnl Checks for header files.
+AX_CREATE_STDINT_H
dnl Checks for typedefs, structures, and compiler characteristics.
+AC_CHECK_TYPE([struct sockaddr_in6],
+[AC_DEFINE([HAVE_SOCKADDR_IN6], [1],
+ [Define to 1 if you have struct sockaddr_in6])],,
+[#include <sys/types.h>
+#include <netinet/in.h>])
+
+AC_CHECK_MEMBER([struct sockaddr.sa_len],
+[AC_DEFINE([HAVE_SOCKADDR_SA_LEN], [1],
+ [Define to 1 if struct sockaddr contains sa_len])],,
+[#include <sys/socket.h>])
dnl Checks for library functions.
Index: event/event_int.h
diff -u event/event_int.h:1.31 event/event_int.h:1.32
--- event/event_int.h:1.31 Sat Sep 17 17:14:11 2005
+++ event/event_int.h Sat Oct 8 18:42:41 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_int.h,v 1.31 2005/09/18 00:14:11 klmitch Exp $
+** @(#)$Id: event_int.h,v 1.32 2005/10/09 01:42:41 klmitch Exp $
*/
#ifndef __include_event_int_h__
#define __include_event_int_h__
@@ -39,6 +39,7 @@
#include "config.h"
+#include "_stdint.h"
#include "event_err.h"
#include "event_version.h"
#include "gcc-attrs.h"
Index: event/sa_ipaddrbuf_set.c
diff -u event/sa_ipaddrbuf_set.c:1.6 event/sa_ipaddrbuf_set.c:1.7
--- event/sa_ipaddrbuf_set.c:1.6 Fri Oct 7 20:48:21 2005
+++ event/sa_ipaddrbuf_set.c Sat Oct 8 18:42:41 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sa_ipaddrbuf_set.c,v 1.6 2005/10/08 03:48:21 klmitch Exp $
+** @(#)$Id: sa_ipaddrbuf_set.c,v 1.7 2005/10/09 01:42:41 klmitch Exp $
*/
/** \internal
* \file
@@ -28,11 +28,13 @@
#include <string.h>
-RCSTAG("@(#)$Id: sa_ipaddrbuf_set.c,v 1.6 2005/10/08 03:48:21 klmitch Exp $");
+RCSTAG("@(#)$Id: sa_ipaddrbuf_set.c,v 1.7 2005/10/09 01:42:41 klmitch Exp $");
ev_err_t
sa_ipaddrbuf_set(ev_sockaddr_t *sa, const unsigned char *address)
{
+ ev_init(); /* make sure library is initialized... */
+
/* Double-check the input values... */
if (!sa || (sa->sa_type != AT_IPv6 && sa->sa_type != AT_IPv4) || !address)
ev_return(EINVAL);
Index: event/sa_ipaddrport_set.c
diff -u event/sa_ipaddrport_set.c:1.1 event/sa_ipaddrport_set.c:1.2
--- event/sa_ipaddrport_set.c:1.1 Fri Oct 7 20:48:21 2005
+++ event/sa_ipaddrport_set.c Sat Oct 8 18:42:41 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sa_ipaddrport_set.c,v 1.1 2005/10/08 03:48:21 klmitch Exp $
+** @(#)$Id: sa_ipaddrport_set.c,v 1.2 2005/10/09 01:42:41 klmitch Exp $
*/
/** \internal
* \file
@@ -26,11 +26,13 @@
*/
#include "event_int.h"
-RCSTAG("@(#)$Id: sa_ipaddrport_set.c,v 1.1 2005/10/08 03:48:21 klmitch Exp $");
+RCSTAG("@(#)$Id: sa_ipaddrport_set.c,v 1.2 2005/10/09 01:42:41 klmitch Exp $");
ev_err_t
sa_ipaddrport_set(ev_sockaddr_t *sa, unsigned short port)
{
+ ev_init(); /* make sure library is initialized... */
+
/* Double-check the input values... */
if (!sa || (sa->sa_type != AT_IPv6 && sa->sa_type != AT_IPv4))
ev_return(EINVAL);
Index: event/sa_localaddr_set.c
diff -u event/sa_localaddr_set.c:1.1 event/sa_localaddr_set.c:1.2
--- event/sa_localaddr_set.c:1.1 Fri Oct 7 20:48:21 2005
+++ event/sa_localaddr_set.c Sat Oct 8 18:42:41 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sa_localaddr_set.c,v 1.1 2005/10/08 03:48:21 klmitch Exp $
+** @(#)$Id: sa_localaddr_set.c,v 1.2 2005/10/09 01:42:41 klmitch Exp $
*/
/** \internal
* \file
@@ -28,18 +28,20 @@
#include <string.h>
-RCSTAG("@(#)$Id: sa_localaddr_set.c,v 1.1 2005/10/08 03:48:21 klmitch Exp $");
+RCSTAG("@(#)$Id: sa_localaddr_set.c,v 1.2 2005/10/09 01:42:41 klmitch Exp $");
ev_err_t
sa_localaddr_set(ev_sockaddr_t *sa, const char *address)
{
+ ev_init(); /* make sure library is initialized... */
+
/* Double-check the input values... */
if (!sa || sa->sa_type != AT_LOCAL || !address)
ev_return(EINVAL);
/* Double-check the address length... */
if (strlen(address) >= SOCK_LOCALADDR_LEN)
- ev_return(EFBIG);
+ ev_return(ENOSPC);
/* Set the local address... */
strcpy(sa->sa_addr.saa_localaddr, address);
Index: event/sa_type_set.c
diff -u event/sa_type_set.c:1.1 event/sa_type_set.c:1.2
--- event/sa_type_set.c:1.1 Fri Oct 7 20:48:21 2005
+++ event/sa_type_set.c Sat Oct 8 18:42:41 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sa_type_set.c,v 1.1 2005/10/08 03:48:21 klmitch Exp $
+** @(#)$Id: sa_type_set.c,v 1.2 2005/10/09 01:42:41 klmitch Exp $
*/
/** \internal
* \file
@@ -26,11 +26,13 @@
*/
#include "event_int.h"
-RCSTAG("@(#)$Id: sa_type_set.c,v 1.1 2005/10/08 03:48:21 klmitch Exp $");
+RCSTAG("@(#)$Id: sa_type_set.c,v 1.2 2005/10/09 01:42:41 klmitch Exp $");
ev_err_t
sa_type_set(ev_sockaddr_t *sa, ev_satype_t type)
{
+ ev_init(); /* make sure library is initialized... */
+
/* Double-check the input values... */
if (!sa || (type != AT_IPv6 && type != AT_IPv4 && type != AT_LOCAL &&
type != AT_NONE))
Index: event/sock.h
diff -u event/sock.h:1.10 event/sock.h:1.11
--- event/sock.h:1.10 Fri Oct 7 20:48:21 2005
+++ event/sock.h Sat Oct 8 18:42:41 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sock.h,v 1.10 2005/10/08 03:48:21 klmitch Exp $
+** @(#)$Id: sock.h,v 1.11 2005/10/09 01:42:41 klmitch Exp $
*/
#ifndef __include_event_sock_h__
#define __include_event_sock_h__
@@ -207,6 +207,492 @@
#define sa_localaddr(sa) ((sa)->sa_addr.saa_localaddr)
/** \internal
+ * \brief Extract a single byte from the IP address buffer.
+ *
+ * This macro simply extracts a single 8-bit integer from the IP
+ * address of \p sa at the specified \p idx (in bytes).
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ * \param idx The index of the byte to extract.
+ *
+ * \return The 8 bits of the address beginning at \p idx.
+ */
+#define _sa_ipbuf8(sa, idx) ((sa)->sa_addr.saa_ipaddr.saai_addrbuf[(idx)])
+
+/** \internal
+ * \brief Extract a certain portion of the IP address buffer as a
+ * 16-bit integer.
+ *
+ * This macro simply extracts a 16-bit integer (in host byte order)
+ * from the IP address of \p sa, beginning with the specified \p idx
+ * (in bytes).
+ *
+ * \warning This macro evaluates its arguments multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ * \param idx The starting index, in bytes from which to extract the
+ * integer.
+ *
+ * \return The 16 bits of the address beginning at \p idx.
+ */
+#define _sa_ipbuf16(sa, idx) ((_sa_ipbuf8((sa), (idx) ) << 8) | \
+ (_sa_ipbuf8((sa), (idx) + 1) ))
+
+/** \internal
+ * \brief Extract a certain portion of the IP address buffer as a
+ * 32-bit integer.
+ *
+ * This macro simply extracts a 32-bit integer (in host byte order)
+ * from the IP address of \p sa, beginning with the specified \p idx
+ * (in bytes).
+ *
+ * \warning This macro evaluates its arguments multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ * \param idx The starting index, in bytes from which to extract the
+ * integer.
+ *
+ * \return The 32 bits of the address beginning at \p idx.
+ */
+#define _sa_ipbuf32(sa, idx) ((_sa_ipbuf8((sa), (idx) ) << 24) | \
+ (_sa_ipbuf8((sa), (idx) + 1) << 16) | \
+ (_sa_ipbuf8((sa), (idx) + 2) << 8) | \
+ (_sa_ipbuf8((sa), (idx) + 3) ))
+
+/** \internal
+ * \brief Extract a certain portion of the IP address buffer as the
+ * specified type and AND a mask.
+ *
+ * This macro extracts the specified number of \p bits from the IP
+ * address specified by \p sa, beginning at \p idx, and applies a \p
+ * mask.
+ *
+ * \warning This macro may evaluate the \p sa and \p idx parameters
+ * multiple times.
+ *
+ * \param bits The number of bits to extract. May be 8 or 32.
+ * \param sa A pointer to an #ev_sockaddr_t.
+ * \param idx The starting index, in bytes, from which to extract
+ * the bits.
+ * \param mask The mask to apply.
+ *
+ * \return The indicated number of \p bits, with \p mask applied,
+ * starting at byte offset \p idx.
+ */
+#define _sa_ipmask(bits, sa, idx, mask) \
+ (_sa_ipbuf##bits((sa), (idx)) & (mask))
+
+/** \brief Test if an #ev_sockaddr_t is an IPv4 address.
+ *
+ * This macro tests if an #ev_sockaddr_t is an IPv4 address, returning
+ * boolean true if so.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa is an IPv4 address, false
+ * otherwise.
+ */
+#define sa_is_ipv4(sa) ((sa)->sa_type == AT_IPv4)
+
+/** \brief Test if an #ev_sockaddr_t is an IPv6 address.
+ *
+ * This macro tests if an #ev_sockaddr_t is an IPv6 address, returning
+ * boolean true if so.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa is an IPv6 address, false
+ * otherwise.
+ */
+#define sa_is_ipv6(sa) ((sa)->sa_type == AT_IPv6)
+
+/** \brief Test if an #ev_sockaddr_t is a local address.
+ *
+ * This macro tests if an #ev_sockaddr_t is a local address, returning
+ * boolean true if so.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa is a local address, false
+ * otherwise.
+ */
+#define sa_is_local(sa) ((sa)->sa_type == AT_LOCAL)
+
+/** \brief Test if an #ev_sockaddr_t contains the unspecified
+ * address.
+ *
+ * This macro tests if an #ev_sockaddr_t is the unspecified address
+ * for the given address type.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains the unspecified
+ * address, false otherwise.
+ */
+#define sa_is_unspec(sa) ((sa_is_ipv4((sa)) && \
+ _sa_ipbuf32((sa), 0) == 0) || \
+ (sa_is_ipv6((sa)) && \
+ _sa_ipbuf32((sa), 0) == 0 && \
+ _sa_ipbuf32((sa), 4) == 0 && \
+ _sa_ipbuf32((sa), 8) == 0 && \
+ _sa_ipbuf32((sa), 12) == 0) || \
+ (sa_is_local((sa)) && \
+ !((sa)->sa_addr.saa_localaddr[0])))
+
+/** \brief Test if an #ev_sockaddr_t contains the loopback address.
+ *
+ * This macro tests if an #ev_sockaddr_t is the loopback address for
+ * the given address type.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains the loopback address,
+ * false otherwise.
+ */
+#define sa_is_loopback(sa) ((sa_is_ipv4((sa)) && \
+ _sa_ipbuf32((sa), 0) == 0x7f000001) || \
+ (sa_is_ipv6((sa)) && \
+ _sa_ipbuf32((sa), 0) == 0 && \
+ _sa_ipbuf32((sa), 4) == 0 && \
+ _sa_ipbuf32((sa), 8) == 0 && \
+ _sa_ipbuf32((sa), 12) == 0x00000001))
+
+/** \brief Test if an #ev_sockaddr_t contains an IPv4-mapped IPv6
+ * address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains an IPv4-mapped IPv6
+ * address. It will evaluate to false if the address is not an IPv6
+ * address to begin with.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains an IPv4-mapped IPv6
+ * address, false otherwise.
+ */
+#define sa_is_v4mapped(sa) (sa_is_ipv6((sa)) && \
+ _sa_ipbuf32((sa), 0) == 0 && \
+ _sa_ipbuf32((sa), 4) == 0 && \
+ _sa_ipbuf32((sa), 8) == 0x0000ffff)
+
+/** \brief Test if an #ev_sockaddr_t contains an IPv4-compatible IPv6
+ * address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains an IPv4-compatible
+ * IPv6 address. It will evaluate to false if the address is not an
+ * IPv6 address to begin with.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains an IPv4-compatible IPv6
+ * address, false otherwise.
+ */
+#define sa_is_v4compat(sa) (sa_is_ipv6((sa)) && \
+ _sa_ipbuf32((sa), 0) == 0 && \
+ _sa_ipbuf32((sa), 4) == 0 && \
+ _sa_ipbuf32((sa), 8) == 0 && \
+ _sa_ipbuf32((sa), 12) > 1)
+
+/** \brief Test if an #ev_sockaddr_t contains an encapsulated IPv4
+ * address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains an encapsulated IPv4
+ * address. It will evaluate to false if the address is not an IPv6
+ * address to begin with.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains an encapsulated IPv4
+ * address, false otherwise.
+ */
+#define sa_is_v4encap(sa) (sa_is_ipv6((sa)) && \
+ _sa_ipbuf32((sa), 0) == 0 && \
+ _sa_ipbuf32((sa), 4) == 0 && \
+ (_sa_ipbuf32((sa), 8) == 0 || \
+ (_sa_ipbuf32((sa), 8) == 0x0000ffff && \
+ _sa_ipbuf32((sa), 12) > 1)))
+
+/** \internal
+ * \brief Select the IPv4 component of an address and apply a mask.
+ *
+ * This macro applies a mask to the IPv4 component of an address,
+ * whether an encapsulated IPv4 address or an actual #AT_IPv4 address.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t. This parameter \em
+ * must be an #AT_IPv4 address or an IPv4 address
+ * encapsulated in an #AT_IPv6 address.
+ * \param mask The mask to apply.
+ *
+ * \return The masked IPv4 address component.
+ */
+#define _sa_ip4mask(sa, mask) _sa_ipmask(32, (sa), \
+ sa_is_ipv4((sa)) ? 0 : 12, (mask))
+
+/** \brief Test if an #ev_sockaddr_t contains a class A IPv4 address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains a class A IPv4
+ * address. Note that IPv4 address classes are obsolete; this macro
+ * is provided for completeness.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains a class A IPv4 address,
+ * false otherwise.
+ */
+#define sa_is_classa(sa) ((sa_is_ipv4((sa)) || sa_is_v4encap((sa))) && \
+ _sa_ip4mask((sa), 0x80000000) == 0)
+
+/** \brief Test if an #ev_sockaddr_t contains a class B IPv4 address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains a class B IPv4
+ * address. Note that IPv4 address classes are obsolete; this macro
+ * is provided for completeness.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains a class B IPv4 address,
+ * false otherwise.
+ */
+#define sa_is_classb(sa) ((sa_is_ipv4((sa)) || sa_is_v4encap((sa))) && \
+ _sa_ip4mask((sa), 0xc0000000) == 0x80000000)
+
+/** \brief Test if an #ev_sockaddr_t contains a class C IPv4 address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains a class C IPv4
+ * address. Note that IPv4 address classes are obsolete; this macro
+ * is provided for completeness.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains a class C IPv4 address,
+ * false otherwise.
+ */
+#define sa_is_classc(sa) ((sa_is_ipv4((sa)) || sa_is_v4encap((sa))) && \
+ _sa_ip4mask((sa), 0xe0000000) == 0xc0000000)
+
+/** \brief Test if an #ev_sockaddr_t contains a class D IPv4 address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains a class D IPv4
+ * address. Note that IPv4 address classes are obsolete; this macro
+ * is provided for completeness.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains a class D IPv4 address,
+ * false otherwise.
+ */
+#define sa_is_classd(sa) ((sa_is_ipv4((sa)) || sa_is_v4encap((sa))) && \
+ _sa_ip4mask((sa), 0xf0000000) == 0xe0000000)
+
+/** \brief Test if an #ev_sockaddr_t contains an experimental IPv4
+ * address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains an experimental IPv4
+ * address.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains an experimental IPv4
+ * address, false otherwise.
+ */
+#define sa_is_experimental(sa) ((sa_is_ipv4((sa)) || sa_is_v4encap((sa))) && \
+ _sa_ip4mask((sa), 0xe0000000) == 0xe0000000)
+
+/** \brief Test if an #ev_sockaddr_t contains the IPv4 broadcast
+ * address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains the IPv4 broadcast
+ * address.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains the IPv4 broadcast
+ * address, false otherwise.
+ */
+#define sa_is_broadcast(sa) ((sa_is_ipv4((sa)) || sa_is_v4encap((sa))) && \
+ _sa_ipbuf32((sa), sa_is_ipv4((sa)) ? \
+ 0 : 12) == 0xffffffff)
+
+/** \brief Test if an #ev_sockaddr_t contains a multicast address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains a multicast address,
+ * for either IPv4 or IPv6.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains a multicast address,
+ * false otherwise.
+ */
+#define sa_is_multicast(sa) (sa_is_classd((sa)) || \
+ (sa_is_ipv6((sa)) && \
+ _sa_ipbuf8((sa), 0) == 0xff))
+
+/** \brief Test if an #ev_sockaddr_t contains a link-local IPv6
+ * address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains a link-local IPv6
+ * address.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains a link-local IPv6
+ * address, false otherwise.
+ */
+#define sa_is_linklocal(sa) (sa_is_ipv6((sa)) && \
+ _sa_ipmask(32, (sa), 0, 0xffc00000) == \
+ 0xfe800000)
+
+/** \brief Test if an #ev_sockaddr_t contains a site-local IPv6
+ * address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains a site-local IPv6
+ * address.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains a site-local IPv6
+ * address, false otherwise.
+ */
+#define sa_is_sitelocal(sa) (sa_is_ipv6((sa)) && \
+ _sa_ipmask(32, (sa), 0, 0xffc00000) == \
+ 0xfec00000)
+
+/** \internal
+ * \brief Test if an IPv4 multicast address is local.
+ *
+ * This macro tests if an IPv4 multicast address in a local multicast
+ * address only.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains a local IPv4 multicast
+ * address, false otherwise.
+ */
+#define _sa_ip4mc_local(sa) ((sa_is_ipv4((sa)) || sa_is_v4encap((sa))) && \
+ _sa_ip4mask((sa), 0xffffff00) == 0xe0000000)
+
+/** \brief Test if an #ev_sockaddr_t contains a node-local multicast
+ * address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains a node-local
+ * multicast address.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains a node-local multicast
+ * address, false otherwise.
+ */
+#define sa_mc_nodelocal(sa) (sa_is_multicast((sa)) && \
+ (_sa_ip4mc_local((sa)) || \
+ (sa_is_ipv6((sa)) && \
+ _sa_ipmask(8, sa, 1, 0x0f) == 0x01)))
+
+/** \brief Test if an #ev_sockaddr_t contains a link-local multicast
+ * address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains a link-local
+ * multicast address.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains a link-local multicast
+ * address, false otherwise.
+ */
+#define sa_mc_linklocal(sa) (sa_is_multicast((sa)) && \
+ (_sa_ip4mc_local((sa)) || \
+ (sa_is_ipv6((sa)) && \
+ _sa_ipmask(8, sa, 1, 0x0f) == 0x02)))
+
+/** \brief Test if an #ev_sockaddr_t contains a site-local multicast
+ * address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains a site-local
+ * multicast address.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains a site-local multicast
+ * address, false otherwise.
+ */
+#define sa_mc_sitelocal(sa) (sa_is_multicast((sa)) && \
+ sa_is_ipv6((sa)) && \
+ _sa_ipmask(8, sa, 1, 0x0f) == 0x05)
+
+/** \brief Test if an #ev_sockaddr_t contains a org-local multicast
+ * address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains a org-local
+ * multicast address.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains a org-local multicast
+ * address, false otherwise.
+ */
+#define sa_mc_orglocal(sa) (sa_is_multicast((sa)) && \
+ sa_is_ipv6((sa)) && \
+ _sa_ipmask(8, sa, 1, 0x0f) == 0x08)
+
+/** \brief Test if an #ev_sockaddr_t contains a global multicast
+ * address.
+ *
+ * This macro tests if an #ev_sockaddr_t contains a global multicast
+ * address.
+ *
+ * \warning This macro evaluates the \p sa parameter multiple times.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return Boolean true if \p sa contains a global multicast
+ * address, false otherwise.
+ */
+#define sa_mc_global(sa) (sa_is_multicast((sa)) && \
+ ((sa_is_ipv4((sa)) || sa_is_v4encap((sa))) ? \
+ (_sa_ip4mask((sa), 0xffffff00) != \
+ 0xe0000000) : \
+ (sa_is_ipv6((sa)) && \
+ _sa_ipmask(8, (sa), 1, 0x0f) == 0x0e)))
+
+/** \internal
* \brief Socket generator structure.
*
* This is the implementation of the #ev_sock_t type.
@@ -379,7 +865,7 @@
* address to set.
*
* \retval EINVAL An invalid argument was given.
- * \retval EFBIG Address is too large.
+ * \retval ENOSPC Address is too large.
*/
extern ev_err_t sa_localaddr_set(ev_sockaddr_t *sa, const char *address)
_gca_nonnull((1, 2));
@@ -411,7 +897,7 @@
* truncated so as to not overflow the buffer, and the terminating
* '\\0' will always be present.
*
- * \todo Implement; write test program.
+ * \todo Write test program.
*
* \param sa A pointer to an #ev_sockaddr_t.
* \param buf The buffer to fill in with the presentation format of
@@ -420,9 +906,8 @@
* \param flags Flags to indicate which components of the address to
* omit; pass 0 to include all components of the
* address. To omit the port, use the
- * #SOCKADDR_ATOP_NOPORT flag; to omit the address (but
- * why?), use the #SOCKADDR_ATOP_NOADDR flag. Note that
- * these flags have no meaning for #AT_LOCAL addresses.
+ * #SOCKADDR_ATOP_NOPORT flag. Note that this flag has
+ * no meaning for #AT_LOCAL addresses.
*
* \retval EINVAL An invalid argument was given.
*/
@@ -430,16 +915,6 @@
ev_flags_t flags)
_gca_nonnull((1, 2));
-/** \brief Omit address from presentation format.
- *
- * This flag is used to signal to the sockaddr_atop() function that
- * the caller does not want the address. It is provided for
- * completeness; the only result would be the port number, which is
- * already easily accessible, would be formatted into the \p buf
- * parameter of sockaddr_atop().
- */
-#define SOCKADDR_ATOP_NOADDR 0x0001
-
/** \brief Omit port from presentation format.
*
* This flag is used to signal to the sockaddr_atop() function that
@@ -453,17 +928,15 @@
* This function fills in the \p sa socket address given a pointer to
* an initialized <CODE>struct sockaddr</CODE>.
*
- * \todo Implement; write test program.
+ * \todo Write test program.
*
* \param sa A pointer to an #ev_sockaddr_t to be filled in.
* \param addr A pointer to <CODE>struct sockaddr</CODE> containing
* the address to be imported.
- * \param len The length of the \p addr.
*
* \retval EINVAL An invalid argument was given.
*/
-extern ev_err_t sockaddr_import(ev_sockaddr_t *sa, const struct sockaddr *addr,
- int len)
+extern ev_err_t sockaddr_import(ev_sockaddr_t *sa, const struct sockaddr *addr)
_gca_nonnull((1, 2));
/** \brief Export an #ev_sockaddr_t to a <CODE>struct
@@ -472,7 +945,7 @@
* This function fills in a <CODE>struct sockaddr</CODE> from the \p
* sa socket address.
*
- * \todo Implement; write test program.
+ * \todo Write test program.
*
* \param sa A pointer to an #ev_sockaddr_t to be exported.
* \param addr A pointer to <CODE>struct sockaddr</CODE> to be filled
@@ -483,8 +956,10 @@
* the buffer.
*
* \retval EINVAL An invalid argument was given.
- * \retval EFBIG The address would be too large to fit
+ * \retval ENOSPC The address would be too large to fit
* in the user buffer.
+ * \retval ENOSYS Address type is not natively
+ * supported.
*/
extern ev_err_t sockaddr_export(ev_sockaddr_t *sa, struct sockaddr *addr,
int *len)
Index: event/sockaddr_atop.c
diff -u /dev/null event/sockaddr_atop.c:1.1
--- /dev/null Sat Oct 8 18:42:52 2005
+++ event/sockaddr_atop.c Sat Oct 8 18:42:41 2005
@@ -0,0 +1,180 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: sockaddr_atop.c,v 1.1 2005/10/09 01:42:41 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Implementation of sockaddr_pton().
+ *
+ * This file contains the implementation of the sockaddr_pton()
+ * function.
+ */
+#include "event_int.h"
+
+#include <stdio.h>
+#include <string.h>
+
+/** \brief Build presentation format for an IPv4 address.
+ *
+ * This helper function formats an IPv4 address in its presentation
+ * format, optionally including the port number.
+ *
+ * \param sa A pointer to the #ev_sockaddr_t being formatted.
+ * \param addr A pointer to the binary representation of the
+ * address.
+ * \param buf A pointer to the buffer to receive the presentation
+ * format.
+ * \param flags Flags to indicate which components of the address to
+ * omit; pass 0 to include all components of the
+ * address. To omit the port, use the
+ * #SOCKADDR_ATOP_NOPORT flag.
+ *
+ * \return This function always returns 0.
+ */
+static ev_err_t
+atop_v4(ev_sockaddr_t *sa, unsigned char *addr, char *buf, ev_flags_t flags)
+{
+ ev_trace(); /* trace entry to function */
+
+ buf += sprintf(buf, "%u.%u.%u.%u", addr[0], addr[1], addr[2], addr[3]);
+
+ if (!(flags & SOCKADDR_ATOP_NOPORT)) /* format the port... */
+ sprintf(buf, ".%u", sa_ipaddrport(sa));
+
+ ev_return(0); /* trace exit from function */
+}
+
+/** \brief Build presentation format for an IPv6 address.
+ *
+ * This helper function formats an IPv6 address in its presentation
+ * format, optionally including the port number.
+ *
+ * \param sa A pointer to the #ev_sockaddr_t being formatted.
+ * \param addr A pointer to the binary representation of the
+ * address.
+ * \param buf A pointer to the buffer to receive the presentation
+ * format.
+ * \param flags Flags to indicate which components of the address to
+ * omit; pass 0 to include all components of the
+ * address. To omit the port, use the
+ * #SOCKADDR_ATOP_NOPORT flag.
+ *
+ * \return This function always returns 0.
+ */
+static ev_err_t
+atop_v6(ev_sockaddr_t *sa, unsigned char *addr, char *buf, ev_flags_t flags)
+{
+ uint16_t cooked[SOCK_ADDRBUFV6_LEN >> 1];
+ struct {
+ int start;
+ int len;
+ } best = { -1, -1 }, cur = { -1, -1 };
+ int i;
+
+ ev_trace(); /* trace entry to function */
+
+ for (i = 0; i < (SOCK_ADDRBUFV6_LEN >> 1); i++) {
+ /* Assemble 2 bytes into a single uint16_t */
+ cooked[i] = (addr[i << 1] << 8) | addr[(i << 1) + 1];
+
+ /* Now test if it's zero... */
+ if (!cooked[i]) {
+ /* Is it the start of a run? */
+ if (cur.start < 0) {
+ cur.start = i; /* remember the beginning point */
+ cur.len = 1; /* and the length so far */
+ } else
+ cur.len++; /* increment the length */
+ } else {
+ if (cur.start >= 0 && (best.start < 0 || best.len < cur.len))
+ best = cur; /* Found a better (read: longer) run */
+ cur.start = -1; /* reset current run */
+ }
+ }
+
+ /* Did we end on a run of 0s? */
+ if (cur.start >= 0 && (best.start < 0 || best.len < cur.len))
+ best = cur; /* Found a better 0 run */
+
+ if (best.start >= 0 && best.len < 2) /* need at least 2 consecutive 0s */
+ best.start = -1;
+
+ /* OK, now do the formatting */
+ for (i = 0; i < (SOCK_ADDRBUFV6_LEN >> 1); ) {
+ if (i >= best.start && i < (best.start + best.len)) { /* in best run? */
+ *buf++ = ':'; /* Add colon... */
+
+ i = best.start + best.len; /* jump to next non-zero entry */
+ continue;
+ }
+
+ if (i)
+ *buf++ = ':'; /* Add colon... */
+
+ /* Is this an encapsulated v4 address? */
+ if (i == 6 && best.start == 0 &&
+ (best.len == 6 || (best.len == 5 && cooked[5] == 0xffff)))
+ ev_return(atop_v4(sa, addr + (SOCK_ADDRBUFV6_LEN - SOCK_ADDRBUFV4_LEN),
+ buf, flags));
+
+ /* OK, now fill in the address component */
+ buf += sprintf(buf, "%x", cooked[i]);
+ }
+
+ if (!(flags & SOCKADDR_ATOP_NOPORT)) /* format the port... */
+ sprintf(buf, ".%u", sa_ipaddrport(sa));
+
+ ev_return(0); /* trace exit from function */
+}
+
+ev_err_t
+sockaddr_atop(ev_sockaddr_t *sa, char *buf, int size, ev_flags_t flags)
+{
+ char *src = 0;
+ char addrbuf[SOCK_ADDRSTRV6_LEN + 6]; /* v6 address + ".65535" */
+
+ ev_init(); /* make sure library is initialized... */
+
+ /* sanity-check arguments */
+ if (!sa || !buf || !size)
+ ev_return(EINVAL);
+
+ switch (sa->sa_type) {
+ case AT_IPv6:
+ src = addrbuf;
+ atop_v6(sa, sa_ipaddrbuf(sa), addrbuf, flags); /* format v6 address */
+ break;
+
+ case AT_IPv4:
+ src = addrbuf;
+ atop_v4(sa, sa_ipaddrbuf(sa), addrbuf, flags); /* format v4 address */
+ break;
+
+ case AT_LOCAL: /* Local address; just the file name */
+ src = sa_localaddr(sa);
+ break;
+
+ case AT_NONE: /* No address type... */
+ src = "<NO ADDRESS>";
+ break;
+ }
+
+ strncpy(buf, src, size); /* Copy the address into the user's buffer */
+
+ ev_return(0);
+}
Index: event/sockaddr_export.c
diff -u /dev/null event/sockaddr_export.c:1.1
--- /dev/null Sat Oct 8 18:42:52 2005
+++ event/sockaddr_export.c Sat Oct 8 18:42:41 2005
@@ -0,0 +1,98 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: sockaddr_export.c,v 1.1 2005/10/09 01:42:41 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Implementation of sockaddr_export().
+ *
+ * This file contains the implementation of the sockaddr_export()
+ * function.
+ */
+#include "event_int.h"
+
+#include <netinet/in.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/un.h>
+
+ev_err_t
+sockaddr_export(ev_sockaddr_t *sa, struct sockaddr *addr, int *len)
+{
+ int t_len;
+
+ ev_init(); /* make sure library is initialized... */
+
+ /* sanity-check arguments */
+ if (!sa || !addr || !len)
+ ev_return(EINVAL);
+
+ /* Clear out the address structure... */
+ memset(addr, 0, *len);
+
+ switch (sa->sa_type) {
+#ifdef HAVE_SOCKADDR_IN6
+ case AT_IPv6:
+ if (*len < sizeof(struct sockaddr_in6)) /* verify the size */
+ ev_return(ENOSPC);
+ *len = sizeof(struct sockaddr_in6); /* reset the size */
+ ((struct sockaddr_in6 *)addr)->sin6_family = AF_INET6; /* set family */
+ /* Copy the port over... */
+ ((struct sockaddr_in6 *)addr)->sin6_port = htons(sa_ipaddrport(sa));
+ /* Copy the address over... */
+ memcpy(((struct sockaddr_in6 *)addr)->sin6_addr.s6_addr,
+ sa_ipaddrbuf(sa), SOCK_ADDRBUFV6_LEN);
+ break;
+#endif /* HAVE_SOCKADDR_IN6 */
+
+ case AT_IPv4:
+ if (*len < sizeof(struct sockaddr_in)) /* verify the size */
+ ev_return(ENOSPC);
+ *len = sizeof(struct sockaddr_in); /* reset the size */
+ ((struct sockaddr_in *)addr)->sin_family = AF_INET; /* set family */
+ /* Copy the port over... */
+ ((struct sockaddr_in *)addr)->sin_port = htons(sa_ipaddrport(sa));
+ /* Copy the address over... */
+ memcpy(&((struct sockaddr_in *)addr)->sin_addr.s_addr,
+ sa_ipaddrbuf(sa), SOCK_ADDRBUFV4_LEN);
+ break;
+
+ case AT_LOCAL:
+ if (*len < (sizeof(struct sockaddr_un) - SOCK_LOCALADDR_LEN +
+ (t_len = strlen(sa_localaddr(sa))))) /* verify the size */
+ ev_return(ENOSPC);
+ /* reset the size */
+ *len = sizeof(struct sockaddr_un) - SOCK_LOCALADDR_LEN + t_len;
+ ((struct sockaddr_un *)addr)->sun_family = AF_LOCAL; /* set family */
+ /* Copy the address over... */
+ memcpy(((struct sockaddr_un *)addr)->sun_path, sa_localaddr(sa), t_len);
+ /* String should already be terminated due to memset() above */
+ break;
+
+ default:
+ ev_return(ENOSYS);
+ break;
+ }
+
+#ifdef HAVE_SOCKADDR_SA_LEN
+ addr->sa_len = *len; /* set the length member */
+#endif /* HAVE_SOCKADDR_SA_LEN */
+
+ ev_return(0);
+}
Index: event/sockaddr_import.c
diff -u /dev/null event/sockaddr_import.c:1.1
--- /dev/null Sat Oct 8 18:42:52 2005
+++ event/sockaddr_import.c Sat Oct 8 18:42:41 2005
@@ -0,0 +1,79 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: sockaddr_import.c,v 1.1 2005/10/09 01:42:41 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Implementation of sockaddr_import().
+ *
+ * This file contains the implementation of the sockaddr_import()
+ * function.
+ */
+#include "event_int.h"
+
+#include <netinet/in.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <sys/un.h>
+
+ev_err_t
+sockaddr_import(ev_sockaddr_t *sa, const struct sockaddr *addr)
+{
+ ev_init(); /* make sure library is initialized... */
+
+ /* sanity-check arguments */
+ if (!sa || !addr ||
+ (addr->sa_family != AF_LOCAL && addr->sa_family != AF_INET
+#ifdef HAVE_SOCKADDR_IN6
+ && addr->sa_family != AF_INET6
+#endif /* HAVE_SOCKADDR_IN6 */
+ ))
+ ev_return(EINVAL);
+
+ switch (addr->sa_family) {
+ case AF_LOCAL: /* Local address... */
+ sa->sa_type = AT_LOCAL; /* set address type */
+ ev_assert(strlen(((struct sockaddr_un *)addr)->sun_path) <
+ SOCK_LOCALADDR_LEN);
+ strncpy(sa->sa_addr.saa_localaddr, ((struct sockaddr_un *)addr)->sun_path,
+ SOCK_LOCALADDR_LEN - 1); /* path may not be terminated */
+ break;
+
+ case AF_INET: /* IPv4 address... */
+ sa->sa_type = AT_IPv4; /* set address type */
+ sa->sa_addr.saa_ipaddr.saai_port =
+ ntohs(((struct sockaddr_in *)addr)->sin_port);
+ memcpy(sa->sa_addr.saa_ipaddr.saai_addrbuf,
+ &((struct sockaddr_in *)addr)->sin_addr.s_addr, SOCK_ADDRBUFV4_LEN);
+ break;
+
+#ifdef HAVE_SOCKADDR_IN6
+ case AF_INET6: /* IPv6 address... */
+ sa->sa_type = AT_IPv6; /* set address type */
+ sa->sa_addr.saa_ipaddr.saai_port =
+ ntohs(((struct sockaddr_in6 *)addr)->sin6_port);
+ memcpy(sa->sa_addr.saa_ipaddr.saai_addrbuf,
+ ((struct sockaddr_in6 *)addr)->sin6_addr.s6_addr,
+ SOCK_ADDRBUFV6_LEN);
+ break;
+#endif /* HAVE_SOCKADDR_IN6 */
+ }
+
+ ev_return(0);
+}
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-10-08 03:52:21
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-10-08 03:52:08 UTC
Modified files:
doc/event.doxytag doc/html/__ev__gen__lookup_8c-source.html
doc/html/__ev__gen__lookup_8c.html
doc/html/__timer__heapify_8c-source.html
doc/html/__timer__heapify_8c.html doc/html/annotated.html
doc/html/classes.html doc/html/confvar.html
doc/html/dir_000000.html doc/html/dirs.html
doc/html/engine__activate_8c-source.html
doc/html/engine__activate_8c.html
doc/html/engine__register_8c-source.html
doc/html/engine__register_8c.html doc/html/engines_8h-source.html
doc/html/engines_8h.html doc/html/engines__int_8h-source.html
doc/html/engines__int_8h.html doc/html/engmodinit_8c-source.html
doc/html/engmodinit_8c.html doc/html/engmodule_8c-source.html
doc/html/engmodule_8c.html doc/html/event-test_8h-source.html
doc/html/event-test_8h.html doc/html/event_8h-source.html
doc/html/event_8h.html doc/html/event_8h__dep__incl.map
doc/html/event_8h__dep__incl.md5 doc/html/event_8h__dep__incl.png
doc/html/event__attr__confpath_8c-source.html
doc/html/event__attr__confpath_8c.html
doc/html/event__attr__confreg_8c-source.html
doc/html/event__attr__confreg_8c.html
doc/html/event__attr__confvar_8c-source.html
doc/html/event__attr__confvar_8c.html
doc/html/event__attr__destroy_8c-source.html
doc/html/event__attr__destroy_8c.html
doc/html/event__attr__engine_8c-source.html
doc/html/event__attr__engine_8c.html
doc/html/event__attr__init_8c-source.html
doc/html/event__attr__init_8c.html
doc/html/event__attr__libpath_8c-source.html
doc/html/event__attr__libpath_8c.html
doc/html/event__attr__modlist_8c-source.html
doc/html/event__attr__modlist_8c.html
doc/html/event__destroy_8c-source.html
doc/html/event__destroy_8c.html
doc/html/event__gen__alloc_8c-source.html
doc/html/event__gen__alloc_8c.html
doc/html/event__gen__register_8c-source.html
doc/html/event__gen__register_8c.html
doc/html/event__gen__release_8c-source.html
doc/html/event__gen__release_8c.html
doc/html/event__init_8c-source.html doc/html/event__init_8c.html
doc/html/event__int_8h-source.html doc/html/event__int_8h.html
doc/html/event__int_8h__dep__incl.map
doc/html/event__int_8h__dep__incl.md5
doc/html/event__int_8h__dep__incl.png
doc/html/event__log_8c-source.html doc/html/event__log_8c.html
doc/html/files.html doc/html/functions.html
doc/html/functions_vars.html doc/html/gcc-attrs_8h-source.html
doc/html/gcc-attrs_8h.html doc/html/gcc-attrs_8h__dep__incl.map
doc/html/gcc-attrs_8h__dep__incl.md5
doc/html/gcc-attrs_8h__dep__incl.png doc/html/globals.html
doc/html/globals_0x61.html doc/html/globals_0x63.html
doc/html/globals_0x64.html doc/html/globals_0x65.html
doc/html/globals_0x66.html doc/html/globals_0x67.html
doc/html/globals_0x68.html doc/html/globals_0x6c.html
doc/html/globals_0x6d.html doc/html/globals_0x6e.html
doc/html/globals_0x72.html doc/html/globals_0x73.html
doc/html/globals_0x74.html doc/html/globals_0x76.html
doc/html/globals_defs.html doc/html/globals_enum.html
doc/html/globals_eval.html doc/html/globals_func.html
doc/html/globals_type.html doc/html/globals_vars.html
doc/html/graph_legend.html doc/html/group__engines.html
doc/html/group__event.html doc/html/group__signal.html
doc/html/group__socket.html doc/html/group__timer.html
doc/html/index.html doc/html/modules.html doc/html/pages.html
doc/html/sig_8h-source.html doc/html/sig_8h.html
doc/html/sig_8h__dep__incl.map doc/html/sig_8h__dep__incl.md5
doc/html/sig_8h__dep__incl.png
doc/html/signal__create_8c-source.html
doc/html/signal__create_8c.html
doc/html/signal__destroy_8c-source.html
doc/html/signal__destroy_8c.html doc/html/sock_8h-source.html
doc/html/sock_8h.html doc/html/sock_8h__dep__incl.map
doc/html/sock_8h__dep__incl.md5 doc/html/sock_8h__dep__incl.png
doc/html/struct__ev__attr__s.html
doc/html/struct__ev__ctx__s.html
doc/html/struct__ev__engine__s.html
doc/html/struct__ev__englink__s.html
doc/html/struct__ev__englist__s.html
doc/html/struct__ev__gendesc__s.html
doc/html/struct__ev__genhdr__s.html
doc/html/struct__ev__genlist__s.html
doc/html/struct__ev__gens__s.html
doc/html/struct__ev__overvars__s.html
doc/html/struct__ev__sig__s.html
doc/html/struct__ev__signals__s.html
doc/html/struct__ev__sock__s.html
doc/html/struct__ev__sockaddr__s.html
doc/html/struct__ev__sockets__s.html
doc/html/struct__ev__tim__s.html
doc/html/struct__ev__timers__s.html
doc/html/struct__ev__timnode__s.html
doc/html/struct__ev__varlist__s.html
doc/html/struct__event__s.html doc/html/structgenerator.html
doc/html/structrule.html doc/html/structt__gen.html
doc/html/structteng.html doc/html/structtest__resched.html
doc/html/structtest__timer.html
doc/html/t__event__attrs_8c-source.html
doc/html/t__event__attrs_8c.html
doc/html/t__event__init_8c-source.html
doc/html/t__event__init_8c.html
doc/html/t__event__log_8c-source.html
doc/html/t__event__log_8c.html
doc/html/t__evg__alloc_8c-source.html
doc/html/t__evg__alloc_8c.html
doc/html/t__evg__register_8c-source.html
doc/html/t__evg__register_8c.html
doc/html/t__signal__fcns_8c-source.html
doc/html/t__signal__fcns_8c.html
doc/html/t__timer__fcns_8c-source.html
doc/html/t__timer__fcns_8c.html doc/html/test.html
doc/html/tim_8h-source.html doc/html/tim_8h.html
doc/html/tim_8h__dep__incl.map doc/html/tim_8h__dep__incl.md5
doc/html/tim_8h__dep__incl.png
doc/html/timer__create_8c-source.html
doc/html/timer__create_8c.html
doc/html/timer__destroy_8c-source.html
doc/html/timer__destroy_8c.html
doc/html/timer__resched_8c-source.html
doc/html/timer__resched_8c.html doc/latex/doxygen.sty
doc/latex/event_8h__dep__incl.eps
doc/latex/event_8h__dep__incl.md5 doc/latex/event__int_8h.tex
doc/latex/event__int_8h__dep__incl.eps
doc/latex/event__int_8h__dep__incl.md5 doc/latex/files.tex
doc/latex/gcc-attrs_8h.tex doc/latex/gcc-attrs_8h__dep__incl.eps
doc/latex/gcc-attrs_8h__dep__incl.md5 doc/latex/group__socket.tex
doc/latex/pages.tex doc/latex/refman.tex
doc/latex/sig_8h__dep__incl.eps doc/latex/sig_8h__dep__incl.md5
doc/latex/sock_8h__dep__incl.eps doc/latex/sock_8h__dep__incl.md5
doc/latex/struct__ev__sockaddr__s.tex
doc/latex/tim_8h__dep__incl.eps doc/latex/tim_8h__dep__incl.md5
doc/man/man3/_ev_attr_s.3 doc/man/man3/_ev_ctx_s.3
doc/man/man3/_ev_engine_s.3 doc/man/man3/_ev_englink_s.3
doc/man/man3/_ev_englist_s.3 doc/man/man3/_ev_gen_lookup.c.3
doc/man/man3/_ev_gendesc_s.3 doc/man/man3/_ev_genhdr_s.3
doc/man/man3/_ev_genlist_s.3 doc/man/man3/_ev_gens_s.3
doc/man/man3/_ev_overvars_s.3 doc/man/man3/_ev_sig_s.3
doc/man/man3/_ev_signals_s.3 doc/man/man3/_ev_sock_s.3
doc/man/man3/_ev_sockaddr_s.3 doc/man/man3/_ev_sockets_s.3
doc/man/man3/_ev_tim_s.3 doc/man/man3/_ev_timers_s.3
doc/man/man3/_ev_timnode_s.3 doc/man/man3/_ev_varlist_s.3
doc/man/man3/_event_s.3
doc/man/man3/_home_klmitch_devel_src_event_tests_.3
doc/man/man3/_timer_heapify.c.3 doc/man/man3/confvar.3
doc/man/man3/engine_activate.c.3 doc/man/man3/engine_register.c.3
doc/man/man3/engines.3 doc/man/man3/engines.h.3
doc/man/man3/engines_int.h.3 doc/man/man3/engmodinit.c.3
doc/man/man3/engmodule.c.3 doc/man/man3/event-test.h.3
doc/man/man3/event.3 doc/man/man3/event.h.3
doc/man/man3/event_attr_confpath.c.3
doc/man/man3/event_attr_confreg.c.3
doc/man/man3/event_attr_confvar.c.3
doc/man/man3/event_attr_destroy.c.3
doc/man/man3/event_attr_engine.c.3
doc/man/man3/event_attr_init.c.3
doc/man/man3/event_attr_libpath.c.3
doc/man/man3/event_attr_modlist.c.3
doc/man/man3/event_destroy.c.3 doc/man/man3/event_gen_alloc.c.3
doc/man/man3/event_gen_register.c.3
doc/man/man3/event_gen_release.c.3 doc/man/man3/event_init.c.3
doc/man/man3/event_int.h.3 doc/man/man3/event_log.c.3
doc/man/man3/gcc-attrs.h.3 doc/man/man3/generator.3
doc/man/man3/rule.3 doc/man/man3/sig.h.3 doc/man/man3/signal.3
doc/man/man3/signal_create.c.3 doc/man/man3/signal_destroy.c.3
doc/man/man3/sock.h.3 doc/man/man3/socket.3
doc/man/man3/t_event_attrs.c.3 doc/man/man3/t_event_init.c.3
doc/man/man3/t_event_log.c.3 doc/man/man3/t_evg_alloc.c.3
doc/man/man3/t_evg_register.c.3 doc/man/man3/t_gen.3
doc/man/man3/t_signal_fcns.c.3 doc/man/man3/t_timer_fcns.c.3
doc/man/man3/teng.3 doc/man/man3/test.3
doc/man/man3/test_resched.3 doc/man/man3/test_timer.3
doc/man/man3/tim.h.3 doc/man/man3/timer.3
doc/man/man3/timer_create.c.3 doc/man/man3/timer_destroy.c.3
doc/man/man3/timer_resched.c.3
Added files:
doc/html/sa__ipaddrbuf__set_8c-source.html
doc/html/sa__ipaddrbuf__set_8c.html
doc/html/sa__ipaddrbuf__set_8c__incl.map
doc/html/sa__ipaddrbuf__set_8c__incl.md5
doc/html/sa__ipaddrbuf__set_8c__incl.png
doc/html/sa__ipaddrport__set_8c-source.html
doc/html/sa__ipaddrport__set_8c.html
doc/html/sa__ipaddrport__set_8c__incl.map
doc/html/sa__ipaddrport__set_8c__incl.md5
doc/html/sa__ipaddrport__set_8c__incl.png
doc/html/sa__localaddr__set_8c-source.html
doc/html/sa__localaddr__set_8c.html
doc/html/sa__localaddr__set_8c__incl.map
doc/html/sa__localaddr__set_8c__incl.md5
doc/html/sa__localaddr__set_8c__incl.png
doc/html/sa__type__set_8c-source.html
doc/html/sa__type__set_8c.html
doc/html/sa__type__set_8c__incl.map
doc/html/sa__type__set_8c__incl.md5
doc/html/sa__type__set_8c__incl.png doc/html/todo.html
doc/latex/sa__ipaddrbuf__set_8c.tex
doc/latex/sa__ipaddrbuf__set_8c__incl.eps
doc/latex/sa__ipaddrbuf__set_8c__incl.md5
doc/latex/sa__ipaddrport__set_8c.tex
doc/latex/sa__ipaddrport__set_8c__incl.eps
doc/latex/sa__ipaddrport__set_8c__incl.md5
doc/latex/sa__localaddr__set_8c.tex
doc/latex/sa__localaddr__set_8c__incl.eps
doc/latex/sa__localaddr__set_8c__incl.md5
doc/latex/sa__type__set_8c.tex
doc/latex/sa__type__set_8c__incl.eps
doc/latex/sa__type__set_8c__incl.md5 doc/latex/todo.tex
doc/man/man3/sa_ipaddrbuf_set.c.3
doc/man/man3/sa_ipaddrport_set.c.3
doc/man/man3/sa_localaddr_set.c.3 doc/man/man3/sa_type_set.c.3
doc/man/man3/todo.3
Log message:
doc update
---------------------- diff included ----------------------
Index: event/doc/event.doxytag
diff -u event/doc/event.doxytag:1.13 event/doc/event.doxytag:1.14
--- event/doc/event.doxytag:1.13 Thu Oct 6 20:53:03 2005
+++ event/doc/event.doxytag Fri Oct 7 20:51:57 2005
@@ -2001,6 +2001,58 @@
</member>
</compound>
<compound kind="file">
+ <name>sa_ipaddrbuf_set.c</name>
+ <path>/home/klmitch/devel/src/event/</path>
+ <filename>sa__ipaddrbuf__set_8c</filename>
+ <includes id="event__int_8h" name="event_int.h" local="yes" imported="no">event_int.h</includes>
+ <member kind="function">
+ <type>ev_err_t</type>
+ <name>sa_ipaddrbuf_set</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga4</anchor>
+ <arglist>(ev_sockaddr_t *sa, const unsigned char *address)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>sa_ipaddrport_set.c</name>
+ <path>/home/klmitch/devel/src/event/</path>
+ <filename>sa__ipaddrport__set_8c</filename>
+ <includes id="event__int_8h" name="event_int.h" local="yes" imported="no">event_int.h</includes>
+ <member kind="function">
+ <type>ev_err_t</type>
+ <name>sa_ipaddrport_set</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga5</anchor>
+ <arglist>(ev_sockaddr_t *sa, unsigned short port)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>sa_localaddr_set.c</name>
+ <path>/home/klmitch/devel/src/event/</path>
+ <filename>sa__localaddr__set_8c</filename>
+ <includes id="event__int_8h" name="event_int.h" local="yes" imported="no">event_int.h</includes>
+ <member kind="function">
+ <type>ev_err_t</type>
+ <name>sa_localaddr_set</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga6</anchor>
+ <arglist>(ev_sockaddr_t *sa, const char *address)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
+ <name>sa_type_set.c</name>
+ <path>/home/klmitch/devel/src/event/</path>
+ <filename>sa__type__set_8c</filename>
+ <includes id="event__int_8h" name="event_int.h" local="yes" imported="no">event_int.h</includes>
+ <member kind="function">
+ <type>ev_err_t</type>
+ <name>sa_type_set</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga3</anchor>
+ <arglist>(ev_sockaddr_t *sa, ev_satype_t type)</arglist>
+ </member>
+ </compound>
+ <compound kind="file">
<name>sig.h</name>
<path>/home/klmitch/devel/src/event/</path>
<filename>sig_8h</filename>
Index: event/doc/html/__ev__gen__lookup_8c-source.html
diff -u event/doc/html/__ev__gen__lookup_8c-source.html:1.8 event/doc/html/__ev__gen__lookup_8c-source.html:1.9
--- event/doc/html/__ev__gen__lookup_8c-source.html:1.8 Thu Oct 6 20:53:03 2005
+++ event/doc/html/__ev__gen__lookup_8c-source.html Fri Oct 7 20:51:57 2005
@@ -52,7 +52,7 @@
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <a class="code" href="event__int_8h.html#a25">ev_return</a>(ENOENT); <span class="comment">/* failed to find the entry... */</span>
<a name="l00055"></a>00055 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__ev__gen__lookup_8c.html
diff -u event/doc/html/__ev__gen__lookup_8c.html:1.8 event/doc/html/__ev__gen__lookup_8c.html:1.9
--- event/doc/html/__ev__gen__lookup_8c.html:1.8 Thu Oct 6 20:53:03 2005
+++ event/doc/html/__ev__gen__lookup_8c.html Fri Oct 7 20:51:57 2005
@@ -101,7 +101,7 @@
Referenced by <a class="el" href="event__gen__alloc_8c-source.html#l00032">event_gen_alloc()</a>, <a class="el" href="event__gen__release_8c-source.html#l00032">event_gen_release()</a>, and <a class="el" href="t__evg__alloc_8c-source.html#l00068">main()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:31 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:10 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__timer__heapify_8c-source.html
diff -u event/doc/html/__timer__heapify_8c-source.html:1.6 event/doc/html/__timer__heapify_8c-source.html:1.7
--- event/doc/html/__timer__heapify_8c-source.html:1.6 Thu Oct 6 20:53:03 2005
+++ event/doc/html/__timer__heapify_8c-source.html Fri Oct 7 20:51:57 2005
@@ -131,7 +131,7 @@
<a name="l00146"></a>00146
<a name="l00147"></a>00147 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00148"></a>00148 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__timer__heapify_8c.html
diff -u event/doc/html/__timer__heapify_8c.html:1.6 event/doc/html/__timer__heapify_8c.html:1.7
--- event/doc/html/__timer__heapify_8c.html:1.6 Thu Oct 6 20:53:03 2005
+++ event/doc/html/__timer__heapify_8c.html Fri Oct 7 20:51:57 2005
@@ -218,7 +218,7 @@
Referenced by <a class="el" href="__timer__heapify_8c-source.html#l00121">_timer_heapify_down()</a>, and <a class="el" href="__timer__heapify_8c-source.html#l00105">_timer_heapify_up()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:31 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:11 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/annotated.html
diff -u event/doc/html/annotated.html:1.16 event/doc/html/annotated.html:1.17
--- event/doc/html/annotated.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/annotated.html Fri Oct 7 20:51:57 2005
@@ -33,7 +33,7 @@
<tr><td class="indexkey"><a class="el" href="structtest__resched.html">test_resched</a></td><td class="indexvalue">Structure for defining a timer rescheduling to perform </td></tr>
<tr><td class="indexkey"><a class="el" href="structtest__timer.html">test_timer</a></td><td class="indexvalue">Structure for defining a timer to create </td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:48 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:57 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/classes.html
diff -u event/doc/html/classes.html:1.16 event/doc/html/classes.html:1.17
--- event/doc/html/classes.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/classes.html Fri Oct 7 20:51:57 2005
@@ -12,7 +12,7 @@
</td></tr><tr><td><a class="el" href="struct__ev__ctx__s.html">_ev_ctx_s</a> </td><td><a class="el" href="struct__ev__genlist__s.html">_ev_genlist_s</a> </td><td><a class="el" href="struct__ev__sockaddr__s.html">_ev_sockaddr_s</a> </td><td><a class="el" href="struct__event__s.html">_event_s</a> </td><td><a class="el" href="structt__gen.html">t_gen</a> </td></tr><tr><td><a class="el" href="struct__ev__engine__s.html">_ev_engine_s</a> </td><td><a class="el" href="struct__ev__gens__s.html">_ev_gens_s</a> </td><td><a class="el" href="struct__ev__sockets__s.html">_ev_sockets_s</a> </td><td><a name="letter_G"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> G </div></td></tr></table>
</td><td><a class="el" href="structteng.html">teng</a> </td></tr><tr><td><a class="el" href="struct__ev__englink__s.html">_ev_englink_s</a> </td><td><a class="el" href="struct__ev__overvars__s.html">_ev_overvars_s</a> </td><td><a class="el" href="struct__ev__tim__s.html">_ev_tim_s</a> </td><td><a class="el" href="structgenerator.html">generator</a> </td><td><a class="el" href="structtest__resched.html">test_resched</a> </td></tr><tr><td><a class="el" href="struct__ev__englist__s.html">_ev_englist_s</a> </td><td><a class="el" href="struct__ev__sig__s.html">_ev_sig_s</a> </td><td><a class="el" href="struct__ev__timers__s.html">_ev_timers_s</a> </td><td><a name="letter_R"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> R </div></td></tr></table>
</td><td><a class="el" href="structtest__timer.html">test_timer</a> </td></tr></table><p><div class="qindex"><a class="qindex" href="#letter__">_</a> | <a class="qindex" href="#letter_G">G</a> | <a class="qindex" href="#letter_R">R</a> | <a class="qindex" href="#letter_T">T</a></div><p>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:48 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:57 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/confvar.html
diff -u event/doc/html/confvar.html:1.16 event/doc/html/confvar.html:1.17
--- event/doc/html/confvar.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/confvar.html Fri Oct 7 20:51:57 2005
@@ -21,7 +21,7 @@
The <a class="el" href="group__event.html#ga11">event_init()</a> function uses the <a class="elRef" doxygen="treeconf.doxytag:http://libevent.sourceforge.net/treeconf/" href="http://libevent.sourceforge.net/treeconf/group__treeconf.html#gga8">tc_path()</a> function to load the configuration from all the files listed in the <code>envpath</code> argument, which is presumed to be passed in by the application from the environment. If the <code>envpath</code> contains an empty field (i.e., "::"), envpath is passed as <code>NULL</code>, or the <a class="el" href="group__event.html#ga61">EV_INIT_SECURE</a> flag is passed to <a class="el" href="group__event.html#ga11">event_init()</a>, then a default path will be searched. Note that the <a class="el" href="group__event.html#ga61">EV_INIT_SECURE</a> flag will also cause files containing the <code>%n</code> or <code>~</code> expandos to be skipped for security reasons.<p>
In addition to the <code>~</code> expandos (<code>~</code> expands to the current user's home directory; <code>~user</code> expands to the home directory of <code>user</code>), the library also defines the <code>%n</code> and <code>%p</code> expandos, which expand to the user name and the application name, respectively. (The application name is passed as the <code>prog</code> argument to the <a class="el" href="group__event.html#ga11">event_init()</a> function. If <code>NULL</code> is passed for <code>prog</code>, file names containing the <code>%p</code> expando will be omitted.)<p>
By default, the default search path contains <code>"event.tc"</code> from the system package configuration directory (often <code>/usr/local/etc/event</code>); <code>".event.tc"</code> from the user's home directory; <code>"%p.tc"</code> from the system configuration directory; and <code>".%p.tc"</code> from the user's home directory. This default may be overridden by passing <a class="el" href="group__event.html#ga11">event_init()</a> an <a class="el" href="group__event.html#ga2">ev_attr_t</a> object which has been modified by a call to <a class="el" href="group__event.html#ga14">event_attr_confpath()</a>.<p>
-Any variables passed in an <a class="el" href="group__event.html#ga2">ev_attr_t</a> (modified by a call to the <a class="el" href="group__event.html#ga18">event_attr_confvar()</a> function) will override any values found in any of the configuration files loaded by <a class="el" href="group__event.html#ga11">event_init()</a>. <hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:54 2005 for event by
+Any variables passed in an <a class="el" href="group__event.html#ga2">ev_attr_t</a> (modified by a call to the <a class="el" href="group__event.html#ga18">event_attr_confvar()</a> function) will override any values found in any of the configuration files loaded by <a class="el" href="group__event.html#ga11">event_init()</a>. <hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:50:14 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/dir_000000.html
diff -u event/doc/html/dir_000000.html:1.16 event/doc/html/dir_000000.html:1.17
--- event/doc/html/dir_000000.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/dir_000000.html Fri Oct 7 20:51:57 2005
@@ -73,7 +73,7 @@
<p>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:56 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:50:18 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/dirs.html
diff -u event/doc/html/dirs.html:1.16 event/doc/html/dirs.html:1.17
--- event/doc/html/dirs.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/dirs.html Fri Oct 7 20:51:57 2005
@@ -8,7 +8,7 @@
<h1>event Directories</h1>This directory hierarchy is sorted roughly, but not completely, alphabetically:<ul>
<li><a class="el" href="dir_000000.html">tests</a>
</ul>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:56 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:50:18 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__activate_8c-source.html
diff -u event/doc/html/engine__activate_8c-source.html:1.10 event/doc/html/engine__activate_8c-source.html:1.11
--- event/doc/html/engine__activate_8c-source.html:1.10 Thu Oct 6 20:53:03 2005
+++ event/doc/html/engine__activate_8c-source.html Fri Oct 7 20:51:57 2005
@@ -74,7 +74,7 @@
<a name="l00086"></a>00086
<a name="l00087"></a>00087 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* all done! */</span>
<a name="l00088"></a>00088 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__activate_8c.html
diff -u event/doc/html/engine__activate_8c.html:1.10 event/doc/html/engine__activate_8c.html:1.11
--- event/doc/html/engine__activate_8c.html:1.10 Thu Oct 6 20:53:03 2005
+++ event/doc/html/engine__activate_8c.html Fri Oct 7 20:51:57 2005
@@ -91,7 +91,7 @@
Referenced by <a class="el" href="engine__activate_8c-source.html#l00063">engine_activate()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:32 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:12 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__register_8c-source.html
diff -u event/doc/html/engine__register_8c-source.html:1.13 event/doc/html/engine__register_8c-source.html:1.14
--- event/doc/html/engine__register_8c-source.html:1.13 Thu Oct 6 20:53:03 2005
+++ event/doc/html/engine__register_8c-source.html Fri Oct 7 20:51:57 2005
@@ -95,7 +95,7 @@
<a name="l00095"></a>00095
<a name="l00096"></a>00096 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00097"></a>00097 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__register_8c.html
diff -u event/doc/html/engine__register_8c.html:1.13 event/doc/html/engine__register_8c.html:1.14
--- event/doc/html/engine__register_8c.html:1.13 Thu Oct 6 20:53:03 2005
+++ event/doc/html/engine__register_8c.html Fri Oct 7 20:51:57 2005
@@ -38,7 +38,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register an engine. <a href="group__engines.html#ga18"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:32 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:13 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines_8h-source.html
diff -u event/doc/html/engines_8h-source.html:1.16 event/doc/html/engines_8h-source.html:1.17
--- event/doc/html/engines_8h-source.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/engines_8h-source.html Fri Oct 7 20:51:57 2005
@@ -212,7 +212,7 @@
<a name="l00769"></a>00769 <a class="code" href="event_8h.html#a1">EV_END_C_DECLS</a>
<a name="l00770"></a>00770
<a name="l00773"></a>00773 <span class="preprocessor">#endif </span><span class="comment">/* __include_event_engines_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines_8h.html
diff -u event/doc/html/engines_8h.html:1.16 event/doc/html/engines_8h.html:1.17
--- event/doc/html/engines_8h.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/engines_8h.html Fri Oct 7 20:51:57 2005
@@ -210,7 +210,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Engine module descriptor. <a href="group__engines.html#ga0"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:32 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:14 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines__int_8h-source.html
diff -u event/doc/html/engines__int_8h-source.html:1.16 event/doc/html/engines__int_8h-source.html:1.17
--- event/doc/html/engines__int_8h-source.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/engines__int_8h-source.html Fri Oct 7 20:51:57 2005
@@ -76,7 +76,7 @@
<a name="l00234"></a>00234 <span class="preprocessor">} while (0)</span>
<a name="l00235"></a>00235 <span class="preprocessor"></span>
<a name="l00236"></a>00236 <span class="preprocessor">#endif </span><span class="comment">/* __include_engine_int_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines__int_8h.html
diff -u event/doc/html/engines__int_8h.html:1.16 event/doc/html/engines__int_8h.html:1.17
--- event/doc/html/engines__int_8h.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/engines__int_8h.html Fri Oct 7 20:51:57 2005
@@ -628,7 +628,7 @@
Referenced by <a class="el" href="engine__register_8c-source.html#l00034">engine_register()</a>, and <a class="el" href="event__init_8c-source.html#l00326">event_init()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:33 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:16 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodinit_8c-source.html
diff -u event/doc/html/engmodinit_8c-source.html:1.9 event/doc/html/engmodinit_8c-source.html:1.10
--- event/doc/html/engmodinit_8c-source.html:1.9 Thu Oct 6 20:53:03 2005
+++ event/doc/html/engmodinit_8c-source.html Fri Oct 7 20:51:57 2005
@@ -85,7 +85,7 @@
<a name="l00177"></a>00177
<a name="l00178"></a>00178 <span class="keywordflow">return</span> &engine;
<a name="l00179"></a>00179 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodinit_8c.html
diff -u event/doc/html/engmodinit_8c.html:1.9 event/doc/html/engmodinit_8c.html:1.10
--- event/doc/html/engmodinit_8c.html:1.9 Thu Oct 6 20:53:03 2005
+++ event/doc/html/engmodinit_8c.html Fri Oct 7 20:51:57 2005
@@ -479,7 +479,7 @@
Referenced by <a class="el" href="t__event__init_8c-source.html#l00277">main()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:33 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:17 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodule_8c-source.html
diff -u event/doc/html/engmodule_8c-source.html:1.9 event/doc/html/engmodule_8c-source.html:1.10
--- event/doc/html/engmodule_8c-source.html:1.9 Thu Oct 6 20:53:03 2005
+++ event/doc/html/engmodule_8c-source.html Fri Oct 7 20:51:57 2005
@@ -75,7 +75,7 @@
<a name="l00161"></a>00161 <a class="code" href="engmodule_8c.html#a4">em_sock</a>, <a class="code" href="engmodule_8c.html#a4">em_sock</a>, <a class="code" href="engmodule_8c.html#a5">em_sockev</a>,
<a name="l00162"></a>00162 <a class="code" href="engmodule_8c.html#a6">em_sig</a>, <a class="code" href="engmodule_8c.html#a6">em_sig</a>,
<a name="l00163"></a>00163 <a class="code" href="engmodule_8c.html#a7">em_tim</a>, <a class="code" href="engmodule_8c.html#a7">em_tim</a>);
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodule_8c.html
diff -u event/doc/html/engmodule_8c.html:1.9 event/doc/html/engmodule_8c.html:1.10
--- event/doc/html/engmodule_8c.html:1.9 Thu Oct 6 20:53:03 2005
+++ event/doc/html/engmodule_8c.html Fri Oct 7 20:51:57 2005
@@ -445,7 +445,7 @@
Definition at line <a class="el" href="engmodule_8c-source.html#l00150">150</a> of file <a class="el" href="engmodule_8c-source.html">engmodule.c</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:34 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:18 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event-test_8h-source.html
diff -u event/doc/html/event-test_8h-source.html:1.16 event/doc/html/event-test_8h-source.html:1.17
--- event/doc/html/event-test_8h-source.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/event-test_8h-source.html Fri Oct 7 20:51:57 2005
@@ -82,7 +82,7 @@
<a name="l00123"></a>00123 } while (0)
<a name="l00124"></a>00124
<a name="l00125"></a>00125 <span class="preprocessor">#endif </span><span class="comment">/* __event_test_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event-test_8h.html
diff -u event/doc/html/event-test_8h.html:1.16 event/doc/html/event-test_8h.html:1.17
--- event/doc/html/event-test_8h.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/event-test_8h.html Fri Oct 7 20:51:57 2005
@@ -198,7 +198,7 @@
Referenced by <a class="el" href="t__event__attrs_8c-source.html#l00043">main()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:34 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:19 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event_8h-source.html
diff -u event/doc/html/event_8h-source.html:1.16 event/doc/html/event_8h-source.html:1.17
--- event/doc/html/event_8h-source.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/event_8h-source.html Fri Oct 7 20:51:57 2005
@@ -289,7 +289,7 @@
<a name="l01183"></a>01183 <a class="code" href="event_8h.html#a1">EV_END_C_DECLS</a>
<a name="l01184"></a>01184
<a name="l01187"></a>01187 #endif <span class="comment">/* __include_event_event_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event_8h.html
diff -u event/doc/html/event_8h.html:1.16 event/doc/html/event_8h.html:1.17
--- event/doc/html/event_8h.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/event_8h.html Fri Oct 7 20:51:57 2005
@@ -27,11 +27,11 @@
<p>
This graph shows which files directly or indirectly include this file:<p><center><img src="event_8h__dep__incl.png" border="0" usemap="#event.hdep_map" alt=""></center>
<map name="event.hdep_map">
-<area href="event__int_8h.html" shape="rect" coords="233,320,318,344" alt="">
-<area href="engines_8h.html" shape="rect" coords="236,224,316,248" alt="">
-<area href="sig_8h.html" shape="rect" coords="128,224,178,248" alt="">
-<area href="sock_8h.html" shape="rect" coords="122,272,184,296" alt="">
-<area href="tim_8h.html" shape="rect" coords="128,320,178,344" alt="">
+<area href="event__int_8h.html" shape="rect" coords="233,416,318,440" alt="">
+<area href="engines_8h.html" shape="rect" coords="236,320,316,344" alt="">
+<area href="sig_8h.html" shape="rect" coords="128,320,178,344" alt="">
+<area href="sock_8h.html" shape="rect" coords="122,368,184,392" alt="">
+<area href="tim_8h.html" shape="rect" coords="128,416,178,440" alt="">
<area href="__ev__gen__lookup_8c.html" shape="rect" coords="378,200,509,224" alt="">
<area href="__timer__heapify_8c.html" shape="rect" coords="384,248,504,272" alt="">
<area href="engines__int_8h.html" shape="rect" coords="393,8,494,32" alt="">
@@ -44,8 +44,12 @@
<area href="event__attr__modlist_8c.html" shape="rect" coords="373,584,514,608" alt="">
<area href="event__gen__alloc_8c.html" shape="rect" coords="380,632,508,656" alt="">
<area href="event__gen__register_8c.html" shape="rect" coords="372,680,516,704" alt="">
-<area href="event__gen__release_8c.html" shape="rect" coords="372,56,516,80" alt="">
-<area href="event__log_8c.html" shape="rect" coords="400,104,488,128" alt="">
+<area href="event__gen__release_8c.html" shape="rect" coords="372,728,516,752" alt="">
+<area href="event__log_8c.html" shape="rect" coords="400,776,488,800" alt="">
+<area href="sa__ipaddrbuf__set_8c.html" shape="rect" coords="377,824,510,848" alt="">
+<area href="sa__ipaddrport__set_8c.html" shape="rect" coords="374,872,513,896" alt="">
+<area href="sa__localaddr__set_8c.html" shape="rect" coords="377,56,510,80" alt="">
+<area href="sa__type__set_8c.html" shape="rect" coords="392,104,496,128" alt="">
<area href="event-test_8h.html" shape="rect" coords="398,152,489,176" alt="">
</map>
@@ -355,7 +359,7 @@
Definition at line <a class="el" href="event_8h-source.html#l00166">166</a> of file <a class="el" href="event_8h-source.html">event.h</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:35 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:20 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event_8h__dep__incl.map
diff -u event/doc/html/event_8h__dep__incl.map:1.5 event/doc/html/event_8h__dep__incl.map:1.6
--- event/doc/html/event_8h__dep__incl.map:1.5 Thu Sep 15 11:18:06 2005
+++ event/doc/html/event_8h__dep__incl.map Fri Oct 7 20:51:57 2005
@@ -1,9 +1,9 @@
base referer
-rect $event__int_8h.html 233,320 318,344
-rect $engines_8h.html 236,224 316,248
-rect $sig_8h.html 128,224 178,248
-rect $sock_8h.html 122,272 184,296
-rect $tim_8h.html 128,320 178,344
+rect $event__int_8h.html 233,416 318,440
+rect $engines_8h.html 236,320 316,344
+rect $sig_8h.html 128,320 178,344
+rect $sock_8h.html 122,368 184,392
+rect $tim_8h.html 128,416 178,440
rect $__ev__gen__lookup_8c.html 378,200 509,224
rect $__timer__heapify_8c.html 384,248 504,272
rect $engines__int_8h.html 393,8 494,32
@@ -16,6 +16,10 @@
rect $event__attr__modlist_8c.html 373,584 514,608
rect $event__gen__alloc_8c.html 380,632 508,656
rect $event__gen__register_8c.html 372,680 516,704
-rect $event__gen__release_8c.html 372,56 516,80
-rect $event__log_8c.html 400,104 488,128
+rect $event__gen__release_8c.html 372,728 516,752
+rect $event__log_8c.html 400,776 488,800
+rect $sa__ipaddrbuf__set_8c.html 377,824 510,848
+rect $sa__ipaddrport__set_8c.html 374,872 513,896
+rect $sa__localaddr__set_8c.html 377,56 510,80
+rect $sa__type__set_8c.html 392,104 496,128
rect $event-test_8h.html 398,152 489,176
Index: event/doc/html/event_8h__dep__incl.md5
diff -u event/doc/html/event_8h__dep__incl.md5:1.10 event/doc/html/event_8h__dep__incl.md5:1.11
--- event/doc/html/event_8h__dep__incl.md5:1.10 Thu Sep 15 11:18:06 2005
+++ event/doc/html/event_8h__dep__incl.md5 Fri Oct 7 20:51:57 2005
@@ -1 +1 @@
-115616e570063afa0ac28de5696f3c77
\ No newline at end of file
+2df40466177656acaf9262dcdcd1ead1
\ No newline at end of file
Index: event/doc/html/event_8h__dep__incl.png
Index: event/doc/html/event__attr__confpath_8c-source.html
diff -u event/doc/html/event__attr__confpath_8c-source.html:1.16 event/doc/html/event__attr__confpath_8c-source.html:1.17
--- event/doc/html/event__attr__confpath_8c-source.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/event__attr__confpath_8c-source.html Fri Oct 7 20:51:57 2005
@@ -47,7 +47,7 @@
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00049"></a>00049 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confpath_8c.html
diff -u event/doc/html/event__attr__confpath_8c.html:1.16 event/doc/html/event__attr__confpath_8c.html:1.17
--- event/doc/html/event__attr__confpath_8c.html:1.16 Thu Oct 6 20:53:03 2005
+++ event/doc/html/event__attr__confpath_8c.html Fri Oct 7 20:51:57 2005
@@ -35,7 +35,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve and/or set default configuration search path. <a href="group__event.html#ga14"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:35 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:21 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confreg_8c-source.html
diff -u event/doc/html/event__attr__confreg_8c-source.html:1.15 event/doc/html/event__attr__confreg_8c-source.html:1.16
--- event/doc/html/event__attr__confreg_8c-source.html:1.15 Thu Oct 6 20:53:03 2005
+++ event/doc/html/event__attr__confreg_8c-source.html Fri Oct 7 20:51:57 2005
@@ -74,7 +74,7 @@
<a name="l00074"></a>00074
<a name="l00075"></a>00075 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00076"></a>00076 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confreg_8c.html
diff -u event/doc/html/event__attr__confreg_8c.html:1.15 event/doc/html/event__attr__confreg_8c.html:1.16
--- event/doc/html/event__attr__confreg_8c.html:1.15 Thu Oct 6 20:53:03 2005
+++ event/doc/html/event__attr__confreg_8c.html Fri Oct 7 20:51:57 2005
@@ -37,7 +37,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register a treeconf variable for the application. <a href="group__event.html#ga17"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:35 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:22 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confvar_8c-source.html
diff -u event/doc/html/event__attr__confvar_8c-source.html:1.15 event/doc/html/event__attr__confvar_8c-source.html:1.16
--- event/doc/html/event__attr__confvar_8c-source.html:1.15 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__attr__confvar_8c-source.html Fri Oct 7 20:51:57 2005
@@ -79,7 +79,7 @@
<a name="l00079"></a>00079
<a name="l00080"></a>00080 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00081"></a>00081 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confvar_8c.html
diff -u event/doc/html/event__attr__confvar_8c.html:1.15 event/doc/html/event__attr__confvar_8c.html:1.16
--- event/doc/html/event__attr__confvar_8c.html:1.15 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__attr__confvar_8c.html Fri Oct 7 20:51:57 2005
@@ -37,7 +37,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Override a treeconf variable setting. <a href="group__event.html#ga18"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:36 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:23 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__destroy_8c-source.html
diff -u event/doc/html/event__attr__destroy_8c-source.html:1.16 event/doc/html/event__attr__destroy_8c-source.html:1.17
--- event/doc/html/event__attr__destroy_8c-source.html:1.16 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__attr__destroy_8c-source.html Fri Oct 7 20:51:57 2005
@@ -61,7 +61,7 @@
<a name="l00062"></a>00062
<a name="l00063"></a>00063 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* all done! */</span>
<a name="l00064"></a>00064 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__destroy_8c.html
diff -u event/doc/html/event__attr__destroy_8c.html:1.16 event/doc/html/event__attr__destroy_8c.html:1.17
--- event/doc/html/event__attr__destroy_8c.html:1.16 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__attr__destroy_8c.html Fri Oct 7 20:51:57 2005
@@ -36,7 +36,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy an attribute set and release all allocated memory. <a href="group__event.html#ga19"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:36 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:23 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__engine_8c-source.html
diff -u event/doc/html/event__attr__engine_8c-source.html:1.11 event/doc/html/event__attr__engine_8c-source.html:1.12
--- event/doc/html/event__attr__engine_8c-source.html:1.11 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__attr__engine_8c-source.html Fri Oct 7 20:51:57 2005
@@ -79,7 +79,7 @@
<a name="l00079"></a>00079
<a name="l00080"></a>00080 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00081"></a>00081 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__engine_8c.html
diff -u event/doc/html/event__attr__engine_8c.html:1.11 event/doc/html/event__attr__engine_8c.html:1.12
--- event/doc/html/event__attr__engine_8c.html:1.11 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__attr__engine_8c.html Fri Oct 7 20:51:57 2005
@@ -39,7 +39,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register an application-specific engine. <a href="group__engines.html#ga20"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:36 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:24 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__init_8c-source.html
diff -u event/doc/html/event__attr__init_8c-source.html:1.16 event/doc/html/event__attr__init_8c-source.html:1.17
--- event/doc/html/event__attr__init_8c-source.html:1.16 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__attr__init_8c-source.html Fri Oct 7 20:51:57 2005
@@ -49,7 +49,7 @@
<a name="l00049"></a>00049
<a name="l00050"></a>00050 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* all done! */</span>
<a name="l00051"></a>00051 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__init_8c.html
diff -u event/doc/html/event__attr__init_8c.html:1.16 event/doc/html/event__attr__init_8c.html:1.17
--- event/doc/html/event__attr__init_8c.html:1.16 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__attr__init_8c.html Fri Oct 7 20:51:57 2005
@@ -36,7 +36,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize a set of attributes for the events library. <a href="group__event.html#ga13"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:37 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:25 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__libpath_8c-source.html
diff -u event/doc/html/event__attr__libpath_8c-source.html:1.16 event/doc/html/event__attr__libpath_8c-source.html:1.17
--- event/doc/html/event__attr__libpath_8c-source.html:1.16 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__attr__libpath_8c-source.html Fri Oct 7 20:51:57 2005
@@ -47,7 +47,7 @@
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00049"></a>00049 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__libpath_8c.html
diff -u event/doc/html/event__attr__libpath_8c.html:1.16 event/doc/html/event__attr__libpath_8c.html:1.17
--- event/doc/html/event__attr__libpath_8c.html:1.16 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__attr__libpath_8c.html Fri Oct 7 20:51:57 2005
@@ -35,7 +35,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve and/or set default module search path. <a href="group__event.html#ga15"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:37 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:26 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__modlist_8c-source.html
diff -u event/doc/html/event__attr__modlist_8c-source.html:1.16 event/doc/html/event__attr__modlist_8c-source.html:1.17
--- event/doc/html/event__attr__modlist_8c-source.html:1.16 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__attr__modlist_8c-source.html Fri Oct 7 20:51:57 2005
@@ -47,7 +47,7 @@
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00049"></a>00049 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__modlist_8c.html
diff -u event/doc/html/event__attr__modlist_8c.html:1.16 event/doc/html/event__attr__modlist_8c.html:1.17
--- event/doc/html/event__attr__modlist_8c.html:1.16 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__attr__modlist_8c.html Fri Oct 7 20:51:57 2005
@@ -35,7 +35,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve and/or set default module list. <a href="group__event.html#ga16"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:37 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:27 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__destroy_8c-source.html
diff -u event/doc/html/event__destroy_8c-source.html:1.16 event/doc/html/event__destroy_8c-source.html:1.17
--- event/doc/html/event__destroy_8c-source.html:1.16 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__destroy_8c-source.html Fri Oct 7 20:51:57 2005
@@ -134,7 +134,7 @@
<a name="l00134"></a>00134
<a name="l00135"></a>00135 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* All done! */</span>
<a name="l00136"></a>00136 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__destroy_8c.html
diff -u event/doc/html/event__destroy_8c.html:1.16 event/doc/html/event__destroy_8c.html:1.17
--- event/doc/html/event__destroy_8c.html:1.16 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__destroy_8c.html Fri Oct 7 20:51:57 2005
@@ -38,7 +38,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Release memory used by events library context. <a href="group__event.html#ga12"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:37 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:28 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__gen__alloc_8c-source.html
diff -u event/doc/html/event__gen__alloc_8c-source.html:1.8 event/doc/html/event__gen__alloc_8c-source.html:1.9
--- event/doc/html/event__gen__alloc_8c-source.html:1.8 Thu Oct 6 20:53:04 2005
+++ event/doc/html/event__gen__alloc_8c-source.html Fri Oct 7 20:51:57 2005
@@ -72,7 +72,7 @@
<a name="l00072"></a>00072
<a name="l00073"></a>00073 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* all done! */</span>
<a name="l00074"></a>00074 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Oct 7 23:49:09 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__gen__alloc_8c.html
diff -u event/doc/html/event__...
[truncated message content] |
|
From: Kevin L. M. <kl...@us...> - 2005-10-08 03:48:38
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-10-08 03:48:31 UTC
Modified files:
ChangeLog Makefile.am sock.h
Added files:
sa_ipaddrbuf_set.c sa_ipaddrport_set.c sa_localaddr_set.c
sa_type_set.c
Log message:
implement the simple functions in the address manipulation suite
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.56 event/ChangeLog:1.57
--- event/ChangeLog:1.56 Thu Oct 6 20:49:59 2005
+++ event/ChangeLog Fri Oct 7 20:48:21 2005
@@ -1,3 +1,20 @@
+2005-10-07 Kevin L. Mitchell <kl...@mi...>
+
+ * sock.h: add \todo items so I don't forget what I still need to
+ do...
+
+ * sa_type_set.c: implement sa_type_set()
+
+ * sa_localaddr_set.c: implement sa_localaddr_set()
+
+ * sa_ipaddrport_set.c: implement sa_ipaddrport_set()
+
+ * sa_ipaddrbuf_set.c: implement sa_ipaddrbuf_set()
+
+ * Makefile.am (libevent_la_SOURCES): compile new sa_type_set.c,
+ sa_ipaddrbuf_set.c, sa_ipaddrport_set.c, and sa_localaddr_set.c
+ files
+
2005-10-06 Kevin L. Mitchell <kl...@mi...>
* sock.h: rename sa_ptoa() to sockaddr_ptoa(); rename sa_atop() to
Index: event/Makefile.am
diff -u event/Makefile.am:1.17 event/Makefile.am:1.18
--- event/Makefile.am:1.17 Thu Sep 15 11:14:11 2005
+++ event/Makefile.am Fri Oct 7 20:48:21 2005
@@ -16,7 +16,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
-## @(#)$Id: Makefile.am,v 1.17 2005/09/15 18:14:11 klmitch Exp $
+## @(#)$Id: Makefile.am,v 1.18 2005/10/08 03:48:21 klmitch Exp $
##
## Process this file with automake to generate Makefile.in
@@ -44,7 +44,9 @@
event_log.c \
_timer_heapify.c \
timer_create.c timer_resched.c timer_destroy.c \
- signal_create.c signal_destroy.c
+ signal_create.c signal_destroy.c \
+ sa_type_set.c sa_ipaddrbuf_set.c sa_ipaddrport_set.c \
+ sa_localaddr_set.c
libevent_la_LIBADD = @EVENT_ET_OBJS@ @TREECONF_LIBS@ @LIBLTDL@
libevent_la_DEPENDENCIES = @EVENT_ET_OBJS@
libevent_la_LDFLAGS = -version-info 0:0:0
Index: event/sa_ipaddrbuf_set.c
diff -u /dev/null event/sa_ipaddrbuf_set.c:1.6
--- /dev/null Fri Oct 7 20:48:31 2005
+++ event/sa_ipaddrbuf_set.c Fri Oct 7 20:48:21 2005
@@ -0,0 +1,45 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: sa_ipaddrbuf_set.c,v 1.6 2005/10/08 03:48:21 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Implementation of sa_ipaddrbuf_set().
+ *
+ * This file contains the implementation of the sa_ipaddrbuf_set()
+ * function.
+ */
+#include "event_int.h"
+
+#include <string.h>
+
+RCSTAG("@(#)$Id: sa_ipaddrbuf_set.c,v 1.6 2005/10/08 03:48:21 klmitch Exp $");
+
+ev_err_t
+sa_ipaddrbuf_set(ev_sockaddr_t *sa, const unsigned char *address)
+{
+ /* Double-check the input values... */
+ if (!sa || (sa->sa_type != AT_IPv6 && sa->sa_type != AT_IPv4) || !address)
+ ev_return(EINVAL);
+
+ /* Set the IP address... */
+ memcpy(sa->sa_addr.saa_ipaddr.saai_addrbuf, address,
+ (sa->sa_type == AT_IPv6 ? SOCK_ADDRBUFV6_LEN : SOCK_ADDRBUFV4_LEN));
+
+ ev_return(0);
+}
Index: event/sa_ipaddrport_set.c
diff -u /dev/null event/sa_ipaddrport_set.c:1.1
--- /dev/null Fri Oct 7 20:48:31 2005
+++ event/sa_ipaddrport_set.c Fri Oct 7 20:48:21 2005
@@ -0,0 +1,42 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: sa_ipaddrport_set.c,v 1.1 2005/10/08 03:48:21 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Implementation of sa_ipaddrport_set().
+ *
+ * This file contains the implementation of the sa_ipaddrport_set()
+ * function.
+ */
+#include "event_int.h"
+
+RCSTAG("@(#)$Id: sa_ipaddrport_set.c,v 1.1 2005/10/08 03:48:21 klmitch Exp $");
+
+ev_err_t
+sa_ipaddrport_set(ev_sockaddr_t *sa, unsigned short port)
+{
+ /* Double-check the input values... */
+ if (!sa || (sa->sa_type != AT_IPv6 && sa->sa_type != AT_IPv4))
+ ev_return(EINVAL);
+
+ /* Set the port number... */
+ sa->sa_addr.saa_ipaddr.saai_port = port;
+
+ ev_return(0);
+}
Index: event/sa_localaddr_set.c
diff -u /dev/null event/sa_localaddr_set.c:1.1
--- /dev/null Fri Oct 7 20:48:31 2005
+++ event/sa_localaddr_set.c Fri Oct 7 20:48:21 2005
@@ -0,0 +1,48 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: sa_localaddr_set.c,v 1.1 2005/10/08 03:48:21 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Implementation of sa_localaddr_set().
+ *
+ * This file contains the implementation of the sa_localaddr_set()
+ * function.
+ */
+#include "event_int.h"
+
+#include <string.h>
+
+RCSTAG("@(#)$Id: sa_localaddr_set.c,v 1.1 2005/10/08 03:48:21 klmitch Exp $");
+
+ev_err_t
+sa_localaddr_set(ev_sockaddr_t *sa, const char *address)
+{
+ /* Double-check the input values... */
+ if (!sa || sa->sa_type != AT_LOCAL || !address)
+ ev_return(EINVAL);
+
+ /* Double-check the address length... */
+ if (strlen(address) >= SOCK_LOCALADDR_LEN)
+ ev_return(EFBIG);
+
+ /* Set the local address... */
+ strcpy(sa->sa_addr.saa_localaddr, address);
+
+ ev_return(0);
+}
Index: event/sa_type_set.c
diff -u /dev/null event/sa_type_set.c:1.1
--- /dev/null Fri Oct 7 20:48:31 2005
+++ event/sa_type_set.c Fri Oct 7 20:48:21 2005
@@ -0,0 +1,42 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: sa_type_set.c,v 1.1 2005/10/08 03:48:21 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Implementation of sa_type_set().
+ *
+ * This file contains the implementation of the sa_type_set()
+ * function.
+ */
+#include "event_int.h"
+
+RCSTAG("@(#)$Id: sa_type_set.c,v 1.1 2005/10/08 03:48:21 klmitch Exp $");
+
+ev_err_t
+sa_type_set(ev_sockaddr_t *sa, ev_satype_t type)
+{
+ /* Double-check the input values... */
+ if (!sa || (type != AT_IPv6 && type != AT_IPv4 && type != AT_LOCAL &&
+ type != AT_NONE))
+ ev_return(EINVAL);
+
+ sa->sa_type = type; /* set the type... */
+
+ ev_return(0);
+}
Index: event/sock.h
diff -u event/sock.h:1.9 event/sock.h:1.10
--- event/sock.h:1.9 Thu Oct 6 20:49:59 2005
+++ event/sock.h Fri Oct 7 20:48:21 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sock.h,v 1.9 2005/10/07 03:49:59 klmitch Exp $
+** @(#)$Id: sock.h,v 1.10 2005/10/08 03:48:21 klmitch Exp $
*/
#ifndef __include_event_sock_h__
#define __include_event_sock_h__
@@ -317,6 +317,8 @@
* This function sets the type of the given #ev_sockaddr_t to the
* specified \p type.
*
+ * \todo Write test program.
+ *
* \param sa A pointer to an #ev_sockaddr_t.
* \param type One of the valid type values: #AT_IPv6, #AT_IPv4,
* #AT_LOCAL, or #AT_NONE.
@@ -333,6 +335,8 @@
* is determined by the type set on \p sa. This function is only
* valid for #AT_IPv6 and #AT_IPv4 addresses.
*
+ * \todo Write test program.
+ *
* \param sa A pointer to an #ev_sockaddr_t.
* \param address
* A pointer to <CODE>unsigned char</CODE> containing the
@@ -350,6 +354,8 @@
* #ev_sockaddr_t to \p port. This function is only valid for
* #AT_IPv6 and #AT_IPv4 addresses.
*
+ * \todo Write test program.
+ *
* \param sa A pointer to an #ev_sockaddr_t.
* \param port An <CODE>unsigned short</CODE> containing the port
* number (in host byte order).
@@ -365,12 +371,15 @@
* #ev_sockaddr_t to \p address. This function is only valid for
* #AT_LOCAL addresses.
*
+ * \todo Write test program.
+ *
* \param sa A pointer to an #ev_sockaddr_t.
* \param address
* A pointer to \c char designating the local domain
* address to set.
*
* \retval EINVAL An invalid argument was given.
+ * \retval EFBIG Address is too large.
*/
extern ev_err_t sa_localaddr_set(ev_sockaddr_t *sa, const char *address)
_gca_nonnull((1, 2));
@@ -380,6 +389,8 @@
* This function parses the string representation of the \p address to
* fill in an #ev_sockaddr_t.
*
+ * \todo Implement; write test program.
+ *
* \param sa A pointer to an #ev_sockaddr_t.
* \param address
* A pointer to \c char designating the presentation
@@ -400,6 +411,8 @@
* truncated so as to not overflow the buffer, and the terminating
* '\\0' will always be present.
*
+ * \todo Implement; write test program.
+ *
* \param sa A pointer to an #ev_sockaddr_t.
* \param buf The buffer to fill in with the presentation format of
* the address.
@@ -440,6 +453,8 @@
* This function fills in the \p sa socket address given a pointer to
* an initialized <CODE>struct sockaddr</CODE>.
*
+ * \todo Implement; write test program.
+ *
* \param sa A pointer to an #ev_sockaddr_t to be filled in.
* \param addr A pointer to <CODE>struct sockaddr</CODE> containing
* the address to be imported.
@@ -457,6 +472,8 @@
* This function fills in a <CODE>struct sockaddr</CODE> from the \p
* sa socket address.
*
+ * \todo Implement; write test program.
+ *
* \param sa A pointer to an #ev_sockaddr_t to be exported.
* \param addr A pointer to <CODE>struct sockaddr</CODE> to be filled
* in.
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-10-07 03:53:26
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-10-07 03:53:14 UTC
Modified files:
doc/event.doxytag doc/html/__ev__gen__lookup_8c-source.html
doc/html/__ev__gen__lookup_8c.html
doc/html/__timer__heapify_8c-source.html
doc/html/__timer__heapify_8c.html doc/html/annotated.html
doc/html/classes.html doc/html/confvar.html
doc/html/dir_000000.html doc/html/dirs.html
doc/html/engine__activate_8c-source.html
doc/html/engine__activate_8c.html
doc/html/engine__register_8c-source.html
doc/html/engine__register_8c.html doc/html/engines_8h-source.html
doc/html/engines_8h.html doc/html/engines__int_8h-source.html
doc/html/engines__int_8h.html doc/html/engmodinit_8c-source.html
doc/html/engmodinit_8c.html doc/html/engmodule_8c-source.html
doc/html/engmodule_8c.html doc/html/event-test_8h-source.html
doc/html/event-test_8h.html doc/html/event_8h-source.html
doc/html/event_8h.html
doc/html/event__attr__confpath_8c-source.html
doc/html/event__attr__confpath_8c.html
doc/html/event__attr__confreg_8c-source.html
doc/html/event__attr__confreg_8c.html
doc/html/event__attr__confvar_8c-source.html
doc/html/event__attr__confvar_8c.html
doc/html/event__attr__destroy_8c-source.html
doc/html/event__attr__destroy_8c.html
doc/html/event__attr__engine_8c-source.html
doc/html/event__attr__engine_8c.html
doc/html/event__attr__init_8c-source.html
doc/html/event__attr__init_8c.html
doc/html/event__attr__libpath_8c-source.html
doc/html/event__attr__libpath_8c.html
doc/html/event__attr__modlist_8c-source.html
doc/html/event__attr__modlist_8c.html
doc/html/event__destroy_8c-source.html
doc/html/event__destroy_8c.html
doc/html/event__gen__alloc_8c-source.html
doc/html/event__gen__alloc_8c.html
doc/html/event__gen__register_8c-source.html
doc/html/event__gen__register_8c.html
doc/html/event__gen__release_8c-source.html
doc/html/event__gen__release_8c.html
doc/html/event__init_8c-source.html doc/html/event__init_8c.html
doc/html/event__int_8h-source.html doc/html/event__int_8h.html
doc/html/event__log_8c-source.html doc/html/event__log_8c.html
doc/html/files.html doc/html/functions.html
doc/html/functions_vars.html doc/html/gcc-attrs_8h-source.html
doc/html/gcc-attrs_8h.html doc/html/globals.html
doc/html/globals_0x61.html doc/html/globals_0x63.html
doc/html/globals_0x64.html doc/html/globals_0x65.html
doc/html/globals_0x66.html doc/html/globals_0x67.html
doc/html/globals_0x68.html doc/html/globals_0x6c.html
doc/html/globals_0x6d.html doc/html/globals_0x6e.html
doc/html/globals_0x72.html doc/html/globals_0x73.html
doc/html/globals_0x74.html doc/html/globals_0x76.html
doc/html/globals_defs.html doc/html/globals_enum.html
doc/html/globals_eval.html doc/html/globals_func.html
doc/html/globals_type.html doc/html/globals_vars.html
doc/html/graph_legend.html doc/html/group__engines.html
doc/html/group__event.html doc/html/group__signal.html
doc/html/group__socket.html doc/html/group__timer.html
doc/html/index.html doc/html/modules.html doc/html/pages.html
doc/html/sig_8h-source.html doc/html/sig_8h.html
doc/html/signal__create_8c-source.html
doc/html/signal__create_8c.html
doc/html/signal__destroy_8c-source.html
doc/html/signal__destroy_8c.html doc/html/sock_8h-source.html
doc/html/sock_8h.html doc/html/struct__ev__attr__s.html
doc/html/struct__ev__ctx__s.html
doc/html/struct__ev__engine__s.html
doc/html/struct__ev__englink__s.html
doc/html/struct__ev__englist__s.html
doc/html/struct__ev__gendesc__s.html
doc/html/struct__ev__genhdr__s.html
doc/html/struct__ev__genlist__s.html
doc/html/struct__ev__gens__s.html
doc/html/struct__ev__overvars__s.html
doc/html/struct__ev__sig__s.html
doc/html/struct__ev__signals__s.html
doc/html/struct__ev__sock__s.html
doc/html/struct__ev__sockaddr__s.html
doc/html/struct__ev__sockets__s.html
doc/html/struct__ev__tim__s.html
doc/html/struct__ev__timers__s.html
doc/html/struct__ev__timnode__s.html
doc/html/struct__ev__varlist__s.html
doc/html/struct__event__s.html doc/html/structgenerator.html
doc/html/structrule.html doc/html/structt__gen.html
doc/html/structteng.html doc/html/structtest__resched.html
doc/html/structtest__timer.html
doc/html/t__event__attrs_8c-source.html
doc/html/t__event__attrs_8c.html
doc/html/t__event__init_8c-source.html
doc/html/t__event__init_8c.html
doc/html/t__event__log_8c-source.html
doc/html/t__event__log_8c.html
doc/html/t__evg__alloc_8c-source.html
doc/html/t__evg__alloc_8c.html
doc/html/t__evg__register_8c-source.html
doc/html/t__evg__register_8c.html
doc/html/t__signal__fcns_8c-source.html
doc/html/t__signal__fcns_8c.html
doc/html/t__timer__fcns_8c-source.html
doc/html/t__timer__fcns_8c.html doc/html/test.html
doc/html/tim_8h-source.html doc/html/tim_8h.html
doc/html/timer__create_8c-source.html
doc/html/timer__create_8c.html
doc/html/timer__destroy_8c-source.html
doc/html/timer__destroy_8c.html
doc/html/timer__resched_8c-source.html
doc/html/timer__resched_8c.html doc/latex/doxygen.sty
doc/latex/group__socket.tex doc/latex/refman.tex
doc/latex/sock_8h.tex doc/latex/struct__ev__sock__s.tex
doc/latex/struct__ev__sockaddr__s.tex doc/man/man3/_ev_attr_s.3
doc/man/man3/_ev_ctx_s.3 doc/man/man3/_ev_engine_s.3
doc/man/man3/_ev_englink_s.3 doc/man/man3/_ev_englist_s.3
doc/man/man3/_ev_gen_lookup.c.3 doc/man/man3/_ev_gendesc_s.3
doc/man/man3/_ev_genhdr_s.3 doc/man/man3/_ev_genlist_s.3
doc/man/man3/_ev_gens_s.3 doc/man/man3/_ev_overvars_s.3
doc/man/man3/_ev_sig_s.3 doc/man/man3/_ev_signals_s.3
doc/man/man3/_ev_sock_s.3 doc/man/man3/_ev_sockaddr_s.3
doc/man/man3/_ev_sockets_s.3 doc/man/man3/_ev_tim_s.3
doc/man/man3/_ev_timers_s.3 doc/man/man3/_ev_timnode_s.3
doc/man/man3/_ev_varlist_s.3 doc/man/man3/_event_s.3
doc/man/man3/_home_klmitch_devel_src_event_tests_.3
doc/man/man3/_timer_heapify.c.3 doc/man/man3/confvar.3
doc/man/man3/engine_activate.c.3 doc/man/man3/engine_register.c.3
doc/man/man3/engines.3 doc/man/man3/engines.h.3
doc/man/man3/engines_int.h.3 doc/man/man3/engmodinit.c.3
doc/man/man3/engmodule.c.3 doc/man/man3/event-test.h.3
doc/man/man3/event.3 doc/man/man3/event.h.3
doc/man/man3/event_attr_confpath.c.3
doc/man/man3/event_attr_confreg.c.3
doc/man/man3/event_attr_confvar.c.3
doc/man/man3/event_attr_destroy.c.3
doc/man/man3/event_attr_engine.c.3
doc/man/man3/event_attr_init.c.3
doc/man/man3/event_attr_libpath.c.3
doc/man/man3/event_attr_modlist.c.3
doc/man/man3/event_destroy.c.3 doc/man/man3/event_gen_alloc.c.3
doc/man/man3/event_gen_register.c.3
doc/man/man3/event_gen_release.c.3 doc/man/man3/event_init.c.3
doc/man/man3/event_int.h.3 doc/man/man3/event_log.c.3
doc/man/man3/gcc-attrs.h.3 doc/man/man3/generator.3
doc/man/man3/rule.3 doc/man/man3/sig.h.3 doc/man/man3/signal.3
doc/man/man3/signal_create.c.3 doc/man/man3/signal_destroy.c.3
doc/man/man3/sock.h.3 doc/man/man3/socket.3
doc/man/man3/t_event_attrs.c.3 doc/man/man3/t_event_init.c.3
doc/man/man3/t_event_log.c.3 doc/man/man3/t_evg_alloc.c.3
doc/man/man3/t_evg_register.c.3 doc/man/man3/t_gen.3
doc/man/man3/t_signal_fcns.c.3 doc/man/man3/t_timer_fcns.c.3
doc/man/man3/teng.3 doc/man/man3/test.3
doc/man/man3/test_resched.3 doc/man/man3/test_timer.3
doc/man/man3/tim.h.3 doc/man/man3/timer.3
doc/man/man3/timer_create.c.3 doc/man/man3/timer_destroy.c.3
doc/man/man3/timer_resched.c.3
Added files:
doc/man/man3/SOCKADDR_ATOP_NOADDR.3
doc/man/man3/SOCKADDR_ATOP_NOPORT.3 doc/man/man3/sockaddr_atop.3
doc/man/man3/sockaddr_export.3 doc/man/man3/sockaddr_import.3
doc/man/man3/sockaddr_ptoa.3
Log message:
doc update
---------------------- diff included ----------------------
Index: event/doc/event.doxytag
diff -u event/doc/event.doxytag:1.12 event/doc/event.doxytag:1.13
--- event/doc/event.doxytag:1.12 Sat Sep 17 17:18:53 2005
+++ event/doc/event.doxytag Thu Oct 6 20:53:03 2005
@@ -2086,121 +2086,135 @@
<type>#define</type>
<name>SOCK_ADDRBUFV4_LEN</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga7</anchor>
+ <anchor>ga11</anchor>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>SOCK_ADDRSTRV4_LEN</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga8</anchor>
+ <anchor>ga12</anchor>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>SOCK_ADDRBUFV6_LEN</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga9</anchor>
+ <anchor>ga13</anchor>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>SOCK_ADDRSTRV6_LEN</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga10</anchor>
+ <anchor>ga14</anchor>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>SOCK_LOCALADDR_LEN</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga11</anchor>
+ <anchor>ga15</anchor>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>sa_type</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga12</anchor>
+ <anchor>ga16</anchor>
<arglist>(sa)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>sa_ipaddrbuf</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga13</anchor>
+ <anchor>ga17</anchor>
<arglist>(sa)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>sa_ipaddrport</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga14</anchor>
+ <anchor>ga18</anchor>
<arglist>(sa)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>sa_localaddr</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga15</anchor>
+ <anchor>ga19</anchor>
<arglist>(sa)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>EV_SOCK_MAGIC</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga16</anchor>
+ <anchor>ga20</anchor>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>so_verify</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga17</anchor>
+ <anchor>ga21</anchor>
<arglist>(sock)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>so_type</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga18</anchor>
+ <anchor>ga22</anchor>
<arglist>(sock)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>so_state</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga19</anchor>
+ <anchor>ga23</anchor>
<arglist>(sock)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>so_sockname</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga20</anchor>
+ <anchor>ga24</anchor>
<arglist>(sock)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>so_peername</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga21</anchor>
+ <anchor>ga25</anchor>
<arglist>(sock)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>so_flags</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga22</anchor>
+ <anchor>ga26</anchor>
<arglist>(sock)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>so_fd</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga23</anchor>
+ <anchor>ga27</anchor>
<arglist>(sock)</arglist>
</member>
+ <member kind="define">
+ <type>#define</type>
+ <name>SOCKADDR_ATOP_NOADDR</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga28</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>SOCKADDR_ATOP_NOPORT</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga29</anchor>
+ <arglist></arglist>
+ </member>
<member kind="typedef">
<type>_ev_sockaddr_s</type>
<name>ev_sockaddr_t</name>
@@ -2224,82 +2238,82 @@
</member>
<member kind="enumeration">
<name>ev_socktype_t</name>
- <anchor>ga24</anchor>
+ <anchor>ga30</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>ST_STREAM</name>
- <anchor>gga24a20</anchor>
+ <anchor>gga30a22</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>ST_DGRAM</name>
- <anchor>gga24a21</anchor>
+ <anchor>gga30a23</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>ST_SEQPACKET</name>
- <anchor>gga24a22</anchor>
+ <anchor>gga30a24</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>ST_PIPE</name>
- <anchor>gga24a23</anchor>
+ <anchor>gga30a25</anchor>
<arglist></arglist>
</member>
<member kind="enumeration">
<name>ev_sockstate_t</name>
- <anchor>ga25</anchor>
+ <anchor>ga31</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>SS_CONNECTING</name>
- <anchor>gga25a24</anchor>
+ <anchor>gga31a26</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>SS_LISTENING</name>
- <anchor>gga25a25</anchor>
+ <anchor>gga31a27</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>SS_CONNECTED</name>
- <anchor>gga25a26</anchor>
+ <anchor>gga31a28</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>SS_UNCONNECTED</name>
- <anchor>gga25a27</anchor>
+ <anchor>gga31a29</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>SS_CLOSED</name>
- <anchor>gga25a28</anchor>
+ <anchor>gga31a30</anchor>
<arglist></arglist>
</member>
<member kind="enumeration">
<name>ev_satype_t</name>
- <anchor>ga26</anchor>
+ <anchor>ga32</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>AT_IPv6</name>
- <anchor>gga26a29</anchor>
+ <anchor>gga32a31</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>AT_IPv4</name>
- <anchor>gga26a30</anchor>
+ <anchor>gga32a32</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>AT_LOCAL</name>
- <anchor>gga26a31</anchor>
+ <anchor>gga32a33</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>AT_NONE</name>
- <anchor>gga26a32</anchor>
+ <anchor>gga32a34</anchor>
<arglist></arglist>
</member>
<member kind="function">
@@ -2330,6 +2344,34 @@
<anchor>ga6</anchor>
<arglist>(ev_sockaddr_t *sa, const char *address)</arglist>
</member>
+ <member kind="function">
+ <type>ev_err_t</type>
+ <name>sockaddr_ptoa</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga7</anchor>
+ <arglist>(ev_sockaddr_t *sa, const char *address, int alen)</arglist>
+ </member>
+ <member kind="function">
+ <type>ev_err_t</type>
+ <name>sockaddr_atop</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga8</anchor>
+ <arglist>(ev_sockaddr_t *sa, char *buf, int size, ev_flags_t flags)</arglist>
+ </member>
+ <member kind="function">
+ <type>ev_err_t</type>
+ <name>sockaddr_import</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga9</anchor>
+ <arglist>(ev_sockaddr_t *sa, const struct sockaddr *addr, int len)</arglist>
+ </member>
+ <member kind="function">
+ <type>ev_err_t</type>
+ <name>sockaddr_export</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga10</anchor>
+ <arglist>(ev_sockaddr_t *sa, struct sockaddr *addr, int *len)</arglist>
+ </member>
</compound>
<compound kind="file">
<name>t_event_attrs.c</name>
@@ -5063,121 +5105,135 @@
<type>#define</type>
<name>SOCK_ADDRBUFV4_LEN</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga7</anchor>
+ <anchor>ga11</anchor>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>SOCK_ADDRSTRV4_LEN</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga8</anchor>
+ <anchor>ga12</anchor>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>SOCK_ADDRBUFV6_LEN</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga9</anchor>
+ <anchor>ga13</anchor>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>SOCK_ADDRSTRV6_LEN</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga10</anchor>
+ <anchor>ga14</anchor>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>SOCK_LOCALADDR_LEN</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga11</anchor>
+ <anchor>ga15</anchor>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>sa_type</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga12</anchor>
+ <anchor>ga16</anchor>
<arglist>(sa)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>sa_ipaddrbuf</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga13</anchor>
+ <anchor>ga17</anchor>
<arglist>(sa)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>sa_ipaddrport</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga14</anchor>
+ <anchor>ga18</anchor>
<arglist>(sa)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>sa_localaddr</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga15</anchor>
+ <anchor>ga19</anchor>
<arglist>(sa)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>EV_SOCK_MAGIC</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga16</anchor>
+ <anchor>ga20</anchor>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>so_verify</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga17</anchor>
+ <anchor>ga21</anchor>
<arglist>(sock)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>so_type</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga18</anchor>
+ <anchor>ga22</anchor>
<arglist>(sock)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>so_state</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga19</anchor>
+ <anchor>ga23</anchor>
<arglist>(sock)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>so_sockname</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga20</anchor>
+ <anchor>ga24</anchor>
<arglist>(sock)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>so_peername</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga21</anchor>
+ <anchor>ga25</anchor>
<arglist>(sock)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>so_flags</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga22</anchor>
+ <anchor>ga26</anchor>
<arglist>(sock)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>so_fd</name>
<anchorfile>group__socket.html</anchorfile>
- <anchor>ga23</anchor>
+ <anchor>ga27</anchor>
<arglist>(sock)</arglist>
</member>
+ <member kind="define">
+ <type>#define</type>
+ <name>SOCKADDR_ATOP_NOADDR</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga28</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="define">
+ <type>#define</type>
+ <name>SOCKADDR_ATOP_NOPORT</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga29</anchor>
+ <arglist></arglist>
+ </member>
<member kind="typedef">
<type>_ev_sockaddr_s</type>
<name>ev_sockaddr_t</name>
@@ -5201,82 +5257,82 @@
</member>
<member kind="enumeration">
<name>ev_socktype_t</name>
- <anchor>ga24</anchor>
+ <anchor>ga30</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>ST_STREAM</name>
- <anchor>gga24a20</anchor>
+ <anchor>gga30a22</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>ST_DGRAM</name>
- <anchor>gga24a21</anchor>
+ <anchor>gga30a23</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>ST_SEQPACKET</name>
- <anchor>gga24a22</anchor>
+ <anchor>gga30a24</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>ST_PIPE</name>
- <anchor>gga24a23</anchor>
+ <anchor>gga30a25</anchor>
<arglist></arglist>
</member>
<member kind="enumeration">
<name>ev_sockstate_t</name>
- <anchor>ga25</anchor>
+ <anchor>ga31</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>SS_CONNECTING</name>
- <anchor>gga25a24</anchor>
+ <anchor>gga31a26</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>SS_LISTENING</name>
- <anchor>gga25a25</anchor>
+ <anchor>gga31a27</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>SS_CONNECTED</name>
- <anchor>gga25a26</anchor>
+ <anchor>gga31a28</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>SS_UNCONNECTED</name>
- <anchor>gga25a27</anchor>
+ <anchor>gga31a29</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>SS_CLOSED</name>
- <anchor>gga25a28</anchor>
+ <anchor>gga31a30</anchor>
<arglist></arglist>
</member>
<member kind="enumeration">
<name>ev_satype_t</name>
- <anchor>ga26</anchor>
+ <anchor>ga32</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>AT_IPv6</name>
- <anchor>gga26a29</anchor>
+ <anchor>gga32a31</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>AT_IPv4</name>
- <anchor>gga26a30</anchor>
+ <anchor>gga32a32</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>AT_LOCAL</name>
- <anchor>gga26a31</anchor>
+ <anchor>gga32a33</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>AT_NONE</name>
- <anchor>gga26a32</anchor>
+ <anchor>gga32a34</anchor>
<arglist></arglist>
</member>
<member kind="function">
@@ -5307,6 +5363,34 @@
<anchor>ga6</anchor>
<arglist>(ev_sockaddr_t *sa, const char *address)</arglist>
</member>
+ <member kind="function">
+ <type>ev_err_t</type>
+ <name>sockaddr_ptoa</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga7</anchor>
+ <arglist>(ev_sockaddr_t *sa, const char *address, int alen)</arglist>
+ </member>
+ <member kind="function">
+ <type>ev_err_t</type>
+ <name>sockaddr_atop</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga8</anchor>
+ <arglist>(ev_sockaddr_t *sa, char *buf, int size, ev_flags_t flags)</arglist>
+ </member>
+ <member kind="function">
+ <type>ev_err_t</type>
+ <name>sockaddr_import</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga9</anchor>
+ <arglist>(ev_sockaddr_t *sa, const struct sockaddr *addr, int len)</arglist>
+ </member>
+ <member kind="function">
+ <type>ev_err_t</type>
+ <name>sockaddr_export</name>
+ <anchorfile>group__socket.html</anchorfile>
+ <anchor>ga10</anchor>
+ <arglist>(ev_sockaddr_t *sa, struct sockaddr *addr, int *len)</arglist>
+ </member>
</compound>
<compound kind="group">
<name>timer</name>
Index: event/doc/html/__ev__gen__lookup_8c-source.html
diff -u event/doc/html/__ev__gen__lookup_8c-source.html:1.7 event/doc/html/__ev__gen__lookup_8c-source.html:1.8
--- event/doc/html/__ev__gen__lookup_8c-source.html:1.7 Sat Sep 17 17:18:53 2005
+++ event/doc/html/__ev__gen__lookup_8c-source.html Thu Oct 6 20:53:03 2005
@@ -52,7 +52,7 @@
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <a class="code" href="event__int_8h.html#a25">ev_return</a>(ENOENT); <span class="comment">/* failed to find the entry... */</span>
<a name="l00055"></a>00055 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__ev__gen__lookup_8c.html
diff -u event/doc/html/__ev__gen__lookup_8c.html:1.7 event/doc/html/__ev__gen__lookup_8c.html:1.8
--- event/doc/html/__ev__gen__lookup_8c.html:1.7 Sat Sep 17 17:18:53 2005
+++ event/doc/html/__ev__gen__lookup_8c.html Thu Oct 6 20:53:03 2005
@@ -101,7 +101,7 @@
Referenced by <a class="el" href="event__gen__alloc_8c-source.html#l00032">event_gen_alloc()</a>, <a class="el" href="event__gen__release_8c-source.html#l00032">event_gen_release()</a>, and <a class="el" href="t__evg__alloc_8c-source.html#l00068">main()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:21 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:31 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__timer__heapify_8c-source.html
diff -u event/doc/html/__timer__heapify_8c-source.html:1.5 event/doc/html/__timer__heapify_8c-source.html:1.6
--- event/doc/html/__timer__heapify_8c-source.html:1.5 Sat Sep 17 17:18:53 2005
+++ event/doc/html/__timer__heapify_8c-source.html Thu Oct 6 20:53:03 2005
@@ -131,7 +131,7 @@
<a name="l00146"></a>00146
<a name="l00147"></a>00147 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00148"></a>00148 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__timer__heapify_8c.html
diff -u event/doc/html/__timer__heapify_8c.html:1.5 event/doc/html/__timer__heapify_8c.html:1.6
--- event/doc/html/__timer__heapify_8c.html:1.5 Sat Sep 17 17:18:53 2005
+++ event/doc/html/__timer__heapify_8c.html Thu Oct 6 20:53:03 2005
@@ -218,7 +218,7 @@
Referenced by <a class="el" href="__timer__heapify_8c-source.html#l00121">_timer_heapify_down()</a>, and <a class="el" href="__timer__heapify_8c-source.html#l00105">_timer_heapify_up()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:22 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:31 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/annotated.html
diff -u event/doc/html/annotated.html:1.15 event/doc/html/annotated.html:1.16
--- event/doc/html/annotated.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/annotated.html Thu Oct 6 20:53:03 2005
@@ -33,7 +33,7 @@
<tr><td class="indexkey"><a class="el" href="structtest__resched.html">test_resched</a></td><td class="indexvalue">Structure for defining a timer rescheduling to perform </td></tr>
<tr><td class="indexkey"><a class="el" href="structtest__timer.html">test_timer</a></td><td class="indexvalue">Structure for defining a timer to create </td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:16:04 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:48 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/classes.html
diff -u event/doc/html/classes.html:1.15 event/doc/html/classes.html:1.16
--- event/doc/html/classes.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/classes.html Thu Oct 6 20:53:03 2005
@@ -12,7 +12,7 @@
</td></tr><tr><td><a class="el" href="struct__ev__ctx__s.html">_ev_ctx_s</a> </td><td><a class="el" href="struct__ev__genlist__s.html">_ev_genlist_s</a> </td><td><a class="el" href="struct__ev__sockaddr__s.html">_ev_sockaddr_s</a> </td><td><a class="el" href="struct__event__s.html">_event_s</a> </td><td><a class="el" href="structt__gen.html">t_gen</a> </td></tr><tr><td><a class="el" href="struct__ev__engine__s.html">_ev_engine_s</a> </td><td><a class="el" href="struct__ev__gens__s.html">_ev_gens_s</a> </td><td><a class="el" href="struct__ev__sockets__s.html">_ev_sockets_s</a> </td><td><a name="letter_G"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> G </div></td></tr></table>
</td><td><a class="el" href="structteng.html">teng</a> </td></tr><tr><td><a class="el" href="struct__ev__englink__s.html">_ev_englink_s</a> </td><td><a class="el" href="struct__ev__overvars__s.html">_ev_overvars_s</a> </td><td><a class="el" href="struct__ev__tim__s.html">_ev_tim_s</a> </td><td><a class="el" href="structgenerator.html">generator</a> </td><td><a class="el" href="structtest__resched.html">test_resched</a> </td></tr><tr><td><a class="el" href="struct__ev__englist__s.html">_ev_englist_s</a> </td><td><a class="el" href="struct__ev__sig__s.html">_ev_sig_s</a> </td><td><a class="el" href="struct__ev__timers__s.html">_ev_timers_s</a> </td><td><a name="letter_R"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> R </div></td></tr></table>
</td><td><a class="el" href="structtest__timer.html">test_timer</a> </td></tr></table><p><div class="qindex"><a class="qindex" href="#letter__">_</a> | <a class="qindex" href="#letter_G">G</a> | <a class="qindex" href="#letter_R">R</a> | <a class="qindex" href="#letter_T">T</a></div><p>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:16:04 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:48 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/confvar.html
diff -u event/doc/html/confvar.html:1.15 event/doc/html/confvar.html:1.16
--- event/doc/html/confvar.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/confvar.html Thu Oct 6 20:53:03 2005
@@ -21,7 +21,7 @@
The <a class="el" href="group__event.html#ga11">event_init()</a> function uses the <a class="elRef" doxygen="treeconf.doxytag:http://libevent.sourceforge.net/treeconf/" href="http://libevent.sourceforge.net/treeconf/group__treeconf.html#gga8">tc_path()</a> function to load the configuration from all the files listed in the <code>envpath</code> argument, which is presumed to be passed in by the application from the environment. If the <code>envpath</code> contains an empty field (i.e., "::"), envpath is passed as <code>NULL</code>, or the <a class="el" href="group__event.html#ga61">EV_INIT_SECURE</a> flag is passed to <a class="el" href="group__event.html#ga11">event_init()</a>, then a default path will be searched. Note that the <a class="el" href="group__event.html#ga61">EV_INIT_SECURE</a> flag will also cause files containing the <code>%n</code> or <code>~</code> expandos to be skipped for security reasons.<p>
In addition to the <code>~</code> expandos (<code>~</code> expands to the current user's home directory; <code>~user</code> expands to the home directory of <code>user</code>), the library also defines the <code>%n</code> and <code>%p</code> expandos, which expand to the user name and the application name, respectively. (The application name is passed as the <code>prog</code> argument to the <a class="el" href="group__event.html#ga11">event_init()</a> function. If <code>NULL</code> is passed for <code>prog</code>, file names containing the <code>%p</code> expando will be omitted.)<p>
By default, the default search path contains <code>"event.tc"</code> from the system package configuration directory (often <code>/usr/local/etc/event</code>); <code>".event.tc"</code> from the user's home directory; <code>"%p.tc"</code> from the system configuration directory; and <code>".%p.tc"</code> from the user's home directory. This default may be overridden by passing <a class="el" href="group__event.html#ga11">event_init()</a> an <a class="el" href="group__event.html#ga2">ev_attr_t</a> object which has been modified by a call to <a class="el" href="group__event.html#ga14">event_attr_confpath()</a>.<p>
-Any variables passed in an <a class="el" href="group__event.html#ga2">ev_attr_t</a> (modified by a call to the <a class="el" href="group__event.html#ga18">event_attr_confvar()</a> function) will override any values found in any of the configuration files loaded by <a class="el" href="group__event.html#ga11">event_init()</a>. <hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:16:19 2005 for event by
+Any variables passed in an <a class="el" href="group__event.html#ga2">ev_attr_t</a> (modified by a call to the <a class="el" href="group__event.html#ga18">event_attr_confvar()</a> function) will override any values found in any of the configuration files loaded by <a class="el" href="group__event.html#ga11">event_init()</a>. <hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:54 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/dir_000000.html
diff -u event/doc/html/dir_000000.html:1.15 event/doc/html/dir_000000.html:1.16
--- event/doc/html/dir_000000.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/dir_000000.html Thu Oct 6 20:53:03 2005
@@ -73,7 +73,7 @@
<p>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:16:23 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:56 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/dirs.html
diff -u event/doc/html/dirs.html:1.15 event/doc/html/dirs.html:1.16
--- event/doc/html/dirs.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/dirs.html Thu Oct 6 20:53:03 2005
@@ -8,7 +8,7 @@
<h1>event Directories</h1>This directory hierarchy is sorted roughly, but not completely, alphabetically:<ul>
<li><a class="el" href="dir_000000.html">tests</a>
</ul>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:16:23 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:56 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__activate_8c-source.html
diff -u event/doc/html/engine__activate_8c-source.html:1.9 event/doc/html/engine__activate_8c-source.html:1.10
--- event/doc/html/engine__activate_8c-source.html:1.9 Sat Sep 17 17:18:53 2005
+++ event/doc/html/engine__activate_8c-source.html Thu Oct 6 20:53:03 2005
@@ -74,7 +74,7 @@
<a name="l00086"></a>00086
<a name="l00087"></a>00087 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* all done! */</span>
<a name="l00088"></a>00088 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__activate_8c.html
diff -u event/doc/html/engine__activate_8c.html:1.9 event/doc/html/engine__activate_8c.html:1.10
--- event/doc/html/engine__activate_8c.html:1.9 Sat Sep 17 17:18:53 2005
+++ event/doc/html/engine__activate_8c.html Thu Oct 6 20:53:03 2005
@@ -91,7 +91,7 @@
Referenced by <a class="el" href="engine__activate_8c-source.html#l00063">engine_activate()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:23 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:32 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__register_8c-source.html
diff -u event/doc/html/engine__register_8c-source.html:1.12 event/doc/html/engine__register_8c-source.html:1.13
--- event/doc/html/engine__register_8c-source.html:1.12 Sat Sep 17 17:18:53 2005
+++ event/doc/html/engine__register_8c-source.html Thu Oct 6 20:53:03 2005
@@ -95,7 +95,7 @@
<a name="l00095"></a>00095
<a name="l00096"></a>00096 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00097"></a>00097 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__register_8c.html
diff -u event/doc/html/engine__register_8c.html:1.12 event/doc/html/engine__register_8c.html:1.13
--- event/doc/html/engine__register_8c.html:1.12 Sat Sep 17 17:18:53 2005
+++ event/doc/html/engine__register_8c.html Thu Oct 6 20:53:03 2005
@@ -38,7 +38,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register an engine. <a href="group__engines.html#ga18"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:24 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:32 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines_8h-source.html
diff -u event/doc/html/engines_8h-source.html:1.15 event/doc/html/engines_8h-source.html:1.16
--- event/doc/html/engines_8h-source.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/engines_8h-source.html Thu Oct 6 20:53:03 2005
@@ -212,7 +212,7 @@
<a name="l00769"></a>00769 <a class="code" href="event_8h.html#a1">EV_END_C_DECLS</a>
<a name="l00770"></a>00770
<a name="l00773"></a>00773 <span class="preprocessor">#endif </span><span class="comment">/* __include_event_engines_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines_8h.html
diff -u event/doc/html/engines_8h.html:1.15 event/doc/html/engines_8h.html:1.16
--- event/doc/html/engines_8h.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/engines_8h.html Thu Oct 6 20:53:03 2005
@@ -210,7 +210,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Engine module descriptor. <a href="group__engines.html#ga0"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:25 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:32 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines__int_8h-source.html
diff -u event/doc/html/engines__int_8h-source.html:1.15 event/doc/html/engines__int_8h-source.html:1.16
--- event/doc/html/engines__int_8h-source.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/engines__int_8h-source.html Thu Oct 6 20:53:03 2005
@@ -76,7 +76,7 @@
<a name="l00234"></a>00234 <span class="preprocessor">} while (0)</span>
<a name="l00235"></a>00235 <span class="preprocessor"></span>
<a name="l00236"></a>00236 <span class="preprocessor">#endif </span><span class="comment">/* __include_engine_int_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engines__int_8h.html
diff -u event/doc/html/engines__int_8h.html:1.15 event/doc/html/engines__int_8h.html:1.16
--- event/doc/html/engines__int_8h.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/engines__int_8h.html Thu Oct 6 20:53:03 2005
@@ -628,7 +628,7 @@
Referenced by <a class="el" href="engine__register_8c-source.html#l00034">engine_register()</a>, and <a class="el" href="event__init_8c-source.html#l00326">event_init()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:26 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:33 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodinit_8c-source.html
diff -u event/doc/html/engmodinit_8c-source.html:1.8 event/doc/html/engmodinit_8c-source.html:1.9
--- event/doc/html/engmodinit_8c-source.html:1.8 Sat Sep 17 17:18:53 2005
+++ event/doc/html/engmodinit_8c-source.html Thu Oct 6 20:53:03 2005
@@ -85,7 +85,7 @@
<a name="l00177"></a>00177
<a name="l00178"></a>00178 <span class="keywordflow">return</span> &engine;
<a name="l00179"></a>00179 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodinit_8c.html
diff -u event/doc/html/engmodinit_8c.html:1.8 event/doc/html/engmodinit_8c.html:1.9
--- event/doc/html/engmodinit_8c.html:1.8 Sat Sep 17 17:18:53 2005
+++ event/doc/html/engmodinit_8c.html Thu Oct 6 20:53:03 2005
@@ -479,7 +479,7 @@
Referenced by <a class="el" href="t__event__init_8c-source.html#l00277">main()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:27 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:33 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodule_8c-source.html
diff -u event/doc/html/engmodule_8c-source.html:1.8 event/doc/html/engmodule_8c-source.html:1.9
--- event/doc/html/engmodule_8c-source.html:1.8 Sat Sep 17 17:18:53 2005
+++ event/doc/html/engmodule_8c-source.html Thu Oct 6 20:53:03 2005
@@ -75,7 +75,7 @@
<a name="l00161"></a>00161 <a class="code" href="engmodule_8c.html#a4">em_sock</a>, <a class="code" href="engmodule_8c.html#a4">em_sock</a>, <a class="code" href="engmodule_8c.html#a5">em_sockev</a>,
<a name="l00162"></a>00162 <a class="code" href="engmodule_8c.html#a6">em_sig</a>, <a class="code" href="engmodule_8c.html#a6">em_sig</a>,
<a name="l00163"></a>00163 <a class="code" href="engmodule_8c.html#a7">em_tim</a>, <a class="code" href="engmodule_8c.html#a7">em_tim</a>);
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engmodule_8c.html
diff -u event/doc/html/engmodule_8c.html:1.8 event/doc/html/engmodule_8c.html:1.9
--- event/doc/html/engmodule_8c.html:1.8 Sat Sep 17 17:18:53 2005
+++ event/doc/html/engmodule_8c.html Thu Oct 6 20:53:03 2005
@@ -445,7 +445,7 @@
Definition at line <a class="el" href="engmodule_8c-source.html#l00150">150</a> of file <a class="el" href="engmodule_8c-source.html">engmodule.c</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:28 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:34 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event-test_8h-source.html
diff -u event/doc/html/event-test_8h-source.html:1.15 event/doc/html/event-test_8h-source.html:1.16
--- event/doc/html/event-test_8h-source.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/event-test_8h-source.html Thu Oct 6 20:53:03 2005
@@ -82,7 +82,7 @@
<a name="l00123"></a>00123 } while (0)
<a name="l00124"></a>00124
<a name="l00125"></a>00125 <span class="preprocessor">#endif </span><span class="comment">/* __event_test_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event-test_8h.html
diff -u event/doc/html/event-test_8h.html:1.15 event/doc/html/event-test_8h.html:1.16
--- event/doc/html/event-test_8h.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/event-test_8h.html Thu Oct 6 20:53:03 2005
@@ -198,7 +198,7 @@
Referenced by <a class="el" href="t__event__attrs_8c-source.html#l00043">main()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:29 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:34 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event_8h-source.html
diff -u event/doc/html/event_8h-source.html:1.15 event/doc/html/event_8h-source.html:1.16
--- event/doc/html/event_8h-source.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/event_8h-source.html Thu Oct 6 20:53:03 2005
@@ -289,7 +289,7 @@
<a name="l01183"></a>01183 <a class="code" href="event_8h.html#a1">EV_END_C_DECLS</a>
<a name="l01184"></a>01184
<a name="l01187"></a>01187 #endif <span class="comment">/* __include_event_event_h__ */</span>
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event_8h.html
diff -u event/doc/html/event_8h.html:1.15 event/doc/html/event_8h.html:1.16
--- event/doc/html/event_8h.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/event_8h.html Thu Oct 6 20:53:03 2005
@@ -355,7 +355,7 @@
Definition at line <a class="el" href="event_8h-source.html#l00166">166</a> of file <a class="el" href="event_8h-source.html">event.h</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:30 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:35 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confpath_8c-source.html
diff -u event/doc/html/event__attr__confpath_8c-source.html:1.15 event/doc/html/event__attr__confpath_8c-source.html:1.16
--- event/doc/html/event__attr__confpath_8c-source.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/event__attr__confpath_8c-source.html Thu Oct 6 20:53:03 2005
@@ -47,7 +47,7 @@
<a name="l00047"></a>00047
<a name="l00048"></a>00048 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00049"></a>00049 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confpath_8c.html
diff -u event/doc/html/event__attr__confpath_8c.html:1.15 event/doc/html/event__attr__confpath_8c.html:1.16
--- event/doc/html/event__attr__confpath_8c.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/event__attr__confpath_8c.html Thu Oct 6 20:53:03 2005
@@ -35,7 +35,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Retrieve and/or set default configuration search path. <a href="group__event.html#ga14"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:31 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:35 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confreg_8c-source.html
diff -u event/doc/html/event__attr__confreg_8c-source.html:1.14 event/doc/html/event__attr__confreg_8c-source.html:1.15
--- event/doc/html/event__attr__confreg_8c-source.html:1.14 Sat Sep 17 17:18:53 2005
+++ event/doc/html/event__attr__confreg_8c-source.html Thu Oct 6 20:53:03 2005
@@ -74,7 +74,7 @@
<a name="l00074"></a>00074
<a name="l00075"></a>00075 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00076"></a>00076 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confreg_8c.html
diff -u event/doc/html/event__attr__confreg_8c.html:1.14 event/doc/html/event__attr__confreg_8c.html:1.15
--- event/doc/html/event__attr__confreg_8c.html:1.14 Sat Sep 17 17:18:53 2005
+++ event/doc/html/event__attr__confreg_8c.html Thu Oct 6 20:53:03 2005
@@ -37,7 +37,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register a treeconf variable for the application. <a href="group__event.html#ga17"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:32 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:35 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confvar_8c-source.html
diff -u event/doc/html/event__attr__confvar_8c-source.html:1.14 event/doc/html/event__attr__confvar_8c-source.html:1.15
--- event/doc/html/event__attr__confvar_8c-source.html:1.14 Sat Sep 17 17:18:53 2005
+++ event/doc/html/event__attr__confvar_8c-source.html Thu Oct 6 20:53:04 2005
@@ -79,7 +79,7 @@
<a name="l00079"></a>00079
<a name="l00080"></a>00080 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00081"></a>00081 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__confvar_8c.html
diff -u event/doc/html/event__attr__confvar_8c.html:1.14 event/doc/html/event__attr__confvar_8c.html:1.15
--- event/doc/html/event__attr__confvar_8c.html:1.14 Sat Sep 17 17:18:53 2005
+++ event/doc/html/event__attr__confvar_8c.html Thu Oct 6 20:53:04 2005
@@ -37,7 +37,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Override a treeconf variable setting. <a href="group__event.html#ga18"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:33 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:36 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__destroy_8c-source.html
diff -u event/doc/html/event__attr__destroy_8c-source.html:1.15 event/doc/html/event__attr__destroy_8c-source.html:1.16
--- event/doc/html/event__attr__destroy_8c-source.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/event__attr__destroy_8c-source.html Thu Oct 6 20:53:04 2005
@@ -61,7 +61,7 @@
<a name="l00062"></a>00062
<a name="l00063"></a>00063 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* all done! */</span>
<a name="l00064"></a>00064 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__destroy_8c.html
diff -u event/doc/html/event__attr__destroy_8c.html:1.15 event/doc/html/event__attr__destroy_8c.html:1.16
--- event/doc/html/event__attr__destroy_8c.html:1.15 Sat Sep 17 17:18:53 2005
+++ event/doc/html/event__attr__destroy_8c.html Thu Oct 6 20:53:04 2005
@@ -36,7 +36,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy an attribute set and release all allocated memory. <a href="group__event.html#ga19"></a><br></td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:33 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:36 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__engine_8c-source.html
diff -u event/doc/html/event__attr__engine_8c-source.html:1.10 event/doc/html/event__attr__engine_8c-source.html:1.11
--- event/doc/html/event__attr__engine_8c-source.html:1.10 Sat Sep 17 17:18:53 2005
+++ event/doc/html/event__attr__engine_8c-source.html Thu Oct 6 20:53:04 2005
@@ -79,7 +79,7 @@
<a name="l00079"></a>00079
<a name="l00080"></a>00080 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00081"></a>00081 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sat Sep 17 20:15:20 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Oct 6 23:51:30 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/event__attr__engine_8c.html
diff -u event/doc/html/event__attr__engine_8c.html:1.10 event/doc/html/event__attr__engine_8c.html:1.11
--- event/doc/html/event__attr__engine_8c.html:1.10 Sat Sep 17 17:18:53 2005
+++ event/doc/html/event__attr__engine_8c.html Thu Oct 6 20:53:04 2005
@@ -39,7 +39,7 @@
<tr><td class="mdescLeft"> </td><td class="mdescRight">Register an application-specific engine. <a href="group__engines.html#ga20"></a><br></td></tr>
</table>
-<hr...
[truncated message content] |
|
From: Kevin L. M. <kl...@us...> - 2005-10-07 03:50:16
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-10-07 03:50:09 UTC
Modified files:
ChangeLog sock.h
Log message:
fix minor typo
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.55 event/ChangeLog:1.56
--- event/ChangeLog:1.55 Thu Oct 6 20:46:51 2005
+++ event/ChangeLog Thu Oct 6 20:49:59 2005
@@ -4,6 +4,7 @@
sockaddr_atop() and add flags parameter; define
SOCKADDR_ATOP_NOPORT and SOCKADDR_ATOP_NOADDR; declare and
document sockaddr_import() and sockaddr_export()
+ fix minor typo
2005-09-29 Kevin L. Mitchell <kl...@mi...>
Index: event/sock.h
diff -u event/sock.h:1.8 event/sock.h:1.9
--- event/sock.h:1.8 Thu Oct 6 20:46:52 2005
+++ event/sock.h Thu Oct 6 20:49:59 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sock.h,v 1.8 2005/10/07 03:46:52 klmitch Exp $
+** @(#)$Id: sock.h,v 1.9 2005/10/07 03:49:59 klmitch Exp $
*/
#ifndef __include_event_sock_h__
#define __include_event_sock_h__
@@ -413,7 +413,7 @@
*
* \retval EINVAL An invalid argument was given.
*/
-extern ev_err_t sockaddr_atop(ev_sockaddr_t *sa, char *buf, int size
+extern ev_err_t sockaddr_atop(ev_sockaddr_t *sa, char *buf, int size,
ev_flags_t flags)
_gca_nonnull((1, 2));
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-10-07 03:47:10
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-10-07 03:47:04 UTC
Modified files:
ChangeLog sock.h
Log message:
finish fleshing out the socket _address_ interface (I hope); next on the
agenda: write the functions and associated test suite, then move on to the
actual socket interface...
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.54 event/ChangeLog:1.55
--- event/ChangeLog:1.54 Thu Sep 29 20:46:22 2005
+++ event/ChangeLog Thu Oct 6 20:46:51 2005
@@ -1,3 +1,10 @@
+2005-10-06 Kevin L. Mitchell <kl...@mi...>
+
+ * sock.h: rename sa_ptoa() to sockaddr_ptoa(); rename sa_atop() to
+ sockaddr_atop() and add flags parameter; define
+ SOCKADDR_ATOP_NOPORT and SOCKADDR_ATOP_NOADDR; declare and
+ document sockaddr_import() and sockaddr_export()
+
2005-09-29 Kevin L. Mitchell <kl...@mi...>
* sock.h: add declarations and documentation for sa_ptoa() and
Index: event/sock.h
diff -u event/sock.h:1.7 event/sock.h:1.8
--- event/sock.h:1.7 Thu Sep 29 20:46:22 2005
+++ event/sock.h Thu Oct 6 20:46:52 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sock.h,v 1.7 2005/09/30 03:46:22 klmitch Exp $
+** @(#)$Id: sock.h,v 1.8 2005/10/07 03:46:52 klmitch Exp $
*/
#ifndef __include_event_sock_h__
#define __include_event_sock_h__
@@ -387,10 +387,10 @@
* \param alen The length of the presentation format of the address.
* If 0, the string will be assumed to end with '\\0'.
*
- * \retval EINVAL An invalid argument was given.
+ * \retval EINVAL An invalid argument was given.
* XXX more retvals here
*/
-extern ev_err_t sa_ptoa(ev_sockaddr_t *sa, const char *address, int alen)
+extern ev_err_t sockaddr_ptoa(ev_sockaddr_t *sa, const char *address, int alen)
_gca_nonnull((1, 2));
/** \brief Build presentation format of an #ev_sockaddr_t.
@@ -404,12 +404,75 @@
* \param buf The buffer to fill in with the presentation format of
* the address.
* \param size The size of the buffer.
+ * \param flags Flags to indicate which components of the address to
+ * omit; pass 0 to include all components of the
+ * address. To omit the port, use the
+ * #SOCKADDR_ATOP_NOPORT flag; to omit the address (but
+ * why?), use the #SOCKADDR_ATOP_NOADDR flag. Note that
+ * these flags have no meaning for #AT_LOCAL addresses.
*
- * \retval EINVAL An invalid argument was given.
+ * \retval EINVAL An invalid argument was given.
*/
-extern ev_err_t sa_atop(ev_sockaddr_t *sa, char *buf, int size)
+extern ev_err_t sockaddr_atop(ev_sockaddr_t *sa, char *buf, int size
+ ev_flags_t flags)
_gca_nonnull((1, 2));
+/** \brief Omit address from presentation format.
+ *
+ * This flag is used to signal to the sockaddr_atop() function that
+ * the caller does not want the address. It is provided for
+ * completeness; the only result would be the port number, which is
+ * already easily accessible, would be formatted into the \p buf
+ * parameter of sockaddr_atop().
+ */
+#define SOCKADDR_ATOP_NOADDR 0x0001
+
+/** \brief Omit port from presentation format.
+ *
+ * This flag is used to signal to the sockaddr_atop() function that
+ * the caller does not want the port.
+ */
+#define SOCKADDR_ATOP_NOPORT 0x0002
+
+/** \brief Import an #ev_sockaddr_t from a <CODE>struct
+ * sockaddr</CODE>.
+ *
+ * This function fills in the \p sa socket address given a pointer to
+ * an initialized <CODE>struct sockaddr</CODE>.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t to be filled in.
+ * \param addr A pointer to <CODE>struct sockaddr</CODE> containing
+ * the address to be imported.
+ * \param len The length of the \p addr.
+ *
+ * \retval EINVAL An invalid argument was given.
+ */
+extern ev_err_t sockaddr_import(ev_sockaddr_t *sa, const struct sockaddr *addr,
+ int len)
+ _gca_nonnull((1, 2));
+
+/** \brief Export an #ev_sockaddr_t to a <CODE>struct
+ * sockaddr</CODE>.
+ *
+ * This function fills in a <CODE>struct sockaddr</CODE> from the \p
+ * sa socket address.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t to be exported.
+ * \param addr A pointer to <CODE>struct sockaddr</CODE> to be filled
+ * in.
+ * \param len This is a value-result parameter; on function entry,
+ * it contains the size of the \p addr buffer, and on
+ * return, it will contain the actual amount of data in
+ * the buffer.
+ *
+ * \retval EINVAL An invalid argument was given.
+ * \retval EFBIG The address would be too large to fit
+ * in the user buffer.
+ */
+extern ev_err_t sockaddr_export(ev_sockaddr_t *sa, struct sockaddr *addr,
+ int *len)
+ _gca_nonnull((1, 2, 3));
+
EV_END_C_DECLS
/** @} */
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-09-30 03:46:40
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-09-30 03:46:32 UTC
Modified files:
ChangeLog sock.h
Log message:
continue to flesh out socket address interface
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.53 event/ChangeLog:1.54
--- event/ChangeLog:1.53 Sat Sep 17 17:14:11 2005
+++ event/ChangeLog Thu Sep 29 20:46:22 2005
@@ -1,3 +1,8 @@
+2005-09-29 Kevin L. Mitchell <kl...@mi...>
+
+ * sock.h: add declarations and documentation for sa_ptoa() and
+ sa_atop() functions
+
2005-09-17 Kevin L. Mitchell <kl...@mi...>
* sock.h: continue fleshing out the interface for sockets
Index: event/sock.h
diff -u event/sock.h:1.6 event/sock.h:1.7
--- event/sock.h:1.6 Sat Sep 17 17:14:11 2005
+++ event/sock.h Thu Sep 29 20:46:22 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sock.h,v 1.6 2005/09/18 00:14:11 klmitch Exp $
+** @(#)$Id: sock.h,v 1.7 2005/09/30 03:46:22 klmitch Exp $
*/
#ifndef __include_event_sock_h__
#define __include_event_sock_h__
@@ -375,6 +375,41 @@
extern ev_err_t sa_localaddr_set(ev_sockaddr_t *sa, const char *address)
_gca_nonnull((1, 2));
+/** \brief Fill an #ev_sockaddr_t from a presentation format.
+ *
+ * This function parses the string representation of the \p address to
+ * fill in an #ev_sockaddr_t.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ * \param address
+ * A pointer to \c char designating the presentation
+ * format of the address.
+ * \param alen The length of the presentation format of the address.
+ * If 0, the string will be assumed to end with '\\0'.
+ *
+ * \retval EINVAL An invalid argument was given.
+ * XXX more retvals here
+ */
+extern ev_err_t sa_ptoa(ev_sockaddr_t *sa, const char *address, int alen)
+ _gca_nonnull((1, 2));
+
+/** \brief Build presentation format of an #ev_sockaddr_t.
+ *
+ * This function fills the buffer given with the presentation format
+ * of the address given by \p sa. The representation will be
+ * truncated so as to not overflow the buffer, and the terminating
+ * '\\0' will always be present.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ * \param buf The buffer to fill in with the presentation format of
+ * the address.
+ * \param size The size of the buffer.
+ *
+ * \retval EINVAL An invalid argument was given.
+ */
+extern ev_err_t sa_atop(ev_sockaddr_t *sa, char *buf, int size)
+ _gca_nonnull((1, 2));
+
EV_END_C_DECLS
/** @} */
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-09-18 00:14:28
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-09-18 00:14:21 UTC
Modified files:
ChangeLog event_int.h sig.h sock.h tim.h
Log message:
add some \test information that was left out; begin fleshing out the socket
interface
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.52 event/ChangeLog:1.53
--- event/ChangeLog:1.52 Thu Sep 15 11:14:11 2005
+++ event/ChangeLog Sat Sep 17 17:14:11 2005
@@ -1,3 +1,17 @@
+2005-09-17 Kevin L. Mitchell <kl...@mi...>
+
+ * sock.h: continue fleshing out the interface for sockets
+
+ * tim.h: add \test information to some function documentation
+
+ * sig.h: add \test information to some function documentation
+
+ * event_int.h: add \test information to some function documentation
+
+2005-09-16 Kevin L. Mitchell <kl...@mi...>
+
+ * sock.h: begin fleshing out the interface for sockets
+
2005-09-15 Kevin L. Mitchell <kl...@mi...>
* tests/test-harness.dat: update data file to add t_signal_fcns
Index: event/event_int.h
diff -u event/event_int.h:1.30 event/event_int.h:1.31
--- event/event_int.h:1.30 Tue Sep 13 20:45:36 2005
+++ event/event_int.h Sat Sep 17 17:14:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_int.h,v 1.30 2005/09/14 03:45:36 klmitch Exp $
+** @(#)$Id: event_int.h,v 1.31 2005/09/18 00:14:11 klmitch Exp $
*/
#ifndef __include_event_int_h__
#define __include_event_int_h__
@@ -733,6 +733,8 @@
* This function inserts the given timer into the timer tree,
* maintaining the heap property of the tree.
*
+ * \test This function is tested in t_timer_fcns.c.
+ *
* \param ctx A pointer to an #ev_ctx_t.
* \param tim A pointer to an #ev_tim_t to be inserted.
*
@@ -748,6 +750,8 @@
* This function restores the heap property of the timer tree by
* shifting the given node up within the tree.
*
+ * \test This function is tested in t_timer_fcns.c.
+ *
* \param ctx A pointer to an #ev_ctx_t.
* \param tim A pointer to an #ev_tim_t.
*
@@ -763,6 +767,8 @@
* This function restores the heap property of the timer tree by
* shifting the given node down within the tree.
*
+ * \test This function is tested in t_timer_fcns.c.
+ *
* \param ctx A pointer to an #ev_ctx_t.
* \param tim A pointer to an #ev_tim_t.
*
@@ -778,6 +784,8 @@
* This function removes the specified timer from the timer tree,
* restoring the tree's heap property in the process.
*
+ * \test This function is tested in t_timer_fcns.c.
+ *
* \param ctx A pointer to an #ev_ctx_t.
* \param tim A pointer to the #ev_tim_t to remove from the tree.
*
Index: event/sig.h
diff -u event/sig.h:1.6 event/sig.h:1.7
--- event/sig.h:1.6 Thu Sep 15 11:14:11 2005
+++ event/sig.h Sat Sep 17 17:14:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sig.h,v 1.6 2005/09/15 18:14:11 klmitch Exp $
+** @(#)$Id: sig.h,v 1.7 2005/09/18 00:14:11 klmitch Exp $
*/
#ifndef __include_event_sig_h__
#define __include_event_sig_h__
@@ -100,6 +100,8 @@
* the \p sig_p parameter is not \c NULL, it will be used to return a
* pointer to the created signal generator.
*
+ * \test This function is tested in t_signal_fcns.c.
+ *
* \param ctx A pointer to an #ev_ctx_t.
* \param signal
* One of the signal constants defined in signal.h.
@@ -123,6 +125,8 @@
*
* This function is used to destroy an existing signal generator.
*
+ * \test This function is tested in t_signal_fcns.c.
+ *
* \param ctx A pointer to an #ev_ctx_t.
* \param sig A pointer to the #ev_sig_t to be destroyed.
*
Index: event/sock.h
diff -u event/sock.h:1.5 event/sock.h:1.6
--- event/sock.h:1.5 Tue Sep 13 20:45:36 2005
+++ event/sock.h Sat Sep 17 17:14:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sock.h,v 1.5 2005/09/14 03:45:36 klmitch Exp $
+** @(#)$Id: sock.h,v 1.6 2005/09/18 00:14:11 klmitch Exp $
*/
#ifndef __include_event_sock_h__
#define __include_event_sock_h__
@@ -40,14 +40,172 @@
# include <event/event.h>
#endif /* __EVENT_LIBRARY__ */
+#include <sys/socket.h>
+#include <sys/un.h>
+
EV_BEGIN_C_DECLS
+/** \brief Socket address buffer size (IPv4).
+ *
+ * This macro gives the size, in bytes, of the buffer necessary to
+ * contain an IPv4 address.
+ */
+#define SOCK_ADDRBUFV4_LEN 4
+
+/** \brief Socket address string length (IPv4).
+ *
+ * This macro gives the maximum length, in characters, of the buffer
+ * necessary to contain the text representation of an IPv4 address.
+ */
+#define SOCK_ADDRSTRV4_LEN 16
+
+/** \brief Socket address buffer size (IPv6).
+ *
+ * This macro gives the size, in bytes, of the buffer necessary to
+ * contain an IPv6 address.
+ */
+#define SOCK_ADDRBUFV6_LEN 16
+
+/** \brief Socket address string length (IPv6).
+ *
+ * This macro gives the maximum length, in characters, of the buffer
+ * necessary to contain the text representation of an IPv6 address.
+ */
+#define SOCK_ADDRSTRV6_LEN 46
+
+/** \brief Local domain socket address length.
+ *
+ * This macro contains the maximum length of a local domain socket
+ * address, in characters.
+ */
+#define SOCK_LOCALADDR_LEN (sizeof(((struct sockaddr_un *)0)->sun_path))
+
+/** \brief Socket types.
+ *
+ * Sockets may be stream sockets, datagram sockets, or pipe "sockets."
+ * (Pipes are fundamentally different from sockets, and so we must
+ * differentiate between them in order for the library to be able to
+ * operate on them. We must be able to make use of pipes because the
+ * default signal engine must use a pipe to communicate from the
+ * signal handler.)
+ */
+typedef enum {
+ ST_STREAM, /**< Stream socket (TCP). */
+ ST_DGRAM, /**< Datagram socket (UDP). */
+ ST_SEQPACKET, /**< Sequenced packet socket (SCTP). */
+ ST_PIPE /**< Pipe "socket." */
+} ev_socktype_t;
+
+/** \brief Socket states.
+ *
+ * Sockets may be in one of several states. This enumeration
+ * describes those states.
+ */
+typedef enum {
+ SS_CONNECTING, /**< A connection is in progress. */
+ SS_LISTENING, /**< Socket is a listening socket. */
+ SS_CONNECTED, /**< Socket is connected to a peer. */
+ SS_UNCONNECTED, /**< Socket is not connected to a peer
+ (datagram sockets). */
+ SS_CLOSED /**< Socket has been closed. */
+} ev_sockstate_t;
+
+/** \brief Socket address types.
+ *
+ * This enumeration is used to label a socket address with its
+ * corresponding type.
+ */
+typedef enum {
+ AT_IPv6, /**< IPv6 socket address. */
+ AT_IPv4, /**< IPv4 socket address. */
+ AT_LOCAL, /**< Local domain socket address. */
+ AT_NONE /**< No specific address type. */
+} ev_satype_t;
+
+/** \brief Socket address.
+ *
+ * This structure is used to abstract the addresses of the socket
+ * endpoints.
+ */
+typedef struct _ev_sockaddr_s ev_sockaddr_t;
+
/** \brief Socket generator.
*
* Sockets are described using this structure.
*/
typedef struct _ev_sock_s ev_sock_t;
+/** \brief Socket attributes.
+ *
+ * Socket attributes are used to modify various characteristics of the
+ * sockets being created.
+ */
+typedef struct _ev_sockattr_t *ev_sockattr_t;
+
+/** \internal
+ * \brief Socket address structure.
+ *
+ * This is the implementation of the #ev_sockaddr_t type.
+ */
+struct _ev_sockaddr_s {
+ ev_satype_t sa_type; /**< Address type. */
+ union {
+ struct {
+ unsigned char saai_addrbuf[SOCK_ADDRBUFV6_LEN];
+ /**< Address buffer. */
+ unsigned short saai_port; /**< Socket port. */
+ } saa_ipaddr; /**< Full IP address. */
+ char saa_localaddr[SOCK_LOCALADDR_LEN];
+ /**< Local domain address. */
+ } sa_addr; /**< Socket address. */
+};
+
+/** \brief Socket address type.
+ *
+ * This macro retrieves the type for the linked socket address.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return One of #AT_IPv6, #AT_IPv4, #AT_LOCAL, or #AT_NONE.
+ */
+#define sa_type(sa) ((sa)->sa_type)
+
+/** \brief Socket address buffer.
+ *
+ * This macro retrieves a pointer to the buffer containing the socket
+ * address. It is only valid for #AT_IPv4 and #AT_IPv6 addresses.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return A pointer to an <CODE>unsigned char</CODE> containing
+ * the IPv4 or IPv6 address.
+ */
+#define sa_ipaddrbuf(sa) ((sa)->sa_addr.saa_ipaddr.saai_addrbuf)
+
+/** \brief Socket address port.
+ *
+ * This macro retrieves the port number of the socket address. It is
+ * only valid for #AT_IPv4 and #AT_IPv6 addresses.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return An unsigned short giving the port number, in host byte
+ * order.
+ */
+#define sa_ipaddrport(sa) ((sa)->sa_addr.saa_ipaddr.saai_port)
+
+/** \brief Local socket address.
+ *
+ * This macro retrieves the local domain address. It is only valid
+ * for #AT_LOCAL addresses.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ *
+ * \return A pointer to a \c char containing the local domain
+ * address.
+ */
+#define sa_localaddr(sa) ((sa)->sa_addr.saa_localaddr)
+
/** \internal
* \brief Socket generator structure.
*
@@ -55,6 +213,12 @@
*/
struct _ev_sock_s {
ev_genhdr_t so_hdr; /**< Generator header. */
+ ev_socktype_t so_type; /**< Socket type. */
+ ev_sockstate_t so_state; /**< Socket state. */
+ ev_sockaddr_t so_sockname; /**< Address of local endpoint. */
+ ev_sockaddr_t so_peername; /**< Address of peer endpoint. */
+ ev_flags_t so_flags; /**< Socket flags. */
+ int so_fd; /**< Socket file descriptor. */
};
/** \brief Socket generator magic number.
@@ -77,6 +241,140 @@
*/
#define so_verify(sock) eg_verify((sock), EV_SOCK_MAGIC)
+/** \brief Socket type.
+ *
+ * This macro retrieves the type of the socket, which will be one of
+ * the #ev_socktype_t constants.
+ *
+ * \param sock A pointer to an #ev_sock_t.
+ *
+ * \return One of the #ev_socktype_t constants specifying the
+ * type of the socket.
+ */
+#define so_type(sock) ((sock)->so_type)
+
+/** \brief Socket state.
+ *
+ * This macro retrieves the current state of the socket, which will be
+ * one of the #ev_sockstate_t constants.
+ *
+ * \param sock A pointer to an #ev_sock_t.
+ *
+ * \return One of the #ev_sockstate_t constants specifying the
+ * state of the socket.
+ */
+#define so_state(sock) ((sock)->so_state)
+
+/** \brief Socket name.
+ *
+ * This macro retrieves the address of this side of a socket
+ * connection.
+ *
+ * \param sock A pointer to an #ev_sock_t.
+ *
+ * \return A pointer to an #ev_sockaddr_t containing the local
+ * address of the socket.
+ */
+#define so_sockname(sock) (&((sock)->so_sockname))
+
+/** \brief Socket peer name.
+ *
+ * This macro retrieves the address of the peer side of a socket
+ * connection. Note that this address will have type #AT_NONE if this
+ * is a listening socket or an unconnected datagram socket.
+ *
+ * \param sock A pointer to an #ev_sock_t.
+ *
+ * \return A pointer to an #ev_sockaddr_t containing the peer
+ * address of the socket.
+ */
+#define so_peername(sock) (&((sock)->so_peername))
+
+/** \brief Socket flags.
+ *
+ * This macro retrieves the current flags for the socket.
+ *
+ * \param sock A pointer to an #ev_sock_t.
+ *
+ * \return The flags for the socket.
+ */
+#define so_flags(sock) ((sock)->so_flags)
+
+/** \brief Socket file descriptor.
+ *
+ * This macro retrieves the file descriptor for the socket. Note that
+ * this will be -1 if the socket state is #SS_CLOSED.
+ *
+ * \param sock A pointer to an #ev_sock_t.
+ *
+ * \return The integer specifying the file descriptor of the
+ * socket.
+ */
+#define so_fd(sock) ((sock)->so_fd)
+
+/** \brief Set address type.
+ *
+ * This function sets the type of the given #ev_sockaddr_t to the
+ * specified \p type.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ * \param type One of the valid type values: #AT_IPv6, #AT_IPv4,
+ * #AT_LOCAL, or #AT_NONE.
+ *
+ * \retval EINVAL An invalid argument was given.
+ */
+extern ev_err_t sa_type_set(ev_sockaddr_t *sa, ev_satype_t type)
+ _gca_nonnull((1));
+
+/** \brief Fill address buffer.
+ *
+ * This function is used to set the address buffer of the given
+ * #ev_sockaddr_t to \p address. Note that the length of the address
+ * is determined by the type set on \p sa. This function is only
+ * valid for #AT_IPv6 and #AT_IPv4 addresses.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ * \param address
+ * A pointer to <CODE>unsigned char</CODE> containing the
+ * address to fill the address structure with.
+ *
+ * \retval EINVAL An invalid argument was given.
+ */
+extern ev_err_t sa_ipaddrbuf_set(ev_sockaddr_t *sa,
+ const unsigned char *address)
+ _gca_nonnull((1, 2));
+
+/** \brief Set address port.
+ *
+ * This function is used to set the address port of the given
+ * #ev_sockaddr_t to \p port. This function is only valid for
+ * #AT_IPv6 and #AT_IPv4 addresses.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ * \param port An <CODE>unsigned short</CODE> containing the port
+ * number (in host byte order).
+ *
+ * \retval EINVAL An invalid argument was given.
+ */
+extern ev_err_t sa_ipaddrport_set(ev_sockaddr_t *sa, unsigned short port)
+ _gca_nonnull((1));
+
+/** \brief Set local domain address.
+ *
+ * This function is used to set the local domain address of the given
+ * #ev_sockaddr_t to \p address. This function is only valid for
+ * #AT_LOCAL addresses.
+ *
+ * \param sa A pointer to an #ev_sockaddr_t.
+ * \param address
+ * A pointer to \c char designating the local domain
+ * address to set.
+ *
+ * \retval EINVAL An invalid argument was given.
+ */
+extern ev_err_t sa_localaddr_set(ev_sockaddr_t *sa, const char *address)
+ _gca_nonnull((1, 2));
+
EV_END_C_DECLS
/** @} */
Index: event/tim.h
diff -u event/tim.h:1.7 event/tim.h:1.8
--- event/tim.h:1.7 Thu Sep 15 11:14:11 2005
+++ event/tim.h Sat Sep 17 17:14:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: tim.h,v 1.7 2005/09/15 18:14:11 klmitch Exp $
+** @(#)$Id: tim.h,v 1.8 2005/09/18 00:14:11 klmitch Exp $
*/
#ifndef __include_event_tim_h__
#define __include_event_tim_h__
@@ -173,6 +173,8 @@
* time. If the \p tim_p parameter is not \c NULL, it will be used to
* return a pointer to the created timer.
*
+ * \test This function is tested in t_timer_fcns.c.
+ *
* \param ctx A pointer to an #ev_ctx_t.
* \param type One of #TT_ABSOLUTE, #TT_RELATIVE, or #TT_PERIODIC, to
* specify the desired timer type.
@@ -202,6 +204,8 @@
* means for doing that. The function may be used from the event
* callback for the timer.
*
+ * \test This function is tested in t_timer_fcns.c.
+ *
* \param ctx A pointer to an #ev_ctx_t.
* \param tim A pointer to an #ev_tim_t to be rescheduled.
* \param type One of #TT_ABSOLUTE, #TT_RELATIVE, or #TT_PERIODIC, to
@@ -221,6 +225,8 @@
* This function is used to destroy an existing timer. It may be used
* from the event callback for #TT_PERIODIC timers.
*
+ * \test This function is tested in t_timer_fcns.c.
+ *
* \param ctx A pointer to an #ev_ctx_t.
* \param tim A pointer to the #ev_tim_t to be destroyed.
*
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-09-15 18:14:31
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-09-15 18:14:21 UTC
Modified files:
ChangeLog Makefile.am sig.h tim.h timer_create.c timer_destroy.c
timer_resched.c tests/Makefile.am tests/test-harness.dat
Added files:
signal_create.c signal_destroy.c tests/t_signal_fcns.c
Log message:
create signal_create() and signal_destroy(); write test program for them;
allow data to be set even if call is 0 in timer_create(); fix a minor typo
in timer_resched() and timer_destroy(); skip already deleted timers in
timer_destroy(); update documentation for timer_create() to reflect change
in semantics with call/data
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.51 event/ChangeLog:1.52
--- event/ChangeLog:1.51 Tue Sep 13 20:45:36 2005
+++ event/ChangeLog Thu Sep 15 11:14:11 2005
@@ -1,3 +1,35 @@
+2005-09-15 Kevin L. Mitchell <kl...@mi...>
+
+ * tests/test-harness.dat: update data file to add t_signal_fcns
+ test program
+
+ * tests/t_signal_fcns.c: add test program for signal_create() and
+ signal_destroy()
+
+ * tests/Makefile.am (check_PROGRAMS): add t_signal_fcns test
+ program
+
+ * timer_resched.c (timer_resched): replace return with ev_return()
+
+ * timer_destroy.c (timer_destroy): replace return with
+ ev_return(); skip timers that are already deleted
+
+ * timer_create.c (timer_create): allow data to be set even if call
+ is NULL
+
+ * tim.h: update documentation: data may be set even if call is
+ NULL
+
+ * signal_destroy.c: add signal_destroy() function
+
+ * signal_create.c: add signal_create() function
+
+ * sig.h: flesh in the signal interface: structure, accessor
+ macros, and signal_create() and signal_destroy()
+
+ * Makefile.am (libevent_la_SOURCES): add signal_create.c and
+ signal_destroy.c
+
2005-09-13 Kevin L. Mitchell <kl...@mi...>
* tests/test-harness.dat: add entries for t_timer_fcns test
Index: event/Makefile.am
diff -u event/Makefile.am:1.16 event/Makefile.am:1.17
--- event/Makefile.am:1.16 Mon Jul 18 15:01:40 2005
+++ event/Makefile.am Thu Sep 15 11:14:11 2005
@@ -16,7 +16,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
-## @(#)$Id: Makefile.am,v 1.16 2005/07/18 22:01:40 klmitch Exp $
+## @(#)$Id: Makefile.am,v 1.17 2005/09/15 18:14:11 klmitch Exp $
##
## Process this file with automake to generate Makefile.in
@@ -43,7 +43,8 @@
event_gen_alloc.c event_gen_release.c \
event_log.c \
_timer_heapify.c \
- timer_create.c timer_resched.c timer_destroy.c
+ timer_create.c timer_resched.c timer_destroy.c \
+ signal_create.c signal_destroy.c
libevent_la_LIBADD = @EVENT_ET_OBJS@ @TREECONF_LIBS@ @LIBLTDL@
libevent_la_DEPENDENCIES = @EVENT_ET_OBJS@
libevent_la_LDFLAGS = -version-info 0:0:0
Index: event/sig.h
diff -u event/sig.h:1.5 event/sig.h:1.6
--- event/sig.h:1.5 Tue Sep 13 20:45:36 2005
+++ event/sig.h Thu Sep 15 11:14:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sig.h,v 1.5 2005/09/14 03:45:36 klmitch Exp $
+** @(#)$Id: sig.h,v 1.6 2005/09/15 18:14:11 klmitch Exp $
*/
#ifndef __include_event_sig_h__
#define __include_event_sig_h__
@@ -42,6 +42,8 @@
# include <event/event.h>
#endif /* __EVENT_LIBRARY__ */
+#include <signal.h> /* struct sigaction needed */
+
EV_BEGIN_C_DECLS
/** \brief Signal generator.
@@ -57,6 +59,8 @@
*/
struct _ev_sig_s {
ev_genhdr_t si_hdr; /**< Generator header. */
+ struct sigaction si_oact; /**< Old signal action. */
+ int si_signal; /**< Signal number. */
};
/** \brief Signal generator magic number.
@@ -79,6 +83,54 @@
*/
#define si_verify(sig) eg_verify((sig), EV_SIG_MAGIC)
+/** \brief Signal number.
+ *
+ * This macro returns the number of the signal handled by the signal
+ * generator.
+ *
+ * \param sig A pointer to an #ev_sig_t.
+ *
+ * \return An integer containing the handled signal number.
+ */
+#define si_signal(sig) ((sig)->si_signal)
+
+/** \brief Create a signal.
+ *
+ * This function creates a generator for the specified \p signal. If
+ * the \p sig_p parameter is not \c NULL, it will be used to return a
+ * pointer to the created signal generator.
+ *
+ * \param ctx A pointer to an #ev_ctx_t.
+ * \param signal
+ * One of the signal constants defined in signal.h.
+ * \param call The callback function for the library to use. If \c
+ * NULL, the library may not be used in the event loop
+ * mode.
+ * \param data Any application-specific data that must be passed to
+ * the callback function.
+ * \param sig_p A pointer to a pointer to an #ev_sig_t. A \c NULL
+ * value may be passed if the application does not need
+ * a pointer to the signal generator.
+ *
+ * \retval EINVAL An invalid argument was given.
+ * \retval ENOMEM Out of memory.
+ */
+extern ev_err_t signal_create(ev_ctx_t *ctx, int signal, ev_call_t call,
+ void *data, ev_sig_t **sig_p)
+ _gca_nonnull((1));
+
+/** \brief Destroy an existing signal.
+ *
+ * This function is used to destroy an existing signal generator.
+ *
+ * \param ctx A pointer to an #ev_ctx_t.
+ * \param sig A pointer to the #ev_sig_t to be destroyed.
+ *
+ * \retval EINVAL An invalid argument was given.
+ */
+extern ev_err_t signal_destroy(ev_ctx_t *ctx, ev_sig_t *sig)
+ _gca_nonnull((1, 2));
+
EV_END_C_DECLS
/** @} */
Index: event/signal_create.c
diff -u /dev/null event/signal_create.c:1.1
--- /dev/null Thu Sep 15 11:14:21 2005
+++ event/signal_create.c Thu Sep 15 11:14:11 2005
@@ -0,0 +1,78 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: signal_create.c,v 1.1 2005/09/15 18:14:11 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Implementation of signal_create().
+ *
+ * This file contains the implementation of the signal_create()
+ * function, used to create a new signal generator.
+ */
+#include "engines_int.h"
+
+#include <string.h>
+
+RCSTAG("@(#)$Id: signal_create.c,v 1.1 2005/09/15 18:14:11 klmitch Exp $");
+
+ev_err_t
+signal_create(ev_ctx_t *ctx, int signal, ev_call_t call, void *data,
+ ev_sig_t **sig_p)
+{
+ ev_engine_t *eng;
+ ev_err_t err = 0;
+ ev_sig_t *sig;
+
+ ev_init(); /* make sure library is initialized... */
+
+ /* sanity-check the arguments... */
+ if (!ec_verify(ctx))
+ ev_return(EINVAL);
+
+ /* Let's allocate a generator... */
+ if ((err = event_gen_alloc(ctx, EGT_SIGNAL, (ev_genhdr_t **)&sig)))
+ ev_return(err);
+
+ /* Set callback information */
+ eg_callback_set(sig, call);
+ eg_calldata_set(sig, data);
+
+ /* Now initialize the signal fields... */
+ memset(&sig->si_oact, 0, sizeof(sig->si_oact)); /* zero old action field */
+ sig->si_signal = signal; /* set the signal */
+
+ /* Walk through all signal engines... */
+ for (eng = ctx->ec_signal.el_first; eng;
+ eng = eng->eng_signal.esi_active.el_next)
+ if ((err = eng_sig_add(ctx, eng, sig))) { /* add to engine... */
+ /* oops! Error occurred. Walk engines backwards and remove signal */
+ for (; eng; eng = eng->eng_signal.esi_active.el_prev)
+ eng_sig_rem(ctx, eng, sig);
+
+ event_gen_release(ctx, (ev_genhdr_t *)sig); /* release signal memory */
+
+ ev_return(err); /* return the error */
+ }
+
+ eg_ref_inc(ctx, sig); /* increment the reference count */
+
+ if (sig_p) /* did caller want signal? */
+ *sig_p = sig; /* then return it */
+
+ ev_return(0);
+}
Index: event/signal_destroy.c
diff -u /dev/null event/signal_destroy.c:1.1
--- /dev/null Thu Sep 15 11:14:22 2005
+++ event/signal_destroy.c Thu Sep 15 11:14:11 2005
@@ -0,0 +1,58 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: signal_destroy.c,v 1.1 2005/09/15 18:14:11 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Implementation of signal_destroy().
+ *
+ * This file contains the implementation of the signal_destroy()
+ * function.
+ */
+#include "engines_int.h"
+
+RCSTAG("@(#)$Id: signal_destroy.c,v 1.1 2005/09/15 18:14:11 klmitch Exp $");
+
+ev_err_t
+signal_destroy(ev_ctx_t *ctx, ev_sig_t *sig)
+{
+ ev_engine_t *eng;
+ ev_err_t err = 0, err2;
+
+ ev_init(); /* make sure library is initialized... */
+
+ /* sanity-check the arguments... */
+ if (!ec_verify(ctx) || !si_verify(sig) || eg_context(sig) != ctx)
+ ev_return(EINVAL);
+
+ if (eg_flags(sig) & EV_GEN_DELETED) /* skip already deleted signals */
+ ev_return(0);
+
+ /* Walk through all the signal engines (last to first)... */
+ for (eng = ctx->ec_signal.el_last; eng;
+ eng = eng->eng_signal.esi_active.el_prev)
+ if ((err2 = eng_sig_rem(ctx, eng, sig)) && !err) /* remove the signal... */
+ err = err2; /* don't interrupt removal, but remember error code */
+
+ eg_flags_set(sig, EV_GEN_DELETED); /* mark it as deleted */
+
+ /* decrement the reference count */
+ eg_ref_dec(ctx, sig);
+
+ ev_return(err);
+}
Index: event/tests/Makefile.am
diff -u event/tests/Makefile.am:1.7 event/tests/Makefile.am:1.8
--- event/tests/Makefile.am:1.7 Mon Sep 12 21:22:01 2005
+++ event/tests/Makefile.am Thu Sep 15 11:14:11 2005
@@ -14,7 +14,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
-## @(#)$Id: Makefile.am,v 1.7 2005/09/13 04:22:01 klmitch Exp $
+## @(#)$Id: Makefile.am,v 1.8 2005/09/15 18:14:11 klmitch Exp $
##
## Process this file with automake to generate Makefile.in
@@ -31,7 +31,8 @@
t_evg_register \
t_evg_alloc \
\
- t_timer_fcns
+ t_timer_fcns \
+ t_signal_fcns
check_LTLIBRARIES = engmodinit.la engmodule.la
engmodinit_la_LDFLAGS = -module -avoid-version -rpath @abs_builddir@
Index: event/tests/t_signal_fcns.c
diff -u /dev/null event/tests/t_signal_fcns.c:1.1
--- /dev/null Thu Sep 15 11:14:22 2005
+++ event/tests/t_signal_fcns.c Thu Sep 15 11:14:11 2005
@@ -0,0 +1,71 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: t_signal_fcns.c,v 1.1 2005/09/15 18:14:11 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Test suite for signal_create() and signal_destroy()
+ * functions.
+ *
+ * This test program is used to test the operation of the signal
+ * manipulation functions.
+ */
+#include "event-test.h"
+
+#include <signal.h>
+
+RCSTAG("@(#)$Id: t_signal_fcns.c,v 1.1 2005/09/15 18:14:11 klmitch Exp $");
+
+TEST_PROG(t_signal_fcns, "Test operation of signal manipulation functions")
+ TEST_ARG(t_signal_fcns, "<event-test.tc>")
+ TEST_ARG(t_signal_fcns, "<engmodule.la>")
+ TEST_DEP(t_signal_fcns, t_evg_alloc)
+
+/** \internal
+ * \brief Signal manipulation functions test program.
+ *
+ * This program is used for testing the signal manipulation functions
+ * signal_create() and signal_destroy().
+ */
+int
+main(int argc, char **argv)
+{
+ char *prog;
+ ev_err_t err;
+ ev_ctx_t ctx;
+ ev_sig_t *sig;
+
+ ev_test_init(t_signal_fcns); /* initialize test program */
+ ev_prog_name(prog, argv); /* calculate program name... */
+ ev_lib_init(argc, argv, prog, &ctx); /* initialize event library */
+
+ TEST(t_signal_fcns, signal_create, "Test that signal_create() creates a "
+ "signal generator",
+ (!(err = signal_create(&ctx, SIGINT, 0, 0, &sig))), FATAL(0),
+ ("signal_create() properly created a signal generator"),
+ ("signal_create() failed to create a signal generator; error %u", err));
+
+ TEST(t_signal_fcns, signal_destroy, "Test that signal_destroy() destroys a "
+ "signal generator",
+ (!(err = signal_destroy(&ctx, sig))), FATAL(0),
+ ("signal_destroy() properly destroyed a signal generator"),
+ ("signal_destroy() failed to destroy a signal generator; error %u",
+ err));
+
+ return 0;
+}
Index: event/tests/test-harness.dat
diff -u event/tests/test-harness.dat:1.11 event/tests/test-harness.dat:1.12
--- event/tests/test-harness.dat:1.11 Tue Sep 13 20:45:37 2005
+++ event/tests/test-harness.dat Thu Sep 15 11:14:11 2005
@@ -15,10 +15,11 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: test-harness.dat,v 1.11 2005/09/14 03:45:37 klmitch Exp $
+** @(#)$Id: test-harness.dat,v 1.12 2005/09/15 18:14:11 klmitch Exp $
*/
# Created by test-harness.pl from these files: t_event_attrs.c t_event_init.c
-# t_event_log.c t_evg_alloc.c t_evg_register.c t_timer_fcns.c
+# t_event_log.c t_evg_alloc.c t_evg_register.c t_signal_fcns.c
+# t_timer_fcns.c
program t_event_log t_event_log \
"Test operation of event_log_* functions"
@@ -163,6 +164,16 @@
test evg_destroy t_evg_alloc PASS \
"Test that event_destroy() releases free-listed generators"
+program t_signal_fcns t_signal_fcns \
+ "Test operation of signal manipulation functions" \
+ <event-test.tc> <engmodule.la>
+t_signal_fcns: t_evg_alloc
+
+test signal_create t_signal_fcns PASS \
+ "Test that signal_create() creates a signal generator"
+test signal_destroy t_signal_fcns PASS \
+ "Test that signal_destroy() destroys a signal generator"
+
program t_timer_fcns t_timer_fcns \
"Test operation of timer manipulation functions" \
<event-test.tc> <engmodule.la>
Index: event/tim.h
diff -u event/tim.h:1.6 event/tim.h:1.7
--- event/tim.h:1.6 Tue Sep 13 20:45:36 2005
+++ event/tim.h Thu Sep 15 11:14:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: tim.h,v 1.6 2005/09/14 03:45:36 klmitch Exp $
+** @(#)$Id: tim.h,v 1.7 2005/09/15 18:14:11 klmitch Exp $
*/
#ifndef __include_event_tim_h__
#define __include_event_tim_h__
@@ -183,8 +183,7 @@
* NULL, the library may not be used in the event loop
* mode.
* \param data Any application-specific data that must be passed to
- * the callback function. If \p call is \c NULL, this
- * parameter must also be \c NULL.
+ * the callback function.
* \param tim_p A pointer to a pointer to an #ev_tim_t. A \c NULL
* value may be passed if the application does not need
* a pointer to the timer.
Index: event/timer_create.c
diff -u event/timer_create.c:1.1 event/timer_create.c:1.2
--- event/timer_create.c:1.1 Mon Jul 18 15:01:41 2005
+++ event/timer_create.c Thu Sep 15 11:14:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: timer_create.c,v 1.1 2005/07/18 22:01:41 klmitch Exp $
+** @(#)$Id: timer_create.c,v 1.2 2005/09/15 18:14:11 klmitch Exp $
*/
/** \internal
* \file
@@ -28,7 +28,7 @@
*/
#include "engines_int.h"
-RCSTAG("@(#)$Id: timer_create.c,v 1.1 2005/07/18 22:01:41 klmitch Exp $");
+RCSTAG("@(#)$Id: timer_create.c,v 1.2 2005/09/15 18:14:11 klmitch Exp $");
ev_err_t
_timer_insert(ev_ctx_t *ctx, ev_tim_t *tim)
@@ -98,10 +98,8 @@
ev_return(err);
/* Set callback information */
- if (call) { /* only set fields if there was a callback specified */
- eg_callback_set(tim, call);
- eg_calldata_set(tim, data);
- }
+ eg_callback_set(tim, call);
+ eg_calldata_set(tim, data);
/* Now initialize the timer fields... */
tim->ti_type = type;
Index: event/timer_destroy.c
diff -u event/timer_destroy.c:1.1 event/timer_destroy.c:1.2
--- event/timer_destroy.c:1.1 Mon Jul 18 15:01:41 2005
+++ event/timer_destroy.c Thu Sep 15 11:14:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: timer_destroy.c,v 1.1 2005/07/18 22:01:41 klmitch Exp $
+** @(#)$Id: timer_destroy.c,v 1.2 2005/09/15 18:14:11 klmitch Exp $
*/
/** \internal
* \file
@@ -26,7 +26,7 @@
*/
#include "engines_int.h"
-RCSTAG("@(#)$Id: timer_destroy.c,v 1.1 2005/07/18 22:01:41 klmitch Exp $");
+RCSTAG("@(#)$Id: timer_destroy.c,v 1.2 2005/09/15 18:14:11 klmitch Exp $");
ev_err_t
_timer_untree(ev_ctx_t *ctx, ev_tim_t *tim)
@@ -115,7 +115,10 @@
/* sanity-check the arguments... */
if (!ec_verify(ctx) || !ti_verify(tim) || eg_context(tim) != ctx)
- return EINVAL;
+ ev_return(EINVAL);
+
+ if (eg_flags(tim) & EV_GEN_DELETED) /* skip already deleted timers */
+ ev_return(0);
err = _timer_untree(ctx, tim); /* remove timer from timer tree... */
Index: event/timer_resched.c
diff -u event/timer_resched.c:1.1 event/timer_resched.c:1.2
--- event/timer_resched.c:1.1 Mon Jul 18 15:01:41 2005
+++ event/timer_resched.c Thu Sep 15 11:14:11 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: timer_resched.c,v 1.1 2005/07/18 22:01:41 klmitch Exp $
+** @(#)$Id: timer_resched.c,v 1.2 2005/09/15 18:14:11 klmitch Exp $
*/
/** \internal
* \file
@@ -26,7 +26,7 @@
*/
#include "engines_int.h"
-RCSTAG("@(#)$Id: timer_resched.c,v 1.1 2005/07/18 22:01:41 klmitch Exp $");
+RCSTAG("@(#)$Id: timer_resched.c,v 1.2 2005/09/15 18:14:11 klmitch Exp $");
ev_err_t
timer_resched(ev_ctx_t *ctx, ev_tim_t *tim, ev_timtype_t type,
@@ -43,7 +43,7 @@
if (!ec_verify(ctx) || !ti_verify(tim) ||
(type != TT_ABSOLUTE && type != TT_RELATIVE && type != TT_PERIODIC) ||
!value || eg_context(tim) != ctx)
- return EINVAL;
+ ev_return(EINVAL);
/* if the generator's been deleted, it's already been removed from the
* engines and from the timer tree...
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-09-14 03:47:58
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-09-14 03:47:49 UTC
Modified files:
doc/event.doxytag doc/html/__ev__gen__lookup_8c-source.html
doc/html/__ev__gen__lookup_8c.html
doc/html/__timer__heapify_8c-source.html
doc/html/__timer__heapify_8c.html doc/html/annotated.html
doc/html/classes.html doc/html/confvar.html
doc/html/dir_000000.html doc/html/dirs.html
doc/html/engine__activate_8c-source.html
doc/html/engine__activate_8c.html
doc/html/engine__register_8c-source.html
doc/html/engine__register_8c.html doc/html/engines_8h-source.html
doc/html/engines_8h.html doc/html/engines__int_8h-source.html
doc/html/engines__int_8h.html doc/html/engmodinit_8c-source.html
doc/html/engmodinit_8c.html doc/html/engmodule_8c-source.html
doc/html/engmodule_8c.html doc/html/event-test_8h-source.html
doc/html/event-test_8h.html doc/html/event_8h-source.html
doc/html/event_8h.html
doc/html/event__attr__confpath_8c-source.html
doc/html/event__attr__confpath_8c.html
doc/html/event__attr__confreg_8c-source.html
doc/html/event__attr__confreg_8c.html
doc/html/event__attr__confvar_8c-source.html
doc/html/event__attr__confvar_8c.html
doc/html/event__attr__destroy_8c-source.html
doc/html/event__attr__destroy_8c.html
doc/html/event__attr__engine_8c-source.html
doc/html/event__attr__engine_8c.html
doc/html/event__attr__init_8c-source.html
doc/html/event__attr__init_8c.html
doc/html/event__attr__libpath_8c-source.html
doc/html/event__attr__libpath_8c.html
doc/html/event__attr__modlist_8c-source.html
doc/html/event__attr__modlist_8c.html
doc/html/event__destroy_8c-source.html
doc/html/event__destroy_8c.html
doc/html/event__gen__alloc_8c-source.html
doc/html/event__gen__alloc_8c.html
doc/html/event__gen__register_8c-source.html
doc/html/event__gen__register_8c.html
doc/html/event__gen__release_8c-source.html
doc/html/event__gen__release_8c.html
doc/html/event__init_8c-source.html doc/html/event__init_8c.html
doc/html/event__int_8h-source.html doc/html/event__int_8h.html
doc/html/event__int_8h_a42_cgraph.map
doc/html/event__int_8h_a42_cgraph.md5
doc/html/event__log_8c-source.html doc/html/event__log_8c.html
doc/html/files.html doc/html/functions.html
doc/html/functions_vars.html doc/html/gcc-attrs_8h-source.html
doc/html/gcc-attrs_8h.html doc/html/globals.html
doc/html/globals_0x63.html doc/html/globals_0x64.html
doc/html/globals_0x65.html doc/html/globals_0x66.html
doc/html/globals_0x67.html doc/html/globals_0x68.html
doc/html/globals_0x6c.html doc/html/globals_0x6d.html
doc/html/globals_0x6e.html doc/html/globals_0x72.html
doc/html/globals_0x73.html doc/html/globals_0x74.html
doc/html/globals_0x76.html doc/html/globals_defs.html
doc/html/globals_enum.html doc/html/globals_eval.html
doc/html/globals_func.html doc/html/globals_type.html
doc/html/globals_vars.html doc/html/graph_legend.html
doc/html/group__engines.html doc/html/group__event.html
doc/html/group__signal.html doc/html/group__socket.html
doc/html/group__timer.html doc/html/index.html
doc/html/modules.html doc/html/pages.html
doc/html/sig_8h-source.html doc/html/sig_8h.html
doc/html/sock_8h-source.html doc/html/sock_8h.html
doc/html/struct__ev__attr__s.html
doc/html/struct__ev__ctx__s.html
doc/html/struct__ev__engine__s.html
doc/html/struct__ev__englink__s.html
doc/html/struct__ev__englist__s.html
doc/html/struct__ev__gendesc__s.html
doc/html/struct__ev__genhdr__s.html
doc/html/struct__ev__genlist__s.html
doc/html/struct__ev__gens__s.html
doc/html/struct__ev__overvars__s.html
doc/html/struct__ev__sig__s.html
doc/html/struct__ev__signals__s.html
doc/html/struct__ev__sock__s.html
doc/html/struct__ev__sockets__s.html
doc/html/struct__ev__tim__s.html
doc/html/struct__ev__timers__s.html
doc/html/struct__ev__timnode__s.html
doc/html/struct__ev__varlist__s.html
doc/html/struct__event__s.html doc/html/structgenerator.html
doc/html/structrule.html doc/html/structt__gen.html
doc/html/structteng.html doc/html/structtest__timer.html
doc/html/t__event__attrs_8c-source.html
doc/html/t__event__attrs_8c.html
doc/html/t__event__init_8c-source.html
doc/html/t__event__init_8c.html
doc/html/t__event__log_8c-source.html
doc/html/t__event__log_8c.html
doc/html/t__evg__alloc_8c-source.html
doc/html/t__evg__alloc_8c.html
doc/html/t__evg__register_8c-source.html
doc/html/t__evg__register_8c.html
doc/html/t__timer__fcns_8c-source.html
doc/html/t__timer__fcns_8c.html
doc/html/t__timer__fcns_8c_a8_cgraph.map
doc/html/t__timer__fcns_8c_a8_cgraph.md5
doc/html/t__timer__fcns_8c_a8_cgraph.png doc/html/test.html
doc/html/tim_8h-source.html doc/html/tim_8h.html
doc/html/timer__create_8c-source.html
doc/html/timer__create_8c.html
doc/html/timer__create_8c_a0_cgraph.map
doc/html/timer__create_8c_a0_cgraph.md5
doc/html/timer__destroy_8c-source.html
doc/html/timer__destroy_8c.html
doc/html/timer__resched_8c-source.html
doc/html/timer__resched_8c.html doc/latex/annotated.tex
doc/latex/dir_000000.tex doc/latex/doxygen.sty
doc/latex/engines_8h.tex doc/latex/engines__int_8h.tex
doc/latex/event_8h.tex doc/latex/event__int_8h.tex
doc/latex/event__int_8h_a42_cgraph.eps
doc/latex/event__int_8h_a42_cgraph.md5 doc/latex/files.tex
doc/latex/group__timer.tex doc/latex/refman.tex
doc/latex/sig_8h.tex doc/latex/sock_8h.tex
doc/latex/struct__ev__ctx__s.tex doc/latex/struct__ev__tim__s.tex
doc/latex/struct__ev__timnode__s.tex
doc/latex/structtest__timer.tex doc/latex/t__timer__fcns_8c.tex
doc/latex/t__timer__fcns_8c_a8_cgraph.eps
doc/latex/t__timer__fcns_8c_a8_cgraph.md5 doc/latex/tim_8h.tex
doc/latex/timer__create_8c.tex
doc/latex/timer__create_8c_a0_cgraph.eps
doc/latex/timer__create_8c_a0_cgraph.md5
doc/latex/timer__destroy_8c.tex doc/latex/timer__resched_8c.tex
doc/man/man3/_ev_ctx_s.3 doc/man/man3/_ev_tim_s.3
doc/man/man3/_ev_timnode_s.3 doc/man/man3/engines.h.3
doc/man/man3/engines_int.h.3 doc/man/man3/event.h.3
doc/man/man3/event_int.h.3 doc/man/man3/sig.h.3
doc/man/man3/sock.h.3 doc/man/man3/t_timer_fcns.c.3
doc/man/man3/test_timer.3 doc/man/man3/tim.h.3
doc/man/man3/timer.3
Added files:
doc/html/group__timer_ga2_cgraph.map
doc/html/group__timer_ga2_cgraph.md5
doc/html/group__timer_ga2_cgraph.png
doc/html/group__timer_ga3_cgraph.map
doc/html/group__timer_ga3_cgraph.md5
doc/html/group__timer_ga3_cgraph.png
doc/html/group__timer_ga4_cgraph.map
doc/html/group__timer_ga4_cgraph.md5
doc/html/group__timer_ga4_cgraph.png
doc/html/structtest__resched.html
doc/latex/group__timer_ga2_cgraph.eps
doc/latex/group__timer_ga2_cgraph.md5
doc/latex/group__timer_ga3_cgraph.eps
doc/latex/group__timer_ga3_cgraph.md5
doc/latex/group__timer_ga4_cgraph.eps
doc/latex/group__timer_ga4_cgraph.md5
doc/latex/structtest__resched.tex doc/man/man3/resched.3
doc/man/man3/resched_init.3 doc/man/man3/test_resched.3
Log message:
doc update
---------------------- diff included ----------------------
Index: event/doc/event.doxytag
diff -u event/doc/event.doxytag:1.9 event/doc/event.doxytag:1.10
--- event/doc/event.doxytag:1.9 Mon Sep 12 21:26:56 2005
+++ event/doc/event.doxytag Tue Sep 13 20:47:36 2005
@@ -2425,6 +2425,7 @@
<filename>t__timer__fcns_8c</filename>
<includes id="event-test_8h" name="event-test.h" local="yes" imported="no">event-test.h</includes>
<class kind="struct">test_timer</class>
+ <class kind="struct">test_resched</class>
<member kind="define">
<type>#define</type>
<name>TTF_SEC</name>
@@ -2453,26 +2454,19 @@
<anchor>a3</anchor>
<arglist>(type, sec, usec, flags)</arglist>
</member>
+ <member kind="define">
+ <type>#define</type>
+ <name>resched_init</name>
+ <anchorfile>t__timer__fcns_8c.html</anchorfile>
+ <anchor>a4</anchor>
+ <arglist>(timer, type, sec, usec)</arglist>
+ </member>
<member kind="function">
<type>int</type>
<name>gettimeofday</name>
<anchorfile>t__timer__fcns_8c.html</anchorfile>
- <anchor>a5</anchor>
- <arglist>(struct timeval *tv, struct timezone *tz)</arglist>
- </member>
- <member kind="function" static="yes">
- <type>static void</type>
- <name>print_node</name>
- <anchorfile>t__timer__fcns_8c.html</anchorfile>
- <anchor>a6</anchor>
- <arglist>(ev_ctx_t *ctx, char *prefix, int plen, int pipe, ev_tim_t *node)</arglist>
- </member>
- <member kind="function" static="yes">
- <type>static void</type>
- <name>print_tree</name>
- <anchorfile>t__timer__fcns_8c.html</anchorfile>
<anchor>a7</anchor>
- <arglist>(ev_ctx_t *ctx)</arglist>
+ <arglist>(struct timeval *tv, struct timezone *tz)</arglist>
</member>
<member kind="function">
<type>int</type>
@@ -2485,7 +2479,14 @@
<type>static struct test_timer</type>
<name>timers</name>
<anchorfile>t__timer__fcns_8c.html</anchorfile>
- <anchor>a4</anchor>
+ <anchor>a5</anchor>
+ <arglist>[]</arglist>
+ </member>
+ <member kind="variable" static="yes">
+ <type>static struct test_resched</type>
+ <name>resched</name>
+ <anchorfile>t__timer__fcns_8c.html</anchorfile>
+ <anchor>a6</anchor>
<arglist>[]</arglist>
</member>
</compound>
@@ -2500,35 +2501,35 @@
<type>#define</type>
<name>EV_TIM_MAGIC</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga15</anchor>
+ <anchor>ga5</anchor>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>ti_verify</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga16</anchor>
+ <anchor>ga6</anchor>
<arglist>(tim)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>ti_type</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga17</anchor>
+ <anchor>ga7</anchor>
<arglist>(tim)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>ti_value</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga18</anchor>
+ <anchor>ga8</anchor>
<arglist>(tim)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>ti_expire</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga19</anchor>
+ <anchor>ga9</anchor>
<arglist>(tim)</arglist>
</member>
<member kind="typedef">
@@ -2547,43 +2548,43 @@
</member>
<member kind="enumeration">
<name>ev_timtype_t</name>
- <anchor>ga20</anchor>
+ <anchor>ga10</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>TT_ABSOLUTE</name>
- <anchor>gga20a7</anchor>
+ <anchor>gga10a7</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>TT_RELATIVE</name>
- <anchor>gga20a10</anchor>
+ <anchor>gga10a8</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>TT_PERIODIC</name>
- <anchor>gga20a11</anchor>
+ <anchor>gga10a9</anchor>
<arglist></arglist>
</member>
<member kind="function">
<type>ev_err_t</type>
<name>timer_create</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga12</anchor>
+ <anchor>ga2</anchor>
<arglist>(ev_ctx_t *ctx, ev_timtype_t type, struct timeval *value, ev_call_t call, void *data, ev_tim_t **tim_p)</arglist>
</member>
<member kind="function">
<type>ev_err_t</type>
<name>timer_resched</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga13</anchor>
+ <anchor>ga3</anchor>
<arglist>(ev_ctx_t *ctx, ev_tim_t *tim, ev_timtype_t type, struct timeval *value)</arglist>
</member>
<member kind="function">
<type>ev_err_t</type>
<name>timer_destroy</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga14</anchor>
+ <anchor>ga4</anchor>
<arglist>(ev_ctx_t *ctx, ev_tim_t *tim)</arglist>
</member>
</compound>
@@ -2603,7 +2604,7 @@
<type>ev_err_t</type>
<name>timer_create</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga12</anchor>
+ <anchor>ga2</anchor>
<arglist>(ev_ctx_t *ctx, ev_timtype_t type, struct timeval *value, ev_call_t call, void *data, ev_tim_t **tim_p)</arglist>
</member>
</compound>
@@ -2623,7 +2624,7 @@
<type>ev_err_t</type>
<name>timer_destroy</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga14</anchor>
+ <anchor>ga4</anchor>
<arglist>(ev_ctx_t *ctx, ev_tim_t *tim)</arglist>
</member>
</compound>
@@ -2636,7 +2637,7 @@
<type>ev_err_t</type>
<name>timer_resched</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga13</anchor>
+ <anchor>ga3</anchor>
<arglist>(ev_ctx_t *ctx, ev_tim_t *tim, ev_timtype_t type, struct timeval *value)</arglist>
</member>
</compound>
@@ -3269,29 +3270,29 @@
<member kind="variable">
<type>_ev_timnode_t</type>
<name>ti_node</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga6</anchor>
+ <anchorfile>struct__ev__tim__s.html</anchorfile>
+ <anchor>o1</anchor>
<arglist></arglist>
</member>
<member kind="variable">
<type>ev_timtype_t</type>
<name>ti_type</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga7</anchor>
+ <anchorfile>struct__ev__tim__s.html</anchorfile>
+ <anchor>o2</anchor>
<arglist></arglist>
</member>
<member kind="variable">
<type>timeval</type>
<name>ti_value</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga8</anchor>
+ <anchorfile>struct__ev__tim__s.html</anchorfile>
+ <anchor>o3</anchor>
<arglist></arglist>
</member>
<member kind="variable">
<type>timeval</type>
<name>ti_expire</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga9</anchor>
+ <anchorfile>struct__ev__tim__s.html</anchorfile>
+ <anchor>o4</anchor>
<arglist></arglist>
</member>
</compound>
@@ -3340,29 +3341,29 @@
<member kind="variable">
<type>ev_tim_t *</type>
<name>tn_next</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga2</anchor>
+ <anchorfile>struct__ev__timnode__s.html</anchorfile>
+ <anchor>o1</anchor>
<arglist></arglist>
</member>
<member kind="variable">
<type>ev_tim_t *</type>
<name>tn_prev</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga3</anchor>
+ <anchorfile>struct__ev__timnode__s.html</anchorfile>
+ <anchor>o2</anchor>
<arglist></arglist>
</member>
<member kind="variable">
<type>ev_tim_t *</type>
<name>tn_left</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga4</anchor>
+ <anchorfile>struct__ev__timnode__s.html</anchorfile>
+ <anchor>o3</anchor>
<arglist></arglist>
</member>
<member kind="variable">
<type>ev_tim_t *</type>
<name>tn_right</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga5</anchor>
+ <anchorfile>struct__ev__timnode__s.html</anchorfile>
+ <anchor>o4</anchor>
<arglist></arglist>
</member>
</compound>
@@ -3608,6 +3609,52 @@
</member>
</compound>
<compound kind="struct">
+ <name>test_resched</name>
+ <filename>structtest__resched.html</filename>
+ <member kind="variable">
+ <type>const int</type>
+ <name>timer</name>
+ <anchorfile>structtest__resched.html</anchorfile>
+ <anchor>o0</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const ev_timtype_t</type>
+ <name>type</name>
+ <anchorfile>structtest__resched.html</anchorfile>
+ <anchor>o1</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const time_t</type>
+ <name>sec</name>
+ <anchorfile>structtest__resched.html</anchorfile>
+ <anchor>o2</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const suseconds_t</type>
+ <name>usec</name>
+ <anchorfile>structtest__resched.html</anchorfile>
+ <anchor>o3</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const time_t</type>
+ <name>e_sec</name>
+ <anchorfile>structtest__resched.html</anchorfile>
+ <anchor>o4</anchor>
+ <arglist></arglist>
+ </member>
+ <member kind="variable">
+ <type>const suseconds_t</type>
+ <name>e_usec</name>
+ <anchorfile>structtest__resched.html</anchorfile>
+ <anchor>o5</anchor>
+ <arglist></arglist>
+ </member>
+ </compound>
+ <compound kind="struct">
<name>test_timer</name>
<filename>structtest__timer.html</filename>
<member kind="variable">
@@ -4633,35 +4680,35 @@
<type>#define</type>
<name>EV_TIM_MAGIC</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga15</anchor>
+ <anchor>ga5</anchor>
<arglist></arglist>
</member>
<member kind="define">
<type>#define</type>
<name>ti_verify</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga16</anchor>
+ <anchor>ga6</anchor>
<arglist>(tim)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>ti_type</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga17</anchor>
+ <anchor>ga7</anchor>
<arglist>(tim)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>ti_value</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga18</anchor>
+ <anchor>ga8</anchor>
<arglist>(tim)</arglist>
</member>
<member kind="define">
<type>#define</type>
<name>ti_expire</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga19</anchor>
+ <anchor>ga9</anchor>
<arglist>(tim)</arglist>
</member>
<member kind="typedef">
@@ -4680,100 +4727,44 @@
</member>
<member kind="enumeration">
<name>ev_timtype_t</name>
- <anchor>ga20</anchor>
+ <anchor>ga10</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>TT_ABSOLUTE</name>
- <anchor>gga20a7</anchor>
+ <anchor>gga10a7</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>TT_RELATIVE</name>
- <anchor>gga20a10</anchor>
+ <anchor>gga10a8</anchor>
<arglist></arglist>
</member>
<member kind="enumvalue">
<name>TT_PERIODIC</name>
- <anchor>gga20a11</anchor>
+ <anchor>gga10a9</anchor>
<arglist></arglist>
</member>
<member kind="function">
<type>ev_err_t</type>
<name>timer_create</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga12</anchor>
+ <anchor>ga2</anchor>
<arglist>(ev_ctx_t *ctx, ev_timtype_t type, struct timeval *value, ev_call_t call, void *data, ev_tim_t **tim_p)</arglist>
</member>
<member kind="function">
<type>ev_err_t</type>
<name>timer_resched</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga13</anchor>
+ <anchor>ga3</anchor>
<arglist>(ev_ctx_t *ctx, ev_tim_t *tim, ev_timtype_t type, struct timeval *value)</arglist>
</member>
<member kind="function">
<type>ev_err_t</type>
<name>timer_destroy</name>
<anchorfile>group__timer.html</anchorfile>
- <anchor>ga14</anchor>
- <arglist>(ev_ctx_t *ctx, ev_tim_t *tim)</arglist>
- </member>
- <member kind="variable">
- <type>ev_tim_t *</type>
- <name>tn_next</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga2</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>ev_tim_t *</type>
- <name>tn_prev</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga3</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>ev_tim_t *</type>
- <name>tn_left</name>
- <anchorfile>group__timer.html</anchorfile>
<anchor>ga4</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>ev_tim_t *</type>
- <name>tn_right</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga5</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>_ev_timnode_t</type>
- <name>ti_node</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga6</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>ev_timtype_t</type>
- <name>ti_type</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga7</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>timeval</type>
- <name>ti_value</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga8</anchor>
- <arglist></arglist>
- </member>
- <member kind="variable">
- <type>timeval</type>
- <name>ti_expire</name>
- <anchorfile>group__timer.html</anchorfile>
- <anchor>ga9</anchor>
- <arglist></arglist>
+ <arglist>(ev_ctx_t *ctx, ev_tim_t *tim)</arglist>
</member>
</compound>
<compound kind="dir">
Index: event/doc/html/__ev__gen__lookup_8c-source.html
diff -u event/doc/html/__ev__gen__lookup_8c-source.html:1.4 event/doc/html/__ev__gen__lookup_8c-source.html:1.5
--- event/doc/html/__ev__gen__lookup_8c-source.html:1.4 Mon Sep 12 21:26:57 2005
+++ event/doc/html/__ev__gen__lookup_8c-source.html Tue Sep 13 20:47:37 2005
@@ -52,7 +52,7 @@
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <a class="code" href="event__int_8h.html#a25">ev_return</a>(ENOENT); <span class="comment">/* failed to find the entry... */</span>
<a name="l00055"></a>00055 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 00:23:51 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 23:45:47 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__ev__gen__lookup_8c.html
diff -u event/doc/html/__ev__gen__lookup_8c.html:1.4 event/doc/html/__ev__gen__lookup_8c.html:1.5
--- event/doc/html/__ev__gen__lookup_8c.html:1.4 Mon Sep 12 21:26:57 2005
+++ event/doc/html/__ev__gen__lookup_8c.html Tue Sep 13 20:47:37 2005
@@ -101,7 +101,7 @@
Referenced by <a class="el" href="event__gen__alloc_8c-source.html#l00032">event_gen_alloc()</a>, <a class="el" href="event__gen__release_8c-source.html#l00032">event_gen_release()</a>, and <a class="el" href="t__evg__alloc_8c-source.html#l00068">main()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 00:23:53 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 23:45:47 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__timer__heapify_8c-source.html
diff -u event/doc/html/__timer__heapify_8c-source.html:1.2 event/doc/html/__timer__heapify_8c-source.html:1.3
--- event/doc/html/__timer__heapify_8c-source.html:1.2 Mon Sep 12 21:26:57 2005
+++ event/doc/html/__timer__heapify_8c-source.html Tue Sep 13 20:47:37 2005
@@ -31,47 +31,47 @@
<a name="l00046"></a>00046 <span class="keyword">static</span> <a class="code" href="group__event.html#ga5">ev_err_t</a>
<a name="l00047"></a><a class="code" href="__timer__heapify_8c.html#a0">00047</a> <a class="code" href="__timer__heapify_8c.html#a0">node_swap</a>(<a class="code" href="struct__ev__ctx__s.html">ev_ctx_t</a> *ctx, <a class="code" href="struct__ev__tim__s.html">ev_tim_t</a> *tim)
<a name="l00048"></a>00048 {
-<a name="l00049"></a>00049 <a class="code" href="struct__ev__tim__s.html">ev_tim_t</a> *parent = tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>;
+<a name="l00049"></a>00049 <a class="code" href="struct__ev__tim__s.html">ev_tim_t</a> *parent = tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>;
<a name="l00050"></a>00050 <a class="code" href="struct__ev__timnode__s.html">_ev_timnode_t</a> swap;
<a name="l00051"></a>00051
<a name="l00052"></a>00052 <a class="code" href="event__int_8h.html#a23">ev_trace</a>();
<a name="l00053"></a>00053
<a name="l00054"></a>00054 <span class="comment">/* First, let's swap the node pointer values */</span>
-<a name="l00055"></a>00055 swap = parent-><a class="code" href="group__timer.html#ga6">ti_node</a>;
-<a name="l00056"></a>00056 parent-><a class="code" href="group__timer.html#ga6">ti_node</a> = tim-><a class="code" href="group__timer.html#ga6">ti_node</a>;
-<a name="l00057"></a>00057 tim-><a class="code" href="group__timer.html#ga6">ti_node</a> = swap;
+<a name="l00055"></a>00055 swap = parent-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>;
+<a name="l00056"></a>00056 parent-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a> = tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>;
+<a name="l00057"></a>00057 tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a> = swap;
<a name="l00058"></a>00058
<a name="l00059"></a>00059 <span class="comment">/* one or the other of these must be true... */</span>
-<a name="l00060"></a>00060 <a class="code" href="event__int_8h.html#a22">ev_assert</a>(tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga4">tn_left</a> == tim || tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga5">tn_right</a> == tim);
+<a name="l00060"></a>00060 <a class="code" href="event__int_8h.html#a22">ev_assert</a>(tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o3">tn_left</a> == tim || tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o4">tn_right</a> == tim);
<a name="l00061"></a>00061
<a name="l00062"></a>00062 <span class="comment">/* Fix up the timer for its new position... */</span>
-<a name="l00063"></a>00063 <span class="keywordflow">if</span> (tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga4">tn_left</a> == tim)
-<a name="l00064"></a>00064 tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga4">tn_left</a> = parent;
+<a name="l00063"></a>00063 <span class="keywordflow">if</span> (tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o3">tn_left</a> == tim)
+<a name="l00064"></a>00064 tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o3">tn_left</a> = parent;
<a name="l00065"></a>00065 <span class="keywordflow">else</span>
-<a name="l00066"></a>00066 tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga5">tn_right</a> = parent;
+<a name="l00066"></a>00066 tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o4">tn_right</a> = parent;
<a name="l00067"></a>00067
<a name="l00068"></a>00068 <span class="comment">/* make sure parent was linked... */</span>
-<a name="l00069"></a>00069 <a class="code" href="event__int_8h.html#a22">ev_assert</a>((!tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a> && ctx-><a class="code" href="struct__ev__ctx__s.html#o8">ec_timtree</a>.tt_root == parent) ||
-<a name="l00070"></a>00070 tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga4">tn_left</a> == parent ||
-<a name="l00071"></a>00071 tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga5">tn_right</a> == parent);
+<a name="l00069"></a>00069 <a class="code" href="event__int_8h.html#a22">ev_assert</a>((!tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a> && ctx-><a class="code" href="struct__ev__ctx__s.html#o8">ec_timtree</a>.tt_root == parent) ||
+<a name="l00070"></a>00070 tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o3">tn_left</a> == parent ||
+<a name="l00071"></a>00071 tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o4">tn_right</a> == parent);
<a name="l00072"></a>00072
<a name="l00073"></a>00073 <span class="comment">/* fix up timer's parent for the new position */</span>
-<a name="l00074"></a>00074 <span class="keywordflow">if</span> (!tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>) <span class="comment">/* no parent, must be the root of the tree */</span>
+<a name="l00074"></a>00074 <span class="keywordflow">if</span> (!tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>) <span class="comment">/* no parent, must be the root of the tree */</span>
<a name="l00075"></a>00075 ctx-><a class="code" href="struct__ev__ctx__s.html#o8">ec_timtree</a>.tt_root = tim;
-<a name="l00076"></a>00076 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga4">tn_left</a> == parent)
-<a name="l00077"></a>00077 tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga4">tn_left</a> = tim;
+<a name="l00076"></a>00076 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o3">tn_left</a> == parent)
+<a name="l00077"></a>00077 tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o3">tn_left</a> = tim;
<a name="l00078"></a>00078 <span class="keywordflow">else</span>
-<a name="l00079"></a>00079 tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga5">tn_right</a> = tim;
+<a name="l00079"></a>00079 tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o4">tn_right</a> = tim;
<a name="l00080"></a>00080
<a name="l00081"></a>00081 <span class="comment">/* Now fix up the linked list... */</span>
-<a name="l00082"></a>00082 <span class="keywordflow">if</span> (tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga2">tn_next</a> == tim)
-<a name="l00083"></a>00083 tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga2">tn_next</a> = parent;
-<a name="l00084"></a>00084 <span class="keywordflow">if</span> (tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga3">tn_prev</a> == tim)
-<a name="l00085"></a>00085 tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga3">tn_prev</a> = parent;
-<a name="l00086"></a>00086 <span class="keywordflow">if</span> (parent-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga2">tn_next</a> == parent)
-<a name="l00087"></a>00087 parent-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga2">tn_next</a> = tim;
-<a name="l00088"></a>00088 <span class="keywordflow">if</span> (parent-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga3">tn_prev</a> == parent)
-<a name="l00089"></a>00089 parent-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga3">tn_prev</a> = tim;
+<a name="l00082"></a>00082 <span class="keywordflow">if</span> (tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o1">tn_next</a> == tim)
+<a name="l00083"></a>00083 tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o1">tn_next</a> = parent;
+<a name="l00084"></a>00084 <span class="keywordflow">if</span> (tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o2">tn_prev</a> == tim)
+<a name="l00085"></a>00085 tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o2">tn_prev</a> = parent;
+<a name="l00086"></a>00086 <span class="keywordflow">if</span> (parent-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o1">tn_next</a> == parent)
+<a name="l00087"></a>00087 parent-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o1">tn_next</a> = tim;
+<a name="l00088"></a>00088 <span class="keywordflow">if</span> (parent-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o2">tn_prev</a> == parent)
+<a name="l00089"></a>00089 parent-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o2">tn_prev</a> = tim;
<a name="l00090"></a>00090
<a name="l00091"></a>00091 <span class="comment">/* make sure everyone else is pointing at the right place... */</span>
<a name="l00092"></a>00092 <a class="code" href="event__int_8h.html#a28">tt_node_fix</a>(parent);
@@ -94,8 +94,8 @@
<a name="l00109"></a>00109 <a class="code" href="event__int_8h.html#a23">ev_trace</a>();
<a name="l00110"></a>00110
<a name="l00111"></a>00111 <span class="comment">/* bubble earlier timeouts upwards */</span>
-<a name="l00112"></a>00112 <span class="keywordflow">while</span> (tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a> &&
-<a name="l00113"></a>00113 <a class="code" href="event__int_8h.html#a27">tv_comp</a>(&tim-><a class="code" href="group__timer.html#ga9">ti_expire</a>, &tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>-><a class="code" href="group__timer.html#ga9">ti_expire</a>) < 0)
+<a name="l00112"></a>00112 <span class="keywordflow">while</span> (tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a> &&
+<a name="l00113"></a>00113 <a class="code" href="event__int_8h.html#a27">tv_comp</a>(&tim-><a class="code" href="struct__ev__tim__s.html#o4">ti_expire</a>, &tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o0">tn_parent</a>-><a class="code" href="struct__ev__tim__s.html#o4">ti_expire</a>) < 0)
<a name="l00114"></a>00114 <span class="keywordflow">if</span> ((err = <a class="code" href="__timer__heapify_8c.html#a0">node_swap</a>(ctx, tim)))
<a name="l00115"></a>00115 <a class="code" href="event__int_8h.html#a25">ev_return</a>(err); <span class="comment">/* handle any assertion failures that cropped up */</span>
<a name="l00116"></a>00116
@@ -112,18 +112,18 @@
<a name="l00127"></a>00127
<a name="l00128"></a>00128 <span class="comment">/* bubble later timeouts downwards */</span>
<a name="l00129"></a>00129 <span class="keywordflow">while</span> (1) { <span class="comment">/* first, calculate the delta with the children */</span>
-<a name="l00130"></a>00130 left = (!tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga4">tn_left</a> ? 0 :
-<a name="l00131"></a>00131 <a class="code" href="event__int_8h.html#a27">tv_comp</a>(&tim-><a class="code" href="group__timer.html#ga9">ti_expire</a>, &tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga4">tn_left</a>-><a class="code" href="group__timer.html#ga9">ti_expire</a>));
-<a name="l00132"></a>00132 right = (!tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga5">tn_right</a> ? 0 :
-<a name="l00133"></a>00133 <a class="code" href="event__int_8h.html#a27">tv_comp</a>(&tim-><a class="code" href="group__timer.html#ga9">ti_expire</a>, &tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga5">tn_right</a>-><a class="code" href="group__timer.html#ga9">ti_expire</a>));
+<a name="l00130"></a>00130 left = (!tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o3">tn_left</a> ? 0 :
+<a name="l00131"></a>00131 <a class="code" href="event__int_8h.html#a27">tv_comp</a>(&tim-><a class="code" href="struct__ev__tim__s.html#o4">ti_expire</a>, &tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o3">tn_left</a>-><a class="code" href="struct__ev__tim__s.html#o4">ti_expire</a>));
+<a name="l00132"></a>00132 right = (!tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o4">tn_right</a> ? 0 :
+<a name="l00133"></a>00133 <a class="code" href="event__int_8h.html#a27">tv_comp</a>(&tim-><a class="code" href="struct__ev__tim__s.html#o4">ti_expire</a>, &tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o4">tn_right</a>-><a class="code" href="struct__ev__tim__s.html#o4">ti_expire</a>));
<a name="l00134"></a>00134
<a name="l00135"></a>00135 <span class="keywordflow">if</span> (left <= 0 && right <= 0) <span class="comment">/* in order? stop heapifying... */</span>
<a name="l00136"></a>00136 <span class="keywordflow">break</span>;
<a name="l00137"></a>00137
<a name="l00138"></a>00138 <span class="keywordflow">if</span> (left > right) <span class="comment">/* check which node to swap with... */</span>
-<a name="l00139"></a>00139 err = <a class="code" href="__timer__heapify_8c.html#a0">node_swap</a>(ctx, tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga4">tn_left</a>);
+<a name="l00139"></a>00139 err = <a class="code" href="__timer__heapify_8c.html#a0">node_swap</a>(ctx, tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o3">tn_left</a>);
<a name="l00140"></a>00140 <span class="keywordflow">else</span>
-<a name="l00141"></a>00141 err = <a class="code" href="__timer__heapify_8c.html#a0">node_swap</a>(ctx, tim-><a class="code" href="group__timer.html#ga6">ti_node</a>.<a class="code" href="group__timer.html#ga5">tn_right</a>);
+<a name="l00141"></a>00141 err = <a class="code" href="__timer__heapify_8c.html#a0">node_swap</a>(ctx, tim-><a class="code" href="struct__ev__tim__s.html#o1">ti_node</a>.<a class="code" href="struct__ev__timnode__s.html#o4">tn_right</a>);
<a name="l00142"></a>00142
<a name="l00143"></a>00143 <span class="keywordflow">if</span> (err) <span class="comment">/* handle any assertion failures that cropped up */</span>
<a name="l00144"></a>00144 <a class="code" href="event__int_8h.html#a25">ev_return</a>(err);
@@ -131,7 +131,7 @@
<a name="l00146"></a>00146
<a name="l00147"></a>00147 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0);
<a name="l00148"></a>00148 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 00:23:51 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 23:45:47 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/__timer__heapify_8c.html
diff -u event/doc/html/__timer__heapify_8c.html:1.2 event/doc/html/__timer__heapify_8c.html:1.3
--- event/doc/html/__timer__heapify_8c.html:1.2 Mon Sep 12 21:26:57 2005
+++ event/doc/html/__timer__heapify_8c.html Tue Sep 13 20:47:37 2005
@@ -216,7 +216,7 @@
Referenced by <a class="el" href="__timer__heapify_8c-source.html#l00121">_timer_heapify_down()</a>, and <a class="el" href="__timer__heapify_8c-source.html#l00105">_timer_heapify_up()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 00:23:54 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 23:45:48 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/annotated.html
diff -u event/doc/html/annotated.html:1.12 event/doc/html/annotated.html:1.13
--- event/doc/html/annotated.html:1.12 Mon Sep 12 21:26:57 2005
+++ event/doc/html/annotated.html Tue Sep 13 20:47:37 2005
@@ -29,9 +29,10 @@
<tr><td class="indexkey"><a class="el" href="structrule.html">rule</a></td><td class="indexvalue">Structure for defining a testing rule </td></tr>
<tr><td class="indexkey"><a class="el" href="structt__gen.html">t_gen</a></td><td class="indexvalue">Test generator </td></tr>
<tr><td class="indexkey"><a class="el" href="structteng.html">teng</a></td><td class="indexvalue">Testing engines </td></tr>
+ <tr><td class="indexkey"><a class="el" href="structtest__resched.html">test_resched</a></td><td class="indexvalue">Structure for defining a timer rescheduling to perform </td></tr>
<tr><td class="indexkey"><a class="el" href="structtest__timer.html">test_timer</a></td><td class="indexvalue">Structure for defining a timer to create </td></tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 00:24:31 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 23:46:04 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/classes.html
diff -u event/doc/html/classes.html:1.12 event/doc/html/classes.html:1.13
--- event/doc/html/classes.html:1.12 Mon Sep 12 21:26:57 2005
+++ event/doc/html/classes.html Tue Sep 13 20:47:37 2005
@@ -8,11 +8,11 @@
<h1>event Data Structure Index</h1><p><div class="qindex"><a class="qindex" href="#letter__">_</a> | <a class="qindex" href="#letter_G">G</a> | <a class="qindex" href="#letter_R">R</a> | <a class="qindex" href="#letter_T">T</a></div><p>
<table align="center" width="95%" border="0" cellspacing="0" cellpadding="0">
<tr><td><a name="letter__"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> _ </div></td></tr></table>
-</td><td><a class="el" href="struct__ev__gendesc__s.html">_ev_gendesc_s</a> </td><td><a class="el" href="struct__ev__signals__s.html">_ev_signals_s</a> </td><td><a class="el" href="struct__ev__varlist__s.html">_ev_varlist_s</a> </td><td><a class="el" href="structrule.html">rule</a> </td></tr><tr><td><a class="el" href="struct__ev__attr__s.html">_ev_attr_s</a> </td><td><a class="el" href="struct__ev__genhdr__s.html">_ev_genhdr_s</a> </td><td><a class="el" href="struct__ev__sock__s.html">_ev_sock_s</a> </td><td><a class="el" href="struct__event__s.html">_event_s</a> </td><td><a name="letter_T"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> T </div></td></tr></table>
-</td></tr><tr><td><a class="el" href="struct__ev__ctx__s.html">_ev_ctx_s</a> </td><td><a class="el" href="struct__ev__genlist__s.html">_ev_genlist_s</a> </td><td><a class="el" href="struct__ev__sockets__s.html">_ev_sockets_s</a> </td><td><a name="letter_G"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> G </div></td></tr></table>
-</td><td><a class="el" href="structt__gen.html">t_gen</a> </td></tr><tr><td><a class="el" href="struct__ev__engine__s.html">_ev_engine_s</a> </td><td><a class="el" href="struct__ev__gens__s.html">_ev_gens_s</a> </td><td><a class="el" href="struct__ev__tim__s.html">_ev_tim_s</a> </td><td><a class="el" href="structgenerator.html">generator</a> </td><td><a class="el" href="structteng.html">teng</a> </td></tr><tr><td><a class="el" href="struct__ev__englink__s.html">_ev_englink_s</a> </td><td><a class="el" href="struct__ev__overvars__s.html">_ev_overvars_s</a> </td><td><a class="el" href="struct__ev__timers__s.html">_ev_timers_s</a> </td><td><a name="letter_R"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> R </div></td></tr></table>
-</td><td><a class="el" href="structtest__timer.html">test_timer</a> </td></tr><tr><td><a class="el" href="struct__ev__englist__s.html">_ev_englist_s</a> </td><td><a class="el" href="struct__ev__sig__s.html">_ev_sig_s</a> </td><td><a class="el" href="struct__ev__timnode__s.html">_ev_timnode_s</a> </td></tr></table><p><div class="qindex"><a class="qindex" href="#letter__">_</a> | <a class="qindex" href="#letter_G">G</a> | <a class="qindex" href="#letter_R">R</a> | <a class="qindex" href="#letter_T">T</a></div><p>
-<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 00:24:31 2005 for event by
+</td><td><a class="el" href="struct__ev__gendesc__s.html">_ev_gendesc_s</a> </td><td><a class="el" href="struct__ev__signals__s.html">_ev_signals_s</a> </td><td><a class="el" href="struct__ev__varlist__s.html">_ev_varlist_s</a> </td><td><a name="letter_T"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> T </div></td></tr></table>
+</td></tr><tr><td><a class="el" href="struct__ev__attr__s.html">_ev_attr_s</a> </td><td><a class="el" href="struct__ev__genhdr__s.html">_ev_genhdr_s</a> </td><td><a class="el" href="struct__ev__sock__s.html">_ev_sock_s</a> </td><td><a class="el" href="struct__event__s.html">_event_s</a> </td><td><a class="el" href="structt__gen.html">t_gen</a> </td></tr><tr><td><a class="el" href="struct__ev__ctx__s.html">_ev_ctx_s</a> </td><td><a class="el" href="struct__ev__genlist__s.html">_ev_genlist_s</a> </td><td><a class="el" href="struct__ev__sockets__s.html">_ev_sockets_s</a> </td><td><a name="letter_G"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> G </div></td></tr></table>
+</td><td><a class="el" href="structteng.html">teng</a> </td></tr><tr><td><a class="el" href="struct__ev__engine__s.html">_ev_engine_s</a> </td><td><a class="el" href="struct__ev__gens__s.html">_ev_gens_s</a> </td><td><a class="el" href="struct__ev__tim__s.html">_ev_tim_s</a> </td><td><a class="el" href="structgenerator.html">generator</a> </td><td><a class="el" href="structtest__resched.html">test_resched</a> </td></tr><tr><td><a class="el" href="struct__ev__englink__s.html">_ev_englink_s</a> </td><td><a class="el" href="struct__ev__overvars__s.html">_ev_overvars_s</a> </td><td><a class="el" href="struct__ev__timers__s.html">_ev_timers_s</a> </td><td><a name="letter_R"></a><table border="0" cellspacing="0" cellpadding="0"><tr><td><div class="ah"> R </div></td></tr></table>
+</td><td><a class="el" href="structtest__timer.html">test_timer</a> </td></tr><tr><td><a class="el" href="struct__ev__englist__s.html">_ev_englist_s</a> </td><td><a class="el" href="struct__ev__sig__s.html">_ev_sig_s</a> </td><td><a class="el" href="struct__ev__timnode__s.html">_ev_timnode_s</a> </td><td><a class="el" href="structrule.html">rule</a> </td></tr></table><p><div class="qindex"><a class="qindex" href="#letter__">_</a> | <a class="qindex" href="#letter_G">G</a> | <a class="qindex" href="#letter_R">R</a> | <a class="qindex" href="#letter_T">T</a></div><p>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 23:46:04 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/confvar.html
diff -u event/doc/html/confvar.html:1.12 event/doc/html/confvar.html:1.13
--- event/doc/html/confvar.html:1.12 Mon Sep 12 21:26:57 2005
+++ event/doc/html/confvar.html Tue Sep 13 20:47:37 2005
@@ -21,7 +21,7 @@
The <a class="el" href="group__event.html#ga11">event_init()</a> function uses the <a class="elRef" doxygen="treeconf.doxytag:http://libevent.sourceforge.net/treeconf/" href="http://libevent.sourceforge.net/treeconf/group__treeconf.html#gga8">tc_path()</a> function to load the configuration from all the files listed in the <code>envpath</code> argument, which is presumed to be passed in by the application from the environment. If the <code>envpath</code> contains an empty field (i.e., "::"), envpath is passed as <code>NULL</code>, or the <a class="el" href="group__event.html#ga61">EV_INIT_SECURE</a> flag is passed to <a class="el" href="group__event.html#ga11">event_init()</a>, then a default path will be searched. Note that the <a class="el" href="group__event.html#ga61">EV_INIT_SECURE</a> flag will also cause files containing the <code>%n</code> or <code>~</code> expandos to be skipped for security reasons.<p>
In addition to the <code>~</code> expandos (<code>~</code> expands to the current user's home directory; <code>~user</code> expands to the home directory of <code>user</code>), the library also defines the <code>%n</code> and <code>%p</code> expandos, which expand to the user name and the application name, respectively. (The application name is passed as the <code>prog</code> argument to the <a class="el" href="group__event.html#ga11">event_init()</a> function. If <code>NULL</code> is passed for <code>prog</code>, file names containing the <code>%p</code> expando will be omitted.)<p>
By default, the default search path contains <code>"event.tc"</code> from the system package configuration directory (often <code>/usr/local/etc/event</code>); <code>".event.tc"</code> from the user's home directory; <code>"%p.tc"</code> from the system configuration directory; and <code>".%p.tc"</code> from the user's home directory. This default may be overridden by passing <a class="el" href="group__event.html#ga11">event_init()</a> an <a class="el" href="group__event.html#ga2">ev_attr_t</a> object which has been modified by a call to <a class="el" href="group__event.html#ga14">event_attr_confpath()</a>.<p>
-Any variables passed in an <a class="el" href="group__event.html#ga2">ev_attr_t</a> (modified by a call to the <a class="el" href="group__event.html#ga18">event_attr_confvar()</a> function) will override any values found in any of the configuration files loaded by <a class="el" href="group__event.html#ga11">event_init()</a>. <hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 00:24:47 2005 for event by
+Any variables passed in an <a class="el" href="group__event.html#ga2">ev_attr_t</a> (modified by a call to the <a class="el" href="group__event.html#ga18">event_attr_confvar()</a> function) will override any values found in any of the configuration files loaded by <a class="el" href="group__event.html#ga11">event_init()</a>. <hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 23:46:11 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/dir_000000.html
diff -u event/doc/html/dir_000000.html:1.12 event/doc/html/dir_000000.html:1.13
--- event/doc/html/dir_000000.html:1.12 Mon Sep 12 21:26:57 2005
+++ event/doc/html/dir_000000.html Tue Sep 13 20:47:37 2005
@@ -64,11 +64,11 @@
<p>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file </td><td class="memItemRight" valign="bottom"><a class="el" href="t__timer__fcns_8c.html">t_timer_fcns.c</a> <a href="t__timer__fcns_8c-source.html">[code]</a></td></tr>
-<tr><td class="mdescLeft"> </td><td class="mdescRight">Test suite for <a class="el" href="group__timer.html#ga12">timer_create()</a>, <a class="el" href="group__timer.html#ga14">timer_destroy()</a>, and timer_reched() functions. <br></td></tr>
+<tr><td class="mdescLeft"> </td><td class="mdescRight">Test suite for <a class="el" href="group__timer.html#ga2">timer_create()</a>, <a class="el" href="group__timer.html#ga4">timer_destroy()</a>, and timer_reched() functions. <br></td></tr>
<p>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 00:24:50 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 23:46:13 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/dirs.html
diff -u event/doc/html/dirs.html:1.12 event/doc/html/dirs.html:1.13
--- event/doc/html/dirs.html:1.12 Mon Sep 12 21:26:57 2005
+++ event/doc/html/dirs.html Tue Sep 13 20:47:37 2005
@@ -8,7 +8,7 @@
<h1>event Directories</h1>This directory hierarchy is sorted roughly, but not completely, alphabetically:<ul>
<li><a class="el" href="dir_000000.html">tests</a>
</ul>
-<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 00:24:50 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 23:46:13 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__activate_8c-source.html
diff -u event/doc/html/engine__activate_8c-source.html:1.6 event/doc/html/engine__activate_8c-source.html:1.7
--- event/doc/html/engine__activate_8c-source.html:1.6 Mon Sep 12 21:26:57 2005
+++ event/doc/html/engine__activate_8c-source.html Tue Sep 13 20:47:37 2005
@@ -74,7 +74,7 @@
<a name="l00086"></a>00086
<a name="l00087"></a>00087 <a class="code" href="event__int_8h.html#a25">ev_return</a>(0); <span class="comment">/* all done! */</span>
<a name="l00088"></a>00088 }
-</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 00:23:51 2005 for event by
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 23:45:47 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__activate_8c.html
diff -u event/doc/html/engine__activate_8c.html:1.6 event/doc/html/engine__activate_8c.html:1.7
--- event/doc/html/engine__activate_8c.html:1.6 Mon Sep 12 21:26:57 2005
+++ event/doc/html/engine__activate_8c.html Tue Sep 13 20:47:37 2005
@@ -91,7 +91,7 @@
Referenced by <a class="el" href="engine__activate_8c-source.html#l00063">engine_activate()</a>. </td>
</tr>
</table>
-<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 00:23:54 2005 for event by
+<hr size="1"><address style="align: right;"><small>Generated on Tue Sep 13 23:45:48 2005 for event by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.4 </small></address>
</body>
Index: event/doc/html/engine__register_8c-source.html
diff -u event/doc/html/engine__register_8c-source.html:1.9 event/doc/html/engine__register_8c-source.html:1.10
--- event/doc/html/engine__register_8c-source.html:1.9 Mon Sep 12 21:26:57 2005
+++ event/doc/html/engine__register_8c-source.html Tue Sep 13 20:47:37 2005
@@ -95,7 +95,7 @@
<a name="l00095"></a>00095
<a name="l00096"></a>00096 <a class...
[truncated message content] |
|
From: Kevin L. M. <kl...@us...> - 2005-09-14 03:45:55
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-09-14 03:45:47 UTC
Modified files:
ChangeLog engines.h engines_int.h event.h event_int.h sig.h
sock.h tim.h tests/t_timer_fcns.c tests/test-harness.dat
Log message:
fix some minor doxygen warnings; finish writing t_timer_fcns; add entries
for t_timer_fcns to test-harness.dat
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.50 event/ChangeLog:1.51
--- event/ChangeLog:1.50 Mon Sep 12 21:22:01 2005
+++ event/ChangeLog Tue Sep 13 20:45:36 2005
@@ -1,3 +1,25 @@
+2005-09-13 Kevin L. Mitchell <kl...@mi...>
+
+ * tests/test-harness.dat: add entries for t_timer_fcns test
+ program
+
+ * tests/t_timer_fcns.c: finish writing test program for timer
+ functions
+
+ * sock.h: fix doxygen warnings (#define)
+
+ * sig.h: fix doxygen warnings (#define)
+
+ * event_int.h: fix doxygen warnings (#define)
+
+ * event.h: fix doxygen warnings (#define)
+
+ * engines_int.h: fix doxygen warnings (#define)
+
+ * engines.h: fix doxygen warnings (#define)
+
+ * tim.h: fix doxygen warnings (#define, missing end of group)
+
2005-09-12 Kevin L. Mitchell <kl...@mi...>
* tests/Makefile.am (check_PROGRAMS): add t_timer_fcns to list of
Index: event/engines.h
diff -u event/engines.h:1.15 event/engines.h:1.16
--- event/engines.h:1.15 Mon Jul 11 16:34:32 2005
+++ event/engines.h Tue Sep 13 20:45:36 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: engines.h,v 1.15 2005/07/11 23:34:32 klmitch Exp $
+** @(#)$Id: engines.h,v 1.16 2005/09/14 03:45:36 klmitch Exp $
*/
#ifndef __include_event_engines_h__
#define __include_event_engines_h__
@@ -30,7 +30,7 @@
/** \file event/engines.h
* \brief Event system engine header file.
*
- * This header file contains the necessary structures, #define's, and
+ * This header file contains the necessary structures, \#define's, and
* function declarations to implement an event engine.
*/
Index: event/engines_int.h
diff -u event/engines_int.h:1.10 event/engines_int.h:1.11
--- event/engines_int.h:1.10 Mon Jul 18 15:01:40 2005
+++ event/engines_int.h Tue Sep 13 20:45:36 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: engines_int.h,v 1.10 2005/07/18 22:01:40 klmitch Exp $
+** @(#)$Id: engines_int.h,v 1.11 2005/09/14 03:45:36 klmitch Exp $
*/
#ifndef __include_engine_int_h__
#define __include_engine_int_h__
@@ -24,7 +24,7 @@
* \file
* \brief Event library engine internal header.
*
- * This file contains the structures, #define's, and function
+ * This file contains the structures, \#define's, and function
* declarations used internally by the parts of the library that need
* to interface to the event engines.
*/
Index: event/event.h
diff -u event/event.h:1.26 event/event.h:1.27
--- event/event.h:1.26 Mon Jul 18 15:01:40 2005
+++ event/event.h Tue Sep 13 20:45:36 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event.h,v 1.26 2005/07/18 22:01:40 klmitch Exp $
+** @(#)$Id: event.h,v 1.27 2005/09/14 03:45:36 klmitch Exp $
*/
#ifndef __include_event_event_h__
#define __include_event_event_h__
@@ -182,7 +182,7 @@
/** \file event/event.h
* \brief Core event system header file.
*
- * This header file contains the necessary structures, #define's, and
+ * This header file contains the necessary structures, \#define's, and
* function declarations to make use of the event library.
*/
Index: event/event_int.h
diff -u event/event_int.h:1.29 event/event_int.h:1.30
--- event/event_int.h:1.29 Mon Jul 18 15:01:41 2005
+++ event/event_int.h Tue Sep 13 20:45:36 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_int.h,v 1.29 2005/07/18 22:01:41 klmitch Exp $
+** @(#)$Id: event_int.h,v 1.30 2005/09/14 03:45:36 klmitch Exp $
*/
#ifndef __include_event_int_h__
#define __include_event_int_h__
@@ -24,7 +24,7 @@
* \file
* \brief Event library internal header.
*
- * This file contains the structures, #define's, and function
+ * This file contains the structures, \#define's, and function
* declarations used internally by the library.
*/
Index: event/sig.h
diff -u event/sig.h:1.4 event/sig.h:1.5
--- event/sig.h:1.4 Wed May 25 20:19:56 2005
+++ event/sig.h Tue Sep 13 20:45:36 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sig.h,v 1.4 2005/05/26 03:19:56 klmitch Exp $
+** @(#)$Id: sig.h,v 1.5 2005/09/14 03:45:36 klmitch Exp $
*/
#ifndef __include_event_sig_h__
#define __include_event_sig_h__
@@ -33,7 +33,7 @@
/** \file event/sig.h
* \brief Signal event system header file.
*
- * This header file contains the necessary structures, #define's, and
+ * This header file contains the necessary structures, \#define's, and
* function declarations to make use of the event library's signal
* handling.
*/
Index: event/sock.h
diff -u event/sock.h:1.4 event/sock.h:1.5
--- event/sock.h:1.4 Wed May 25 20:19:56 2005
+++ event/sock.h Tue Sep 13 20:45:36 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: sock.h,v 1.4 2005/05/26 03:19:56 klmitch Exp $
+** @(#)$Id: sock.h,v 1.5 2005/09/14 03:45:36 klmitch Exp $
*/
#ifndef __include_event_sock_h__
#define __include_event_sock_h__
@@ -31,7 +31,7 @@
/** \file event/sock.h
* \brief Socket event system header file.
*
- * This header file contains the necessary structures, #define's, and
+ * This header file contains the necessary structures, \#define's, and
* function declarations to make use of the event library's socket
* handling.
*/
Index: event/tests/t_timer_fcns.c
diff -u event/tests/t_timer_fcns.c:1.1 event/tests/t_timer_fcns.c:1.2
--- event/tests/t_timer_fcns.c:1.1 Mon Sep 12 21:22:01 2005
+++ event/tests/t_timer_fcns.c Tue Sep 13 20:45:37 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: t_timer_fcns.c,v 1.1 2005/09/13 04:22:01 klmitch Exp $
+** @(#)$Id: t_timer_fcns.c,v 1.2 2005/09/14 03:45:37 klmitch Exp $
*/
/** \internal
* \file
@@ -29,7 +29,7 @@
#include <sys/time.h>
-RCSTAG("@(#)$Id: t_timer_fcns.c,v 1.1 2005/09/13 04:22:01 klmitch Exp $");
+RCSTAG("@(#)$Id: t_timer_fcns.c,v 1.2 2005/09/14 03:45:37 klmitch Exp $");
TEST_PROG(t_timer_fcns, "Test operation of timer manipulation functions")
TEST_ARG(t_timer_fcns, "<event-test.tc>")
@@ -87,7 +87,7 @@
struct test_timer {
const ev_timtype_t type; /**< Timer type to create. */
const time_t sec; /**< Seconds for timer expiration. */
- const suseconds_t usec; /**< Microseconds for timer creation. */
+ const suseconds_t usec; /**< Microseconds for timer expiration. */
const time_t e_sec; /**< Expected expiration time. */
const suseconds_t e_usec; /**< Expected expiration microseconds. */
const ev_flags_t flags; /**< Test flags to apply. */
@@ -168,49 +168,177 @@
timer_init(TT_RELATIVE, 19, 2721, TT_FLAG_DESTROY)
};
-static void
-print_node(ev_ctx_t *ctx, char *prefix, int plen, int pipe, ev_tim_t *node)
-{
- const char *tim_type[] = { "ABSOLUTE", "RELATIVE", "PERIODIC" };
-
- if (!node) {
- printf("%.*s%c-NO NODE\n", plen, prefix, pipe);
- return;
- }
-
- printf("%.*s%c-%p %s: (%ld,%ld) (%ld,%ld)%s%s\n", plen, prefix, pipe,
- (void *)node, tim_type[ti_type(node)], ti_value(node)->tv_sec,
- ti_value(node)->tv_usec, ti_expire(node)->tv_sec,
- ti_expire(node)->tv_usec,
- node == ctx->ec_timtree.tt_root ? " (ROOT NODE)" : "",
- node == ctx->ec_timtree.tt_insert ? " (Insertion cursor)" : "");
-
- if (pipe != '|')
- pipe = ' ';
-
- printf("%.*s%c | (^ %p > %p < %p l %p r %p)\n", plen,
- prefix, pipe, (void *)node->ti_node.tn_parent,
- (void *)node->ti_node.tn_next, (void *)node->ti_node.tn_prev,
- (void *)node->ti_node.tn_left, (void *)node->ti_node.tn_right);
-
- prefix[plen] = pipe;
- prefix[plen + 1] = ' ';
+/** \internal
+ * \brief Structure for defining a timer rescheduling to perform.
+ *
+ * This structure contains the arguments that should be passed to
+ * timer_resched() to reschedule some of the test timers.
+ */
+struct test_resched {
+ const int timer; /**< Index of timer to reschedule. */
+ const ev_timtype_t type; /**< Timer type for rescheduling. */
+ const time_t sec; /**< Seconds for timer expiration. */
+ const suseconds_t usec; /**< Microseconds for timer expiration. */
+ const time_t e_sec; /**< Expected expiration time. */
+ const suseconds_t e_usec; /**< Expected expiration microseconds. */
+};
- print_node(ctx, prefix, plen + 2, '|', node->ti_node.tn_left);
- print_node(ctx, prefix, plen + 2, '`', node->ti_node.tn_right);
-}
+/** \internal
+ * \brief Initializer for test rescheduling.
+ *
+ * This macro initializes an element of the test timer reschedule
+ * array.
+ *
+ * \warning This macro evaluates the \p type argument multiple times.
+ *
+ * \param timer The index of the timer to reschedule.
+ * \param type One of #TT_ABSOLUTE, #TT_RELATIVE, or #TT_PERIODIC, to
+ * specify the desired timer type.
+ * \param sec The seconds value for the timer expiration time.
+ * \param usec The microseconds value for the timer expiration time.
+ */
+#define resched_init(timer, type, sec, usec) \
+ { (timer), (type), (sec), (usec), \
+ ((type) == TT_ABSOLUTE ? (sec) : (sec) + TTF_SEC), \
+ ((type) == TT_ABSOLUTE ? (usec) : (usec) + TTF_USEC) }
-static void
-print_tree(ev_ctx_t *ctx)
-{
- char prefix[30];
+/** \internal
+ * \brief Array of test reschedules.
+ *
+ * This array contains all the information for the test timer
+ * reschedules to be performed.
+ */
+static struct test_resched resched[] = {
+ resched_init(31, TT_PERIODIC, 11, 646),
+ resched_init(11, TT_RELATIVE, 40, 2183),
+ resched_init(2, TT_PERIODIC, 49, 2132),
+ resched_init(31, TT_RELATIVE, 9, 4264),
+ resched_init(23, TT_RELATIVE, 3, 2171),
+ resched_init(2, TT_RELATIVE, 0, 589),
+ resched_init(31, TT_ABSOLUTE, TTF_SEC + 24, TTF_USEC + 3978),
+ resched_init(34, TT_ABSOLUTE, TTF_SEC + 4, TTF_USEC + 4553),
+ resched_init(20, TT_PERIODIC, 36, 3370),
+ resched_init(38, TT_PERIODIC, 10, 1455),
+ resched_init(35, TT_RELATIVE, 35, 2806),
+ resched_init(3, TT_RELATIVE, 23, 4813),
+ resched_init(10, TT_PERIODIC, 18, 1256),
+ resched_init(9, TT_PERIODIC, 30, 1329),
+ resched_init(19, TT_RELATIVE, 39, 4636),
+ resched_init(14, TT_PERIODIC, 48, 4756),
+ resched_init(8, TT_ABSOLUTE, TTF_SEC + 10, TTF_USEC + 83),
+ resched_init(21, TT_RELATIVE, 14, 3142),
+ resched_init(14, TT_PERIODIC, 39, 3560),
+ resched_init(25, TT_RELATIVE, 38, 3384),
+ resched_init(17, TT_PERIODIC, 27, 4173),
+ resched_init(32, TT_RELATIVE, 44, 1567),
+ resched_init(37, TT_ABSOLUTE, TTF_SEC + 13, TTF_USEC + 88),
+ resched_init(31, TT_PERIODIC, 35, 2316),
+ resched_init(23, TT_RELATIVE, 24, 140),
+ resched_init(37, TT_PERIODIC, 1, 268),
+ resched_init(4, TT_RELATIVE, 24, 2044),
+ resched_init(12, TT_RELATIVE, 19, 1806),
+ resched_init(37, TT_PERIODIC, 10, 2635),
+ resched_init(34, TT_PERIODIC, 31, 430),
+ resched_init(33, TT_PERIODIC, 26, 2719),
+ resched_init(32, TT_PERIODIC, 27, 4442),
+ resched_init(39, TT_ABSOLUTE, TTF_SEC + 12, TTF_USEC + 3899),
+ resched_init(25, TT_RELATIVE, 37, 1201),
+ resched_init(17, TT_ABSOLUTE, TTF_SEC + 24, TTF_USEC + 2243),
+ resched_init(27, TT_ABSOLUTE, TTF_SEC + 21, TTF_USEC + 2809),
+ resched_init(10, TT_RELATIVE, 35, 3751),
+ resched_init(30, TT_PERIODIC, 39, 3959),
+ resched_init(35, TT_ABSOLUTE, TTF_SEC + 14, TTF_USEC + 4380),
+ resched_init(23, TT_ABSOLUTE, TTF_SEC, TTF_USEC + 3641),
+ resched_init(12, TT_RELATIVE, 39, 2804),
+ resched_init(28, TT_RELATIVE, 34, 3533),
+ resched_init(31, TT_ABSOLUTE, TTF_SEC + 10, TTF_USEC + 2192),
+ resched_init(26, TT_PERIODIC, 11, 2218),
+ resched_init(0, TT_ABSOLUTE, TTF_SEC + 45, TTF_USEC + 3015),
+ resched_init(16, TT_PERIODIC, 3, 786),
+ resched_init(28, TT_PERIODIC, 46, 2309),
+ resched_init(17, TT_PERIODIC, 31, 2036),
+ resched_init(28, TT_RELATIVE, 14, 894),
+ resched_init(2, TT_RELATIVE, 3, 2191),
+ resched_init(32, TT_PERIODIC, 26, 3723),
+ resched_init(0, TT_RELATIVE, 1, 1022),
+ resched_init(22, TT_PERIODIC, 40, 4956),
+ resched_init(35, TT_RELATIVE, 15, 3307),
+ resched_init(18, TT_RELATIVE, 2, 3348),
+ resched_init(29, TT_RELATIVE, 9, 1801),
+ resched_init(22, TT_PERIODIC, 24, 240),
+ resched_init(7, TT_RELATIVE, 22, 4288),
+ resched_init(37, TT_ABSOLUTE, TTF_SEC + 21, TTF_USEC + 1777),
+ resched_init(39, TT_PERIODIC, 23, 4800),
+ resched_init(36, TT_ABSOLUTE, TTF_SEC + 44, TTF_USEC + 3985),
+ resched_init(2, TT_ABSOLUTE, TTF_SEC + 9, TTF_USEC + 1834),
+ resched_init(15, TT_ABSOLUTE, TTF_SEC + 44, TTF_USEC + 3962),
+ resched_init(4, TT_ABSOLUTE, TTF_SEC + 1, TTF_USEC + 4201),
+ resched_init(10, TT_PERIODIC, 13, 2800),
+ resched_init(39, TT_RELATIVE, 27, 3210),
+ resched_init(30, TT_RELATIVE, 4, 760),
+ resched_init(35, TT_ABSOLUTE, TTF_SEC + 10, TTF_USEC + 3007),
+ resched_init(35, TT_ABSOLUTE, TTF_SEC + 20, TTF_USEC + 2895),
+ resched_init(14, TT_RELATIVE, 47, 4247),
+ resched_init(12, TT_PERIODIC, 30, 3561),
+ resched_init(22, TT_RELATIVE, 38, 4755),
+ resched_init(5, TT_PERIODIC, 15, 1213),
+ resched_init(12, TT_PERIODIC, 15, 4451),
+ resched_init(2, TT_RELATIVE, 39, 451),
+ resched_init(18, TT_ABSOLUTE, TTF_SEC + 21, TTF_USEC + 630),
+ resched_init(28, TT_PERIODIC, 10, 1554),
+ resched_init(14, TT_ABSOLUTE, TTF_SEC + 15, TTF_USEC + 3628),
+ resched_init(0, TT_RELATIVE, 31, 3619),
+ resched_init(9, TT_ABSOLUTE, TTF_SEC + 46, TTF_USEC + 2008)
+};
- printf("Timer tree rooted at %p; insertion cursor %p\n",
- (void *)ctx->ec_timtree.tt_root, (void *)ctx->ec_timtree.tt_insert);
+/* These functions are too valuable to do away with, but the test
+ * program doesn't actually need them...
+ */
- prefix[0] = '\0';
- print_node(ctx, prefix, 0, '`', ctx->ec_timtree.tt_root);
-}
+/* static void */
+/* print_node(ev_ctx_t *ctx, char *prefix, int plen, int pipe, ev_tim_t *node, */
+/* int depth) */
+/* { */
+/* const char *tim_type[] = { "ABSOLUTE", "RELATIVE", "PERIODIC" }; */
+
+/* if (!node) { */
+/* printf("%.*s%c-NO NODE\n", plen, prefix, pipe); */
+/* return; */
+/* } */
+
+/* printf("%.*s%c-%p %s: (%ld,%ld) (%ld,%ld)%s%s\n", plen, prefix, pipe, */
+/* (void *)node, tim_type[ti_type(node)], ti_value(node)->tv_sec, */
+/* ti_value(node)->tv_usec, ti_expire(node)->tv_sec, */
+/* ti_expire(node)->tv_usec, */
+/* node == ctx->ec_timtree.tt_root ? " (ROOT NODE)" : "", */
+/* node == ctx->ec_timtree.tt_insert ? " (INSERT POINT)" : ""); */
+
+/* if (pipe != '|') */
+/* pipe = ' '; */
+
+/* printf("%.*s%c | (^ %p > %p < %p l %p r %p d %d)\n", plen, */
+/* prefix, pipe, (void *)node->ti_node.tn_parent, */
+/* (void *)node->ti_node.tn_next, (void *)node->ti_node.tn_prev, */
+/* (void *)node->ti_node.tn_left, (void *)node->ti_node.tn_right, depth); */
+
+/* prefix[plen] = pipe; */
+/* prefix[plen + 1] = ' '; */
+
+/* print_node(ctx, prefix, plen + 2, '|', node->ti_node.tn_left, depth + 1); */
+/* print_node(ctx, prefix, plen + 2, '`', node->ti_node.tn_right, depth + 1); */
+/* } */
+
+/* static void */
+/* print_tree(ev_ctx_t *ctx) */
+/* { */
+/* char prefix[30]; */
+
+/* printf("Timer tree rooted at %p; insertion cursor %p\n", */
+/* (void *)ctx->ec_timtree.tt_root, (void *)ctx->ec_timtree.tt_insert); */
+
+/* prefix[0] = '\0'; */
+/* print_node(ctx, prefix, 0, '`', ctx->ec_timtree.tt_root, 0); */
+/* } */
/** \internal
* \brief Timer manipulation functions test program.
@@ -252,7 +380,49 @@
}
PASS(TEST_NAME(timer_create), "timer_create() created timers correctly");
- print_tree(&ctx);
+/* print_tree(&ctx); */
+
+ TEST_DECL(t_timer_fcns, timer_resched, "Test that timers may be rescheduled")
+ for (i = 0; i < sizeof(resched) / sizeof(struct test_resched); i++) {
+ /* Set up the timer value... */
+ tv.tv_sec = resched[i].sec;
+ tv.tv_usec = resched[i].usec;
+
+ /* execute the test case... */
+ if ((err = timer_resched(&ctx, timers[resched[i].timer].timer,
+ resched[i].type, &tv)))
+ FAIL(TEST_NAME(timer_resched), FATAL(0), "timer_resched() failed with "
+ "error %u", err);
+ else if (ti_type(timers[resched[i].timer].timer) !=
+ resched[i].type ||
+ ti_value(timers[resched[i].timer].timer)->tv_sec !=
+ resched[i].sec ||
+ ti_value(timers[resched[i].timer].timer)->tv_usec !=
+ resched[i].usec ||
+ ti_expire(timers[resched[i].timer].timer)->tv_sec !=
+ resched[i].e_sec ||
+ ti_expire(timers[resched[i].timer].timer)->tv_usec !=
+ resched[i].e_usec)
+ FAIL(TEST_NAME(timer_create), FATAL(0), "timer_resched() failed to "
+ "set timer values properly");
+ }
+ PASS(TEST_NAME(timer_resched), "timer_resched() rescheduled timers "
+ "correctly");
+
+/* print_tree(&ctx); */
+
+ TEST_DECL(t_timer_fcns, timer_destroy, "Test that timers may be destroyed")
+ for (i = 0; i < sizeof(timers) / sizeof(struct test_timer); i++) {
+ if (!(timers[i].flags & TT_FLAG_DESTROY))
+ continue; /* skip the ones we're keeping... */
+
+ if ((err = timer_destroy(&ctx, timers[i].timer)))
+ FAIL(TEST_NAME(timer_destroy), FATAL(0), "timer_destroy() failed with "
+ "error %u", err);
+ }
+ PASS(TEST_NAME(timer_destroy), "timer_destroy() destroyed timers correctly");
+
+/* print_tree(&ctx); */
return 0;
}
Index: event/tests/test-harness.dat
diff -u event/tests/test-harness.dat:1.10 event/tests/test-harness.dat:1.11
--- event/tests/test-harness.dat:1.10 Tue Jul 12 08:14:38 2005
+++ event/tests/test-harness.dat Tue Sep 13 20:45:37 2005
@@ -15,10 +15,10 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: test-harness.dat,v 1.10 2005/07/12 15:14:38 klmitch Exp $
+** @(#)$Id: test-harness.dat,v 1.11 2005/09/14 03:45:37 klmitch Exp $
*/
# Created by test-harness.pl from these files: t_event_attrs.c t_event_init.c
-# t_event_log.c t_evg_alloc.c t_evg_register.c
+# t_event_log.c t_evg_alloc.c t_evg_register.c t_timer_fcns.c
program t_event_log t_event_log \
"Test operation of event_log_* functions"
@@ -162,3 +162,15 @@
"Test that event_gen_alloc() can resurrect released generators from the free list"
test evg_destroy t_evg_alloc PASS \
"Test that event_destroy() releases free-listed generators"
+
+program t_timer_fcns t_timer_fcns \
+ "Test operation of timer manipulation functions" \
+ <event-test.tc> <engmodule.la>
+t_timer_fcns: t_evg_alloc
+
+test timer_create t_timer_fcns PASS \
+ "Test that timers may be created"
+test timer_resched t_timer_fcns PASS \
+ "Test that timers may be rescheduled"
+test timer_destroy t_timer_fcns PASS \
+ "Test that timers may be destroyed"
Index: event/tim.h
diff -u event/tim.h:1.5 event/tim.h:1.6
--- event/tim.h:1.5 Sat Jul 16 18:03:08 2005
+++ event/tim.h Tue Sep 13 20:45:36 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: tim.h,v 1.5 2005/07/17 01:03:08 klmitch Exp $
+** @(#)$Id: tim.h,v 1.6 2005/09/14 03:45:36 klmitch Exp $
*/
#ifndef __include_event_tim_h__
#define __include_event_tim_h__
@@ -46,7 +46,7 @@
/** \file event/tim.h
* \brief Timer event system header file.
*
- * This header file contains the necessary structures, #define's, and
+ * This header file contains the necessary structures, \#define's, and
* function declarations to make use of the event library's timer
* handling.
*/
@@ -232,4 +232,6 @@
EV_END_C_DECLS
+/** @} */
+
#endif /* __include_event_tim_h */
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-09-13 04:22:17
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-09-13 04:22:11 UTC
Modified files:
ChangeLog tests/Makefile.am
Added files:
tests/t_timer_fcns.c
Log message:
begin implementing tests for timer_*() functions--so far, we have
timer_create() (full coverage) and as a consequence node_swap() and
_timer_heapify_up() are largely tested. Test program includes temporary
routine for printing the timer tree; not sure if I'm going to keep it or
get rid of it...
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.49 event/ChangeLog:1.50
--- event/ChangeLog:1.49 Mon Jul 18 15:01:40 2005
+++ event/ChangeLog Mon Sep 12 21:22:01 2005
@@ -1,3 +1,11 @@
+2005-09-12 Kevin L. Mitchell <kl...@mi...>
+
+ * tests/Makefile.am (check_PROGRAMS): add t_timer_fcns to list of
+ test programs to build...
+
+ * tests/t_timer_fcns.c: begin writing test suite for timer
+ functions
+
2005-07-18 Kevin L. Mitchell <kl...@mi...>
* timer_resched.c: timer_resched() function
Index: event/tests/Makefile.am
diff -u event/tests/Makefile.am:1.6 event/tests/Makefile.am:1.7
--- event/tests/Makefile.am:1.6 Mon Jul 11 16:34:34 2005
+++ event/tests/Makefile.am Mon Sep 12 21:22:01 2005
@@ -14,7 +14,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
-## @(#)$Id: Makefile.am,v 1.6 2005/07/11 23:34:34 klmitch Exp $
+## @(#)$Id: Makefile.am,v 1.7 2005/09/13 04:22:01 klmitch Exp $
##
## Process this file with automake to generate Makefile.in
@@ -29,7 +29,9 @@
t_event_attrs \
t_event_init \
t_evg_register \
- t_evg_alloc
+ t_evg_alloc \
+ \
+ t_timer_fcns
check_LTLIBRARIES = engmodinit.la engmodule.la
engmodinit_la_LDFLAGS = -module -avoid-version -rpath @abs_builddir@
Index: event/tests/t_timer_fcns.c
diff -u /dev/null event/tests/t_timer_fcns.c:1.1
--- /dev/null Mon Sep 12 21:22:11 2005
+++ event/tests/t_timer_fcns.c Mon Sep 12 21:22:01 2005
@@ -0,0 +1,258 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: t_timer_fcns.c,v 1.1 2005/09/13 04:22:01 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Test suite for timer_create(), timer_destroy(), and
+ * timer_reched() functions.
+ *
+ * This test program is used to test the operation of the timer
+ * manipulation functions.
+ */
+#include "event-test.h"
+
+#include <sys/time.h>
+
+RCSTAG("@(#)$Id: t_timer_fcns.c,v 1.1 2005/09/13 04:22:01 klmitch Exp $");
+
+TEST_PROG(t_timer_fcns, "Test operation of timer manipulation functions")
+ TEST_ARG(t_timer_fcns, "<event-test.tc>")
+ TEST_ARG(t_timer_fcns, "<engmodule.la>")
+ TEST_DEP(t_timer_fcns, t_evg_alloc)
+
+/** \internal
+ * \brief Number of seconds for current time.
+ *
+ * This macro simply contains the number of seconds for the "current"
+ * time for testing purposes. (There's nothing special about this
+ * number; it's just the value for Monday, September 12, 21:03:15 EDT
+ * 2005, which just happens to be when this test program was written.)
+ */
+#define TTF_SEC 1126573395
+
+/** \internal
+ * \brief Number of microseconds for current time.
+ *
+ * This macro simply contains the number of microseconds for the
+ * "current" time for testing purposes. (There's nothing special
+ * about this number; see #TTF_SEC.)
+ */
+#define TTF_USEC 1234
+
+/** \internal
+ * \brief Overridden gettimeofday() function.
+ *
+ * This is an override of the C library's gettimeofday() function.
+ * Since it's not ANSI, we're supposed to be able to do so. We're
+ * doing this to be able to control what periodic and relative timers
+ * have their expire time set to, for testing purposes.
+ *
+ * \param tv A struct timeval to be filled in.
+ * \param tz The timezone (obsolete).
+ *
+ * \retval 0 The operation completed successfully.
+ * \retval -1 There was an error getting the time.
+ */
+int
+gettimeofday(struct timeval *tv, struct timezone *tz)
+{
+ tv->tv_sec = TTF_SEC; /* Set the "current" time (for testing purposes) */
+ tv->tv_usec = TTF_USEC;
+
+ return 0;
+}
+
+/** \internal
+ * \brief Structure for defining a timer to create.
+ *
+ * This structure contains the arguments that should be passed to
+ * timer_create() to create a set of timers for testing purposes.
+ */
+struct test_timer {
+ const ev_timtype_t type; /**< Timer type to create. */
+ const time_t sec; /**< Seconds for timer expiration. */
+ const suseconds_t usec; /**< Microseconds for timer creation. */
+ const time_t e_sec; /**< Expected expiration time. */
+ const suseconds_t e_usec; /**< Expected expiration microseconds. */
+ const ev_flags_t flags; /**< Test flags to apply. */
+ ev_tim_t *timer; /**< Actual created timer. */
+};
+
+/** \internal
+ * \brief Timer destruction flag.
+ *
+ * This flag indicates that the timer will be passed to
+ * timer_destroy() in order to test that function.
+ */
+#define TT_FLAG_DESTROY 0x0001
+
+/** \internal
+ * \brief Initializer for test timers.
+ *
+ * This macro initializes an element of the test timer array.
+ *
+ * \warning This macro evaluates the \p type argument multiple times.
+ *
+ * \param type One of #TT_ABSOLUTE, #TT_RELATIVE, or #TT_PERIODIC, to
+ * specify the desired timer type.
+ * \param sec The seconds value for the timer expiration time.
+ * \param usec The microseconds value for the timer expiration time.
+ * \param flags Flags affecting how the timer will be tested.
+ */
+#define timer_init(type, sec, usec, flags) \
+ { (type), (sec), (usec), ((type) == TT_ABSOLUTE ? (sec) : (sec) + TTF_SEC), \
+ ((type) == TT_ABSOLUTE ? (usec) : (usec) + TTF_USEC), (flags), 0 }
+
+/** \internal
+ * \brief Array of test timers.
+ *
+ * This array contains all the information for the timers which will
+ * be created in the process of testing timer_create() and friends.
+ */
+static struct test_timer timers[] = {
+ timer_init(TT_PERIODIC, 47, 1361, TT_FLAG_DESTROY),
+ timer_init(TT_PERIODIC, 8, 3302, 0),
+ timer_init(TT_RELATIVE, 44, 3411, TT_FLAG_DESTROY),
+ timer_init(TT_RELATIVE, 12, 1836, 0),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 15, TTF_USEC + 4422, TT_FLAG_DESTROY),
+ timer_init(TT_PERIODIC, 42, 2714, 0),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 49, TTF_USEC + 1979, TT_FLAG_DESTROY),
+ timer_init(TT_PERIODIC, 17, 1635, TT_FLAG_DESTROY),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 20, TTF_USEC + 4995, 0),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 7, TTF_USEC + 1599, TT_FLAG_DESTROY),
+ timer_init(TT_RELATIVE, 37, 2669, TT_FLAG_DESTROY),
+ timer_init(TT_PERIODIC, 47, 4197, TT_FLAG_DESTROY),
+ timer_init(TT_RELATIVE, 47, 3253, 0),
+ timer_init(TT_RELATIVE, 1, 2703, TT_FLAG_DESTROY),
+ timer_init(TT_PERIODIC, 22, 1511, 0),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 11, TTF_USEC + 4312, TT_FLAG_DESTROY),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 33, TTF_USEC + 2035, TT_FLAG_DESTROY),
+ timer_init(TT_PERIODIC, 41, 3077, TT_FLAG_DESTROY),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 17, TTF_USEC + 2143, 0),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 5, TTF_USEC + 232, TT_FLAG_DESTROY),
+ timer_init(TT_RELATIVE, 35, 2884, TT_FLAG_DESTROY),
+ timer_init(TT_PERIODIC, 27, 4372, TT_FLAG_DESTROY),
+ timer_init(TT_PERIODIC, 39, 4811, TT_FLAG_DESTROY),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 5, TTF_USEC + 633, 0),
+ timer_init(TT_RELATIVE, 41, 1559, 0),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 12, TTF_USEC + 393, 0),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 40, TTF_USEC + 3946, 0),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 48, TTF_USEC + 1220, 0),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 34, TTF_USEC + 275, 0),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 14, TTF_USEC + 752, 0),
+ timer_init(TT_RELATIVE, 25, 4716, TT_FLAG_DESTROY),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 15, TTF_USEC + 2953, 0),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 30, TTF_USEC + 231, 0),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 25, TTF_USEC + 721, TT_FLAG_DESTROY),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 28, TTF_USEC + 217, TT_FLAG_DESTROY),
+ timer_init(TT_RELATIVE, 4, 121, TT_FLAG_DESTROY),
+ timer_init(TT_RELATIVE, 23, 4198, 0),
+ timer_init(TT_PERIODIC, 21, 3641, 0),
+ timer_init(TT_ABSOLUTE, TTF_SEC + 48, TTF_USEC + 2214, 0),
+ timer_init(TT_RELATIVE, 19, 2721, TT_FLAG_DESTROY)
+};
+
+static void
+print_node(ev_ctx_t *ctx, char *prefix, int plen, int pipe, ev_tim_t *node)
+{
+ const char *tim_type[] = { "ABSOLUTE", "RELATIVE", "PERIODIC" };
+
+ if (!node) {
+ printf("%.*s%c-NO NODE\n", plen, prefix, pipe);
+ return;
+ }
+
+ printf("%.*s%c-%p %s: (%ld,%ld) (%ld,%ld)%s%s\n", plen, prefix, pipe,
+ (void *)node, tim_type[ti_type(node)], ti_value(node)->tv_sec,
+ ti_value(node)->tv_usec, ti_expire(node)->tv_sec,
+ ti_expire(node)->tv_usec,
+ node == ctx->ec_timtree.tt_root ? " (ROOT NODE)" : "",
+ node == ctx->ec_timtree.tt_insert ? " (Insertion cursor)" : "");
+
+ if (pipe != '|')
+ pipe = ' ';
+
+ printf("%.*s%c | (^ %p > %p < %p l %p r %p)\n", plen,
+ prefix, pipe, (void *)node->ti_node.tn_parent,
+ (void *)node->ti_node.tn_next, (void *)node->ti_node.tn_prev,
+ (void *)node->ti_node.tn_left, (void *)node->ti_node.tn_right);
+
+ prefix[plen] = pipe;
+ prefix[plen + 1] = ' ';
+
+ print_node(ctx, prefix, plen + 2, '|', node->ti_node.tn_left);
+ print_node(ctx, prefix, plen + 2, '`', node->ti_node.tn_right);
+}
+
+static void
+print_tree(ev_ctx_t *ctx)
+{
+ char prefix[30];
+
+ printf("Timer tree rooted at %p; insertion cursor %p\n",
+ (void *)ctx->ec_timtree.tt_root, (void *)ctx->ec_timtree.tt_insert);
+
+ prefix[0] = '\0';
+ print_node(ctx, prefix, 0, '`', ctx->ec_timtree.tt_root);
+}
+
+/** \internal
+ * \brief Timer manipulation functions test program.
+ *
+ * This program is used for testing the timer manipulation functions
+ * timer_create(), timer_destroy(), and timer_resched().
+ */
+int
+main(int argc, char **argv)
+{
+ int i;
+ char *prog;
+ ev_err_t err;
+ ev_ctx_t ctx;
+ struct timeval tv;
+
+ ev_test_init(t_timer_fcns); /* initialize test program */
+ ev_prog_name(prog, argv); /* calculate program name... */
+ ev_lib_init(argc, argv, prog, &ctx); /* initialize event library */
+
+ TEST_DECL(t_timer_fcns, timer_create, "Test that timers may be created")
+ for (i = 0; i < sizeof(timers) / sizeof(struct test_timer); i++) {
+ /* Set up the timer value... */
+ tv.tv_sec = timers[i].sec;
+ tv.tv_usec = timers[i].usec;
+
+ /* execute the test case... */
+ if ((err = timer_create(&ctx, timers[i].type, &tv, 0, 0,
+ &timers[i].timer)))
+ FAIL(TEST_NAME(timer_create), FATAL(0), "timer_create() failed with "
+ "error %u", err);
+ else if (ti_type(timers[i].timer) != timers[i].type ||
+ ti_value(timers[i].timer)->tv_sec != timers[i].sec ||
+ ti_value(timers[i].timer)->tv_usec != timers[i].usec ||
+ ti_expire(timers[i].timer)->tv_sec != timers[i].e_sec ||
+ ti_expire(timers[i].timer)->tv_usec != timers[i].e_usec)
+ FAIL(TEST_NAME(timer_create), FATAL(0), "timer_create() failed to set "
+ "timer values properly");
+ }
+ PASS(TEST_NAME(timer_create), "timer_create() created timers correctly");
+
+ print_tree(&ctx);
+
+ return 0;
+}
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-07-18 22:02:17
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-07-18 22:01:51 UTC
Modified files:
ChangeLog Makefile.am engine_activate.c engine_register.c
engines_int.h event.h event_attr_engine.c event_int.h
Added files:
_timer_heapify.c timer_create.c timer_destroy.c timer_resched.c
Log message:
Flesh out the timer interface and fix a couple of minor problems
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.48 event/ChangeLog:1.49
--- event/ChangeLog:1.48 Sat Jul 16 18:03:08 2005
+++ event/ChangeLog Mon Jul 18 15:01:40 2005
@@ -1,3 +1,47 @@
+2005-07-18 Kevin L. Mitchell <kl...@mi...>
+
+ * timer_resched.c: timer_resched() function
+
+ * timer_destroy.c: _timer_untree() and timer_destroy() functions
+
+ * timer_create.c: _timer_insert() and timer_create() functions
+
+ * event_int.h: include sock.h, sig.h, and tim.h; include
+ sys/types.h for gettimeofday() prototype; initialize eg_ref field
+ of generator header; fix typo in tt_node_init() ('tt' for 'tn');
+ remove unnecessary tt_node_update(); add ti_expire_comp() to
+ recompute timer expiration time; add _timer_insert() function to
+ insert timers into timer tree; mention return values for
+ _timer_heapify_{up,down}(); add _gca_nonnull() to declarations for
+ _timer_heapify_{up,down}(); declare _timer_untree() to remove
+ timers from timer tree
+
+ * event_attr_engine.c (event_attr_engine): allow engines to
+ support timers without actually having any timer callbacks
+
+ * event.h: add reference count field to generator header; add
+ EV_GEN_DELETED flag to indicate that generator has been deleted;
+ add eg_ref() to retrieve reference count, eg_ref_inc() to
+ increment reference count, and eg_ref_dec() to decrement reference
+ count and release memory
+
+ * engines_int.h: move includes for sock.h, sig.h, and tim.h to
+ event_int.h; redefine eng_tim_{add,rem} to return 0 if the
+ callback is NULL
+
+ * engine_register.c (engine_register): allow engines to support
+ timers without actually having any timer callbacks
+
+ * engine_activate.c: add a missing \file to documentation comment
+ (doxyment?)
+
+ * _timer_heapify.c: two internal functions and a helper function
+ to restore the heap property of the timer tree
+
+ * Makefile.am (libevent_la_SOURCES): add new files
+ _timer_heapify.c, timer_create.c, timer_resched.c, and
+ timer_destroy.c
+
2005-07-16 Kevin L. Mitchell <kl...@mi...>
* tim.h: write some group documentation for timers; build ev_tim_t
Index: event/Makefile.am
diff -u event/Makefile.am:1.15 event/Makefile.am:1.16
--- event/Makefile.am:1.15 Mon Jul 11 16:34:31 2005
+++ event/Makefile.am Mon Jul 18 15:01:40 2005
@@ -16,7 +16,7 @@
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
-## @(#)$Id: Makefile.am,v 1.15 2005/07/11 23:34:31 klmitch Exp $
+## @(#)$Id: Makefile.am,v 1.16 2005/07/18 22:01:40 klmitch Exp $
##
## Process this file with automake to generate Makefile.in
@@ -41,7 +41,9 @@
event_attr_destroy.c \
_ev_gen_lookup.c event_gen_register.c \
event_gen_alloc.c event_gen_release.c \
- event_log.c
+ event_log.c \
+ _timer_heapify.c \
+ timer_create.c timer_resched.c timer_destroy.c
libevent_la_LIBADD = @EVENT_ET_OBJS@ @TREECONF_LIBS@ @LIBLTDL@
libevent_la_DEPENDENCIES = @EVENT_ET_OBJS@
libevent_la_LDFLAGS = -version-info 0:0:0
Index: event/_timer_heapify.c
diff -u /dev/null event/_timer_heapify.c:1.6
--- /dev/null Mon Jul 18 15:02:02 2005
+++ event/_timer_heapify.c Mon Jul 18 15:01:40 2005
@@ -0,0 +1,148 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: _timer_heapify.c,v 1.6 2005/07/18 22:01:40 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Implementation of _timer_heapify_up() and
+ * _timer_heapify_down().
+ *
+ * This file contains the implementation of the _timer_heapify_up()
+ * and the _timer_heapify_down() functions, used to restore the heap
+ * property in the timer tree.
+ */
+#include "event_int.h"
+
+RCSTAG("@(#)$Id: _timer_heapify.c,v 1.6 2005/07/18 22:01:40 klmitch Exp $");
+
+/** \internal
+ * \brief Swap a node with its parent.
+ *
+ * This helper function swaps a node with its parent, performing, in
+ * essence, a tree rotation.
+ *
+ * \param ctx A pointer to an #ev_ctx_t.
+ * \param tim A pointer to an #ev_tim_t specifying the timer to
+ * rotate up.
+ *
+ * \return Zero on success, non-zero if an assertion failure
+ * occurs.
+ */
+static ev_err_t
+node_swap(ev_ctx_t *ctx, ev_tim_t *tim)
+{
+ ev_tim_t *parent = tim->ti_node.tn_parent;
+ _ev_timnode_t swap;
+
+ ev_trace();
+
+ /* First, let's swap the node pointer values */
+ swap = parent->ti_node;
+ parent->ti_node = tim->ti_node;
+ tim->ti_node = swap;
+
+ /* one or the other of these must be true... */
+ ev_assert(tim->ti_node.tn_left == tim || tim->ti_node.tn_right == tim);
+
+ /* Fix up the timer for its new position... */
+ if (tim->ti_node.tn_left == tim)
+ tim->ti_node.tn_left = parent;
+ else
+ tim->ti_node.tn_right = parent;
+
+ /* make sure parent was linked... */
+ ev_assert((!tim->ti_node.tn_parent && ctx->ec_timtree.tt_root == parent) ||
+ tim->ti_node.tn_parent->ti_node.tn_left == parent ||
+ tim->ti_node.tn_parent->ti_node.tn_right == parent);
+
+ /* fix up timer's parent for the new position */
+ if (!tim->ti_node.tn_parent) /* no parent, must be the root of the tree */
+ ctx->ec_timtree.tt_root = tim;
+ else if (tim->ti_node.tn_parent->ti_node.tn_left == parent)
+ tim->ti_node.tn_parent->ti_node.tn_left = tim;
+ else
+ tim->ti_node.tn_parent->ti_node.tn_right = tim;
+
+ /* Now fix up the linked list... */
+ if (tim->ti_node.tn_next == tim)
+ tim->ti_node.tn_next = parent;
+ if (tim->ti_node.tn_prev == tim)
+ tim->ti_node.tn_prev = parent;
+ if (parent->ti_node.tn_next == parent)
+ parent->ti_node.tn_next = tim;
+ if (parent->ti_node.tn_prev == parent)
+ parent->ti_node.tn_prev = tim;
+
+ /* make sure everyone else is pointing at the right place... */
+ tt_node_fix(parent);
+ tt_node_fix(tim);
+
+ /* finally, update the insertion cursor */
+ if (ctx->ec_timtree.tt_insert == parent)
+ ctx->ec_timtree.tt_insert = tim;
+ else if (ctx->ec_timtree.tt_insert == tim)
+ ctx->ec_timtree.tt_insert = parent;
+
+ ev_return(0);
+}
+
+ev_err_t
+_timer_heapify_up(ev_ctx_t *ctx, ev_tim_t *tim)
+{
+ ev_err_t err;
+
+ ev_trace();
+
+ /* bubble earlier timeouts upwards */
+ while (tim->ti_node.tn_parent &&
+ tv_comp(&tim->ti_expire, &tim->ti_node.tn_parent->ti_expire) < 0)
+ if ((err = node_swap(ctx, tim)))
+ ev_return(err); /* handle any assertion failures that cropped up */
+
+ ev_return(0);
+}
+
+ev_err_t
+_timer_heapify_down(ev_ctx_t *ctx, ev_tim_t *tim)
+{
+ ev_err_t err = 0;
+ int left, right;
+
+ ev_trace();
+
+ /* bubble later timeouts downwards */
+ while (1) { /* first, calculate the delta with the children */
+ left = (!tim->ti_node.tn_left ? 0 :
+ tv_comp(&tim->ti_expire, &tim->ti_node.tn_left->ti_expire));
+ right = (!tim->ti_node.tn_right ? 0 :
+ tv_comp(&tim->ti_expire, &tim->ti_node.tn_right->ti_expire));
+
+ if (left <= 0 && right <= 0) /* in order? stop heapifying... */
+ break;
+
+ if (left > right) /* check which node to swap with... */
+ err = node_swap(ctx, tim->ti_node.tn_left);
+ else
+ err = node_swap(ctx, tim->ti_node.tn_right);
+
+ if (err) /* handle any assertion failures that cropped up */
+ ev_return(err);
+ }
+
+ ev_return(0);
+}
Index: event/engine_activate.c
diff -u event/engine_activate.c:1.2 event/engine_activate.c:1.3
--- event/engine_activate.c:1.2 Mon Jul 11 16:34:32 2005
+++ event/engine_activate.c Mon Jul 18 15:01:40 2005
@@ -15,9 +15,10 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: engine_activate.c,v 1.2 2005/07/11 23:34:32 klmitch Exp $
+** @(#)$Id: engine_activate.c,v 1.3 2005/07/18 22:01:40 klmitch Exp $
*/
/** \internal
+ * \file
* \brief Implementation of engine_activate().
*
* This file contains the implementation of the engine_activate()
@@ -25,7 +26,7 @@
*/
#include "engines_int.h"
-RCSTAG("@(#)$Id: engine_activate.c,v 1.2 2005/07/11 23:34:32 klmitch Exp $");
+RCSTAG("@(#)$Id: engine_activate.c,v 1.3 2005/07/18 22:01:40 klmitch Exp $");
/** \internal
* \brief Link an engine into the specified active linked list.
Index: event/engine_register.c
diff -u event/engine_register.c:1.4 event/engine_register.c:1.5
--- event/engine_register.c:1.4 Thu Jun 23 20:06:20 2005
+++ event/engine_register.c Mon Jul 18 15:01:40 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: engine_register.c,v 1.4 2005/06/24 03:06:20 klmitch Exp $
+** @(#)$Id: engine_register.c,v 1.5 2005/07/18 22:01:40 klmitch Exp $
*/
/** \internal
* \file
@@ -28,7 +28,7 @@
#include <string.h>
-RCSTAG("@(#)$Id: engine_register.c,v 1.4 2005/06/24 03:06:20 klmitch Exp $");
+RCSTAG("@(#)$Id: engine_register.c,v 1.5 2005/07/18 22:01:40 klmitch Exp $");
ev_err_t
engine_register(ev_ctx_t *ctx, ev_engine_t *engine)
@@ -51,11 +51,8 @@
/* If it has a signal component, does it have the signal methods? */
((engine->eng_flags & EV_ENGINE_SIGNAL) &&
- (!engine->eng_signal.esi_add || !engine->eng_signal.esi_rem)) ||
-
- /* If it has a timer component, does it have the timer methods? */
- ((engine->eng_flags & EV_ENGINE_TIMER) &&
- (!engine->eng_timer.eti_add || !engine->eng_timer.eti_rem)))
+ (!engine->eng_signal.esi_add || !engine->eng_signal.esi_rem)))
+ /* timer components don't necessarily need add/remove callbacks */
ev_return(EINVAL); /* verify arguments */
if ((engine->eng_runfl & EV_ENGINE_REGISTERED) ||
Index: event/engines_int.h
diff -u event/engines_int.h:1.9 event/engines_int.h:1.10
--- event/engines_int.h:1.9 Mon Jul 11 16:34:32 2005
+++ event/engines_int.h Mon Jul 18 15:01:40 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: engines_int.h,v 1.9 2005/07/11 23:34:32 klmitch Exp $
+** @(#)$Id: engines_int.h,v 1.10 2005/07/18 22:01:40 klmitch Exp $
*/
#ifndef __include_engine_int_h__
#define __include_engine_int_h__
@@ -31,9 +31,6 @@
#include "event_int.h"
-#include "sock.h"
-#include "sig.h"
-#include "tim.h"
#include "engines.h"
/** \internal
@@ -199,7 +196,9 @@
* \return A non-zero error code, or 0 on success.
*/
#define eng_tim_add(ctx, eng, tim) \
- ((eng)->eng_timer.eti_add)((ctx), (eng), (tim))
+ (!(eng)->eng_timer.eti_add ? 0 : \
+ ((eng)->eng_timer.eti_add)((ctx), (eng), \
+ (tim)))
/** \internal
* \brief Remove a timer from an event engine.
@@ -217,7 +216,9 @@
* \return A non-zero error code, or 0 on success.
*/
#define eng_tim_rem(ctx, eng, tim) \
- ((eng)->eng_timer.eti_rem)((ctx), (eng), (tim))
+ (!(eng)->eng_timer.eti_rem ? 0 : \
+ ((eng)->eng_timer.eti_rem)((ctx), (eng), \
+ (tim)))
/** \internal
* \brief Clear an #_ev_englink_t.
Index: event/event.h
diff -u event/event.h:1.25 event/event.h:1.26
--- event/event.h:1.25 Sat Jul 16 18:03:08 2005
+++ event/event.h Mon Jul 18 15:01:40 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event.h,v 1.25 2005/07/17 01:03:08 klmitch Exp $
+** @(#)$Id: event.h,v 1.26 2005/07/18 22:01:40 klmitch Exp $
*/
#ifndef __include_event_event_h__
#define __include_event_event_h__
@@ -592,6 +592,7 @@
ev_genhdr_t *eg_next; /**< Next generator in the list. */
ev_genhdr_t *eg_prev; /**< Previous generator in the list. */
ev_ctx_t *eg_context; /**< Responsible context. */
+ unsigned int eg_ref; /**< Reference count. */
ev_call_t eg_callback; /**< Callback function. */
void *eg_calldata; /**< Data for callback function. */
union {
@@ -607,6 +608,13 @@
*/
#define EV_GEN_ACTIVE 0x00000001
+/** \brief Generator deleted.
+ *
+ * This flag is used by generator handlers to indicate that a given
+ * generator is in the process of being deleted.
+ */
+#define EV_GEN_DELETED 0X00000002
+
/** \internal
* \brief Generator header.
*
@@ -712,6 +720,43 @@
*/
#define eg_context(gen) (_eg_hdr(gen)->eg_context)
+/** \brief Retrieve reference count.
+ *
+ * This macro returns the reference count for the generator.
+ *
+ * \param gen A pointer to an #ev_genhdr_t.
+ *
+ * \return An <CODE>unsigned int</CODE> specifying the current
+ * reference count for the generator.
+ */
+#define eg_ref(gen) (_eg_hdr(gen)->eg_ref)
+
+/** \brief Increment reference count.
+ *
+ * This macro simply increments the reference count for the
+ * generator.
+ *
+ * \param ctx A pointer to an #ev_ctx_t.
+ * \param gen A pointer to an #ev_genhdr_t.
+ */
+#define eg_ref_inc(ctx, gen) (_eg_hdr(gen)->eg_ref++)
+
+/** \brief Decrement reference count.
+ *
+ * This macro decrements the reference count for a generator. If the
+ * reference count hits zero and the #EV_GEN_DELETED flag is set, the
+ * generator will be released by a call to event_gen_release().
+ *
+ * \param ctx A pointer to an #ev_ctx_t.
+ * \param gen A pointer to an #ev_genhdr_t.
+ */
+#define eg_ref_dec(ctx, gen) \
+do { \
+ ev_genhdr_t *_gen = _eg_hdr(gen); \
+ if (_gen->eg_ref && !--_gen->eg_ref && (_gen->eg_flags & EV_GEN_DELETED)) \
+ event_gen_release((ctx), _gen); /* release the generator */ \
+} while (0)
+
/** \brief Generator callback.
*
* This macro returns a pointer to the event callback function for the
Index: event/event_attr_engine.c
diff -u event/event_attr_engine.c:1.3 event/event_attr_engine.c:1.4
--- event/event_attr_engine.c:1.3 Thu Jun 23 20:06:20 2005
+++ event/event_attr_engine.c Mon Jul 18 15:01:40 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_attr_engine.c,v 1.3 2005/06/24 03:06:20 klmitch Exp $
+** @(#)$Id: event_attr_engine.c,v 1.4 2005/07/18 22:01:40 klmitch Exp $
*/
/** \internal
* \file
@@ -29,7 +29,7 @@
#include <stdlib.h>
#include <string.h>
-RCSTAG("@(#)$Id: event_attr_engine.c,v 1.3 2005/06/24 03:06:20 klmitch Exp $");
+RCSTAG("@(#)$Id: event_attr_engine.c,v 1.4 2005/07/18 22:01:40 klmitch Exp $");
ev_err_t
event_attr_engine(ev_attr_t *attr, ev_engine_t *engine)
@@ -51,11 +51,8 @@
/* If it has a signal component, does it have the signal methods? */
((engine->eng_flags & EV_ENGINE_SIGNAL) &&
- (!engine->eng_signal.esi_add || !engine->eng_signal.esi_rem)) ||
-
- /* If it has a timer component, does it have the timer methods? */
- ((engine->eng_flags & EV_ENGINE_TIMER) &&
- (!engine->eng_timer.eti_add || !engine->eng_timer.eti_rem)))
+ (!engine->eng_signal.esi_add || !engine->eng_signal.esi_rem)))
+ /* timer components don't necessarily need add/remove callbacks */
ev_return(EINVAL);
if ((engine->eng_runfl & EV_ENGINE_REGISTERED) ||
Index: event/event_int.h
diff -u event/event_int.h:1.28 event/event_int.h:1.29
--- event/event_int.h:1.28 Sat Jul 16 18:03:08 2005
+++ event/event_int.h Mon Jul 18 15:01:41 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_int.h,v 1.28 2005/07/17 01:03:08 klmitch Exp $
+** @(#)$Id: event_int.h,v 1.29 2005/07/18 22:01:41 klmitch Exp $
*/
#ifndef __include_event_int_h__
#define __include_event_int_h__
@@ -43,8 +43,12 @@
#include "event_version.h"
#include "gcc-attrs.h"
#include "event.h"
+#include "sock.h"
+#include "sig.h"
+#include "tim.h"
#include <stdlib.h> /* for size_t, abort() */
+#include <sys/types.h> /* for gettimeofday() */
#include <treeconf/treeconf.h>
/** \def __builtin_expect
@@ -590,6 +594,7 @@
_gen->eg_next = 0; \
_gen->eg_prev = 0; \
_gen->eg_context = (ctx); \
+ _gen->eg_ref = 0; \
_gen->eg_callback = 0; \
_gen->eg_calldata = 0; \
_gen->eg_engdata.egd_int = 0; \
@@ -651,37 +656,35 @@
#define tt_node_init(tim, parent, prev) \
do { \
ev_tim_t *_tim = (tim); \
- _tim->ti_node.tt_parent = (parent); /* initialize node structure */ \
- _tim->ti_node.tt_next = 0; \
- _tim->ti_node.tt_prev = (prev); \
- _tim->ti_node.tt_left = 0; \
- _tim->ti_node.tt_right = 0; \
- if (_tim->ti_node.tt_prev) /* update previous node in thread */ \
- _tim->ti_node.tt_prev->ti_node.tt_next = _tim; \
+ _tim->ti_node.tn_parent = (parent); /* initialize node structure */ \
+ _tim->ti_node.tn_next = 0; \
+ _tim->ti_node.tn_prev = (prev); \
+ _tim->ti_node.tn_left = 0; \
+ _tim->ti_node.tn_right = 0; \
+ if (_tim->ti_node.tn_prev) /* update previous node in thread */ \
+ _tim->ti_node.tn_prev->ti_node.tn_next = _tim; \
} while (0)
/** \internal
- * \brief Update a timer tree node's location.
+ * \brief Compute timer's expiration time.
*
- * This macro is used to adjust the position of the \p tim timer
- * within the timer tree in order to reestablish the \em heap property
- * of the tree.
+ * This macro is used to compute and set the expiration time for the
+ * given timer.
*
- * \param ctx A pointer to an #ev_ctx_t.
- * \param tim A pointer to an #ev_tim_t to be updated.
- * \param ov A pointer to a struct timeval containing the old value
- * of the timer.
+ * \param tim A pointer to the #ev_tim_t to be updated.
*/
-#define tt_node_update(ctx, tim, ov) \
+#define ti_expire_comp(tim) \
do { \
- ev_ctx_t *_ctx = (ctx); \
+ struct timeval _c_tim; \
ev_tim_t *_tim = (tim); \
- struct timeval *_ov = (ov); \
- int _tmp = tv_comp(&_tim->ti_expire, _ov); /* save comparison... */ \
- if (_tmp < 0) /* is the new value earlier than the old? */ \
- _timer_heapify_down(_ctx, _tim); \
- else if (_tmp > 0) /* OK, is it later than the old value? */ \
- _timer_heapify_up(_ctx, _tim); \
+ if (_tim->ti_type == TT_ABSOLUTE) \
+ _tim->ti_expire = _tim->ti_value; /* value is absolute time */ \
+ else { \
+ gettimeofday(&_c_tim, 0); /* get the current time... */ \
+ /* compute the absolute time for expiration */ \
+ tim->ti_expire.tv_sec = _c_tim.tv_sec + _tim->ti_value.tv_sec; \
+ tim->ti_expire.tv_usec = _c_tim.tv_usec + _tim->ti_value.tv_usec; \
+ } \
} while (0)
/** \internal
@@ -725,6 +728,21 @@
_gca_nonnull((1, 3));
/** \internal
+ * \brief Insert a timer into the timer tree.
+ *
+ * This function inserts the given timer into the timer tree,
+ * maintaining the heap property of the tree.
+ *
+ * \param ctx A pointer to an #ev_ctx_t.
+ * \param tim A pointer to an #ev_tim_t to be inserted.
+ *
+ * \return Zero on success, non-zero if an assertion failure
+ * occurs.
+ */
+extern ev_err_t _timer_insert(ev_ctx_t *ctx, ev_tim_t *tim)
+ _gca_nonnull((1, 2));
+
+/** \internal
* \brief Restore timer tree heap property by shifting up.
*
* This function restores the heap property of the timer tree by
@@ -732,8 +750,12 @@
*
* \param ctx A pointer to an #ev_ctx_t.
* \param tim A pointer to an #ev_tim_t.
+ *
+ * \return Zero on success, non-zero if an assertion failure
+ * occurs.
*/
-extern void _timer_heapify_up(ev_ctx_t *ctx, ev_tim_t *tim);
+extern ev_err_t _timer_heapify_up(ev_ctx_t *ctx, ev_tim_t *tim)
+ _gca_nonnull((1, 2));
/** \internal
* \brief Restore timer tree heap property by shifting down.
@@ -743,7 +765,26 @@
*
* \param ctx A pointer to an #ev_ctx_t.
* \param tim A pointer to an #ev_tim_t.
+ *
+ * \return Zero on success, non-zero if an assertion failure
+ * occurs.
+ */
+extern ev_err_t _timer_heapify_down(ev_ctx_t *ctx, ev_tim_t *tim)
+ _gca_nonnull((1, 2));
+
+/** \internal
+ * \brief Remove a timer from the timer tree.
+ *
+ * This function removes the specified timer from the timer tree,
+ * restoring the tree's heap property in the process.
+ *
+ * \param ctx A pointer to an #ev_ctx_t.
+ * \param tim A pointer to the #ev_tim_t to remove from the tree.
+ *
+ * \return Zero on success, non-zero if an assertion failure
+ * occurs.
*/
-extern void _timer_heapify_down(ev_ctx_t *ctx, ev_tim_t *tim);
+extern ev_err_t _timer_untree(ev_ctx_t *ctx, ev_tim_t *tim)
+ _gca_nonnull((1, 2));
#endif /* __include_event_int_h__ */
Index: event/timer_create.c
diff -u /dev/null event/timer_create.c:1.1
--- /dev/null Mon Jul 18 15:02:04 2005
+++ event/timer_create.c Mon Jul 18 15:01:41 2005
@@ -0,0 +1,133 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: timer_create.c,v 1.1 2005/07/18 22:01:41 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Implementation of _timer_insert() and timer_create().
+ *
+ * This file contains the implementation of the timer_create()
+ * function, used to create a new timer, as well as the implementation
+ * of the _timer_insert() function to insert a timer into the timer
+ * tree.
+ */
+#include "engines_int.h"
+
+RCSTAG("@(#)$Id: timer_create.c,v 1.1 2005/07/18 22:01:41 klmitch Exp $");
+
+ev_err_t
+_timer_insert(ev_ctx_t *ctx, ev_tim_t *tim)
+{
+ ev_err_t err = 0;
+
+ ev_trace();
+
+ /* Let's add the timer to the tree... */
+ if (!ctx->ec_timtree.tt_root) { /* tree is empty... */
+ ctx->ec_timtree.tt_root = tim; /* put timer at root... */
+
+ tt_node_init(tim, 0, 0); /* initialize timer node */
+ } else if (!ctx->ec_timtree.tt_insert) { /* no insertion cursor? */
+ ev_assert(ctx->ec_timtree.tt_root);
+
+ ctx->ec_timtree.tt_root->ti_node.tn_left = tim; /* put on the left */
+ ctx->ec_timtree.tt_insert = ctx->ec_timtree.tt_root; /* insert at root */
+
+ tt_node_init(tim, ctx->ec_timtree.tt_root, ctx->ec_timtree.tt_root);
+ } else if (!ctx->ec_timtree.tt_insert->ti_node.tn_right) {
+ ev_assert(ctx->ec_timtree.tt_insert->ti_node.tn_left);
+
+ /* insertion cursor points at half-full node, so insert there */
+ ctx->ec_timtree.tt_insert->ti_node.tn_right = tim;
+
+ tt_node_init(tim, ctx->ec_timtree.tt_insert, /* initialize timer node */
+ ctx->ec_timtree.tt_insert->ti_node.tn_left);
+ } else { /* insertion cursor points at a full node... */
+ ev_assert(ctx->ec_timtree.tt_insert->ti_node.tn_left);
+ ev_assert(ctx->ec_timtree.tt_insert->ti_node.tn_next);
+
+ /* add timer to next timer after insertion cursor */
+ ctx->ec_timtree.tt_insert->ti_node.tn_next->ti_node.tn_left = tim;
+
+ /* initialize the timer node */
+ tt_node_init(tim, ctx->ec_timtree.tt_insert->ti_node.tn_next,
+ ctx->ec_timtree.tt_insert->ti_node.tn_right);
+
+ /* move the insertion cursor */
+ ctx->ec_timtree.tt_insert = ctx->ec_timtree.tt_insert->ti_node.tn_next;
+ }
+
+ if ((err = _timer_heapify_up(ctx, tim))) /* heapify the thing */
+ timer_destroy(ctx, tim); /* failed, destroy the timer... */
+
+ ev_return(err);
+}
+
+ev_err_t
+timer_create(ev_ctx_t *ctx, ev_timtype_t type, struct timeval *value,
+ ev_call_t call, void *data, ev_tim_t **tim_p)
+{
+ ev_engine_t *eng;
+ ev_err_t err = 0;
+ ev_tim_t *tim;
+
+ ev_init(); /* make sure library is initialized... */
+
+ /* sanity-check the arguments... */
+ if (!ec_verify(ctx) || (type != TT_ABSOLUTE && type != TT_RELATIVE &&
+ type != TT_PERIODIC) || !value)
+ ev_return(EINVAL);
+
+ /* Let's allocate a generator... */
+ if ((err = event_gen_alloc(ctx, EGT_TIMER, (ev_genhdr_t **)&tim)))
+ ev_return(err);
+
+ /* Set callback information */
+ if (call) { /* only set fields if there was a callback specified */
+ eg_callback_set(tim, call);
+ eg_calldata_set(tim, data);
+ }
+
+ /* Now initialize the timer fields... */
+ tim->ti_type = type;
+ tim->ti_value = *value;
+ ti_expire_comp(tim); /* compute expiration time... */
+
+ /* Walk through all the timer engines... */
+ for (eng = ctx->ec_timer.el_first; eng;
+ eng = eng->eng_timer.eti_active.el_next)
+ if ((err = eng_tim_add(ctx, eng, tim))) { /* add to engine... */
+ /* oops! Error occurred. Walk engines backwards and remove timer */
+ for (; eng; eng = eng->eng_timer.eti_active.el_prev)
+ eng_tim_rem(ctx, eng, tim);
+
+ event_gen_release(ctx, (ev_genhdr_t *)tim); /* release timer memory */
+
+ ev_return(err); /* return the error */
+ }
+
+ if ((err = _timer_insert(ctx, tim))) /* insert into the tree */
+ ev_return(err);
+
+ eg_ref_inc(ctx, tim); /* increment the reference count */
+
+ if (tim_p) /* did caller want the timer? */
+ *tim_p = tim; /* then return it */
+
+ ev_return(0);
+}
Index: event/timer_destroy.c
diff -u /dev/null event/timer_destroy.c:1.1
--- /dev/null Mon Jul 18 15:02:05 2005
+++ event/timer_destroy.c Mon Jul 18 15:01:41 2005
@@ -0,0 +1,134 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: timer_destroy.c,v 1.1 2005/07/18 22:01:41 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Implementation of _timer_untree() and timer_destroy().
+ *
+ * This file contains the implementation of the timer_destroy()
+ * function and its helper, _timer_untree().
+ */
+#include "engines_int.h"
+
+RCSTAG("@(#)$Id: timer_destroy.c,v 1.1 2005/07/18 22:01:41 klmitch Exp $");
+
+ev_err_t
+_timer_untree(ev_ctx_t *ctx, ev_tim_t *tim)
+{
+ ev_tim_t *end;
+ ev_err_t err = 0;
+
+ ev_trace();
+
+ ev_assert(ctx->ec_timtree.tt_root);
+
+ /* Check to see if this is the last timer in the tree */
+ if (!ctx->ec_timtree.tt_root->ti_node.tn_left) {
+ ev_assert(ctx->ec_timtree.tt_root == tim);
+
+ /* empty the tree */
+ ctx->ec_timtree.tt_root = 0;
+ ctx->ec_timtree.tt_insert = 0;
+
+ /* Clear the node pointers */
+ tt_node_init(tim, 0, 0);
+
+ ev_return(0); /* short-circuit the rest of the checks */
+ }
+
+ ev_assert(ctx->ec_timtree.tt_insert);
+
+ /* Find the end node of the tree... */
+ if (ctx->ec_timtree.tt_insert->ti_node.tn_right) {
+ /* cursor points to a full node; grab the right child... */
+ end = ctx->ec_timtree.tt_insert->ti_node.tn_right;
+ ctx->ec_timtree.tt_insert->ti_node.tn_right = 0;
+ } else { /* cursor points to a half-full node... */
+ end = ctx->ec_timtree.tt_insert->ti_node.tn_left; /* take left child */
+ ctx->ec_timtree.tt_insert->ti_node.tn_left = 0;
+
+ /* Move the cursor back to point at a full node if there is one... */
+ ctx->ec_timtree.tt_insert =
+ (ctx->ec_timtree.tt_insert->ti_node.tn_prev == ctx->ec_timtree.tt_root &&
+ !ctx->ec_timtree.tt_root->ti_node.tn_left) ?
+ 0 : ctx->ec_timtree.tt_insert->ti_node.tn_prev;
+ }
+
+ ev_assert(end->ti_node.tn_prev);
+ ev_assert(!end->ti_node.tn_next);
+
+ /* unlink end node from the linked list threading through the tree */
+ end->ti_node.tn_prev->ti_node.tn_next = 0;
+
+ if (end != tim) { /* substitute end node for timer */
+ int tmp;
+
+ end->ti_node = tim->ti_node; /* move node pointers over */
+ tt_node_fix(end); /* fix most of the referring pointers */
+
+ if (!end->ti_node.tn_parent) /* no parent means this is the root... */
+ ctx->ec_timtree.tt_root = end;
+ else if (end->ti_node.tn_parent->ti_node.tn_left == tim)
+ /* parent pointed from the left; update that pointer */
+ end->ti_node.tn_parent->ti_node.tn_left = end;
+ else /* parent pointed from the right; update that pointer */
+ end->ti_node.tn_parent->ti_node.tn_right = end;
+
+ if (ctx->ec_timtree.tt_insert == tim) /* fix insertion cursor */
+ ctx->ec_timtree.tt_insert = end;
+
+ if ((tmp = tv_comp(&end->ti_expire, &tim->ti_expire)) < 0)
+ /* new value is earlier than the old timer */
+ err = _timer_heapify_down(ctx, end);
+ else if (tmp > 0) /* new value is later than the old timer */
+ err = _timer_heapify_up(ctx, end);
+ }
+
+ tt_node_init(tim, 0, 0); /* clear the node */
+
+ ev_return(err);
+}
+
+ev_err_t
+timer_destroy(ev_ctx_t *ctx, ev_tim_t *tim)
+{
+ ev_engine_t *eng;
+ ev_err_t err, err2;
+
+ ev_init(); /* make sure library is initialized... */
+
+ /* sanity-check the arguments... */
+ if (!ec_verify(ctx) || !ti_verify(tim) || eg_context(tim) != ctx)
+ return EINVAL;
+
+ err = _timer_untree(ctx, tim); /* remove timer from timer tree... */
+
+ /* Walk through all the timer engines (last to first)... */
+ for (eng = ctx->ec_timer.el_last; eng;
+ eng = eng->eng_timer.eti_active.el_prev)
+ if ((err2 = eng_tim_rem(ctx, eng, tim)) && !err) /* remove the timer... */
+ err = err2; /* don't interrupt removal, but remember error code */
+
+ eg_flags_set(tim, EV_GEN_DELETED); /* mark it as deleted */
+
+ /* decrement the reference count */
+ eg_ref_dec(ctx, tim);
+
+ ev_return(err);
+}
Index: event/timer_resched.c
diff -u /dev/null event/timer_resched.c:1.1
--- /dev/null Mon Jul 18 15:02:05 2005
+++ event/timer_resched.c Mon Jul 18 15:01:41 2005
@@ -0,0 +1,106 @@
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: timer_resched.c,v 1.1 2005/07/18 22:01:41 klmitch Exp $
+*/
+/** \internal
+ * \file
+ * \brief Implementation of timer_resched().
+ *
+ * This file contains the implementation of the timer_resched()
+ * function, used to reschedule a timer for another time.
+ */
+#include "engines_int.h"
+
+RCSTAG("@(#)$Id: timer_resched.c,v 1.1 2005/07/18 22:01:41 klmitch Exp $");
+
+ev_err_t
+timer_resched(ev_ctx_t *ctx, ev_tim_t *tim, ev_timtype_t type,
+ struct timeval *value)
+{
+ ev_engine_t *eng;
+ ev_err_t err = 0;
+ struct timeval ov;
+ int tmp;
+
+ ev_init(); /* make sure library is initialized... */
+
+ /* sanity-check the arguments... */
+ if (!ec_verify(ctx) || !ti_verify(tim) ||
+ (type != TT_ABSOLUTE && type != TT_RELATIVE && type != TT_PERIODIC) ||
+ !value || eg_context(tim) != ctx)
+ return EINVAL;
+
+ /* if the generator's been deleted, it's already been removed from the
+ * engines and from the timer tree...
+ */
+ if (!(eg_flags(tim) & EV_GEN_DELETED))
+ /* Walk through all the timer engines (last to first)... */
+ for (eng = ctx->ec_timer.el_last; eng;
+ eng = eng->eng_timer.eti_active.el_prev)
+ if ((err = eng_tim_rem(ctx, eng, tim))) { /* remove the timer */
+ for (; eng; eng = eng->eng_timer.eti_active.el_prev)
+ eng_tim_rem(ctx, eng, tim); /* remove from remaining engines */
+
+ _timer_untree(ctx, tim); /* remove timer from tree */
+
+ eg_flags_set(tim, EV_GEN_DELETED); /* got to delete it... */
+
+ eg_ref_dec(ctx, tim); /* decrement reference count */
+
+ ev_return(err); /* Return the error */
+ }
+
+ ov = tim->ti_expire; /* save the old timer value... */
+
+ /* Re-configure timer value and recompute expiration time */
+ tim->ti_type = type;
+ tim->ti_value = *value;
+ ti_expire_comp(tim); /* compute expiration time */
+
+ /* Re-add timer to all the engines... */
+ for (eng = ctx->ec_timer.el_first; eng;
+ eng = eng->eng_timer.eti_active.el_next)
+ if ((err = eng_tim_add(ctx, eng, tim))) { /* add to engine */
+ /* oops, error occurred. Walk engines backwards and remove timer */
+ for (; eng; eng = eng->eng_timer.eti_active.el_prev)
+ eng_tim_rem(ctx, eng, tim);
+
+ _timer_untree(ctx, tim); /* remove timer from tree */
+
+ eg_flags_set(tim, EV_GEN_DELETED); /* got to delete it... */
+
+ eg_ref_dec(ctx, tim); /* decrement reference count */
+
+ ev_return(err); /* return the error */
+ }
+
+ /* Update the tree... */
+ if (eg_flags(tim) & EV_GEN_DELETED) /* was timer deleted? */
+ err = _timer_insert(ctx, tim); /* then re-insert the timer */
+ else if ((tmp = tv_comp(&tim->ti_expire, &ov)) < 0)
+ err = _timer_heapify_down(ctx, tim); /* new value is earlier time... */
+ else if (tmp > 0) /* new value is later time... */
+ err = _timer_heapify_up(ctx, tim);
+
+ if (err) /* did an error occur? */
+ timer_destroy(ctx, tim); /* OK, destroy the timer. */
+ else
+ eg_flags_clr(tim, EV_GEN_DELETED); /* clear the deleted flag */
+
+ ev_return(err);
+}
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-07-17 01:03:27
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-07-17 01:03:19 UTC
Modified files:
ChangeLog event.h event_init.c event_int.h tim.h
Log message:
begin creating timer interface
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.47 event/ChangeLog:1.48
--- event/ChangeLog:1.47 Tue Jul 12 08:14:37 2005
+++ event/ChangeLog Sat Jul 16 18:03:08 2005
@@ -1,3 +1,20 @@
+2005-07-16 Kevin L. Mitchell <kl...@mi...>
+
+ * tim.h: write some group documentation for timers; build ev_tim_t
+ structure definition and accessor macros; declare and document
+ timer_create(), timer_resched(), and timer_destroy()
+
+ * event_int.h: add several timer tree manipulation macros, a
+ struct timeval comparison macro, and documentation and declaration
+ of two internal timer tree manipulation functions
+
+ * event_init.c (event_init): initialize timer tree
+
+ * event.h: move file documentation into the group--probably
+ doesn't affect it, but it makes logical sense; add ET_NONE to list
+ of events; add timer tree to context structure; add some return
+ values to event_init() documentation
+
2005-07-12 Kevin L. Mitchell <kl...@mi...>
* tests/test-harness.dat: use C-style copyright comment
Index: event/event.h
diff -u event/event.h:1.24 event/event.h:1.25
--- event/event.h:1.24 Mon Jul 11 17:29:15 2005
+++ event/event.h Sat Jul 16 18:03:08 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event.h,v 1.24 2005/07/12 00:29:15 klmitch Exp $
+** @(#)$Id: event.h,v 1.25 2005/07/17 01:03:08 klmitch Exp $
*/
#ifndef __include_event_event_h__
#define __include_event_event_h__
@@ -142,13 +142,6 @@
* any of the configuration files loaded by event_init().
*/
-/** \file event/event.h
- * \brief Core event system header file.
- *
- * This header file contains the necessary structures, #define's, and
- * function declarations to make use of the event library.
- */
-
/** \def EV_BEGIN_C_DECLS
* \internal
* \brief Begin declaration in C namespace.
@@ -186,6 +179,13 @@
* @{
*/
+/** \file event/event.h
+ * \brief Core event system header file.
+ *
+ * This header file contains the necessary structures, #define's, and
+ * function declarations to make use of the event library.
+ */
+
#include <errno.h> /* for EINVAL and friends */
#include <stdlib.h> /* for size_t definition */
#include <treeconf/treeconf.h> /* for treeconf_ctx_t definition */
@@ -250,6 +250,7 @@
* reserved for applications.
*/
typedef enum {
+ ET_NONE, /**< No event has occurred. */
ET_READ, /**< Data is available on a socket for reading. */
ET_WRITE, /**< Data can be written to a socket. */
ET_ACCEPT, /**< A connection can be accepted on the socket. */
@@ -392,6 +393,10 @@
treeconf_ctx_t ec_conf; /**< Library configuration data. */
unsigned int ec_maxgen; /**< Maximum generator ID #. */
struct _ev_gens_s *ec_gens; /**< Generators. */
+ struct {
+ struct _ev_tim_s *tt_root; /**< Root node of the tree. */
+ struct _ev_tim_s *tt_insert; /**< Tree insertion cursor. */
+ } ec_timtree; /**< Ordered tree of timers. */
struct _ev_engine_s *ec_engine; /**< List of engine descriptors. */
_ev_englist_t ec_socket; /**< Engines for sockets. */
_ev_englist_t ec_signal; /**< Engines for signals. */
@@ -784,6 +789,11 @@
* to be searched.
*
* \retval EINVAL An invalid argument was given.
+ * \retval ENOMEM Out of memory.
+ * \retval EV_ERR_LIBLTDL The libltdl library failed to
+ * initialize.
+ * \retval EV_ERR_NOENGINE One or more engine components was not
+ * initialized.
*/
extern ev_err_t event_init(ev_ctx_t *ctx, const ev_attr_t *attr,
ev_flags_t flags, const char *prog,
Index: event/event_init.c
diff -u event/event_init.c:1.26 event/event_init.c:1.27
--- event/event_init.c:1.26 Mon Jul 11 16:34:32 2005
+++ event/event_init.c Sat Jul 16 18:03:08 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_init.c,v 1.26 2005/07/11 23:34:32 klmitch Exp $
+** @(#)$Id: event_init.c,v 1.27 2005/07/17 01:03:08 klmitch Exp $
*/
/** \internal
* \file
@@ -30,7 +30,7 @@
#include <stdio.h>
#include <string.h>
-RCSTAG("@(#)$Id: event_init.c,v 1.26 2005/07/11 23:34:32 klmitch Exp $");
+RCSTAG("@(#)$Id: event_init.c,v 1.27 2005/07/17 01:03:08 klmitch Exp $");
/** \internal
* \brief File name buffer length.
@@ -361,6 +361,9 @@
ctx->ec_maxgen = 0; /* clear list of generators */
ctx->ec_gens = 0;
+ ctx->ec_timtree.tt_root = 0; /* clear the timer tree */
+ ctx->ec_timtree.tt_insert = 0;
+
ctx->ec_engine = 0; /* clear engine lists */
ctx->ec_socket.el_first = ctx->ec_socket.el_last = 0;
Index: event/event_int.h
diff -u event/event_int.h:1.27 event/event_int.h:1.28
--- event/event_int.h:1.27 Mon Jul 11 16:34:33 2005
+++ event/event_int.h Sat Jul 16 18:03:08 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_int.h,v 1.27 2005/07/11 23:34:33 klmitch Exp $
+** @(#)$Id: event_int.h,v 1.28 2005/07/17 01:03:08 klmitch Exp $
*/
#ifndef __include_event_int_h__
#define __include_event_int_h__
@@ -597,6 +597,94 @@
} while (0)
/** \internal
+ * \brief Compare struct timeval values.
+ *
+ * This macro returns a 0 value if the two struct timeval values are
+ * equivalent; otherwise, it returns a positive value if \p tv1 is
+ * greater than \p tv2, or a negative value if \p tv1 is less than \p
+ * tv2.
+ *
+ * \param tv1 A pointer to a struct timeval containing the first
+ * value for comparison.
+ * \param tv2 A pointer to a struct timeval containing the second
+ * value for comparison.
+ *
+ * \return A positive value, zero, or a negative value depending
+ * upon whether \p tv1 is greater than, equal to, or less
+ * than \p tv2, respectively.
+ */
+#define tv_comp(tv1, tv2) (((tv1)->tv_sec == (tv2)->tv_sec) ? \
+ ((tv1)->tv_usec - (tv2)->tv_usec) : \
+ ((tv1)->tv_sec - (tv2)->tv_sec))
+
+/** \internal
+ * \brief Repair timer node linking.
+ *
+ * This macro is used to repair the links to a given timer node.
+ *
+ * \param tim A pointer to an #ev_tim_t.
+ */
+#define tt_node_fix(tim) \
+do { \
+ ev_tim_t *_tim = (tim); \
+ if (_tim->ti_node.tn_next) \
+ _tim->ti_node.tn_next->ti_node.tn_prev = _tim; \
+ if (_tim->ti_node.tn_prev) \
+ _tim->ti_node.tn_prev->ti_node.tn_next = _tim; \
+ if (_tim->ti_node.tn_left) \
+ _tim->ti_node.tn_left->ti_node.tn_parent = _tim; \
+ if (_tim->ti_node.tn_right) \
+ _tim->ti_node.tn_right->ti_node.tn_parent = _tim; \
+} while (0)
+
+/** \internal
+ * \brief Initialize a timer node.
+ *
+ * This macro is used to initialize the timer node structure within a
+ * timer descriptor.
+ *
+ * \param tim A pointer to an #ev_tim_t to be initialized.
+ * \param parent
+ * The parent of the given timer.
+ * \param prev The previous node in the tree's thread.
+ */
+#define tt_node_init(tim, parent, prev) \
+do { \
+ ev_tim_t *_tim = (tim); \
+ _tim->ti_node.tt_parent = (parent); /* initialize node structure */ \
+ _tim->ti_node.tt_next = 0; \
+ _tim->ti_node.tt_prev = (prev); \
+ _tim->ti_node.tt_left = 0; \
+ _tim->ti_node.tt_right = 0; \
+ if (_tim->ti_node.tt_prev) /* update previous node in thread */ \
+ _tim->ti_node.tt_prev->ti_node.tt_next = _tim; \
+} while (0)
+
+/** \internal
+ * \brief Update a timer tree node's location.
+ *
+ * This macro is used to adjust the position of the \p tim timer
+ * within the timer tree in order to reestablish the \em heap property
+ * of the tree.
+ *
+ * \param ctx A pointer to an #ev_ctx_t.
+ * \param tim A pointer to an #ev_tim_t to be updated.
+ * \param ov A pointer to a struct timeval containing the old value
+ * of the timer.
+ */
+#define tt_node_update(ctx, tim, ov) \
+do { \
+ ev_ctx_t *_ctx = (ctx); \
+ ev_tim_t *_tim = (tim); \
+ struct timeval *_ov = (ov); \
+ int _tmp = tv_comp(&_tim->ti_expire, _ov); /* save comparison... */ \
+ if (_tmp < 0) /* is the new value earlier than the old? */ \
+ _timer_heapify_down(_ctx, _tim); \
+ else if (_tmp > 0) /* OK, is it later than the old value? */ \
+ _timer_heapify_up(_ctx, _tim); \
+} while (0)
+
+/** \internal
* \brief Log debugging messages.
*
* This function is used when the ev_log() macro is insufficient. It
@@ -636,4 +724,26 @@
ev_gendesc_t **gen)
_gca_nonnull((1, 3));
+/** \internal
+ * \brief Restore timer tree heap property by shifting up.
+ *
+ * This function restores the heap property of the timer tree by
+ * shifting the given node up within the tree.
+ *
+ * \param ctx A pointer to an #ev_ctx_t.
+ * \param tim A pointer to an #ev_tim_t.
+ */
+extern void _timer_heapify_up(ev_ctx_t *ctx, ev_tim_t *tim);
+
+/** \internal
+ * \brief Restore timer tree heap property by shifting down.
+ *
+ * This function restores the heap property of the timer tree by
+ * shifting the given node down within the tree.
+ *
+ * \param ctx A pointer to an #ev_ctx_t.
+ * \param tim A pointer to an #ev_tim_t.
+ */
+extern void _timer_heapify_down(ev_ctx_t *ctx, ev_tim_t *tim);
+
#endif /* __include_event_int_h__ */
Index: event/tim.h
diff -u event/tim.h:1.4 event/tim.h:1.5
--- event/tim.h:1.4 Wed May 25 20:19:56 2005
+++ event/tim.h Sat Jul 16 18:03:08 2005
@@ -15,14 +15,30 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: tim.h,v 1.4 2005/05/26 03:19:56 klmitch Exp $
+** @(#)$Id: tim.h,v 1.5 2005/07/17 01:03:08 klmitch Exp $
*/
#ifndef __include_event_tim_h__
#define __include_event_tim_h__
/** \defgroup timer Timer event handling.
*
- * The event library provides support for timer manipulation.
+ * The event library provides support for timer manipulation. Timers
+ * are a way to have events occur at specific times or intervals.
+ * There are three basic types of timers:
+ *
+ * \li \em Absolute Timers \n
+ * Absolute timers generate an #ET_EXPIRE event at or after the
+ * absolute time specified in the call to timer_create().
+ *
+ * \li \em Relative Timers \n
+ * Relative timers generate an #ET_EXPIRE event at or after the
+ * time interval specified in the call to timer_create() has
+ * elapsed.
+ *
+ * \li \em Periodic Timers \n
+ * Periodic timers are similar to relative timers, except that
+ * they are reset after they expire. They should be used when an
+ * event is desired at a fixed, repeating interval.
*
* @{
*/
@@ -39,6 +55,8 @@
# include <event/event.h>
#endif /* __EVENT_LIBRARY__ */
+#include <sys/time.h> /* struct timeval needed */
+
EV_BEGIN_C_DECLS
/** \brief Timer generator.
@@ -48,12 +66,48 @@
typedef struct _ev_tim_s ev_tim_t;
/** \internal
+ * \brief Timer node.
+ *
+ * Timers are stored in a priority queue. This structure specifies an
+ * entry on the timer queue.
+ */
+typedef struct _ev_timnode_s _ev_timnode_t;
+
+/** \brief Timer types.
+ *
+ * All timers have a <em>timer type</em> describing the kind of timer
+ * that is set.
+ */
+typedef enum {
+ TT_ABSOLUTE, /**< Timer has an absolute expiration time. */
+ TT_RELATIVE, /**< Timer has a relative expiration time. */
+ TT_PERIODIC /**< Timer expires periodically. */
+} ev_timtype_t;
+
+/** \internal
+ * \brief Timer node structure.
+ *
+ * This is the implementation of the #_ev_timnode_t type.
+ */
+struct _ev_timnode_s {
+ ev_tim_t *tn_parent; /**< Parent of this node. */
+ ev_tim_t *tn_next; /**< Next node in linked list. */
+ ev_tim_t *tn_prev; /**< Previous node in linked list. */
+ ev_tim_t *tn_left; /**< Left child in tree. */
+ ev_tim_t *tn_right; /**< Right child in tree. */
+};
+
+/** \internal
* \brief Timer generator structure.
*
* This is the implementation of the #ev_tim_t type.
*/
struct _ev_tim_s {
ev_genhdr_t ti_hdr; /**< Generator header. */
+ _ev_timnode_t ti_node; /**< Priority queue pointers. */
+ ev_timtype_t ti_type; /**< Timer type. */
+ struct timeval ti_value; /**< Original expire time value. */
+ struct timeval ti_expire; /**< Actual timer expire time. */
};
/** \brief Timer generator magic number.
@@ -76,6 +130,106 @@
*/
#define ti_verify(tim) eg_verify((tim), EV_TIM_MAGIC)
+/** \brief Timer type.
+ *
+ * This macro returns the type of the given timer.
+ *
+ * \param tim A pointer to an #ev_tim_t.
+ *
+ * \return One of #TT_ABSOLUTE, #TT_RELATIVE, or #TT_PERIODIC,
+ * indicating which type of timer this is.
+ */
+#define ti_type(tim) ((tim)->ti_type)
+
+/** \brief Timer value.
+ *
+ * This macro returns the original time that was passed in the call to
+ * timer_create(). For #TT_PERIODIC timers, this is the relative time
+ * for which the timer will be reset upon expiration.
+ *
+ * \param tim A pointer to an #ev_tim_t.
+ *
+ * \return A pointer to a struct timeval containing the original
+ * time passed in the call to timer_create().
+ */
+#define ti_value(tim) (&((tim)->ti_value))
+
+/** \brief Timer expiration time.
+ *
+ * This macro returns the absolute expiration time for this timer, as
+ * computed by timer_create() or timer_resched() (or upon timer
+ * expiration, for #TT_PERIODIC timers).
+ *
+ * \param tim A pointer to an #ev_tim_t.
+ *
+ * \return A pointer to a struct timeval containing the
+ * expiration time for this timer.
+ */
+#define ti_expire(tim) (&((tim)->ti_expire))
+
+/** \brief Create a timer.
+ *
+ * This function creates and schedules a timer for the specified \p
+ * time. If the \p tim_p parameter is not \c NULL, it will be used to
+ * return a pointer to the created timer.
+ *
+ * \param ctx A pointer to an #ev_ctx_t.
+ * \param type One of #TT_ABSOLUTE, #TT_RELATIVE, or #TT_PERIODIC, to
+ * specify the desired timer type.
+ * \param value The timer's expiration time, either an absolute time
+ * (e.g., for #TT_ABSOLUTE timers), or a relative time
+ * (for #TT_RELATIVE or #TT_PERIODIC timers).
+ * \param call The callback function for the library to use. If \c
+ * NULL, the library may not be used in the event loop
+ * mode.
+ * \param data Any application-specific data that must be passed to
+ * the callback function. If \p call is \c NULL, this
+ * parameter must also be \c NULL.
+ * \param tim_p A pointer to a pointer to an #ev_tim_t. A \c NULL
+ * value may be passed if the application does not need
+ * a pointer to the timer.
+ *
+ * \retval EINVAL An invalid argument was given.
+ * \retval ENOMEM Out of memory.
+ */
+extern ev_err_t timer_create(ev_ctx_t *ctx, ev_timtype_t type,
+ struct timeval *value, ev_call_t call, void *data,
+ ev_tim_t **tim_p)
+ _gca_nonnull((1, 3));
+
+/** \brief Reschedule an existing timer.
+ *
+ * Sometimes, a timer must be rescheduled. This function provides a
+ * means for doing that. The function may be used from the event
+ * callback for the timer.
+ *
+ * \param ctx A pointer to an #ev_ctx_t.
+ * \param tim A pointer to an #ev_tim_t to be rescheduled.
+ * \param type One of #TT_ABSOLUTE, #TT_RELATIVE, or #TT_PERIODIC, to
+ * specify the desired type for the rescheduled timer.
+ * \param value The timer's new expiration time, either an absolute
+ * time (e.g., for #TT_ABSOLUTE timers), or a relative
+ * time (for #TT_RELATIVE or #TT_PERIODIC timers).
+ *
+ * \retval EINVAL An invalid argument was given.
+ */
+extern ev_err_t timer_resched(ev_ctx_t *ctx, ev_tim_t *tim, ev_timtype_t type,
+ struct timeval *value)
+ _gca_nonnull((1, 2, 4));
+
+/** \brief Destroy an existing timer.
+ *
+ * This function is used to destroy an existing timer. It may be used
+ * from the event callback for #TT_PERIODIC timers.
+ *
+ * \param ctx A pointer to an #ev_ctx_t.
+ * \param tim A pointer to the #ev_tim_t to be destroyed.
+ *
+ * \retval EINVAL An invalid argument was given.
+ */
+extern ev_err_t timer_destroy(ev_ctx_t *ctx, ev_tim_t *tim)
+ _gca_nonnull((1, 2));
+
EV_END_C_DECLS
#endif /* __include_event_tim_h */
----------------------- End of diff -----------------------
|
|
From: Kevin L. M. <kl...@us...> - 2005-07-12 15:14:58
|
Committer : klmitch
CVSROOT : /cvsroot/libevent
Module : event
Commit time: 2005-07-12 15:14:48 UTC
Modified files:
ChangeLog event_destroy.c tests/test-harness.c
tests/test-harness.dat
Log message:
stomp a minor warning in event_destroy.c (uninitialized variable); update
test-harness.c to a version that logs warnings for test programs that exit
abnormally and that can understand C and C++-style comments
---------------------- diff included ----------------------
Index: event/ChangeLog
diff -u event/ChangeLog:1.46 event/ChangeLog:1.47
--- event/ChangeLog:1.46 Mon Jul 11 16:34:31 2005
+++ event/ChangeLog Tue Jul 12 08:14:37 2005
@@ -1,3 +1,12 @@
+2005-07-12 Kevin L. Mitchell <kl...@mi...>
+
+ * tests/test-harness.dat: use C-style copyright comment
+
+ * tests/test-harness.c: update to newest revision of
+ test-harness.c
+
+ * event_destroy.c (event_destroy): stomp a warning
+
2005-07-11 Kevin L. Mitchell <kl...@mi...>
* tests/test-harness.dat: update for new test program
Index: event/event_destroy.c
diff -u event/event_destroy.c:1.10 event/event_destroy.c:1.11
--- event/event_destroy.c:1.10 Mon Jul 11 16:34:32 2005
+++ event/event_destroy.c Tue Jul 12 08:14:38 2005
@@ -15,7 +15,7 @@
** along with this program; if not, write to the Free Software
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**
-** @(#)$Id: event_destroy.c,v 1.10 2005/07/11 23:34:32 klmitch Exp $
+** @(#)$Id: event_destroy.c,v 1.11 2005/07/12 15:14:38 klmitch Exp $
*/
/** \internal
* \file
@@ -28,13 +28,13 @@
#include <ltdl.h>
-RCSTAG("@(#)$Id: event_destroy.c,v 1.10 2005/07/11 23:34:32 klmitch Exp $");
+RCSTAG("@(#)$Id: event_destroy.c,v 1.11 2005/07/12 15:14:38 klmitch Exp $");
ev_err_t
event_destroy(ev_ctx_t *ctx)
{
ev_gens_t *cursor, *next;
- ev_genhdr_t *gen, *lastgen;
+ ev_genhdr_t *gen, *lastgen = 0;
ev_engine_t *eng, *nexteng;
event_t *ev, *nextev;
int i;
Index: event/tests/test-harness.c
diff -u event/tests/test-harness.c:1.1 event/tests/test-harness.c:1.2
--- event/tests/test-harness.c:1.1 Thu Apr 21 15:06:10 2005
+++ event/tests/test-harness.c Tue Jul 12 08:14:38 2005
@@ -16,7 +16,7 @@
** Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
** MA 02111-1307, USA
**
-** @(#)$Id: test-harness.c,v 1.5 2003/01/17 02:13:45 klmitch Exp $
+** @(#)$Id: test-harness.c,v 1.6 2005/07/12 15:08:23 klmitch Exp $
*/
#include <ctype.h>
#include <errno.h>
@@ -713,13 +713,18 @@
waitpid(tp->tp_pid, &stat, 0); /* wait for child */
if (WIFEXITED(stat)) {
sprintf(buf, "Test program exited with status %d", WEXITSTATUS(stat));
+ if (WEXITSTATUS(stat)) /* if non-zero exit status, log it */
+ fprintf(glob_data.log_fp, "WARNING: %s: %s\n", tp->tp_name, buf);
mark_all(tp, WEXITSTATUS(stat) ? TR_UNRESOLVED : TR_UNTESTED, buf);
tp->tp_status = WEXITSTATUS(stat) ? TP_FAILED : TP_COMPLETE;
} else if (WIFSIGNALED(stat)) {
sprintf(buf, "Test program terminated by signal %d", WTERMSIG(stat));
+ fprintf(glob_data.log_fp, "WARNING: %s: %s\n", tp->tp_name, buf);
mark_all(tp, TR_UNRESOLVED, buf);
tp->tp_status = TP_FAILED;
} else {
+ fprintf(glob_data.log_fp, "WARNING: %s: Test program exited with "
+ "unknown code\n", tp->tp_name);
mark_all(tp, TR_UNRESOLVED, "Test program exited with unknown code");
tp->tp_status = TP_FAILED;
}
@@ -959,7 +964,7 @@
read_conf(char *filename)
{
enum {
- s_space, s_comment, s_string
+ s_space, s_comment, s_slash, s_star, s_ccomment, s_string
} state = s_space, save = s_space;
char *buf = 0, **args = 0, filebuf[BUFSIZE], *file, file2buf[BUFSIZE];
char *file2, *s;
@@ -986,11 +991,37 @@
c = getc(fp); /* get a character */
flags &= ~(QUOTED | EOS | EOD); /* reset quoted and end-of-* flags */
- if (state == s_comment) {
- if (c != '\n' && c != EOF)
+ if (state == s_slash) { /* process second character of comment intro */
+ switch (c) {
+ case '*': /* C-style comment */
+ state = s_ccomment;
+ break;
+ case '/': /* C++-style comment */
+ state = s_comment;
+ break;
+ default:
+ fprintf(stderr, "%s: Invalid comment introducer \"/%c\" while "
+ "parsing config file %s\n", glob_data.prog_name, c, file);
+ exit(1);
+ break;
+ }
+ continue; /* skip comment characters */
+ }
+
+ if (state == s_comment || state == s_ccomment || state == s_star) {
+ if (c == EOF || (state == s_comment && c == '\n') ||
+ (state == s_star && c == '/')) {
+ state = save; /* restore to pre-comment state */
+ if (c == '/')
+ c = ' '; /* but pretend C-style comment was a big space */
+ /* process the character */
+ } else {
+ if (state == s_star && c != '*')
+ state = s_ccomment; /* * not followed by /; not a comment ender */
+ if (state == s_ccomment && c == '*')
+ state = s_star; /* found a *; remember that... */
continue; /* skip comment... */
- else
- state = save; /* but preserve ending character and process */
+ }
}
if (flags & SAVE_QUOTE)
@@ -1054,9 +1085,9 @@
}
}
- if (!(flags & QUOTED) && c == '#') { /* found beginning of a comment */
+ if (!(flags & QUOTED) && (c == '#' || c == '/')) { /* start of comment? */
save = state; /* save current state--we'll restore to here */
- state = s_comment; /* switch to comment state */
+ state = c == '#' ? s_comment : s_slash; /* switch to appropriate state */
continue; /* skip all characters in the comment */
}
@@ -1082,7 +1113,10 @@
continue; /* move on to next character */
break;
- case s_comment: /* should never be in this state here */
+ case s_comment: /* should never be in these states here */
+ case s_slash:
+ case s_star:
+ case s_ccomment:
break;
case s_string: /* part of a string */
Index: event/tests/test-harness.dat
diff -u event/tests/test-harness.dat:1.9 event/tests/test-harness.dat:1.10
--- event/tests/test-harness.dat:1.9 Mon Jul 11 16:34:34 2005
+++ event/tests/test-harness.dat Tue Jul 12 08:14:38 2005
@@ -1,21 +1,22 @@
-## Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-##
-## @(#)$Id: test-harness.dat,v 1.9 2005/07/11 23:34:34 klmitch Exp $
-
+/*
+** Copyright (C) 2005 by Kevin L. Mitchell <kl...@mi...>
+**
+** This program is free software; you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation; either version 2 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program; if not, write to the Free Software
+** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+**
+** @(#)$Id: test-harness.dat,v 1.10 2005/07/12 15:14:38 klmitch Exp $
+*/
# Created by test-harness.pl from these files: t_event_attrs.c t_event_init.c
# t_event_log.c t_evg_alloc.c t_evg_register.c
----------------------- End of diff -----------------------
|