Re: write to a file using g_print

2012-08-22 Thread Ardhan Madras
> How I can transfer the filename from open_file to activate_func? When the activate_func() will be invoked? is it a callback function or something?. I don't know why and how you implemented that, but you already retrieved filename in open_file(), if you supposed to call activate_func() here, you

Re: write to a file using g_print

2012-08-22 Thread Rudra Banerjee
tions, use > FILE pointer instead. > > #include > #include > #include > > FILE *fop = open("bib2.bib", "w"); > /* you can call g_fprintf() or fprintf() */ > > see man 3 printf > > > Is it possible to write to a file using g_print? >

Re: write to a file using g_print

2012-08-21 Thread Ardhan Madras
Sorry my bad. > FILE *fop = open("bib2.bib", "w"); It should be fopen() Regards. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: write to a file using g_print

2012-08-21 Thread Ardhan Madras
e man 3 printf > Is it possible to write to a file using g_print? g_print() already write to standard output FILE, but you can dup() standard output to another file. Regards. On Wed, Aug 22, 2012 at 6:42 AM, Rudra Banerjee wrote: > Is it possible to write to a file using g_print? > I wa

Re: write to a file using g_print

2012-08-21 Thread David Nečas
On Tue, Aug 21, 2012 at 11:42:53PM +0100, Rudra Banerjee wrote: > Is it possible to write to a file using g_print? g_print() is not an interface to print things to *a specific destination*. Quite the opposite. It sends messages to the print handler. Depending on the print handler stup, it

write to a file using g_print

2012-08-21 Thread Rudra Banerjee
Is it possible to write to a file using g_print? I was trying something like: FILE *fop = g_open("bib2.bib","w"); g_print ("%s%s",strcombo,strkey, fop); but its not working. Even fprintf is giving warning and not writing. mkbib.c:114:15: warning: initializat