1
0

builtin_init.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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(clish)
  11. {
  12. /* Add hooks */
  13. clish_plugin_add_phook(plugin, clish_hook_access,
  14. "clish_hook_access", CLISH_SYM_TYPE_ACCESS);
  15. clish_plugin_add_phook(plugin, clish_hook_config,
  16. "clish_hook_config", CLISH_SYM_TYPE_CONFIG);
  17. clish_plugin_add_phook(plugin, clish_hook_log,
  18. "clish_hook_log", CLISH_SYM_TYPE_LOG);
  19. /* Add builtin syms */
  20. clish_plugin_add_psym(plugin, clish_close, "clish_close");
  21. clish_plugin_add_psym(plugin, clish_overview, "clish_overview");
  22. clish_plugin_add_psym(plugin, clish_source, "clish_source");
  23. clish_plugin_add_psym(plugin, clish_source_nostop, "clish_source_nostop");
  24. clish_plugin_add_psym(plugin, clish_history, "clish_history");
  25. clish_plugin_add_psym(plugin, clish_nested_up, "clish_nested_up");
  26. clish_plugin_add_psym(plugin, clish_nop, "clish_nop");
  27. clish_plugin_add_psym(plugin, clish_wdog, "clish_wdog");
  28. clish_plugin_add_psym(plugin, clish_macros, "clish_macros");
  29. clish_plugin_add_osym(plugin, clish_script, "clish_script");
  30. clish_shell = clish_shell; /* Happy compiler */
  31. return 0;
  32. }
  33. /*----------------------------------------------------------- */