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
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
69
  
/* 
|| This file is part of Pike. For copyright information see COPYRIGHT. 
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING 
|| for more information. 
*/ 
 
/* 
 * Pike embedding API. 
 * 
 */ 
 
#ifndef PIKE_EMBED_H 
#define PIKE_EMBED_H 
 
#include "global.h" 
#include "callback.h" 
 
PMOD_EXPORT extern int d_flag, a_flag, l_flag, c_flag, p_flag; 
PMOD_EXPORT extern int debug_options, runtime_options; 
PMOD_EXPORT extern int default_t_flag; 
#if defined(YYDEBUG) || defined(PIKE_DEBUG) 
extern int yydebug; 
#endif /* YYDEBUG || PIKE_DEBUG */ 
 
/* Debug options */ 
#define DEBUG_SIGNALS         0x0001 
#define NO_TAILRECURSION      0x0002 
#define NO_PEEP_OPTIMIZING    0x0004 
#define GC_RESET_DMALLOC      0x0008 
#define ERRORCHECK_MUTEXES    0x0010 
#define WINDOWS_ERROR_DIALOGS 0x0020 
 
int set_pike_debug_options(int bits, int mask); 
 
/* Runtime options */ 
#define RUNTIME_CHECK_TYPES   1 
#define RUNTIME_STRICT_TYPES  2 
 
int set_pike_runtime_options(int bits, int mask); 
 
extern const char *master_file; 
extern char **ARGV; 
 
void init_pike(char **argv, const char *file); 
void pike_set_default_master(void); 
void pike_set_master_file(const char *file); 
void init_pike_runtime(void (*exit_cb)(int)); 
void set_pike_evaluator_limit(unsigned long num_instrs); 
PMOD_EXPORT struct callback *add_post_master_callback(callback_func call, 
                                                      void *arg, 
                                                      callback_func free_func); 
struct object *load_pike_master(void); 
#ifdef PROFILING 
#ifdef PIKE_DEBUG 
void gdb_break_on_pike_stack_record(long stack_size); 
#endif 
extern long record; 
#endif 
void pike_enable_stack_profiling(void); 
PMOD_EXPORT struct callback *add_exit_callback(callback_func call, 
                                               void *arg, 
                                               callback_func free_func); 
void pike_do_exit(int num); 
 
void pike_push_argv(int argc, char **argv); 
 
#endif /* PIKE_EMBED_H */