File: context.h

package info (click to toggle)
bam 0.2.0-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 988 kB
  • ctags: 2,368
  • sloc: ansic: 15,322; python: 338; makefile: 42; cpp: 23; sh: 7
file content (39 lines) | stat: -rw-r--r-- 908 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <time.h>

/* target management */
struct TARGET
{
	struct NODE *node;
	struct TARGET *next;
};

struct CONTEXT
{
	lua_State *lua;
	const char *filename;
	const char *filename_short;
	char script_directory[512];
	
	struct HEAP *heap;
	struct GRAPH *graph;

	struct TARGET *firsttarget;
	struct NODE *defaulttarget;
	
	time_t globaltimestamp;
	
	volatile int current_cmd_num;
	int num_commands;
};

const char *context_get_path(lua_State *L);
struct CONTEXT *context_get_pointer(lua_State *L);
int context_add_target(struct CONTEXT *context, struct NODE *node);
int context_default_target(struct CONTEXT *context, struct NODE *node);
	
extern const char *CONTEXT_LUA_SCRIPTARGS_TABLE;
extern const char *CONTEXT_LUA_TARGETS_TABLE;
extern const char *CONTEXT_LUA_CLONE_TABLE;
extern const char *CONTEXT_LUA_CONTEXT_POINTER;
extern const char *CONTEXT_LUA_PATH;
extern const char *CONTEXT_LUA_WORKPATH;