#define USE_UDI 0
// === PROTOTYPES ===
- int Module_int_Initialise(tModule *Module, char *ArgString);
+ int Module_int_Initialise(tModule *Module, const char *ArgString);
+void Modules_int_GetBuiltinArray(void);
void Modules_LoadBuiltins(void);
void Modules_SetBuiltinParams(char *Name, char *ArgString);
- int Module_RegisterLoader(tModuleLoader *Loader);
- int Module_LoadMem(void *Buffer, Uint Length, char *ArgString);
- int Module_LoadFile(char *Path, char *ArgString);
+// int Module_RegisterLoader(tModuleLoader *Loader);
+// int Module_LoadMem(void *Buffer, Uint Length, char *ArgString);
+// int Module_LoadFile(char *Path, char *ArgString);
int Module_int_ResolveDeps(tModule *Info);
int Module_IsLoaded(const char *Name);
#if USE_UDI
extern int UDI_LoadDriver(void *Base);
#endif
-extern void StartupPrint(char *Str);
-extern void gKernelModules;
-extern void gKernelModulesEnd;
+extern void StartupPrint(const char *Str);
+extern tModule gKernelModules;
+extern tModule gKernelModulesEnd;
// === GLOBALS ===
int giNumBuiltinModules = 0;
* \retval 0 Returned on success
* \retval >0 Error code form the module's initialisation function
*/
-int Module_int_Initialise(tModule *Module, char *ArgString)
+int Module_int_Initialise(tModule *Module, const char *ArgString)
{
int i, j;
int ret;
- char **deps;
+ const char **deps;
char **args;
tModule *mod;
/**
* \brief Initialise a builtin module given it's name
- * \example Used by VTerm to load an alternate video driver at runtime
+ *
+ * E.g. Used by VTerm to load an alternate video driver at runtime
*/
int Modules_InitialiseBuiltin(const char *Name)
{
* \fn int Module_LoadMem(void *Buffer, Uint Length, char *ArgString)
* \brief Load a module from a memory location
*/
-int Module_LoadMem(void *Buffer, Uint Length, char *ArgString)
+int Module_LoadMem(void *Buffer, Uint Length, const char *ArgString)
{
char path[VFS_MEMPATH_SIZE];
}
/**
- * \fn int Module_LoadFile(char *Path, char *ArgString)
+ * \fn int Module_LoadFile(const char *Path, const char *ArgString)
* \brief Load a module from a file
*/
-int Module_LoadFile(char *Path, char *ArgString)
+int Module_LoadFile(const char *Path, const char *ArgString)
{
void *base;
tModule *info;
*/
int Module_int_ResolveDeps(tModule *Info)
{
- char **names = Info->Dependencies;
+ const char **names = Info->Dependencies;
// Walk dependencies array
for( ; *names; names++ )