Introduce the concept of binding.
commitf5c2ef3cb05c9b2b3f53237b5c6bff72ceaf9cf5
authorRui Guo <firemeteor.guo@gmail.com>
Tue, 2 Jun 2009 09:00:11 +0000 (2 17:00 +0800)
committerRui Guo <firemeteor.guo@gmail.com>
Tue, 2 Jun 2009 09:00:11 +0000 (2 17:00 +0800)
tree200b345fcdddf4aab0277ee6473702c43c4ddcf9
parent21c03f09798991d1e9427ba79b9ce883bfe7c551
Introduce the concept of binding.

Bindings are in fact script interpretors. We can have several different
language bindings at the same time, with each registered at the compiling time
and loaded (initialized) dynamically at runtime. It's an bridge between
scripts and screen itself.

1. Rename the scripts struct to binding. Related functions are renamed too.
For example, LoadScripts() is now LoadBindings(); ScriptFInit() is now
FinalizeBindings().

2. Do not need to initialize the binding explicitly.

3. Reorganize the structure of script.c, grouping binding related stuffs
together.

4. Add myself to the copyright line of script.c.

5. Fully implement the logic of ScriptSource().
src/lua.c
src/screen.c
src/script.c
src/script.h