46 lines
1.3 KiB
C++
46 lines
1.3 KiB
C++
////////////////////////////////////////////////////////////
|
|
//
|
|
//
|
|
// The source database is a lua table that maps filenames
|
|
// to file info. The source database is stored in the registry.
|
|
//
|
|
// In the source database, the keys are filenames, and the values
|
|
// are tables containing the following fields:
|
|
//
|
|
// name: filename as a string
|
|
// fingerprint: file modification, file length, as a string
|
|
// code: the entire contents of the source file as a string
|
|
// loadresult: a lua closure, or, an error message
|
|
// sequence: the position of the file in control.lst
|
|
//
|
|
//
|
|
////////////////////////////////////////////////////////////
|
|
|
|
|
|
#ifndef SOURCE_HPP
|
|
#define SOURCE_HPP
|
|
|
|
#include "luastack.hpp"
|
|
|
|
// Get a class from the class database.
|
|
int source_class(lua_State *L);
|
|
|
|
// Update the source database from disk. No parameters, no return values.
|
|
int source_update(lua_State *L);
|
|
|
|
// Load the builtins into the global environment using lua_openlibs
|
|
int source_load_builtins(lua_State *L);
|
|
|
|
// Back up the pristine global environment to the registry.
|
|
int source_snapshot_builtins(lua_State *L);
|
|
|
|
// Rebuild the class database from the source database. No parameters, no return values.
|
|
int source_rebuild(lua_State *L);
|
|
|
|
// Run all 'autoinit' functions.
|
|
int source_autoinit(lua_State *L);
|
|
|
|
#endif // SOURCE_HPP
|
|
|
|
|