Rearranged the source tree
This commit is contained in:
parent
77a7742538
commit
3239403a11
89 changed files with 264 additions and 13917 deletions
63
Makefile
63
Makefile
|
|
@ -1,63 +1,22 @@
|
||||||
# This build script uses some GNU make specific extensions.
|
|
||||||
|
|
||||||
include config.mk
|
include config.mk
|
||||||
|
|
||||||
CFLAGS += -ggdb
|
all: visor/VISOR.EFI
|
||||||
|
|
||||||
# Kernel sources which are specific to the x86_64 architecture.
|
|
||||||
# Add new source files (C or Assembler) here,
|
|
||||||
# preferentially in alphabetical order.
|
|
||||||
VISOR_SOURCES_x86_64 := \
|
|
||||||
src/vintel.c \
|
|
||||||
src/proc.c \
|
|
||||||
# end of x86_64 specific sources list
|
|
||||||
|
|
||||||
# Architecture-agnostic kernel sources.
|
|
||||||
# Add new source files (C or Assembler) here,
|
|
||||||
# preferentially in alphabetical order.
|
|
||||||
VISOR_SOURCES := \
|
|
||||||
src/alloc.c \
|
|
||||||
src/efi.c \
|
|
||||||
src/ssp.c \
|
|
||||||
src/strlcpy.c \
|
|
||||||
$(VISOR_SOURCES_$(ARCH)) \
|
|
||||||
# end of sources list
|
|
||||||
|
|
||||||
VISOR_OBJECTS := $(VISOR_SOURCES:.c=.o)
|
|
||||||
VISOR_OBJECTS := $(VISOR_OBJECTS:.S=.o)
|
|
||||||
VISOR_OBJECTS := $(VISOR_OBJECTS:%.o=build/%.o)
|
|
||||||
VISOR_DEPFILES := $(VISOR_OBJECTS:.o=.d)
|
|
||||||
VISOR_TARGET := build/visor
|
|
||||||
|
|
||||||
.PHONY: all clean
|
|
||||||
|
|
||||||
all: $(VISOR_TARGET)
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(VISOR_OBJECTS)
|
$(MAKE) -C libc clean
|
||||||
rm -f $(VISOR_DEPFILES)
|
$(MAKE) -C lua clean
|
||||||
rm -f build/visor.so
|
$(MAKE) -C visor clean
|
||||||
rm -f $(VISOR_TARGET)
|
|
||||||
|
|
||||||
build/src/%.o: src/%.[cS] | build/src
|
visor/VISOR.EFI: libc/libc.a lua/liblua.a
|
||||||
@printf "CC %s\n" $@
|
$(MAKE) -C visor
|
||||||
@"$(CC)" $(CFLAGS) -MMD -MP -c -o $@ $< $(CPPFLAGS)
|
|
||||||
|
|
||||||
build/visor.so: $(VISOR_OBJECTS) gnuefi/crt0-efi-$(ARCH).o | build
|
lua/liblua.a: libc/libc.a
|
||||||
@printf "LD %s\n" $@
|
$(MAKE) -C lua a
|
||||||
@"$(LD)" $(LDFLAGS) -o $@ gnuefi/crt0-efi-$(ARCH).o $(VISOR_OBJECTS) $(LIBS)
|
|
||||||
|
|
||||||
$(VISOR_TARGET): build/visor.so | build
|
libc/libc.a:
|
||||||
@printf "ELF->PE %s\n" $@
|
$(MAKE) -C libc
|
||||||
@objcopy -j .text -j .sdata -j .data -j .rodata -j .dynamic -j .dynsym -j .rel -j .rela -j .rel.* -j .rela.* -j .reloc --target efi-app-x86_64 --subsystem 10 build/visor.so $@
|
|
||||||
|
|
||||||
build:
|
|
||||||
mkdir -p $@
|
|
||||||
|
|
||||||
build/src:
|
|
||||||
mkdir -p $@
|
|
||||||
|
|
||||||
config.mk: | config.default.mk
|
config.mk: | config.default.mk
|
||||||
cp config.default.mk $@
|
cp config.default.mk $@
|
||||||
|
|
||||||
-include $(VISOR_DEPFILES)
|
.PHONY: all clean
|
||||||
|
|
|
||||||
277
lua/Makefile
277
lua/Makefile
|
|
@ -1,106 +1,227 @@
|
||||||
# Makefile for installing Lua
|
# Makefile for building Lua
|
||||||
# See doc/readme.html for installation and customization instructions.
|
# See ../doc/readme.html for installation and customization instructions.
|
||||||
|
|
||||||
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
|
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
|
||||||
|
|
||||||
# Your platform. See PLATS for possible values.
|
# Your platform. See PLATS for possible values.
|
||||||
PLAT= guess
|
PLAT= generic
|
||||||
|
|
||||||
# Where to install. The installation starts in the src and doc directories,
|
CROSS_PATH = /home/thomas/karlos/gcc-14.2.0-nolibc/x86_64-linux/bin
|
||||||
# so take care if INSTALL_TOP is not an absolute path. See the local target.
|
CC = $(CROSS_PATH)/x86_64-linux-gcc
|
||||||
# You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with
|
CFLAGS= -std=gnu99 -O2 -Wall -Wextra $(SYSCFLAGS) $(MYCFLAGS)
|
||||||
# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
|
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
|
||||||
INSTALL_TOP= /usr/local
|
LIBS= -lm $(SYSLIBS) $(MYLIBS)
|
||||||
INSTALL_BIN= $(INSTALL_TOP)/bin
|
|
||||||
INSTALL_INC= $(INSTALL_TOP)/include
|
|
||||||
INSTALL_LIB= $(INSTALL_TOP)/lib
|
|
||||||
INSTALL_MAN= $(INSTALL_TOP)/man/man1
|
|
||||||
INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
|
|
||||||
INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
|
|
||||||
|
|
||||||
# How to install. If your install program does not support "-p", then
|
AR= ar rc
|
||||||
# you may have to run ranlib on the installed liblua.a.
|
RANLIB= ranlib
|
||||||
INSTALL= install -p
|
|
||||||
INSTALL_EXEC= $(INSTALL) -m 0755
|
|
||||||
INSTALL_DATA= $(INSTALL) -m 0644
|
|
||||||
#
|
|
||||||
# If you don't have "install" you can use "cp" instead.
|
|
||||||
# INSTALL= cp -p
|
|
||||||
# INSTALL_EXEC= $(INSTALL)
|
|
||||||
# INSTALL_DATA= $(INSTALL)
|
|
||||||
|
|
||||||
# Other utilities.
|
|
||||||
MKDIR= mkdir -p
|
|
||||||
RM= rm -f
|
RM= rm -f
|
||||||
|
UNAME= uname
|
||||||
|
|
||||||
|
SYSCFLAGS=-nostdlib -ffreestanding -fpic -fno-stack-protector -fno-stack-check -fshort-wchar -mno-red-zone -maccumulate-outgoing-args -I ../libc/include
|
||||||
|
SYSLDFLAGS=
|
||||||
|
SYSLIBS=
|
||||||
|
|
||||||
|
MYCFLAGS=
|
||||||
|
MYLDFLAGS=
|
||||||
|
MYLIBS=
|
||||||
|
MYOBJS=
|
||||||
|
|
||||||
|
# Special flags for compiler modules; -Os reduces code size.
|
||||||
|
CMCFLAGS=
|
||||||
|
|
||||||
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
|
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
|
||||||
|
|
||||||
# Convenience platforms targets.
|
|
||||||
PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
|
PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
|
||||||
|
|
||||||
# What to install.
|
LUA_A= liblua.a
|
||||||
TO_BIN= lua luac
|
CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o
|
||||||
TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp
|
# LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o
|
||||||
TO_LIB= liblua.a
|
LIB_O = lbaselib.o
|
||||||
TO_MAN= lua.1 luac.1
|
BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
|
||||||
|
|
||||||
# Lua version and release.
|
LUA_T= lua
|
||||||
V= 5.4
|
LUA_O= lua.o
|
||||||
R= $V.7
|
|
||||||
|
LUAC_T= luac
|
||||||
|
LUAC_O= luac.o
|
||||||
|
|
||||||
|
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
|
||||||
|
ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
|
||||||
|
ALL_A= $(LUA_A)
|
||||||
|
|
||||||
# Targets start here.
|
# Targets start here.
|
||||||
all: $(PLAT)
|
default: $(PLAT)
|
||||||
|
|
||||||
$(PLATS) help test clean:
|
all: $(ALL_T)
|
||||||
@cd src && $(MAKE) $@
|
|
||||||
|
|
||||||
install: dummy
|
o: $(ALL_O)
|
||||||
cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD)
|
|
||||||
cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
|
|
||||||
cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
|
|
||||||
cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
|
|
||||||
cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
|
|
||||||
|
|
||||||
uninstall:
|
a: $(ALL_A)
|
||||||
cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
|
|
||||||
cd src && cd $(INSTALL_INC) && $(RM) $(TO_INC)
|
|
||||||
cd src && cd $(INSTALL_LIB) && $(RM) $(TO_LIB)
|
|
||||||
cd doc && cd $(INSTALL_MAN) && $(RM) $(TO_MAN)
|
|
||||||
|
|
||||||
local:
|
$(LUA_A): $(BASE_O)
|
||||||
$(MAKE) install INSTALL_TOP=../install
|
$(AR) $@ $(BASE_O)
|
||||||
|
$(RANLIB) $@
|
||||||
|
|
||||||
# make may get confused with install/ if it does not support .PHONY.
|
$(LUA_T): $(LUA_O) $(LUA_A)
|
||||||
dummy:
|
$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
||||||
|
|
||||||
|
$(LUAC_T): $(LUAC_O) $(LUA_A)
|
||||||
|
$(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
||||||
|
|
||||||
|
test:
|
||||||
|
./$(LUA_T) -v
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(RM) $(ALL_T) $(ALL_O)
|
||||||
|
|
||||||
|
depend:
|
||||||
|
@$(CC) $(CFLAGS) -MM l*.c
|
||||||
|
|
||||||
# Echo config parameters.
|
|
||||||
echo:
|
echo:
|
||||||
@cd src && $(MAKE) -s echo
|
|
||||||
@echo "PLAT= $(PLAT)"
|
@echo "PLAT= $(PLAT)"
|
||||||
@echo "V= $V"
|
@echo "CC= $(CC)"
|
||||||
@echo "R= $R"
|
@echo "CFLAGS= $(CFLAGS)"
|
||||||
@echo "TO_BIN= $(TO_BIN)"
|
@echo "LDFLAGS= $(LDFLAGS)"
|
||||||
@echo "TO_INC= $(TO_INC)"
|
@echo "LIBS= $(LIBS)"
|
||||||
@echo "TO_LIB= $(TO_LIB)"
|
@echo "AR= $(AR)"
|
||||||
@echo "TO_MAN= $(TO_MAN)"
|
@echo "RANLIB= $(RANLIB)"
|
||||||
@echo "INSTALL_TOP= $(INSTALL_TOP)"
|
@echo "RM= $(RM)"
|
||||||
@echo "INSTALL_BIN= $(INSTALL_BIN)"
|
@echo "UNAME= $(UNAME)"
|
||||||
@echo "INSTALL_INC= $(INSTALL_INC)"
|
|
||||||
@echo "INSTALL_LIB= $(INSTALL_LIB)"
|
|
||||||
@echo "INSTALL_MAN= $(INSTALL_MAN)"
|
|
||||||
@echo "INSTALL_LMOD= $(INSTALL_LMOD)"
|
|
||||||
@echo "INSTALL_CMOD= $(INSTALL_CMOD)"
|
|
||||||
@echo "INSTALL_EXEC= $(INSTALL_EXEC)"
|
|
||||||
@echo "INSTALL_DATA= $(INSTALL_DATA)"
|
|
||||||
|
|
||||||
# Echo pkg-config data.
|
# Convenience targets for popular platforms.
|
||||||
pc:
|
ALL= all
|
||||||
@echo "version=$R"
|
|
||||||
@echo "prefix=$(INSTALL_TOP)"
|
help:
|
||||||
@echo "libdir=$(INSTALL_LIB)"
|
@echo "Do 'make PLATFORM' where PLATFORM is one of these:"
|
||||||
@echo "includedir=$(INSTALL_INC)"
|
@echo " $(PLATS)"
|
||||||
|
@echo "See doc/readme.html for complete instructions."
|
||||||
|
|
||||||
|
guess:
|
||||||
|
@echo Guessing `$(UNAME)`
|
||||||
|
@$(MAKE) `$(UNAME)`
|
||||||
|
|
||||||
|
AIX aix:
|
||||||
|
$(MAKE) $(ALL) CC="xlc" CFLAGS="-O2 -DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-ldl" SYSLDFLAGS="-brtl -bexpall"
|
||||||
|
|
||||||
|
bsd:
|
||||||
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-Wl,-E"
|
||||||
|
|
||||||
|
c89:
|
||||||
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_C89" CC="gcc -std=c89"
|
||||||
|
@echo ''
|
||||||
|
@echo '*** C89 does not guarantee 64-bit integers for Lua.'
|
||||||
|
@echo '*** Make sure to compile all external Lua libraries'
|
||||||
|
@echo '*** with LUA_USE_C89 to ensure consistency'
|
||||||
|
@echo ''
|
||||||
|
|
||||||
|
FreeBSD NetBSD OpenBSD freebsd:
|
||||||
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE -I/usr/include/edit" SYSLIBS="-Wl,-E -ledit" CC="cc"
|
||||||
|
|
||||||
|
generic: $(ALL)
|
||||||
|
|
||||||
|
ios:
|
||||||
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_IOS"
|
||||||
|
|
||||||
|
Linux linux: linux-noreadline
|
||||||
|
|
||||||
|
linux-noreadline:
|
||||||
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl"
|
||||||
|
|
||||||
|
linux-readline:
|
||||||
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE" SYSLIBS="-Wl,-E -ldl -lreadline"
|
||||||
|
|
||||||
|
Darwin macos macosx:
|
||||||
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE" SYSLIBS="-lreadline"
|
||||||
|
|
||||||
|
mingw:
|
||||||
|
$(MAKE) "LUA_A=lua54.dll" "LUA_T=lua.exe" \
|
||||||
|
"AR=$(CC) -shared -o" "RANLIB=strip --strip-unneeded" \
|
||||||
|
"SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s" lua.exe
|
||||||
|
$(MAKE) "LUAC_T=luac.exe" luac.exe
|
||||||
|
|
||||||
|
posix:
|
||||||
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX"
|
||||||
|
|
||||||
|
SunOS solaris:
|
||||||
|
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -D_REENTRANT" SYSLIBS="-ldl"
|
||||||
|
|
||||||
# Targets that do not create files (not all makes understand .PHONY).
|
# Targets that do not create files (not all makes understand .PHONY).
|
||||||
.PHONY: all $(PLATS) help test clean install uninstall local dummy echo pc
|
.PHONY: all $(PLATS) help test clean default o a depend echo
|
||||||
|
|
||||||
|
# Compiler modules may use special flags.
|
||||||
|
llex.o:
|
||||||
|
$(CC) $(CFLAGS) $(CMCFLAGS) -c llex.c
|
||||||
|
|
||||||
|
lparser.o:
|
||||||
|
$(CC) $(CFLAGS) $(CMCFLAGS) -c lparser.c
|
||||||
|
|
||||||
|
lcode.o:
|
||||||
|
$(CC) $(CFLAGS) $(CMCFLAGS) -c lcode.c
|
||||||
|
|
||||||
|
# DO NOT DELETE
|
||||||
|
|
||||||
|
lapi.o: lapi.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
|
||||||
|
lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lstring.h \
|
||||||
|
ltable.h lundump.h lvm.h
|
||||||
|
lauxlib.o: lauxlib.c lprefix.h lua.h luaconf.h lauxlib.h
|
||||||
|
lbaselib.o: lbaselib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
||||||
|
lcode.o: lcode.c lprefix.h lua.h luaconf.h lcode.h llex.h lobject.h \
|
||||||
|
llimits.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h \
|
||||||
|
ldo.h lgc.h lstring.h ltable.h lvm.h
|
||||||
|
lcorolib.o: lcorolib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
||||||
|
lctype.o: lctype.c lprefix.h lctype.h lua.h luaconf.h llimits.h
|
||||||
|
ldblib.o: ldblib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
||||||
|
ldebug.o: ldebug.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
|
||||||
|
lobject.h ltm.h lzio.h lmem.h lcode.h llex.h lopcodes.h lparser.h \
|
||||||
|
ldebug.h ldo.h lfunc.h lstring.h lgc.h ltable.h lvm.h
|
||||||
|
ldo.o: ldo.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
|
||||||
|
lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lopcodes.h \
|
||||||
|
lparser.h lstring.h ltable.h lundump.h lvm.h
|
||||||
|
ldump.o: ldump.c lprefix.h lua.h luaconf.h lobject.h llimits.h lstate.h \
|
||||||
|
ltm.h lzio.h lmem.h lundump.h
|
||||||
|
lfunc.o: lfunc.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
|
||||||
|
llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h
|
||||||
|
lgc.o: lgc.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
|
||||||
|
llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h
|
||||||
|
linit.o: linit.c lprefix.h lua.h luaconf.h lualib.h lauxlib.h
|
||||||
|
liolib.o: liolib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
||||||
|
llex.o: llex.c lprefix.h lua.h luaconf.h lctype.h llimits.h ldebug.h \
|
||||||
|
lstate.h lobject.h ltm.h lzio.h lmem.h ldo.h lgc.h llex.h lparser.h \
|
||||||
|
lstring.h ltable.h
|
||||||
|
lmathlib.o: lmathlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
||||||
|
lmem.o: lmem.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
|
||||||
|
llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h
|
||||||
|
loadlib.o: loadlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
||||||
|
lobject.o: lobject.c lprefix.h lua.h luaconf.h lctype.h llimits.h \
|
||||||
|
ldebug.h lstate.h lobject.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h \
|
||||||
|
lvm.h
|
||||||
|
lopcodes.o: lopcodes.c lprefix.h lopcodes.h llimits.h lua.h luaconf.h
|
||||||
|
loslib.o: loslib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
||||||
|
lparser.o: lparser.c lprefix.h lua.h luaconf.h lcode.h llex.h lobject.h \
|
||||||
|
llimits.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h \
|
||||||
|
ldo.h lfunc.h lstring.h lgc.h ltable.h
|
||||||
|
lstate.o: lstate.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
|
||||||
|
lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h llex.h \
|
||||||
|
lstring.h ltable.h
|
||||||
|
lstring.o: lstring.c lprefix.h lua.h luaconf.h ldebug.h lstate.h \
|
||||||
|
lobject.h llimits.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h
|
||||||
|
lstrlib.o: lstrlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
||||||
|
ltable.o: ltable.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
|
||||||
|
llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h
|
||||||
|
ltablib.o: ltablib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
||||||
|
ltm.o: ltm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
|
||||||
|
llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h
|
||||||
|
lua.o: lua.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
||||||
|
luac.o: luac.c lprefix.h lua.h luaconf.h lauxlib.h ldebug.h lstate.h \
|
||||||
|
lobject.h llimits.h ltm.h lzio.h lmem.h lopcodes.h lopnames.h lundump.h
|
||||||
|
lundump.o: lundump.c lprefix.h lua.h luaconf.h ldebug.h lstate.h \
|
||||||
|
lobject.h llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lstring.h lgc.h \
|
||||||
|
lundump.h
|
||||||
|
lutf8lib.o: lutf8lib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
||||||
|
lvm.o: lvm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
|
||||||
|
llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h \
|
||||||
|
ltable.h lvm.h ljumptab.h
|
||||||
|
lzio.o: lzio.c lprefix.h lua.h luaconf.h llimits.h lmem.h lstate.h \
|
||||||
|
lobject.h ltm.h lzio.h
|
||||||
|
|
||||||
# (end of Makefile)
|
# (end of Makefile)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
|
|
||||||
This is Lua 5.4.7, released on 13 Jun 2024.
|
|
||||||
|
|
||||||
For installation instructions, license details, and
|
|
||||||
further information about Lua, see doc/readme.html.
|
|
||||||
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB |
|
|
@ -1,678 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
||||||
<HTML>
|
|
||||||
<HEAD>
|
|
||||||
<TITLE>Lua 5.4 Reference Manual - contents</TITLE>
|
|
||||||
<LINK REL="stylesheet" TYPE="text/css" HREF="lua.css">
|
|
||||||
<LINK REL="stylesheet" TYPE="text/css" HREF="index.css">
|
|
||||||
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1">
|
|
||||||
</HEAD>
|
|
||||||
|
|
||||||
<BODY>
|
|
||||||
|
|
||||||
<H1>
|
|
||||||
<A HREF="https://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A>
|
|
||||||
Lua 5.4 Reference Manual
|
|
||||||
</H1>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
The reference manual is the official definition of the Lua language.
|
|
||||||
<BR>
|
|
||||||
For a complete introduction to Lua programming, see the book
|
|
||||||
<A HREF="https://www.lua.org/pil/">Programming in Lua</A>.
|
|
||||||
|
|
||||||
<DIV CLASS="menubar">
|
|
||||||
<A HREF="manual.html">start</A>
|
|
||||||
·
|
|
||||||
<A HREF="#contents">contents</A>
|
|
||||||
·
|
|
||||||
<A HREF="#index">index</A>
|
|
||||||
·
|
|
||||||
<A HREF="https://www.lua.org/manual/">other versions</A>
|
|
||||||
</DIV>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
<SMALL>
|
|
||||||
Copyright © 2020–2024 Lua.org, PUC-Rio.
|
|
||||||
Freely available under the terms of the
|
|
||||||
<A HREF="https://www.lua.org/license.html">Lua license</A>.
|
|
||||||
</SMALL>
|
|
||||||
|
|
||||||
<H2><A NAME="contents">Contents</A></H2>
|
|
||||||
<UL CLASS="contents menubar">
|
|
||||||
<LI><A HREF="manual.html">1 – Introduction</A>
|
|
||||||
<P>
|
|
||||||
<LI><A HREF="manual.html#2">2 – Basic Concepts</A>
|
|
||||||
<UL>
|
|
||||||
<LI><A HREF="manual.html#2.1">2.1 – Values and Types</A>
|
|
||||||
<LI><A HREF="manual.html#2.2">2.2 – Environments and the Global Environment</A>
|
|
||||||
<LI><A HREF="manual.html#2.3">2.3 – Error Handling</A>
|
|
||||||
<LI><A HREF="manual.html#2.4">2.4 – Metatables and Metamethods</A>
|
|
||||||
<LI><A HREF="manual.html#2.5">2.5 – Garbage Collection</A>
|
|
||||||
<UL>
|
|
||||||
<LI><A HREF="manual.html#2.5.1">2.5.1 – Incremental Garbage Collection</A>
|
|
||||||
<LI><A HREF="manual.html#2.5.2">2.5.2 – Generational Garbage Collection</A>
|
|
||||||
<LI><A HREF="manual.html#2.5.3">2.5.3 – Garbage-Collection Metamethods</A>
|
|
||||||
<LI><A HREF="manual.html#2.5.4">2.5.4 – Weak Tables</A>
|
|
||||||
</UL>
|
|
||||||
<LI><A HREF="manual.html#2.6">2.6 – Coroutines</A>
|
|
||||||
</UL>
|
|
||||||
<P>
|
|
||||||
<LI><A HREF="manual.html#3">3 – The Language</A>
|
|
||||||
<UL>
|
|
||||||
<LI><A HREF="manual.html#3.1">3.1 – Lexical Conventions</A>
|
|
||||||
<LI><A HREF="manual.html#3.2">3.2 – Variables</A>
|
|
||||||
<LI><A HREF="manual.html#3.3">3.3 – Statements</A>
|
|
||||||
<UL>
|
|
||||||
<LI><A HREF="manual.html#3.3.1">3.3.1 – Blocks</A>
|
|
||||||
<LI><A HREF="manual.html#3.3.2">3.3.2 – Chunks</A>
|
|
||||||
<LI><A HREF="manual.html#3.3.3">3.3.3 – Assignment</A>
|
|
||||||
<LI><A HREF="manual.html#3.3.4">3.3.4 – Control Structures</A>
|
|
||||||
<LI><A HREF="manual.html#3.3.5">3.3.5 – For Statement</A>
|
|
||||||
<LI><A HREF="manual.html#3.3.6">3.3.6 – Function Calls as Statements</A>
|
|
||||||
<LI><A HREF="manual.html#3.3.7">3.3.7 – Local Declarations</A>
|
|
||||||
<LI><A HREF="manual.html#3.3.8">3.3.8 – To-be-closed Variables</A>
|
|
||||||
</UL>
|
|
||||||
<LI><A HREF="manual.html#3.4">3.4 – Expressions</A>
|
|
||||||
<UL>
|
|
||||||
<LI><A HREF="manual.html#3.4.1">3.4.1 – Arithmetic Operators</A>
|
|
||||||
<LI><A HREF="manual.html#3.4.2">3.4.2 – Bitwise Operators</A>
|
|
||||||
<LI><A HREF="manual.html#3.4.3">3.4.3 – Coercions and Conversions</A>
|
|
||||||
<LI><A HREF="manual.html#3.4.4">3.4.4 – Relational Operators</A>
|
|
||||||
<LI><A HREF="manual.html#3.4.5">3.4.5 – Logical Operators</A>
|
|
||||||
<LI><A HREF="manual.html#3.4.6">3.4.6 – Concatenation</A>
|
|
||||||
<LI><A HREF="manual.html#3.4.7">3.4.7 – The Length Operator</A>
|
|
||||||
<LI><A HREF="manual.html#3.4.8">3.4.8 – Precedence</A>
|
|
||||||
<LI><A HREF="manual.html#3.4.9">3.4.9 – Table Constructors</A>
|
|
||||||
<LI><A HREF="manual.html#3.4.10">3.4.10 – Function Calls</A>
|
|
||||||
<LI><A HREF="manual.html#3.4.11">3.4.11 – Function Definitions</A>
|
|
||||||
<LI><A HREF="manual.html#3.4.12">3.4.12 – Lists of expressions, multiple results, and adjustment<A>
|
|
||||||
|
|
||||||
</UL>
|
|
||||||
<LI><A HREF="manual.html#3.5">3.5 – Visibility Rules</A>
|
|
||||||
</UL>
|
|
||||||
<P>
|
|
||||||
<LI><A HREF="manual.html#4">4 – The Application Program Interface</A>
|
|
||||||
<UL>
|
|
||||||
<LI><A HREF="manual.html#4.1">4.1 – The Stack</A>
|
|
||||||
<UL>
|
|
||||||
<LI><A HREF="manual.html#4.1.1">4.1.1 – Stack Size</A>
|
|
||||||
<LI><A HREF="manual.html#4.1.2">4.1.2 – Valid and Acceptable Indices</A>
|
|
||||||
<LI><A HREF="manual.html#4.1.3">4.1.3 – Pointers to strings</A>
|
|
||||||
</UL>
|
|
||||||
<LI><A HREF="manual.html#4.2">4.2 – C Closures</A>
|
|
||||||
<LI><A HREF="manual.html#4.3">4.3 – Registry</A>
|
|
||||||
<LI><A HREF="manual.html#4.4">4.4 – Error Handling in C</A>
|
|
||||||
<UL>
|
|
||||||
<LI><A HREF="manual.html#4.4.1">4.4.1 – Status Codes</A>
|
|
||||||
</UL>
|
|
||||||
<LI><A HREF="manual.html#4.5">4.5 – Handling Yields in C</A>
|
|
||||||
<LI><A HREF="manual.html#4.6">4.6 – Functions and Types</A>
|
|
||||||
<LI><A HREF="manual.html#4.7">4.7 – The Debug Interface</A>
|
|
||||||
</UL>
|
|
||||||
<P>
|
|
||||||
<LI><A HREF="manual.html#5">5 – The Auxiliary Library</A>
|
|
||||||
<UL>
|
|
||||||
<LI><A HREF="manual.html#5.1">5.1 – Functions and Types</A>
|
|
||||||
</UL>
|
|
||||||
<P>
|
|
||||||
<LI><A HREF="manual.html#6">6 – The Standard Libraries</A>
|
|
||||||
<UL>
|
|
||||||
<LI><A HREF="manual.html#6.1">6.1 – Basic Functions</A>
|
|
||||||
<LI><A HREF="manual.html#6.2">6.2 – Coroutine Manipulation</A>
|
|
||||||
<LI><A HREF="manual.html#6.3">6.3 – Modules</A>
|
|
||||||
<LI><A HREF="manual.html#6.4">6.4 – String Manipulation</A>
|
|
||||||
<UL>
|
|
||||||
<LI><A HREF="manual.html#6.4.1">6.4.1 – Patterns</A>
|
|
||||||
<LI><A HREF="manual.html#6.4.2">6.4.2 – Format Strings for Pack and Unpack</A>
|
|
||||||
</UL>
|
|
||||||
<LI><A HREF="manual.html#6.5">6.5 – UTF-8 Support</A>
|
|
||||||
<LI><A HREF="manual.html#6.6">6.6 – Table Manipulation</A>
|
|
||||||
<LI><A HREF="manual.html#6.7">6.7 – Mathematical Functions</A>
|
|
||||||
<LI><A HREF="manual.html#6.8">6.8 – Input and Output Facilities</A>
|
|
||||||
<LI><A HREF="manual.html#6.9">6.9 – Operating System Facilities</A>
|
|
||||||
<LI><A HREF="manual.html#6.10">6.10 – The Debug Library</A>
|
|
||||||
</UL>
|
|
||||||
<P>
|
|
||||||
<LI><A HREF="manual.html#7">7 – Lua Standalone</A>
|
|
||||||
<P>
|
|
||||||
<LI><A HREF="manual.html#8">8 – Incompatibilities with the Previous Version</A>
|
|
||||||
<UL>
|
|
||||||
<LI><A HREF="manual.html#8.1">8.1 – Incompatibilities in the Language</A>
|
|
||||||
<LI><A HREF="manual.html#8.2">8.2 – Incompatibilities in the Libraries</A>
|
|
||||||
<LI><A HREF="manual.html#8.3">8.3 – Incompatibilities in the API</A>
|
|
||||||
</UL>
|
|
||||||
<P>
|
|
||||||
<LI><A HREF="manual.html#9">9 – The Complete Syntax of Lua</A>
|
|
||||||
</UL>
|
|
||||||
|
|
||||||
<H2><A NAME="index">Index</A></H2>
|
|
||||||
<TABLE CLASS="menubar" WIDTH="100%">
|
|
||||||
<TR>
|
|
||||||
<TD>
|
|
||||||
<H3><A NAME="functions">Lua functions</A></H3>
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#6.1">basic</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-_G">_G</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-_VERSION">_VERSION</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-assert">assert</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-collectgarbage">collectgarbage</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-dofile">dofile</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-error">error</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-getmetatable">getmetatable</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-ipairs">ipairs</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-load">load</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-loadfile">loadfile</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-next">next</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-pairs">pairs</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-pcall">pcall</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-print">print</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-rawequal">rawequal</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-rawget">rawget</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-rawlen">rawlen</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-rawset">rawset</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-require">require</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-select">select</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-setmetatable">setmetatable</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-tonumber">tonumber</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-tostring">tostring</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-type">type</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-warn">warn</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-xpcall">xpcall</A><BR>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#6.2">coroutine</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-coroutine.close">coroutine.close</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-coroutine.create">coroutine.create</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-coroutine.isyieldable">coroutine.isyieldable</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-coroutine.resume">coroutine.resume</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-coroutine.running">coroutine.running</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-coroutine.status">coroutine.status</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-coroutine.wrap">coroutine.wrap</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-coroutine.yield">coroutine.yield</A><BR>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#6.10">debug</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.debug">debug.debug</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.gethook">debug.gethook</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.getinfo">debug.getinfo</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.getlocal">debug.getlocal</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.getmetatable">debug.getmetatable</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.getregistry">debug.getregistry</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.getupvalue">debug.getupvalue</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.getuservalue">debug.getuservalue</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.sethook">debug.sethook</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.setlocal">debug.setlocal</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.setmetatable">debug.setmetatable</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.setupvalue">debug.setupvalue</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.setuservalue">debug.setuservalue</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.traceback">debug.traceback</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.upvalueid">debug.upvalueid</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-debug.upvaluejoin">debug.upvaluejoin</A><BR>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#6.8">io</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-io.close">io.close</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-io.flush">io.flush</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-io.input">io.input</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-io.lines">io.lines</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-io.open">io.open</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-io.output">io.output</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-io.popen">io.popen</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-io.read">io.read</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-io.stderr">io.stderr</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-io.stdin">io.stdin</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-io.stdout">io.stdout</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-io.tmpfile">io.tmpfile</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-io.type">io.type</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-io.write">io.write</A><BR>
|
|
||||||
|
|
||||||
<A HREF="manual.html#pdf-file:close">file:close</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-file:flush">file:flush</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-file:lines">file:lines</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-file:read">file:read</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-file:seek">file:seek</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-file:setvbuf">file:setvbuf</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-file:write">file:write</A><BR>
|
|
||||||
|
|
||||||
</TD>
|
|
||||||
<TD>
|
|
||||||
<H3> </H3>
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#6.7">math</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.abs">math.abs</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.acos">math.acos</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.asin">math.asin</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.atan">math.atan</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.ceil">math.ceil</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.cos">math.cos</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.deg">math.deg</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.exp">math.exp</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.floor">math.floor</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.fmod">math.fmod</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.huge">math.huge</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.log">math.log</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.max">math.max</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.maxinteger">math.maxinteger</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.min">math.min</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.mininteger">math.mininteger</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.modf">math.modf</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.pi">math.pi</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.rad">math.rad</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.random">math.random</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.randomseed">math.randomseed</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.sin">math.sin</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.sqrt">math.sqrt</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.tan">math.tan</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.tointeger">math.tointeger</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.type">math.type</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-math.ult">math.ult</A><BR>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#6.9">os</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-os.clock">os.clock</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-os.date">os.date</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-os.difftime">os.difftime</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-os.execute">os.execute</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-os.exit">os.exit</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-os.getenv">os.getenv</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-os.remove">os.remove</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-os.rename">os.rename</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-os.setlocale">os.setlocale</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-os.time">os.time</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-os.tmpname">os.tmpname</A><BR>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#6.3">package</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-package.config">package.config</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-package.cpath">package.cpath</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-package.loaded">package.loaded</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-package.loadlib">package.loadlib</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-package.path">package.path</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-package.preload">package.preload</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-package.searchers">package.searchers</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-package.searchpath">package.searchpath</A><BR>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#6.4">string</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.byte">string.byte</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.char">string.char</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.dump">string.dump</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.find">string.find</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.format">string.format</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.gmatch">string.gmatch</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.gsub">string.gsub</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.len">string.len</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.lower">string.lower</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.match">string.match</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.pack">string.pack</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.packsize">string.packsize</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.rep">string.rep</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.reverse">string.reverse</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.sub">string.sub</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.unpack">string.unpack</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-string.upper">string.upper</A><BR>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#6.6">table</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-table.concat">table.concat</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-table.insert">table.insert</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-table.move">table.move</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-table.pack">table.pack</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-table.remove">table.remove</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-table.sort">table.sort</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-table.unpack">table.unpack</A><BR>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#6.5">utf8</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-utf8.char">utf8.char</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-utf8.charpattern">utf8.charpattern</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-utf8.codepoint">utf8.codepoint</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-utf8.codes">utf8.codes</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-utf8.len">utf8.len</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-utf8.offset">utf8.offset</A><BR>
|
|
||||||
|
|
||||||
<H3><A NAME="metamethods">metamethods</A></H3>
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#2.4">__add</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__band</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__bnot</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__bor</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__bxor</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__call</A><BR>
|
|
||||||
<A HREF="manual.html#3.3.8">__close</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__concat</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__div</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__eq</A><BR>
|
|
||||||
<A HREF="manual.html#2.5.3">__gc</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__idiv</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__index</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__le</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__len</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__lt</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-getmetatable">__metatable</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__mod</A><BR>
|
|
||||||
<A HREF="manual.html#2.5.4">__mode</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__mul</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_newmetatable">__name</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__newindex</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-pairs">__pairs</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__pow</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__shl</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__shr</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__sub</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-tostring">__tostring</A><BR>
|
|
||||||
<A HREF="manual.html#2.4">__unm</A><BR>
|
|
||||||
|
|
||||||
<H3><A NAME="env">environment<BR>variables</A></H3>
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#pdf-LUA_CPATH">LUA_CPATH</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_CPATH_5_4">LUA_CPATH_5_4</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_INIT">LUA_INIT</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_INIT_5_4">LUA_INIT_5_4</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_PATH">LUA_PATH</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_PATH_5_4">LUA_PATH_5_4</A><BR>
|
|
||||||
|
|
||||||
</TD>
|
|
||||||
<TD>
|
|
||||||
<H3><A NAME="api">C API</A></H3>
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#lua_Alloc">lua_Alloc</A><BR>
|
|
||||||
<A HREF="manual.html#lua_CFunction">lua_CFunction</A><BR>
|
|
||||||
<A HREF="manual.html#lua_Debug">lua_Debug</A><BR>
|
|
||||||
<A HREF="manual.html#lua_Hook">lua_Hook</A><BR>
|
|
||||||
<A HREF="manual.html#lua_Integer">lua_Integer</A><BR>
|
|
||||||
<A HREF="manual.html#lua_KContext">lua_KContext</A><BR>
|
|
||||||
<A HREF="manual.html#lua_KFunction">lua_KFunction</A><BR>
|
|
||||||
<A HREF="manual.html#lua_Number">lua_Number</A><BR>
|
|
||||||
<A HREF="manual.html#lua_Reader">lua_Reader</A><BR>
|
|
||||||
<A HREF="manual.html#lua_State">lua_State</A><BR>
|
|
||||||
<A HREF="manual.html#lua_Unsigned">lua_Unsigned</A><BR>
|
|
||||||
<A HREF="manual.html#lua_WarnFunction">lua_WarnFunction</A><BR>
|
|
||||||
<A HREF="manual.html#lua_Writer">lua_Writer</A><BR>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#lua_absindex">lua_absindex</A><BR>
|
|
||||||
<A HREF="manual.html#lua_arith">lua_arith</A><BR>
|
|
||||||
<A HREF="manual.html#lua_atpanic">lua_atpanic</A><BR>
|
|
||||||
<A HREF="manual.html#lua_call">lua_call</A><BR>
|
|
||||||
<A HREF="manual.html#lua_callk">lua_callk</A><BR>
|
|
||||||
<A HREF="manual.html#lua_checkstack">lua_checkstack</A><BR>
|
|
||||||
<A HREF="manual.html#lua_close">lua_close</A><BR>
|
|
||||||
<A HREF="manual.html#lua_closeslot">lua_closeslot</A><BR>
|
|
||||||
<A HREF="manual.html#lua_compare">lua_compare</A><BR>
|
|
||||||
<A HREF="manual.html#lua_concat">lua_concat</A><BR>
|
|
||||||
<A HREF="manual.html#lua_copy">lua_copy</A><BR>
|
|
||||||
<A HREF="manual.html#lua_createtable">lua_createtable</A><BR>
|
|
||||||
<A HREF="manual.html#lua_dump">lua_dump</A><BR>
|
|
||||||
<A HREF="manual.html#lua_error">lua_error</A><BR>
|
|
||||||
<A HREF="manual.html#lua_gc">lua_gc</A><BR>
|
|
||||||
<A HREF="manual.html#lua_getallocf">lua_getallocf</A><BR>
|
|
||||||
<A HREF="manual.html#lua_getextraspace">lua_getextraspace</A><BR>
|
|
||||||
<A HREF="manual.html#lua_getfield">lua_getfield</A><BR>
|
|
||||||
<A HREF="manual.html#lua_getglobal">lua_getglobal</A><BR>
|
|
||||||
<A HREF="manual.html#lua_gethook">lua_gethook</A><BR>
|
|
||||||
<A HREF="manual.html#lua_gethookcount">lua_gethookcount</A><BR>
|
|
||||||
<A HREF="manual.html#lua_gethookmask">lua_gethookmask</A><BR>
|
|
||||||
<A HREF="manual.html#lua_geti">lua_geti</A><BR>
|
|
||||||
<A HREF="manual.html#lua_getinfo">lua_getinfo</A><BR>
|
|
||||||
<A HREF="manual.html#lua_getiuservalue">lua_getiuservalue</A><BR>
|
|
||||||
<A HREF="manual.html#lua_getlocal">lua_getlocal</A><BR>
|
|
||||||
<A HREF="manual.html#lua_getmetatable">lua_getmetatable</A><BR>
|
|
||||||
<A HREF="manual.html#lua_getstack">lua_getstack</A><BR>
|
|
||||||
<A HREF="manual.html#lua_gettable">lua_gettable</A><BR>
|
|
||||||
<A HREF="manual.html#lua_gettop">lua_gettop</A><BR>
|
|
||||||
<A HREF="manual.html#lua_getupvalue">lua_getupvalue</A><BR>
|
|
||||||
<A HREF="manual.html#lua_insert">lua_insert</A><BR>
|
|
||||||
<A HREF="manual.html#lua_isboolean">lua_isboolean</A><BR>
|
|
||||||
<A HREF="manual.html#lua_iscfunction">lua_iscfunction</A><BR>
|
|
||||||
<A HREF="manual.html#lua_isfunction">lua_isfunction</A><BR>
|
|
||||||
<A HREF="manual.html#lua_isinteger">lua_isinteger</A><BR>
|
|
||||||
<A HREF="manual.html#lua_islightuserdata">lua_islightuserdata</A><BR>
|
|
||||||
<A HREF="manual.html#lua_isnil">lua_isnil</A><BR>
|
|
||||||
<A HREF="manual.html#lua_isnone">lua_isnone</A><BR>
|
|
||||||
<A HREF="manual.html#lua_isnoneornil">lua_isnoneornil</A><BR>
|
|
||||||
<A HREF="manual.html#lua_isnumber">lua_isnumber</A><BR>
|
|
||||||
<A HREF="manual.html#lua_isstring">lua_isstring</A><BR>
|
|
||||||
<A HREF="manual.html#lua_istable">lua_istable</A><BR>
|
|
||||||
<A HREF="manual.html#lua_isthread">lua_isthread</A><BR>
|
|
||||||
<A HREF="manual.html#lua_isuserdata">lua_isuserdata</A><BR>
|
|
||||||
<A HREF="manual.html#lua_isyieldable">lua_isyieldable</A><BR>
|
|
||||||
<A HREF="manual.html#lua_len">lua_len</A><BR>
|
|
||||||
<A HREF="manual.html#lua_load">lua_load</A><BR>
|
|
||||||
<A HREF="manual.html#lua_newstate">lua_newstate</A><BR>
|
|
||||||
<A HREF="manual.html#lua_newtable">lua_newtable</A><BR>
|
|
||||||
<A HREF="manual.html#lua_newthread">lua_newthread</A><BR>
|
|
||||||
<A HREF="manual.html#lua_newuserdatauv">lua_newuserdatauv</A><BR>
|
|
||||||
<A HREF="manual.html#lua_next">lua_next</A><BR>
|
|
||||||
<A HREF="manual.html#lua_numbertointeger">lua_numbertointeger</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pcall">lua_pcall</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pcallk">lua_pcallk</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pop">lua_pop</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushboolean">lua_pushboolean</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushcclosure">lua_pushcclosure</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushcfunction">lua_pushcfunction</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushfstring">lua_pushfstring</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushglobaltable">lua_pushglobaltable</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushinteger">lua_pushinteger</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushlightuserdata">lua_pushlightuserdata</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushliteral">lua_pushliteral</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushlstring">lua_pushlstring</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushnil">lua_pushnil</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushnumber">lua_pushnumber</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushstring">lua_pushstring</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushthread">lua_pushthread</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushvalue">lua_pushvalue</A><BR>
|
|
||||||
<A HREF="manual.html#lua_pushvfstring">lua_pushvfstring</A><BR>
|
|
||||||
<A HREF="manual.html#lua_rawequal">lua_rawequal</A><BR>
|
|
||||||
<A HREF="manual.html#lua_rawget">lua_rawget</A><BR>
|
|
||||||
<A HREF="manual.html#lua_rawgeti">lua_rawgeti</A><BR>
|
|
||||||
<A HREF="manual.html#lua_rawgetp">lua_rawgetp</A><BR>
|
|
||||||
<A HREF="manual.html#lua_rawlen">lua_rawlen</A><BR>
|
|
||||||
<A HREF="manual.html#lua_rawset">lua_rawset</A><BR>
|
|
||||||
<A HREF="manual.html#lua_rawseti">lua_rawseti</A><BR>
|
|
||||||
<A HREF="manual.html#lua_rawsetp">lua_rawsetp</A><BR>
|
|
||||||
<A HREF="manual.html#lua_register">lua_register</A><BR>
|
|
||||||
<A HREF="manual.html#lua_remove">lua_remove</A><BR>
|
|
||||||
<A HREF="manual.html#lua_replace">lua_replace</A><BR>
|
|
||||||
<A HREF="manual.html#lua_resetthread">lua_resetthread</A><BR>
|
|
||||||
<A HREF="manual.html#lua_resume">lua_resume</A><BR>
|
|
||||||
<A HREF="manual.html#lua_rotate">lua_rotate</A><BR>
|
|
||||||
<A HREF="manual.html#lua_setallocf">lua_setallocf</A><BR>
|
|
||||||
<A HREF="manual.html#lua_setfield">lua_setfield</A><BR>
|
|
||||||
<A HREF="manual.html#lua_setglobal">lua_setglobal</A><BR>
|
|
||||||
<A HREF="manual.html#lua_sethook">lua_sethook</A><BR>
|
|
||||||
<A HREF="manual.html#lua_seti">lua_seti</A><BR>
|
|
||||||
<A HREF="manual.html#lua_setiuservalue">lua_setiuservalue</A><BR>
|
|
||||||
<A HREF="manual.html#lua_setlocal">lua_setlocal</A><BR>
|
|
||||||
<A HREF="manual.html#lua_setmetatable">lua_setmetatable</A><BR>
|
|
||||||
<A HREF="manual.html#lua_settable">lua_settable</A><BR>
|
|
||||||
<A HREF="manual.html#lua_settop">lua_settop</A><BR>
|
|
||||||
<A HREF="manual.html#lua_setupvalue">lua_setupvalue</A><BR>
|
|
||||||
<A HREF="manual.html#lua_setwarnf">lua_setwarnf</A><BR>
|
|
||||||
<A HREF="manual.html#lua_status">lua_status</A><BR>
|
|
||||||
<A HREF="manual.html#lua_stringtonumber">lua_stringtonumber</A><BR>
|
|
||||||
<A HREF="manual.html#lua_toboolean">lua_toboolean</A><BR>
|
|
||||||
<A HREF="manual.html#lua_tocfunction">lua_tocfunction</A><BR>
|
|
||||||
<A HREF="manual.html#lua_toclose">lua_toclose</A><BR>
|
|
||||||
<A HREF="manual.html#lua_tointeger">lua_tointeger</A><BR>
|
|
||||||
<A HREF="manual.html#lua_tointegerx">lua_tointegerx</A><BR>
|
|
||||||
<A HREF="manual.html#lua_tolstring">lua_tolstring</A><BR>
|
|
||||||
<A HREF="manual.html#lua_tonumber">lua_tonumber</A><BR>
|
|
||||||
<A HREF="manual.html#lua_tonumberx">lua_tonumberx</A><BR>
|
|
||||||
<A HREF="manual.html#lua_topointer">lua_topointer</A><BR>
|
|
||||||
<A HREF="manual.html#lua_tostring">lua_tostring</A><BR>
|
|
||||||
<A HREF="manual.html#lua_tothread">lua_tothread</A><BR>
|
|
||||||
<A HREF="manual.html#lua_touserdata">lua_touserdata</A><BR>
|
|
||||||
<A HREF="manual.html#lua_type">lua_type</A><BR>
|
|
||||||
<A HREF="manual.html#lua_typename">lua_typename</A><BR>
|
|
||||||
<A HREF="manual.html#lua_upvalueid">lua_upvalueid</A><BR>
|
|
||||||
<A HREF="manual.html#lua_upvalueindex">lua_upvalueindex</A><BR>
|
|
||||||
<A HREF="manual.html#lua_upvaluejoin">lua_upvaluejoin</A><BR>
|
|
||||||
<A HREF="manual.html#lua_version">lua_version</A><BR>
|
|
||||||
<A HREF="manual.html#lua_warning">lua_warning</A><BR>
|
|
||||||
<A HREF="manual.html#lua_xmove">lua_xmove</A><BR>
|
|
||||||
<A HREF="manual.html#lua_yield">lua_yield</A><BR>
|
|
||||||
<A HREF="manual.html#lua_yieldk">lua_yieldk</A><BR>
|
|
||||||
|
|
||||||
</TD>
|
|
||||||
<TD>
|
|
||||||
<H3><A NAME="auxlib">auxiliary library</A></H3>
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#luaL_Buffer">luaL_Buffer</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_Reg">luaL_Reg</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_Stream">luaL_Stream</A><BR>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#luaL_addchar">luaL_addchar</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_addgsub">luaL_addgsub</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_addlstring">luaL_addlstring</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_addsize">luaL_addsize</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_addstring">luaL_addstring</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_addvalue">luaL_addvalue</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_argcheck">luaL_argcheck</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_argerror">luaL_argerror</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_argexpected">luaL_argexpected</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_buffaddr">luaL_buffaddr</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_buffinit">luaL_buffinit</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_buffinitsize">luaL_buffinitsize</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_bufflen">luaL_bufflen</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_buffsub">luaL_buffsub</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_callmeta">luaL_callmeta</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_checkany">luaL_checkany</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_checkinteger">luaL_checkinteger</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_checklstring">luaL_checklstring</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_checknumber">luaL_checknumber</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_checkoption">luaL_checkoption</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_checkstack">luaL_checkstack</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_checkstring">luaL_checkstring</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_checktype">luaL_checktype</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_checkudata">luaL_checkudata</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_checkversion">luaL_checkversion</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_dofile">luaL_dofile</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_dostring">luaL_dostring</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_error">luaL_error</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_execresult">luaL_execresult</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_fileresult">luaL_fileresult</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_getmetafield">luaL_getmetafield</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_getmetatable">luaL_getmetatable</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_getsubtable">luaL_getsubtable</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_gsub">luaL_gsub</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_len">luaL_len</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_loadbuffer">luaL_loadbuffer</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_loadbufferx">luaL_loadbufferx</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_loadfile">luaL_loadfile</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_loadfilex">luaL_loadfilex</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_loadstring">luaL_loadstring</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_newlib">luaL_newlib</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_newlibtable">luaL_newlibtable</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_newmetatable">luaL_newmetatable</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_newstate">luaL_newstate</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_openlibs">luaL_openlibs</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_opt">luaL_opt</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_optinteger">luaL_optinteger</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_optlstring">luaL_optlstring</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_optnumber">luaL_optnumber</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_optstring">luaL_optstring</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_prepbuffer">luaL_prepbuffer</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_prepbuffsize">luaL_prepbuffsize</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_pushfail">luaL_pushfail</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_pushresult">luaL_pushresult</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_pushresultsize">luaL_pushresultsize</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_ref">luaL_ref</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_requiref">luaL_requiref</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_setfuncs">luaL_setfuncs</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_setmetatable">luaL_setmetatable</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_testudata">luaL_testudata</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_tolstring">luaL_tolstring</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_traceback">luaL_traceback</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_typeerror">luaL_typeerror</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_typename">luaL_typename</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_unref">luaL_unref</A><BR>
|
|
||||||
<A HREF="manual.html#luaL_where">luaL_where</A><BR>
|
|
||||||
|
|
||||||
<H3><A NAME="library">standard library</A></H3>
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#pdf-luaopen_base">luaopen_base</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-luaopen_coroutine">luaopen_coroutine</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-luaopen_debug">luaopen_debug</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-luaopen_io">luaopen_io</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-luaopen_math">luaopen_math</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-luaopen_os">luaopen_os</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-luaopen_package">luaopen_package</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-luaopen_string">luaopen_string</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-luaopen_table">luaopen_table</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-luaopen_utf8">luaopen_utf8</A><BR>
|
|
||||||
|
|
||||||
<H3><A NAME="constants">constants</A></H3>
|
|
||||||
<P>
|
|
||||||
<A HREF="manual.html#pdf-LUA_ERRERR">LUA_ERRERR</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_ERRFILE">LUA_ERRFILE</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_ERRMEM">LUA_ERRMEM</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_ERRRUN">LUA_ERRRUN</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_ERRSYNTAX">LUA_ERRSYNTAX</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_HOOKCALL">LUA_HOOKCALL</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_HOOKCOUNT">LUA_HOOKCOUNT</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_HOOKLINE">LUA_HOOKLINE</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_HOOKRET">LUA_HOOKRET</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_HOOKTAILCALL">LUA_HOOKTAILCALL</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_LOADED_TABLE">LUA_LOADED_TABLE</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_MASKCALL">LUA_MASKCALL</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_MASKCOUNT">LUA_MASKCOUNT</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_MASKLINE">LUA_MASKLINE</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_MASKRET">LUA_MASKRET</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_MAXINTEGER">LUA_MAXINTEGER</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_MININTEGER">LUA_MININTEGER</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_MINSTACK">LUA_MINSTACK</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_MULTRET">LUA_MULTRET</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_NOREF">LUA_NOREF</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OK">LUA_OK</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPADD">LUA_OPADD</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPBAND">LUA_OPBAND</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPBNOT">LUA_OPBNOT</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPBOR">LUA_OPBOR</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPBXOR">LUA_OPBXOR</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPDIV">LUA_OPDIV</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPEQ">LUA_OPEQ</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPIDIV">LUA_OPIDIV</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPLE">LUA_OPLE</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPLT">LUA_OPLT</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPMOD">LUA_OPMOD</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPMUL">LUA_OPMUL</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPPOW">LUA_OPPOW</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPSHL">LUA_OPSHL</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPSHR">LUA_OPSHR</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPSUB">LUA_OPSUB</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_OPUNM">LUA_OPUNM</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_PRELOAD_TABLE">LUA_PRELOAD_TABLE</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_REFNIL">LUA_REFNIL</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_REGISTRYINDEX">LUA_REGISTRYINDEX</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_RIDX_GLOBALS">LUA_RIDX_GLOBALS</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_RIDX_MAINTHREAD">LUA_RIDX_MAINTHREAD</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_TBOOLEAN">LUA_TBOOLEAN</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_TFUNCTION">LUA_TFUNCTION</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_TLIGHTUSERDATA">LUA_TLIGHTUSERDATA</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_TNIL">LUA_TNIL</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_TNONE">LUA_TNONE</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_TNUMBER">LUA_TNUMBER</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_TSTRING">LUA_TSTRING</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_TTABLE">LUA_TTABLE</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_TTHREAD">LUA_TTHREAD</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_TUSERDATA">LUA_TUSERDATA</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_USE_APICHECK">LUA_USE_APICHECK</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUA_YIELD">LUA_YIELD</A><BR>
|
|
||||||
<A HREF="manual.html#pdf-LUAL_BUFFERSIZE">LUAL_BUFFERSIZE</A><BR>
|
|
||||||
|
|
||||||
</TD>
|
|
||||||
</TR>
|
|
||||||
</TABLE>
|
|
||||||
|
|
||||||
<P CLASS="footer">
|
|
||||||
Last update:
|
|
||||||
Thu May 9 14:47:09 UTC 2024
|
|
||||||
</P>
|
|
||||||
<!--
|
|
||||||
Last change: revised for Lua 5.4.7
|
|
||||||
-->
|
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
ul {
|
|
||||||
list-style-type: none ;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.contents {
|
|
||||||
padding: 0 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
border: none ;
|
|
||||||
border-spacing: 0 ;
|
|
||||||
border-collapse: collapse ;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
vertical-align: top ;
|
|
||||||
padding: 0 ;
|
|
||||||
text-align: left ;
|
|
||||||
line-height: 1.25 ;
|
|
||||||
width: 15% ;
|
|
||||||
}
|
|
||||||
BIN
lua/doc/logo.gif
BIN
lua/doc/logo.gif
Binary file not shown.
|
Before Width: | Height: | Size: 9.7 KiB |
155
lua/doc/lua.1
155
lua/doc/lua.1
|
|
@ -1,155 +0,0 @@
|
||||||
.\" $Id: lua.man,v 1.14 2024/05/08 18:48:27 lhf Exp $
|
|
||||||
.TH LUA 1 "$Date: 2024/05/08 18:48:27 $"
|
|
||||||
.SH NAME
|
|
||||||
lua \- Lua interpreter
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.B lua
|
|
||||||
[
|
|
||||||
.I options
|
|
||||||
]
|
|
||||||
[
|
|
||||||
.I script
|
|
||||||
[
|
|
||||||
.I args
|
|
||||||
]
|
|
||||||
]
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.B lua
|
|
||||||
is the standalone Lua interpreter.
|
|
||||||
It loads and executes Lua programs,
|
|
||||||
either in textual source form or
|
|
||||||
in precompiled binary form.
|
|
||||||
(Precompiled binaries are output by
|
|
||||||
.BR luac ,
|
|
||||||
the Lua compiler.)
|
|
||||||
.B lua
|
|
||||||
can be used as a batch interpreter and also interactively.
|
|
||||||
.LP
|
|
||||||
After handling the
|
|
||||||
.IR options ,
|
|
||||||
the Lua program in file
|
|
||||||
.I script
|
|
||||||
is loaded and executed.
|
|
||||||
The
|
|
||||||
.I args
|
|
||||||
are available to
|
|
||||||
.I script
|
|
||||||
as strings in a global table named
|
|
||||||
.B arg
|
|
||||||
and also as arguments to its main function.
|
|
||||||
When called without arguments,
|
|
||||||
.B lua
|
|
||||||
behaves as
|
|
||||||
.B "lua \-v \-i"
|
|
||||||
if the standard input is a terminal,
|
|
||||||
and as
|
|
||||||
.B "lua \-"
|
|
||||||
otherwise.
|
|
||||||
.LP
|
|
||||||
In interactive mode,
|
|
||||||
.B lua
|
|
||||||
prompts the user,
|
|
||||||
reads lines from the standard input,
|
|
||||||
and executes them as they are read.
|
|
||||||
If the line contains an expression,
|
|
||||||
then the line is evaluated and the result is printed.
|
|
||||||
If a line does not contain a complete statement,
|
|
||||||
then a secondary prompt is displayed and
|
|
||||||
lines are read until a complete statement is formed or
|
|
||||||
a syntax error is found.
|
|
||||||
.LP
|
|
||||||
Before handling command line options and scripts,
|
|
||||||
.B lua
|
|
||||||
checks the contents of the environment variables
|
|
||||||
.B LUA_INIT_5_4
|
|
||||||
and
|
|
||||||
.BR LUA_INIT ,
|
|
||||||
in that order.
|
|
||||||
If the contents are of the form
|
|
||||||
.RI '@ filename ',
|
|
||||||
then
|
|
||||||
.I filename
|
|
||||||
is executed.
|
|
||||||
Otherwise, the contents are assumed to be a Lua statement and is executed.
|
|
||||||
When
|
|
||||||
.B LUA_INIT_5_4
|
|
||||||
is defined,
|
|
||||||
.B LUA_INIT
|
|
||||||
is ignored.
|
|
||||||
.SH OPTIONS
|
|
||||||
.TP
|
|
||||||
.BI \-e " stat"
|
|
||||||
execute statement
|
|
||||||
.IR stat .
|
|
||||||
.TP
|
|
||||||
.B \-i
|
|
||||||
enter interactive mode after executing
|
|
||||||
.IR script .
|
|
||||||
.TP
|
|
||||||
.BI \-l " mod"
|
|
||||||
require library
|
|
||||||
.I mod
|
|
||||||
into global
|
|
||||||
.IR mod .
|
|
||||||
.TP
|
|
||||||
.BI \-l " g=mod"
|
|
||||||
require library
|
|
||||||
.I mod
|
|
||||||
into global
|
|
||||||
.IR g .
|
|
||||||
.TP
|
|
||||||
.B \-v
|
|
||||||
show version information.
|
|
||||||
.TP
|
|
||||||
.B \-E
|
|
||||||
ignore environment variables.
|
|
||||||
.TP
|
|
||||||
.B \-W
|
|
||||||
turn warnings on.
|
|
||||||
.TP
|
|
||||||
.B \-\-
|
|
||||||
stop handling options.
|
|
||||||
.TP
|
|
||||||
.B \-
|
|
||||||
stop handling options and execute the standard input as a file.
|
|
||||||
.SH ENVIRONMENT VARIABLES
|
|
||||||
The following environment variables affect the execution of
|
|
||||||
.BR lua .
|
|
||||||
When defined,
|
|
||||||
the version-specific variants take priority
|
|
||||||
and the version-neutral variants are ignored.
|
|
||||||
.TP
|
|
||||||
.B LUA_INIT, LUA_INIT_5_4
|
|
||||||
Code to be executed before command line options and scripts.
|
|
||||||
.TP
|
|
||||||
.B LUA_PATH, LUA_PATH_5_4
|
|
||||||
Initial value of package.path,
|
|
||||||
the path used by require to search for Lua loaders.
|
|
||||||
.TP
|
|
||||||
.B LUA_CPATH, LUA_CPATH_5_4
|
|
||||||
Initial value of package.cpath,
|
|
||||||
the path used by require to search for C loaders.
|
|
||||||
.SH EXIT STATUS
|
|
||||||
If a script calls os.exit,
|
|
||||||
then
|
|
||||||
.B lua
|
|
||||||
exits with the given exit status.
|
|
||||||
Otherwise,
|
|
||||||
.B lua
|
|
||||||
exits
|
|
||||||
with EXIT_SUCCESS (0 on POSIX systems) if there were no errors
|
|
||||||
and
|
|
||||||
with EXIT_FAILURE (1 on POSIX systems) if there were errors.
|
|
||||||
Errors raised in interactive mode do not cause exits.
|
|
||||||
.SH DIAGNOSTICS
|
|
||||||
Error messages should be self explanatory.
|
|
||||||
.SH "SEE ALSO"
|
|
||||||
.BR luac (1)
|
|
||||||
.br
|
|
||||||
The documentation at lua.org,
|
|
||||||
especially section 7 of the reference manual.
|
|
||||||
.SH AUTHORS
|
|
||||||
R. Ierusalimschy,
|
|
||||||
L. H. de Figueiredo,
|
|
||||||
W. Celes
|
|
||||||
.\" EOF
|
|
||||||
162
lua/doc/lua.css
162
lua/doc/lua.css
|
|
@ -1,162 +0,0 @@
|
||||||
html {
|
|
||||||
background-color: #F8F8F8 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
background-color: #FFFFFF ;
|
|
||||||
color: #000000 ;
|
|
||||||
font-family: Helvetica, Arial, sans-serif ;
|
|
||||||
text-align: justify ;
|
|
||||||
line-height: 1.25 ;
|
|
||||||
margin: 16px auto ;
|
|
||||||
padding: 32px ;
|
|
||||||
border: solid #ccc 1px ;
|
|
||||||
border-radius: 20px ;
|
|
||||||
max-width: 70em ;
|
|
||||||
width: 90% ;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h2, h3, h4 {
|
|
||||||
color: #000080 ;
|
|
||||||
font-family: Verdana, Geneva, sans-serif ;
|
|
||||||
font-weight: normal ;
|
|
||||||
font-style: normal ;
|
|
||||||
text-align: left ;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 28pt ;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 img {
|
|
||||||
vertical-align: text-bottom ;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2:before {
|
|
||||||
content: "\2756" ;
|
|
||||||
padding-right: 0.5em ;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
text-decoration: none ;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:link {
|
|
||||||
color: #000080 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:link:hover, a:visited:hover {
|
|
||||||
background-color: #D0D0FF ;
|
|
||||||
color: #000080 ;
|
|
||||||
border-radius: 4px ;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:link:active, a:visited:active {
|
|
||||||
color: #FF0000 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.menubar {
|
|
||||||
padding-bottom: 0.5em ;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.menubar {
|
|
||||||
margin-left: 2.5em ;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menubar a:hover {
|
|
||||||
margin: -3px -3px -3px -3px ;
|
|
||||||
padding: 3px 3px 3px 3px ;
|
|
||||||
border-radius: 4px ;
|
|
||||||
}
|
|
||||||
|
|
||||||
:target {
|
|
||||||
background-color: #F0F0F0 ;
|
|
||||||
margin: -8px ;
|
|
||||||
padding: 8px ;
|
|
||||||
border-radius: 8px ;
|
|
||||||
outline: none ;
|
|
||||||
}
|
|
||||||
|
|
||||||
hr {
|
|
||||||
display: none ;
|
|
||||||
}
|
|
||||||
|
|
||||||
table hr {
|
|
||||||
background-color: #a0a0a0 ;
|
|
||||||
color: #a0a0a0 ;
|
|
||||||
border: 0 ;
|
|
||||||
height: 1px ;
|
|
||||||
display: block ;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
color: gray ;
|
|
||||||
font-size: x-small ;
|
|
||||||
text-transform: lowercase ;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type=text] {
|
|
||||||
border: solid #a0a0a0 2px ;
|
|
||||||
border-radius: 2em ;
|
|
||||||
background-image: url('images/search.png') ;
|
|
||||||
background-repeat: no-repeat ;
|
|
||||||
background-position: 4px center ;
|
|
||||||
padding-left: 20px ;
|
|
||||||
height: 2em ;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre.session {
|
|
||||||
background-color: #F8F8F8 ;
|
|
||||||
padding: 1em ;
|
|
||||||
border-radius: 8px ;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
border: none ;
|
|
||||||
border-spacing: 0 ;
|
|
||||||
border-collapse: collapse ;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
padding: 0 ;
|
|
||||||
margin: 0 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
td.gutter {
|
|
||||||
width: 4% ;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.columns td {
|
|
||||||
vertical-align: top ;
|
|
||||||
padding-bottom: 1em ;
|
|
||||||
text-align: justify ;
|
|
||||||
line-height: 1.25 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.book td {
|
|
||||||
vertical-align: top ;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.book td.cover {
|
|
||||||
padding-right: 1em ;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.book img {
|
|
||||||
border: solid #000080 1px ;
|
|
||||||
border-radius: 2px ;
|
|
||||||
}
|
|
||||||
|
|
||||||
table.book span {
|
|
||||||
font-size: small ;
|
|
||||||
text-align: left ;
|
|
||||||
display: block ;
|
|
||||||
margin-top: 0.25em ;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.logos a:link:hover, p.logos a:visited:hover {
|
|
||||||
background-color: inherit ;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
background-color: white ;
|
|
||||||
}
|
|
||||||
118
lua/doc/luac.1
118
lua/doc/luac.1
|
|
@ -1,118 +0,0 @@
|
||||||
.\" $Id: luac.man,v 1.29 2011/11/16 13:53:40 lhf Exp $
|
|
||||||
.TH LUAC 1 "$Date: 2011/11/16 13:53:40 $"
|
|
||||||
.SH NAME
|
|
||||||
luac \- Lua compiler
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.B luac
|
|
||||||
[
|
|
||||||
.I options
|
|
||||||
] [
|
|
||||||
.I filenames
|
|
||||||
]
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.B luac
|
|
||||||
is the Lua compiler.
|
|
||||||
It translates programs written in the Lua programming language
|
|
||||||
into binary files containing precompiled chunks
|
|
||||||
that can be later loaded and executed.
|
|
||||||
.LP
|
|
||||||
The main advantages of precompiling chunks are:
|
|
||||||
faster loading,
|
|
||||||
protecting source code from accidental user changes,
|
|
||||||
and
|
|
||||||
off-line syntax checking.
|
|
||||||
Precompiling does not imply faster execution
|
|
||||||
because in Lua chunks are always compiled into bytecodes before being executed.
|
|
||||||
.B luac
|
|
||||||
simply allows those bytecodes to be saved in a file for later execution.
|
|
||||||
Precompiled chunks are not necessarily smaller than the corresponding source.
|
|
||||||
The main goal in precompiling is faster loading.
|
|
||||||
.LP
|
|
||||||
In the command line,
|
|
||||||
you can mix
|
|
||||||
text files containing Lua source and
|
|
||||||
binary files containing precompiled chunks.
|
|
||||||
.B luac
|
|
||||||
produces a single output file containing the combined bytecodes
|
|
||||||
for all files given.
|
|
||||||
Executing the combined file is equivalent to executing the given files.
|
|
||||||
By default,
|
|
||||||
the output file is named
|
|
||||||
.BR luac.out ,
|
|
||||||
but you can change this with the
|
|
||||||
.B \-o
|
|
||||||
option.
|
|
||||||
.LP
|
|
||||||
Precompiled chunks are
|
|
||||||
.I not
|
|
||||||
portable across different architectures.
|
|
||||||
Moreover,
|
|
||||||
the internal format of precompiled chunks
|
|
||||||
is likely to change when a new version of Lua is released.
|
|
||||||
Make sure you save the source files of all Lua programs that you precompile.
|
|
||||||
.LP
|
|
||||||
.SH OPTIONS
|
|
||||||
.TP
|
|
||||||
.B \-l
|
|
||||||
produce a listing of the compiled bytecode for Lua's virtual machine.
|
|
||||||
Listing bytecodes is useful to learn about Lua's virtual machine.
|
|
||||||
If no files are given, then
|
|
||||||
.B luac
|
|
||||||
loads
|
|
||||||
.B luac.out
|
|
||||||
and lists its contents.
|
|
||||||
Use
|
|
||||||
.B \-l \-l
|
|
||||||
for a full listing.
|
|
||||||
.TP
|
|
||||||
.BI \-o " file"
|
|
||||||
output to
|
|
||||||
.IR file ,
|
|
||||||
instead of the default
|
|
||||||
.BR luac.out .
|
|
||||||
(You can use
|
|
||||||
.B "'\-'"
|
|
||||||
for standard output,
|
|
||||||
but not on platforms that open standard output in text mode.)
|
|
||||||
The output file may be one of the given files because
|
|
||||||
all files are loaded before the output file is written.
|
|
||||||
Be careful not to overwrite precious files.
|
|
||||||
.TP
|
|
||||||
.B \-p
|
|
||||||
load files but do not generate any output file.
|
|
||||||
Used mainly for syntax checking and for testing precompiled chunks:
|
|
||||||
corrupted files will probably generate errors when loaded.
|
|
||||||
If no files are given, then
|
|
||||||
.B luac
|
|
||||||
loads
|
|
||||||
.B luac.out
|
|
||||||
and tests its contents.
|
|
||||||
No messages are displayed if the file loads without errors.
|
|
||||||
.TP
|
|
||||||
.B \-s
|
|
||||||
strip debug information before writing the output file.
|
|
||||||
This saves some space in very large chunks,
|
|
||||||
but if errors occur when running a stripped chunk,
|
|
||||||
then the error messages may not contain the full information they usually do.
|
|
||||||
In particular,
|
|
||||||
line numbers and names of local variables are lost.
|
|
||||||
.TP
|
|
||||||
.B \-v
|
|
||||||
show version information.
|
|
||||||
.TP
|
|
||||||
.B \-\-
|
|
||||||
stop handling options.
|
|
||||||
.TP
|
|
||||||
.B \-
|
|
||||||
stop handling options and process standard input.
|
|
||||||
.SH "SEE ALSO"
|
|
||||||
.BR lua (1)
|
|
||||||
.br
|
|
||||||
The documentation at lua.org.
|
|
||||||
.SH DIAGNOSTICS
|
|
||||||
Error messages should be self explanatory.
|
|
||||||
.SH AUTHORS
|
|
||||||
R. Ierusalimschy,
|
|
||||||
L. H. de Figueiredo,
|
|
||||||
W. Celes
|
|
||||||
.\" EOF
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
h3 code {
|
|
||||||
font-family: inherit ;
|
|
||||||
font-size: inherit ;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre, code {
|
|
||||||
font-size: 12pt ;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.apii {
|
|
||||||
color: gray ;
|
|
||||||
float: right ;
|
|
||||||
font-family: inherit ;
|
|
||||||
font-style: normal ;
|
|
||||||
font-size: small ;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2:before {
|
|
||||||
content: "" ;
|
|
||||||
padding-right: 0em ;
|
|
||||||
}
|
|
||||||
12060
lua/doc/manual.html
12060
lua/doc/manual.html
File diff suppressed because it is too large
Load diff
|
|
@ -1,339 +0,0 @@
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
||||||
<HTML>
|
|
||||||
<HEAD>
|
|
||||||
<TITLE>Lua 5.4 readme</TITLE>
|
|
||||||
<LINK REL="stylesheet" TYPE="text/css" HREF="lua.css">
|
|
||||||
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-1">
|
|
||||||
<STYLE TYPE="text/css">
|
|
||||||
blockquote, .display {
|
|
||||||
border: solid #a0a0a0 2px ;
|
|
||||||
border-radius: 8px ;
|
|
||||||
padding: 1em ;
|
|
||||||
margin: 0px ;
|
|
||||||
}
|
|
||||||
|
|
||||||
.display {
|
|
||||||
word-spacing: 0.25em ;
|
|
||||||
}
|
|
||||||
|
|
||||||
dl.display dd {
|
|
||||||
padding-bottom: 0.2em ;
|
|
||||||
}
|
|
||||||
|
|
||||||
tt, kbd, code {
|
|
||||||
font-size: 12pt ;
|
|
||||||
}
|
|
||||||
</STYLE>
|
|
||||||
</HEAD>
|
|
||||||
|
|
||||||
<BODY>
|
|
||||||
|
|
||||||
<H1>
|
|
||||||
<A HREF="https://www.lua.org/"><IMG SRC="logo.gif" ALT="Lua"></A>
|
|
||||||
Welcome to Lua 5.4
|
|
||||||
</H1>
|
|
||||||
|
|
||||||
<DIV CLASS="menubar">
|
|
||||||
<A HREF="#about">about</A>
|
|
||||||
·
|
|
||||||
<A HREF="#install">installation</A>
|
|
||||||
·
|
|
||||||
<A HREF="#changes">changes</A>
|
|
||||||
·
|
|
||||||
<A HREF="#license">license</A>
|
|
||||||
·
|
|
||||||
<A HREF="contents.html">reference manual</A>
|
|
||||||
</DIV>
|
|
||||||
|
|
||||||
<H2><A NAME="about">About Lua</A></H2>
|
|
||||||
<P>
|
|
||||||
Lua is a powerful, efficient, lightweight, embeddable scripting language
|
|
||||||
developed by a
|
|
||||||
<A HREF="https://www.lua.org/authors.html">team</A>
|
|
||||||
at
|
|
||||||
<A HREF="https://www.puc-rio.br/">PUC-Rio</A>,
|
|
||||||
the Pontifical Catholic University of Rio de Janeiro in Brazil.
|
|
||||||
Lua is
|
|
||||||
<A HREF="#license">free software</A>
|
|
||||||
used in
|
|
||||||
<A HREF="https://www.lua.org/uses.html">many products and projects</A>
|
|
||||||
around the world.
|
|
||||||
|
|
||||||
<P>
|
|
||||||
Lua's
|
|
||||||
<A HREF="https://www.lua.org/">official website</A>
|
|
||||||
provides complete information
|
|
||||||
about Lua,
|
|
||||||
including
|
|
||||||
an
|
|
||||||
<A HREF="https://www.lua.org/about.html">executive summary</A>,
|
|
||||||
tips on
|
|
||||||
<A HREF="https://www.lua.org/start.html">getting started</A>,
|
|
||||||
and
|
|
||||||
updated
|
|
||||||
<A HREF="https://www.lua.org/docs.html">documentation</A>,
|
|
||||||
especially the
|
|
||||||
<A HREF="https://www.lua.org/manual/5.4/">reference manual</A>,
|
|
||||||
which may differ slightly from the
|
|
||||||
<A HREF="contents.html">local copy</A>
|
|
||||||
distributed in this package.
|
|
||||||
|
|
||||||
<H2><A NAME="install">Installing Lua</A></H2>
|
|
||||||
<P>
|
|
||||||
Lua is distributed in
|
|
||||||
<A HREF="https://www.lua.org/ftp/">source</A>
|
|
||||||
form.
|
|
||||||
You need to build it before using it.
|
|
||||||
Building Lua should be straightforward
|
|
||||||
because
|
|
||||||
Lua is implemented in pure ANSI C and compiles unmodified in all known
|
|
||||||
platforms that have an ANSI C compiler.
|
|
||||||
Lua also compiles unmodified as C++.
|
|
||||||
The instructions given below for building Lua are for Unix-like platforms,
|
|
||||||
such as Linux and macOS.
|
|
||||||
See also
|
|
||||||
<A HREF="#other">instructions for other systems</A>
|
|
||||||
and
|
|
||||||
<A HREF="#customization">customization options</A>.
|
|
||||||
|
|
||||||
<P>
|
|
||||||
If you don't have the time or the inclination to compile Lua yourself,
|
|
||||||
get a binary from
|
|
||||||
<A HREF="https://luabinaries.sourceforge.net">LuaBinaries</A>.
|
|
||||||
|
|
||||||
<H3>Building Lua</H3>
|
|
||||||
<P>
|
|
||||||
In most common Unix-like platforms, simply do "<KBD>make</KBD>".
|
|
||||||
Here are the details.
|
|
||||||
|
|
||||||
<OL>
|
|
||||||
<LI>
|
|
||||||
Open a terminal window and move to
|
|
||||||
the top-level directory, which is named <TT>lua-5.4.7</TT>.
|
|
||||||
The <TT>Makefile</TT> there controls both the build process and the installation process.
|
|
||||||
<P>
|
|
||||||
<LI>
|
|
||||||
Do "<KBD>make</KBD>". The <TT>Makefile</TT> will guess your platform and build Lua for it.
|
|
||||||
<P>
|
|
||||||
<LI>
|
|
||||||
If the guess failed, do "<KBD>make help</KBD>" and see if your platform is listed.
|
|
||||||
The platforms currently supported are:
|
|
||||||
<P>
|
|
||||||
<P CLASS="display">
|
|
||||||
guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
|
|
||||||
</P>
|
|
||||||
<P>
|
|
||||||
If your platform is listed, just do "<KBD>make xxx</KBD>", where xxx
|
|
||||||
is your platform name.
|
|
||||||
<P>
|
|
||||||
If your platform is not listed, try the closest one or posix, generic,
|
|
||||||
c89, in this order.
|
|
||||||
<P>
|
|
||||||
<LI>
|
|
||||||
The compilation takes only a few moments
|
|
||||||
and produces three files in the <TT>src</TT> directory:
|
|
||||||
lua (the interpreter),
|
|
||||||
luac (the compiler),
|
|
||||||
and liblua.a (the library).
|
|
||||||
<P>
|
|
||||||
<LI>
|
|
||||||
To check that Lua has been built correctly, do "<KBD>make test</KBD>"
|
|
||||||
after building Lua. This will run the interpreter and print its version.
|
|
||||||
</OL>
|
|
||||||
<P>
|
|
||||||
If you're running Linux, try "<KBD>make linux-readline</KBD>" to build the interactive Lua interpreter with handy line-editing and history capabilities.
|
|
||||||
If you get compilation errors,
|
|
||||||
make sure you have installed the <TT>readline</TT> development package
|
|
||||||
(which is probably named <TT>libreadline-dev</TT> or <TT>readline-devel</TT>).
|
|
||||||
If you get link errors after that,
|
|
||||||
then try "<KBD>make linux-readline MYLIBS=-ltermcap</KBD>".
|
|
||||||
|
|
||||||
<H3>Installing Lua</H3>
|
|
||||||
<P>
|
|
||||||
Once you have built Lua, you may want to install it in an official
|
|
||||||
place in your system. In this case, do "<KBD>make install</KBD>". The official
|
|
||||||
place and the way to install files are defined in the <TT>Makefile</TT>. You'll
|
|
||||||
probably need the right permissions to install files, and so may need to do "<KBD>sudo make install</KBD>".
|
|
||||||
|
|
||||||
<P>
|
|
||||||
To build and install Lua in one step, do "<KBD>make all install</KBD>",
|
|
||||||
or "<KBD>make xxx install</KBD>",
|
|
||||||
where xxx is your platform name.
|
|
||||||
|
|
||||||
<P>
|
|
||||||
To install Lua locally after building it, do "<KBD>make local</KBD>".
|
|
||||||
This will create a directory <TT>install</TT> with subdirectories
|
|
||||||
<TT>bin</TT>, <TT>include</TT>, <TT>lib</TT>, <TT>man</TT>, <TT>share</TT>,
|
|
||||||
and install Lua as listed below.
|
|
||||||
|
|
||||||
To install Lua locally, but in some other directory, do
|
|
||||||
"<KBD>make install INSTALL_TOP=xxx</KBD>", where xxx is your chosen directory.
|
|
||||||
The installation starts in the <TT>src</TT> and <TT>doc</TT> directories,
|
|
||||||
so take care if <TT>INSTALL_TOP</TT> is not an absolute path.
|
|
||||||
|
|
||||||
<DL CLASS="display">
|
|
||||||
<DT>
|
|
||||||
bin:
|
|
||||||
<DD>
|
|
||||||
lua luac
|
|
||||||
<DT>
|
|
||||||
include:
|
|
||||||
<DD>
|
|
||||||
lua.h luaconf.h lualib.h lauxlib.h lua.hpp
|
|
||||||
<DT>
|
|
||||||
lib:
|
|
||||||
<DD>
|
|
||||||
liblua.a
|
|
||||||
<DT>
|
|
||||||
man/man1:
|
|
||||||
<DD>
|
|
||||||
lua.1 luac.1
|
|
||||||
</DL>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
These are the only directories you need for development.
|
|
||||||
If you only want to run Lua programs,
|
|
||||||
you only need the files in <TT>bin</TT> and <TT>man</TT>.
|
|
||||||
The files in <TT>include</TT> and <TT>lib</TT> are needed for
|
|
||||||
embedding Lua in C or C++ programs.
|
|
||||||
|
|
||||||
<H3><A NAME="customization">Customization</A></H3>
|
|
||||||
<P>
|
|
||||||
Three kinds of things can be customized by editing a file:
|
|
||||||
<UL>
|
|
||||||
<LI> Where and how to install Lua — edit <TT>Makefile</TT>.
|
|
||||||
<LI> How to build Lua — edit <TT>src/Makefile</TT>.
|
|
||||||
<LI> Lua features — edit <TT>src/luaconf.h</TT>.
|
|
||||||
</UL>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
You don't actually need to edit the Makefiles because you may set the
|
|
||||||
relevant variables in the command line when invoking make.
|
|
||||||
Nevertheless, it's probably best to edit and save the Makefiles to
|
|
||||||
record the changes you've made.
|
|
||||||
|
|
||||||
<P>
|
|
||||||
On the other hand, if you need to customize some Lua features,
|
|
||||||
edit <TT>src/luaconf.h</TT> before building and installing Lua.
|
|
||||||
The edited file will be the one installed, and
|
|
||||||
it will be used by any Lua clients that you build, to ensure consistency.
|
|
||||||
Further customization is available to experts by editing the Lua sources.
|
|
||||||
|
|
||||||
<H3><A NAME="other">Building Lua on other systems</A></H3>
|
|
||||||
<P>
|
|
||||||
If you're not using the usual Unix tools, then the instructions for
|
|
||||||
building Lua depend on the compiler you use. You'll need to create
|
|
||||||
projects (or whatever your compiler uses) for building the library,
|
|
||||||
the interpreter, and the compiler, as follows:
|
|
||||||
|
|
||||||
<DL CLASS="display">
|
|
||||||
<DT>
|
|
||||||
library:
|
|
||||||
<DD>
|
|
||||||
lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c ltm.c lundump.c lvm.c lzio.c
|
|
||||||
lauxlib.c lbaselib.c lcorolib.c ldblib.c liolib.c lmathlib.c loadlib.c loslib.c lstrlib.c ltablib.c lutf8lib.c linit.c
|
|
||||||
<DT>
|
|
||||||
interpreter:
|
|
||||||
<DD>
|
|
||||||
library, lua.c
|
|
||||||
<DT>
|
|
||||||
compiler:
|
|
||||||
<DD>
|
|
||||||
library, luac.c
|
|
||||||
</DL>
|
|
||||||
|
|
||||||
<P>
|
|
||||||
To use Lua as a library in your own programs, you need to know how to
|
|
||||||
create and use libraries with your compiler. Moreover, to dynamically load
|
|
||||||
C libraries for Lua, you'll need to know how to create dynamic libraries
|
|
||||||
and you'll need to make sure that the Lua API functions are accessible to
|
|
||||||
those dynamic libraries — but <EM>don't</EM> link the Lua library
|
|
||||||
into each dynamic library. For Unix, we recommend that the Lua library
|
|
||||||
be linked statically into the host program and its symbols exported for
|
|
||||||
dynamic linking; <TT>src/Makefile</TT> does this for the Lua interpreter.
|
|
||||||
For Windows, we recommend that the Lua library be a DLL.
|
|
||||||
In all cases, the compiler luac should be linked statically.
|
|
||||||
|
|
||||||
<P>
|
|
||||||
As mentioned above, you may edit <TT>src/luaconf.h</TT> to customize
|
|
||||||
some features before building Lua.
|
|
||||||
|
|
||||||
<H2><A NAME="changes">Changes since Lua 5.3</A></H2>
|
|
||||||
<P>
|
|
||||||
Here are the main changes introduced in Lua 5.4.
|
|
||||||
The
|
|
||||||
<A HREF="contents.html">reference manual</A>
|
|
||||||
lists the
|
|
||||||
<A HREF="manual.html#8">incompatibilities</A> that had to be introduced.
|
|
||||||
|
|
||||||
<H3>Main changes</H3>
|
|
||||||
<UL>
|
|
||||||
<LI> new generational mode for garbage collection
|
|
||||||
<LI> to-be-closed variables
|
|
||||||
<LI> const variables
|
|
||||||
<LI> userdata can have multiple user values
|
|
||||||
<LI> new implementation for math.random
|
|
||||||
<LI> warning system
|
|
||||||
<LI> debug information about function arguments and returns
|
|
||||||
<LI> new semantics for the integer 'for' loop
|
|
||||||
<LI> optional 'init' argument to 'string.gmatch'
|
|
||||||
<LI> new functions 'lua_resetthread' and 'coroutine.close'
|
|
||||||
<LI> string-to-number coercions moved to the string library
|
|
||||||
<LI> allocation function allowed to fail when shrinking a memory block
|
|
||||||
<LI> new format '%p' in 'string.format'
|
|
||||||
<LI> utf8 library accepts codepoints up to 2^31
|
|
||||||
</UL>
|
|
||||||
|
|
||||||
<H2><A NAME="license">License</A></H2>
|
|
||||||
<P>
|
|
||||||
<A HREF="https://opensource.org/osd">
|
|
||||||
<IMG SRC="OSIApproved_100X125.png" ALIGN="right" ALT="[Open Source Initiative Approved License]" STYLE="padding-left: 1em" WIDTH=50>
|
|
||||||
</A>
|
|
||||||
Lua is free software distributed under the terms of the
|
|
||||||
<A HREF="https://opensource.org/license/mit">MIT license</A>
|
|
||||||
reproduced below;
|
|
||||||
it may be used for any purpose, including commercial purposes,
|
|
||||||
at absolutely no cost without having to ask us.
|
|
||||||
|
|
||||||
The only requirement is that if you do use Lua,
|
|
||||||
then you should give us credit by including the appropriate copyright notice somewhere in your product or its documentation.
|
|
||||||
|
|
||||||
For details, see the
|
|
||||||
<A HREF="https://www.lua.org/license.html">license page</A>.
|
|
||||||
|
|
||||||
<BLOCKQUOTE STYLE="padding-bottom: 0em">
|
|
||||||
Copyright © 1994–2024 Lua.org, PUC-Rio.
|
|
||||||
|
|
||||||
<P>
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
<P>
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
<P>
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
</BLOCKQUOTE>
|
|
||||||
<P>
|
|
||||||
|
|
||||||
<P CLASS="footer">
|
|
||||||
Last update:
|
|
||||||
Wed May 8 21:56:16 UTC 2024
|
|
||||||
</P>
|
|
||||||
<!--
|
|
||||||
Last change: revised for Lua 5.4.7
|
|
||||||
-->
|
|
||||||
|
|
||||||
</BODY>
|
|
||||||
</HTML>
|
|
||||||
227
lua/src/Makefile
227
lua/src/Makefile
|
|
@ -1,227 +0,0 @@
|
||||||
# Makefile for building Lua
|
|
||||||
# See ../doc/readme.html for installation and customization instructions.
|
|
||||||
|
|
||||||
# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================
|
|
||||||
|
|
||||||
# Your platform. See PLATS for possible values.
|
|
||||||
PLAT= generic
|
|
||||||
|
|
||||||
CROSS_PATH = /home/thomas/karlos/gcc-14.2.0-nolibc/x86_64-linux/bin
|
|
||||||
CC = $(CROSS_PATH)/x86_64-linux-gcc
|
|
||||||
CFLAGS= -std=gnu99 -O2 -Wall -Wextra $(SYSCFLAGS) $(MYCFLAGS)
|
|
||||||
LDFLAGS= $(SYSLDFLAGS) $(MYLDFLAGS)
|
|
||||||
LIBS= -lm $(SYSLIBS) $(MYLIBS)
|
|
||||||
|
|
||||||
AR= ar rc
|
|
||||||
RANLIB= ranlib
|
|
||||||
RM= rm -f
|
|
||||||
UNAME= uname
|
|
||||||
|
|
||||||
SYSCFLAGS=-nostdlib -ffreestanding -fpic -fno-stack-protector -fno-stack-check -fshort-wchar -mno-red-zone -maccumulate-outgoing-args -I ../../libc/include
|
|
||||||
SYSLDFLAGS=
|
|
||||||
SYSLIBS=
|
|
||||||
|
|
||||||
MYCFLAGS=
|
|
||||||
MYLDFLAGS=
|
|
||||||
MYLIBS=
|
|
||||||
MYOBJS=
|
|
||||||
|
|
||||||
# Special flags for compiler modules; -Os reduces code size.
|
|
||||||
CMCFLAGS=
|
|
||||||
|
|
||||||
# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE =======
|
|
||||||
|
|
||||||
PLATS= guess aix bsd c89 freebsd generic ios linux linux-readline macosx mingw posix solaris
|
|
||||||
|
|
||||||
LUA_A= liblua.a
|
|
||||||
CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o
|
|
||||||
# LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o
|
|
||||||
LIB_O = lbaselib.o
|
|
||||||
BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS)
|
|
||||||
|
|
||||||
LUA_T= lua
|
|
||||||
LUA_O= lua.o
|
|
||||||
|
|
||||||
LUAC_T= luac
|
|
||||||
LUAC_O= luac.o
|
|
||||||
|
|
||||||
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
|
|
||||||
ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
|
|
||||||
ALL_A= $(LUA_A)
|
|
||||||
|
|
||||||
# Targets start here.
|
|
||||||
default: $(PLAT)
|
|
||||||
|
|
||||||
all: $(ALL_T)
|
|
||||||
|
|
||||||
o: $(ALL_O)
|
|
||||||
|
|
||||||
a: $(ALL_A)
|
|
||||||
|
|
||||||
$(LUA_A): $(BASE_O)
|
|
||||||
$(AR) $@ $(BASE_O)
|
|
||||||
$(RANLIB) $@
|
|
||||||
|
|
||||||
$(LUA_T): $(LUA_O) $(LUA_A)
|
|
||||||
$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
|
||||||
|
|
||||||
$(LUAC_T): $(LUAC_O) $(LUA_A)
|
|
||||||
$(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
|
||||||
|
|
||||||
test:
|
|
||||||
./$(LUA_T) -v
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) $(ALL_T) $(ALL_O)
|
|
||||||
|
|
||||||
depend:
|
|
||||||
@$(CC) $(CFLAGS) -MM l*.c
|
|
||||||
|
|
||||||
echo:
|
|
||||||
@echo "PLAT= $(PLAT)"
|
|
||||||
@echo "CC= $(CC)"
|
|
||||||
@echo "CFLAGS= $(CFLAGS)"
|
|
||||||
@echo "LDFLAGS= $(LDFLAGS)"
|
|
||||||
@echo "LIBS= $(LIBS)"
|
|
||||||
@echo "AR= $(AR)"
|
|
||||||
@echo "RANLIB= $(RANLIB)"
|
|
||||||
@echo "RM= $(RM)"
|
|
||||||
@echo "UNAME= $(UNAME)"
|
|
||||||
|
|
||||||
# Convenience targets for popular platforms.
|
|
||||||
ALL= all
|
|
||||||
|
|
||||||
help:
|
|
||||||
@echo "Do 'make PLATFORM' where PLATFORM is one of these:"
|
|
||||||
@echo " $(PLATS)"
|
|
||||||
@echo "See doc/readme.html for complete instructions."
|
|
||||||
|
|
||||||
guess:
|
|
||||||
@echo Guessing `$(UNAME)`
|
|
||||||
@$(MAKE) `$(UNAME)`
|
|
||||||
|
|
||||||
AIX aix:
|
|
||||||
$(MAKE) $(ALL) CC="xlc" CFLAGS="-O2 -DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-ldl" SYSLDFLAGS="-brtl -bexpall"
|
|
||||||
|
|
||||||
bsd:
|
|
||||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" SYSLIBS="-Wl,-E"
|
|
||||||
|
|
||||||
c89:
|
|
||||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_C89" CC="gcc -std=c89"
|
|
||||||
@echo ''
|
|
||||||
@echo '*** C89 does not guarantee 64-bit integers for Lua.'
|
|
||||||
@echo '*** Make sure to compile all external Lua libraries'
|
|
||||||
@echo '*** with LUA_USE_C89 to ensure consistency'
|
|
||||||
@echo ''
|
|
||||||
|
|
||||||
FreeBSD NetBSD OpenBSD freebsd:
|
|
||||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE -I/usr/include/edit" SYSLIBS="-Wl,-E -ledit" CC="cc"
|
|
||||||
|
|
||||||
generic: $(ALL)
|
|
||||||
|
|
||||||
ios:
|
|
||||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_IOS"
|
|
||||||
|
|
||||||
Linux linux: linux-noreadline
|
|
||||||
|
|
||||||
linux-noreadline:
|
|
||||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl"
|
|
||||||
|
|
||||||
linux-readline:
|
|
||||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX -DLUA_USE_READLINE" SYSLIBS="-Wl,-E -ldl -lreadline"
|
|
||||||
|
|
||||||
Darwin macos macosx:
|
|
||||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE" SYSLIBS="-lreadline"
|
|
||||||
|
|
||||||
mingw:
|
|
||||||
$(MAKE) "LUA_A=lua54.dll" "LUA_T=lua.exe" \
|
|
||||||
"AR=$(CC) -shared -o" "RANLIB=strip --strip-unneeded" \
|
|
||||||
"SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s" lua.exe
|
|
||||||
$(MAKE) "LUAC_T=luac.exe" luac.exe
|
|
||||||
|
|
||||||
posix:
|
|
||||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX"
|
|
||||||
|
|
||||||
SunOS solaris:
|
|
||||||
$(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -D_REENTRANT" SYSLIBS="-ldl"
|
|
||||||
|
|
||||||
# Targets that do not create files (not all makes understand .PHONY).
|
|
||||||
.PHONY: all $(PLATS) help test clean default o a depend echo
|
|
||||||
|
|
||||||
# Compiler modules may use special flags.
|
|
||||||
llex.o:
|
|
||||||
$(CC) $(CFLAGS) $(CMCFLAGS) -c llex.c
|
|
||||||
|
|
||||||
lparser.o:
|
|
||||||
$(CC) $(CFLAGS) $(CMCFLAGS) -c lparser.c
|
|
||||||
|
|
||||||
lcode.o:
|
|
||||||
$(CC) $(CFLAGS) $(CMCFLAGS) -c lcode.c
|
|
||||||
|
|
||||||
# DO NOT DELETE
|
|
||||||
|
|
||||||
lapi.o: lapi.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
|
|
||||||
lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lstring.h \
|
|
||||||
ltable.h lundump.h lvm.h
|
|
||||||
lauxlib.o: lauxlib.c lprefix.h lua.h luaconf.h lauxlib.h
|
|
||||||
lbaselib.o: lbaselib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
|
||||||
lcode.o: lcode.c lprefix.h lua.h luaconf.h lcode.h llex.h lobject.h \
|
|
||||||
llimits.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h \
|
|
||||||
ldo.h lgc.h lstring.h ltable.h lvm.h
|
|
||||||
lcorolib.o: lcorolib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
|
||||||
lctype.o: lctype.c lprefix.h lctype.h lua.h luaconf.h llimits.h
|
|
||||||
ldblib.o: ldblib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
|
||||||
ldebug.o: ldebug.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
|
|
||||||
lobject.h ltm.h lzio.h lmem.h lcode.h llex.h lopcodes.h lparser.h \
|
|
||||||
ldebug.h ldo.h lfunc.h lstring.h lgc.h ltable.h lvm.h
|
|
||||||
ldo.o: ldo.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
|
|
||||||
lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h lopcodes.h \
|
|
||||||
lparser.h lstring.h ltable.h lundump.h lvm.h
|
|
||||||
ldump.o: ldump.c lprefix.h lua.h luaconf.h lobject.h llimits.h lstate.h \
|
|
||||||
ltm.h lzio.h lmem.h lundump.h
|
|
||||||
lfunc.o: lfunc.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
|
|
||||||
llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h
|
|
||||||
lgc.o: lgc.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
|
|
||||||
llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lstring.h ltable.h
|
|
||||||
linit.o: linit.c lprefix.h lua.h luaconf.h lualib.h lauxlib.h
|
|
||||||
liolib.o: liolib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
|
||||||
llex.o: llex.c lprefix.h lua.h luaconf.h lctype.h llimits.h ldebug.h \
|
|
||||||
lstate.h lobject.h ltm.h lzio.h lmem.h ldo.h lgc.h llex.h lparser.h \
|
|
||||||
lstring.h ltable.h
|
|
||||||
lmathlib.o: lmathlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
|
||||||
lmem.o: lmem.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
|
|
||||||
llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h
|
|
||||||
loadlib.o: loadlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
|
||||||
lobject.o: lobject.c lprefix.h lua.h luaconf.h lctype.h llimits.h \
|
|
||||||
ldebug.h lstate.h lobject.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h \
|
|
||||||
lvm.h
|
|
||||||
lopcodes.o: lopcodes.c lprefix.h lopcodes.h llimits.h lua.h luaconf.h
|
|
||||||
loslib.o: loslib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
|
||||||
lparser.o: lparser.c lprefix.h lua.h luaconf.h lcode.h llex.h lobject.h \
|
|
||||||
llimits.h lzio.h lmem.h lopcodes.h lparser.h ldebug.h lstate.h ltm.h \
|
|
||||||
ldo.h lfunc.h lstring.h lgc.h ltable.h
|
|
||||||
lstate.o: lstate.c lprefix.h lua.h luaconf.h lapi.h llimits.h lstate.h \
|
|
||||||
lobject.h ltm.h lzio.h lmem.h ldebug.h ldo.h lfunc.h lgc.h llex.h \
|
|
||||||
lstring.h ltable.h
|
|
||||||
lstring.o: lstring.c lprefix.h lua.h luaconf.h ldebug.h lstate.h \
|
|
||||||
lobject.h llimits.h ltm.h lzio.h lmem.h ldo.h lstring.h lgc.h
|
|
||||||
lstrlib.o: lstrlib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
|
||||||
ltable.o: ltable.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
|
|
||||||
llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h
|
|
||||||
ltablib.o: ltablib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
|
||||||
ltm.o: ltm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
|
|
||||||
llimits.h ltm.h lzio.h lmem.h ldo.h lgc.h lstring.h ltable.h lvm.h
|
|
||||||
lua.o: lua.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
|
||||||
luac.o: luac.c lprefix.h lua.h luaconf.h lauxlib.h ldebug.h lstate.h \
|
|
||||||
lobject.h llimits.h ltm.h lzio.h lmem.h lopcodes.h lopnames.h lundump.h
|
|
||||||
lundump.o: lundump.c lprefix.h lua.h luaconf.h ldebug.h lstate.h \
|
|
||||||
lobject.h llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lstring.h lgc.h \
|
|
||||||
lundump.h
|
|
||||||
lutf8lib.o: lutf8lib.c lprefix.h lua.h luaconf.h lauxlib.h lualib.h
|
|
||||||
lvm.o: lvm.c lprefix.h lua.h luaconf.h ldebug.h lstate.h lobject.h \
|
|
||||||
llimits.h ltm.h lzio.h lmem.h ldo.h lfunc.h lgc.h lopcodes.h lstring.h \
|
|
||||||
ltable.h lvm.h ljumptab.h
|
|
||||||
lzio.o: lzio.c lprefix.h lua.h luaconf.h llimits.h lmem.h lstate.h \
|
|
||||||
lobject.h ltm.h lzio.h
|
|
||||||
|
|
||||||
# (end of Makefile)
|
|
||||||
1
lua/version.txt
Normal file
1
lua/version.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
5.4.7
|
||||||
53
visor/Makefile
Normal file
53
visor/Makefile
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
# This build script uses some GNU make specific extensions.
|
||||||
|
|
||||||
|
include ../config.mk
|
||||||
|
|
||||||
|
CFLAGS += -ggdb
|
||||||
|
|
||||||
|
# Kernel sources which are specific to the x86_64 architecture.
|
||||||
|
# Add new source files (C or Assembler) here,
|
||||||
|
# preferentially in alphabetical order.
|
||||||
|
VISOR_SOURCES_x86_64 := \
|
||||||
|
vintel.c \
|
||||||
|
proc.c \
|
||||||
|
# end of x86_64 specific sources list
|
||||||
|
|
||||||
|
# Architecture-agnostic kernel sources.
|
||||||
|
# Add new source files (C or Assembler) here,
|
||||||
|
# preferentially in alphabetical order.
|
||||||
|
VISOR_SOURCES := \
|
||||||
|
alloc.c \
|
||||||
|
efi.c \
|
||||||
|
ssp.c \
|
||||||
|
strlcpy.c \
|
||||||
|
$(VISOR_SOURCES_$(ARCH)) \
|
||||||
|
# end of sources list
|
||||||
|
|
||||||
|
VISOR_OBJECTS := $(VISOR_SOURCES:.c=.o)
|
||||||
|
VISOR_OBJECTS := $(VISOR_OBJECTS:.S=.o)
|
||||||
|
VISOR_DEPFILES := $(VISOR_OBJECTS:.o=.d)
|
||||||
|
VISOR_TARGET := VISOR.EFI
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
|
all: $(VISOR_TARGET)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f $(VISOR_OBJECTS)
|
||||||
|
rm -f $(VISOR_DEPFILES)
|
||||||
|
rm -f visor.so
|
||||||
|
rm -f $(VISOR_TARGET)
|
||||||
|
|
||||||
|
src/%.o: src/%.[cS]
|
||||||
|
@printf "CC %s\n" $@
|
||||||
|
@"$(CC)" $(CFLAGS) -MMD -MP -c -o $@ $< $(CPPFLAGS)
|
||||||
|
|
||||||
|
visor.so: $(VISOR_OBJECTS) ../gnuefi/crt0-efi-$(ARCH).o
|
||||||
|
@printf "LD %s\n" $@
|
||||||
|
@"$(LD)" $(LDFLAGS) -o $@ ../gnuefi/crt0-efi-$(ARCH).o $(VISOR_OBJECTS) $(LIBS)
|
||||||
|
|
||||||
|
$(VISOR_TARGET): visor.so
|
||||||
|
@printf "ELF->PE %s\n" $@
|
||||||
|
@objcopy -j .text -j .sdata -j .data -j .rodata -j .dynamic -j .dynsym -j .rel -j .rela -j .rel.* -j .rela.* -j .reloc --target efi-app-x86_64 --subsystem 10 visor.so $@
|
||||||
|
|
||||||
|
-include $(VISOR_DEPFILES)
|
||||||
Loading…
Add table
Reference in a new issue