summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2016-01-10 11:06:45 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2016-01-10 11:06:45 +0000
commit82bd6010443c9416e28c3f623356a1165693d81c (patch)
treef77e74db67b875a192035acfdd1307c7629a52a0 /usr.bin
parent652e5746e130a42d48cc63f8ce9997791903fcfb (diff)
trailing spaces, fit in 80 columns
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/aucat/abuf.c4
-rw-r--r--usr.bin/aucat/afile.c11
-rw-r--r--usr.bin/aucat/aucat.c20
-rw-r--r--usr.bin/aucat/dsp.c14
-rw-r--r--usr.bin/aucat/utils.c6
5 files changed, 31 insertions, 24 deletions
diff --git a/usr.bin/aucat/abuf.c b/usr.bin/aucat/abuf.c
index d49c2961edd..9de7ffc3434 100644
--- a/usr.bin/aucat/abuf.c
+++ b/usr.bin/aucat/abuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: abuf.c,v 1.27 2015/11/09 14:44:23 mmcc Exp $ */
+/* $OpenBSD: abuf.c,v 1.28 2016/01/10 11:06:44 ratchov Exp $ */
/*
* Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -53,7 +53,7 @@ abuf_init(struct abuf *buf, unsigned int len)
void
abuf_done(struct abuf *buf)
{
-#ifdef DEBUG
+#ifdef DEBUG
if (buf->used > 0) {
if (log_level >= 3) {
log_puts("deleting non-empty buffer, used = ");
diff --git a/usr.bin/aucat/afile.c b/usr.bin/aucat/afile.c
index cc34cd1a598..ca24d28798a 100644
--- a/usr.bin/aucat/afile.c
+++ b/usr.bin/aucat/afile.c
@@ -563,7 +563,7 @@ afile_aiff_readhdr(struct afile *f)
log_puts(f->path);
log_puts(": failed to read chunk header\n");
return 0;
- }
+ }
csize = be32_get(&chunk.size);
if (memcmp(chunk.id, aiff_id_comm, 4) == 0) {
if (!afile_aiff_readcomm(f, csize, comp, &nfr))
@@ -572,7 +572,8 @@ afile_aiff_readhdr(struct afile *f)
} else if (memcmp(chunk.id, aiff_id_data, 4) == 0) {
if (!afile_aiff_readdata(f, csize, &offs))
return 0;
- f->startpos = sizeof(form) + pos + sizeof(chunk) + offs;
+ f->startpos = sizeof(form) + pos +
+ sizeof(chunk) + offs;
break;
} else {
#ifdef DEBUG
@@ -927,7 +928,8 @@ afile_open(struct afile *f, char *path, int hdr, int flags,
f->fd = STDOUT_FILENO;
} else {
f->path = path;
- f->fd = open(f->path, O_WRONLY | O_TRUNC | O_CREAT, 0666);
+ f->fd = open(f->path,
+ O_WRONLY | O_TRUNC | O_CREAT, 0666);
if (f->fd < 0) {
log_puts(f->path);
log_puts(": failed to create file\n");
@@ -956,7 +958,8 @@ afile_open(struct afile *f, char *path, int hdr, int flags,
f->par.msb = 1;
f->endpos = f->startpos = sizeof(struct aiff_hdr);
f->maxpos = 0x7fffffff;
- if (!afile_writehdr(f, &dummy, sizeof(struct aiff_hdr)))
+ if (!afile_writehdr(f, &dummy,
+ sizeof(struct aiff_hdr)))
goto bad_close;
} else if (f->hdr == AFILE_HDR_AU) {
f->par.bits = (f->par.bits + 7) & ~7;
diff --git a/usr.bin/aucat/aucat.c b/usr.bin/aucat/aucat.c
index 4f3f525ac5a..1e3f1f560cc 100644
--- a/usr.bin/aucat/aucat.c
+++ b/usr.bin/aucat/aucat.c
@@ -307,7 +307,8 @@ slot_init(struct slot *s)
s->cmin, s->cmax,
0, dev_pchan - 1,
0, dev_pchan - 1);
- if (s->afile.fmt != AFILE_FMT_PCM || !aparams_native(&s->afile.par)) {
+ if (s->afile.fmt != AFILE_FMT_PCM ||
+ !aparams_native(&s->afile.par)) {
dec_init(&s->conv, &s->afile.par, slot_nch);
s->convbuf =
xmalloc(s->round * slot_nch * sizeof(adata_t));
@@ -422,7 +423,7 @@ slot_del(struct slot *s)
free(s);
}
-static int
+static int
play_filt_resamp(struct slot *s, void *res_in, void *out, int todo)
{
int i, offs, vol, nch;
@@ -452,7 +453,7 @@ play_filt_resamp(struct slot *s, void *res_in, void *out, int todo)
return todo;
}
-static int
+static int
play_filt_dec(struct slot *s, void *in, void *out, int todo)
{
void *tmp;
@@ -503,7 +504,7 @@ slot_mix_badd(struct slot *s, adata_t *odata)
return done;
}
-static int
+static int
rec_filt_resamp(struct slot *s, void *in, void *res_out, int todo)
{
int i, vol, offs, nch;
@@ -532,7 +533,7 @@ rec_filt_resamp(struct slot *s, void *in, void *res_out, int todo)
return todo;
}
-static int
+static int
rec_filt_enc(struct slot *s, void *in, void *out, int todo)
{
void *tmp;
@@ -1029,7 +1030,8 @@ playrec_cycle(void)
n = sio_read(dev_sh, p, todo);
if (n == 0) {
log_puts(dev_name);
- log_puts(": failed to read from device\n");
+ log_puts(": failed to read "
+ "from device\n");
return 0;
}
p += n;
@@ -1111,7 +1113,7 @@ playrec(char *dev, int mode, int bufsz, char *port)
continue;
log_puts("poll failed\n");
panic();
- }
+ }
if (dev_pstate == DEV_START) {
ev = sio_revents(dev_sh, pfds);
if (ev & POLLHUP) {
@@ -1273,7 +1275,7 @@ main(int argc, char **argv)
port = NULL;
dev = NULL;
mode = 0;
-
+
while ((c = getopt(argc, argv, "b:c:de:f:h:i:j:no:q:r:t:v:")) != -1) {
switch (c) {
case 'b':
@@ -1356,7 +1358,7 @@ main(int argc, char **argv)
if (mode == 0) {
log_puts("at least -i or -o required\n");
return 1;
- }
+ }
if (!playrec(dev, mode, bufsz, port))
return 1;
}
diff --git a/usr.bin/aucat/dsp.c b/usr.bin/aucat/dsp.c
index 4575b26e5b3..28d40bafe34 100644
--- a/usr.bin/aucat/dsp.c
+++ b/usr.bin/aucat/dsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsp.c,v 1.2 2015/05/04 12:51:13 ratchov Exp $ */
+/* $OpenBSD: dsp.c,v 1.3 2016/01/10 11:06:44 ratchov Exp $ */
/*
* Copyright (c) 2008-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -222,7 +222,7 @@ aparams_strtoenc(struct aparams *par, char *istr)
return 0;
done:
- par->msb = msb;
+ par->msb = msb;
par->sig = sig;
par->bits = bits;
par->bps = bps;
@@ -366,7 +366,8 @@ resamp_do(struct resamp *p, adata_t *in, adata_t *out, int todo)
* initialize resampler with ibufsz/obufsz factor and "nch" channels
*/
void
-resamp_init(struct resamp *p, unsigned int iblksz, unsigned int oblksz, int nch)
+resamp_init(struct resamp *p, unsigned int iblksz,
+ unsigned int oblksz, int nch)
{
unsigned int i;
@@ -516,7 +517,7 @@ enc_init(struct conv *p, struct aparams *par, int nch)
p->bias = (1U << 31) >> p->shift;
} else {
p->bias = 0;
- }
+ }
if (!par->le) {
p->bfirst = par->bps - 1;
p->bnext = -1;
@@ -673,7 +674,8 @@ dec_do_float(struct conv *p, unsigned char *in, unsigned char *out, int todo)
* convert samples from ulaw/alaw to adata_t
*/
void
-dec_do_ulaw(struct conv *p, unsigned char *in, unsigned char *out, int todo, int is_alaw)
+dec_do_ulaw(struct conv *p, unsigned char *in,
+ unsigned char *out, int todo, int is_alaw)
{
unsigned int f;
unsigned char *idata;
@@ -711,7 +713,7 @@ dec_init(struct conv *p, struct aparams *par, int nch)
p->bias = (1U << 31) >> p->shift;
} else {
p->bias = 0;
- }
+ }
if (par->le) {
p->bfirst = par->bps - 1;
p->bnext = -1;
diff --git a/usr.bin/aucat/utils.c b/usr.bin/aucat/utils.c
index f97db8d22e9..9c84c7de85f 100644
--- a/usr.bin/aucat/utils.c
+++ b/usr.bin/aucat/utils.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utils.c,v 1.2 2015/11/09 14:44:23 mmcc Exp $ */
+/* $OpenBSD: utils.c,v 1.3 2016/01/10 11:06:44 ratchov Exp $ */
/*
* Copyright (c) 2003-2012 Alexandre Ratchov <alex@caoua.org>
*
@@ -91,7 +91,7 @@ log_putx(unsigned long num)
c += (c < 10) ? '0' : 'a' - 10;
LOG_PUTC(c);
}
- } else
+ } else
LOG_PUTC('0');
}
@@ -146,7 +146,7 @@ void *
xmalloc(size_t size)
{
void *p;
-
+
p = malloc(size);
if (p == NULL) {
log_puts("failed to allocate ");