midicomp
midicomp copied to clipboard
Fix incorrect and nonstandard use of error()
The error() function is defined nowhere in this codebase. When linking against glibc, the declaration will match the nonstandard error(3) function, but midicomp only ever passes a single const char* to this function, which doesn't match its 3+-parameter signature. Consequently, this code fails to link with any other libc, and doesn't correctly show the respective errors even with glibc.
Using prs_error() fixes these issues, allows this code to be compiled with MinGW, and retains the line number in the now correct error output.