Freeciv-3.2
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,...)
 
void deprecation_pending (const char *format,...)
 

Variables

static deprecation_warn_callback depr_cb = NULL
 
static bool depr_warns_enabled = FALSE
 
static char depr_pending [1024] = ""
 

Function Documentation

◆ are_deprecation_warnings_enabled()

bool are_deprecation_warnings_enabled ( void  )

Return whether deprecation warnings are currently enabled.

Definition at line 50 of file deprecations.c.

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

◆ deprecation_pending()

void deprecation_pending ( const char format,
  ... 
)

Even if deprecations are not enabled yet, add the message to the pending queue (currently can contain just one message). Message will be logged if deprecations later get enabled.

Definition at line 85 of file deprecations.c.

Referenced by log_parse_level_str().

◆ 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 58 of file deprecations.c.

Referenced by con_log_init().

◆ deprecation_warnings_enable()

void deprecation_warnings_enable ( void  )

Enable deprecation warnings.

Definition at line 37 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 66 of file deprecations.c.

Referenced by deprecation_pending(), and deprecation_warnings_enable().

Variable Documentation

◆ depr_cb

deprecation_warn_callback depr_cb = NULL
static

Definition at line 28 of file deprecations.c.

Referenced by deprecation_warn_cb_set(), and do_log_deprecation().

◆ depr_pending

char depr_pending[1024] = ""
static

Definition at line 32 of file deprecations.c.

Referenced by deprecation_pending(), and deprecation_warnings_enable().

◆ depr_warns_enabled

bool depr_warns_enabled = FALSE
static