Common programs like gcc, rm, cp etc. seem to follow a pattern in reporting their errors like this:
program: error
For instance:
$ gcc
gcc: no input files
Is there some standard function or macro I should call from within my own C programs to report errors in a standard fashion?
There are no macros (that I know of). But, here’s the relevant standard for formatting error output.