~ubuntu-branches/ubuntu/wily/geany/wily

« back to all changes in this revision

Viewing changes to tagmanager/lregex.c

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2011-12-10 07:43:26 UTC
  • mfrom: (3.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20111210074326-s8yqbew5i20h33tf
Tags: 0.21-1ubuntu1
* Merge from Debian Unstable, remaining changes:
  - debian/patches/20_use_evince_viewer.patch:
     + use evince as viewer for pdf and dvi files
  - debian/patches/20_use_x_terminal_emulator.patch:
     + use x-terminal-emulator as terminal
  - debian/control
     + Add breaks on geany-plugins-common << 0.20
* Also fixes bugs:
  - Filter for MATLAB/Octave files filters everythign (LP: 885505)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
*   $Id: lregex.c 5214 2010-09-09 14:44:41Z ntrel $
 
2
*   $Id: lregex.c 5555 2011-03-05 22:40:50Z colombanw $
3
3
*
4
4
*   Copyright (c) 2000-2003, Darren Hiebert
5
5
*
20
20
 
21
21
#include <string.h>
22
22
#include <glib.h>
 
23
#include <mio/mio.h>
23
24
 
24
25
#ifdef HAVE_REGCOMP
25
26
# include <ctype.h>
410
411
        else
411
412
        {
412
413
                const char* regexfile = parameter + 1;
413
 
                FILE* const fp = fopen (regexfile, "r");
414
 
                if (fp == NULL)
 
414
                MIO* const mio = mio_new_file (regexfile, "r");
 
415
                if (mio == NULL)
415
416
                        printf ("regex: %s\n", regexfile);
416
417
                else
417
418
                {
418
419
                        vString* const regex = vStringNew ();
419
 
                        while (readLine (regex, fp))
 
420
                        while (readLine (regex, mio))
420
421
                                addLanguageRegex (language, vStringValue (regex));
421
 
                        fclose (fp);
 
422
                        mio_free (mio);
422
423
                        vStringDelete (regex);
423
424
                }
424
425
        }