writing to a buffer: help
- From: Rudra Banerjee <rudra banerjee aol co uk>
- To: gtk devel <gtk-app-devel-list gnome org>
- Subject: writing to a buffer: help
- Date: Wed, 30 Jan 2013 15:07:02 +0000
Dear friends,
Please have a look at http://fpaste.org/gvF3/
So, I am writing those values to a string and then to a file(for now!)
given that, Entries e are a structure, as,
typedef struct {
GtkWidget *combo, *entry1, *entryAuth, *entryEditor, *entryTitle,
*entryPub, *entryVol, *entryIss, *entryPage, *entryMon,
*entryNote, *entryKey, *entryYear, *entryAdd, *entryEdition,
*entryJournal, *entrySeries, *entryBooktitle, *entryOrg,
*entryChap, *entrySchool;
} Entries;
is there a better way of writing this; considering the fact that I have
to check if any of the entry is NULL?
My second question in this is that,
I have created a buffer from a file in a different function as
char* buffer;
gsize length;
GError* error=NULL;
filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
g_file_get_contents(filename, &buffer, &length , &error);
I have not "g_free"-d it. Can I use the same buffer to if I want to
append the buffer from update_file.c? Or should I g_free that buffer and
reopen it?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]