Freeciv-3.2
Loading...
Searching...
No Matches
api_fcdb_base.c
Go to the documentation of this file.
1/*****************************************************************************
2 Freeciv - Copyright (C) 2005 - The Freeciv Project
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12*****************************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18/* utility */
19#include "deprecations.h"
20
21/* common/scriptcore */
22#include "luascript.h"
23
24/* server/scripting */
25#include "script_fcdb.h"
26
27#include "api_fcdb_base.h"
28
29#define OPTION_DEPR_PREFIX "#deprecated."
30
31/**********************************************************************/
34const char *api_fcdb_option(lua_State *L, const char *type)
35{
37 LUASCRIPT_CHECK_ARG_NIL(L, type, 2, string, NULL);
38
42 log_deprecation("Option name for fdb.option(\"%s\") given "
43 "in a way deprecated since 2.5. "
44 "Use literal string instead.", type);
45 }
46
47 return fcdb_option_get(type);
48}
const char * api_fcdb_option(lua_State *L, const char *type)
#define OPTION_DEPR_PREFIX
char * incite_cost
Definition comments.c:75
#define log_deprecation(message,...)
const char * fcdb_option_get(const char *type)
Definition fcdb.c:226
GType type
Definition repodlgs.c:1313
#define LUASCRIPT_CHECK_STATE(L,...)
Definition luascript.h:117
#define LUASCRIPT_CHECK_ARG_NIL(L, value, narg, type,...)
Definition luascript.h:138
int fc_strncasecmp(const char *str0, const char *str1, size_t n)
Definition support.c:238