--- deliantra/server/include/cfperl.h 2007/01/07 02:39:14 1.47 +++ deliantra/server/include/cfperl.h 2007/02/13 16:23:31 1.55 @@ -62,6 +62,8 @@ void cfperl_init (); void cfperl_main (); +void cfperl_emergency_save (); +void cfperl_cleanup (int make_core); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -131,8 +133,8 @@ MTH static void check_mortals (); enum { - F_DESTROYED = 0x01, - F_BORROWED = 0x02, + F_DESTROYED = 0x01, + F_DEBUG_TRACE = 0x02, }; // object is delete'd after the refcount reaches 0 @@ -142,6 +144,7 @@ MTH void refcnt_inc () const { ++refcnt; } MTH void refcnt_dec () const { --refcnt; } + MTH int refcnt_cnt () const; // check wether the object has died and destroy MTH void refcnt_chk () { if (refcnt <= 0) do_check (); } @@ -165,7 +168,8 @@ AV *cb; // CF+ callbacks shstr attach; // generic extension attachment information - void optimise (); // possibly save some memory by destroying unneeded data + void sever_self (); // sever this object from its self, if it has one. + void optimise (); // possibly save some memory by destroying unneeded data attachable () : flags (0), refcnt (0), self (0), cb (0), attach (0) @@ -182,7 +186,7 @@ attachable &operator =(const attachable &src); bool invoke (event_type event, ...); - void instantiate (); + MTH void instantiate (); void reattach (); protected: @@ -340,6 +344,7 @@ { SV *text; // text part AV *av; // perl part + int linenum; char *line; // current beginning of line char *last_keyword, *last_value; const char *name; @@ -377,8 +382,11 @@ void get (uint32 &i) { i = get_sint64 (); } void get (sint64 &i) { i = get_sint64 (); } + + bool parse_error (keyword kw, const char *type = 0, const char *name = 0, bool skip = true); }; +//TODO: remove char *fgets (char *s, int n, object_thawer &thawer); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////