ソースを参照

Template for scheme

Serj Kalichev 3 年 前
コミット
7dbbc81ba3

+ 9 - 2
klish/Makefile.am

@@ -7,12 +7,19 @@ libklish_la_LDFLAGS = $(AM_LDFLAGS) $(VERSION_INFO)
 #endif
 
 nobase_include_HEADERS += \
-	klish/ktp.h
+	klish/ktp.h \
+	klish/ktp_session.h \
+	klish/kscheme.h \
+	klish/kview.h \
+	klish/kcommand.h \
+	klish/kparam.h
 
 EXTRA_DIST += \
-	klish/ktp/Makefile.am
+	klish/ktp/Makefile.am \
+	klish/kscheme/Makefile.am
 
 include $(top_srcdir)/klish/ktp/Makefile.am
+include $(top_srcdir)/klish/kscheme/Makefile.am
 
 #if TESTC
 #include $(top_srcdir)/klish/testc_module/Makefile.am

+ 22 - 0
klish/kcommand.h

@@ -0,0 +1,22 @@
+/** @file kcommand.h
+ *
+ * @brief Klish scheme's "command" entry
+ */
+
+#ifndef _klish_kcommand_h
+#define _klish_kcommand_h
+
+typedef struct kcommand_s kcommand_t;
+
+typedef struct kcommand_info_s {
+	char *name;
+	char *help;
+} kcommand_info_t;
+
+
+C_DECL_BEGIN
+
+
+C_DECL_END
+
+#endif // _klish_kcommand_h

+ 23 - 0
klish/kparam.h

@@ -0,0 +1,23 @@
+/** @file kparam.h
+ *
+ * @brief Klish scheme's "param" entry
+ */
+
+#ifndef _klish_kparam_h
+#define _klish_kparam_h
+
+typedef struct kparam_s kparam_t;
+
+typedef struct kparam_info_s {
+	char *name;
+	char *help;
+	char *ptype;
+} kparam_info_t;
+
+
+C_DECL_BEGIN
+
+
+C_DECL_END
+
+#endif // _klish_kparam_h

+ 20 - 0
klish/kscheme.h

@@ -0,0 +1,20 @@
+/** @file kscheme.h
+ *
+ * @brief Klish Scheme
+ */
+
+#ifndef _klish_kscheme_h
+#define _klish_kscheme_h
+
+
+#include <klish/kview.h>
+#include <klish/kcommand.h>
+#include <klish/kparam.h>
+
+
+C_DECL_BEGIN
+
+
+C_DECL_END
+
+#endif // _klish_kscheme_h

+ 5 - 0
klish/kscheme/Makefile.am

@@ -0,0 +1,5 @@
+libklish_la_SOURCES += \
+	klish/kscheme/kscheme.c \
+	klish/kscheme/kview.c \
+	klish/kscheme/kcommand.c \
+	klish/kscheme/kparam.c

+ 7 - 0
klish/kscheme/kcommand.c

@@ -0,0 +1,7 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include <faux/str.h>
+#include <klish/kcommand.h>

+ 11 - 0
klish/kscheme/kparam.c

@@ -0,0 +1,11 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include <faux/str.h>
+#include <klish/kparam.h>
+
+struct kparam_s {
+	
+};

+ 7 - 0
klish/kscheme/kscheme.c

@@ -0,0 +1,7 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include <faux/str.h>
+#include <klish/kscheme.h>

+ 7 - 0
klish/kscheme/kview.c

@@ -0,0 +1,7 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#include <faux/str.h>
+#include <klish/kview.h>

+ 21 - 0
klish/kview.h

@@ -0,0 +1,21 @@
+/** @file view.h
+ *
+ * @brief Klish scheme's "view" entry
+ */
+
+#ifndef _klish_kview_h
+#define _klish_kview_h
+
+typedef struct kview_s kview_t;
+
+typedef struct kview_info_s {
+	char *name;
+} kview_info_t;
+
+
+C_DECL_BEGIN
+
+
+C_DECL_END
+
+#endif // _klish_kview_h