read: Some function renaming
[geany-mirror.git] / ctags / main / read.h
blob44cc0a3e178b3758374b1652ac9f9bdf7ddd1a20
1 /*
2 * Copyright (c) 1998-2002, Darren Hiebert
4 * This source code is released for free distribution under the terms of the
5 * GNU General Public License version 2 or (at your option) any later version.
7 * External interface to read.c
8 */
9 #ifndef CTAGS_MAIN_READ_H
10 #define CTAGS_MAIN_READ_H
13 * INCLUDE FILES
15 #include "general.h" /* must always come first */
17 #include <stdio.h>
18 #include <ctype.h>
20 #include "parse.h"
21 #include "vstring.h"
22 #include "mio.h"
25 * MACROS
29 * DATA DECLARATIONS
32 enum eCharacters {
33 /* white space characters */
34 SPACE = ' ',
35 NEWLINE = '\n',
36 CRETURN = '\r',
37 FORMFEED = '\f',
38 TAB = '\t',
39 VTAB = '\v',
41 /* some hard to read characters */
42 DOUBLE_QUOTE = '"',
43 SINGLE_QUOTE = '\'',
44 BACKSLASH = '\\',
46 /* symbolic representations, above 0xFF not to conflict with any byte */
47 STRING_SYMBOL = ('S' + 0xff),
48 CHAR_SYMBOL = ('C' + 0xff)
53 * FUNCTION PROTOTYPES
56 /* InputFile: reading from fp in inputFile with updating fields in input fields */
57 extern unsigned long getInputLineNumber (void);
58 extern int getInputLineOffset (void);
59 extern const char *getInputFileName (void);
60 extern MIOPos getInputFilePosition (void);
61 extern MIOPos getInputFilePositionForLine (int line);
62 extern langType getInputLanguage (void);
63 extern const char *getInputLanguageName (void);
64 extern const char *getInputFileTagPath (void);
65 extern bool isInputLanguage (langType lang);
66 extern bool isInputHeaderFile (void);
67 extern bool isInputLanguageKindEnabled (char c);
68 extern bool doesInputLanguageAllowNullTag (void);
69 extern kindOption *getInputLanguageFileKind (void);
70 extern bool doesInputLanguageRequestAutomaticFQTag (void);
72 extern void freeInputFileResources (void);
73 extern bool openInputFile (const char *const fileName, const langType language);
74 extern void closeInputFile (void);
75 extern int getcFromInputFile (void);
76 extern int getNthPrevCFromInputFile (unsigned int nth, int def);
77 extern int skipToCharacterInInputFile (int c);
78 extern void ungetcToInputFile (int c);
79 extern const unsigned char *readLineFromInputFile (void);
80 extern bool bufferOpen (unsigned char *buffer, size_t buffer_size,
81 const char *const fileName, const langType language );
83 extern const char *getSourceFileTagPath (void);
84 extern const char *getSourceLanguageName (void);
85 extern unsigned long getSourceLineNumber (void);
87 /* Raw: reading from given a parameter, fp */
88 extern char *readLineRaw (vString *const vLine, MIO *const mio);
90 /* Bypass: reading from fp in inputFile WITHOUT updating fields in input fields */
91 extern char *readLineFromBypass (vString *const vLine, MIOPos location, long *const pSeekValue);
93 #endif /* CTAGS_MAIN_READ_H */