CRTL Program examples README Copyright 1999 Digital Equipment Corporation. All Rights Reserved. The example programs in this directory consist of the full program examples from the DEC C Run Time Library Reference Manual and, possibly, some additional examples created after its publication. The naming conventions for the sample files are: For examples in the Reference section of the manual the program name is constructed of the routine name followed by _EXAMPLE.C. If there is more than one example, there is a digit included (e.g. routine_1_EXAMPLE.C) to differentiate the first...n-th example. Ex: ASSERT_EXAMPLE.C STRTOK_1_EXAMPLE.C STRTOK_2_EXAMPLE.C A diversion from this is when a special compile mode is needed (say ANSI89) in which case the name would be: WCSTOK_ANSI_EXAMPLE.C For examples from the body of the book, in the book the comment which is the first line of the example specifies its name. Most examples have a defining prefix, such as CHAP_1 for Chapter 1 examples. Also note that these names do not necessarily have _EXAMPLE as a suffix to the name as do all of the examples from the reference section of the manual. If an example has a "CHILD" C program or .COM file, also, the name is constructed as routine_CHILD.C (or .COM). such as: CHAP_5_PIPE.C CHAP_5_PIPE_CHILD.C To compile and link these examples, use the following commands: $ CC/ANSI/PREFIX=ALL access_example.c $ LINK access_example In the case that the program has a .C program as a child, you need to compile and link the child program before running the parent. Some programs (notably those with _ANSI_ in their name) may need the strict ANSI89 compile option. The compile command for routines would be: $ CC/ANSI/STANDARD=ANSI89/PREFIX=ALL wcstok_ansi_example.c Linking and running these particular examples would be the same for all routines. NOTE: Some of the library routines are unavailable on systems before OpenVMS V7.0 (or other version dependencies). If you are not on an appropriate version, there may be examples that do not link or run correctly. Please check the documentation for any possible restrictions of this type. ---- To execute the example: Define the example as a foreign command: $ access_example == "$HERE:access_example.exe" then run it as: $ access_example or if the program needs no parameters: $ RUN access_example will suffice. ======================================================================== NOTE The LOCALE examples (as written) need to have (at least) the following locales defined on the system: fr_FR.ISO8859-1 en_US.ISO8859-1 en_GB.ISO8859-1