[geany/geany] c1acde: read: move sInputFileInfo, sInputFile and File to read.c

Jiří Techet git-noreply at xxxxx
Mon Dec 17 21:05:46 UTC 2018


Branch:      refs/heads/master
Author:      Jiří Techet <techet at gmail.com>
Committer:   Jiří Techet <techet at gmail.com>
Date:        Mon, 10 Oct 2016 22:13:25 UTC
Commit:      c1acde7eff0cb98ec34588c7d45bcfe1be20e7e8
             https://github.com/geany/geany/commit/c1acde7eff0cb98ec34588c7d45bcfe1be20e7e8

Log Message:
-----------
read: move sInputFileInfo, sInputFile and File to read.c


Modified Paths:
--------------
    ctags/main/read.c
    ctags/main/read.h

Modified: ctags/main/read.c
41 lines changed, 38 insertions(+), 3 deletions(-)
===================================================================
@@ -35,12 +35,47 @@
 #include <regex.h>
 
 /*
-*   DATA DEFINITIONS
+*   DATA DECLARATIONS
 */
-inputFile File;                 /* globally read through macros */
-static MIOPos StartOfLine;      /* holds deferred position of start of line */
 
 
+/*  Maintains the state of the current input file.
+ */
+typedef struct sInputFileInfo {
+	vString *name;           /* name to report for input file */
+	vString *tagPath;        /* path of input file relative to tag file */
+	unsigned long lineNumber;/* line number in the input file */
+	unsigned long lineNumberOrigin; /* The value set to `lineNumber'
+					   when `resetInputFile' is called
+					   on the input stream.
+					   This is needed for nested stream. */
+	bool isHeader;           /* is input file a header file? */
+	langType language;       /* language of input file */
+} inputFileInfo;
+
+typedef struct sInputFile {
+	vString    *path;          /* path of input file (if any) */
+	vString    *line;          /* last line read from file */
+	const unsigned char* currentLine;  /* current line being worked on */
+	MIO        *mio;           /* MIO stream used for reading the file */
+	MIOPos      filePosition;  /* file position of current line */
+	unsigned int ungetchIdx;
+	int         ungetchBuf[3]; /* characters that were ungotten */
+
+	/*  Contains data pertaining to the original `source' file in which the tag
+	 *  was defined. This may be different from the `input' file when #line
+	 *  directives are processed (i.e. the input file is preprocessor output).
+	 */
+	inputFileInfo input; /* name, lineNumber */
+	inputFileInfo source;
+} inputFile;
+
+/*
+*   DATA DEFINITIONS
+*/
+static inputFile File;  /* static read through functions */
+static MIOPos StartOfLine;  /* holds deferred position of start of line */
+
 /*
 *   FUNCTION DEFINITIONS
 */


Modified: ctags/main/read.h
36 lines changed, 0 insertions(+), 36 deletions(-)
===================================================================
@@ -48,42 +48,6 @@ enum eCharacters {
 	CHAR_SYMBOL   = ('C' + 0xff)
 };
 
-/*  Maintains the state of the current input file.
- */
-typedef struct sInputFileInfo {
-	vString *name;           /* name to report for input file */
-	vString *tagPath;        /* path of input file relative to tag file */
-	unsigned long lineNumber;/* line number in the input file */
-	unsigned long lineNumberOrigin; /* The value set to `lineNumber'
-					   when `resetInputFile' is called
-					   on the input stream.
-					   This is needed for nested stream. */
-	bool isHeader;           /* is input file a header file? */
-	langType language;       /* language of input file */
-} inputFileInfo;
-
-typedef struct sInputFile {
-	vString *path;      /* path of input file (if any) */
-	vString *line;      /* last line read from file */
-	const unsigned char* currentLine;   /* current line being worked on */
-	MIO     *mio;       /* MIO stream used for reading the file */
-	MIOPos  filePosition;   /* file position of current line */
-	unsigned int ungetchIdx;
-	int     ungetchBuf[3];  /* characters that were ungotten */
-
-	/*  Contains data pertaining to the original source file in which the tag
-	 *  was defined. This may be different from the input file when #line
-	 *  directives are processed (i.e. the input file is preprocessor output).
-	 */
-	inputFileInfo input; /* name, lineNumber */
-	inputFileInfo source;
-} inputFile;
-
-/*
-*   GLOBAL VARIABLES
-*/
-/* should not be modified externally */
-extern inputFile File;
 
 /*
 *   FUNCTION PROTOTYPES



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list