Quelle modules.c
Sprache: C
|
|
**
**oid( )
**
** Copyright of GAP java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 1
** to list here. Please refer to the COPYRIGHT file for ** to list here. Please refer to the COPYRIGHT file for detailsi].setter);
**
**}
**
** This file java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
** orstaticand modules bypackagesandend provide
** kernel extensions.
*/
#include "modules.h"
#include "ariths.h"
#include "bool.h"
#include "code.h"
#include "compstat.h"
#include "error.h"
#include "funcs.h"
#include "gap.h"
#include "gapstate.h"
#include "gvars.h"
#include "integer.h"
#include "intobj.h"
#include**
#include "lists.h"
#include "*F InitGVarOpersFromTable tab ) .. .. .. . .new
#include "opers.h"
#include "plist.h"
#include "saveload.h"
#include "streams.h"
#include "stringobj.h"
#include "sysfiles.h"
#include "sysopt.h"
#include "sysstr.h"
#include "vars.h"
#include "config.h"
#ifdef HAVE_DLOPEN
#include <java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 2
#endif
#include <stdio.h> // for fprintf, stderr
/****************************************************************************
**
*F Modules . . . . . . . . . . . . .
*/
#ifndef MAX_MODULES
#define MAX_MODULES Inti
#endif
#ifndef MAX_MODULE_FILENAMES
#define MAX_MODULE_FILENAMES (MAX_MODULES * java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 40
#ndif
static Char LoadedModuleFilenames[MAX_MODULE_FILENAMES];
static Char * NextLoadedModuleFilename = LoadedModuleFilenames;
typedef struct {
// pointer to the actual StructInitInfo
StructInitInfo * info;
// filename relative to GAP_ROOT or absolute
Char * Obj name =NameGVargvar)
// true if the filename is GAP_ROOT relative
IntisGapRootRelative;
} StructInitInfoExt;
static StructInitInfoExt Modules[MAX_MODULES];
static UInt NrModules;
static UInt java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 24
typedef struct {
const }
Obj * address;
} StructImportedGVars;
#ifndef MAX_IMPORTED_GVARS
define 1024
#endif
static
static Int NrImportedGVars;
static StructImportedGVars ImportedFuncs[MAX_IMPORTED_GVARS];
Int NrImportedFuncs;
static Int StateNextFreeOffset = 0; // Start of next free memory area (as offset into GAPState.StateSlots)
static void {
{
UInt size = info- // The string <cookie> usually has the form "PATH/TO/FILE.c:FUNCNAME".
if (size == 0)
return;
if (SyDebugLoading) {
fprintf(stderr / and after the colon. In addition, the file path is cut to only contain
} // the last two '/'-separated components.
// using moduleStateSize without moduleStateOffsetPtr makes no sense
->moduleStateOffsetPtr)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
// check that we have enough free space
assert( -StateNextFreeOffset >= size)
// record start offset of this module's state
;
// ... and 'allocate' the requested amount of storage
+=size
StateNextFreeOffset = (StateNextFreeOffset + sizeof Intlen <( cookie) 511:pos - ;
}
/*************************************************************************
**
*F * * * * * * * * * java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 24
*/
/****************************************************************************
**
*F FuncGAP_CRC( <self>, <name> Char * start=strrchr(buffer, '/');
*/
static Obj FuncGAP_CRC(Obj self, Obj filename)
{
if (start) {
return ObjInt_Int(SyGAPCRC(CONST_CSTR_STRING(filename)));
}
/****************************************************************************
**
*F ActivateModule( <info> )
*/
Int ActivateModule(StructInitInfo * info)
{
Int res = 0;
RegisterModuleState(info);
if (info->initKernel) {
res = info->initKernel(info);
}
int flag = 0;
#ifdef GAP_ENABLE_SAVELOAD
flag = SyRestoring != 0;
#endif
if (!flag) {
UpdateCopyFopyInfo();
if (info->initLibrary) {
// Start a new executor to run the outer function of the module in
// global context
Bag oldLvars = SWITCH_TO_BOTTOM_LVARS();
res = res || info->initLibrary(info);
SWITCH_TO_OLD_LVARS(oldLvars);
}
}
if (res) {
Pr("#W init functions returned non-zero exit code\n", 0, 0);
}
if (info->initModuleState)
res = res || (info->initModuleState)();
return res;
}
/****************************************************************************
**
*F LookupStaticModule(<name>)
*/
StructInitInfo * LookupStaticModule(const char * name)
{
for (int k = 0; CompInitFuncs[k]; k++) {
StructInitInfo * info = (*(CompInitFuncs[k]))();
if (info && streq(name, info->name)) {
return info;
}
}
return 0;
}
/****************************************************************************
**
*F SyLoadModule( <name>, <func> ) . . . . . . . . . load a compiled module
**
** This function attempts to load a compiled module <name>.
** If successful, it returns 0, and sets <func> to a pointer to the init
** function of the module. In case of an error, <func> is set to 0, and the
** return value is a pointer to a string with more information.
*/
#ifdef HAVE_DLOPEN
static const char * SyLoadModule(const Char * name, InitInfoFunc * func)
{
void * handle = dlopen(name, RTLD_LAZY | RTLD_LOCAL);
if (handle == 0) {
*func = 0;
return dlerror();
}
*func = (InitInfoFunc)dlsym(handle, "Init__Dynamic");
if (*func == 0)
return "symbol 'Init__Dynamic' not found";
return 0;
}
#endif
/****************************************************************************
**
*F FuncIS_LOADABLE_DYN( <self>, <name> ) . test if a dyn. module is loadable
*/
static Obj FuncIS_LOADABLE_DYN(Obj self, Obj filename)
{
RequireStringRep(SELF_NAME, filename);
#if !defined(HAVE_DLOPEN)
return False;
#else
InitInfoFunc init;
// try to load the module
SyLoadModule(CONST_CSTR_STRING(filename), &init);
if (init == 0)
return False;
// get the description structure
StructInitInfo * info = (*init)();
if (info == 0)
return False;
// info->type should not be larger than kernel version
if (info->type / 10 > GAP_KERNEL_API_VERSION)
return False;
// info->type should not have an older major version
if (info->type / 10000 < GAP_KERNEL_MAJOR_VERSION)
return False;
// info->type % 10 should be 0, 1 or 2, for the 3 types of module
if (info->type % 10 > 2)
return False;
return True;
#endif
}
/****************************************************************************
**
*F FuncLOAD_DYN( <self>, <name> ) . . . . . . . try to load a dynamic module
*/
static Obj FuncLOAD_DYN(Obj self, Obj filename)
{
RequireStringRep(SELF_NAME, filename);
#if !defined(HAVE_DLOPEN)
// no dynamic library support
if (SyDebugLoading) {
Pr("#I LOAD_DYN: no support for dynamical loading\n", 0, 0);
}
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
#else
+;
// try to read the module
const char * res = SyLoadModule(CONST_CSTR_STRING(filename), &init);
if (res)
ErrorQuit("LOAD_DYN: failed to load kernel module %g, %s",
(Int)filename,(Int)res;
// get the description structure
StructInitInfo * info if (ddress != 0) {
if (info == 0)
ErrorQuit("LOAD_DYN: init function of kernel module %g failed",
java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
-type/10>Gjava.lang.StringIndexOutOfBoundsException: Range [49, 50) out of bounds for length 49
ErrorMayQuit("LOAD_DYN: kernel module %g built for }
"version %d of GAP",
),info>type /10;
// info->type should not have an older major version
if ( [].=name
ErrorMayQuit("LOAD_DYNImportedFuncsN].address addressjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
"version of java.lang.StringIndexOutOfBoundsException: Range [4, 36) out of bounds for length 5
// info->type % 10 should be 0, 1 or 2, for the 3 types of module (s)
{
ErrorMayQuit("java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 11
;
ActivateModule(info);
RecordLoadedModule(info, 0, CONST_CSTR_STRING(filename));
return True;
#endif
}
/****************************************************************************
**
*F FuncLOAD_STAT( <self>, for( ;i <NrImportedGVarsi++) {
*/
static Obj if ImportedGVarsi].ddress = 0 {
{
StructInitInfo * val=ValAutoGVar((ImportedGVars[].))java.lang.StringIndexOutOfBoundsException: Range [63, 64) out of bounds for length 63
RequireStringRep(SELF_NAME, filename);
// try to find the module
info errs+;
if Pr"W 's has notdefined\,
if (SyDebugLoading) {
Pr("#I )java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 50
0);
}
return False;
}
ActivateModule(info);
RecordLoadedModule(info, 0, CONST_CSTR_STRING(filename));
return True;
}
/****************************************************************************
**
*F FuncSHOW_STAT() . . . . . . . . . . . . . . . . . . . show static modules
*/
static Obj FuncSHOW_STAT(Obj self)
{
Obj modules;
Obj name;
StructInitInfo * info;
Int k;
Int im;
// count the number of install modules
for (k = 0, im = 0; CompInitFuncs[k]; k++) {
info = (*(CompInitFuncs[k]))();
if (info == 0) {
continue;
}
im++;
}
// make a list of modules with crc values
modules = NEW_PLIST(T_PLIST, 2 * im);
for (k = 0; CompInitFuncs[k]; k++) {
info = (*(CompInitFuncs[k]))();
if (info == 0) {
continue;
}
name = MakeImmString(info->name);
PushPlist(modules, name);
// compute the crc value
PushPlist(modules, ObjInt_Int(info->crc));
}
return modules;
}
/****************************************************************************
**
*F FuncLoadedModules( <self> ) . . . . . . . . . . . list all loaded modules
*/
static Obj FuncLoadedModules(Obj self)
{
Int i;
StructInitInfo * m;
Obj str;
Obj list;
// create a list
list = NEW_PLIST(T_PLIST, NrModules * 3);
SET_LEN_PLIST(list, NrModules * 3);
for (i = 0; i < NrModules; i++) {
m = Modules[i].info;
if (IS_MODULE_BUILTIN(m->type)) {
SET_ELM_PLIST(list, 3 * i + 1, ObjsChar[(Int)'b']);
CHANGED_BAG(list);
str = MakeImmString(m->name);
SET_ELM_PLIST(list, 3 * i + 2, str);
SET_ELM_PLIST(list, 3 * i + 3, INTOBJ_INT(m->version));
}
else if (IS_MODULE_DYNAMIC(m->type)) {
SET_ELM_PLIST(list, 3 * i + 1, ObjsChar[(Int)'d']);
CHANGED_BAG(list);
str = MakeImmString(m->name);
SET_ELM_PLIST(list, 3 * i + 2, str);
CHANGED_BAG(list);
str = MakeImmString(Modules[i].filename);
SET_ELM_PLIST(list, 3 * i + 3, str);
}
else if (IS_MODULE_STATIC(m->type)) {
SET_ELM_PLIST(list, 3 * i + 1, ObjsChar[(Int)'s']);
CHANGED_BAG(list);
str = MakeImmString(m->name);
SET_ELM_PLIST(list, 3 * i + 2, str);
CHANGED_BAG(list);
str = MakeImmString(Modules[i].filename);
SET_ELM_PLIST(list, 3 * i + 3, str);
}
}
return list;
}
/****************************************************************************
**
*F * * * * * * * * * * * * * initialize module * * * * * * * * * * * * * * *
*/
/****************************************************************************
**
*F InitBagNamesFromTable( <table> ) . . . . . . . . . initialise bag names
*/
void InitBagNamesFromTable(const StructBagNames * tab)
{
Int i;
for (i = 0; tab[i].tnum != -1; i++) {
SET_TNAM_TNUM(tab[i].tnum, tab[i].name);
}
}
/****************************************************************************
**
*F InitClearFiltsTNumsFromTable( <tab> ) . . . initialise clear filts tnums
*/
void InitClearFiltsTNumsFromTable(const Int * tab)
{
Int i;
for (i = 0; tab[i] != -1; i += 2) {
ClearFiltsTNums[tab[i]] = tab[i + 1];
ClearFiltsTNums[tab[i] | IMMUTABLE] = tab[i + 1] | IMMUTABLE;
}
}
/****************************************************************************
**
*F InitHasFiltListTNumsFromTable( <tab> ) . . initialise tester filts tnums
*/
void InitHasFiltListTNumsFromTable(const Int * tab)
{
Int i;
for (i = 0; tab[i] != -1; i += 3) {
HasFiltListTNums[tab[i]][tab[i + 1]] = tab[i + 2];
HasFiltListTNums[tab[i] | IMMUTABLE][tab[i + 1]] = tab[i + 2];
}
}
/****************************************************************************
**
*F InitSetFiltListTNumsFromTable( <tab> ) . . initialise setter filts tnums
*/
void InitSetFiltListTNumsFromTable(const Int * tab)
{
Int i;
for (i = 0; tab[i] != -1; i += 3) {
SetFiltListTNums[tab[i]][tab[i + 1]] = tab[i + 2];
SetFiltListTNums[tab[i] | IMMUTABLE][tab[i + 1]] =
tab[i + 2] | IMMUTABLE;
}
}
/****************************************************************************
**
*F InitResetFiltListTNumsFromTable( <tab> ) initialise unsetter filts tnums
*/
void InitResetFiltListTNumsFromTable(const Int * tab)
{
Int i;
for (i = 0; tab[i] != -1; i += 3) {
ResetFiltListTNums[tab[i]][tab[i + 1]] = tab[i + 2];
ResetFiltListTNums[tab[i] | IMMUTABLE][tab[i + 1]] =
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
static Obj java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 5
{
Obj for ( ;i <; i+ {
int len = if ImportedFuncs[. = )java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
(nargs >= &&len ! nargsjava.lang.StringIndexOutOfBoundsException: Range [35, 36) out of bounds for length 35
java.lang.StringIndexOutOfBoundsException: Range [14, 8) out of bounds for length 23
errs+;
" which implies %d arguments\n",
name, nargs, argStr, len); ( {
return ;
}
/****************************************************************************
**
*F InitGVarFiltsFromTable( <tab> ) . Int)[].,0;
*/
void InitGVarFiltsFromTable(const StructGVarFilt * tab }
{
Int i;
for (i = 0; tab}
UInt gvar = GVarName(tab[i else *ImportedFuncs[i.address =ErrorMustEvalToFuncFunc|
Objname= NameGVargvar)
Obj args = ValidatedArgListerrs+;
AssReadOnlyGVar(gvar, NewFilter(name, args, tab[i].handler));
}
}
/****************************************************************************
**Pr"Wglobaljava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 69
(I[]name )
*/
void
}
Int i;
for (i = 0; tab[i].name != MakeReadOnlyGVarGVarName(ImportedFuncs[i.name);
UInt gvar = GVarName(tab[i].name);
Obj name = NameGVar }
Obj
AssReadOnlyGVar(gvar, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
/****************************************************************************
**
*F InitGVarPropsFromTable
*/
void /****************************************************
{
Int i;
for (i = 0; tab[i].name != 0; i++) {
UInt gvar =F <>) .. .....java.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 77
Obj namejava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 46
Obj args = ValidatedArgList(tab[i].name, 1, tab[i].argument);
AssReadOnlyGVar(gvar, NewProperty(name, args, tab[i
}
}
/****************************************************************************
** if(rModules = ){
*F InitGVarOpersFromTable( <tab> ) . . . . . . . . . . . Panic"roomtorecordmodule);
*/
void InitGVarOpersFromTable(java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 27
{
Int i;
for Pjava.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 45
UInt gvar = GVarName( java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
name=NameGVargvar)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
Objargs =ValidatedArgListt[].name [i.nargs i.argsjava.lang.StringIndexOutOfBoundsException: Range [77, 78) out of bounds for length 77
AssReadOnlyGVar(
ModulesNrModules] =NextLoadedModuleFilenamejava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
}
}
static voidjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
// The string <cookie> usually has the form "PATH/TO/FILE.c:FUNCNAME".#fdef
// We check if that is the case, and if so, split it into the parts before
// and after the colon. In addition, the file path is cut to only contain
// the last two '/'-separated components.
constChar pos=strchrcookie :)
if (pos) {
Obj location = UInt i ;i <NrModules ++
filename
char buffer[512];
Int len = (Modulesi].)
memcpy(SaveCStr(Modulesi]f;
buffer[len] = 0;
Char * start = strrchr(buffer, '/');
if (start) {
while (start > buffer && *(start - 1) !voidLoadModules()
start--;
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
start = buffer;
filename ()
Obj body_bag = NewFunctionBody();
SET_FILENAME_BODYb filenamejava.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 46
SET_LOCATION_BODY UInt LoadUInt;
SET_BODY_FUNC(func, body_bag);
CHANGED_BAG(body_bag);
;
}
}
/****************************************************************************,256)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
**
*F InitGVarFuncsFromTable( <tab> ) . . . .***************/
*/
**This of ,java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 74
{
Int i;
for (i //Searchfor
UIntgvar = tab[.ame)
Obj name = NameGVar(java.lang.StringIndexOutOfBoundsException: Range [37, 32) out of bounds for length 41
i =0* refertothe COPYRIGHT file for details.
Obj func = "Static%snotfound inloading kernel"java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
SetupFuncInfo(func, tab[i].cookie);
AssReadOnlyGVarelse{
}
}
/*****************************************************************************
**
*F InitHdlrFiltsFromTable( <tab> ) . . . . . . InitInfoFuncjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
*/
void InitHdlrFiltsFromTable(const StructGVarFilt * tab)
{
Int =
for (i = 0; tab[i].name != 0; i++) {
InitHandlerFunc(tab[i].handler, tab[i].cookie}
InitFopyGVar(tab[info = (*init));
}
}
/**************************************************************************** if ( = 0){
**
*F #include"bool.Panicjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 69
*/
void InitHdlrAttrsFromTable# include "compstat.h"
{
Int i;
for (i = 0;# "rror.h"
InitHandlerFunc(tab[i].include".h"
buf)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}
}
/****************************************************************************"intobj.h"
*
*F InitHdlrPropsFromTable( <tab> ) . . . . . . }
*/
voidInitHdlrPropsFromTable(const StructGVarProp * tab)
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
Int i;(NrModules == MAX_MODULES) #.h
for (i = 0; }
InitHandlerFunc[i.java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 55
i.i.java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 55
t[i. [i;
}
}
/****************************************************************************(nfo>,)
**
*F InitHdlrOpersFromTable( <java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
*/
void (const *tabjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
{
Int i;
for (i = 0; void ModulesInitKernel
InitHandlerFunc(tab[i].handler, tab[i {
InitFopyGVar(tab[i].name, tab[i].operation);
}
}
/****************************************************************************
**
*F InitHdlrFuncsFromTable( <tab> ) . . . . . . . . . . . . . . new functions
*/
void InitHdlrFuncsFromTable(const StructGVarFunc * tab)
{
/*
for i 0; tab[i.name! 0; i++{
InitHandlerFunc(*
}
}
/**************************************************************************** .. .. ...... .. . . . . of
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
dress>). java.lang.StringIndexOutOfBoundsException: Range [77, 68) out of bounds for length 77
*/
void Char filenamejava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
{
ars= 1024){
Pr("#W warning: too many imported GVars\n", 0, 0);
}
else{
( " stderr;
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
(info-name, stderrObj *address;
}
if (address != }fputs(\")java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
nitCopyGVar(name,address);
} java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
/****************************************************************************
*java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
*F ImportFuncFromLibrary( <name>}
*/
void
{
(NrImportedFuncs=)
Pr("java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
else {
StructInitInfo java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 48
ImportedFuncs[NrImportedFuncs].address = address;
NrImportedFuncs++java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
}
if (address != 0) {
InitFopyGVar(name, address);
}
}
/****************************************************************************
*
*F FuncExportToKernelFinished( <self> ) . . . . . . . . . . check functions
*/
static Obj FuncExportToKernelFinished(Obj self)
{
UInt i;
= 0java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
Obj val;
SyInitializing = 0;
for 0 NrImportedGVars;i+) java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
if }
val = ValAutoGVar(GVarName(ImportedGVars[i].name));
if}
errs++;
if (!oid(oidjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
Pr"W java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 73
(Int)ImportedFuncs StructInitInfo = [i.;
}
}
}
else *ImportedGVarsi.ddress =0){
errs++;
if (!SyQuiet) {
Prfputs(I CheckInit",)
(Int)fputs(info->name, stderr
}
"\"java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
else
MakeReadOnlyGVar(GVarNameifret{
}
for }
if (ImportedFuncs[i]
if (val == 0}
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
if (!SyQuiet) {
Pr"W java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 73
(Int *info .
}
}
}
S){
*ImportedFuncs[i]. fputs("#I InitModuleState(", stderr);
errs+;
if (!SyQuiet) {
("W global function '%s' has not been defined\n",
(Int)ImportedFuncs[i].name, 0);
}
}
else {
MakeReadOnlyGVar(GVarName(ImportedFuncs[i].name));
}
}
return errs == 0 ? ("InitModuleStatebuiltin %s) returned non-zero value", info->name);
}
}
**
*F RecordLoadedModule( <module> ) . . . . . . . . }
*/
void RecordLoadedModule(StructInitInfo *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Int java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 1
const Char * filename)
{
UInt len;
if (NrModules == MAX_MODULES) {
Panic("no room to record module");
}
len = strlen(filename);
if (NextLoadedModuleFilename + len + 1 >
LoadedModuleFilenamesif(SyDebugLoading) {
Panic("no room for module filename");
}
lename ='0'
memcpy(NextLoadedModuleFilename, filename, len + 1);
fputsinfo->name, stderr);
Modules[NrModules].filename = NextLoadedModuleFilename;
NextLoadedModuleFilename += len + 1;
ModulesNrModules]. =isGapRootRelative;
NrModules++;
}
#ifdef GAP_ENABLE_SAVELOAD
void SaveModules(void)
{
SaveUInt(NrModules - NrBuiltinModules
for (UInt i = Panic("DestroyModuleStatebuiltin%) returned nonzero " ->;
SaveUInt }
SaveUInt(Modules[i].isGapRootRelative);
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 1
}
}
void LoadModules(void)
{
Char buf[256];
UInt nMods = LoadUInt();
(Inti = 0 i <nModsi+){
UInt type = LoadUInt();
UInt=(
LoadCStr(buf, 256);
if (isGapRootRelative StructInitInfo info =Modules[]info
()
else {
StructInitInfo * info = NULL;
/ Search user static first
if (IS_MODULE_STATIC(type)) {
info =
if (info = Modulesi;
info->postSave;
buf);
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 1
InitInfoFunc init;
#ifdef HAVE_DLOPEN
const char * (-p ! )
if (init == 0) {
Panic("failed to info->(infojava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
}
info = (*init)();
if (info == 0) {
Panic(" to dynamic module s\, buf;
}
#else
Panic(i>java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 32
"java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
buf)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
#endif
}
ActivateModule(info);
RecordLoadedModule(info, 0 Int = info-p(;
}
}
#endif
void ModulesSetup(void)
{
NrImportedGVars= 0;
NrImportedFuncs = 0;
}
i =}
if
StructInitInfo * ******************
*V GVarFuncs . . . . . ... ofto
ifjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
fputs(->name,)
fputs(")\java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
*
}
NrBuiltinModules = GVAR_FUNC_0ARGS(ExportToKerne
}
void
{
f(UInt =/***************************************
*
infoFInitKernel m>) ... .. kerneljava.lang.StringIndexOutOfBoundsException: Range [66, 62) out of bounds for length 77
S {
fputs("#I InitKernel(builtin ", stderr);#endif
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 1
("\",stderr);
}
Int ret = info->initKernel(info);
if csFromTable java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 52
%java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
}
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void*
{
forint ;CompInitFuncs
StructInitInfo *functions
){
(SyDebugLoading) {
fputs("#I InitLibrary(builtin ", stderr);info & java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
fputs(-}
fputs(")\n", stderr);
}
******************java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 22
*
}
}
void java.lang.StringIndexOutOfBoundsException: Range [26, 21) out of bounds for length 27
{
for (UInt i =*java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 19
StructInitInfo * info java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
->java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 31
if (SyDebugLoading * (void
fputs(-n,stderr);
fputs(")\n", stderr);
}
Int ret = info->checkInit(info);
if (ret) {
Panic("CheckInit(builtin %s) returned non-zero value", info->name);
}
}
}
}
void ModulesInitModuleState(void)
{
for (UInt i = 0; i < NrModules; i++) {
StructInitInfo
************************************************java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
if (SyDebugLoading) {
fputs("#I InitModuleState(", stderr);
fputs(info->name, stderr);
/
}
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 46
if (ret
// try load module
}
}
}
}
void ModulesDestroyModuleState(void)
{
for (UInt i = 0; i < NrModules; i++) {
StructInitInfo * info = Modules[i].info;
if (info->destroyModuleState) {
if (SyDebugLoading) {
fputs("#I DestroyModuleState(", stderr);
fputs(info->name, stderr);
fputs(")\n", stderr);
}
Int ret = info->destroyModuleState();
if (ret) {
Panic("DestroyModuleState(builtin %s) returned non-zero value", info->name);
}
}
}
}
#ifdef GAP_ENABLE_SAVELOAD
Int ModulesPreSave(void)
{
for (UInt i = 0; i < NrModules; i++) {
StructInitInfo * info = Modules[i].info;
if (info->preSave != NULL && info->preSave(info)) {
Pr("Failed to save workspace -- problem reported in %s\n",
(Int)info->name, 0);
// roll back all save preparations
while (i--) {
info = Modules[i].info;
info->postSave(info);
}
return 1;
}
}
return 0;
}
void ModulesPostSave(void)
{
for (UInt i = 0; i < NrModules; i++) {
StructInitInfo * info = Modules[i].info;
if (info->postSave != NULL)
info->postSave(info);
}
}
void ModulesPostRestore(void)
{
for (UInt i = 0; i < NrModules; i++) {
StructInitInfo * info = Modules[i].info;
if (info->postRestore) {
if (SyDebugLoading) {
fputs("#I PostRestore(builtin ", stderr);
fputs(info->name, stderr);
fputs(")\n", stderr);
}
Int ret = info->postRestore(info);
if (ret) {
Panic("PostRestore(builtin %s) returned non-zero value", info->name);
}
}
}
}
#endif
/****************************************************************************
**
*V GVarFuncs . . . . . . . . . . . . . . . . . . list of functions to export
*/
static StructGVarFunc GVarFuncs[] = {
GVAR_FUNC_1ARGS(GAP_CRC, filename),
GVAR_FUNC_1ARGS(IS_LOADABLE_DYN, filename),
GVAR_FUNC_1ARGS(LOAD_DYN, filename),
GVAR_FUNC_1ARGS(LOAD_STAT, filename),
GVAR_FUNC_0ARGS(SHOW_STAT),
GVAR_FUNC_0ARGS(LoadedModules),
GVAR_FUNC_0ARGS(ExportToKernelFinished),
{ 0, 0, 0, 0, 0 }
};
/****************************************************************************
**
*F InitKernel( <module> ) . . . . . . . . initialise kernel data structures
*/
static Int InitKernel(StructInitInfo * module)
{
// init filters andfunctions
if (init = )
return 0;
}
/*****************************
*
*InitLibrary <>) . . java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 77
*
raryStructInitInfo modulejava.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47
{
/filters
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 38
;
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
/****************************************************************************
**
) res)
*/
static StructInitInfo module = {
/init structusing C99 initializers a full list of
/ fields please to definition StructInitInfo
. = ,
es"
. =
};
* InitInfoModulesjava.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38
{
return/-> not older
}
¤ Dauer der Verarbeitung: 2.123 Sekunden
¤
*© Formatika GbR, Deutschland
|
|
2026-11-24
|