diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2011-03-24 13:57:13 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2011-03-24 13:57:13 -0700 |
commit | a2306446c86b3333e69b082e41ae76ba71a42d9d (patch) | |
tree | ac032fc4566d2ae3091a0dc95329ac86d50b9a23 /src/common/core.h | |
parent | b6fa80d4c17994771cb796317c52cb8fb7a38a16 (diff) | |
download | tmwa-a2306446c86b3333e69b082e41ae76ba71a42d9d.tar.gz tmwa-a2306446c86b3333e69b082e41ae76ba71a42d9d.tar.bz2 tmwa-a2306446c86b3333e69b082e41ae76ba71a42d9d.tar.xz tmwa-a2306446c86b3333e69b082e41ae76ba71a42d9d.zip |
Optimize common objects, and adjust other objects accordingly.
Major changes still need to be made to each of the servers.
Diffstat (limited to 'src/common/core.h')
-rw-r--r-- | src/common/core.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/common/core.h b/src/common/core.h index 90d8303..6722ca2 100644 --- a/src/common/core.h +++ b/src/common/core.h @@ -1,12 +1,19 @@ -// original : core.h 2003/03/14 11:55:25 Rev 1.4 +#ifndef CORE_H +#define CORE_H +#include <stdbool.h> +/// core.c contains a server-independent main() function +/// and then runs a do_sendrecv loop -#ifndef _CORE_H_ -#define _CORE_H_ +/// When this is cleared, the server exits gracefully +/// only used by map server's GM command: @mapexit +extern bool runflag; -extern int runflag; +/// This is an external function defined by each server +/// This function must register stuff for the parse loop +extern int do_init (int, char **); -int do_init (int, char **); +/// Cleanup function called whenever a signal kills us +/// NOT currently called when exit() is called +extern void term_func (void); -void set_termfunc (void (*termfunc) (void)); - -#endif // _CORE_H_ +#endif // CORE_H |