gtpa2m4eApplication Programming

Removing TARGET(TPF) Library Functions

When you want to remove a TARGET(TPF) C library function follow these steps:

  1. Replace the CLIBFUN macro call in segment C000 that corresponds to the library function with a CLIBFUN DUMMY call, and reassemble C000.

    This will preserve the sequence of CLIBFUN calls so that index numbers into the quick enter directory are not disturbed and recompilation of the C application programs will not be required. This will also ensure that any application programs that attempt to use the removed library function will cause a system error.

  2. Remove the library function's #pragma map and #pragma linkage cards from the tpflink.h header file.

    Although this simple update is all that is required to block references to the library function at compile time, you can also want to remove the allocator cards from your allocator input deck, the SPPBLD card from SPPGML, and the LOADER CALL card from the appropriate load decks.

  3. Ensure that all application programs that called the library function have been altered and recompiled.

    Caution: If any program has coded an explicit #pragma linkage it will still be able to refer to the library function at compile time even though it has been removed from the tpflink.h header file. Also, if the name of the library function is exactly 4 characters, the compiler will not flag the references to the library function as errors; it will assume the default linkage (TPF Enter/Back) should be used instead of the quick enter linkage. In these special cases, be careful to scan through the source code of your application programs.

  4. Load the new version of C000 along with any altered application programs, to your TPF system.