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
8 changes: 4 additions & 4 deletions ctags/main/args.c
@@ -1,23 +1,23 @@
/*
*
* Copyright (c) 1999-2001, Darren Hiebert
* Copyright (c) 1999-2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for reading command line arguments.
*/

/*
* INCLUDE FILES
*/
#include "general.h" /* must always come first */
#include "general.h" /* must always come first */

#include <stdio.h>
#include <string.h>
#include <ctype.h>

#include "args.h"
#include "debug.h"
#include "routines.h"

/*
Expand Down
15 changes: 8 additions & 7 deletions ctags/main/args.h
@@ -1,19 +1,20 @@
/*
*
* Copyright (c) 1999-2001, Darren Hiebert
* Copyright (c) 1999-2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* Defines external interface to command line argument reading.
*/
#ifndef _ARGS_H
#define _ARGS_H
#ifndef CTAGS_MAIN_ARGS_H
#define CTAGS_MAIN_ARGS_H

/*
* INCLUDE FILES
*/
#include "general.h" /* must always come first */
#include "general.h" /* must always come first */

#include <stdio.h>

/*
* DATA DECLARATIONS
Expand Down Expand Up @@ -53,6 +54,6 @@ extern void argSetLineMode (Arguments* const current);
extern void argForth (Arguments* const current);
extern void argDelete (Arguments* const current);

#endif /* _ARGS_H */
#endif /* CTAGS_MAIN_ARGS_H */

/* vi:set tabstop=4 shiftwidth=4: */
12 changes: 7 additions & 5 deletions ctags/main/ctags.h
@@ -1,13 +1,15 @@
/*
* Copyright (c) 1996-2001, Darren Hiebert
* Copyright (c) 1996-2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* Program definitions
*/
#ifndef _CTAGS_H
#define _CTAGS_H
#ifndef CTAGS_MAIN_CTAGS_H
#define CTAGS_MAIN_CTAGS_H

#include "general.h"

/*
* MACROS
Expand All @@ -20,6 +22,6 @@
#define AUTHOR_NAME "Darren Hiebert"
#define AUTHOR_EMAIL "darren@hiebert.com"

#endif /* _CTAGS_H */
#endif /* CTAGS_MAIN_CTAGS_H */

/* vi:set tabstop=4 shiftwidth=4: */
21 changes: 10 additions & 11 deletions ctags/main/entry.c
@@ -1,29 +1,28 @@
/*
*
* Copyright (c) 1996-2001, Darren Hiebert
* Copyright (c) 1996-2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for creating tag entries.
*/

/*
* INCLUDE FILES
*/
#include "general.h" /* must always come first */
#include "general.h" /* must always come first */

#include <string.h>
#include <ctype.h> /* to define isspace () */
#include <ctype.h> /* to define isspace () */
#include <errno.h>
#include <glib.h>
#include <glib/gstdio.h>

#if defined (HAVE_SYS_TYPES_H)
# include <sys/types.h> /* to declare off_t on some hosts */
# include <sys/types.h> /* to declare off_t on some hosts */
#endif
#if defined (HAVE_TYPES_H)
# include <types.h> /* to declare off_t on some hosts */
# include <types.h> /* to declare off_t on some hosts */
#endif


Expand Down Expand Up @@ -159,14 +158,14 @@ static void addPseudoTags (void)
}
}

