Sync whitespace and comments in main
This commit is contained in:
parent
967b572240
commit
ca65fa2236
@ -1,9 +1,8 @@
|
||||
/*
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
@ -18,6 +17,7 @@
|
||||
#include <ctype.h>
|
||||
|
||||
#include "args.h"
|
||||
#include "debug.h"
|
||||
#include "routines.h"
|
||||
|
||||
/*
|
||||
|
@ -1,20 +1,21 @@
|
||||
/*
|
||||
*
|
||||
* 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 <stdio.h>
|
||||
|
||||
/*
|
||||
* DATA DECLARATIONS
|
||||
*/
|
||||
@ -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: */
|
||||
|
@ -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
|
||||
@ -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: */
|
||||
|
@ -1,9 +1,8 @@
|
||||
/*
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
@ -159,8 +158,8 @@ 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');
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
/*
|
||||
*
|
||||
* 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
|
||||
@ -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: */
|
||||
|
@ -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
|
||||
@ -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: */
|
||||
|
@ -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)
|
||||
|
@ -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.
|
||||
*/
|
||||
@ -91,6 +91,7 @@ static int SetUpper = -1; /* upper language index in list */
|
||||
* FUNCTION DEFINITIONS
|
||||
*/
|
||||
|
||||
|
||||
static void clearPatternSet (const langType language)
|
||||
{
|
||||
if (language <= SetUpper)
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -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
|
||||
@ -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: */
|
||||
|
@ -1,9 +1,8 @@
|
||||
/*
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
@ -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: */
|
||||
|
@ -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 managing source languages and
|
||||
* This module contains functions for managing input languages and
|
||||
* dispatching files to the appropriate language parser.
|
||||
*/
|
||||
|
||||
|
@ -1,14 +1,13 @@
|
||||
/*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Private definitions for parsing support.
|
||||
*/
|
||||
#ifndef _PARSE_H
|
||||
#define _PARSE_H
|
||||
#ifndef CTAGS_MAIN_PARSE_H
|
||||
#define CTAGS_MAIN_PARSE_H
|
||||
|
||||
/*
|
||||
* INCLUDE FILES
|
||||
@ -157,6 +156,6 @@ extern tagEntryFunction TagEntryFunction;
|
||||
extern void *TagEntryUserData;
|
||||
extern void setTagEntryFunction(tagEntryFunction entry_function, void *user_data);
|
||||
|
||||
#endif /* _PARSE_H */
|
||||
#endif /* CTAGS_MAIN_PARSE_H */
|
||||
|
||||
/* vi:set tabstop=4 shiftwidth=4: */
|
||||
|
@ -1,17 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (c) 2000-2001, Darren Hiebert
|
||||
* 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.
|
||||
*
|
||||
* External interface to all language parsing modules.
|
||||
*
|
||||
* To add a new language parser, you need only modify this single source
|
||||
* To add a new language parser, you need only modify this single input
|
||||
* file to add the name of the parser definition function.
|
||||
*/
|
||||
#ifndef _PARSERS_H
|
||||
#define _PARSERS_H
|
||||
#ifndef CTAGS_MAIN_PARSERS_H
|
||||
#define CTAGS_MAIN_PARSERS_H
|
||||
|
||||
/* Add the name of any new parser definition function here */
|
||||
/* keep src/tagmanager/tm_parser.h in sync */
|
||||
@ -68,6 +67,6 @@
|
||||
ZephirParser, \
|
||||
PowerShellParser
|
||||
|
||||
#endif /* _PARSERS_H */
|
||||
#endif /* CTAGS_MAIN_PARSERS_H */
|
||||
|
||||
/* vi:set tabstop=4 shiftwidth=4: */
|
||||
|
@ -258,7 +258,7 @@ extern boolean fileOpen (const char *const fileName, const langType language)
|
||||
*/
|
||||
if (File.mio != NULL)
|
||||
{
|
||||
mio_free (File.mio); /* close any open source file */
|
||||
mio_free (File.mio); /* close any open input file */
|
||||
File.mio = NULL;
|
||||
}
|
||||
|
||||
@ -365,8 +365,8 @@ static void fileNewline (void)
|
||||
File.newLine = FALSE;
|
||||
File.input.lineNumber++;
|
||||
File.source.lineNumber++;
|
||||
DebugStatement ( if (Option.breakLine == File.lineNumber) lineBreak (); )
|
||||
DebugStatement ( debugPrintf (DEBUG_RAW, "%6ld: ", File.lineNumber); )
|
||||
DebugStatement ( if (Option.breakLine == File.input.lineNumber) lineBreak (); )
|
||||
DebugStatement ( debugPrintf (DEBUG_RAW, "%6ld: ", File.input.lineNumber); )
|
||||
}
|
||||
|
||||
/* This function reads a single character from the stream, performing newline
|
||||
|
@ -1,14 +1,13 @@
|
||||
/*
|
||||
*
|
||||
* 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 read.c
|
||||
*/
|
||||
#ifndef _READ_H
|
||||
#define _READ_H
|
||||
#ifndef CTAGS_MAIN_READ_H
|
||||
#define CTAGS_MAIN_READ_H
|
||||
|
||||
/*
|
||||
* INCLUDE FILES
|
||||
@ -40,8 +39,7 @@
|
||||
*/
|
||||
|
||||
enum eCharacters {
|
||||
/* White space characters.
|
||||
*/
|
||||
/* white space characters */
|
||||
SPACE = ' ',
|
||||
NEWLINE = '\n',
|
||||
CRETURN = '\r',
|
||||
@ -49,8 +47,7 @@ enum eCharacters {
|
||||
TAB = '\t',
|
||||
VTAB = '\v',
|
||||
|
||||
/* Some hard to read characters.
|
||||
*/
|
||||
/* some hard to read characters */
|
||||
DOUBLE_QUOTE = '"',
|
||||
SINGLE_QUOTE = '\'',
|
||||
BACKSLASH = '\\',
|
||||
@ -120,6 +117,6 @@ extern boolean bufferOpen (unsigned char *buffer, size_t buffer_size,
|
||||
const char *const fileName, const langType language );
|
||||
#define bufferClose fileClose
|
||||
|
||||
#endif /* _READ_H */
|
||||
#endif /* CTAGS_MAIN_READ_H */
|
||||
|
||||
/* vi:set tabstop=4 shiftwidth=4: */
|
||||
|
@ -473,7 +473,6 @@ extern char* absoluteFilename (const char *file)
|
||||
{
|
||||
char *slashp, *cp;
|
||||
char *res = NULL;
|
||||
|
||||
if (isAbsolutePath (file))
|
||||
res = eStrdup (file);
|
||||
else
|
||||
|
@ -1,9 +1,8 @@
|
||||
/*
|
||||
*
|
||||
* 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 to sort the tag entries.
|
||||
*/
|
||||
@ -124,8 +123,8 @@ static int compareTags (const void *const one, const void *const two)
|
||||
return strcmp (line1, line2);
|
||||
}
|
||||
|
||||
static void writeSortedTags (char **const table, const size_t numTags,
|
||||
const boolean toStdout)
|
||||
static void writeSortedTags (
|
||||
char **const table, const size_t numTags, const boolean toStdout)
|
||||
{
|
||||
MIO *mio;
|
||||
size_t i;
|
||||
|
@ -1,13 +1,13 @@
|
||||
/*
|
||||
* 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 sort.c
|
||||
*/
|
||||
#ifndef _SORT_H
|
||||
#define _SORT_H
|
||||
#ifndef CTAGS_MAIN_SORT_H
|
||||
#define CTAGS_MAIN_SORT_H
|
||||
|
||||
/*
|
||||
* INCLUDE FILES
|
||||
@ -25,6 +25,6 @@ extern void externalSortTags (const boolean toStdout);
|
||||
extern void internalSortTags (const boolean toStdout);
|
||||
#endif
|
||||
|
||||
#endif /* _SORT_H */
|
||||
#endif /* CTAGS_MAIN_SORT_H */
|
||||
|
||||
/* vi:set tabstop=4 shiftwidth=4: */
|
||||
|
@ -2,7 +2,7 @@
|
||||
* 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 managing resizable string lists.
|
||||
*/
|
||||
|
@ -2,12 +2,12 @@
|
||||
* 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 resizable string lists.
|
||||
*/
|
||||
#ifndef _STRLIST_H
|
||||
#define _STRLIST_H
|
||||
#ifndef CTAGS_MAIN_STRLIST_H
|
||||
#define CTAGS_MAIN_STRLIST_H
|
||||
|
||||
/*
|
||||
* INCLUDE FILES
|
||||
@ -47,6 +47,6 @@ extern boolean stringListExtensionMatched (const stringList* const list, const c
|
||||
extern boolean stringListFileMatched (const stringList* const list, const char* const str);
|
||||
extern void stringListPrint (const stringList *const current);
|
||||
|
||||
#endif /* _STRLIST_H */
|
||||
#endif /* CTAGS_MAIN_STRLIST_H */
|
||||
|
||||
/* vi:set tabstop=4 shiftwidth=4: */
|
||||
|
@ -1,9 +1,8 @@
|
||||
/*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* This module contains functions supporting resizeable strings.
|
||||
*/
|
||||
@ -17,6 +16,7 @@
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "routines.h"
|
||||
#include "vstring.h"
|
||||
|
||||
|
@ -2,12 +2,12 @@
|
||||
* 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.
|
||||
*
|
||||
* Provides the external interface for resizeable strings.
|
||||
*/
|
||||
#ifndef _VSTRING_H
|
||||
#define _VSTRING_H
|
||||
#ifndef CTAGS_MAIN_VSTRING_H
|
||||
#define CTAGS_MAIN_VSTRING_H
|
||||
|
||||
/*
|
||||
* INCLUDE FILES
|
||||
@ -81,6 +81,6 @@ extern void vStringTruncate (vString *const string, const size_t length);
|
||||
|
||||
extern vString *vStringNewOwn (char *s);
|
||||
|
||||
#endif /* _VSTRING_H */
|
||||
#endif /* CTAGS_MAIN_VSTRING_H */
|
||||
|
||||
/* vi:set tabstop=4 shiftwidth=4: */
|
||||
|
Loading…
x
Reference in New Issue
Block a user