From: Andre Date: Thu, 9 Mar 2006 15:36:56 +0000 (+0100) Subject: Merge branch 'no_colon_separators' X-Git-Tag: v0.2.11~33 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=418339759697ff6884e77c809805645c5f4db5b5;hp=a2a83ea6614aeb78ec07b3cebd06abcfae418109;p=paraslash.git Merge branch 'no_colon_separators' --- diff --git a/Makefile.in b/Makefile.in index 91fd3a14..ae0923c1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -87,7 +87,7 @@ web_misc := $(patsubst %,web/sync/%,$(web_misc)) misc := bash_completion headers := para.h server.h SFont.h crypt.h list.h http.h send.h ortp.h rc4.h \ close_on_fork.h afs.h db.h gcc-compat.h recv.h filter.h audiod.h \ - grab_client.h error.h net.h ringbuffer.h daemon.h string.h + grab_client.h error.h net.h ringbuffer.h daemon.h string.h ipc.h scripts := install-sh configure autocrap := Makefile.in config.h.in configure.ac autogen.sh tarball := web/sync/doc pics fonts $(c_sources) $(sample_conf) $(headers) \ @@ -211,7 +211,8 @@ distclean: clean maintainer-clean: distclean rm -f $(gengetopts_c) $(gengetopts_h) *.tar.bz2 \ $(grutatxt_html) ChangeLog* config.h configure \ - config.h.in + config.h.in skencil/*.pdf skencil/*.ps + rm -rf doc install: all umask 022 && \ diff --git a/README b/README index 3f8e62ce..b51a8d39 100644 --- a/README +++ b/README @@ -57,6 +57,7 @@ It contains the following programs: - para_play (optional) A small wav/raw player for alsa. + Debian package: libasound2-dev - para_audiod (optional, but recommended): @@ -163,6 +164,8 @@ If you want to stream ogg vorbis files you'll need: http://www.xiph.org/downloads/ +Debian packages: libogg-dev libvorbis-dev + Note that para_audiod still works even if neither mp3 nor ogg support was compiled in. You'll have to use the --no_default_filters option in this case (and e.g. "mpg123 -" as the stream write command). diff --git a/audiod.c b/audiod.c index 552577d5..ccc3f9b9 100644 --- a/audiod.c +++ b/audiod.c @@ -987,16 +987,16 @@ static int write_audio_data(int slot_num) buf = &rn->buf; len = &rn->loaded; } - PARA_DEBUG_LOG("writing %p (%d bytes)\n", *buf, *len); + PARA_DEBUG_LOG("writing %p (%zd bytes)\n", *buf, *len); rv = write(s->write_fd, *buf, *len); - PARA_DEBUG_LOG("wrote %d/%d\n", rv, *len); + PARA_DEBUG_LOG("wrote %d/%zd\n", rv, *len); if (rv < 0) { PARA_WARNING_LOG("write error in slot %d (fd %d): %s\n", slot_num, s->write_fd, strerror(errno)); *len = 0; s->fci->error = E_WRITE_AUDIO_DATA; } else if (rv != *len) { - PARA_DEBUG_LOG("partial %s write (%i/%i) for slot %d\n", + PARA_DEBUG_LOG("partial %s write (%i/%zd) for slot %d\n", audio_formats[s->format], rv, *len, slot_num); *len -= rv; memmove(*buf, *buf + rv, *len); @@ -1545,7 +1545,7 @@ repeat: } else { status_buf[ret + sbo] = '\0'; sbo = for_each_line(status_buf, ret + sbo, - &check_stat_line, 0); + &check_stat_line); } } slot_io(&wfds); diff --git a/compress.c b/compress.c index a4d881f5..bad4ada4 100644 --- a/compress.c +++ b/compress.c @@ -124,7 +124,7 @@ static ssize_t compress(char *inbuf, size_t inbuf_len, struct filter_node *fn) *op++ = sample; } pcd->pn = (pcd->pn + 1) % pcd->conf->buckets_arg; - PARA_DEBUG_LOG("bucket: %03i, input len: %i, length: %i, peak: %05i, " + PARA_DEBUG_LOG("bucket: %03i, input len: %zd, length: %zd, peak: %05i, " "current gain: %03i, clipped: %d\n", pcd->pn, inbuf_len, length, peak, pcd->current_gain, pcd->clip); fn->loaded = length; diff --git a/filter.c b/filter.c index 2cd6d09d..46b48251 100644 --- a/filter.c +++ b/filter.c @@ -143,7 +143,7 @@ int main(int argc, char *argv[]) again: if (*il < INBUF_SIZE && !eof) { ret = read(STDIN_FILENO, ib + *il, INBUF_SIZE - *il); - PARA_DEBUG_LOG("read %d/%d\n", ret, INBUF_SIZE - *il); + PARA_DEBUG_LOG("read %d/%zd\n", ret, INBUF_SIZE - *il); if (ret < 0) goto out; if (!ret) @@ -156,12 +156,12 @@ again: converted = ret; if (*ol) { ret = write(STDOUT_FILENO, ob, *ol); - PARA_DEBUG_LOG("wrote %d/%d\n", ret, *ol); + PARA_DEBUG_LOG("wrote %d/%zd\n", ret, *ol); if (ret <= 0) goto out; *ol -= ret; if (*ol) { - PARA_NOTICE_LOG("short write: %d bytes left\n", *ol); + PARA_NOTICE_LOG("short write: %zd bytes left\n", *ol); memmove(ob, ob + ret, *ol); } } diff --git a/filter_chain.c b/filter_chain.c index 312180f8..42db3783 100644 --- a/filter_chain.c +++ b/filter_chain.c @@ -123,7 +123,7 @@ again: int ret; if (*loaded && fn->loaded < fn->bufsize) { size_t old_fn_loaded = fn->loaded; - PARA_DEBUG_LOG("fc %p loaded: %d, calling %s convert\n", fci, *loaded, fn->filter->name); + PARA_DEBUG_LOG("fc %p loaded: %zd, calling %s convert\n", fci, *loaded, fn->filter->name); ret = fn->filter->convert(ib, *loaded, fn); if (ret < 0) { if (!fci->error) @@ -134,7 +134,7 @@ again: *loaded -= ret; conv += ret; if (*loaded && ret) { - PARA_DEBUG_LOG("moving %d bytes in input buffer for %s filter\n", + PARA_DEBUG_LOG("moving %zd bytes in input buffer for %s filter\n", *loaded, fn->filter->name); memmove(ib, ib + ret, *loaded); } diff --git a/gui.c b/gui.c index a347e79c..9b1c739f 100644 --- a/gui.c +++ b/gui.c @@ -937,7 +937,7 @@ check_return: if (cp_numread <= 0 && !cbo) /* command complete */ return 0; if (cbo) - cbo = for_each_line(command_buf, cbo, &add_output_line, 0); + cbo = for_each_line(command_buf, cbo, &add_output_line); if (cp_numread <= 0) cbo = 0; wrefresh(bot.win); diff --git a/gui_common.c b/gui_common.c index d806ebe2..07cab16f 100644 --- a/gui_common.c +++ b/gui_common.c @@ -24,7 +24,7 @@ int read_audiod_pipe(int fd, void (*line_handler)(char *) ) if (ret > 0) { loaded += ret; buf[loaded] = '\0'; - loaded = for_each_line(buf, loaded, line_handler, 0); + loaded = for_each_line(buf, loaded, line_handler); } return ret; } diff --git a/http_recv.c b/http_recv.c index 2e3a11b3..2e1d467b 100644 --- a/http_recv.c +++ b/http_recv.c @@ -139,7 +139,7 @@ static int http_post_select(struct receiver_node *rn, int select_ret, } ret = recv_bin_buffer(phd->fd, rn->buf + rn->loaded, BUFSIZE - rn->loaded); if (ret <= 0) { - PARA_NOTICE_LOG("recv returned %d/%d\n", ret, BUFSIZE - rn->loaded); + PARA_NOTICE_LOG("recv returned %d/%zd\n", ret, BUFSIZE - rn->loaded); return ret < 0? -E_HTTP_RECV_BUF : 0; } rn->loaded += ret; @@ -175,7 +175,6 @@ static int http_recv_open(struct receiver_node *rn) rn->buf = para_calloc(BUFSIZE); rn->private_data = para_calloc(sizeof(struct private_http_recv_data)); phd = rn->private_data; - optind = 0; ret = -E_HOST_INFO; if (!(he = get_host_info(conf->host_arg))) goto err_out; diff --git a/net.c b/net.c index 9c646e90..e8976451 100644 --- a/net.c +++ b/net.c @@ -73,7 +73,7 @@ static int sendall(int fd, const char *buf, size_t *len) total += n; bytesleft -= n; if (total < *len) - PARA_DEBUG_LOG("short write (%d byte(s) left)", + PARA_DEBUG_LOG("short write (%zd byte(s) left)", *len - total); } *len = total; /* return number actually sent here */ @@ -253,7 +253,7 @@ int para_connect(int fd, struct sockaddr_in *their_addr) * * \sa accept(2). */ -int para_accept(int fd, void *addr, size_t size) +int para_accept(int fd, void *addr, socklen_t size) { int new_fd; diff --git a/net.h b/net.h index ebb3983a..c2f32c78 100644 --- a/net.h +++ b/net.h @@ -37,7 +37,7 @@ int send_bin_buffer(int, const char *, size_t); int send_va_buffer(int, char *, ...); int recv_buffer(int, char *, ssize_t); int recv_bin_buffer(int, char *, ssize_t); -int para_accept(int, void *addr, size_t size); +int para_accept(int, void *addr, socklen_t size); int create_pf_socket(const char *, struct sockaddr_un *, int mod); int init_unix_addr(struct sockaddr_un *, const char *); int recv_cred_buffer(int, char *, size_t, struct ucred *); diff --git a/ogg.c b/ogg.c index d3ebd465..0c7b20ea 100644 --- a/ogg.c +++ b/ogg.c @@ -319,7 +319,7 @@ char *ogg_read_chunk(long unsigned current_chunk, ssize_t *len) } *len = cs; if (!oggbuf || oggbuf_len < *len) { - PARA_INFO_LOG("increasing ogg buffer size (%d -> %u)\n", + PARA_INFO_LOG("increasing ogg buffer size (%d -> %zu)\n", oggbuf_len, *len); oggbuf = para_realloc(oggbuf, *len); oggbuf_len = *len; @@ -334,7 +334,7 @@ char *ogg_read_chunk(long unsigned current_chunk, ssize_t *len) return NULL; } if (ret != *len) - PARA_WARNING_LOG("short read (%d/%d)\n", ret, *len); + PARA_WARNING_LOG("short read (%d/%zd)\n", ret, *len); *len = ret; return oggbuf; } diff --git a/oggdec.c b/oggdec.c index acd4f120..d6c8f112 100644 --- a/oggdec.c +++ b/oggdec.c @@ -134,12 +134,12 @@ static ssize_t ogg_convert(char *inbuffer, size_t len, struct filter_node *fn) if (!pod->vf) { int ib = 1024 * conf->initial_buffer_arg; /* initial buffer */ if (len fci->eof && !fn->fci->error) { - PARA_INFO_LOG("initial input buffer %d/%d, waiting for more data\n", + PARA_INFO_LOG("initial input buffer %zd/%d, waiting for more data\n", len, ib); return 0; } pod->vf = para_malloc(sizeof(struct OggVorbis_File)); - PARA_NOTICE_LOG("input buffer: %d, opening ov callbacks\n", len); + PARA_NOTICE_LOG("input buffer: %zd, opening ov callbacks\n", len); ret = ov_open_callbacks(fn, pod->vf, NULL, /* no initial buffer */ 0, /* no initial bytes */ diff --git a/para.h b/para.h index 049262d3..f3e67ed9 100644 --- a/para.h +++ b/para.h @@ -163,7 +163,7 @@ int stat_line_valid(const char *); void stat_client_write(char *msg); int stat_client_add(int); void dump_empty_status(void); -unsigned for_each_line(char *, int, void (*)(char *), int); +unsigned for_each_line(char *, int, void (*)(char *)); struct stat_item_data { char *prefix, *postfix; diff --git a/plm_dbtool.c b/plm_dbtool.c index 3b551fcd..ad6a95b1 100644 --- a/plm_dbtool.c +++ b/plm_dbtool.c @@ -248,7 +248,7 @@ static void plm_post_select(__unused fd_set *rfds, __unused fd_set *wfds) goto out; } PARA_DEBUG_LOG("loading new playlist (%d bytes)\n", pcd->size); - ret = for_each_line((char *)shm, pcd->size, &playlist_add, 0); + ret = for_each_line((char *)shm, pcd->size, &playlist_add); shm_detach(shm); PARA_NOTICE_LOG("new playlist (%d entries)\n", playlist_len); pcd->retval = 1; diff --git a/recv.c b/recv.c index abd0419f..31c18a31 100644 --- a/recv.c +++ b/recv.c @@ -104,13 +104,13 @@ recv: goto recv; } ret = write(STDOUT_FILENO, rn.buf, rn.loaded); - PARA_DEBUG_LOG("wrote %d/%d\n", ret, rn.loaded); + PARA_DEBUG_LOG("wrote %d/%zd\n", ret, rn.loaded); if (ret < 0) { ret = -E_WRITE_STDOUT; goto out; } if (ret != rn.loaded) { - PARA_INFO_LOG("short write %d/%d\n", ret, rn.loaded); + PARA_INFO_LOG("short write %d/%zd\n", ret, rn.loaded); memmove(rn.buf, rn.buf + ret, rn.loaded - ret); } rn.loaded -= ret; diff --git a/stat.c b/stat.c index 7550f2d6..4ad1b5a8 100644 --- a/stat.c +++ b/stat.c @@ -234,18 +234,16 @@ int stat_line_valid(const char *line) * \param buf the buffer containing data seperated by newlines * \param n the number of bytes in \a buf * \param line_handler the custom function - * \param num upper bound on calls to \a line_handler * * If \a line_handler is \p NULL, return number of complete lines in buf. - * Otherwise, call \a line_handler for each complete line, but no more than \a num - * times. If \a num is zero, there is no restriction on how often \a line_handler - * may be called. The rest of the buffer (last chunk containing incomplete line - * if \a num is zero) is moved to the beginning of the buffer. + * Otherwise, call \a line_handler for each complete line. The rest of the + * buffer (last chunk containing incomplete line is moved to the beginning of + * the buffer. * * \return If line_handler is not NULL, this function returns the number * of bytes not handled to \a line_handler. */ -unsigned for_each_line(char *buf, int n, void (*line_handler)(char *), int num) +unsigned for_each_line(char *buf, int n, void (*line_handler)(char *)) { char *start = buf, *end; int i, num_lines = 0; @@ -269,8 +267,6 @@ unsigned for_each_line(char *buf, int n, void (*line_handler)(char *), int num) *end = '\0'; line_handler(start); start = ++end; - if (num && num_lines >= num) - break; } else start = ++end; } diff --git a/wav.c b/wav.c index 01ac4402..879b1887 100644 --- a/wav.c +++ b/wav.c @@ -95,7 +95,7 @@ static void wav_open(struct filter_node *fn) fn->private_data = para_malloc(sizeof(int)); bof = fn->private_data; *bof = 1; - PARA_DEBUG_LOG("wav filter node: %p, output buffer: %p, loaded: %d\n", + PARA_DEBUG_LOG("wav filter node: %p, output buffer: %p, loaded: %zd\n", fn, fn->buf, fn->loaded); } diff --git a/web/header2.html b/web/header2.html new file mode 100644 index 00000000..550411ed --- /dev/null +++ b/web/header2.html @@ -0,0 +1,40 @@ + + + + + Paraslash + + + + + + + + + + + + +
+ paraslash
+
+

Paraslash: Play, archive, rate and stream + large audio sets happily

+ + A set of tools for doing just what its name + suggests. +
+
Home +
News +
Features +
Download +
Screenshots +
Live Demo +
Changelog +
Documentation +
License +
Contact +
Credits +
+