Delete all Trailing spaces in code.
[reactos.git] / rosapps / packmgr / lib / script.h
1 ////////////////////////////////////////////////
2 //
3 // package.hpp
4 // Header for the script stuff
5 ////////////////////////////////////////////////
6
7 #include <vector>
8 #include <string>
9
10 using namespace std;
11
12
13 /* Structs */
14
15 typedef struct
16 {
17 string name;
18 int start, end;
19
20 } SUB;
21
22 typedef struct
23 {
24 vector<string> code;
25 vector<SUB> subs;
26
27 } SCRIPT;
28
29
30 /* Prototypes */
31
32 int RPS_Load (SCRIPT** script, const char* path);
33 int RPS_Execute (SCRIPT* script, const char* function);
34 int RPS_getVar (const char* name);
35 void RPS_Clear (SCRIPT* script);
36
37
38 /* Callbacks */
39
40 typedef int (*FUNC_PROC)(int, char**); // function callback
41
42
43 /* Function table */
44
45 typedef struct
46 {
47 char* name;
48 FUNC_PROC function;
49 } FUNC_TABLE;
50
51 // very function is listed in there
52 extern const FUNC_TABLE FuncTable[];
53
54 // count of functions
55 #define FUNC_COUNT 3
56
57
58 /* For the helper-funtions */
59
60 #define STR_NO 0x1;
61 #define STR_ONLY 0x0;
62 #define STR_YES 0x2;
63
64 // ^^ I would write down here that they
65 // mean but I don't know anymore myself :O