aboutsummaryrefslogtreecommitdiffstats
path: root/execute.h
diff options
context:
space:
mode:
authornop <nop>1997-03-03 04:18:21 +0000
committernop <nop>1997-03-03 04:18:21 +0000
commit9cf5366eb0435a19fbc233d53765bb9aeae85be2 (patch)
tree2604ca1ea3ddf09fec07c7c26cea22637c23b5fa /execute.h
parenta515162931c35db517995e3427cb41cee2a63a0a (diff)
downloadmoo-cvs-9cf5366eb0435a19fbc233d53765bb9aeae85be2.tar.gz
moo-cvs-9cf5366eb0435a19fbc233d53765bb9aeae85be2.tar.xz
moo-cvs-9cf5366eb0435a19fbc233d53765bb9aeae85be2.zip
GNU Indent normalization
Diffstat (limited to 'execute.h')
-rw-r--r--execute.h157
1 files changed, 81 insertions, 76 deletions
diff --git a/execute.h b/execute.h
index eb721d0..c9f51a7 100644
--- a/execute.h
+++ b/execute.h
@@ -26,49 +26,51 @@
#include "structures.h"
typedef struct {
- Program *prog;
- Var *rt_env; /* same length as prog.var_names */
- Var *base_rt_stack;
- Var *top_rt_stack; /* the stack has a fixed size equal to prog.num_var_names;
- top_rt_stack always points to next empty slot;
- there is no need to check bounds! */
- unsigned pc;
- unsigned error_pc;
- Byte bi_func_pc; /* next == 0 means a normal activation, which just
- returns to the previous activation (caller verb).
- next == 1, 2, 3, ... means the returned value should be
- fed to the bi_func (as specified in bi_func_id)
- together with the next code. */
- Byte bi_func_id;
- void *bi_func_data;
- Var temp; /* VM's temp register */
-
- /* verb information */
- Objid this;
- Objid player;
- Objid progr;
- Objid vloc;
- const char *verb;
- const char *verbname;
- int debug;
+ Program *prog;
+ Var *rt_env; /* same length as prog.var_names */
+ Var *base_rt_stack;
+ Var *top_rt_stack; /* the stack has a fixed size equal to prog.num_var_names;
+ top_rt_stack always points to next empty slot;
+ there is no need to check bounds! */
+ unsigned pc;
+ unsigned error_pc;
+ Byte bi_func_pc; /* next == 0 means a normal activation, which just
+ returns to the previous activation (caller verb).
+ next == 1, 2, 3, ... means the returned value should be
+ fed to the bi_func (as specified in bi_func_id)
+ together with the next code. */
+ Byte bi_func_id;
+ void *bi_func_data;
+ Var temp; /* VM's temp register */
+
+ /* verb information */
+ Objid this;
+ Objid player;
+ Objid progr;
+ Objid vloc;
+ const char *verb;
+ const char *verbname;
+ int debug;
} activation;
-extern void free_activation(activation a, char data_too);
+extern void free_activation(activation a, char data_too);
typedef struct {
- int task_id;
- activation *activ_stack;
- unsigned max_stack_size;
- unsigned top_activ_stack;
- int root_activ_vector;
- /* root_activ_vector == MAIN_VECTOR
- means root activation is main_vector */
- unsigned func_id;
+ int task_id;
+ activation *activ_stack;
+ unsigned max_stack_size;
+ unsigned top_activ_stack;
+ int root_activ_vector;
+ /* root_activ_vector == MAIN_VECTOR
+ means root activation is main_vector */
+ unsigned func_id;
} vmstruct;
-typedef vmstruct *vm;
+typedef vmstruct *vm;
-typedef enum { TASK_INPUT, TASK_FORKED, TASK_SUSPENDED } task_kind;
+typedef enum {
+ TASK_INPUT, TASK_FORKED, TASK_SUSPENDED
+} task_kind;
#define alloc_data(size) mymalloc(size, M_BI_FUNC_DATA)
#define free_data(ptr) myfree((void *) ptr, M_BI_FUNC_DATA)
@@ -78,7 +80,7 @@ typedef enum { TASK_INPUT, TASK_FORKED, TASK_SUSPENDED } task_kind;
extern enum error call_verb(Objid obj, const char *vname, Var args,
int do_pass);
-extern int setup_activ_for_eval(Program *prog);
+extern int setup_activ_for_eval(Program * prog);
enum outcome {
OUTCOME_DONE, /* Task ran successfully to completion */
@@ -86,49 +88,52 @@ enum outcome {
* by an uncaught error. */
OUTCOME_BLOCKED /* Task called a blocking built-in function. */
};
-
-extern enum outcome do_forked_task(Program *prog, Var *rt_env,
- activation a, int f_id, Var *result);
-extern enum outcome do_input_task(Objid user, Parsed_Command *pc,
- Objid this, db_verb_handle vh);
-extern enum outcome do_server_verb_task(Objid this, const char *verb,
- Var args, db_verb_handle h,
- Objid player, const char *argstr,
- Var *result, int do_db_tracebacks);
-extern enum outcome do_server_program_task(Objid this, const char *verb,
- Var args, Objid vloc,
- const char *verbname,
- Program *program, Objid progr,
- int debug, Objid player,
- const char *argstr,
- Var *result,
- int do_db_tracebacks);
-extern enum outcome resume_from_previous_vm(vm the_vm, Var value,
- task_kind tk, Var *result);
-
-extern int task_timed_out;
-extern void abort_running_task(void);
-extern void print_error_backtrace(const char *, void (*)(const char *));
-extern void output_to_log(const char *);
-extern Objid caller();
-
-extern void write_activ_as_pi(activation);
-extern int read_activ_as_pi(activation *);
-void write_rt_env(const char **var_names, Var *rt_env,
- unsigned size);
-int read_rt_env(const char ***old_names, Var **rt_env,
- int *old_size);
-Var *reorder_rt_env(Var *old_rt_env, const char **old_names,
- int old_size, Program *prog);
-extern void write_activ(activation a);
-extern int read_activ(activation *a, int which_vector);
-
+
+extern enum outcome do_forked_task(Program * prog, Var * rt_env,
+ activation a, int f_id, Var * result);
+extern enum outcome do_input_task(Objid user, Parsed_Command * pc,
+ Objid this, db_verb_handle vh);
+extern enum outcome do_server_verb_task(Objid this, const char *verb,
+ Var args, db_verb_handle h,
+ Objid player, const char *argstr,
+ Var * result, int do_db_tracebacks);
+extern enum outcome do_server_program_task(Objid this, const char *verb,
+ Var args, Objid vloc,
+ const char *verbname,
+ Program * program, Objid progr,
+ int debug, Objid player,
+ const char *argstr,
+ Var * result,
+ int do_db_tracebacks);
+extern enum outcome resume_from_previous_vm(vm the_vm, Var value,
+ task_kind tk, Var * result);
+
+extern int task_timed_out;
+extern void abort_running_task(void);
+extern void print_error_backtrace(const char *, void (*)(const char *));
+extern void output_to_log(const char *);
+extern Objid caller();
+
+extern void write_activ_as_pi(activation);
+extern int read_activ_as_pi(activation *);
+void write_rt_env(const char **var_names, Var * rt_env,
+ unsigned size);
+int read_rt_env(const char ***old_names, Var ** rt_env,
+ int *old_size);
+Var *reorder_rt_env(Var * old_rt_env, const char **old_names,
+ int old_size, Program * prog);
+extern void write_activ(activation a);
+extern int read_activ(activation * a, int which_vector);
+
#endif
/* $Log$
-/* Revision 1.1 1997/03/03 03:45:03 nop
-/* Initial revision
+/* Revision 1.2 1997/03/03 04:18:40 nop
+/* GNU Indent normalization
/*
+ * Revision 1.1.1.1 1997/03/03 03:45:03 nop
+ * LambdaMOO 1.8.0p5
+ *
* Revision 2.5 1996/03/10 01:20:08 pavel
* Added new `caller()' entry point, for use by built-in fns. Release 1.8.0.
*