Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros
deprecated.h File Reference

Redirect calls to deprecated functions. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "macros.h"

Go to the source code of this file.

Macros

#define DEPRECATED(s, t)
 

Detailed Description

Redirect calls to deprecated functions.

Version
v1.5
Date
24.10.14
Author
Dr. Andrew C. R. Martin
Institute of Structural & Molecular Biology, University College London, Gower Street, London. WC1E 6BT.
andre.nosp@m.w@bi.nosp@m.oinf..nosp@m.org..nosp@m.uk andre.nosp@m.w.ma.nosp@m.rtin@.nosp@m.ucl..nosp@m.ac.uk

This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.

The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.

The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.

Description:

Allows code utilising BiopLib to compile without modification to use function names with the 'bl' prefix.(The 'bl' prefix was introduced in July 2014.)

Contains prototypes for all deprecated functions.

Contains the DEPRECATED() macro which prints a warning message when a call is made to a deprecated function.

Allows use of deprecated functions that took a single character for the PDB chain identifier or insert value.

Used by the following header files:

Documentation
Doxygen is not set to document deprecated functions. To document deprecated functions, add "deprecated" to the ENABLED SECTIONS tag in the Doxygen config file: bioplib/doc/doxygen/Doxyfile

Usage:

The deprecated.h header file is included at the end of a header file with deprecated functions. This is to ensure that data structures are defined before the prototypes that use them are declared in deprecated.h. For example, the PDB data structure must be defined before declaring the prototypes for the functions returning a PDB linked list.

Prototypes for the deprecated functions for each header file are enclosed within compiler directives to ensure that functions are not declared using undefined data structures.

Revision History:

Definition in file deprecated.h.

Macro Definition Documentation

#define DEPRECATED (   s,
 
)
Value:
{ \
if(!getenv("BIOPLIB_DEPRECATED_QUIET")) \
fprintf(stderr, \
"This code uses %s which is now deprecated!\n" \
" Use %s instead\n" \
" Set the BIOPLIB_DEPRECATED_QUIET environment \variable to silence this message\n" , (s), (t)); \
}

The DEPRECATED macro gives a warning message if a function is deprecated and indicates the replacement function.

The default option is to give a warning message unless an environment variable, BIOPLIB_DEPRECATED_QUIET, is set.

Alternatively the compile options: -D BIOPLIB_DEPRECATED_CHECK or -D BIOPLIB_DEPRECATED_QUIET will set the DEPRECATED macro to ignore the BIOPLIB_DEPRECATED_QUIET environment variable.

-D BIOPLIB_DEPRECATED_CHECK will display the warning message. -D BIOPLIB_DEPRECATED_QUIET will always silence the warning message.

  • 29.04.14 Original By: CTP

Definition at line 167 of file deprecated.h.