~ubuntu-branches/debian/experimental/geany/experimental

« back to all changes in this revision

Viewing changes to tagmanager/entry.c

  • Committer: Bazaar Package Importer
  • Author(s): Damián Viano
  • Date: 2008-05-02 11:37:45 UTC
  • mfrom: (1.2.1 upstream) (3.1.6 hardy)
  • Revision ID: james.westby@ubuntu.com-20080502113745-xzp4g6dmovrpoj17
Tags: 0.14-1
New upstream release (Closes: #478126)

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
#include <ctype.h>      /* to define isspace () */
18
18
#include <errno.h>
19
19
#include <glib.h>
 
20
#include <glib/gstdio.h>
20
21
 
21
22
#if defined (HAVE_SYS_TYPES_H)
22
23
# include <sys/types.h>     /* to declare off_t on some hosts */
248
249
static boolean isTagFile (const char *const filename)
249
250
{
250
251
    boolean ok = FALSE;                 /* we assume not unless confirmed */
251
 
    FILE *const fp = fopen (filename, "rb");
 
252
    FILE *const fp = g_fopen (filename, "rb");
252
253
 
253
254
    if (fp == NULL  &&  errno == ENOENT)
254
255
        ok = TRUE;
284
285
 
285
286
extern void copyFile (const char *const from, const char *const to, const long size)
286
287
{
287
 
    FILE* const fromFp = fopen (from, "rb");
 
288
    FILE* const fromFp = g_fopen (from, "rb");
288
289
    if (fromFp == NULL)
289
290
        error (FATAL | PERROR, "cannot open file to copy");
290
291
    else
291
292
    {
292
 
        FILE* const toFp = fopen (to, "wb");
 
293
        FILE* const toFp = g_fopen (to, "wb");
293
294
        if (toFp == NULL)
294
295
            error (FATAL | PERROR, "cannot open copy destination");
295
296
        else
327
328
 
328
329
    if (Option.append  &&  fileExists)
329
330
    {
330
 
        TagFile.fp = fopen (TagFile.name, "r+");
 
331
        TagFile.fp = g_fopen (TagFile.name, "r+");
331
332
        if (TagFile.fp != NULL)
332
333
        {
333
334
            TagFile.numTags.prev = updatePseudoTags (TagFile.fp);
334
335
            fclose (TagFile.fp);
335
 
            TagFile.fp = fopen (TagFile.name, "a+");
 
336
            TagFile.fp = g_fopen (TagFile.name, "a+");
336
337
        }
337
338
    }
338
339
    else
339
340
    {
340
 
        TagFile.fp = fopen (TagFile.name, "w");
 
341
        TagFile.fp = g_fopen (TagFile.name, "w");
341
342
        if (TagFile.fp != NULL)
342
343
            addPseudoTags ();
343
344
    }