Branch: refs/heads/master Author: Frank Lanitz frank@frank.uvena.de Committer: Frank Lanitz frank@frank.uvena.de Date: Thu, 31 Jan 2013 22:27:42 UTC Commit: 82cbec5920f47bab96a3cd0df86619ba4b180ea8 https://github.com/geany/geany-plugins/commit/82cbec5920f47bab96a3cd0df86619...
Log Message: ----------- Purge unneeded code
Modified Paths: -------------- tableconvert/src/tableconvert.c
Modified: tableconvert/src/tableconvert.c 107 files changed, 0 insertions(+), 107 deletions(-) =================================================================== @@ -161,113 +161,6 @@ static GString* convert_to_table_worker(gchar **rows, gboolean header, gint type return replacement_str; }
- -static GString* convert_to_table_html(gchar **rows, gboolean header) -{ - guint i; - guint j; - GString *replacement_str = NULL; - - g_return_val_if_fail(rows != NULL, NULL); - - /* Adding header to replacement */ - replacement_str = g_string_new("<table>\n"); - - /* Adding <thead> if requested */ - if (header == TRUE) - { - g_string_append(replacement_str, "<thead>\n"); - } - - /* Iteration onto rows and building up lines of table for - * replacement */ - for (i = 0; rows[i] != NULL ; i++) - { - gchar **columns = NULL; - columns = g_strsplit_set(rows[i], "\t", -1); - - /* Adding <tbody> after first line if header and body - * is requested */ - if (i == 1 && - header == TRUE) - { - g_string_append(replacement_str, "<tbody>\n"); - } - - g_string_append(replacement_str, "\t<tr>\n"); - for (j = 0; columns[j] != NULL; j++) - { - g_string_append(replacement_str, "\t\t<td>"); - g_string_append(replacement_str, columns[j]); - g_string_append(replacement_str, "</td>\n"); - } - - g_string_append(replacement_str, "\t</tr>\n"); - - /* Adding closing </thead> after first row if header - * is requested */ - if (i == 0 && - header == TRUE) - { - g_string_append(replacement_str, "</thead>\n"); - } - g_free(columns); - } - - /* Adding the footer of table */ - /* Closing </tbody> if requested */ - if (header == TRUE) - { - g_string_append(replacement_str, "</tbody>\n"); - } - - g_string_append(replacement_str, "</table>\n"); - return replacement_str; -} - - -static GString* convert_to_table_sql(gchar** rows) -{ - guint i; - guint j; - GString *replacement_str = NULL; - - g_return_val_if_fail(rows != NULL, NULL); - - /* Adding start */ - replacement_str = g_string_new(""); - - /* Iteration onto rows and building up lines for replacement */ - for (i = 0; rows[i] != NULL ; i++) - { - gchar **columns = NULL; - - g_string_append(replacement_str, "\t('"); - columns = g_strsplit_set(rows[i], "\t", -1); - - for (j = 0; columns[j] != NULL; j++) - { - if (j > 0) - { - g_string_append(replacement_str, "','"); - } - g_string_append(replacement_str, columns[j]); - } - - if (rows[i+1] != NULL) - { - g_string_append(replacement_str, "'),\n"); - } - else - { - g_string_append(replacement_str, "')\n"); - } - - g_free(columns); - } - return replacement_str; -} - static void convert_to_table(gboolean header) { GeanyDocument *doc = NULL;
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org