SF.net SVN: geany-plugins:[869] trunk/geany-plugins/geanylatex/src
frlan at users.sourceforge.net
frlan at xxxxx
Sun Jul 26 20:13:46 UTC 2009
Revision: 869
http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=869&view=rev
Author: frlan
Date: 2009-07-26 20:13:46 +0000 (Sun, 26 Jul 2009)
Log Message:
-----------
Fix a compiler warning on GeanyLaTeX
Modified Paths:
--------------
trunk/geany-plugins/geanylatex/src/reftex.c
trunk/geany-plugins/geanylatex/src/reftex.h
Modified: trunk/geany-plugins/geanylatex/src/reftex.c
===================================================================
--- trunk/geany-plugins/geanylatex/src/reftex.c 2009-07-25 20:08:38 UTC (rev 868)
+++ trunk/geany-plugins/geanylatex/src/reftex.c 2009-07-26 20:13:46 UTC (rev 869)
@@ -27,7 +27,7 @@
{
gchar **aux_entries = NULL;
int i = 0;
- LaTeXLabel tmp;
+ LaTeXLabel *tmp;
if (file != NULL)
{
aux_entries = geanylatex_read_file_in_array(file);
@@ -38,16 +38,19 @@
if (g_str_has_prefix(aux_entries[i], "\\newlabel"))
{
tmp = glatex_parseLine(aux_entries[i]);
- gtk_combo_box_append_text(GTK_COMBO_BOX(combobox), tmp.label_name);
+ gtk_combo_box_append_text(GTK_COMBO_BOX(combobox),
+ tmp->label_name);
+ g_free(tmp);
}
}
}
}
}
-LaTeXLabel glatex_parseLine(const gchar *line)
+LaTeXLabel* glatex_parseLine(const gchar *line)
{
- LaTeXLabel label;
+ LaTeXLabel *label;
+ label = g_new0(LaTeXLabel, 1);
gchar *t = NULL;
const gchar *x = NULL;
@@ -64,7 +67,7 @@
x++;
}
}
- label.label_name = g_strndup(line, l);
+ label->label_name = g_strndup(line, l);
return label;
}
Modified: trunk/geany-plugins/geanylatex/src/reftex.h
===================================================================
--- trunk/geany-plugins/geanylatex/src/reftex.h 2009-07-25 20:08:38 UTC (rev 868)
+++ trunk/geany-plugins/geanylatex/src/reftex.h 2009-07-26 20:13:46 UTC (rev 869)
@@ -33,6 +33,6 @@
void glatex_add_Labels(GtkWidget *combobox, const gchar *file);
-LaTeXLabel glatex_parseLine(const gchar *line);
+LaTeXLabel *glatex_parseLine(const gchar *line);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Plugins-Commits
mailing list