A/UX: Correction to "A/UX Programming Language and Tools" Manual

I've noticed an error in the A/UX Programming Language and Tools,
Vol. 2, chapter 25, page 5, section 13. The sample doesn't work at all,
and there is a bug in the first and third line.

For example, try this source code (test.c):

char *_Version_ =
"(c) Copyright 1986\\
Standard Software Version V.2.1";
main
{
printf ("hello world\\n");
}

compile it with: cc test.c
then get the version number with : version a.out
but no version number is available

Who can explain to me how to correctly use the 'version' utility, that is,
how to create a string variable to be used by version utility?

First of all, the example in the "A/UX Programming Language and Tools. Vol.
2, Chapter 25, Section 13, page 5" is INCORRECT. The same is also true for
volume one of the manual.

The version program attempted to look for a string of the following form:

{Apple version RELEASE.LEVEL YY/MM/DD HH:MM:SS}

where the capitalized words(RELEASE, LEVEL, YY, MM, DD, HH, MM, SS) are
matched by numbers. Both RELEASE and LEVEL numbers can be up to 8 digits
in length, the rest (YY, MM, DD, HH, MM, and SS) must be EXACTLY 2
digits. Both "{" and "}" symbols, and "Apple version" words are also
required to match. Only one SPACE is allowed before words RELEASE, YY,
and HH.

If the defined character string for version does not meet any of the above
matching criteria, the 'version' program will display "no version number
found".

The above character string, for example, should be changed to:

char *_Version_=
"(c) Copyright 1986\\
{Apple version 2.1 86/09/12 18:05:24}";


This has been fixed in the A/UX 3.0 documentation.

Published Date: Feb 18, 2012