/*
 * C Interface between calcterm and a calculator.
 * A shared library must implement this interface
 * to be loadable by calcterm.
 */

extern "C" {

struct CI_Config {
    int flag;
};

struct CI_Result {
    char*  one_line;
    char** grid;
    int    y;
};

void         CI_init( CI_Config* config );
CI_Result*   CI_submit( char const* input );
void         CI_result_release( CI_Result* result );

} /* extern "C" */


typedef CI_Config void*;



CI_Result CI_submit(char const* input);

--- 
+++ 
@@ -1,6 +1,23 @@
+/*
+ * C Interface between calcterm and a calculator.
+ * A shared library must implement this interface
+ * to be loadable by calcterm.
+ */
 
-typedef CI_Config void*;
+extern "C" {
 
+struct CI_Config {
+    int flag;
+};
 
+struct CI_Result {
+    char*  one_line;
+    char** grid;
+    int    y;
+};
 
-CI_Result CI_submit(char const* input);
+void         CI_init( CI_Config* config );
+CI_Result*   CI_submit( char const* input );
+void         CI_result_release( CI_Result* result );
+
+} /* extern "C" */
Add a basic interface for calcterm
