]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
Merge branch 'no_colon_separators'
authorAndre <maan@p133.(none)>
Thu, 9 Mar 2006 15:36:56 +0000 (16:36 +0100)
committerAndre <maan@p133.(none)>
Thu, 9 Mar 2006 15:36:56 +0000 (16:36 +0100)
19 files changed:
Makefile.in
README
audiod.c
compress.c
filter.c
filter_chain.c
gui.c
gui_common.c
http_recv.c
net.c
net.h
ogg.c
oggdec.c
para.h
plm_dbtool.c
recv.c
stat.c
wav.c
web/header2.html [new file with mode: 0644]

index 91fd3a140e947962aa2fb9cab03cd3938f9dd78f..ae0923c1439d9566b27f32e29d97ee02e87c3662 100644 (file)
@@ -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 3f8e62ce20a31498406395e31982273bced8046a..b51a8d39cd8ca153c7996f8a6e9dd94f41bd2b03 100644 (file)
--- 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).
index 552577d538d4815f90e79b76c572a7fc28439fb9..ccc3f9b962b5d7627d16026b5820b0f9ab9a882f 100644 (file)
--- 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);
index a4d881f5afedb6057761f2aabcf789db8b4815e1..bad4ada4c6a78f712a01bd8a635ef2328b0a3115 100644 (file)
@@ -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;
index 2cd6d09d4580ae89171e4213ab9a4abfd5df9748..46b48251d757c91360126d927469deab08769e88 100644 (file)
--- 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);
                }
        }
index 312180f8afe539e72ad741c37e9c5be2107c7602..42db37830718f3618bcb0d34c25cdb04bca60e05 100644 (file)
@@ -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 a347e79c155d47186f7fe006759dfb05ba34e0cc..9b1c739f2110d6e05c0d27e0a832472d72b5b149 100644 (file)
--- 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);
index d806ebe2df2b6e741ce80837fc59e3c28acb9536..07cab16fe211c740c7a25a484e1fee5271490498 100644 (file)
@@ -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;
 }
index 2e3a11b3ee0a1d667b54d06aff3fc78dd51c42e6..2e1d467b0a20b4b5dccf7f23b3724f7d3c942d4b 100644 (file)
@@ -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 9c646e9046859d006a307824a108e9825de70967..e897645167d86a45f454d4ef213fc198d7f8ecd1 100644 (file)
--- 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 ebb3983ab7e4b09d32ca5f36a7872b397d3ebb0a..c2f32c78edfd4613ab2bf42ee3b5094aaa523c02 100644 (file)
--- 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 d3ebd465730b66ac2ec071e4af851dc47301b4d2..0c7b20ea47a8350860c19fe2de7c3eba8b4d0e9f 100644 (file)
--- 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;
 }
index acd4f120e8158911af99d789959e457db1ae5826..d6c8f1121f0cf11f3289e4ba64cbf713f99950aa 100644 (file)
--- 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 <ib && !*fn->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 049262d39d75074a84e7bdf984e4e1c1c48258bd..f3e67ed9c1213b13c3a486767564799421e089e4 100644 (file)
--- 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;
index 3b551fcd5e36ab68e227a0364e1fa6e9b3fc877c..ad6a95b14ec316057a7114c7fd29e7366341d962 100644 (file)
@@ -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 abd0419f6f99bb2529982beeecf0d813061b5fd6..31c18a31eab3c8c7d79b50f5d59840bfcf0e9ece 100644 (file)
--- 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 7550f2d6d2f33d684be389417589efe4a75dd71c..4ad1b5a88d957f411c5ccad6bb00f871e440f842 100644 (file)
--- 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 01ac440239f1e4815a63365e098616d209831924..879b1887b069b43b05101ea52e602a4c9c12add3 100644 (file)
--- 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 (file)
index 0000000..550411e
--- /dev/null
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+   "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+       <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'>
+       <title>Paraslash</title>
+       <LINK href="../../para.css" REL="stylesheet" TYPE="text/css">
+       <link rel="shortcut icon" href="../../paraslash.ico">
+</head>
+<body>
+       <basefont face="lucida, helvetica, arial" size="3">
+       <table border="0" cellpadding="10" cellspacing="0">
+       <tr>
+               <td>
+                       <a href="../..//"><IMG SRC="../../paraslash.png" alt="paraslash" border="0"></a><BR>
+               </td>
+               <td>
+                       <h3>Paraslash: Play, archive, rate and stream
+                       large audio sets happily</h3>
+
+                       A set of tools for doing just what its name
+                       suggests.
+               </td>
+       </tr>
+       <tr>
+               <td valign="TOP">
+                       <br><a href="../../index.html">Home</a>
+                       <br><a href="../../NEWS.html">News</a>
+                       <br><a href="../../FEATURES.html">Features</a>
+                       <br><a href="../../download.html">Download</a>
+                       <br><a href="../../screenshots.html">Screenshots</a>
+                       <br><a href="../../demo.html">Live Demo</a>
+                       <br><a href="../../ChangeLog.html">Changelog</a>
+                       <br><a href="../../documentation.html">Documentation</a>
+                       <br><a href="../../license.html">License</a>
+                       <br><a href="../../contact.html">Contact</a>
+                       <br><a href="../../CREDITS.html">Credits</a>
+               </td>
+               <td Valign="TOP">
+       <hr>