コード例 #1
0
ファイル: math.c プロジェクト: hankem/ISIS
int init_math_module_ns (char *ns_name)
{
   SLang_NameSpace_Type *ns;
   SLang_NameSpace_Type *pub_ns;

   if (NULL == (ns = SLns_create_namespace (ns_name)))
     return isis_trace_return(-1);

   if (NULL == (pub_ns = SLns_create_namespace (Isis_Public_Namespace_Name)))
     return isis_trace_return(-1);

   if (-1 == SLns_add_intrin_fun_table (ns, Math_Intrinsics, NULL))
     return isis_trace_return(-1);

   return 0;
}
コード例 #2
0
int init_miscio_module_ns (char *ns_name)
{
   SLang_NameSpace_Type *ns;
   SLang_NameSpace_Type *pub_ns;

   if (NULL == (ns = SLns_create_namespace (ns_name)))
     return isis_trace_return(-1);

   if (NULL == (pub_ns = SLns_create_namespace (Isis_Public_Namespace_Name)))
     return isis_trace_return(-1);

   if ((-1 == SLns_add_intrin_fun_table (ns, Misc_Intrinsics, NULL))
       || (-1 == SLns_add_intrin_var_table (pub_ns, Misc_Intrin_Vars, NULL))
       || (-1 == SLadd_intrin_var_table (Global_Intrin_Vars, NULL))
       || (-1 == SLns_add_iconstant_table (ns, Misc_Intrin_Const, NULL)))
     return isis_trace_return(-1);

   return 0;
}
コード例 #3
0
static int init_optional_modules (char *ns_name) /*{{{*/
{
   (void) ns_name;

#ifdef INIT_XSPEC_MODULE
   if (-1 == init_xspec_module_ns (Isis_Public_Namespace_Name))
     return isis_trace_return(-1);
   (void) SLdefine_for_ifdef ("__XSPEC_IS_STATIC__");
#endif

   return 0;
}