~ubuntu-branches/ubuntu/raring/geany/raring-proposed

« back to all changes in this revision

Viewing changes to tagmanager/read.h

  • 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:
23
23
 
24
24
#include <stdio.h>
25
25
#include <ctype.h>
 
26
#include <mio/mio.h>
26
27
 
27
28
#include "parse.h"
28
29
#include "vstring.h"
33
34
#define getInputLineNumber()    File.lineNumber
34
35
#define getInputFileName()      vStringValue (File.source.name)
35
36
#define getInputFilePosition()  File.filePosition
36
 
#define getInputBufferPosition()        File.fpBufferPosition
37
37
#define getSourceFileName()     vStringValue (File.source.name)
38
38
#define getSourceFileTagPath()  File.source.tagPath
39
39
#define getSourceLanguage()     File.source.language
73
73
    vString     *path;          /* path of input file (if any) */
74
74
    vString     *line;          /* last line read from file */
75
75
    const unsigned char* currentLine;   /* current line being worked on */
76
 
    FILE        *fp;            /* stream used for reading the file */
77
 
    unsigned char* fpBuffer;    /* buffer which contains the text to be parsed.
78
 
                                   This is optional to the use of a file-descriptor */
79
 
    int fpBufferSize;           /* size of the fpBuffer */
80
 
    int fpBufferPosition;       /* pointer to the current position in buffer */
 
76
    MIO         *mio;           /* stream used for reading the file */
81
77
    unsigned long lineNumber;   /* line number in the input file */
82
 
    fpos_t      filePosition;   /* file position of current line */
 
78
    MIOPos      filePosition;   /* file position of current line */
83
79
    int         ungetch;        /* a single character that was ungotten */
84
80
    boolean     eof;            /* have we reached the end of file? */
85
81
    boolean     newLine;        /* will the next character begin a new line? */
106
102
/*
107
103
*   FUNCTION PROTOTYPES
108
104
*/
109
 
#ifdef NEED_PROTO_FGETPOS
110
 
extern int fgetpos  (FILE *stream, fpos_t *pos);
111
 
extern int fsetpos  (FILE *stream, const fpos_t *pos);
112
 
#endif
113
 
 
114
105
extern void freeSourceFileResources (void);
115
106
extern boolean fileOpen (const char *const fileName, const langType language);
116
107
extern boolean fileEOF (void);
118
109
extern int fileGetc (void);
119
110
extern void fileUngetc (int c);
120
111
extern const unsigned char *fileReadLine (void);
121
 
extern char *readLine (vString *const vLine, FILE *const fp);
122
 
extern char *readSourceLine (vString *const vLine, fpos_t location, long *const pSeekValue);
123
 
 
 
112
extern char *readLine (vString *const vLine, MIO *const mio);
 
113
extern char *readSourceLine (vString *const vLine, MIOPos location, long *const pSeekValue);
124
114
extern boolean bufferOpen (unsigned char *buffer, int buffer_size,
125
115
                           const char *const fileName, const langType language );
126
 
extern void bufferClose (void);
127
 
extern void setBufPos (int new_position);
128
 
extern int getBufPos (void);
129
 
extern boolean useFile (void);
 
116
#define bufferClose fileClose
130
117
 
131
118
#endif  /* _READ_H */
132
119