Removed the incomplete support for the Lua extensions.

This commit is contained in:
Federico Hernandez 2013-04-02 21:52:13 +02:00
parent c7df1f7acc
commit 7db5377d3b
27 changed files with 17 additions and 928 deletions

View file

@ -39,13 +39,6 @@
#include <cmake.h>
#include <commit.h>
#ifdef HAVE_LIBLUA
extern "C"
{
#include <lua.h>
}
#endif
#include <CmdDiagnostics.h>
extern Context context;
@ -132,27 +125,6 @@ int CmdDiagnostics::execute (std::string& output)
<< " +vp" << sizeof (void*)
<< "\n\n";
out << bold.colorize (STRING_CMD_DIAG_LIBRARIES)
<< "\n";
out << " Lua: "
#ifdef HAVE_LIBLUA
<< LUA_RELEASE
#else
<< "n/a"
#endif
<< "\n";
out << " libuuid: "
#if defined (HAVE_UUID) and defined (HAVE_UUID_UNPARSE_LOWER)
<< "libuuid + uuid_unparse_lower"
#elif defined (HAVE_UUID) and !defined (HAVE_UUID_UNPARSE_LOWER)
<< "libuuid, no uuid_unparse_lower"
#else
<< "n/a"
#endif
<< "\n\n";
out << bold.colorize (STRING_CMD_DIAG_FEATURES)
<< "\n"
@ -183,6 +155,15 @@ int CmdDiagnostics::execute (std::string& output)
<< " +uuid"
#else
<< " -uuid"
#endif
<< "\n";
out << " libuuid: "
#if defined (HAVE_UUID) and defined (HAVE_UUID_UNPARSE_LOWER)
<< "libuuid + uuid_unparse_lower"
#elif defined (HAVE_UUID) and !defined (HAVE_UUID_UNPARSE_LOWER)
<< "libuuid, no uuid_unparse_lower"
#else
<< "n/a"
#endif
<< "\n\n";

View file

@ -351,46 +351,6 @@ int CmdShow::execute (std::string& output)
// TODO Check for referenced but missing string files.
// TODO Check for referenced but missing tips files.
// Check for referenced but missing hook scripts.
#ifdef HAVE_LIBLUA
std::vector <std::string> missing_scripts;
for (i = all.begin (); i != all.end (); ++i)
{
if (i->substr (0, 5) == "hook.")
{
std::string value = context.config.get (*i);
Nibbler n (value);
// <path>:<function> [, ...]
while (!n.depleted ())
{
std::string file;
std::string function;
if (n.getUntil (':', file) &&
n.skip (':') &&
n.getUntil (',', function))
{
Path script (file);
if (!script.exists () || !script.readable ())
missing_scripts.push_back (file);
(void) n.skip (',');
}
}
}
}
if (missing_scripts.size ())
{
out << STRING_CMD_SHOW_HOOKS << "\n";
for (i = missing_scripts.begin (); i != missing_scripts.end (); ++i)
out << " " << *i << "\n";
out << "\n";
}
#endif
// Check for bad values in rc.calendar.details.
std::string calendardetails = context.config.get ("calendar.details");
if (calendardetails != "full" &&

View file

@ -94,10 +94,6 @@ int CmdVersion::execute (std::string& output)
<< STRING_CMD_VERSION_UNKNOWN
#endif
#ifdef HAVE_LIBLUA
<< "-lua"
#endif
#if PACKAGE_LANGUAGE != LANGUAGE_EN_US
<< " "
<< STRING_LOCALIZATION_DESC
@ -105,12 +101,7 @@ int CmdVersion::execute (std::string& output)
<< "\n"
<< STRING_CMD_VERSION_COPY
<< "\n"
#ifdef HAVE_LIBLUA
<< STRING_CMD_VERSION_COPY2
<< "\n"
#endif
<< "\n"
<< "\n\n"
<< disclaimer.render ()
<< "\n"
<< link.render ()