From ee348973b0cb0f6481e4fd6e7494c63167c9759c Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Wed, 7 Apr 2010 11:37:21 +0200 Subject: More work on manager --- src/library/gm/call.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/library/gm/call.c (limited to 'src/library/gm/call.c') diff --git a/src/library/gm/call.c b/src/library/gm/call.c new file mode 100644 index 0000000..553fbaf --- /dev/null +++ b/src/library/gm/call.c @@ -0,0 +1,34 @@ +#include +#include +#include +#include +#include + +int c_handleCheck(_CHP, int method) { + struct user_sendrequest sr; + sr.func = M_HANDLECHECK_BIVV; + sr.a = method; + _CHC; + if (sr.errcode) return 0; + return sr.answeri; +} + +int c_handleCheckA(_CHP, int* methods, int number) { + struct user_sendrequest sr; + sr.func = M_HANDLECHECK_BMIV; + void* ptr = shm_allocNew(sizeof(int) * number); + memcpy(ptr, methods, sizeof(int) * number); + sr.a = (uint32_t)methods; + sr.b = number; + _CHC; + shm_freeDel(ptr); + if (sr.errcode) return 0; + return sr.answeri; +} + +int c_nothing(_CHP) { + struct user_sendrequest sr; + sr.func = M_NOTHING_VVVV; + _CHC; + return sr.errcode; +} -- cgit v1.2.3