summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* web: Remove the gitweb link.HEADnextmasterAndre Noll9 days
| | | | | It's a hassle to maintain, the link is dead since the server moved from gitweb to cgit, and nobody except the bots care anyway.
* mixer sleep: Turn on audiod at startup.Andre Noll9 days
| | | | | Activating audiod if it happens to run in standby mode is easy to do and obviously correct.
* build: Simplify and speed up autogen.sh.Andre Noll2026-08-30
| | | | Running autom4te with the cache enabled makes it twice as fast.
* Remove unused E_BAD_TABLE_NAME.Andre Noll2026-08-30
| | | | Fixes: f57809b6f950380ceaee9bb2b47915441dd9c7b0
* Kill E_CLIENT_SYNTAX.Andre Noll2026-08-30
| | | | | | Only one reference: client_open() errors out if the argument vector does not include any subcommand. The plain EINVAL seems to be a better fit for this particular case, so..
* exec: Rename para_exec_cmdline_pid() to xexec().Andre Noll2026-08-01
| | | | | This is shorter and conveys enough information. Rename the static para_exec() as well.
* afs.c: Drop useless cast.Andre Noll2026-08-01
| | | | | obj.data is a void * pointer, so no cast is needed. Also, the name pointer can never be NULL here, so assert this.
* fd: Simplify para_mmap() and mmap_full_file().Andre Noll2026-08-01
| | | | | | The latter calls the former, both check for zero length but return different error codes in this case. Avoid the redundant check, return consistent error codes, and fix the type of the map pointer argument.
* Include branch name in version string.Andre Noll2026-08-01
| | | | | | | | | This modifies version-gen.sh to append the output of git describe --all --contains HEAD to the version string we had before. This results in version strings like "0.8.3-2-master" or "0.8.3-2-g239d-t/misc~1".
* No longer suggest to install liblopsub-dev.Andre Noll2026-08-01
| | | | lopsub has been removed from Debian.
* exec: Detect and report exec errors.Andre Noll2026-07-26
| | | | | | | | | | | | | | | In para_exec(), the parent does not detect errors that occur in the child after the call to fork() succeeded. This includes the common error case where the child's call to execvp() fails due to a path lookup error. It is not difficult to implement error detection by introducing an additional "control" pipe whose file descriptors are opened with O_CLOEXEC. If the child's call to execvp() succeeds, the OS closes the descriptor and the function does not return, Otherwise the descriptor remains open and execvp() returns with errno set to indicate the error. In this case the child writes a four byte representation of errno to the control pipe and exits. The parent reads from the other end of the pipe. If the read returns zero, execvp() succeeded. Otherwise, the parent has an error code to work with.
* playlist: Drop condition which is always true.Andre Noll2026-07-26
| | | | | | | | The result pointer can never be NULL here as all callers pass the reference of a variable. "Assert" this by dereferencing the pointer at the start of the function, because (a) this makes future users which pass NULL fail early, and (b) it's best practice to initialize the result even if the function returns negative to indicate failure.
* paraslash 0.8.4v0.8.4Andre Noll2026-07-22
|
* Merge topic branch t/gui into masterAndre Noll2026-07-22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Built-in audioc support and a new theme for para_gui ---------------------------------------------------- This series contains two significant improvements for para_gui: (a) The built-in audioc support and (b) the new figlet theme. The patch that implements (a) splits audioc.c so that code that can be shared with para_gui goes to the new audioc_common.c. The next few preparatory patches on top of that rig up struct gui_theme to give each theme full control over the top window, paving the way for (b). * t/gui: web: Add/replace gui screenshots. gui: Remove the "version" command. gui: Rename curses windows. gui: New theme: figlet. gui: Remove two confusing local variables of init_wins(). gui: Introduce ->print_status_items() of struct gui_theme. gui: Require ncurses. gui: Inline clear_all_items(). gui: Avoid the para_audioc process. gui/audiod: Replace for_each_stat_item() by parse_status_items(). gui: Don't request a minimal delay when an external command is running.
| * web: Add/replace gui screenshots.Andre Noll2026-07-14
| | | | | | | | | | | | The screenshot that shows the colorful blackness theme of para_gui was last updated 13 years ago. Replace it with a recent screenshot that has the progress bar and add a second screenshot that shows para_gui's new figlet theme.
| * gui: Remove the "version" command.Andre Noll2026-07-14
| | | | | | | | | | The version string is shown in the version bar, so this internal command is kind of moot.
| * gui: Rename curses windows.Andre Noll2026-07-14
| | | | | | | | | | Rename in to sbar and sb to vbar, as this is still short but conveys the meaning of both one-line windows better.
| * gui: New theme: figlet.Andre Noll2026-07-14
| | | | | | | | | | This adds another theme for para_gui which displays the artist and title of the current file using large ascii art characters produced by the figlet(1) utility.
| * gui: Remove two confusing local variables of init_wins().Andre Noll2026-07-14
| | | | | | | | | | | | The variables sep_y and sep_lines should have been renamed to pbar_y and pbar_lines when the progress bar was implemented, but we may as well simply remove them because sep_y always equals top_lines, and sep_lines is always one.
| * gui: Introduce ->print_status_items() of struct gui_theme.Andre Noll2026-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces the array of struct stat_item_data by a function pointer. The array approach is still used by the colorful blackness theme, which now defines its own array in gui_theme.c. This allows the definition of struct stat_item_data to be private to gui_theme.c. The "simple" theme now tries to display a suitable string to describe the current audio file rather than always showing the basename. Drop the server and audiod status items it used to show. It's called "simple", after all. Both themes need to align the strings they print, so align_str() has to become public.
| * gui: Require ncurses.Andre Noll2026-07-14
| | | | | | | | | | | | | | | | | | | | | | The FreeBSD and NetBSD installations on which this software is tested both provide the ncurses headers and libraries these days. This is enough reason to justify the change because the non-ncurses build no longer gets any testing and may well be broken already. This change allows us to make use of extensions that are not part of the standard. For starters, drop an ncurses specific #define, and prefer getmaxy() over the silly get_num_lines() dance we do right now.
| * gui: Inline clear_all_items().Andre Noll2026-07-14
| | | | | | | | Only one caller.
| * gui: Avoid the para_audioc process.Andre Noll2026-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes gui.c to no longer spawn a para_audioc process to get the status items from para_audiod. Instead, the para_gui process connects directly to audiod using the same mechanism as para_audioc. Besides being more efficient, this approach has the advantage that status item updates are now atomic in the sense that complete sideband packages (containing any number of status items) are received, so torn status items can no longer occur. To implement this, move the code that can be shared between gui and audioc to a separate file, audioc_common.c. This file contains only one public function: connect_audiod(). Since this function uses unix socket magic and employs the sideband API, para_gui needs to link in net.o and sideband.o, in addition to the new audioc_common.o. With these changes in place, para_gui's --stat-command option becomes unused. Drop it, as it's not worth the pain to introduce a depreciation period. On the other hand, para_gui now needs an option to specify the path to the socket on which para_audiod is expected to listen, so move the lopsub stanza of para_audioc's --socket option to the new socket.m4 file and include it from both the audioc and the gui lopsub suites.
| * gui/audiod: Replace for_each_stat_item() by parse_status_items().Andre Noll2026-07-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The old function received a callback, and called it once per item received. This inevitably leads to situations where one status item is already uptodate but others are not. The replacement function no longer takes a callback pointer but a pointer to the array of status items to update, and returns the mask of items that have changed. Parse errors are now regarded as implementation bugs. We still detect them and log an error, but the function can no longer fail. Remove print_all_items() from gui.c since this can now be done in one line by passing ~0 to print_stat_items().
| * gui: Don't request a minimal delay when an external command is running.Andre Noll2026-07-14
| | | | | | | | | | This may lead to a busy loop when the external command is started at an unfortunate moment.
* | Simplify para_sigaction().Andre Noll2026-07-20
| | | | | | | | | | | | | | Remove the cargo cult code that was taken many moons ago from APUE. The SIGALRM bit is safe because no paraslash executable catches SIGALARM anyway, and SA_RESTART is defined on Linux and {Free,Net}BSD, so sa_flags gets set on all supported systems.
* | Merge topic branch t/depr-file_writer into masterAndre Noll2026-07-17
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Depreciation of the file writer ------------------------------- This deprecates an ancient feature which was never really useful. * t/depr-file_writer: Deprecate the file writer.
| * | Deprecate the file writer.Andre Noll2026-07-03
| | | | | | | | | | | | | | | | | | The file writer was an early experiment, introduced in 2006 mainly as as POC, and to have at least two writers. It was never really useful for anything, so schedule its removal to some point after 0.9.0.
* | | exec: Improve documentation of para_exec_cmdline_pid().Andre Noll2026-07-15
| | | | | | | | | | | | | | | Drop some implementation details and describe the semantics of the pid pointer in the error case.
* | | Merge topic branch t/test-lib into masterAndre Noll2026-07-15
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improved test suite ------------------- The test suite has become a little dusty, so here are a few cleanups, one of which re-enables unrestricted parallel builds. * t/test-lib: test: Change suffix of test scripts to .bash. test: Rename makefile.test. test: Use bash case modification. test: Simplify color output. test: Replace echo by printf. test: Remove unused --immediate and --long. test: Trivial coding style cleanups.
| * | | test: Change suffix of test scripts to .bash.Andre Noll2026-07-03
| | | | | | | | | | | | | | | | All of these are bash scripts, after all.
| * | | test: Rename makefile.test.Andre Noll2026-07-03
| | | | | | | | | | | | | | | | | | | | The lopsub and the bison makefiles which are included from Makefile.real are simply called "makefile", so let's be consistent.
| * | | test: Use bash case modification.Andre Noll2026-07-03
| | | | | | | | | | | | | | | | This saves a tr(1) invocation per executable.
| * | | test: Simplify color output.Andre Noll2026-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use ANSI escape sequences instead of running tput(1) many times. We now set and reset the color in one step, so colors are no longer messed up when running tests in parallel. This allows us to remove the .NOTPARALLEL: target in makefile.test.
| * | | test: Replace echo by printf.Andre Noll2026-07-03
| | | | | | | | | | | | | | | | | | | | In view of the "irreconcilable differences in the various versions of echo" (see the POSIX(1) man page of printf), printf should be preferred over echo.
| * | | test: Remove unused --immediate and --long.Andre Noll2026-07-03
| | | |
| * | | test: Trivial coding style cleanups.Andre Noll2026-07-03
| | | | | | | | | | | | | | | | | | | | Remove superfluous quotes, replace double quotes by single quotes where possible, and prevent double expansion in arithmetic evaluation.
* | | | exec: Check return value of dup2().Andre Noll2026-07-14
| |_|/ |/| | | | | | | | | | | Currently para_exec() ignores all errors from dup2(). Introduce xdup2() to teach para_exec() to abort on fatal errors and to retry on EINTR.
* | | exec: Invalidate pid if no process was created.Andre Noll2026-07-14
| | | | | | | | | | | | | | | | | | If para_exec() fails, it may return with or without writing through the pid pointer. It's safer to initialize the pid at the beginning of the function so that pid == 0 iff no process was created.
* | | Merge topic branch t/audiod into masterAndre Noll2026-07-14
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minor audiod cleanups --------------------- A bunch of smallish cleanups and two user-visible improvements. * t/audiod: audiod: Dedoxify audiod_command.c. audiod: Write help error message to error sideband. audiod: Simplify get_time_string(). audiod: Remove stale comment of audiod_cleanup(). audiod: Update time string when jumping while paused. audiod: Simplify command_post_monitor(). audiod: Combine definition and instantiation of struct status_task. audiod: Drop some useless comments. audiod: Remove pointless zeroing. audiod: Drop ->current_audio_format_num of struct status_task.
| * | | audiod: Dedoxify audiod_command.c.Andre Noll2026-06-29
| | | | | | | | | | | | | | | | | | | | | | | | The documentation included too much detail, which is not helpful for the doxygen web page because it only hides the interesting part of the file (the five public functions).
| * | | audiod: Write help error message to error sideband.Andre Noll2026-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this, the error message returned by lsu_com_help() is written to the SBD_OUTPUT band. As a result, para_audioc help does_not_exist 2>/dev/null prints the message to stdout.
| * | | audiod: Simplify get_time_string().Andre Noll2026-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If para_audiod was started in the middle of the stream, we used to first compute the writer uptime wtime from the writer start time wstime wtime := now - wstime, then adjust wtime as follows: delay := wstime - server_stream_start wtime += delay. It's simpler to do wtime := now - server_stream_start as this is less confusing and saves an operation. Kill the pointless msg char pointer while at it.
| * | | audiod: Remove stale comment of audiod_cleanup().Andre Noll2026-06-29
| | | | | | | | | | | | | | | | | | | | This function does not remove the audiod socket. It is static, short and simple, so it does not need to be documented at all.
| * | | audiod: Update time string when jumping while paused.Andre Noll2026-06-29
| | | | | | | | | | | | | | | | Without this, the stream position is only updated when the stream is resumed.
| * | | audiod: Simplify command_post_monitor().Andre Noll2026-06-29
| | | | | | | | | | | | | | | | | | | | Remove the forced dumps. New clients get a full dump anyway, so this code is not necessary.
| * | | audiod: Combine definition and instantiation of struct status_task.Andre Noll2026-06-29
| | | | | | | | | | | | | | | | This saves a few lines and makes the code more readable.
| * | | audiod: Drop some useless comments.Andre Noll2026-06-29
| | | |
| * | | audiod: Remove pointless zeroing.Andre Noll2026-06-28
| | | | | | | | | | | | | | | | | | | | The stat_task pointer points to global static memory, which is guaranteed to contain only zeroes at startup.
| * | | audiod: Drop ->current_audio_format_num of struct status_task.Andre Noll2026-06-28
| | | | | | | | | | | | | | | | | | | | | | | | Caching this value creates more problems than it solves, and it results in quite some complexity regarding the invalidation of the cached number. Just compute the audio format number where it is needed and be done with it.