chiark / gitweb /
@@@ much mess, mostly manpages
[mLib] / test / example / example.h
diff --git a/test/example/example.h b/test/example/example.h
new file mode 100644 (file)
index 0000000..b3cdee8
--- /dev/null
@@ -0,0 +1,56 @@
+/* -*-c-*-
+ *
+ * Example test program
+ *
+ * (c) 2024 Straylight/Edgeware
+ */
+
+/*----- Licensing notice --------------------------------------------------*
+ *
+ * This file is part of the mLib utilities library.
+ *
+ * mLib is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU Library General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * mLib is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with mLib.  If not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ */
+
+#ifndef MLIB_EXAMPLE_H
+#define MLIB_EXAMPLE_H
+
+#ifdef __cplusplus
+  extern "C" {
+#endif
+
+/*----- Header files ------------------------------------------------------*/
+
+#include <stddef.h>
+
+/*----- Functions provided ------------------------------------------------*/
+
+extern int add(int /*x*/, int /*y*/);
+  /* Return the sum X + Y. */
+
+extern int greet(char */*buf*/, size_t /*sz*/, const char */*name*/);
+  /* Generate a personalized greeting, mentioning NAME.  The greeting is
+   * written to the output buffer BUF, which has space for SZ characters.
+   * Return zero on success, or -1 on error.
+   */
+
+/*----- That's all, folks -------------------------------------------------*/
+
+#ifdef __cplusplus
+  }
+#endif
+
+#endif