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
9 #ifndef CTAGS_MAIN_READ_H
10 #define CTAGS_MAIN_READ_H
15 #include "general.h" /* must always come first */
33 /* white space characters */
41 /* some hard to read characters */
46 /* symbolic representations, above 0xFF not to conflict with any byte */
47 STRING_SYMBOL
= ('S' + 0xff),
48 CHAR_SYMBOL
= ('C' + 0xff)
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 */