Skip to content

Commit

Permalink
add lua lib (5.2.3) for linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
name5566 committed May 22, 2014
1 parent 1d58dcc commit 28760be
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/MerryControllerLinux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ long MerryController::GetDesktopForWindow(Window window) const
Atom request = XInternAtom(m_display, "_NET_WM_DESKTOP", False);
Atom type;
int size;
long nitems;
long nitems = 0;
unsigned char* data = this->GetWindowPropertyByAtom(window, request, &nitems, &type, &size);

long desktop = -1;
Expand Down Expand Up @@ -113,7 +113,7 @@ void* MerryController::GetForegroundWindow() const
Window root = XDefaultRootWindow(m_display);
Atom type;
int size;
long nitems;
long nitems = 0;
unsigned char* data = this->GetWindowPropertyByAtom(root, request, &nitems, &type, &size);

Window foregroundWindow = 0;
Expand Down
4 changes: 0 additions & 4 deletions src/MerryHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
void MerryParseCommandStr(const wxString& commandStr, wxString& commandName, wxString& commandArg)
{
bool inQM = false;
bool inText = false;
bool inSpace = false;

// http://alter.org.ua/docs/win/args/
Expand All @@ -26,7 +25,6 @@ void MerryParseCommandStr(const wxString& commandStr, wxString& commandName, wxS
{
case '\"':
inQM = true;
inText = true;
if (inSpace)
goto getParam;
inSpace = false;
Expand All @@ -35,11 +33,9 @@ void MerryParseCommandStr(const wxString& commandStr, wxString& commandName, wxS
case '\t':
case '\n':
case '\r':
inText = false;
inSpace = true;
break;
default:
inText = true;
if (inSpace)
goto getParam;
commandName += c;
Expand Down
1 change: 1 addition & 0 deletions src/MerryListBoxPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ MerryListBoxPanel::MerryListBoxPanel(wxWindow* parent):
if (!wxImage::FindHandler(wxBITMAP_TYPE_PNG))
wxImage::AddHandler(new wxPNGHandler);
bool isOk = m_selectionItemBackground.LoadFile(MERRY_DEFAULT_LIST_BOX_ITEM_SELECTION_BACKGROUND_FILE, wxBITMAP_TYPE_PNG);
(void)isOk;
assert(isOk);

for (int i=0; i<MERRY_DEFAULT_LIST_BOX_ITEM_MAX_NUM; ++i)
Expand Down
Binary file added third_party/lua/linux64/debug/liblua.a
Binary file not shown.
2 changes: 1 addition & 1 deletion third_party/lua/linux64/include/lauxlib.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
** $Id: lauxlib.h,v 1.120 2011/11/29 15:55:08 roberto Exp $
** $Id: lauxlib.h,v 1.120.1.1 2013/04/12 18:48:47 roberto Exp $
** Auxiliary functions for building Lua libraries
** See Copyright Notice in lua.h
*/
Expand Down
13 changes: 9 additions & 4 deletions third_party/lua/linux64/include/lua.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
** $Id: lua.h,v 1.283 2012/04/20 13:18:26 roberto Exp $
** $Id: lua.h,v 1.285.1.2 2013/11/11 12:09:16 roberto Exp $
** Lua - A Scripting Language
** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
** See Copyright Notice at the end of this file
Expand All @@ -19,11 +19,11 @@
#define LUA_VERSION_MAJOR "5"
#define LUA_VERSION_MINOR "2"
#define LUA_VERSION_NUM 502
#define LUA_VERSION_RELEASE "1"
#define LUA_VERSION_RELEASE "3"

#define LUA_VERSION "Lua " LUA_VERSION_MAJOR "." LUA_VERSION_MINOR
#define LUA_RELEASE LUA_VERSION "." LUA_VERSION_RELEASE
#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2012 Lua.org, PUC-Rio"
#define LUA_COPYRIGHT LUA_RELEASE " Copyright (C) 1994-2013 Lua.org, PUC-Rio"
#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo, W. Celes"


Expand Down Expand Up @@ -119,6 +119,11 @@ typedef LUA_UNSIGNED lua_Unsigned;
#endif


/*
** RCS ident string
*/
extern const char lua_ident[];


/*
** state manipulation
Expand Down Expand Up @@ -413,7 +418,7 @@ struct lua_Debug {


/******************************************************************************
* Copyright (C) 1994-2012 Lua.org, PUC-Rio.
* Copyright (C) 1994-2013 Lua.org, PUC-Rio.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
Expand Down
25 changes: 15 additions & 10 deletions third_party/lua/linux64/include/luaconf.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
** $Id: luaconf.h,v 1.172 2012/05/11 14:14:42 roberto Exp $
** $Id: luaconf.h,v 1.176.1.1 2013/04/12 18:48:47 roberto Exp $
** Configuration file for Lua
** See Copyright Notice in lua.h
*/
Expand Down Expand Up @@ -44,7 +44,7 @@
#define LUA_USE_POSIX
#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
#define LUA_USE_READLINE /* needs some extra libraries */
#define LUA_USE_STRTODHEX /* assume 'strtod' handles hexa formats */
#define LUA_USE_STRTODHEX /* assume 'strtod' handles hex formats */
#define LUA_USE_AFORMAT /* assume 'printf' handles 'aA' specifiers */
#define LUA_USE_LONGLONG /* assume support for long long */
#endif
Expand All @@ -53,7 +53,7 @@
#define LUA_USE_POSIX
#define LUA_USE_DLOPEN /* does not need -ldl */
#define LUA_USE_READLINE /* needs an extra library: -lreadline */
#define LUA_USE_STRTODHEX /* assume 'strtod' handles hexa formats */
#define LUA_USE_STRTODHEX /* assume 'strtod' handles hex formats */
#define LUA_USE_AFORMAT /* assume 'printf' handles 'aA' specifiers */
#define LUA_USE_LONGLONG /* assume support for long long */
#endif
Expand Down Expand Up @@ -405,10 +405,16 @@
#define LUAI_MAXNUMBER2STR 32 /* 16 digits, sign, point, and \0 */


/*
@@ l_mathop allows the addition of an 'l' or 'f' to all math operations
*/
#define l_mathop(x) (x)


/*
@@ lua_str2number converts a decimal numeric string to a number.
@@ lua_strx2number converts an hexadecimal numeric string to a number.
** In C99, 'strtod' do both conversions. C89, however, has no function
** In C99, 'strtod' does both conversions. C89, however, has no function
** to convert floating hexadecimal strings to numbers. For these
** systems, you can leave 'lua_strx2number' undefined and Lua will
** provide its own implementation.
Expand All @@ -427,8 +433,8 @@
/* the following operations need the math library */
#if defined(lobject_c) || defined(lvm_c)
#include <math.h>
#define luai_nummod(L,a,b) ((a) - floor((a)/(b))*(b))
#define luai_numpow(L,a,b) (pow(a,b))
#define luai_nummod(L,a,b) ((a) - l_mathop(floor)((a)/(b))*(b))
#define luai_numpow(L,a,b) (l_mathop(pow)(a,b))
#endif

/* these are quite standard operations */
Expand Down Expand Up @@ -465,13 +471,12 @@
** Some tricks with doubles
*/

#if defined(LUA_CORE) && \
defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) /* { */
#if defined(LUA_NUMBER_DOUBLE) && !defined(LUA_ANSI) /* { */
/*
** The next definitions activate some tricks to speed up the
** conversion from doubles to integer types, mainly to LUA_UNSIGNED.
**
@@ MS_ASMTRICK uses Microsoft assembler to avoid clashes with a
@@ LUA_MSASMTRICK uses Microsoft assembler to avoid clashes with a
** DirectX idiosyncrasy.
**
@@ LUA_IEEE754TRICK uses a trick that should work on any machine
Expand All @@ -495,7 +500,7 @@
/* Microsoft compiler on a Pentium (32 bit) ? */
#if defined(LUA_WIN) && defined(_MSC_VER) && defined(_M_IX86) /* { */

#define MS_ASMTRICK
#define LUA_MSASMTRICK
#define LUA_IEEEENDIAN 0
#define LUA_NANTRICK

Expand Down
2 changes: 1 addition & 1 deletion third_party/lua/linux64/include/lualib.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
** $Id: lualib.h,v 1.43 2011/12/08 12:11:37 roberto Exp $
** $Id: lualib.h,v 1.43.1.1 2013/04/12 18:48:47 roberto Exp $
** Lua standard libraries
** See Copyright Notice in lua.h
*/
Expand Down
Binary file added third_party/lua/linux64/release/liblua.a
Binary file not shown.

0 comments on commit 28760be

Please sign in to comment.