]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - examples/loadables/template.c
Bash-4.4 distribution sources and documentation
[thirdparty/bash.git] / examples / loadables / template.c
index 3a5814f334455e5026a7f0d4b1feea8beb52d459..8cfd571d7fefc0ee5ce269a97d2b4181c36d7541 100644 (file)
@@ -11,9 +11,7 @@
 #include <stdio.h>
 #include <errno.h>
 
-#include "builtins.h"
-#include "shell.h"
-#include "bashgetopt.h"
+#include "loadables.h"
 
 #if !defined (errno)
 extern int errno;
@@ -21,6 +19,7 @@ extern int errno;
 
 extern char *strerror ();
 
+int
 template_builtin (list)
      WORD_LIST *list;
 {
@@ -42,6 +41,22 @@ template_builtin (list)
   return (rval);
 }
 
+/* Called when `template' is enabled and loaded from the shared object.  If this
+   function returns 0, the load fails. */
+int
+template_builtin_load (name)
+     char *name;
+{
+  return (1);
+}
+
+/* Called when `template' is disabled. */
+void
+template_builtin_unload (name)
+     char *name;
+{
+}
+
 char *template_doc[] = {
        "Short description.",
        ""