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: initialization makes pointer from integer without

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 do

Re: write to a file using g_print

2012-08-21 Thread Ardhan Madras
g_open() is wrapper to open() syscall, not the standard libc's fopen(). mkbib.c:114:15: warning: initialization makes pointer from integer without a cast [enabled by default] You got this because g_open() returning a int (file descriptor) not a FILE pointer. You must distinguish each I/O