Commit 3100d01c authored by Konstantin Kharlamov's avatar Konstantin Kharlamov

anjuta-tags: remove unneeded argument from readSourceLine

Signed-off-by: Konstantin Kharlamov's avatarKonstantin Kharlamov <Hi-Angel@yandex.ru>
parent 0adbb545
......@@ -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;
......
......@@ -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));
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment