📄 mal.c
字号:
#line 211 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/mal/mal.mx"#include <mal_config.h>#include <mal.h>char monet_cwd[PATHLENGTH] = { 0 };int monet_welcome = 1;str *monet_script;int monet_daemon=0;#line 219 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/mal/mal.mx"#line 292 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/mal/mal.mx"#include "mal_config.h"#include "mal_linker.h"#include "mal_session.h"#include "mal_parser.h"#include "mal_interpreter.h"#include "mal_namespace.h" /* for initNamespace() */#include "mal_client.h"#include "mal_sabaoth.h"MT_Lock mal_contextLock;#line 309 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/mal/mal.mx"staticvoid tstAligned(void){ int allAligned=0; ValRecord v; ptr val, base; base = (ptr) & v.val.ival; val= (ptr) & v.val.bval; if(val != base){ allAligned = -1; } val= (ptr) & v.val.cval[0]; if(val != base){ allAligned = -1; } val= (ptr) & v.val.shval; if(val != base){ allAligned = -1; } val= (ptr) & v.val.br.id; if(val != base){ allAligned = -1; } val= (ptr) & v.val.ival; if(val != base){ allAligned = -1; } val= (ptr) & v.val.oval; if(val != base){ allAligned = -1; } val= (ptr) & v.val.pval; if(val != base){ allAligned = -1; } val= (ptr) & v.val.fval; if(val != base){ allAligned = -1; } val= (ptr) & v.val.dval; if(val != base){ allAligned = -1; } val= (ptr) & v.val.lval; if(val != base){ allAligned = -1; } val= (ptr) & v.val.sval; if(val != base){ allAligned = -1; }#ifdef STRUCT_ALIGNED if(allAligned<0) GDKfatal("Recompile with STRUCT_ALIGNED flag disabled\n");#else if(allAligned==0) GDKfatal("Recompile with STRUCT_ALIGNED flag enabled\n");#endif}int mal_init(){ MT_lock_init( &mal_contextLock); tstAligned(); initNamespace(); initParser(); if( malBootstrap() == 0) { showErrors(); return -1; } return 0;}#line 353 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/mal/mal.mx"void mal_exit(void){ Client cntxt = mal_clients; int t = 0; str err;#ifdef MALprofiler stream *f; f= open_wastream("/tmp/Monet.prof"); if( f != NULL){ profileReport( cntxt->nspace,1, f); close_stream(f); }#endif#if 0 /* skip this to solve random crashes, needs work */ freeBoxes(); freeModuleList(cntxt->nspace); mal_scope = 0; unloadLibraries(); finishNamespace(); if( cntxt->cwd) GDKfree(cntxt->cwd); if( cntxt->prompt) GDKfree(cntxt->prompt); if( cntxt->errbuf) GDKfree(cntxt->errbuf); if( cntxt->bak) GDKfree(cntxt->bak); if( cntxt->fdin){ /* missing protection against closing stdin stream */ (void) stream_close(cntxt->fdin->s); (void) stream_destroy(cntxt->fdin->s); (void) bstream_destroy(cntxt->fdin); } if( cntxt->fdout && cntxt->fdout != GDKstdout) { (void) stream_close(cntxt->fdout); (void) stream_destroy(cntxt->fdout); }#endif /* deregister everything that was registered, ignore errors */ if ((err = SABAOTHwildRetreat(&t)) != MAL_SUCCEED) { fprintf(stderr, "!%s", err); GDKfree(err); } /* the server will now be shut down */ if ((err = SABAOTHregisterStop(&t)) != MAL_SUCCEED) { fprintf(stderr, "!%s", err); GDKfree(err); }/* GDKexit(0); */ MT_global_exit(0);}#line 409 "/export/scratch0/monet/monet.GNU.64.64.d.14791/MonetDB5/src/mal/mal.mx"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -