Freeciv-3.3
Loading...
Searching...
No Matches
Functions | Variables
deprecations.c File Reference
#include "fc_prehdrs.h"
#include <stdarg.h>
#include "log.h"
#include "shared.h"
#include "deprecations.h"

Go to the source code of this file.

Functions

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

Variables

static deprecation_warn_callback depr_cb = nullptr
 
static bool depr_warns_enabled = FALSE
 

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,
  ... 
)

Log the deprecation warning

Definition at line 59 of file deprecations.c.

Variable Documentation

◆ depr_cb

Definition at line 28 of file deprecations.c.

Referenced by deprecation_warn_cb_set(), and do_log_deprecation().

◆ depr_warns_enabled

bool depr_warns_enabled = FALSE
static

Definition at line 30 of file deprecations.c.

Referenced by are_deprecation_warnings_enabled(), and deprecation_warnings_enable().