static void updateSortedFlag (const char *const line,
MIO *const mio, MIOPos startOfLine)
static void updateSortedFlag (
const char *const line, MIO *const mio, MIOPos startOfLine)
{
const char *const tab = strchr (line, '\t');

if (tab != NULL)
{
const long boolOffset = tab - line + 1; /* where it should be */
const long boolOffset = tab - line + 1; /* where it should be */

if (line [boolOffset] == '0' || line [boolOffset] == '1')
{
Expand Down Expand Up @@ -231,7 +230,7 @@ static long unsigned int updatePseudoTags (MIO *const mio)
}
line = readLineRaw (TagFile.vLine, mio);
}
while (line != NULL) /* skip to end of file */
while (line != NULL) /* skip to end of file */
{
++linesRead;
line = readLineRaw (TagFile.vLine, mio);
Expand Down
13 changes: 6 additions & 7 deletions ctags/main/entry.h
@@ -1,19 +1,18 @@
/*
*
* Copyright (c) 1998-2001, Darren Hiebert
* Copyright (c) 1998-2002, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* External interface to entry.c
*/
#ifndef _ENTRY_H
#define _ENTRY_H
#ifndef CTAGS_MAIN_ENTRY_H
#define CTAGS_MAIN_ENTRY_H

/*
* INCLUDE FILES
*/
#include "general.h" /* must always come first */
#include "general.h" /* must always come first */

#include "mio.h"
#include "vstring.h"
Expand Down Expand Up @@ -96,6 +95,6 @@ extern void endEtagsFile (const char *const name);
extern void makeTagEntry (const tagEntryInfo *const tag);
extern void initTagEntry (tagEntryInfo *const e, const char *const name, const kindOption *kind);

#endif /* _ENTRY_H */
#endif /* CTAGS_MAIN_ENTRY_H */

/* vi:set tabstop=4 shiftwidth=4: */
13 changes: 6 additions & 7 deletions ctags/main/general.h
@@ -1,19 +1,18 @@
/*
*
* Copyright (c) 1998-2001, Darren Hiebert
* Copyright (c) 1998-2003, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* Provides the general (non-ctags-specific) environment assumed by all.
*/
#ifndef _GENERAL_H
#define _GENERAL_H
#ifndef CTAGS_MAIN_GENERAL_H
#define CTAGS_MAIN_GENERAL_H

/*
* INCLUDE FILES
*/
#ifdef HAVE_CONFIG_H
#if defined (HAVE_CONFIG_H)
# include <config.h>
#endif
#ifdef macintosh
Expand Down Expand Up @@ -151,6 +150,6 @@ extern void *unlink (const char *);
extern char *getenv (const char *);
#endif

#endif /* _GENERAL_H */
#endif /* CTAGS_MAIN_GENERAL_H */

/* vi:set tabstop=4 shiftwidth=4: */
2 changes: 1 addition & 1 deletion ctags/main/lcpp.c
Expand Up @@ -166,7 +166,7 @@ extern void cppEndStatement (void)
* directives and may emit a tag for #define directives.
*/

/* This puts a character back into the input queue for the source File.
/* This puts a character back into the input queue for the input File.
* Up to two characters may be ungotten.
*/
extern void cppUngetc (const int c)
Expand Down
5 changes: 3 additions & 2 deletions ctags/main/lregex.c
Expand Up @@ -2,11 +2,11 @@
* Copyright (c) 2000-2003, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions for applying regular expression matching.
*
* The code for utlizing the Gnu regex package with regards to processing the
* The code for utilizing the Gnu regex package with regards to processing the
* regex option and checking for regex matches was adapted from routines in
* Gnu etags.
*/
Expand Down Expand Up @@ -91,6 +91,7 @@ static int SetUpper = -1; /* upper language index in list */
* FUNCTION DEFINITIONS
*/


static void clearPatternSet (const langType language)
{
if (language <= SetUpper)
Expand Down
2 changes: 1 addition & 1 deletion ctags/main/main.c
Expand Up @@ -71,7 +71,7 @@
/*
* MACROS
*/
#define plural(value) (((unsigned long)(value) == 1L) ? "" : "s")
#define plural(value) (((unsigned long)(value) == 1L) ? "" : "s")

/*
* DATA DEFINITIONS
Expand Down
2 changes: 1 addition & 1 deletion ctags/main/nestlevel.c
Expand Up @@ -3,7 +3,7 @@
* Copyright 2009-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* Defines external interface to scope nesting levels for tags.
*/
Expand Down
8 changes: 4 additions & 4 deletions ctags/main/nestlevel.h
Expand Up @@ -3,12 +3,12 @@
* Copyright 2009-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* Defines external interface to scope nesting levels for tags.
*/
#ifndef _NESTLEVEL_H
#define _NESTLEVEL_H
#ifndef CTAGS_MAIN_NESTLEVEL_H
#define CTAGS_MAIN_NESTLEVEL_H

/*
* INCLUDE FILES
Expand Down Expand Up @@ -47,6 +47,6 @@ extern void nestingLevelsPush(NestingLevels *nls,
extern void nestingLevelsPop(NestingLevels *nls);
extern NestingLevel *nestingLevelsGetCurrent(NestingLevels *nls);

#endif /* _NESTLEVEL_H */
#endif /* CTAGS_MAIN_NESTLEVEL_H */

/* vi:set tabstop=4 shiftwidth=4: */
15 changes: 7 additions & 8 deletions ctags/main/options.c
@@ -1,22 +1,21 @@
/*
*
* Copyright (c) 1996-2001, Darren Hiebert
* Copyright (c) 1996-2003, Darren Hiebert
*
* This source code is released for free distribution under the terms of the
* GNU General Public License.
* GNU General Public License version 2 or (at your option) any later version.
*
* This module contains functions to process command line options.
*/

/*
* INCLUDE FILES
*/
#include "general.h" /* must always come first */
#include "general.h" /* must always come first */

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h> /* to declare isspace () */
#include <ctype.h> /* to declare isspace () */

#include "ctags.h"
#include "routines.h"
Expand All @@ -28,7 +27,7 @@

#define CTAGS_ENVIRONMENT "CTAGS"

#define CTAGS_FILE "tags"
#define CTAGS_FILE "tags"


/* The following separators are permitted for list options.
Expand All @@ -39,14 +38,14 @@
#define IGNORE_SEPARATORS ", \t\n"

#ifndef DEFAULT_FILE_FORMAT
# define DEFAULT_FILE_FORMAT 2
# define DEFAULT_FILE_FORMAT 2
#endif

#if defined (WIN32) || defined (HAVE_OPENDIR)
# define RECURSE_SUPPORTED
#endif

#define isCompoundOption(c) (boolean) (strchr ("fohiILpDb", (c)) != NULL)
#define isCompoundOption(c) (boolean) (strchr ("fohiILpDb", (c)) != NULL)



Expand Down
6 changes: 3 additions & 3 deletions ctags/main/options.h
Expand Up @@ -18,7 +18,7 @@
/*
* INCLUDE FILES
*/
#include "general.h" /* must always come first */
#include "general.h" /* must always come first */

#include <stdarg.h>

Expand Down Expand Up @@ -88,7 +88,7 @@ typedef struct sOptionValues {
/*
* GLOBAL VARIABLES
*/
extern CONST_OPTION optionValues Option;
extern CONST_OPTION optionValues Option;

/*
* FUNCTION PROTOTYPES
Expand All @@ -106,6 +106,6 @@ extern void freeOptionResources (void);

void addIgnoreListFromFile (const char *const fileName);

#endif /* _OPTIONS_H */
#endif /* CTAGS_MAIN_OPTIONS_H */

/* vi:set tabstop=4 shiftwidth=4: */