From: Andre Noll Date: Mon, 1 Dec 2008 20:19:17 +0000 (+0100) Subject: Merge commit 'fml/master' X-Git-Tag: v0.3.4~91 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=e9805263600a69a88e60edd1c8b4ba9e01a79322;hp=e0b7f590a37c672994946405e19385bb8f4bbb37 Merge commit 'fml/master' --- diff --git a/Makefile.in b/Makefile.in index 8ac8b65b..9e60b0df 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 4ed40f7c..bfff0df1 100644 --- 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 5cca5b8d..d5a35556 100644 --- 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) { diff --git a/attribute.c b/attribute.c index 24a3826d..655c2866 100644 --- a/attribute.c +++ b/attribute.c @@ -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) diff --git a/audiod.c b/audiod.c index 33eac4b9..b9bd852a 100644 --- 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 *)); diff --git a/compress_filter.c b/compress_filter.c index 6034ce79..bf129b4a 100644 --- a/compress_filter.c +++ b/compress_filter.c @@ -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; diff --git a/mp3dec_filter.c b/mp3dec_filter.c index e9d84c1b..aa2ab510 100644 --- a/mp3dec_filter.c +++ b/mp3dec_filter.c @@ -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; diff --git a/ogg_afh.c b/ogg_afh.c index 11f7f5ad..b6132edf 100644 --- 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 a39ed97d..3f2da13a 100644 --- a/para.h +++ b/para.h @@ -30,12 +30,24 @@ /** 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 index 00000000..40834de6 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 index 00000000..2392f88a --- /dev/null +++ b/versions/paraslash-0.3.3.tar.bz2.asc @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.6 (GNU/Linux) + +iD8DBQBJM93LWto1QDEAkw8RAkqoAJ4otG8p97XWBP7x2o1zy1R3M80BVQCfZy7K +WxcDbEGOvK1Vk0zhGPWr7gU= +=Ni2V +-----END PGP SIGNATURE----- diff --git a/web/index.in.html b/web/index.in.html index 86a53872..ac3d3cd0 100644 --- a/web/index.in.html +++ b/web/index.in.html @@ -1,6 +1,10 @@

Events