Commit e24a95be authored by 's avatar
Browse files

Ruler library can now be loaded.



git-svn-id: file:///home/svn/mapi/trunk@1285 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 2d188af0
......@@ -8,6 +8,10 @@ lib_LTLIBRARIES = rulerflib.la
check_PROGRAMS = testcompiler
rulerflib_la_LDFLAGS = -module
rulerflib_la_SOURCES = rulerflib.c helper-functions.h
rulerflib_la_LIBADD = \
../common/libflist.la \
../common/libmapiipc.la \
../common/libfhelp.la
testcompiler_SOURCES = testcompiler.c helper-functions.h
testcompiler_LDADD = -ldl
......
......@@ -53,6 +53,7 @@ char *mapidflib_get_libname()
*/
static const char *check_parameter( unsigned char *arg )
{
// FIXME: Check sanity of source file.
return (char *) arg;
}
......@@ -73,12 +74,14 @@ static int ruler_instance(
(void) flow_mod;
mapiFunctArg *fargs = instance->args;
char *str = getargstr( &fargs );
if( str[0] == '\0' ){
if( str == NULL || str[0] == '\0' ){
return MFUNCT_INVALID_ARGUMENT_1;
}
// FIXME: Check sanity of source file.
(void) check_parameter( instance->args );
const char *arg = check_parameter( instance->args );
if( arg == NULL ){
return MFUNCT_INVALID_ARGUMENT_1;
}
return 0;
};
......@@ -189,3 +192,16 @@ mapidflib_function_def_t* ruler_get_funct_info()
return &finfo;
};
__attribute__ ((constructor))
void init ()
{
printf ("Library rulerflib loaded\n");
}
__attribute__ ((destructor))
void fini ()
{
printf ("Library rulerflib unloaded\n");
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment