Add some missing source code documentation.
authorAndre Noll <maan@systemlinux.org>
Thu, 15 Jan 2009 03:58:05 +0000 (04:58 +0100)
committerAndre Noll <maan@systemlinux.org>
Thu, 15 Jan 2009 03:58:05 +0000 (04:58 +0100)
afs.c
afs.h
aft.c
filter.h
fsck.c
recv.h
recv_common.c
server.c
udp_send.c

diff --git a/afs.c b/afs.c
index 9ae0650a2955f6683a94428df47ae2d6c836817e..b8acb53a9ffa2782e8fc0421a9a01f5642347eed 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -1175,6 +1175,16 @@ int com_check(int fd, int argc, char * const * const argv)
        return 1;
 }
 
+/**
+ * The afs event dispatcher.
+ *
+ * \param event Type of the event.
+ * \param pb May be \p NULL.
+ * \param data Type depends on \a event.
+ *
+ * This function calls the table handlers of all tables and passes \a pb and \a
+ * data verbatim. It's up to the handlers to interpret the \a data pointer.
+ */
 void afs_event(enum afs_events event, struct para_buffer *pb,
                void *data)
 {
diff --git a/afs.h b/afs.h
index ecec685c06a8187f4116037c41ea6eacd668009d..267cc8d35a0032e2b221162857507df9a4358b6c 100644 (file)
--- a/afs.h
+++ b/afs.h
@@ -61,14 +61,23 @@ enum afs_events {
        BLOB_REMOVE,
 };
 
+/**
+ * Used as data for \ref afs_event() for events of type \p ATTRIBUTE_ADD.
+ */
 struct rmatt_event_data {
+       /** The name of the attribute being added. */
        const char *name;
+       /** Its bit number. */
        unsigned char bitnum;
 };
 
-
+/**
+ * Used as data for \ref afs_event() for events of type \p ATTRIBUTE_AFSI_CHANGE.
+ */
 struct afsi_change_event_data {
+       /** Pointer to the row that has changed. */
        struct osl_row *aft_row;
+       /** Afs info before the change. */
        struct afs_info *old_afsi;
 };
 
diff --git a/aft.c b/aft.c
index 5c0a04bd1aa3ec551b87aaacc073472d02435661..7bfad504f04b8626ea8fbd436ece8dcef34124ff 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -1008,6 +1008,13 @@ out:
        return ret;
 }
 
+/**
+ * Write a list of audio-file related status items with empty values.
+ *
+ * \param buf Result pointer.
+ *
+ * This is used by vss when currently no audio file is open.
+ */
 void make_empty_status_items(char *buf)
 {
        sprintf(buf,
index 712f1e5bac58bada5fdaadc80a99cdbbebe7d10b..2c546c1d21f281529fcda364987e8802b4b52036 100644 (file)
--- a/filter.h
+++ b/filter.h
@@ -197,6 +197,7 @@ struct filter {
         */
        int (*parse_config)(int argc, char **argv, void **config);
 
+       /** The help texts for this filter. */
        struct ggo_help help;
 };
 
diff --git a/fsck.c b/fsck.c
index bfc178e34b495e1128ae7ddb7732c3e436dc88b9..04db5de34b11d524dc29a7ae7610225b853308e7 100644 (file)
--- a/fsck.c
+++ b/fsck.c
@@ -936,6 +936,14 @@ static int check_all_tables(char *base_dir)
        return ret;
 }
 
+/**
+ * The praslash database check program.
+ *
+ * \param argc Usual arg count.
+ * \param argv Usual arg vector.
+ *
+ * \return \p EXIT_SUCCESS or \p EXIT_FAILURE.
+ */
 int main(int argc, char **argv)
 {
        int i, ret;
diff --git a/recv.h b/recv.h
index 74ccf77d7115b5f77ce36de21522b62f78a456e2..b82e04f506c3dcad9ac43ad8796d0786aa2f1d9b 100644 (file)
--- a/recv.h
+++ b/recv.h
@@ -105,6 +105,7 @@ struct receiver {
         */
        void (*post_select)(struct sched *s, struct task *t);
 
+       /** The two help texts of this receiver. */
        struct ggo_help help;
 };
 
@@ -127,6 +128,7 @@ extern struct receiver receivers[];
        UDP_RECEIVER \
        {.name = NULL}};
 
+/** Iterate over all available receivers. */
 #define FOR_EACH_RECEIVER(i) for (i = 0; receivers[i].name; i++)
 
 void *check_receiver_arg(char *ra, int *receiver_num);
index 1df503e4c29d2536450fbbfb0df822034e7e3ad5..2840df00b4317d143bcadec5637e0ca4d1200ef7 100644 (file)
@@ -85,6 +85,11 @@ void *check_receiver_arg(char *ra, int *receiver_num)
        return NULL;
 }
 
+/**
+ * Print out the help texts to all receivers.
+ *
+ * \param detailed Whether the detailed help should be printed.
+ */
 void print_receiver_helps(int detailed)
 {
        int i;
index 436e72af9c7c5b86eadb217d194fb44cf74db5ed..2c2f31c1d08b0d84bb8d8bc44649bf827b5cbfd9 100644 (file)
--- a/server.c
+++ b/server.c
@@ -198,6 +198,14 @@ err_out:
        exit(EXIT_FAILURE);
 }
 
+/**
+ * (Re-)read the server configuration files.
+ *
+ * \param override Passed to gengetopt to activate the override feature.
+ *
+ * This function also re-opens the logfile and sets the global \a
+ * user_list_file variable.
+ */
 void parse_config_or_die(int override)
 {
        char *home = para_homedir();
index b0f55bc35c7ccb661b6db32997a88fc9284ed98e..3804c39c1b96571e6a6553c97ed5dd690284c47f 100644 (file)
@@ -68,6 +68,7 @@ static void udp_delete_target(struct udp_target *ut, const char *msg)
        free(ut);
 }
 
+/** The maximal size of the per-target chunk queue. */
 #define UDP_CQ_BYTES 40000
 
 static int udp_init_session(struct udp_target *ut)