builtin_init.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * builtin_init.c
  3. */
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include "clish/plugin.h"
  7. #include "private.h"
  8. /*----------------------------------------------------------- */
  9. /* Initialize internal pseudo-plugin */
  10. CLISH_PLUGIN_INIT
  11. {
  12. /* Set plugin name */
  13. clish_plugin__set_name(plugin, "clish");
  14. /* Add hooks */
  15. clish_plugin_add_phook(plugin, clish_hook_access,
  16. "clish_hook_access", CLISH_SYM_TYPE_ACCESS);
  17. clish_plugin_add_phook(plugin, clish_hook_config,
  18. "clish_hook_config", CLISH_SYM_TYPE_CONFIG);
  19. clish_plugin_add_phook(plugin, clish_hook_log,
  20. "clish_hook_log", CLISH_SYM_TYPE_LOG);
  21. /* Add builtin syms */
  22. clish_plugin_add_psym(plugin, clish_close, "clish_close");
  23. clish_plugin_add_psym(plugin, clish_overview, "clish_overview");
  24. clish_plugin_add_psym(plugin, clish_source, "clish_source");
  25. clish_plugin_add_psym(plugin, clish_source_nostop, "clish_source_nostop");
  26. clish_plugin_add_psym(plugin, clish_history, "clish_history");
  27. clish_plugin_add_psym(plugin, clish_nested_up, "clish_nested_up");
  28. clish_plugin_add_psym(plugin, clish_nop, "clish_nop");
  29. clish_plugin_add_psym(plugin, clish_wdog, "clish_wdog");
  30. clish_plugin_add_psym(plugin, clish_macros, "clish_macros");
  31. clish_plugin_add_sym(plugin, clish_script, "clish_script");
  32. return 0;
  33. }
  34. /*----------------------------------------------------------- */