Exemplo n.º 1
0
static void rline_call_intrinsic (char *fun)
{
   int (*f)(SLrline_Type *);

   if (Active_Rline_Info == NULL)
     return;
   
   if (NULL == (f = (int (*)(SLrline_Type *)) (SLang_find_key_function(fun, Active_Rline_Info->keymap))))
     {
	_pSLang_verror (SL_UndefinedName_Error, "rline internal function %s does not exist", fun);
	return;
     }

   (void) (*f)(Active_Rline_Info);
   Active_Rline_Info->last_fun = (FVOID_STAR) f;
}
Exemplo n.º 2
0
static int setkey_fun (int argc, SLcmd_Cmd_Table_Type *table) /*{{{*/
{
   char *fun = table->string_args[1];
   char *key = table->string_args[2];

   (void) argc;
   if (NULL == SLang_find_key_function(fun, Most_Keymap))
     {
	parse_error ("Undefined function");
     }

   if (0 != SLang_define_key (key, fun, Most_Keymap))
     parse_error ("Error setting key");

   return 0;
}