anplug.c 370 B

1234567891011121314151617181920212223242526
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <clish/plugin.h>
  4. CLISH_PLUGIN_SYM(anplug_fn)
  5. {
  6. printf("anplug: Another plugin\n");
  7. return 0;
  8. }
  9. CLISH_PLUGIN_INIT
  10. {
  11. printf("anplug: INIT shell = %p\n", clish_shell);
  12. clish_plugin_add_sym(plugin, anplug_fn, "an_fn");
  13. return 0;
  14. }
  15. CLISH_PLUGIN_FINI
  16. {
  17. printf("anplug: FINI this = %p\n", clish_shell);
  18. return 0;
  19. }