diff --git a/src/clib/meson.build b/src/clib/meson.build
index ceea83f3..dd528d3d 100644
--- a/src/clib/meson.build
+++ b/src/clib/meson.build
@@ -10,10 +10,14 @@ paho = meson.get_compiler('c').find_library('paho-mqtt3cs', kwargs: pahoargs)
clsrcs = files('btdev.c', 'get_locale_double.c', 'rserial.c', 'speech_wrapper.c')
if paho.found()
- clsrcs += 'paho_wrapper.c'
+ clsrcs += files('paho_wrapper.c')
clib_dep += paho
endif
+if build_machine.system() != 'linux'
+ clsrcs += files('poll_serials.c')
+endif
+
common_inc_dir += [include_directories('.'), include_directories('../common')]
clib_cargs=[]
diff --git a/src/clib/mwpfuncs.h b/src/clib/mwpfuncs.h
index 98dcc7a2..ab53fa6f 100644
--- a/src/clib/mwpfuncs.h
+++ b/src/clib/mwpfuncs.h
@@ -19,4 +19,8 @@ extern const char * get_build_compiler();
extern void start_cpu_stats();
extern int end_cpu_stats(double *cpu0, double* cpu1);
+extern char** check_ports();
+extern int check_insert_name(char *s);
+extern int check_delete_name(char *s);
+
#define MWP_MISC_MWP_MAX_WP 60
diff --git a/src/clib/mwpfuncs.vapi b/src/clib/mwpfuncs.vapi
index 4fe1b7d1..e65f5b07 100644
--- a/src/clib/mwpfuncs.vapi
+++ b/src/clib/mwpfuncs.vapi
@@ -75,6 +75,15 @@ namespace MwpMisc {
[CCode (cname="end_cpu_stats")]
int end_cpu_stats(double *cpu0, double* cpu1);
+
+ [CCode (cname="check_ports")]
+ char** check_ports();
+
+ [CCode (cname="check_insert_name")]
+ int check_insert_name(char *s);
+
+ [CCode (cname="check_delete_name")]
+ int check_delete_name(char *s);
}
[CCode (cheader_filename = "rserial.h")]
diff --git a/src/common/poll_serials.c b/src/clib/poll_serials.c
similarity index 100%
rename from src/common/poll_serials.c
rename to src/clib/poll_serials.c
diff --git a/src/common/meson.build b/src/common/meson.build
index 998fcba2..657002f1 100644
--- a/src/common/meson.build
+++ b/src/common/meson.build
@@ -25,10 +25,6 @@ else
vcommon += files('posixspawn.vala', 'posix_psmisc.c')
endif
-if build_machine.system() != 'linux'
- vcommon += files('poll_serials.c')
-endif
-
clicommon = ''
fccommon = files( 'mwptermcap.vala')
diff --git a/src/mwp/mwp-epoxy.c b/src/mwp/mwp-epoxy.c
deleted file mode 100644
index 607d64d6..00000000
--- a/src/mwp/mwp-epoxy.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- *
- * (c) Jonathan Hudson
- */
-
-#include
-#include
-#include
-
-extern void mwp_log_message (const char* format,...);
-
-int epoxy_glinfo() {
- const GLubyte *renderer = glGetString( GL_RENDERER );
- const GLubyte *vendor = glGetString( GL_VENDOR );
- const GLubyte *version = glGetString( GL_VERSION );
- /*
- const GLubyte *glslVersion = glGetString( GL_SHADING_LANGUAGE_VERSION );
- GLint major, minor;
- glGetIntegerv(GL_MAJOR_VERSION, &major);
- glGetIntegerv(GL_MINOR_VERSION, &minor);
- printf("GL Vendor : %s\n", vendor);
- printf("GL Renderer : %s\n", renderer);
- printf("GL Version (string) : %s\n", version);
- printf("GL Version (integer) : %d.%d\n", major, minor);
- printf("GLSL Version : %s\n", glslVersion);
- */
- if(renderer != NULL && version != NULL) {
- mwp_log_message("GL: %s %s\n", renderer, version);
- return 0;
- }
- return 1;
-}
diff --git a/src/mwp/serial_watcher.vala b/src/mwp/serial_watcher.vala
index 7dc6f90e..4967ebd9 100644
--- a/src/mwp/serial_watcher.vala
+++ b/src/mwp/serial_watcher.vala
@@ -1,17 +1,13 @@
-extern char** check_ports();
-extern int check_insert_name(char *s);
-extern int check_delete_name(char *s);
-
namespace Mwp {
public class SerialWatcher : Object {
public SerialWatcher() {}
public void run() {
Timeout.add(2000, () => {
- var devs = check_ports();
+ var devs = MwpMisc.check_ports();
if (devs != null) {
for (var sptr = devs; *sptr != null; sptr++) {
if (Mwp.find_combo(Mwp.dev_combox, (string)*sptr) == -1) {
- var addme = check_insert_name(*sptr);
+ var addme = MwpMisc.check_insert_name(*sptr);
if (addme == 1) {
Mwp.prepend_combo(Mwp.dev_combox, (string)*sptr);
} else if (addme == -1) {
@@ -22,7 +18,7 @@ namespace Mwp {
}
var snames = Mwp.list_combo(Mwp.dev_combox);
foreach (var name in snames) {
- if(check_delete_name((char*)name.data) == 0) {
+ if(MwpMisc.check_delete_name((char*)name.data) == 0) {
var found = false;
if (devs != null) {
for (var sptr = devs; *sptr != null; sptr++) {