Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Sun, 07 Aug 2016 16:31:30 UTC Commit: ca65fa22367042ea8c88efab7e76d5f0ba209947 https://github.com/geany/geany/commit/ca65fa22367042ea8c88efab7e76d5f0ba2099...
Log Message: ----------- Sync whitespace and comments in main
Modified Paths: -------------- ctags/main/args.c ctags/main/args.h ctags/main/ctags.h ctags/main/entry.c ctags/main/entry.h ctags/main/general.h ctags/main/lcpp.c ctags/main/lregex.c ctags/main/main.c ctags/main/nestlevel.c ctags/main/nestlevel.h ctags/main/options.c ctags/main/options.h ctags/main/parse.c ctags/main/parse.h ctags/main/parsers.h ctags/main/read.c ctags/main/read.h ctags/main/routines.c ctags/main/sort.c ctags/main/sort.h ctags/main/strlist.c ctags/main/strlist.h ctags/main/vstring.c ctags/main/vstring.h
Modified: ctags/main/args.c 8 lines changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -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"
/*
Modified: ctags/main/args.h 15 lines changed, 8 insertions(+), 7 deletions(-) =================================================================== @@ -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 @@ -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: */
Modified: ctags/main/ctags.h 12 lines changed, 7 insertions(+), 5 deletions(-) =================================================================== @@ -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: */
Modified: ctags/main/entry.c 21 lines changed, 10 insertions(+), 11 deletions(-) =================================================================== @@ -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
@@ -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') { @@ -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);
Modified: ctags/main/entry.h 13 lines changed, 6 insertions(+), 7 deletions(-) =================================================================== @@ -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" @@ -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: */
Modified: ctags/main/general.h 13 lines changed, 6 insertions(+), 7 deletions(-) =================================================================== @@ -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: */
Modified: ctags/main/lcpp.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -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)
Modified: ctags/main/lregex.c 5 lines changed, 3 insertions(+), 2 deletions(-) =================================================================== @@ -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)
Modified: ctags/main/main.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -71,7 +71,7 @@ /* * MACROS */ -#define plural(value) (((unsigned long)(value) == 1L) ? "" : "s") +#define plural(value) (((unsigned long)(value) == 1L) ? "" : "s")
/* * DATA DEFINITIONS
Modified: ctags/main/nestlevel.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -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. */
Modified: ctags/main/nestlevel.h 8 lines changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -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: */
Modified: ctags/main/options.c 15 lines changed, 7 insertions(+), 8 deletions(-) =================================================================== @@ -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" @@ -28,7 +27,7 @@
#define CTAGS_ENVIRONMENT "CTAGS"
-#define CTAGS_FILE "tags" +#define CTAGS_FILE "tags"
/* The following separators are permitted for list options. @@ -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)
Modified: ctags/main/options.h 6 lines changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -18,7 +18,7 @@ /* * INCLUDE FILES */ -#include "general.h" /* must always come first */ +#include "general.h" /* must always come first */
#include <stdarg.h>
@@ -88,7 +88,7 @@ typedef struct sOptionValues { /* * GLOBAL VARIABLES */ -extern CONST_OPTION optionValues Option; +extern CONST_OPTION optionValues Option;
/* * FUNCTION PROTOTYPES @@ -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: */
Modified: ctags/main/parse.c 11 lines changed, 5 insertions(+), 6 deletions(-) =================================================================== @@ -1,18 +1,17 @@ /* -* -* 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. */
/* * INCLUDE FILES */ -#include "general.h" /* must always come first */ +#include "general.h" /* must always come first */
#include <string.h>
@@ -163,7 +162,7 @@ static vString* determineInterpreter (const char* const cmd) { vStringClear (interpreter); for ( ; isspace (*p) ; ++p) - ; /* no-op */ + ; /* no-op */ for ( ; *p != '\0' && ! isspace (*p) ; ++p) vStringPut (interpreter, (int) *p); vStringTerminate (interpreter);
Modified: ctags/main/parse.h 33 lines changed, 16 insertions(+), 17 deletions(-) =================================================================== @@ -1,21 +1,20 @@ /* -* -* 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 */ -#include "general.h" /* must always come first */ +#include "general.h" /* must always come first */
-#include "parsers.h" /* contains list of parsers */ +#include "parsers.h" /* contains list of parsers */ #include "strlist.h" #include "entry.h"
@@ -59,15 +58,15 @@ typedef struct {
typedef struct { /* defined by parser */ - char* name; /* name of language */ - kindOption* kinds; /* tag kinds handled by parser */ - unsigned int kindCount; /* size of `kinds' list */ - kindOption* fileKind; /* kind for overriding the default fileKind */ - const char* const* extensions; /* list of default extensions */ - const char* const* patterns; /* list of default file name patterns */ - parserInitialize initialize; /* initialization routine, if needed */ - simpleParser parser; /* simple parser (common case) */ - rescanParser parser2; /* rescanning parser (unusual case) */ + char* name; /* name of language */ + kindOption* kinds; /* tag kinds handled by parser */ + unsigned int kindCount; /* size of `kinds' list */ + kindOption* fileKind; /* kind for overriding the default fileKind */ + const char *const *extensions; /* list of default extensions */ + const char *const *patterns; /* list of default file name patterns */ + parserInitialize initialize; /* initialization routine, if needed */ + simpleParser parser; /* simple parser (common case) */ + rescanParser parser2; /* rescanning parser (unusual case) */ unsigned int method; /* See PARSE__... definitions above */
/* used internally */ @@ -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: */
Modified: ctags/main/parsers.h 13 lines changed, 6 insertions(+), 7 deletions(-) =================================================================== @@ -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: */
Modified: ctags/main/read.c 8 lines changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -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 @@ -412,7 +412,7 @@ static int iFileGetc (void) if (next != NEWLINE) mio_ungetc (File.mio, next);
- c = NEWLINE; /* convert CR into newline */ + c = NEWLINE; /* convert CR into newline */ File.newLine = TRUE; mio_getpos (File.mio, &StartOfLine); }
Modified: ctags/main/read.h 33 lines changed, 15 insertions(+), 18 deletions(-) =================================================================== @@ -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 read.c */ -#ifndef _READ_H -#define _READ_H +#ifndef CTAGS_MAIN_READ_H +#define CTAGS_MAIN_READ_H
/* * INCLUDE FILES */ -#include "general.h" /* must always come first */ +#include "general.h" /* must always come first */
#include <stdio.h> #include <ctype.h> @@ -40,17 +39,15 @@ */
enum eCharacters { - /* White space characters. - */ - SPACE = ' ', - NEWLINE = '\n', - CRETURN = '\r', - FORMFEED = '\f', - TAB = '\t', - VTAB = '\v', - - /* Some hard to read characters. - */ + /* white space characters */ + SPACE = ' ', + NEWLINE = '\n', + CRETURN = '\r', + FORMFEED = '\f', + TAB = '\t', + VTAB = '\v', + + /* 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: */
Modified: ctags/main/routines.c 11 lines changed, 5 insertions(+), 6 deletions(-) =================================================================== @@ -332,7 +332,7 @@ extern boolean isRecursiveLink (const char* const dirName) char *const separator = strrchr (path, PATH_SEPARATOR); if (separator == NULL) break; - else if (separator == path) /* backed up to root directory */ + else if (separator == path) /* backed up to root directory */ *(separator + 1) = '\0'; else *separator = '\0'; @@ -379,7 +379,7 @@ extern const char *baseFilename (const char *const filePath) if (tail == NULL) tail = filePath; else - ++tail; /* step past last delimiter */ + ++tail; /* step past last delimiter */
return tail; } @@ -473,7 +473,6 @@ extern char* absoluteFilename (const char *file) { char *slashp, *cp; char *res = NULL; - if (isAbsolutePath (file)) res = eStrdup (file); else @@ -519,7 +518,7 @@ extern char* absoluteFilename (const char *file) else { #ifdef MSDOS_STYLE_PATH - /* Canonicalize drive letter case. */ + /* Canonicalize drive letter case. */ if (res [1] == ':' && islower (res [0])) res [0] = toupper (res [0]); #endif @@ -572,11 +571,11 @@ extern char* relativeFilename (const char *file, const char *dir) while (*fp++ == *dp++) continue; fp--; - dp--; /* back to the first differing char */ + dp--; /* back to the first differing char */ do { /* look at the equal chars until '/' */ if (fp == absdir) - return absdir; /* first char differs, give up */ + return absdir; /* first char differs, give up */ fp--; dp--; } while (*fp != '/');
Modified: ctags/main/sort.c 15 lines changed, 7 insertions(+), 8 deletions(-) =================================================================== @@ -1,20 +1,19 @@ /* -* -* 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. */
/* * INCLUDE FILES */ -#include "general.h" /* must always come first */ +#include "general.h" /* must always come first */
#if defined (HAVE_STDLIB_H) -# include <stdlib.h> /* to declare malloc () */ +# include <stdlib.h> /* to declare malloc () */ #endif #include <string.h> #include <stdio.h> @@ -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; @@ -186,7 +185,7 @@ extern void internalSortTags (const boolean toStdout) break; } else if (*line == '\0' || strcmp (line, "\n") == 0) - ; /* ignore blank lines */ + ; /* ignore blank lines */ else { const size_t stringSize = strlen (line) + 1;
Modified: ctags/main/sort.h 12 lines changed, 6 insertions(+), 6 deletions(-) =================================================================== @@ -1,18 +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 sort.c */ -#ifndef _SORT_H -#define _SORT_H +#ifndef CTAGS_MAIN_SORT_H +#define CTAGS_MAIN_SORT_H
/* * INCLUDE FILES */ -#include "general.h" /* must always come first */ +#include "general.h" /* must always come first */
/* * FUNCTION PROTOTYPES @@ -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: */
Modified: ctags/main/strlist.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -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. */
Modified: ctags/main/strlist.h 8 lines changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -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: */
Modified: ctags/main/vstring.c 14 lines changed, 7 insertions(+), 7 deletions(-) =================================================================== @@ -1,22 +1,22 @@ /* -* * 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. */
/* * INCLUDE FILES */ -#include "general.h" /* must always come first */ +#include "general.h" /* must always come first */
-#include <limits.h> /* to define INT_MAX */ +#include <limits.h> /* to define INT_MAX */ #include <string.h> #include <ctype.h>
+#include "debug.h" #include "routines.h" #include "vstring.h"
@@ -60,7 +60,7 @@ extern void vStringTruncate (vString *const string, const size_t length) string->length = length; vStringTerminate (string); DebugStatement ( memset (string->buffer + string->length, 0, - string->size - string->length); ) + string->size - string->length); ) }
extern void vStringClear (vString *const string) @@ -134,7 +134,7 @@ extern vString *vStringNewInit (const char *const s) }
extern void vStringNCatS ( - vString *const string, const char *const s, const size_t length) + vString *const string, const char *const s, const size_t length) { const char *p = s; size_t remain = length; @@ -204,7 +204,7 @@ extern void vStringCopyS (vString *const string, const char *const s) }
extern void vStringNCopyS ( - vString *const string, const char *const s, const size_t length) + vString *const string, const char *const s, const size_t length) { vStringClear (string); vStringNCatS (string, s, length);
Modified: ctags/main/vstring.h 50 lines changed, 25 insertions(+), 25 deletions(-) =================================================================== @@ -2,20 +2,20 @@ * 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 */ -#include "general.h" /* must always come first */ +#include "general.h" /* must always come first */
#if defined(HAVE_STDLIB_H) -# include <stdlib.h> /* to define size_t */ +# include <stdlib.h> /* to define size_t */ #endif
/* @@ -26,33 +26,33 @@ #endif #ifdef VSTRING_PUTC_MACRO #define vStringPut(s,c) \ - (void)(((s)->length + 1 == (s)->size ? vStringAutoResize (s) : 0), \ - ((s)->buffer [(s)->length] = (c)), \ - ((c) == '\0' ? 0 : ((s)->buffer [++(s)->length] = '\0'))) + (void)(((s)->length + 1 == (s)->size ? vStringAutoResize (s) : 0), \ + ((s)->buffer [(s)->length] = (c)), \ + ((c) == '\0' ? 0 : ((s)->buffer [++(s)->length] = '\0'))) #endif
-#define vStringValue(vs) ((vs)->buffer) -#define vStringItem(vs,i) ((vs)->buffer[i]) -#define vStringLast(vs) ((vs)->buffer[(vs)->length - 1]) -#define vStringLength(vs) ((vs)->length) -#define vStringSize(vs) ((vs)->size) -#define vStringCat(vs,s) vStringCatS((vs), vStringValue((s))) -#define vStringNCat(vs,s,l) vStringNCatS((vs), vStringValue((s)), (l)) -#define vStringCopy(vs,s) vStringCopyS((vs), vStringValue((s))) -#define vStringNCopy(vs,s,l) vStringNCopyS((vs), vStringValue((s)), (l)) -#define vStringChar(vs,i) ((vs)->buffer[i]) -#define vStringTerminate(vs) vStringPut(vs, '\0') -#define vStringLower(vs) toLowerString((vs)->buffer) -#define vStringUpper(vs) toUpperString((vs)->buffer) +#define vStringValue(vs) ((vs)->buffer) +#define vStringItem(vs,i) ((vs)->buffer[i]) +#define vStringLast(vs) ((vs)->buffer[(vs)->length - 1]) +#define vStringLength(vs) ((vs)->length) +#define vStringSize(vs) ((vs)->size) +#define vStringCat(vs,s) vStringCatS((vs), vStringValue((s))) +#define vStringNCat(vs,s,l) vStringNCatS((vs), vStringValue((s)), (l)) +#define vStringCopy(vs,s) vStringCopyS((vs), vStringValue((s))) +#define vStringNCopy(vs,s,l) vStringNCopyS((vs), vStringValue((s)), (l)) +#define vStringChar(vs,i) ((vs)->buffer[i]) +#define vStringTerminate(vs) vStringPut(vs, '\0') +#define vStringLower(vs) toLowerString((vs)->buffer) +#define vStringUpper(vs) toUpperString((vs)->buffer)
/* * DATA DECLARATIONS */
typedef struct sVString { - size_t length; /* size of buffer used */ - size_t size; /* allocated size of buffer */ - char * buffer; /* location of buffer */ + size_t length; /* size of buffer used */ + size_t size; /* allocated size of buffer */ + char *buffer; /* location of buffer */ } vString;
/* @@ -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: */
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).