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) \
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 && \
- para_play (optional)
A small wav/raw player for alsa.
+ Debian package: libasound2-dev
- para_audiod (optional, but recommended):
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).
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);
} else {
status_buf[ret + sbo] = '\0';
sbo = for_each_line(status_buf, ret + sbo,
- &check_stat_line, 0);
+ &check_stat_line);
}
}
slot_io(&wfds);
*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;
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)
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);
}
}
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)
*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);
}
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);
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;
}
}
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;
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;
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 */
*
* \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;
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 *);
}
*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;
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;
}
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 */
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;
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;
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;
* \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;
*end = '\0';
line_handler(start);
start = ++end;
- if (num && num_lines >= num)
- break;
} else
start = ++end;
}
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);
}
--- /dev/null
+<!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>