From 7b9d0dd83ce0874593758a620a9b9a2d256503c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ji=C5=99=C3=AD=20Techet?= Date: Thu, 28 Jul 2016 21:54:26 +0200 Subject: [PATCH] Make parser includes closer to uctags and sync parser license header Adds (currently empty) debug.h, routines.h and xtag.h and uses them at the same places like uctags. --- ctags/Makefile.am | 3 +++ ctags/main/debug.h | 0 ctags/main/routines.h | 0 ctags/main/xtag.h | 0 ctags/parsers/asm.c | 4 +++- ctags/parsers/basic.c | 3 ++- ctags/parsers/c.c | 10 ++++++---- ctags/parsers/cobol.c | 3 ++- ctags/parsers/css.c | 3 ++- ctags/parsers/diff.c | 3 ++- ctags/parsers/erlang.c | 4 ++-- ctags/parsers/fortran.c | 9 ++++++--- ctags/parsers/go.c | 6 ++++++ ctags/parsers/html.c | 3 ++- ctags/parsers/jscript.c | 6 +++++- ctags/parsers/json.c | 4 +++- ctags/parsers/lua.c | 3 ++- ctags/parsers/make.c | 4 +++- ctags/parsers/objc.c | 3 ++- ctags/parsers/pascal.c | 5 +++-- ctags/parsers/perl.c | 5 ++++- ctags/parsers/php.c | 4 +++- ctags/parsers/python.c | 7 +++++-- ctags/parsers/r.c | 7 ++++--- ctags/parsers/ruby.c | 2 ++ ctags/parsers/rust.c | 3 ++- ctags/parsers/sh.c | 6 ++++-- ctags/parsers/sql.c | 6 +++--- ctags/parsers/tcl.c | 3 ++- ctags/parsers/verilog.c | 11 +++++++---- ctags/parsers/vhdl.c | 2 ++ 31 files changed, 92 insertions(+), 40 deletions(-) create mode 100644 ctags/main/debug.h create mode 100644 ctags/main/routines.h create mode 100644 ctags/main/xtag.h diff --git a/ctags/Makefile.am b/ctags/Makefile.am index c8ae897f8..5f127ad33 100644 --- a/ctags/Makefile.am +++ b/ctags/Makefile.am @@ -57,6 +57,7 @@ libctags_la_SOURCES = \ main/args.h \ main/ctags.c \ main/ctags.h \ + main/debug.h \ main/entry.c \ main/entry.h \ main/general.h \ @@ -77,10 +78,12 @@ libctags_la_SOURCES = \ main/parsers.h \ main/read.c \ main/read.h \ + main/routines.h \ main/sort.c \ main/sort.h \ main/strlist.c \ main/strlist.h \ main/vstring.c \ main/vstring.h \ + main/xtag.h \ $(parsers) diff --git a/ctags/main/debug.h b/ctags/main/debug.h new file mode 100644 index 000000000..e69de29bb diff --git a/ctags/main/routines.h b/ctags/main/routines.h new file mode 100644 index 000000000..e69de29bb diff --git a/ctags/main/xtag.h b/ctags/main/xtag.h new file mode 100644 index 000000000..e69de29bb diff --git a/ctags/parsers/asm.c b/ctags/parsers/asm.c index 1b3acd1e9..9b1b3b7eb 100644 --- a/ctags/parsers/asm.c +++ b/ctags/parsers/asm.c @@ -2,7 +2,7 @@ * 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 generating tags for assembly language * files. @@ -15,9 +15,11 @@ #include +#include "debug.h" #include "keyword.h" #include "parse.h" #include "read.h" +#include "routines.h" #include "main.h" #include "vstring.h" diff --git a/ctags/parsers/basic.c b/ctags/parsers/basic.c index 1ec84e048..0dc2b25fd 100644 --- a/ctags/parsers/basic.c +++ b/ctags/parsers/basic.c @@ -2,7 +2,7 @@ * Copyright (c) 2000-2006, Darren Hiebert, Elias Pschernig * * 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 generating tags for BlitzBasic * (BlitzMax), PureBasic and FreeBasic language files. For now, this is kept @@ -19,6 +19,7 @@ #include "parse.h" #include "read.h" +#include "routines.h" #include "vstring.h" /* diff --git a/ctags/parsers/c.c b/ctags/parsers/c.c index cf577494a..d6392941b 100644 --- a/ctags/parsers/c.c +++ b/ctags/parsers/c.c @@ -1,11 +1,10 @@ /* -* -* 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 for parsing and scanning C, C++, D and Java +* This module contains functions for parsing and scanning C, C++, C#, D and Java * source files. */ @@ -17,6 +16,7 @@ #include #include +#include "debug.h" #include "mio.h" #include "entry.h" #include "get.h" @@ -25,6 +25,8 @@ #include "options.h" #include "parse.h" #include "read.h" +#include "routines.h" +#include "xtag.h" /* * MACROS diff --git a/ctags/parsers/cobol.c b/ctags/parsers/cobol.c index 5c322328c..b86467b4d 100644 --- a/ctags/parsers/cobol.c +++ b/ctags/parsers/cobol.c @@ -2,7 +2,7 @@ * 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 generating tags for COBOL language * files. @@ -13,6 +13,7 @@ */ #include "general.h" /* must always come first */ #include "parse.h" +#include "routines.h" /* * FUNCTION DEFINITIONS diff --git a/ctags/parsers/css.c b/ctags/parsers/css.c index 70ca1ea65..0a983b5c8 100644 --- a/ctags/parsers/css.c +++ b/ctags/parsers/css.c @@ -2,6 +2,7 @@ * css.c * Token-based parser for CSS definitions * Author - Colomban Wendling + * License GPL-2 **************************************************************************/ #include "general.h" @@ -11,7 +12,7 @@ #include "entry.h" #include "parse.h" #include "read.h" - +#include "routines.h" typedef enum eCssKinds { K_CLASS, K_SELECTOR, K_ID diff --git a/ctags/parsers/diff.c b/ctags/parsers/diff.c index 5eec7c08a..0e820239e 100644 --- a/ctags/parsers/diff.c +++ b/ctags/parsers/diff.c @@ -3,7 +3,7 @@ * Copyright (c) 2000-2001, 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 generating tags for diff files (based on Sh parser). */ @@ -17,6 +17,7 @@ #include #include "parse.h" +#include "routines.h" #include "read.h" #include "vstring.h" diff --git a/ctags/parsers/erlang.c b/ctags/parsers/erlang.c index 6d51dc898..be147bad9 100644 --- a/ctags/parsers/erlang.c +++ b/ctags/parsers/erlang.c @@ -2,7 +2,7 @@ * Copyright (c) 2003, Brent Fulgham * * 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 generating tags for Erlang language * files. Some of the parsing constructs are based on the Emacs 'etags' @@ -18,7 +18,7 @@ #include "entry.h" #include "options.h" #include "read.h" -// #include "routines.h" +#include "routines.h" #include "vstring.h" /* diff --git a/ctags/parsers/fortran.c b/ctags/parsers/fortran.c index 4f2c90ba7..02765a58c 100644 --- a/ctags/parsers/fortran.c +++ b/ctags/parsers/fortran.c @@ -2,7 +2,7 @@ * 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. * * This module contains functions for generating tags for Fortran language * files. @@ -11,13 +11,14 @@ /* * INCLUDE FILES */ -#include "general.h" /* must always come first */ +#include "general.h" /* must always come first */ #include #include -#include /* to define tolower () */ +#include /* to define tolower () */ #include +#include "debug.h" #include "mio.h" #include "entry.h" #include "keyword.h" @@ -25,7 +26,9 @@ #include "options.h" #include "parse.h" #include "read.h" +#include "routines.h" #include "vstring.h" +#include "xtag.h" /* * MACROS diff --git a/ctags/parsers/go.c b/ctags/parsers/go.c index 6b1a88d61..a7bfed984 100644 --- a/ctags/parsers/go.c +++ b/ctags/parsers/go.c @@ -1,14 +1,20 @@ /* +* This source code is released for free distribution under the terms of the +* GNU General Public License version 2 or (at your option) any later version. +* * INCLUDE FILES */ #include "general.h" /* must always come first */ +#include "debug.h" #include "entry.h" #include "keyword.h" #include "read.h" #include "main.h" +#include "routines.h" #include "vstring.h" #include "options.h" +#include "xtag.h" /* * MACROS diff --git a/ctags/parsers/html.c b/ctags/parsers/html.c index bcfea3d43..ec2123ab8 100644 --- a/ctags/parsers/html.c +++ b/ctags/parsers/html.c @@ -2,7 +2,7 @@ * Copyright (c) 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 generating tags for HTML language * files. @@ -13,6 +13,7 @@ */ #include "general.h" /* must always come first */ #include "parse.h" +#include "routines.h" /* * FUNCTION DEFINITIONS diff --git a/ctags/parsers/jscript.c b/ctags/parsers/jscript.c index c345fac33..9cd38ecdb 100644 --- a/ctags/parsers/jscript.c +++ b/ctags/parsers/jscript.c @@ -2,11 +2,13 @@ * Copyright (c) 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 generating tags for JavaScript language * files. * + * Reference: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf + * * This is a good reference for different forms of the function statement: * http://www.permadi.com/tutorial/jsFunc/ * Another good reference: @@ -23,11 +25,13 @@ #include #endif +#include "debug.h" #include "mio.h" #include "keyword.h" #include "parse.h" #include "read.h" #include "main.h" +#include "routines.h" #include "vstring.h" /* diff --git a/ctags/parsers/json.c b/ctags/parsers/json.c index 3f60bbfc5..6471ea774 100644 --- a/ctags/parsers/json.c +++ b/ctags/parsers/json.c @@ -2,7 +2,7 @@ * Copyright (c) 2014, Colomban Wendling * * 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 generating tags for JSON files. @@ -17,11 +17,13 @@ #include "general.h" #include +#include "debug.h" #include "main.h" #include "entry.h" #include "keyword.h" #include "parse.h" #include "read.h" +#include "routines.h" #include "vstring.h" typedef enum { diff --git a/ctags/parsers/lua.c b/ctags/parsers/lua.c index efb6787e3..962b16c6a 100644 --- a/ctags/parsers/lua.c +++ b/ctags/parsers/lua.c @@ -2,7 +2,7 @@ * Copyright (c) 2000-2001, Max Ischenko . * * 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 generating tags for Lua language. */ @@ -16,6 +16,7 @@ #include "parse.h" #include "read.h" +#include "routines.h" #include "vstring.h" /* diff --git a/ctags/parsers/make.c b/ctags/parsers/make.c index 100c220c4..fcf4d86c4 100644 --- a/ctags/parsers/make.c +++ b/ctags/parsers/make.c @@ -2,7 +2,7 @@ * Copyright (c) 2000-2005, 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 generating tags for makefiles. */ @@ -19,7 +19,9 @@ #include "options.h" #include "parse.h" #include "read.h" +#include "routines.h" #include "vstring.h" +#include "xtag.h" /* * DATA DEFINITIONS diff --git a/ctags/parsers/objc.c b/ctags/parsers/objc.c index 2593f831b..fb42469fe 100644 --- a/ctags/parsers/objc.c +++ b/ctags/parsers/objc.c @@ -3,7 +3,7 @@ * Copyright (c) 2010, Vincent Berthoux * * 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 generating tags for Objective C * language files. @@ -19,6 +19,7 @@ #include "entry.h" #include "options.h" #include "read.h" +#include "routines.h" #include "vstring.h" /* To get rid of unused parameter warning in diff --git a/ctags/parsers/pascal.c b/ctags/parsers/pascal.c index 253c54b91..f5a9f10dc 100644 --- a/ctags/parsers/pascal.c +++ b/ctags/parsers/pascal.c @@ -2,7 +2,7 @@ * Copyright (c) 2001-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 generating tags for the Pascal language, * including some extensions for Object Pascal. @@ -11,7 +11,7 @@ /* * INCLUDE FILES */ -#include "general.h" /* must always come first */ +#include "general.h" /* must always come first */ #include @@ -19,6 +19,7 @@ #include "parse.h" #include "read.h" #include "main.h" +#include "routines.h" #include "vstring.h" /* diff --git a/ctags/parsers/perl.c b/ctags/parsers/perl.c index fdd84ea60..0cc0fb871 100644 --- a/ctags/parsers/perl.c +++ b/ctags/parsers/perl.c @@ -2,7 +2,7 @@ * 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 generating tags for PERL language * files. @@ -12,6 +12,7 @@ * INCLUDE FILES */ #include "general.h" /* must always come first */ +#include "debug.h" #include @@ -19,7 +20,9 @@ #include "options.h" #include "read.h" #include "main.h" +#include "routines.h" #include "vstring.h" +#include "xtag.h" #define TRACE_PERL_C 0 #define TRACE if (TRACE_PERL_C) printf("perl.c:%d: ", __LINE__), printf diff --git a/ctags/parsers/php.c b/ctags/parsers/php.c index abe876892..107bdfe4c 100644 --- a/ctags/parsers/php.c +++ b/ctags/parsers/php.c @@ -2,7 +2,7 @@ * Copyright (c) 2013, Colomban Wendling * * 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 code for generating tags for the PHP scripting * language. @@ -18,6 +18,8 @@ #include "vstring.h" #include "keyword.h" #include "entry.h" +#include "routines.h" +#include "debug.h" #define SCOPE_SEPARATOR "::" diff --git a/ctags/parsers/python.c b/ctags/parsers/python.c index 5d164de2e..ea8c15b78 100644 --- a/ctags/parsers/python.c +++ b/ctags/parsers/python.c @@ -2,7 +2,7 @@ * 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 generating tags for Python language * files. @@ -15,11 +15,14 @@ #include #include "entry.h" +#include "nestlevel.h" #include "options.h" #include "read.h" #include "main.h" #include "vstring.h" -#include "nestlevel.h" +#include "routines.h" +#include "debug.h" +#include "xtag.h" /* * DATA DEFINITIONS diff --git a/ctags/parsers/r.c b/ctags/parsers/r.c index 17fe8854b..c2279a4dd 100644 --- a/ctags/parsers/r.c +++ b/ctags/parsers/r.c @@ -2,7 +2,7 @@ * Copyright (c) 2003-2004, Ascher Stefan * * 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 generating tags for R language files. * R is a programming language for statistical computing. @@ -12,11 +12,12 @@ /* * INCLUDE FILES */ -#include "general.h" /* must always come first */ +#include "general.h" /* must always come first */ #include -#include /* to define isalpha(), isalnum(), isspace() */ +#include /* to define isalpha(), isalnum(), isspace() */ +#include "debug.h" #include "entry.h" #include "read.h" #include "vstring.h" diff --git a/ctags/parsers/ruby.c b/ctags/parsers/ruby.c index 75f97fe0a..f89b92cc2 100644 --- a/ctags/parsers/ruby.c +++ b/ctags/parsers/ruby.c @@ -17,10 +17,12 @@ #include +#include "debug.h" #include "entry.h" #include "parse.h" #include "nestlevel.h" #include "read.h" +#include "routines.h" #include "vstring.h" /* diff --git a/ctags/parsers/rust.c b/ctags/parsers/rust.c index 0158773a2..c44e49659 100644 --- a/ctags/parsers/rust.c +++ b/ctags/parsers/rust.c @@ -1,7 +1,7 @@ /* * * 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 generating tags for Rust files. */ @@ -19,6 +19,7 @@ #include "entry.h" #include "options.h" #include "read.h" +#include "routines.h" #include "vstring.h" /* diff --git a/ctags/parsers/sh.c b/ctags/parsers/sh.c index 341aa09ed..37261ae40 100644 --- a/ctags/parsers/sh.c +++ b/ctags/parsers/sh.c @@ -2,7 +2,7 @@ * Copyright (c) 2000-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 generating tags for scripts for the * Bourne shell (and its derivatives, the Korn and Z shells). @@ -11,14 +11,16 @@ /* * INCLUDE FILES */ -#include "general.h" /* must always come first */ +#include "general.h" /* must always come first */ #include #include "parse.h" #include "read.h" #include "main.h" +#include "routines.h" #include "vstring.h" +#include "xtag.h" /* * DATA DEFINITIONS diff --git a/ctags/parsers/sql.c b/ctags/parsers/sql.c index ef8527987..c47df3947 100644 --- a/ctags/parsers/sql.c +++ b/ctags/parsers/sql.c @@ -1,10 +1,8 @@ /* - * $Id$ - * * Copyright (c) 2002-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 generating tags for PL/SQL language * files. @@ -21,11 +19,13 @@ #include #endif +#include "debug.h" #include "entry.h" #include "keyword.h" #include "parse.h" #include "main.h" #include "read.h" +#include "routines.h" #include "vstring.h" /* diff --git a/ctags/parsers/tcl.c b/ctags/parsers/tcl.c index ffc823d02..b89e4faff 100644 --- a/ctags/parsers/tcl.c +++ b/ctags/parsers/tcl.c @@ -2,7 +2,7 @@ * 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 generating tags for TCL scripts. */ @@ -16,6 +16,7 @@ #include "parse.h" #include "read.h" +#include "routines.h" #include "vstring.h" /* diff --git a/ctags/parsers/verilog.c b/ctags/parsers/verilog.c index 12f65c5f4..b18d707e4 100644 --- a/ctags/parsers/verilog.c +++ b/ctags/parsers/verilog.c @@ -1,12 +1,12 @@ /* * Copyright (c) 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 generating tags for the Verilog HDL * (Hardware Description Language). -* +* * Language definition documents: * http://www.eg.bucknell.edu/~cs320/verilog/verilog-manual.html * http://www.sutherland-hdl.com/on-line_ref_guide/vlog_ref_top.html @@ -22,11 +22,14 @@ #include #include +#include "debug.h" #include "keyword.h" #include "parse.h" #include "read.h" #include "vstring.h" #include "get.h" +#include "routines.h" +#include "xtag.h" /* * DATA DECLARATIONS diff --git a/ctags/parsers/vhdl.c b/ctags/parsers/vhdl.c index 23479cc7d..9ede406b5 100644 --- a/ctags/parsers/vhdl.c +++ b/ctags/parsers/vhdl.c @@ -19,9 +19,11 @@ #include #include +#include "debug.h" #include "keyword.h" #include "parse.h" #include "read.h" +#include "routines.h" #include "vstring.h" /* -- 2.11.4.GIT