Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ctags sync, part 1 #1160

Merged
merged 63 commits into from Sep 10, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
ffa09b0
ctags: Remove unused Geany-specific tagEntryInfo fields
techee Jul 28, 2016
7068e7c
ctags: Remove useless Geany-specific tagEntryInfo::type field
techee Jul 28, 2016
f791e91
ctags: Rename Geany-specific tagEntryInfo::arglist to upstream's ::si…
techee Jul 28, 2016
7b9d0dd
Make parser includes closer to uctags and sync parser license header
techee Jul 28, 2016
001c7f6
Move keywordTable definition to parse.h and use it for all parsers
techee Jul 28, 2016
282ed7d
Define ARRAY_SIZE() and use it instead of KIND_COUNT()
techee Jul 28, 2016
bf0702e
Use uctags implementation of keyword.c/h
techee Jul 29, 2016
6bc5797
Don't use combination of tabs and spaces for indentation
techee Jul 29, 2016
ae8dc54
Add keywordTable to parserDefinition and use a common way to initiali…
techee Jul 29, 2016
3dd1fb4
Rename "mio" member of sInputFile to "fp"
techee Jul 29, 2016
7ac17b6
Eliminate readNextChar() and pushBackChar()
techee Jul 29, 2016
1e36d23
Add separate "input" entry to sInputFile and use it
techee Jul 30, 2016
acdc440
Rename fileGetc() to getcFromInputFile()
techee Jul 30, 2016
357e4fe
Rename fileUngetc() to ungetcToInputFile()
techee Jul 30, 2016
61278d4
Rename fileSkipToCharacter() to skipToCharacterInInputFile()
techee Jul 30, 2016
bf2b642
Rename fileGetNthPrevC() to getNthPrevCFromInputFile()
techee Jul 30, 2016
bbbbb30
Rename fileReadLine() to readLineFromInputFile()
techee Jul 30, 2016
ba2209e
Rename readLine() to readLineRaw()
techee Jul 30, 2016
781738f
Replace fileGetc() with getcFromInputFile() also in comments
techee Jul 30, 2016
cb1c154
Eliminate some trivial diffs in read.c
techee Jul 30, 2016
0ed5c16
Rename tagEntryInfo.extensionFields.scope
techee Jul 30, 2016
359c60b
Rename get.c/h to lcpp.c/h
techee Jul 31, 2016
4fbd38f
Pass kind information into initTagEntry()
techee Jul 31, 2016
781f4ef
Use getInputLineNumber() instead of getSourceLineNumber() in parsers
techee Jul 31, 2016
8c0bfbb
Add parserNewFull() and use it for selected parsers
techee Aug 1, 2016
1b32ac5
Add full xtag implementation and use it to check XTAG_QUALIFIED_TAGS
techee Aug 1, 2016
d440a81
Add tagRegexTable to parserDefinition and use it to define regex parsers
techee Aug 1, 2016
ea72ecc
Remove ctags.c and move its content to routines.c, main.c and options.c
techee Aug 2, 2016
9c4c113
Remove some additional functions from ctags which we don't need in Geany
techee Aug 3, 2016
7e0845b
Make PathDelimiters match the declaration in header
techee Aug 3, 2016
eb45c80
Always define ExecutableName variable
techee Aug 3, 2016
530f475
Revert "Rename "mio" member of sInputFile to "fp""
techee Aug 6, 2016
0ec3590
Remove makeSimpleScopedTag() and fix scope for conf filetype
techee Aug 6, 2016
0650707
Fix pascal tag initizalization
techee Aug 6, 2016
026da60
Move selected() under Miscellaneous macros
techee Aug 6, 2016
11dcc5e
Fix indentation
techee Aug 6, 2016
9745d47
Sync whitespace in parsers
techee Aug 6, 2016
082a972
Use ARRAY_SIZE() in parsers
techee Aug 6, 2016
7bd81ab
Change isLanguage() to isInputLanguage()
techee Aug 6, 2016
2161b73
Change isHeaderFile() to isInputHeaderFile()
techee Aug 6, 2016
76818f9
Change getSourceFileName() to getInputFileName()
techee Aug 6, 2016
2671d73
Use skipToCharacterInInputFile() in all parsers
techee Aug 6, 2016
1d48599
Remove R regex parser
techee Aug 6, 2016
95f9462
Rename isident() to cppIsident()
techee Aug 6, 2016
88a8724
Rename isident1() to cppIsident1()
techee Aug 6, 2016
2638899
Rename isBraceFormat to cppIsBraceFormat()
techee Aug 6, 2016
4910e25
Rename getDirectiveNestLevel() to cppGetDirectiveNestLevel()
techee Aug 6, 2016
d122229
Rename skipOverCComment() to cppSkipOverCComment()
techee Aug 6, 2016
20ad9ad
Make getArglistFromStr() static
techee Aug 6, 2016
a59f82e
Rename getArglistFromFilePos() to cppGetArglistFromFilePos() to match…
techee Aug 6, 2016
25c1d22
objc: Remove unnecessary redefinition of UNUSED
techee Aug 7, 2016
02138f9
Rename TM_DEBUG macro to DEBUG
techee Aug 7, 2016
967b572
Rename MIO variables from fp to mio
techee Aug 7, 2016
ca65fa2
Sync whitespace and comments in main
techee Aug 7, 2016
e866a97
entry: Move functions around a bit to reduce the amount of diffs
techee Aug 8, 2016
0eca258
Fix incorrect use of MIO
techee Aug 8, 2016
d0cc3dc
Remove TagEntryFunction check in c.c
techee Aug 10, 2016
a974f35
Define KEYWORD_NONE in keyword.h so it doesn't have to be defined by …
techee Aug 16, 2016
b7f7ce2
Drop vi modelines
techee Aug 19, 2016
cb7da79
Add CTAGS_ATTR_ prefix to UNUSED() and PRINTF() macros
techee Aug 22, 2016
1e14667
Don't compare foreign values to enumeration type
techee Sep 9, 2016
f511787
Add missing prototypes
techee Sep 9, 2016
63c054a
#if 0 currently unused code to avoid compiler warning
techee Sep 9, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions ctags/main/entry.c
Expand Up @@ -366,8 +366,8 @@ extern void openTagFile (void)
static int replacementTruncate (const char *const name, const long size)
{
char *tempName = NULL;
FILE *fp = tempFile ("w", &tempName);
fclose (fp);
MIO *mio = tempFile ("w", &tempName);
fclose (mio);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that looks awfully wrong :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, I have managed to screw this up both for uctags and Geany :-(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the compiler freak-out on that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codebrainz a little, but just because of incompatible pointer cast, nothing more

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition there are ifdefs around and it gets compiled only when truncate() or ftruncate() are missing on the system (Geany's config.h defines HAVE_FTRUNCATE).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Geany's config.h defines HAVE_FTRUNCATE

only if it's actually found on the system

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only if it's actually found on the system

Yeah, of course, I was just commenting the fact that I didn't see any warnings from the compiler because it didn't get compiled on my system.

copyFile (name, tempName, size);
copyFile (tempName, name, WHOLE_FILE);
remove (tempName);
Expand Down
14 changes: 7 additions & 7 deletions ctags/main/read.c
Expand Up @@ -247,7 +247,7 @@ static boolean parseLineDirective (void)
*/

/* This function opens an input file, and resets the line counter. If it
* fails, it will display an error message and leave the File.fp set to NULL.
* fails, it will display an error message and leave the File.mio set to NULL.
*/
extern boolean fileOpen (const char *const fileName, const langType language)
{
Expand Down Expand Up @@ -539,12 +539,12 @@ extern const unsigned char *readLineFromInputFile (void)
/*
* Raw file line reading with automatic buffer sizing
*/
extern char *readLineRaw (vString *const vLine, MIO *const fp)
extern char *readLineRaw (vString *const vLine, MIO *const mio)
{
char *result = NULL;

vStringClear (vLine);
if (fp == NULL) /* to free memory allocated to buffer */
if (mio == NULL) /* to free memory allocated to buffer */
error (FATAL, "NULL file pointer");
else
{
Expand All @@ -560,13 +560,13 @@ extern char *readLineRaw (vString *const vLine, MIO *const fp)
char *const pLastChar = vStringValue (vLine) + vStringSize (vLine) -2;
long startOfLine;

startOfLine = mio_tell(fp);
startOfLine = mio_tell(mio);
reReadLine = FALSE;
*pLastChar = '\0';
result = mio_gets (fp, vStringValue (vLine), (int) vStringSize (vLine));
result = mio_gets (mio, vStringValue (vLine), (int) vStringSize (vLine));
if (result == NULL)
{
if (! mio_eof (fp))
if (! mio_eof (mio))
error (FATAL | PERROR, "Failure on attempt to read file");
}
else if (*pLastChar != '\0' &&
Expand All @@ -575,7 +575,7 @@ extern char *readLineRaw (vString *const vLine, MIO *const fp)
/* buffer overflow */
reReadLine = vStringAutoResize (vLine);
if (reReadLine)
mio_seek (fp, startOfLine, SEEK_SET);
mio_seek (mio, startOfLine, SEEK_SET);
else
error (FATAL | PERROR, "input line too big; out of memory");
}
Expand Down
2 changes: 1 addition & 1 deletion ctags/main/read.h
Expand Up @@ -114,7 +114,7 @@ extern int getNthPrevCFromInputFile (unsigned int nth, int def);
extern int skipToCharacterInInputFile (int c);
extern void ungetcToInputFile (int c);
extern const unsigned char *readLineFromInputFile (void);
extern char *readLineRaw (vString *const vLine, MIO *const fp);
extern char *readLineRaw (vString *const vLine, MIO *const mio);
extern char *readSourceLine (vString *const vLine, MIOPos location, long *const pSeekValue);
extern boolean bufferOpen (unsigned char *buffer, size_t buffer_size,
const char *const fileName, const langType language );
Expand Down