[anjuta] anjuta-tags: remove unneeded argument from readSourceLine



commit 3100d01c6ff0a5739e352984a5d20003aa899666
Author: Konstantin Kharlamov <Hi-Angel yandex ru>
Date:   Thu Feb 28 02:20:51 2019 +0300

    anjuta-tags: remove unneeded argument from readSourceLine
    
    Signed-off-by: Konstantin Kharlamov <Hi-Angel yandex ru>

 plugins/symbol-db/anjuta-tags/entry.c | 9 ++++-----
 plugins/symbol-db/anjuta-tags/read.c  | 4 +---
 plugins/symbol-db/anjuta-tags/read.h  | 2 +-
 3 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/plugins/symbol-db/anjuta-tags/entry.c b/plugins/symbol-db/anjuta-tags/entry.c
index 28bfe074d..8d3a0af0a 100644
--- a/plugins/symbol-db/anjuta-tags/entry.c
+++ b/plugins/symbol-db/anjuta-tags/entry.c
@@ -642,7 +642,7 @@ static size_t writeCompactSourceLine (FILE *const fp, const char *const line)
 static int writeXrefEntry (const tagEntryInfo *const tag)
 {
        const char *const line =
-                       readSourceLine (TagFile.vLine, tag->filePosition, NULL);
+                       readSourceLine (TagFile.vLine, tag->filePosition);
        int length;
 
        if (Option.tagFileFormat == 1)
@@ -685,9 +685,8 @@ static int writeEtagsEntry (const tagEntryInfo *const tag)
                                tag->name, tag->lineNumber);
        else
        {
-               long seekValue;
                char *const line =
-                               readSourceLine (TagFile.vLine, tag->filePosition, &seekValue);
+                               readSourceLine (TagFile.vLine, tag->filePosition);
 
                if (tag->truncateLine)
                        truncateTagLine (line, tag->name, TRUE);
@@ -695,7 +694,7 @@ static int writeEtagsEntry (const tagEntryInfo *const tag)
                        line [strlen (line) - 1] = '\0';
 
                length = fprintf (TagFile.etags.fp, "%s\177%s\001%lu,%ld\n", line,
-                               tag->name, tag->lineNumber, seekValue);
+                               tag->name, tag->lineNumber, tag->filePosition);
        }
        TagFile.etags.byteCount += length;
 
@@ -772,7 +771,7 @@ static int addExtensionFields (const tagEntryInfo *const tag)
 
 static int writePatternEntry (const tagEntryInfo *const tag)
 {
-       char *const line = readSourceLine (TagFile.vLine, tag->filePosition, NULL);
+       char *const line = readSourceLine (TagFile.vLine, tag->filePosition);
        const int searchChar = Option.backward ? '?' : '/';
        boolean newlineTerminated;
        int length = 0;
diff --git a/plugins/symbol-db/anjuta-tags/read.c b/plugins/symbol-db/anjuta-tags/read.c
index 302aaa9d8..99ed02154 100644
--- a/plugins/symbol-db/anjuta-tags/read.c
+++ b/plugins/symbol-db/anjuta-tags/read.c
@@ -554,15 +554,13 @@ long getInputFilePosition() {
  *  "location".
  */
 extern char *readSourceLine (
-               vString *const vLine, long location, long *const pSeekValue)
+               vString *const vLine, long location)
 {
        fpos_t orignalPosition;
        char *result;
 
        fgetpos (File.fp, &orignalPosition);
        fseek (File.fp, location, SEEK_SET);
-       if (pSeekValue != NULL)
-               *pSeekValue = ftell (File.fp);
        result = readLine (vLine, File.fp);
        if (result == NULL)
                error (FATAL, "Unexpected end of file: %s", vStringValue (File.name));
diff --git a/plugins/symbol-db/anjuta-tags/read.h b/plugins/symbol-db/anjuta-tags/read.h
index ed872ed3d..510dc2bf1 100644
--- a/plugins/symbol-db/anjuta-tags/read.h
+++ b/plugins/symbol-db/anjuta-tags/read.h
@@ -108,7 +108,7 @@ extern int fileSkipToCharacter (int c);
 extern void fileUngetc (int c);
 extern const unsigned char *fileReadLine (void);
 extern char *readLine (vString *const vLine, FILE *const fp);
-extern char *readSourceLine (vString *const vLine, long location, long *const pSeekValue);
+extern char *readSourceLine (vString *const vLine, long location);
 extern long getInputFilePosition(void);
 
 #endif  /* _READ_H */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]