summaryrefslogtreecommitdiff
path: root/src/chain.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/chain.c')
-rw-r--r--src/chain.c48
1 files changed, 25 insertions, 23 deletions
diff --git a/src/chain.c b/src/chain.c
index a13b3120..daf13f39 100644
--- a/src/chain.c
+++ b/src/chain.c
@@ -1,8 +1,4 @@
/*
- * File: chain.c
- * Concomitant control chain (CCC)
- * Theory and code by Jorge Arellano Cid
- *
* Copyright 2001-2007 Jorge Arellano Cid <jcid@dillo.org>
*
* This program is free software; you can redistribute it and/or modify
@@ -11,13 +7,19 @@
* (at your option) any later version.
*/
+/**
+ * @file
+ * Concomitant control chain (CCC).
+ * Theory and code by Jorge Arellano Cid
+ */
+
#include "msg.h"
#include "chain.h"
#include "../dlib/dlib.h"
#define VERBOSE 0
-/*
+/**
* Show debugging info
*/
#if VERBOSE
@@ -34,7 +36,7 @@ static void Chain_debug_msg(char *FuncStr, int Op, int Branch, int Dir,
static void Chain_debug_msg(char *FuncStr, int Op, int Branch, int Dir,
ChainLink *Info) { }
#endif
-/*
+/**
* Create and initialize a new chain-link
*/
ChainLink *a_Chain_new(void)
@@ -42,13 +44,13 @@ ChainLink *a_Chain_new(void)
return dNew0(ChainLink, 1);
}
-/*
+/**
* Create a new link from module A to module B.
- * 'Direction' tells whether to make a forward or backward link.
- * => The link from 'A' to 'B' has 'Direction' direction.
- * => The main flow of information names the FWD direction.
- * => AtoB_branch: branch on which 'B' receives communications from 'A'
- * => BtoA_branch: branch on which 'A' receives communications from 'B'
+ * @param Direction tells whether to make a forward or backward link.
+ * - The link from 'A' to 'B' has @p Direction direction.
+ * - The main flow of information names the FWD direction.
+ * @param AtoB_branch branch on which 'B' receives communications from 'A'
+ * @param BtoA_branch branch on which 'A' receives communications from 'B'
*/
ChainLink *a_Chain_link_new(ChainLink *AInfo, ChainFunction_t AFunc,
int Direction, ChainFunction_t BFunc,
@@ -77,9 +79,9 @@ ChainLink *a_Chain_link_new(ChainLink *AInfo, ChainFunction_t AFunc,
return NewLink;
}
-/*
+/**
* Unlink a previously used link.
- * 'Direction' tells whether to unlink the forward or backward link.
+ * @param Direction tells whether to unlink the forward or backward link.
*/
void a_Chain_unlink(ChainLink *Info, int Direction)
{
@@ -94,9 +96,9 @@ void a_Chain_unlink(ChainLink *Info, int Direction)
}
}
-/*
+/**
* Issue the forward callback of the 'Info' link
- * Return value: 1 if OK, 0 if not operative.
+ * @return 1 if OK, 0 if not operative.
*/
int a_Chain_fcb(int Op, ChainLink *Info, void *Data1, void *Data2)
{
@@ -117,9 +119,9 @@ int a_Chain_fcb(int Op, ChainLink *Info, void *Data1, void *Data2)
return ret;
}
-/*
+/**
* Issue the backward callback of the 'Info' link
- * Return value: 1 if OK, 0 if not operative.
+ * @return 1 if OK, 0 if not operative.
*/
int a_Chain_bcb(int Op, ChainLink *Info, void *Data1, void *Data2)
{
@@ -140,10 +142,10 @@ int a_Chain_bcb(int Op, ChainLink *Info, void *Data1, void *Data2)
return ret;
}
-/*
+/**
* Issue the backward callback of the 'Info' link and then the
* forward callback (used for OpAbort and OpStop).
- * Return value: 1 if OK, 0 if not operative.
+ * @return 1 if OK, 0 if not operative.
*/
int a_Chain_bfcb(int Op, ChainLink *Info, void *Data1, void *Data2)
{
@@ -163,7 +165,7 @@ int a_Chain_bfcb(int Op, ChainLink *Info, void *Data1, void *Data2)
}
-/*
+/**
* Allocate and initialize a new DataBuf structure
*/
DataBuf *a_Chain_dbuf_new(void *buf, int size, int code)
@@ -175,11 +177,11 @@ DataBuf *a_Chain_dbuf_new(void *buf, int size, int code)
return dbuf;
}
-/*
+/**
* Check whether the CCC is operative.
* Also used to hook debug information.
*
- * Return value: 1 if ready to use, 0 if not operative.
+ * @return 1 if ready to use, 0 if not operative.
*/
int a_Chain_check(char *FuncStr, int Op, int Branch, int Dir,
ChainLink *Info)