]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Various small cleanups and documentation improvements.
authorAndre Noll <maan@systemlinux.org>
Sun, 11 Jan 2009 23:43:21 +0000 (00:43 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 11 Jan 2009 23:43:21 +0000 (00:43 +0100)
NEWS
afs.h
attribute.c
ggo.c
ggo.h
mp3_afh.c
vss.c

diff --git a/NEWS b/NEWS
index 1b0de7b90f106d74ddb4896fb9bc2ff1fa5c4929..44dfbf62e84fafcfed38c6b786882fee187b2146 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,7 @@ The new udp sender and several small improvements.
        - Improved help/man pages: The documentation of para_audiod,
          para_recv, para_filter and para_write now also contains
          all options of the available receivers/filters/writers.
+       - vss timing fixes.
 
 --------------------------------------------
 0.3.3 (2008-12-01) "axiomatic perspectivity"
diff --git a/afs.h b/afs.h
index 4be5aaa9de8d2f0fe5df5d9546da064973dd5fd6..ecec685c06a8187f4116037c41ea6eacd668009d 100644 (file)
--- a/afs.h
+++ b/afs.h
@@ -87,7 +87,6 @@ struct afs_table {
        /** Handles afs events. */
        int (*event_handler)(enum afs_events event, struct para_buffer *pb,
                void *data);
-       /* int *(check)() */
 };
 
 enum play_mode {PLAY_MODE_MOOD, PLAY_MODE_PLAYLIST};
index 569c8922c23c1412284eedd2a17f54b7d98ec457..d22511de76f92f19835b6c5c57faa54ba9360eab 100644 (file)
@@ -598,7 +598,11 @@ static int attribute_create(const char *dir)
        return osl_create_table(&attribute_table_desc);
 }
 
-
+/**
+ * Initialize the attribute table structure.
+ *
+ * \param t The table structure to initialize.
+ */
 void attribute_init(struct afs_table *t)
 {
        t->name = attribute_table_desc.name;
diff --git a/ggo.c b/ggo.c
index 86642eb5a460c2af3b494c243fa4514726a16239..b9852b991530f5b7bcdbd3e3a218f7d7d0222dfd 100644 (file)
--- a/ggo.c
+++ b/ggo.c
 #include "para.h"
 #include "ggo.h"
 
+/**
+ * Wrapper for printf() that exits on errors.
+ *
+ * \param fmt Usual format string.
+ */
 __printf_1_2 void printf_or_die(const char *fmt, ...)
 {
        va_list argp;
@@ -20,9 +25,15 @@ __printf_1_2 void printf_or_die(const char *fmt, ...)
        va_end(argp);
        if (ret >= 0)
                return;
-       fprintf(stderr, "%s: %s\n", __FUNCTION__, strerror(errno));
+       exit(EXIT_FAILURE);
 }
 
+/**
+ * Print one of the two given help texts.
+ *
+ * \param help contains the help texts.
+ * \param detailed_help Whether to print the detailed help text.
+ */
 void ggo_print_help(struct ggo_help *help, int detailed_help)
 {
        const char **p;
diff --git a/ggo.h b/ggo.h
index c9111b16503602f7fe4dc387e0d98023bfd7bdc5..4d452b1d294790ae8e426c0fdcee4a3d24c90813 100644 (file)
--- a/ggo.h
+++ b/ggo.h
@@ -1,7 +1,20 @@
+/*
+ * Copyright (C) 2008-2009 Andre Noll <maan@systemlinux.org>
+ *
+ * Licensed under the GPL v2. For licencing details see COPYING.
+ */
+
+/** \file ggo.h Functions and structures for help text handling. */
+
+/**
+ * Used by exexutables that can not use gengetopt's generated help function.
+ */
 struct ggo_help {
+       /** The lines of the short help text. */
        const char **short_help;
+       /** The lines of the detailed help text. */
        const char **detailed_help;
 };
 
 void ggo_print_help(struct ggo_help *help, int detailed_help);
-void printf_or_die(const char *fmt, ...);
+__printf_1_2 void printf_or_die(const char *fmt, ...);
index f7334488113ad85922313f5273fb998df36840a6..41874b86404cfc239a24891c30dcb6545b887f38 100644 (file)
--- a/mp3_afh.c
+++ b/mp3_afh.c
@@ -82,7 +82,7 @@ static char *get_latin1(id3_ucs4_t const *string)
        return (char *)id3_ucs4_latin1duplicate(string);
 }
 
-char *get_stringlist(union id3_field *field)
+static char *get_stringlist(union id3_field *field)
 {
        unsigned int k, nstrings = id3_field_getnstrings(field);
        char *result = NULL;
diff --git a/vss.c b/vss.c
index 1bd74de69f6d83f0f4e2ef2b28fe3c657d107f17..c11897020d80afb4066b4abd80714798d43f6e4e 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -65,15 +65,25 @@ enum afs_socket_status {
 
 /** The task structure for the virtual streaming system. */
 struct vss_task {
+       /** Copied from the -announce_time command line option. */
        struct timeval announce_tv;
+       /** End of the announcing interval. */
        struct timeval data_send_barrier;
+       /** End of the EOF interval. */
        struct timeval eof_barrier;
+       /** Only used if --autoplay_delay was given. */
        struct timeval autoplay_barrier;
+       /** Used for afs-server communication. */
        int afs_socket;
+       /** The current state of \a afs_socket. */
        enum afs_socket_status afsss;
+       /** The memory mapped audio file. */
        char *map;
+       /** Used by the scheduler. */
        struct task task;
+       /** Pointer to the header of the mapped audio file. */
        const char *header_buf;
+       /** Length of the audio file header. */
        size_t header_len;
 };