Merge commit 'fml/master'
authorAndre Noll <maan@systemlinux.org>
Mon, 1 Dec 2008 20:19:17 +0000 (21:19 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 1 Dec 2008 20:19:17 +0000 (21:19 +0100)
13 files changed:
Makefile.in
NEWS
aft.c
attribute.c
audiod.c
compress_filter.c
mp3dec_filter.c
ogg_afh.c
para.h
versions/paraslash-0.3.3.tar.bz2 [new file with mode: 0644]
versions/paraslash-0.3.3.tar.bz2.asc [new file with mode: 0644]
web/index.in.html
write.h

index 8ac8b65b92c66bb1eafed423c21a6c3975ee6e92..9e60b0df1f399b94bc1c90c7915366bb083fa970 100644 (file)
@@ -12,7 +12,7 @@ build_date := $(shell date)
 uname_s := $(shell uname -s 2>/dev/null || echo "UNKNOWN_OS")
 uname_rs := $(shell uname -rs)
 cc_version := $(shell $(CC) --version | head -n 1)
-codename := axiomatic perspectivity
+codename := elliptic inheritance
 
 DEBUG_CPPFLAGS += -Wno-sign-compare -g -Wunused -Wundef -W
 DEBUG_CPPFLAGS += -Wredundant-decls
diff --git a/NEWS b/NEWS
index 4ed40f7c940bdc02df322de581413a29670ce0c0..bfff0df163864e7bc66abac3f8200c74f90832f2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,14 @@
 NEWS
 ====
 
--------------------------------------------------
-0.3.3 (to be announced) "axiomatic perspectivity"
--------------------------------------------------
+----------------------------------------------
+0.3.4 (to be announced) "elliptic inheritance"
+----------------------------------------------
+
+
+--------------------------------------------
+0.3.3 (2008-12-01) "axiomatic perspectivity"
+--------------------------------------------
 
 Internal code cleanups, bug fixes, improved tag handling and the new
 amplification filter.
diff --git a/aft.c b/aft.c
index 5cca5b8d88f0e6de4e7f5770df63fc0785815049..d5a355566e387df5bc6e8b1ec06fad03bb660c3e 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -1260,8 +1260,8 @@ static int prepare_ls_row(struct osl_row *row, void *ls_opts)
        GET_NUM_DIGITS(d->afsi.num_played, &num_digits);
        w->num_played_width = PARA_MAX(w->num_played_width, num_digits);
        /* get the number of chars to print this amount of time */
-       tmp = get_duration_width(d->afhi.seconds_total);
-       w->duration_width = PARA_MAX(w->duration_width, tmp);
+       num_digits = get_duration_width(d->afhi.seconds_total);
+       w->duration_width = PARA_MAX(w->duration_width, num_digits);
        GET_NUM_DIGITS(d->afsi.amp, &num_digits);
        w->amp_width = PARA_MAX(w->amp_width, num_digits);
        if (options->flags & LS_FLAG_ADMISSIBLE_ONLY) {
index 24a3826d3e051c4cdee6675d01466c12fd9d3d1b..655c286697a6ca68c94da410ec5841276dd97ef5 100644 (file)
@@ -343,7 +343,7 @@ static void com_addatt_callback(int fd, const struct osl_object *query)
                aed.name = p;
                aed.bitnum = bitnum;
                afs_event(ATTRIBUTE_ADD, &pb, &aed);
-               greatest_att_bitnum = PARA_MAX(greatest_att_bitnum, bitnum);
+               greatest_att_bitnum = PARA_MAX(greatest_att_bitnum, (int)bitnum);
        }
 out:
        if (ret < 0 && ret2 >= 0)
index 33eac4b910f00936c599a71b7cad0c251ae5190f..b9bd852aeba0ee3c65f9eec62ed6de977d41126a 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -603,7 +603,7 @@ static int init_writers(void)
        struct audio_format_info *a;
 
        init_supported_writers();
-       nw = PARA_MAX(1, conf.writer_given);
+       nw = PARA_MAX(1U, conf.writer_given);
        PARA_INFO_LOG("maximal number of writers: %d\n", nw);
        FOR_EACH_AUDIO_FORMAT(i) {
                a = &afi[i];
@@ -720,7 +720,7 @@ static int init_filters(void)
        int i, ret, nf;
 
        filter_init(filters);
-       nf = PARA_MAX(1 conf.filter_given);
+       nf = PARA_MAX(1U, conf.filter_given);
        PARA_INFO_LOG("maximal number of filters: %d\n", nf);
        FOR_EACH_AUDIO_FORMAT(i) {
                afi[i].filter_conf = para_malloc(nf * sizeof(void *));
index 6034ce790276c7bbcb8d35312e717394e10f5098..bf129b4ad13b939ec7ceb7cbbd2cf6d3e9563225 100644 (file)
@@ -34,7 +34,7 @@ struct private_compress_data {
        /** Number of samples already seen. */
        unsigned num_samples;
        /** Absolute value of the maximal sample in the current block. */
-       unsigned peak;
+       int peak;
 };
 
 static ssize_t compress(char *inbuf, size_t inbuf_len, struct filter_node *fn)
@@ -71,7 +71,7 @@ static ssize_t compress(char *inbuf, size_t inbuf_len, struct filter_node *fn)
                                pcd->current_gain++;
                } else
                        pcd->current_gain = PARA_MAX(pcd->current_gain - 2,
-                               1 << pcd->conf->inertia_arg);
+                               1U << pcd->conf->inertia_arg);
                pcd->peak = 0;
        }
        fn->loaded += length;
