From b66bffe91c2b0fac63a5124b968e807d5e73729e Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Sat, 1 May 2021 15:33:31 -0400 Subject: [PATCH 1/5] Mail: remove message about cyclic threads They happen, and we break the cycle. There's nothing the user can do, so there's no point in warning. --- sys/src/cmd/upas/Mail/mbox.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/src/cmd/upas/Mail/mbox.c b/sys/src/cmd/upas/Mail/mbox.c index 97742e379..3d16908d4 100644 --- a/sys/src/cmd/upas/Mail/mbox.c +++ b/sys/src/cmd/upas/Mail/mbox.c @@ -175,10 +175,9 @@ addchild(Mesg *p, Mesg *m, int d) assert(m->parent == nil); for(q = p; q != nil; q = q->parent){ - if(ideq(m->messageid, q->messageid)){ - fprint(2, "wonky message replies to self\n"); + /* some messages refer to themselves */ + if(ideq(m->messageid, q->messageid)) return 0; - } if(m->time > q->time) q->time = m->time; } From 5e81cc48bdb00a3e7ae3334728659b8f014248da Mon Sep 17 00:00:00 2001 From: Sigrid Date: Mon, 3 May 2021 21:04:39 +0200 Subject: [PATCH 2/5] libtags: upstream updates --- sys/src/cmd/audio/libtags/it.c | 4 ++-- sys/src/cmd/audio/libtags/mod.c | 5 +++-- sys/src/cmd/audio/libtags/tags.c | 15 ++++++++------- sys/src/cmd/audio/libtags/tagspriv.h | 2 +- sys/src/cmd/audio/libtags/xm.c | 5 ++--- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/sys/src/cmd/audio/libtags/it.c b/sys/src/cmd/audio/libtags/it.c index 6b5c5f0fe..600792346 100644 --- a/sys/src/cmd/audio/libtags/it.c +++ b/sys/src/cmd/audio/libtags/it.c @@ -3,12 +3,12 @@ int tagit(Tagctx *ctx) { - char d[4+26+1], o[26*UTFmax+1]; + uchar d[4+26+1], o[26*2+1]; if(ctx->read(ctx, d, 4+26) != 4+26 || memcmp(d, "IMPM", 4) != 0) return -1; d[4+26] = 0; - if(cp437toutf8(o, sizeof(o), d+4, 26) > 0) + if(iso88591toutf8(o, sizeof(o), d+4, 26) > 0) txtcb(ctx, Ttitle, "", o); return 0; diff --git a/sys/src/cmd/audio/libtags/mod.c b/sys/src/cmd/audio/libtags/mod.c index fe5bd4a01..62b7d51b1 100644 --- a/sys/src/cmd/audio/libtags/mod.c +++ b/sys/src/cmd/audio/libtags/mod.c @@ -16,6 +16,7 @@ static char *variants[] = "CD81", "OCTA", "OKTA", + "10CH", "16CN", "32CN", nil, @@ -24,7 +25,7 @@ static char *variants[] = int tagmod(Tagctx *ctx) { - char d[20], o[20*UTFmax+1]; + uchar d[20], o[20*2+1]; int i; if(ctx->seek(ctx, 1080, 0) != 1080) @@ -41,7 +42,7 @@ tagmod(Tagctx *ctx) return -1; if(ctx->read(ctx, d, 20) != 20) return -1; - if(cp437toutf8(o, sizeof(o), d, 20) > 0) + if(iso88591toutf8(o, sizeof(o), d, 20) > 0) txtcb(ctx, Ttitle, "", o); return 0; diff --git a/sys/src/cmd/audio/libtags/tags.c b/sys/src/cmd/audio/libtags/tags.c index 4627511fe..684fd26c7 100644 --- a/sys/src/cmd/audio/libtags/tags.c +++ b/sys/src/cmd/audio/libtags/tags.c @@ -41,19 +41,20 @@ tagscallcb(Tagctx *ctx, int type, const char *k, char *s, int offset, int size, char *e; if(f == nil && size == 0){ - while(*s <= ' ' && *s) + while((uchar)*s <= ' ' && *s) s++; e = s + strlen(s); - while(e != s && e[-1] <= ' ') + while(e != s && (uchar)e[-1] <= ' ') e--; *e = 0; } - if(type != Tunknown){ - ctx->found |= 1<num++; - } - if(*s) + if(*s){ ctx->tag(ctx, type, k, s, offset, size, f); + if(type != Tunknown){ + ctx->found |= 1<num++; + } + } } int diff --git a/sys/src/cmd/audio/libtags/tagspriv.h b/sys/src/cmd/audio/libtags/tagspriv.h index f77a21651..31e2e70ed 100644 --- a/sys/src/cmd/audio/libtags/tagspriv.h +++ b/sys/src/cmd/audio/libtags/tagspriv.h @@ -41,4 +41,4 @@ void cbvorbiscomment(Tagctx *ctx, char *k, char *v); void tagscallcb(Tagctx *ctx, int type, const char *k, char *s, int offset, int size, Tagread f); -#define txtcb(ctx, type, k, s) tagscallcb(ctx, type, k, (const char*)s, 0, 0, nil) +#define txtcb(ctx, type, k, s) tagscallcb(ctx, type, k, (char*)s, 0, 0, nil) diff --git a/sys/src/cmd/audio/libtags/xm.c b/sys/src/cmd/audio/libtags/xm.c index 7e97c7b54..8f070262f 100644 --- a/sys/src/cmd/audio/libtags/xm.c +++ b/sys/src/cmd/audio/libtags/xm.c @@ -3,12 +3,11 @@ int tagxm(Tagctx *ctx) { - char d[17+20+1], o[20*UTFmax+1], *s; + char d[17+20+1], o[20*UTFmax+1]; - if(ctx->read(ctx, d, 17+20) != 17+20 || memcmp(d, "Extended Module: ", 17) != 0) + if(ctx->read(ctx, d, 17+20) != 17+20 || cistrncmp(d, "Extended Module: ", 17) != 0) return -1; d[17+20] = 0; - for(s = d+17; *s == ' '; s++); if(cp437toutf8(o, sizeof(o), d+17, 20) > 0) txtcb(ctx, Ttitle, "", o); From fd785b5546965cf1bf148359ce607e0f75870a80 Mon Sep 17 00:00:00 2001 From: Sigrid Date: Tue, 4 May 2021 14:52:05 +0200 Subject: [PATCH 3/5] add zuke(1) manpage (thanks kemal & humm) --- sys/man/1/zuke | 174 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 sys/man/1/zuke diff --git a/sys/man/1/zuke b/sys/man/1/zuke new file mode 100644 index 000000000..db761bd4b --- /dev/null +++ b/sys/man/1/zuke @@ -0,0 +1,174 @@ +.TH ZUKE 1 +.SH NAME +mkplist, zuke \- graphical music player +.SH SYNOPSIS +.B audio/mkplist +.I directory/file/URL [...] +.br +.B audio/zuke +[ +.B -s +] [ +.B -c +.I columns +] +.SH DESCRIPTION +.PP +.I Zuke +is a graphical music player that reads a playlist from standard input +and presents an interface to play music. Playlists are generated +by +.I mkplist +, which accepts files, directories, and URLs as its arguments and +writes the resulting playlist to standard output. +.PP +Formats supported by +.I zuke +are: MP3, OGG/Vorbis, FLAC and WAV. With additional programs, Opus, +modules and M4A (AAC) can be played. +.I Zuke +also supports network streams, such as IceCast. +Option +.B -s +enables "shuffle" mode on start. +.PP +The columns (and their order) displayed can be changed by passing the +following letters along +.B -c +option: +.RS +.TP +.B A +Artist +.TP +.B a +Album +.TP +.B b +File basename +.TP +.B t +Title +.TP +.B D +Duration +.TP +.B d +Date +.TP +.B T +Track number +.TP +.B p +Full file path +.RE +.PP +By default, +artist, album, title and duration are displayed, which corresponds to +.B "-c AatD." +.PP +.I Zuke +can be controlled with a mouse, keyboard and plumber. Button 1 +selects a track, button 2 plays a track. Clicking on the seek bar +changes the playback position accordingly. On the right of the seek +bar, current position, track duration and volume are displayed. "∫" +is shown if shuffle mode is enabled. +.PP +.I Zuke +provides a number of keyboard controls: +.RS +.TP +.B - +Lower the volume. +.TP +.B + = +Increase the volume. +.TP +.B ← → +Seek 10 seconds back/forward. +.TP +.B , . +Seek 60 seconds back/forward. +.TP +.B ↑ ↓ Pgup Pgdown Home End +Move withing the playlist. +.TP +.B o i +Move to the currently playing track. +.TP +.B Enter +Play the selected track. +.TP +.B > b +Skip to the next track. +.TP +.B < z +Skip to the previous track. +.TP +.B v +Stop +.TP +.B p c Space +Pause/Resume. +.TP +.B s +Toggle "shuffle". +.TP +.B q Del +Quit. +.TP +.B / +Search forward. +.TP +.B ? +Search backwards. +.TP +.B n +Repeat search forward. +.TP +.B N +Repeat search backwards. +.RE +.PP +.I Zuke +can be controlled by emulating key presses via the plumber port +.I audio. +See examples section. +.PP +Files present in the current playlist can be plumbed too, and will be +played immediately. +.SH EXAMPLES +Generate a playlist: +.IP +.EX +audio/mkplist /usr/glenda/music \\ + file.mp3 \\ + http://stream.nauticradio.net:14280/ > music.plist +.EE +.PP +Playing a playlist: +.IP +.EX +audio/zuke < plist +.EE +.PP +Append to a playlist: +.IP +.EX +audio/mkplist /n/moremusic >> music.plist +.EE +.PP +Skip to the next track using plumber: +.IP +.EX +plumb -d audio 'key >' +.EE +.SH SEE ALSO +.IR play (1) +.SH SOURCE +.B /sys/src/cmd/audio/zuke +.br +.B /sys/src/cmd/audio/libtags +.SH HISTORY +.I Zuke +first appeared in 9front (April, 2021). From c92d7e3cedbccdbd8a585bde4b870c8e760c5c9d Mon Sep 17 00:00:00 2001 From: Sigrid Date: Tue, 4 May 2021 15:21:44 +0200 Subject: [PATCH 4/5] zuke(1): engrish (thanks qwx) --- sys/man/1/zuke | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/sys/man/1/zuke b/sys/man/1/zuke index db761bd4b..4a8edf7de 100644 --- a/sys/man/1/zuke +++ b/sys/man/1/zuke @@ -18,9 +18,9 @@ mkplist, zuke \- graphical music player is a graphical music player that reads a playlist from standard input and presents an interface to play music. Playlists are generated by -.I mkplist -, which accepts files, directories, and URLs as its arguments and -writes the resulting playlist to standard output. +.IR mkplist , +which accepts files, directories, and URLs as its arguments, +and writes the resulting playlist to standard output. .PP Formats supported by .I zuke @@ -37,6 +37,7 @@ following letters along .B -c option: .RS +.TF "c" .TP .B A Artist @@ -61,6 +62,7 @@ Track number .TP .B p Full file path +.PD .RE .PP By default, @@ -77,12 +79,13 @@ is shown if shuffle mode is enabled. .I Zuke provides a number of keyboard controls: .RS +.TF "p c Space" .TP .B - -Lower the volume. +Lower volume. .TP .B + = -Increase the volume. +Increase volume. .TP .B ← → Seek 10 seconds back/forward. @@ -91,19 +94,19 @@ Seek 10 seconds back/forward. Seek 60 seconds back/forward. .TP .B ↑ ↓ Pgup Pgdown Home End -Move withing the playlist. +Move within the playlist. .TP .B o i -Move to the currently playing track. +Jump to current track. .TP .B Enter -Play the selected track. +Play selected track. .TP .B > b -Skip to the next track. +Skip to next track. .TP .B < z -Skip to the previous track. +Skip to previous track. .TP .B v Stop @@ -129,6 +132,7 @@ Repeat search forward. .B N Repeat search backwards. .RE +.PD .PP .I Zuke can be controlled by emulating key presses via the plumber port @@ -149,7 +153,7 @@ audio/mkplist /usr/glenda/music \\ Playing a playlist: .IP .EX -audio/zuke < plist +audio/zuke < music.plist .EE .PP Append to a playlist: From 54ef5ea0a55e6ae9f98b4ba2998185b7b5b6fad8 Mon Sep 17 00:00:00 2001 From: Sigrid Date: Tue, 4 May 2021 15:32:35 +0200 Subject: [PATCH 5/5] zuke(1): more fixes (thanks humm) --- sys/man/1/zuke | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sys/man/1/zuke b/sys/man/1/zuke index 4a8edf7de..a236198d4 100644 --- a/sys/man/1/zuke +++ b/sys/man/1/zuke @@ -24,13 +24,13 @@ and writes the resulting playlist to standard output. .PP Formats supported by .I zuke -are: MP3, OGG/Vorbis, FLAC and WAV. With additional programs, Opus, +are: MP3, OGG/Vorbis, FLAC, and WAV. With additional programs, Opus, modules and M4A (AAC) can be played. .I Zuke also supports network streams, such as IceCast. Option .B -s -enables "shuffle" mode on start. +enables ``shuffle'' mode on start. .PP The columns (and their order) displayed can be changed by passing the following letters along @@ -65,15 +65,15 @@ Full file path .PD .RE .PP -By default, -artist, album, title and duration are displayed, which corresponds to +By default, artist, album, title, and duration are displayed, which +corresponds to .B "-c AatD." .PP .I Zuke -can be controlled with a mouse, keyboard and plumber. Button 1 +can be controlled with a mouse, keyboard, and plumber. Button 1 selects a track, button 2 plays a track. Clicking on the seek bar changes the playback position accordingly. On the right of the seek -bar, current position, track duration and volume are displayed. "∫" +bar, current position, track duration and volume are displayed. ``∫'' is shown if shuffle mode is enabled. .PP .I Zuke @@ -115,7 +115,7 @@ Stop Pause/Resume. .TP .B s -Toggle "shuffle". +Toggle ``shuffle''. .TP .B q Del Quit. @@ -136,8 +136,7 @@ Repeat search backwards. .PP .I Zuke can be controlled by emulating key presses via the plumber port -.I audio. -See examples section. +.IR audio . .PP Files present in the current playlist can be plumbed too, and will be played immediately.