X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=srd.c;h=ae1c7738b5920378bcc7d8a4ddbedeff025aca41;hb=c6bfbc0043089e006c684bcce609da50aadded81;hp=b74b780ebf75e70397bd2c50efc03d2c98c14e7e;hpb=e9c1a90c311a65e5b1576a63078d854771a9c83b;p=libsigrokdecode.git
diff --git a/srd.c b/srd.c
index b74b780..ae1c773 100644
--- a/srd.c
+++ b/srd.c
@@ -18,9 +18,9 @@
* along with this program. If not, see .
*/
-#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
-#include "libsigrokdecode-internal.h"
-#include "config.h"
+#include
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
#include
/** @cond PRIVATE */
@@ -29,11 +29,8 @@
SRD_PRIV GSList *searchpaths = NULL;
/* session.c */
-extern GSList *sessions;
-extern int max_session_id;
-
-/* decoder.c */
-extern SRD_PRIV GSList *pd_list;
+extern SRD_PRIV GSList *sessions;
+extern SRD_PRIV int max_session_id;
/** @endcond */
@@ -65,7 +62,7 @@ extern SRD_PRIV GSList *pd_list;
*
* @section sec_mailinglists Mailing lists
*
- * There are two mailing lists for sigrok/libsigrokdecode: sigrok-devel and sigrok-commits.
+ * There is one mailing list for sigrok/libsigrokdecode: sigrok-devel.
*
* @section sec_irc IRC
*
@@ -251,10 +248,7 @@ SRD_PRIV int srd_decoder_searchpath_add(const char *path)
/* Convert to wide chars. */
wc_len = sizeof(wchar_t) * (new_path->len + 1);
- if (!(wc_new_path = g_try_malloc(wc_len))) {
- srd_dbg("malloc failed");
- return SRD_ERR_MALLOC;
- }
+ wc_new_path = g_malloc(wc_len);
mbstowcs(wc_new_path, new_path->str, wc_len);
PySys_SetPath(wc_new_path);
g_string_free(new_path, TRUE);
@@ -264,14 +258,4 @@ SRD_PRIV int srd_decoder_searchpath_add(const char *path)
return SRD_OK;
}
-/** @private */
-SRD_PRIV gboolean srd_check_init(void)
-{
- if (max_session_id < 0) {
- srd_err("Library is not initialized.");
- return FALSE;
- } else
- return TRUE;
-}
-
/** @} */