Verified Commit 57090391 authored by AtjonTV's avatar AtjonTV
Browse files

Lua 5.0.2

parent 2060c508
......@@ -9,7 +9,7 @@ For details and rationale, see http://www.lua.org/license.html .
===============================================================================
Copyright (C) 2003 Tecgraf, PUC-Rio.
Copyright (C) 2003-2004 Tecgraf, PUC-Rio.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
This diff is collapsed.
MANIFEST contents of Lua 5.0 distribution on Fri Apr 11 11:01:08 BRT 2003
lua-5.0
lua-5.0/COPYRIGHT
lua-5.0/HISTORY
lua-5.0/INSTALL
lua-5.0/MANIFEST
lua-5.0/Makefile
lua-5.0/README
lua-5.0/bin
lua-5.0/build
lua-5.0/config
lua-5.0/configure
lua-5.0/doc
lua-5.0/doc/logo.gif
lua-5.0/doc/lua.1
lua-5.0/doc/lua.html
lua-5.0/doc/luac.1
lua-5.0/doc/luac.html
lua-5.0/doc/manual.html
lua-5.0/doc/readme.html
lua-5.0/etc
lua-5.0/etc/.exrc
lua-5.0/etc/Makefile
lua-5.0/etc/README
lua-5.0/etc/bin2c.c
lua-5.0/etc/compat.lua
lua-5.0/etc/doall.lua
lua-5.0/etc/lua.ico
lua-5.0/etc/lua.magic
lua-5.0/etc/lua.xpm
lua-5.0/etc/luser_number.h
lua-5.0/etc/luser_tests.h
lua-5.0/etc/min.c
lua-5.0/etc/noparser.c
lua-5.0/etc/saconfig.c
lua-5.0/etc/trace.c
lua-5.0/include
lua-5.0/include/Makefile
lua-5.0/include/lauxlib.h
lua-5.0/include/lua.h
lua-5.0/include/lualib.h
lua-5.0/lib
lua-5.0/src
lua-5.0/src/Makefile
lua-5.0/src/README
lua-5.0/src/lapi.c
lua-5.0/src/lapi.h
lua-5.0/src/lcode.c
lua-5.0/src/lcode.h
lua-5.0/src/ldebug.c
lua-5.0/src/ldebug.h
lua-5.0/src/ldo.c
lua-5.0/src/ldo.h
lua-5.0/src/ldump.c
lua-5.0/src/lfunc.c
lua-5.0/src/lfunc.h
lua-5.0/src/lgc.c
lua-5.0/src/lgc.h
lua-5.0/src/lib
lua-5.0/src/lib/Makefile
lua-5.0/src/lib/README
lua-5.0/src/lib/lauxlib.c
lua-5.0/src/lib/lbaselib.c
lua-5.0/src/lib/ldblib.c
lua-5.0/src/lib/liolib.c
lua-5.0/src/lib/lmathlib.c
lua-5.0/src/lib/loadlib.c
lua-5.0/src/lib/lstrlib.c
lua-5.0/src/lib/ltablib.c
lua-5.0/src/llex.c
lua-5.0/src/llex.h
lua-5.0/src/llimits.h
lua-5.0/src/lmem.c
lua-5.0/src/lmem.h
lua-5.0/src/lobject.c
lua-5.0/src/lobject.h
lua-5.0/src/lopcodes.c
lua-5.0/src/lopcodes.h
lua-5.0/src/lparser.c
lua-5.0/src/lparser.h
lua-5.0/src/lstate.c
lua-5.0/src/lstate.h
lua-5.0/src/lstring.c
lua-5.0/src/lstring.h
lua-5.0/src/ltable.c
lua-5.0/src/ltable.h
lua-5.0/src/ltests.c
lua-5.0/src/ltm.c
lua-5.0/src/ltm.h
lua-5.0/src/lua
lua-5.0/src/lua/Makefile
lua-5.0/src/lua/README
lua-5.0/src/lua/lua.c
lua-5.0/src/luac
lua-5.0/src/luac/Makefile
lua-5.0/src/luac/README
lua-5.0/src/luac/luac.c
lua-5.0/src/luac/print.c
lua-5.0/src/lundump.c
lua-5.0/src/lundump.h
lua-5.0/src/lvm.c
lua-5.0/src/lvm.h
lua-5.0/src/lzio.c
lua-5.0/src/lzio.h
lua-5.0/test
lua-5.0/test/README
lua-5.0/test/bisect.lua
lua-5.0/test/cf.lua
lua-5.0/test/compat.lua
lua-5.0/test/echo.lua
lua-5.0/test/env.lua
lua-5.0/test/factorial.lua
lua-5.0/test/fib.lua
lua-5.0/test/fibfor.lua
lua-5.0/test/globals.lua
lua-5.0/test/hello.lua
lua-5.0/test/life.lua
lua-5.0/test/lua
lua-5.0/test/luac
lua-5.0/test/luac.lua
lua-5.0/test/printf.lua
lua-5.0/test/readonly.lua
lua-5.0/test/sieve.lua
lua-5.0/test/sort.lua
lua-5.0/test/table.lua
lua-5.0/test/trace-calls.lua
lua-5.0/test/trace-globals.lua
lua-5.0/test/undefined.lua
lua-5.0/test/xd.lua
MANIFEST contents of Lua 5.0.2 distribution on Wed Mar 17 17:59:01 BRT 2004
lua-5.0.2
lua-5.0.2/COPYRIGHT
lua-5.0.2/DIFFS
lua-5.0.2/HISTORY
lua-5.0.2/INSTALL
lua-5.0.2/MANIFEST
lua-5.0.2/Makefile
lua-5.0.2/README
lua-5.0.2/UPDATE
lua-5.0.2/bin
lua-5.0.2/build
lua-5.0.2/config
lua-5.0.2/configure
lua-5.0.2/doc
lua-5.0.2/doc/contents.html
lua-5.0.2/doc/logo.gif
lua-5.0.2/doc/lua.1
lua-5.0.2/doc/lua.html
lua-5.0.2/doc/luac.1
lua-5.0.2/doc/luac.html
lua-5.0.2/doc/manual.html
lua-5.0.2/doc/readme.html
lua-5.0.2/etc
lua-5.0.2/etc/Makefile
lua-5.0.2/etc/README
lua-5.0.2/etc/bin2c.c
lua-5.0.2/etc/compat.lua
lua-5.0.2/etc/doall.lua
lua-5.0.2/etc/lua.ico
lua-5.0.2/etc/lua.magic
lua-5.0.2/etc/lua.xpm
lua-5.0.2/etc/luser_number.h
lua-5.0.2/etc/luser_tests.h
lua-5.0.2/etc/min.c
lua-5.0.2/etc/noparser.c
lua-5.0.2/etc/saconfig.c
lua-5.0.2/etc/trace.c
lua-5.0.2/include
lua-5.0.2/include/Makefile
lua-5.0.2/include/lauxlib.h
lua-5.0.2/include/lua.h
lua-5.0.2/include/lualib.h
lua-5.0.2/lib
lua-5.0.2/src
lua-5.0.2/src/Makefile
lua-5.0.2/src/README
lua-5.0.2/src/lapi.c
lua-5.0.2/src/lapi.h
lua-5.0.2/src/lcode.c
lua-5.0.2/src/lcode.h
lua-5.0.2/src/ldebug.c
lua-5.0.2/src/ldebug.h
lua-5.0.2/src/ldo.c
lua-5.0.2/src/ldo.h
lua-5.0.2/src/ldump.c
lua-5.0.2/src/lfunc.c
lua-5.0.2/src/lfunc.h
lua-5.0.2/src/lgc.c
lua-5.0.2/src/lgc.h
lua-5.0.2/src/lib
lua-5.0.2/src/lib/Makefile
lua-5.0.2/src/lib/README
lua-5.0.2/src/lib/lauxlib.c
lua-5.0.2/src/lib/lbaselib.c
lua-5.0.2/src/lib/ldblib.c
lua-5.0.2/src/lib/liolib.c
lua-5.0.2/src/lib/lmathlib.c
lua-5.0.2/src/lib/loadlib.c
lua-5.0.2/src/lib/lstrlib.c
lua-5.0.2/src/lib/ltablib.c
lua-5.0.2/src/llex.c
lua-5.0.2/src/llex.h
lua-5.0.2/src/llimits.h
lua-5.0.2/src/lmem.c
lua-5.0.2/src/lmem.h
lua-5.0.2/src/lobject.c
lua-5.0.2/src/lobject.h
lua-5.0.2/src/lopcodes.c
lua-5.0.2/src/lopcodes.h
lua-5.0.2/src/lparser.c
lua-5.0.2/src/lparser.h
lua-5.0.2/src/lstate.c
lua-5.0.2/src/lstate.h
lua-5.0.2/src/lstring.c
lua-5.0.2/src/lstring.h
lua-5.0.2/src/ltable.c
lua-5.0.2/src/ltable.h
lua-5.0.2/src/ltests.c
lua-5.0.2/src/ltm.c
lua-5.0.2/src/ltm.h
lua-5.0.2/src/lua
lua-5.0.2/src/lua/Makefile
lua-5.0.2/src/lua/README
lua-5.0.2/src/lua/lua.c
lua-5.0.2/src/luac
lua-5.0.2/src/luac/Makefile
lua-5.0.2/src/luac/README
lua-5.0.2/src/luac/luac.c
lua-5.0.2/src/luac/print.c
lua-5.0.2/src/lundump.c
lua-5.0.2/src/lundump.h
lua-5.0.2/src/lvm.c
lua-5.0.2/src/lvm.h
lua-5.0.2/src/lzio.c
lua-5.0.2/src/lzio.h
lua-5.0.2/test
lua-5.0.2/test/README
lua-5.0.2/test/bisect.lua
lua-5.0.2/test/cf.lua
lua-5.0.2/test/echo.lua
lua-5.0.2/test/env.lua
lua-5.0.2/test/factorial.lua
lua-5.0.2/test/fib.lua
lua-5.0.2/test/fibfor.lua
lua-5.0.2/test/globals.lua
lua-5.0.2/test/hello.lua
lua-5.0.2/test/life.lua
lua-5.0.2/test/lua
lua-5.0.2/test/luac
lua-5.0.2/test/luac.lua
lua-5.0.2/test/printf.lua
lua-5.0.2/test/readonly.lua
lua-5.0.2/test/sieve.lua
lua-5.0.2/test/sort.lua
lua-5.0.2/test/table.lua
lua-5.0.2/test/trace-calls.lua
lua-5.0.2/test/trace-globals.lua
lua-5.0.2/test/undefined.lua
lua-5.0.2/test/xd.lua
END OF MANIFEST
......@@ -96,4 +96,7 @@ lecho:
@make echo | grep = | sed -e 's/= /= "/' -e 's/$$/"/' #-e 's/""/nil/'
@echo "-- EOF"
newer:
@find . -newer MANIFEST -type f
# (end of Makefile)
This is Lua 5.0.1, an update of Lua 5.0 that includes the following changes,
which fix all known bugs in Lua 5.0.
This is Lua 5.0.2, an update of Lua 5.0 that includes the following changes,
which fix all known bugs in Lua 5.0. For the exact differences, see DIFFS.
src/ldo.c
Attempt to resume running coroutine crashed Lua
......@@ -15,10 +15,9 @@ src/lvm.c
Count hook might be called without being set
src/lib/lbaselib.c
Buffer overflow for unusual %p representation
Wrong number of returns from chunks loaded from stdin
src/lib/liolib.c
`file.close()' could not be called without arguments
Buffer overflow for unusual %p representation
src/luac/luac.c
Missing lock/unlock
To use this update, simply open this tarball over the original Lua 5.0 source.
<HTML>
<HEAD>
<TITLE>Lua: 5.0 reference manual - contents</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<HR>
<H1>
<A HREF="http://www.lua.org/home.html"><IMG SRC="logo.gif" ALT="Lua" BORDER=0></A>
Reference manual for Lua 5.0
</H1>
<A HREF="manual.html">Lua 5.0 Reference Manual</A>
[
<A HREF="manual.html">top</A>
|
<A HREF="http://www.lua.org/ftp/refman-5.0.ps.gz">ps</A>
|
<A HREF="http://www.lua.org/ftp/refman-5.0.pdf">pdf</A>
]
<P>
<SMALL>
<A HREF="http://www.lua.org/copyright.html">Copyright</A>
&copy; 2003 Tecgraf, PUC-Rio. All rights reserved.</SMALL>
<HR>
<UL>
<LI><A HREF="manual.html#1">1 - Introduction</A>
<LI><A HREF="manual.html#2">2 - The Language</A>
<UL>
<LI><A HREF="manual.html#2.1">2.1 - Lexical Conventions</A>
<LI><A HREF="manual.html#2.2">2.2 - Values and Types</A>
<UL>
<LI><A HREF="manual.html#2.2.1">2.2.1 - Coercion</A>
</UL>
<LI><A HREF="manual.html#2.3">2.3 - Variables</A>
<LI><A HREF="manual.html#2.4">2.4 - Statements</A>
<UL>
<LI><A HREF="manual.html#2.4.1">2.4.1 - Chunks</A>
<LI><A HREF="manual.html#2.4.2">2.4.2 - Blocks</A>
<LI><A HREF="manual.html#2.4.3">2.4.3 - Assignment</A>
<LI><A HREF="manual.html#2.4.4">2.4.4 - Control Structures</A>
<LI><A HREF="manual.html#2.4.5">2.4.5 - For Statement</A>
<LI><A HREF="manual.html#2.4.6">2.4.6 - Function Calls as Statements</A>
<LI><A HREF="manual.html#2.4.7">2.4.7 - Local Declarations</A>
</UL>
<LI><A HREF="manual.html#2.5">2.5 - Expressions</A>
<UL>
<LI><A HREF="manual.html#2.5.1">2.5.1 - Arithmetic Operators</A>
<LI><A HREF="manual.html#2.5.2">2.5.2 - Relational Operators</A>
<LI><A HREF="manual.html#2.5.3">2.5.3 - Logical Operators</A>
<LI><A HREF="manual.html#2.5.4">2.5.4 - Concatenation</A>
<LI><A HREF="manual.html#2.5.5">2.5.5 - Precedence</A>
<LI><A HREF="manual.html#2.5.6">2.5.6 - Table Constructors</A>
<LI><A HREF="manual.html#2.5.7">2.5.7 - Function Calls</A>
<LI><A HREF="manual.html#2.5.8">2.5.8 - Function Definitions</A>
</UL>
</UL>
<UL>
<LI><A HREF="manual.html#2.6">2.6 - Visibility Rules</A>
<LI><A HREF="manual.html#2.7">2.7 - Error Handling</A>
<LI><A HREF="manual.html#2.8">2.8 - Metatables</A>
<LI><A HREF="manual.html#2.9">2.9 - Garbage Collection</A>
<UL>
<LI><A HREF="manual.html#2.9.1">2.9.1 - Garbage-Collection Metamethods</A>
<LI><A HREF="manual.html#2.9.2">2.9.2 - Weak Tables</A>
</UL>
<LI><A HREF="manual.html#2.10">2.10 - Coroutines</A>
</UL>
<LI><A HREF="manual.html#3">3 - The Application Program Interface</A>
<UL>
<LI><A HREF="manual.html#3.1">3.1 - States</A>
<LI><A HREF="manual.html#3.2">3.2 - The Stack and Indices</A>
<LI><A HREF="manual.html#3.3">3.3 - Stack Manipulation</A>
<LI><A HREF="manual.html#3.4">3.4 - Querying the Stack</A>
<LI><A HREF="manual.html#3.5">3.5 - Getting Values from the Stack</A>
<LI><A HREF="manual.html#3.6">3.6 - Pushing Values onto the Stack</A>
<LI><A HREF="manual.html#3.7">3.7 - Controlling Garbage Collection</A>
<LI><A HREF="manual.html#3.8">3.8 - Userdata</A>
<LI><A HREF="manual.html#3.9">3.9 - Metatables</A>
<LI><A HREF="manual.html#3.10">3.10 - Loading Lua Chunks</A>
<LI><A HREF="manual.html#3.11">3.11 - Manipulating Tables</A>
<LI><A HREF="manual.html#3.12">3.12 - Manipulating Environments</A>
<LI><A HREF="manual.html#3.13">3.13 - Using Tables as Arrays</A>
<LI><A HREF="manual.html#3.14">3.14 - Calling Functions</A>
<LI><A HREF="manual.html#3.15">3.15 - Protected Calls</A>
<LI><A HREF="manual.html#3.16">3.16 - Defining C Functions</A>
<LI><A HREF="manual.html#3.17">3.17 - Defining C Closures</A>
<LI><A HREF="manual.html#3.18">3.18 - Registry</A>
<LI><A HREF="manual.html#3.19">3.19 - Error Handling in C</A>
<LI><A HREF="manual.html#3.20">3.20 - Threads</A>
</UL>
<LI><A HREF="manual.html#4">4 - The Debug Interface</A>
<UL>
<LI><A HREF="manual.html#4.1">4.1 - Stack and Function Information</A>
<LI><A HREF="manual.html#4.2">4.2 - Manipulating Local Variables and Upvalues</A>
<LI><A HREF="manual.html#4.3">4.3 - Hooks</A>
</UL>
<LI><A HREF="manual.html#5">5 - Standard Libraries</A>
<UL>
<LI><A HREF="manual.html#5.1">5.1 - Basic Functions</A>
<LI><A HREF="manual.html#5.2">5.2 - Coroutine Manipulation</A>
<LI><A HREF="manual.html#5.3">5.3 - String Manipulation</A>
<LI><A HREF="manual.html#5.4">5.4 - Table Manipulation</A>
<LI><A HREF="manual.html#5.5">5.5 - Mathematical Functions</A>
<LI><A HREF="manual.html#5.6">5.6 - Input and Output Facilities</A>
<LI><A HREF="manual.html#5.7">5.7 - Operating System Facilities</A>
<LI><A HREF="manual.html#5.8">5.8 - The Reflexive Debug Interface</A>
</UL>
<LI><A HREF="manual.html#6">6 - Lua Stand-alone</A>
<LI><A HREF="manual.html#BNF">The Complete Syntax of Lua</A>
</UL>
<HR>
<SMALL>
Last update:
Wed May 7 18:34:34 EST 2003
</SMALL>
</BODY>
</HTML>
......@@ -13,7 +13,7 @@ Documentation
<UL>
<LI><A HREF="http://www.lua.org/">Official web site</A>
<LI><A HREF="manual.html">Reference manual</A>
<LI><A HREF="contents.html">Reference manual</A>
<LI><A HREF="lua.html">lua man page</A>
<LI><A HREF="luac.html">luac man page</A>
<LI><A HREF="../README">lua/README</A>
......@@ -28,7 +28,7 @@ Documentation
<HR>
<SMALL>
Last update:
Tue Apr 1 14:35:18 EST 2003
Thu Mar 11 23:08:56 BRT 2004
</SMALL>
</BODY>
......
/*
** $Id: lua.h,v 1.175a 2003/03/18 12:31:39 roberto Exp $
** $Id: lua.h,v 1.175b 2003/03/18 12:31:39 roberto Exp $
** Lua - An Extensible Extension Language
** Tecgraf: Computer Graphics Technology Group, PUC-Rio, Brazil
** http://www.lua.org mailto:info@lua.org
......@@ -14,8 +14,8 @@
#include <stddef.h>
#define LUA_VERSION "Lua 5.0.1"
#define LUA_COPYRIGHT "Copyright (C) 1994-2003 Tecgraf, PUC-Rio"
#define LUA_VERSION "Lua 5.0.2"
#define LUA_COPYRIGHT "Copyright (C) 1994-2004 Tecgraf, PUC-Rio"
#define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes"
......@@ -365,7 +365,7 @@ struct lua_Debug {
/******************************************************************************
* Copyright (C) 1994-2003 Tecgraf, PUC-Rio. All rights reserved.
* Copyright (C) 1994-2004 Tecgraf, PUC-Rio. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
......
/*
** $Id: lbaselib.c,v 1.130a 2003/04/03 13:35:34 roberto Exp $
** $Id: lbaselib.c,v 1.130b 2003/04/03 13:35:34 roberto Exp $
** Basic library
** See Copyright Notice in lua.h
*/
......@@ -274,10 +274,11 @@ static int luaB_loadfile (lua_State *L) {
static int luaB_dofile (lua_State *L) {
const char *fname = luaL_optstring(L, 1, NULL);
int n = lua_gettop(L);
int status = luaL_loadfile(L, fname);
if (status != 0) lua_error(L);
lua_call(L, 0, LUA_MULTRET);
return lua_gettop(L) - 1;
return lua_gettop(L) - n;
}
......
/*
** $Id: lvm.c,v 1.284a 2003/04/03 13:35:34 roberto Exp $
** $Id: lvm.c,v 1.284b 2003/04/03 13:35:34 roberto Exp $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
......@@ -399,8 +399,10 @@ StkId luaV_execute (lua_State *L) {
TObject *k;
const Instruction *pc;
callentry: /* entry point when calling new functions */
if (L->hookmask & LUA_MASKCALL)
if (L->hookmask & LUA_MASKCALL) {
L->ci->u.l.pc = &pc;
luaD_callhook(L, LUA_HOOKCALL, -1);
}
retentry: /* entry point when returning to old functions */
L->ci->u.l.pc = &pc;
lua_assert(L->ci->state == CI_SAVEDPC ||
......@@ -776,3 +778,4 @@ StkId luaV_execute (lua_State *L) {
}
}
......@@ -5,7 +5,7 @@ local A
while 1 do
local l=io.read()
if l==nil then break end
local _,_,a,b=string.find(l,'"?(%w+)"?%s*(.*)$')
local _,_,a,b=string.find(l,'"?([_%w]+)"?%s*(.*)$')
if a~=A then A=a io.write("\n",a,":") end
io.write(" ",b)
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment