plugin_init.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. *
  3. */
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include <stdint.h>
  7. #include <faux/faux.h>
  8. #include <klish/kplugin.h>
  9. #include <klish/kcontext.h>
  10. //#include "private.h"
  11. const uint8_t kplugin_klish_major = KPLUGIN_MAJOR;
  12. const uint8_t kplugin_klish_minor = KPLUGIN_MINOR;
  13. int kplugin_klish_init(kcontext_t *context)
  14. {
  15. /* Add hooks */
  16. /* clish_plugin_add_phook(plugin, clish_hook_access,
  17. "clish_hook_access", CLISH_SYM_TYPE_ACCESS);
  18. clish_plugin_add_phook(plugin, clish_hook_config,
  19. "clish_hook_config", CLISH_SYM_TYPE_CONFIG);
  20. clish_plugin_add_phook(plugin, clish_hook_log,
  21. "clish_hook_log", CLISH_SYM_TYPE_LOG);
  22. */
  23. /* Add builtin syms */
  24. /* clish_plugin_add_psym(plugin, clish_close, "clish_close");
  25. clish_plugin_add_psym(plugin, clish_overview, "clish_overview");
  26. clish_plugin_add_psym(plugin, clish_source, "clish_source");
  27. clish_plugin_add_psym(plugin, clish_source_nostop, "clish_source_nostop");
  28. clish_plugin_add_psym(plugin, clish_history, "clish_history");
  29. clish_plugin_add_psym(plugin, clish_nested_up, "clish_nested_up");
  30. clish_plugin_add_psym(plugin, clish_nop, "clish_nop");
  31. clish_plugin_add_psym(plugin, clish_wdog, "clish_wdog");
  32. clish_plugin_add_psym(plugin, clish_macros, "clish_macros");
  33. clish_plugin_add_osym(plugin, clish_script, "clish_script");
  34. clish_plugin_add_psym(plugin, clish_machine_interface, "clish_machine_interface");
  35. clish_plugin_add_psym(plugin, clish_human_interface, "clish_human_interface");
  36. clish_plugin_add_psym(plugin, clish_print_script, "clish_print_script");
  37. clish_plugin_add_psym(plugin, clish_print_var, "clish_print_var");
  38. */
  39. //fprintf(stderr, "Plugin 'klish' init\n");
  40. context = context; // Happy compiler
  41. return 0;
  42. }
  43. int kplugin_klish_fini(kcontext_t *context)
  44. {
  45. //fprintf(stderr, "Plugin 'klish' fini\n");
  46. context = context;
  47. return 0;
  48. }