index e9d84c1baf366ef4390082bca5e8f27c289e7008..aa2ab510240e448c410dddc90fb445e471859445 100644 (file)
@@ -33,7 +33,7 @@ static ssize_t mp3dec(char *inbuffer, size_t len, struct filter_node *fn)
 {
        int i, ret;
        struct private_mp3dec_data *pmd = fn->private_data;
-       size_t copy = PARA_MIN(len, 4096);
+       size_t copy = PARA_MIN(len, (size_t)4096);
 
        if (fn->loaded + 16384 > fn->bufsize)
                return 0;
index 11f7f5ad53a9a1f999fa7c7076d88df3aeb4407b..b6132edf7bc3740c55836df48d62d66c9ee5609e 100644 (file)
--- a/ogg_afh.c
+++ b/ogg_afh.c
@@ -34,8 +34,15 @@ struct ogg_datasource {
 static size_t cb_read(void *buf, size_t size, size_t nmemb, void *datasource)
 {
        struct ogg_datasource *ods = datasource;
-       size_t copy = PARA_MIN(ods->numbytes - ods->fpos, size * nmemb),
-               ret = copy / size;
+       size_t copy, ret;
+
+       if (!size)
+               return 0;
+
+       assert(ods->numbytes >= ods->fpos);
+       ret = ods->numbytes - ods->fpos;
+       copy = PARA_MIN(ret, size * nmemb);
+       ret = copy / size;
        if (!ret)
                return 0;
        memcpy(buf, ods->map + ods->fpos, copy);
@@ -115,7 +122,7 @@ static int ogg_compute_header_len(char *map, size_t numbytes,
                struct afh_info *afhi)
 {
        int ret;
-       size_t len = PARA_MIN(numbytes, CHUNK_SIZE);
+       size_t len = PARA_MIN(numbytes, (size_t)CHUNK_SIZE);
        int serial;
        char *buf;
 
diff --git a/para.h b/para.h
index a39ed97df45502a0f93dcd8217cf5d9d6e792c78..3f2da13a859782ba8c5a014d6e6511ecd97d1f28 100644 (file)
--- a/para.h
+++ b/para.h
 /** used in various contexts */
 #define MAXLINE 255
 
-/** compute the minimum of \a a and \a b */
-#define PARA_MIN(a,b) ((a) < (b) ? (a) : (b))
-/** compute the maximum of \a a and \a b */
-#define PARA_MAX(a,b) ((a) > (b) ? (a) : (b))
-/** compute the absolute value of \a a */
-#define PARA_ABS(a) ((a) > 0 ? (a) : -(a))
+/** Compute the minimum of \a x and \a y. */
+#define PARA_MIN(x, y) ({ \
+       typeof(x) _min1 = (x); \
+       typeof(y) _min2 = (y); \
+       (void) (&_min1 == &_min2); \
+       _min1 < _min2 ? _min1 : _min2; })
+
+/** Compute the maximum of \a x and \a y. */
+#define PARA_MAX(x, y) ({ \
+       typeof(x) _max1 = (x); \
+       typeof(y) _max2 = (y); \
+       (void) (&_max1 == &_max2); \
+       _max1 < _max2 ? _max1 : _max2; })
+
+/** Compute the absolute value of \a x. */
+#define PARA_ABS(x) ({ \
+       typeof(x) _x = (x); \
+       _x > 0? _x : -_x; })
 
 /** debug loglevel, gets really noisy */
 #define DEBUG 1
diff --git a/versions/paraslash-0.3.3.tar.bz2 b/versions/paraslash-0.3.3.tar.bz2
new file mode 100644 (file)
index 0000000..40834de
Binary files /dev/null and b/versions/paraslash-0.3.3.tar.bz2 differ
diff --git a/versions/paraslash-0.3.3.tar.bz2.asc b/versions/paraslash-0.3.3.tar.bz2.asc
new file mode 100644 (file)
index 0000000..2392f88
--- /dev/null
@@ -0,0 +1,7 @@
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+iD8DBQBJM93LWto1QDEAkw8RAkqoAJ4otG8p97XWBP7x2o1zy1R3M80BVQCfZy7K
+WxcDbEGOvK1Vk0zhGPWr7gU=
+=Ni2V
+-----END PGP SIGNATURE-----
index 86a53872ffd0067d42138e34356ca500f445da3d..ac3d3cd0566a9e7fc7bfe4a7331ba333de57c189 100644 (file)
@@ -1,6 +1,10 @@
 <h1>Events</h1>
 <hr>
 <ul>
+       <li>2008-12-01: <a href="versions/paraslash-0.3.3.tar.bz2">paraslash-0.3.3</a>
+               <a href="versions/paraslash-0.3.3.tar.bz2.asc">(sig)</a>
+               "axiomatic perspectivity"
+       </li>
        <li>2008-04-11: <a href="versions/paraslash-0.3.2.tar.bz2">paraslash-0.3.2</a>
                <a href="versions/paraslash-0.3.2.tar.bz2.asc">(sig)</a>
                "probabilistic parity"
diff --git a/write.h b/write.h
index 02471f32b1d1ba5e424bb8571225fed4f02418e8..9723977ae4357506ac1c6b64284695577d1e5683 100644 (file)
--- a/write.h
+++ b/write.h
@@ -95,7 +95,7 @@ struct writer_node_group {
        /** Array of pointers to the corresponding writer nodes. */
        struct writer_node *writer_nodes;
        /** The maximum of the chunk_bytes values of the writer nodes in this group. */
-       size_t max_chunk_bytes;
+       int max_chunk_bytes;
        /** Non-zero if an error or end of file was encountered by the feeding task. */
        int *input_error;
        /** Current output buffer. */