From: Andrew Bartlett Date: Tue, 21 May 2019 02:59:00 +0000 (+1200) Subject: lib: Remove "tdb based replacement for gettext" X-Git-Tag: ldb-2.0.5~689 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=93db0aac0d3c4c44bcb5b52618705d63b94534cd;p=thirdparty%2Fsamba.git lib: Remove "tdb based replacement for gettext" This is unused since SWAT was removed in Samba 4.1 Signed-off-by: Andrew Bartlett Reviewed-by: Gary Lockyer --- diff --git a/source3/intl/lang_tdb.c b/source3/intl/lang_tdb.c deleted file mode 100644 index 2e050fd96de..00000000000 --- a/source3/intl/lang_tdb.c +++ /dev/null @@ -1,263 +0,0 @@ -/* - Unix SMB/CIFS implementation. - tdb based replacement for gettext - Copyright (C) Andrew Tridgell 2001 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -*/ - -#include "includes.h" -#include "system/filesys.h" -#include "intl/lang_tdb.h" -#include "util_tdb.h" -#include "lib/util/util_paths.h" - -static TDB_CONTEXT *tdb; - -/* the currently selected language */ -static char *current_lang; - - -/* load a msg file into the tdb */ -static bool load_msg(const char *msg_file) -{ - char **lines; - int num_lines, i; - char *msgid, *msgstr; - TDB_DATA data; - - lines = file_lines_load(msg_file, &num_lines, 0, NULL); - - if (!lines) { - return False; - } - - if (tdb_lockall(tdb) != 0) { - TALLOC_FREE(lines); - return False; - } - - /* wipe the db */ - tdb_wipe_all(tdb); - - msgid = NULL; - - for (i=0;i. -*/ - -#ifndef _INTL_LANG_TDB_H_ -#define _INTL_LANG_TDB_H_ - -/* The following definitions come from intl/lang_tdb.c */ - -bool lang_tdb_init(const char *lang); -const char *lang_msg(const char *msgid); -void lang_msg_free(const char *msgstr); -char *lang_tdb_current(void); - -#endif /* _INTL_LANG_TDB_H_ */ diff --git a/source3/wscript_build b/source3/wscript_build index fd4101a315f..3a19fd3517c 100644 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -397,7 +397,6 @@ bld.SAMBA3_SUBSYSTEM('samba3core', lib/ms_fnmatch.c lib/tallocmsg.c lib/dmallocmsg.c - intl/lang_tdb.c lib/gencache.c lib/util_event.c lib/global_contexts.c