Freeciv-3.2: /fast/freeciv/nightly/S3_2/utility/deprecations.h File Reference

Freeciv-3.2

Loading...
Searching...
No Matches
Macros | Typedefs | Functions
deprecations.h File Reference
`#include "log.h"`

Go to the source code of this file.

## Macros

#define | LOG_DEPRECATION LOG_WARN
#define | log_deprecation(message, ...)
#define | log_deprecation_alt(altlvl, message, ...)
#define | log_deprecation_always(message, ...) do_log_deprecation(message, ## __VA_ARGS__);

## Typedefs

typedef void(* | deprecation_warn_callback) (const char *msg)

## Functions

void | deprecation_warn_cb_set (deprecation_warn_callback new_cb)
void | deprecation_warnings_enable (void)
bool | are_deprecation_warnings_enabled (void)
void | do_log_deprecation (const char *format,...) fc__attribute((__format__(__printf__

## Macro Definition Documentation

## ◆ LOG_DEPRECATION

#define LOG_DEPRECATION LOG_WARN

Definition at line 26 of file deprecations.h.

## ◆ log_deprecation

#define log_deprecation | ( |  | message,
|  |  | ...
| ) |  |

Value:
do { \
if (are_deprecation_warnings_enabled()) { \
do_log_deprecation(message, ## __VA_ARGS__); \
} \
} while (FALSE);
incite_cost
char * incite_cost
Definition comments.c:74
are_deprecation_warnings_enabled
bool are_deprecation_warnings_enabled(void)
Definition deprecations.c:43
message
Definition messagewin_common.h:29
FALSE
#define FALSE
Definition support.h:47

Definition at line 35 of file deprecations.h.

## ◆ log_deprecation_alt

#define log_deprecation_alt | ( |  | altlvl,
|  |  | message,
|  |  | ...
| ) |  |

Value:
do { \
if (are_deprecation_warnings_enabled()) { \
do_log_deprecation(message, ## __VA_ARGS__); \
} else { \
log_base(altlvl, message, ## __VA_ARGS__); \
} \
} while (FALSE);

Definition at line 42 of file deprecations.h.

## ◆ log_deprecation_always

#define log_deprecation_always | ( |  | message,
|  |  | ...
| ) |  | do_log_deprecation(message, ## __VA_ARGS__);

Definition at line 51 of file deprecations.h.

## Typedef Documentation

## ◆ deprecation_warn_callback

typedef void(* deprecation_warn_callback) (const char *msg)

Definition at line 24 of file deprecations.h.

## Function Documentation

## ◆ are_deprecation_warnings_enabled()

bool are_deprecation_warnings_enabled | ( | void |  | ) |

Return whether deprecation warnings are currently enabled.

Definition at line 43 of file deprecations.c.

Referenced by api_utilities_deprecation_warning(), client_start_server(), and secfile_check_unused().

## ◆ deprecation_warn_cb_set()

void deprecation_warn_cb_set | ( | deprecation_warn_callback | new_cb | ) |

Set callback to call when deprecation warnings are issued

Definition at line 51 of file deprecations.c.

Referenced by con_log_init().

## ◆ deprecation_warnings_enable()

void deprecation_warnings_enable | ( | void |  | ) |

Enable deprecation warnings.

Definition at line 35 of file deprecations.c.

Referenced by client_main(), and main().

## ◆ do_log_deprecation()

void do_log_deprecation | ( | const char * | format,
|  |  | ...
| ) |  |