What standards exist within GNU as to where the help and version messages should be stored?

28 Views Asked by At

The GNU Coding Standards mentions that a compliant program must be able to process the --help and --version flags, printing the associated messages, then exiting the program, (Section 4.8). They go further into how these messages should be formatted, but the language is rather vague as to where these messages should be stored. Further, it explains that the program name should be stored as a constant string and NOT computed based on argv[0], (Section 4.8.1). However, that seems to be as deep as they dive into the topic, as I couldn't find any references to whether the remainder of these messages are to be read from a file, hard coded into the program as a constant string, or any other way for this to be accomplished in a standardized way.

My question is, does GNU (or POSIX) provide any standardizations for this? Did I miss a paragraph in the book, or is it down to personal taste?

I've skimmed through the GNU Coding Standards book, and lightly touched parts of the POSIX standards, however, I was unable to find any further mentions on the topic.

0

There are 0 best solutions below