Commits


bring in newer ev and bufio from telescope merge our local changes to bufio though.


convert to imsg_get_type()


use imsg_get_data() instead of accessing imsg.data


rename ibuf arguments to imsgbuf ibuf is just too confusing since there is also the 'struct ibuf'.


remove unused control_imsg_relay


(cont) work around lack of SOCK_{CLOEXEC,NONBLOCK} funny how they're trying to deprecate daemon() in favour of the mess of posix_spawn and still don't provide genuinely useful stuff like SOCK_CLOEXEC, NONBLOCK and pipe2(2).


work around missing SOCK_{CLOEXEC,NONBLOCK} on some dumb OSes


don't reply with a STATUS on MODE change This is to help amused-web. Change the ctl to send an extra STATUS after a MODE change to preserve the behaviour.


fix control_accept handling of ENFILE/EMFILE Not sure how it worked with libevent before, but the reschedule is wrong. We need to schedule a timer to re-add the event on the listening fd.


switch from libevent to a smaller, thin wrapper around poll() libevent is a very cool library, I like its APIs and enjoy using it. However, for amused it is maybe a bit too much since it doesn't deal with too many file descriptors. Amused only needs to monitor one fd for the player process and the currently connected clients. Given that it runs per-user locally, having more than a dozen of fds open is very, very rare.


adjust copyright years


fix my email address used @openbsd.org initially by mistake and got copied around in most files. Since this has nothing to do officially with the OpenBSD project, use my own email address.


enrich `amused monitor' reported events The monitor mode now has access to some additional information other than just the name of the event. The `mode' and `seek' events now report the mode status and the position/duration respectively, allowing consumers of `amused monitor' to show correct and coherent information. It helps in particular applications like `amused-monitor' (in contrib/) that show a progress bar for the current song. Before, they had to run their own timers and periodically synchronize using `amused status', now they can just update the state in the same `amused-monitor' event loop.


print the current modes after 'amused consume/repeat'


define constants for mode special values and add a toggle value