[geany/geany-plugins] 07b29d: markdown: Remove pointless module with one function
Matthew Brush
git-noreply at xxxxx
Sun Aug 26 09:16:25 UTC 2012
Branch: refs/heads/master
Author: Matthew Brush <matt at geany.org>
Committer: Matthew Brush <matt at geany.org>
Date: Mon, 16 Jul 2012 21:15:35
Commit: 07b29d084f2bbc6f65e24ec6a4306d47e904d98d
https://github.com/geany/geany-plugins/commit/07b29d084f2bbc6f65e24ec6a4306d47e904d98d
Log Message:
-----------
markdown: Remove pointless module with one function
Modified Paths:
--------------
markdown/src/Makefile.am
markdown/src/md.c
markdown/src/md.h
markdown/src/viewer.c
Modified: markdown/src/Makefile.am
2 files changed, 0 insertions(+), 2 deletions(-)
===================================================================
@@ -6,13 +6,11 @@ geanyplugins_LTLIBRARIES = markdown.la
markdown_la_SOURCES = \
conf.c \
- md.c \
plugin.c \
viewer.c
noinst_HEADERS = \
conf.h \
- md.h \
viewer.h
markdown_la_CFLAGS = \
Modified: markdown/src/md.c
46 files changed, 0 insertions(+), 46 deletions(-)
===================================================================
@@ -1,46 +0,0 @@
-/*
- * md.c - Part of the Geany Markdown plugin
- *
- * Copyright 2012 Matthew Brush <mbrush at codebrainz.ca>
- *
- * 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 2 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-
-#include <string.h>
-#include <stdio.h>
-#include "markdown.h"
-#include "md.h"
-
-gchar *markdown_to_html(const gchar *md_text)
-{
- Document *md;
- gchar *result = NULL;
-
- if (!md_text)
- return g_strdup("");
-
- md = mkd_string(md_text, strlen(md_text), 0);
- if (md) {
- if (mkd_compile(md, 0)) {
- gchar *res = NULL;
- mkd_document(md, &res);
- result = g_strdup(res);
- }
- mkd_cleanup(md);
- }
-
- return result;
-}
Modified: markdown/src/md.h
33 files changed, 0 insertions(+), 33 deletions(-)
===================================================================
@@ -1,33 +0,0 @@
-/*
- * md.h - Part of the Geany Markdown plugin
- *
- * Copyright 2012 Matthew Brush <mbrush at codebrainz.ca>
- *
- * 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 2 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, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-
-#ifndef MARKDOWN_MD_H
-#define MARKDOWN_MD_H
-
-#include <glib.h>
-
-G_BEGIN_DECLS
-
-gchar *markdown_to_html(const gchar *md_text);
-
-G_END_DECLS
-
-#endif /* MARKDOWN_MD_H */
Modified: markdown/src/viewer.c
26 files changed, 24 insertions(+), 2 deletions(-)
===================================================================
@@ -19,11 +19,13 @@
* MA 02110-1301, USA.
*/
-#include <geanyplugin.h>
+#include <string.h>
+#include <stdio.h>
#include <gtk/gtk.h>
#include <webkit/webkitwebview.h>
+#include <geanyplugin.h>
+#include "markdown.h"
#include "viewer.h"
-#include "md.h"
#include "conf.h"
#define MARKDOWN_VIEWER_TAB_LABEL _("Markdown Preview")
@@ -97,7 +99,27 @@ void on_viewer_load_status_notify(GObject *obj, GParamSpec *pspec, MarkdownViewe
}
}
+static gchar *
+markdown_to_html(const gchar *md_text)
+{
+ Document *md;
+ gchar *result = NULL;
+
+ if (!md_text)
+ return g_strdup("");
+
+ md = mkd_string(md_text, strlen(md_text), 0);
+ if (md) {
+ if (mkd_compile(md, 0)) {
+ gchar *res = NULL;
+ mkd_document(md, &res);
+ result = g_strdup(res);
+ }
+ mkd_cleanup(md);
+ }
+ return result;
+}
static gchar *
str_replace(const gchar *haystack, const gchar *needle, const gchar *repl)
@@ Diff output truncated at 100000 characters. @@
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
More information about the Plugins-Commits
mailing list