// <Scol Technologies License>
//
// 'Source code' license (BSD license) :
// Copyright (c) 2003, organization : Scol Technologies Association, owner : Sylvain Huet
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the 
// following conditions are met:
// - Redistributions of source code must retain the above copyright notice, this list of conditions and the following 
// disclaimer. 
// - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following 
// disclaimer in the documentation and/or other materials provided with the distribution. 
// - Neither the name of the 'Scol Technologies Association' nor the names of its contributors may be used to endorse or 
// promote products derived from this software without specific prior written permission. 
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, 
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// 'Scol Technologies' is a trademark. Therefore :
// - The names 'Scol' and 'Scol Technologies' must not be used to endorse or promote products derived from this software 
// without prior written permission. For written permission, please contact Scol Technologies Association 
// (www.scol-technologies.org).
// - Products derived from this software may not be called 'Scol', nor may 'Scol' appear in their name, without prior 
// written permission. For written permission, please contact Scol Technologies Association (www.scol-technologies.org).
//
// 'DMS' is a patented technology.
// - The owner provides unlimited and free rights to implement this patent with the Scol programming language, and to use 
// these implementations.
// - Other kinds of implementation or use of the patent require prior written permission. For written permission, please 
// contact Scol Technologies Association (www.scol-technologies.org).

struct CBmachine
{
int (*MMpush)(mmachine m, int val);
int (*MMpushNoGC)(mmachine m, int val);
int (*MMpull)(mmachine m);
int (*MMgetPP)(mmachine m);
void (*MMsetPP)(mmachine m,int i);
int (*MMget)(mmachine m,int i);
void (*MMset)(mmachine m,int i,int v);
int (*MMgetglobal)(mmachine m,int i);
void (*MMsetglobal)(mmachine m,int i,int v);
int (*MMgetbase)(mmachine m,int b,int i);
void (*MMsetbase)(mmachine m,int b,int i,int v);
int (*MMfetch)(mmachine m,int s,int i);
void (*MMstore)(mmachine m,int s,int i,int v);
int* (*MMstart)(mmachine m,int s);
int (*MMsize)(mmachine m,int s);
int (*MMtype)(mmachine m,int s);
char* (*MMstartstr)(mmachine m,int s);
int (*MMsizestr)(mmachine m,int s);
void (*MMsetsizestr)(mmachine m,int s,int size);
int (*MMmalloc)(mmachine m, int size, int type);
int (*MMmallocCLR)(mmachine m, int size, int type);
int (*Mpushstrbloc)(mmachine m,char *buf);
int (*MBdeftab)(mmachine m);
int (*MBstrcat)(mmachine m);
int (*PKhardpak)(mmachine m, char *name,
              int n, char **namefun, int (**fun)(mmachine z)
              , int *nargfun, char **typfun);
int (*PKloader)(mmachine m,char *name,char *simplename);
int (*SPfindfile)(packdir p,char *sign,int *size,char *path);
int (*SPaddfile)(packdir p,char *sign,int size,char *path);
int (*SCgetsrvsocket)(mmachine m, int server);
int (*SCgetsocket)(mmachine m, int channel);
int (*Mcutting)(char *comm, char **argv);
void (*MMechostr)(int i,char *buf,...);
size_t (*fread)(void* buf,size_t i,size_t j,FILE *f);
packdir Firstpack;
int (*OBJcreate)(mmachine m,int typ,int handsys,int typpere,int handsyspere);
int (*OBJaddreflex)(mmachine m,int typ, int num);
int (*OBJbeginreflex)(mmachine m,int typ,int handsys,int num);
int (*OBJdel)(mmachine m,int p,int flag);
int (*OBJdestroy)(mmachine m, int typ,int handsys,int objm,int flag);
int (*OBJdelTH)(mmachine m,int typ,int handsys);
int (*OBJcallreflex)(mmachine m,int nbarg);
int (*OBJregister)(int nbrefl,int recrefl,int (*destroy)(mmachine m,int handsys,int objm),char *name);
int (*OBJtypebyname)(char *name);
int (*OBJdefEvent)(int event,int (*cbevent)(mmachine m,int hwnd, unsigned msg,
				int wParam,int lParam,int *ret));
int (*OBJgetUserEvent)();
void* (*SCgetExtra)(char *funcname);
char* (*stdloadJpg)(char *name,int *w,int *h);
int (*OBJdelTM)(mmachine m,int typ,int q);
};
typedef struct CBmachine *cbmachine;


