lists.geany.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
List overview
Commits
September 2016
----- 2024 -----
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
commits@lists.geany.org
1 participants
80 discussions
Start a n
N
ew thread
[geany/geany] 082a97: Use ARRAY_SIZE() in parsers
by Jiří Techet
10 Sep '16
10 Sep '16
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Sun, 07 Aug 2016 00:01:38 UTC Commit: 082a9724f12d2beda1002081b2ed16611e04e12f
https://github.com/geany/geany/commit/082a9724f12d2beda1002081b2ed16611e04e…
Log Message: ----------- Use ARRAY_SIZE() in parsers Modified Paths: -------------- ctags/parsers/c.c ctags/parsers/perl.c ctags/parsers/php.c ctags/parsers/powershell.c ctags/parsers/ruby.c ctags/parsers/verilog.c Modified: ctags/parsers/c.c 14 lines changed, 7 insertions(+), 7 deletions(-) =================================================================== @@ -668,7 +668,7 @@ static const char *accessString (const accessType laccess) static const char *const names [] = { "?", "private", "protected", "public", "default" }; - Assert (sizeof (names) / sizeof (names [0]) == ACCESS_COUNT); + Assert (ARRAY_SIZE (names) == ACCESS_COUNT); Assert ((int) laccess < ACCESS_COUNT); return names[(int) laccess]; } @@ -678,7 +678,7 @@ static const char *implementationString (const impType imp) static const char *const names [] = { "?", "abstract", "virtual", "pure virtual" }; - Assert (sizeof (names) / sizeof (names [0]) == IMP_COUNT); + Assert (ARRAY_SIZE (names) == IMP_COUNT); Assert ((int) imp < IMP_COUNT); return names [(int) imp]; } @@ -697,7 +697,7 @@ static const char *tokenString (const tokenType type) "none", "args", "}", "{", "comma", "double colon", "keyword", "name", "package", "paren-name", "semicolon", "specifier", "*", "[]" }; - Assert (sizeof (names) / sizeof (names [0]) == TOKEN_COUNT); + Assert (ARRAY_SIZE (names) == TOKEN_COUNT); Assert ((int) type < TOKEN_COUNT); return names [(int) type]; } @@ -707,7 +707,7 @@ static const char *scopeString (const tagScope scope) static const char *const names [] = { "global", "static", "extern", "friend", "typedef" }; - Assert (sizeof (names) / sizeof (names [0]) == SCOPE_COUNT); + Assert (ARRAY_SIZE (names) == SCOPE_COUNT); Assert ((int) scope < SCOPE_COUNT); return names [(int) scope]; } @@ -719,14 +719,14 @@ static const char *declString (const declType declaration) "function template", "ignore", "interface", "module", "namespace", "no mangle", "package", "struct", "union", }; - Assert (sizeof (names) / sizeof (names [0]) == DECL_COUNT); + Assert (ARRAY_SIZE (names) == DECL_COUNT); Assert ((int) declaration < DECL_COUNT); return names [(int) declaration]; } static const char *keywordString (const keywordId keyword) { - const size_t count = sizeof (KeywordTable) / sizeof (KeywordTable [0]); + const size_t count = ARRAY_SIZE (KeywordTable); const char *name = "none"; size_t i; for (i = 0 ; i < count ; ++i) @@ -3172,7 +3172,7 @@ static boolean findCTags (const unsigned int passCount) static void buildKeywordHash (const langType language, unsigned int idx) { - const size_t count = sizeof (KeywordTable) / sizeof (KeywordTable [0]); + const size_t count = ARRAY_SIZE (KeywordTable); size_t i; for (i = 0 ; i < count ; ++i) { Modified: ctags/parsers/perl.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -71,7 +71,7 @@ static boolean isPodWord (const char *word) "head1", "head2", "head3", "head4", "over", "item", "back", "pod", "begin", "end", "for" }; - const size_t count = sizeof (pods) / sizeof (pods [0]); + const size_t count = ARRAY_SIZE (pods); const char *white = strpbrk (word, " \t"); const size_t len = (white!=NULL) ? (size_t)(white-word) : strlen (word); char *const id = (char*) eMalloc (len + 1); Modified: ctags/parsers/php.c 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -449,7 +449,7 @@ static void printToken (const tokenInfo *const token) case TOKEN_KEYWORD: { - size_t n = sizeof PhpKeywordTable / sizeof PhpKeywordTable[0]; + size_t n = ARRAY_SIZE (PhpKeywordTable); size_t i; fprintf (stderr, "\tkeyword:\t"); @@ -548,7 +548,7 @@ static void parseHeredoc (vString *const string) quote = c; c = getcFromInputFile (); } - for (len = 0; len < (sizeof delimiter / sizeof delimiter[0]) - 1; len++) + for (len = 0; len < ARRAY_SIZE (delimiter) - 1; len++) { if (! isIdentChar (c)) break; Modified: ctags/parsers/powershell.c 4 lines changed, 1 insertions(+), 3 deletions(-) =================================================================== @@ -26,8 +26,6 @@ #define SCOPE_SEPARATOR "::" -#define ARRAY_LENGTH(array) (sizeof array / sizeof array[0]) - #define ACCESS_UNDEFINED NULL static const char *const accessTypes[] = { ACCESS_UNDEFINED, @@ -85,7 +83,7 @@ static const char *findValidAccessType (const char *const access) unsigned int i; if (access == ACCESS_UNDEFINED) return ACCESS_UNDEFINED; /* early out to save the for-loop if possible */ - for (i = 0; i < ARRAY_LENGTH(accessTypes); i++) + for (i = 0; i < ARRAY_SIZE(accessTypes); i++) { if (accessTypes[i] == ACCESS_UNDEFINED) continue; Modified: ctags/parsers/ruby.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -216,7 +216,7 @@ static void emitRubyTag (vString* name, rubyKind kind) initTagEntry (&tag, unqualified_name, &(RubyKinds [kind])); if (vStringLength (scope) > 0) { Assert (0 <= parent_kind && - (size_t) parent_kind < (sizeof RubyKinds / sizeof RubyKinds[0])); + (size_t) parent_kind < (ARRAY_SIZE (RubyKinds))); tag.extensionFields.scopeKind = &(RubyKinds [parent_kind]); tag.extensionFields.scopeName = vStringValue (scope); Modified: ctags/parsers/verilog.c 3 lines changed, 1 insertions(+), 2 deletions(-) =================================================================== @@ -102,8 +102,7 @@ static keywordTable VerilogKeywordTable [] = { static void initialize (const langType language) { size_t i; - const size_t count = - sizeof (VerilogKeywordTable) / sizeof (VerilogKeywordTable [0]); + const size_t count = ARRAY_SIZE (VerilogKeywordTable); Lang_verilog = language; for (i = 0 ; i < count ; ++i) { -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 026da6: Move selected() under Miscellaneous macros
by Jiří Techet
10 Sep '16
10 Sep '16
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Sat, 06 Aug 2016 20:42:15 UTC Commit: 026da60fd0a28d8c86a22ead262d261b9e6c7be4
https://github.com/geany/geany/commit/026da60fd0a28d8c86a22ead262d261b9e6c7…
Log Message: ----------- Move selected() under Miscellaneous macros Modified Paths: -------------- ctags/main/routines.c Modified: ctags/main/routines.c 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -149,12 +149,12 @@ # define PATH_MAX 256 #endif -#define selected(var,feature) (((int)(var) & (int)(feature)) == (int)feature) - /* * Miscellaneous macros */ +#define selected(var,feature) (((int)(var) & (int)(feature)) == (int)feature) + /* * DATA DEFINITIONS -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 065070: Fix pascal tag initizalization
by Jiří Techet
10 Sep '16
10 Sep '16
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Sat, 06 Aug 2016 20:06:41 UTC Commit: 0650707ce548273b1a0bb73680246645b2e3f49a
https://github.com/geany/geany/commit/0650707ce548273b1a0bb73680246645b2e3f…
Log Message: ----------- Fix pascal tag initizalization Modified Paths: -------------- ctags/parsers/pascal.c Modified: ctags/parsers/pascal.c 3 lines changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -48,6 +48,9 @@ static void createPascalTag (tagEntryInfo* const tag, tag->extensionFields.signature = arglist; tag->extensionFields.varType = vartype; } + else + /* TODO: Passing NULL as name makes an assertion behind initTagEntry failure */ + initTagEntry (tag, NULL, NULL); } static void makePascalTag (const tagEntryInfo* const tag) -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 11dcc5: Fix indentation
by Jiří Techet
10 Sep '16
10 Sep '16
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Sat, 06 Aug 2016 20:42:37 UTC Commit: 11dcc5e3e5a0014905fbb76457b52991135dc410
https://github.com/geany/geany/commit/11dcc5e3e5a0014905fbb76457b52991135dc…
Log Message: ----------- Fix indentation Modified Paths: -------------- ctags/main/routines.c Modified: ctags/main/routines.c 14 lines changed, 7 insertions(+), 7 deletions(-) =================================================================== @@ -454,15 +454,15 @@ extern vString *combinePathAndFile (const char *const path, */ static char* concat (const char *s1, const char *s2, const char *s3) { - int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3); - char *result = xMalloc (len1 + len2 + len3 + 1, char); + int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3); + char *result = xMalloc (len1 + len2 + len3 + 1, char); - strcpy (result, s1); - strcpy (result + len1, s2); - strcpy (result + len1 + len2, s3); - result [len1 + len2 + len3] = '\0'; + strcpy (result, s1); + strcpy (result + len1, s2); + strcpy (result + len1 + len2, s3); + result [len1 + len2 + len3] = '\0'; - return result; + return result; } /* Return a newly allocated string containing the absolute file name of FILE -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 530f47: Revert "Rename "mio" member of sInputFile to "fp""
by Jiří Techet
10 Sep '16
10 Sep '16
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Sat, 06 Aug 2016 14:34:37 UTC Commit: 530f47584a6d3ff48362951857f95ad854bd9756
https://github.com/geany/geany/commit/530f47584a6d3ff48362951857f95ad854bd9…
Log Message: ----------- Revert "Rename "mio" member of sInputFile to "fp"" Let's rename fp to mio in uctags instead. This reverts commit 3dd1fb4853952d8fd80963952a03299e9b2c8012. Conflicts: ctags/main/read.c ctags/main/read.h Modified Paths: -------------- ctags/main/lcpp.c ctags/main/read.c ctags/main/read.h ctags/parsers/c.c Modified: ctags/main/lcpp.c 12 lines changed, 6 insertions(+), 6 deletions(-) =================================================================== @@ -847,25 +847,25 @@ extern char *getArglistFromFilePos(MIOPos startPosition, const char *tokenName) char *arglist = NULL; long pos1, pos2; - pos2 = mio_tell(File.fp); + pos2 = mio_tell(File.mio); - mio_getpos(File.fp, &originalPosition); - mio_setpos(File.fp, &startPosition); - pos1 = mio_tell(File.fp); + mio_getpos(File.mio, &originalPosition); + mio_setpos(File.mio, &startPosition); + pos1 = mio_tell(File.mio); if (pos2 > pos1) { size_t len = pos2 - pos1; result = (char *) g_malloc(len + 1); - if (result != NULL && (len = mio_read(File.fp, result, 1, len)) > 0) + if (result != NULL && (len = mio_read(File.mio, result, 1, len)) > 0) { result[len] = '\0'; arglist = getArglistFromStr(result, tokenName); } g_free(result); } - mio_setpos(File.fp, &originalPosition); + mio_setpos(File.mio, &originalPosition); return arglist; } Modified: ctags/main/read.c 76 lines changed, 38 insertions(+), 38 deletions(-) =================================================================== @@ -124,7 +124,7 @@ static int skipWhite (void) { int c; do - c = mio_getc (File.fp); + c = mio_getc (File.mio); while (c == ' ' || c == '\t'); return c; } @@ -136,9 +136,9 @@ static unsigned long readLineNumber (void) while (c != EOF && isdigit (c)) { lNum = (lNum * 10) + (c - '0'); - c = mio_getc (File.fp); + c = mio_getc (File.mio); } - mio_ungetc (File.fp, c); + mio_ungetc (File.mio, c); if (c != ' ' && c != '\t') lNum = 0; @@ -161,17 +161,17 @@ static vString *readFileName (void) if (c == '"') { - c = mio_getc (File.fp); /* skip double-quote */ + c = mio_getc (File.mio); /* skip double-quote */ quoteDelimited = TRUE; } while (c != EOF && c != '\n' && (quoteDelimited ? (c != '"') : (c != ' ' && c != '\t'))) { vStringPut (fileName, c); - c = mio_getc (File.fp); + c = mio_getc (File.mio); } if (c == '\n') - mio_ungetc (File.fp, c); + mio_ungetc (File.mio, c); vStringPut (fileName, '\0'); return fileName; @@ -185,13 +185,13 @@ static boolean parseLineDirective (void) if (isdigit (c)) { - mio_ungetc (File.fp, c); + mio_ungetc (File.mio, c); result = TRUE; } - else if (c == 'l' && mio_getc (File.fp) == 'i' && - mio_getc (File.fp) == 'n' && mio_getc (File.fp) == 'e') + else if (c == 'l' && mio_getc (File.mio) == 'i' && + mio_getc (File.mio) == 'n' && mio_getc (File.mio) == 'e') { - c = mio_getc (File.fp); + c = mio_getc (File.mio); if (c == ' ' || c == '\t') { DebugStatement ( lineStr = "line"; ) @@ -251,22 +251,22 @@ extern boolean fileOpen (const char *const fileName, const langType language) /* If another file was already open, then close it. */ - if (File.fp != NULL) + if (File.mio != NULL) { - mio_free (File.fp); /* close any open input file */ - File.fp = NULL; + mio_free (File.mio); /* close any open source file */ + File.mio = NULL; } - File.fp = mio_new_file_full (fileName, openMode, g_fopen, fclose); - if (File.fp == NULL) + File.mio = mio_new_file_full (fileName, openMode, g_fopen, fclose); + if (File.mio == NULL) error (WARNING | PERROR, "cannot open \"%s\"", fileName); else { opened = TRUE; setInputFileName (fileName); - mio_getpos (File.fp, &StartOfLine); - mio_getpos (File.fp, &File.filePosition); + mio_getpos (File.mio, &StartOfLine); + mio_getpos (File.mio, &File.filePosition); File.currentLine = NULL; File.input.lineNumber = 0L; File.eof = FALSE; @@ -296,9 +296,9 @@ extern boolean bufferOpen (unsigned char *buffer, size_t buffer_size, /* Check whether a file of a buffer were already open, then close them. */ - if (File.fp != NULL) { - mio_free (File.fp); /* close any open source file */ - File.fp = NULL; + if (File.mio != NULL) { + mio_free (File.mio); /* close any open source file */ + File.mio = NULL; } /* check if we got a good buffer */ @@ -309,10 +309,10 @@ extern boolean bufferOpen (unsigned char *buffer, size_t buffer_size, opened = TRUE; - File.fp = mio_new_memory (buffer, buffer_size, NULL, NULL); + File.mio = mio_new_memory (buffer, buffer_size, NULL, NULL); setInputFileName (fileName); - mio_getpos (File.fp, &StartOfLine); - mio_getpos (File.fp, &File.filePosition); + mio_getpos (File.mio, &StartOfLine); + mio_getpos (File.mio, &File.filePosition); File.currentLine = NULL; File.input.lineNumber = 0L; File.eof = FALSE; @@ -333,7 +333,7 @@ extern boolean bufferOpen (unsigned char *buffer, size_t buffer_size, extern void fileClose (void) { - if (File.fp != NULL) + if (File.mio != NULL) { /* The line count of the file is 1 too big, since it is one-based * and is incremented upon each newline. @@ -342,8 +342,8 @@ extern void fileClose (void) addTotals (0, File.input.lineNumber - 1L, getFileSize (vStringValue (File.input.name))); - mio_free (File.fp); - File.fp = NULL; + mio_free (File.mio); + File.mio = NULL; } } @@ -371,7 +371,7 @@ static int iFileGetc (void) { int c; readnext: - c = mio_getc (File.fp); + c = mio_getc (File.mio); /* If previous character was a newline, then we're starting a line. */ @@ -384,8 +384,8 @@ static int iFileGetc (void) goto readnext; else { - mio_setpos (File.fp, &StartOfLine); - c = mio_getc (File.fp); + mio_setpos (File.mio, &StartOfLine); + c = mio_getc (File.mio); } } } @@ -395,21 +395,21 @@ static int iFileGetc (void) else if (c == NEWLINE) { File.newLine = TRUE; - mio_getpos (File.fp, &StartOfLine); + mio_getpos (File.mio, &StartOfLine); } else if (c == CRETURN) { /* Turn line breaks into a canonical form. The three commonly * used forms if line breaks: LF (UNIX/Mac OS X), CR (Mac OS 9), * and CR-LF (MS-DOS) are converted into a generic newline. */ - const int next = mio_getc (File.fp); /* is CR followed by LF? */ + const int next = mio_getc (File.mio); /* is CR followed by LF? */ if (next != NEWLINE) - mio_ungetc (File.fp, next); + mio_ungetc (File.mio, next); c = NEWLINE; /* convert CR into newline */ File.newLine = TRUE; - mio_getpos (File.fp, &StartOfLine); + mio_getpos (File.mio, &StartOfLine); } DebugStatement ( debugPutc (DEBUG_RAW, c); ) return c; @@ -603,12 +603,12 @@ extern char *readLineFromBypass ( MIOPos orignalPosition; char *result; - mio_getpos (File.fp, &orignalPosition); - mio_setpos (File.fp, &location); + mio_getpos (File.mio, &orignalPosition); + mio_setpos (File.mio, &location); if (pSeekValue != NULL) - *pSeekValue = mio_tell (File.fp); - result = readLineRaw (vLine, File.fp); - mio_setpos (File.fp, &orignalPosition); + *pSeekValue = mio_tell (File.mio); + result = readLineRaw (vLine, File.mio); + mio_setpos (File.mio, &orignalPosition); /* If the file is empty, we can't get the line for location 0. readLineFromBypass doesn't know what itself should do; just report it to the caller. */ Modified: ctags/main/read.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -78,7 +78,7 @@ typedef struct sInputFile { vString *path; /* path of input file (if any) */ vString *line; /* last line read from file */ const unsigned char* currentLine; /* current line being worked on */ - MIO *fp; /* stream used for reading the file */ + MIO *mio; /* MIO stream used for reading the file */ MIOPos filePosition; /* file position of current line */ unsigned int ungetchIdx; int ungetchBuf[3]; /* characters that were ungotten */ Modified: ctags/parsers/c.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -2567,7 +2567,7 @@ static int parseParens (statementInfo *const st, parenInfo *const info) --depth; } if (st->argEndPosition == 0) - st->argEndPosition = mio_tell (File.fp); + st->argEndPosition = mio_tell (File.mio); if (! info->isNameCandidate) initToken (token); -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 0ec359: Remove makeSimpleScopedTag() and fix scope for conf filetype
by Jiří Techet
10 Sep '16
10 Sep '16
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Sat, 06 Aug 2016 20:01:05 UTC Commit: 0ec3590e199eb9f4576eacaffc7785dca2e5f847
https://github.com/geany/geany/commit/0ec3590e199eb9f4576eacaffc7785dca2e5f…
Log Message: ----------- Remove makeSimpleScopedTag() and fix scope for conf filetype Modified Paths: -------------- ctags/main/parse.c ctags/main/parse.h ctags/parsers/conf.c ctags/parsers/haxe.c Modified: ctags/main/parse.c 18 lines changed, 0 insertions(+), 18 deletions(-) =================================================================== @@ -68,24 +68,6 @@ extern void makeSimpleTag (const vString* const name, } -extern void makeSimpleScopedTag (const vString* const name, - kindOption* const kinds, const int kind, - const char* scopeKind, const char *scopeName, - const char *laccess) -{ - if (name != NULL && vStringLength (name) > 0) - { - tagEntryInfo e; - initTagEntry (&e, vStringValue (name), &(kinds [kind])); - - e.extensionFields.scopeKind = &(kinds [kind]); - e.extensionFields.scopeName = scopeName; - e.extensionFields.access = laccess; - - makeTagEntry (&e); - } -} - /* * parserDescription mapping management */ Modified: ctags/main/parse.h 1 lines changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -111,7 +111,6 @@ extern void processLegacyKindOption (const char *const parameter); /* Language processing and parsing */ extern void makeSimpleTag (const vString* const name, kindOption* const kinds, const int kind); -extern void makeSimpleScopedTag (const vString* const name, kindOption* const kinds, const int kind, const char* scope, const char* scope2, const char *access); extern parserDefinition* parserNew (const char* name); extern parserDefinition* parserNewFull (const char* name, char fileKind); Modified: ctags/parsers/conf.c 12 lines changed, 8 insertions(+), 4 deletions(-) =================================================================== @@ -91,11 +91,15 @@ static void findConfTags (void) ++cp; if (*cp == '=') { + tagEntryInfo e; + initTagEntry (&e, vStringValue (name), &(ConfKinds [K_KEY])); + if (vStringLength (scope) > 0) - makeSimpleScopedTag (name, ConfKinds, K_KEY, - "section", vStringValue(scope), NULL); - else - makeSimpleTag (name, ConfKinds, K_KEY); + { + e.extensionFields.scopeKind = &(ConfKinds [K_SECTION]); + e.extensionFields.scopeName = vStringValue(scope); + } + makeTagEntry (&e); } vStringClear (name); } Modified: ctags/parsers/haxe.c 10 lines changed, 0 insertions(+), 10 deletions(-) =================================================================== @@ -92,11 +92,6 @@ static void findHxTags (void) } vStringTerminate (name); makeSimpleTag (name, HxKinds, HXTAG_VARIABLE); - /* - makeSimpleScopedTag(name, HxKinds, - HXTAG_VARIABLE,vStringValue(clsName), - strdup(vStringValue(scope2)),strdup(vStringValue(laccess))); - */ vStringClear (name); } @@ -116,11 +111,6 @@ static void findHxTags (void) } vStringTerminate (name); makeSimpleTag (name, HxKinds, HXTAG_METHODS); - /* - makeSimpleScopedTag(name, HxKinds, HXTAG_METHODS, - strdup(vStringValue(clsName)),strdup(vStringValue(scope2)),strdup(vStringValue(laccess))); - - */ vStringClear (name); } -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] d440a8: Add tagRegexTable to parserDefinition and use it to define regex parsers
by Jiří Techet
10 Sep '16
10 Sep '16
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Mon, 01 Aug 2016 21:48:06 UTC Commit: d440a81166e62d41e2b06d555b471db5fdd8d80d
https://github.com/geany/geany/commit/d440a81166e62d41e2b06d555b471db5fdd8d…
Log Message: ----------- Add tagRegexTable to parserDefinition and use it to define regex parsers Also whitespace-format regexes so they match uctags. Modified Paths: -------------- ctags/main/parse.c ctags/main/parse.h ctags/parsers/actionscript.c ctags/parsers/cobol.c ctags/parsers/html.c src/tagmanager/tm_ctags_wrappers.c Modified: ctags/main/parse.c 32 lines changed, 27 insertions(+), 5 deletions(-) =================================================================== @@ -324,6 +324,7 @@ static void initializeParserOne (langType lang) parserDefinition *const parser = LanguageTable [lang]; installKeywordTable (lang); + installTagRegexTable (lang); if ((parser->initialize != NULL) && (parser->initialized == FALSE)) { @@ -355,7 +356,7 @@ extern void initializeParsing (void) boolean accepted = FALSE; if (def->name == NULL || def->name[0] == '\0') error (FATAL, "parser definition must contain name\n"); - else if (def->regex) + else if (def->method & METHOD_REGEX) { #ifdef HAVE_REGEX def->parser = findRegexTags; @@ -414,7 +415,7 @@ extern void processLanguageDefineOption (const char *const option, def->parser = findRegexTags; def->currentPatterns = stringListNew (); def->currentExtensions = stringListNew (); - def->regex = TRUE; + def->method = METHOD_NOT_CRAFTED; def->enabled = TRUE; def->id = i; LanguageTable = xRealloc (LanguageTable, i + 1, parserDefinition*); @@ -482,7 +483,7 @@ extern void processLegacyKindOption (const char *const parameter) static void disableLanguageKinds (const langType language) { - if (LanguageTable [language]->regex) + if (LanguageTable [language]->method & METHOD_REGEX) #ifdef HAVE_REGEX disableRegexKinds (language); #else @@ -500,7 +501,7 @@ static boolean enableLanguageKind (const langType language, const int kind, const boolean mode) { boolean result = FALSE; - if (LanguageTable [language]->regex) + if (LanguageTable [language]->method & METHOD_REGEX) #ifdef HAVE_REGEX result = enableRegexKind (language, kind, mode); #else @@ -578,7 +579,7 @@ static void printLangugageKindOptions (const langType language) const parserDefinition* lang; Assert (0 <= language && language < (int) LanguageCount); lang = LanguageTable [language]; - if (lang->kinds != NULL || lang->regex) + if (lang->kinds != NULL || lang->method & METHOD_NOT_CRAFTED) { unsigned int i; char* const name = newLowerString (lang->name); @@ -690,6 +691,27 @@ extern boolean parseFile (const char *const fileName) return tagFileResized; } +extern void installTagRegexTable (const langType language) +{ + parserDefinition* lang; + unsigned int i; + + Assert (0 <= language && language < (int) LanguageCount); + lang = LanguageTable [language]; + + + if ((lang->tagRegexTable != NULL) && (lang->tagRegexInstalled == FALSE)) + { + for (i = 0; i < lang->tagRegexCount; ++i) + addTagRegex (language, + lang->tagRegexTable [i].regex, + lang->tagRegexTable [i].name, + lang->tagRegexTable [i].kinds, + lang->tagRegexTable [i].flags); + lang->tagRegexInstalled = TRUE; + } +} + extern void installKeywordTable (const langType language) { parserDefinition* lang; Modified: ctags/main/parse.h 22 lines changed, 21 insertions(+), 1 deletions(-) =================================================================== @@ -36,6 +36,22 @@ typedef boolean (*rescanParser) (const unsigned int passCount); typedef void (*parserInitialize) (langType language); typedef int (*tagEntryFunction) (const tagEntryInfo *const tag, void *user_data); +typedef enum { + METHOD_NOT_CRAFTED = 1 << 0, + METHOD_REGEX = 1 << 1, + METHOD_XCMD = 1 << 2, + METHOD_XCMD_AVAILABLE = 1 << 3, + METHOD_XPATH = 1 << 4, +} parsingMethod; + +typedef struct { + const char *const regex; + const char* const name; + const char* const kinds; + const char *const flags; + boolean *disabled; +} tagRegexTable; + typedef struct { const char *name; const int id; @@ -52,17 +68,20 @@ typedef struct { parserInitialize initialize; /* initialization routine, if needed */ simpleParser parser; /* simple parser (common case) */ rescanParser parser2; /* rescanning parser (unusual case) */ - boolean regex; /* is this a regex parser? */ + unsigned int method; /* See PARSE__... definitions above */ /* used internally */ unsigned int id; /* id assigned to language */ boolean enabled; /* currently enabled? */ stringList* currentPatterns; /* current list of file name patterns */ stringList* currentExtensions; /* current list of extensions */ + tagRegexTable *tagRegexTable; + unsigned int tagRegexCount; const keywordTable *keywordTable; unsigned int keywordCount; unsigned int initialized:1; /* initialize() is called or not */ + unsigned int tagRegexInstalled:1; /* tagRegexTable is installed or not. */ unsigned int keywordInstalled:1; /* keywordTable is installed or not. */ } parserDefinition; @@ -124,6 +143,7 @@ extern boolean matchRegex (const vString* const line, const langType language); #endif extern boolean processRegexOption (const char *const option, const char *const parameter); extern void addLanguageRegex (const langType language, const char* const regex); +extern void installTagRegexTable (const langType language); extern void addTagRegex (const langType language, const char* const regex, const char* const name, const char* const kinds, const char* const flags); extern void addCallbackRegex (const langType language, const char* const regex, const char* flags, const regexCallback callback); extern void disableRegexKinds (const langType UNUSED language); Modified: ctags/parsers/actionscript.c 62 lines changed, 31 insertions(+), 31 deletions(-) =================================================================== @@ -36,64 +36,64 @@ */ #include "general.h" /* must always come first */ #include "parse.h" +#include "routines.h" -/* -* FUNCTION DEFINITIONS -* -*/ - -static void installActionScriptRegex (const langType language) -{ +static tagRegexTable actionscriptTagRegexTable[] = { /* Functions */ - addTagRegex (language, "^[ \t]*[(private|public|static|protected|internal|final|override)( \t)]*function[ \t]+([A-Za-z0-9_]+)[ \t]*\\(([^\\{]*)", - "\\1 (\\2", "f,function,functions,methods", NULL); + {"^[ \t]*[(private|public|static|protected|internal|final|override)( \t)]*function[ \t]+([A-Za-z0-9_]+)[ \t]*\\(([^\\{]*)", + "\\1 (\\2", "f,function,functions,methods", NULL}, /* Getters and setters */ - addTagRegex (language, "^[ \t]*[(public|static|internal|final|override)( \t)]*function[ \t]+(set|get)[ \t]+([A-Za-z0-9_]+)[ \t]*\\(", - "\\2 \\1", "l,field,fields", NULL); + {"^[ \t]*[(public|static|internal|final|override)( \t)]*function[ \t]+(set|get)[ \t]+([A-Za-z0-9_]+)[ \t]*\\(", + "\\2 \\1", "l,field,fields", NULL}, /* Variables */ - addTagRegex (language, "^[ \t]*[(private|public|static|protected|internal)( \t)]*var[ \t]+([A-Za-z0-9_]+)([ \t]*\\:[ \t]*([A-Za-z0-9_]+))*[ \t]*", - "\\1 \\: \\3", "v,variable,variables", NULL); + {"^[ \t]*[(private|public|static|protected|internal)( \t)]*var[ \t]+([A-Za-z0-9_]+)([ \t]*\\:[ \t]*([A-Za-z0-9_]+))*[ \t]*", + "\\1 \\: \\3", "v,variable,variables", NULL}, /* Constants */ - addTagRegex (language, "^[ \t]*[(private|public|static|protected|internal)( \t)]*const[ \t]+([A-Za-z0-9_]+)([ \t]*\\:[ \t]*([A-Za-z0-9_]+))*[ \t]*", - "\\1 : \\3", "m,macro,macros", NULL); + {"^[ \t]*[(private|public|static|protected|internal)( \t)]*const[ \t]+([A-Za-z0-9_]+)([ \t]*\\:[ \t]*([A-Za-z0-9_]+))*[ \t]*", + "\\1 : \\3", "m,macro,macros", NULL}, /* Classes */ - addTagRegex (language, "^[ \t]*[(private|public|static|dynamic|final|internal)( \t)]*class[ \t]+([A-Za-z0-9_]+)[ \t]*([^\\{]*)", - "\\1 (\\2)", "c,class,classes", NULL); + {"^[ \t]*[(private|public|static|dynamic|final|internal)( \t)]*class[ \t]+([A-Za-z0-9_]+)[ \t]*([^\\{]*)", + "\\1 (\\2)", "c,class,classes", NULL}, /* Interfaces */ - addTagRegex (language, "^[ \t]*[(private|public|static|dynamic|final|internal)( \t)]*interface[ \t]+([A-Za-z0-9_]+)[ \t]*([^\\{]*)", - "\\1 (\\2)", "i,interface,interfaces", NULL); + {"^[ \t]*[(private|public|static|dynamic|final|internal)( \t)]*interface[ \t]+([A-Za-z0-9_]+)[ \t]*([^\\{]*)", + "\\1 (\\2)", "i,interface,interfaces", NULL}, /* Packages */ - addTagRegex (language, "^[ \t]*[(private|public|static)( \t)]*package[ \t]+([A-Za-z0-9_.]+)[ \t]*", - "\\1", "p,package", NULL); + {"^[ \t]*[(private|public|static)( \t)]*package[ \t]+([A-Za-z0-9_.]+)[ \t]*", + "\\1", "p,package", NULL}, /* Notes */ - addTagRegex (language, "\\/\\/[ \t]*(NOTE|note|Note)[ \t]*\\:*(.*)", - "\\2", "o,other", NULL); + {"\\/\\/[ \t]*(NOTE|note|Note)[ \t]*\\:*(.*)", + "\\2", "o,other"}, /* Todos */ - addTagRegex (language, "\\/\\/[ \t]*(TODO|todo|ToDo|Todo)[ \t]*\\:*(.*)", - "\\2", "o,other", NULL); + {"\\/\\/[ \t]*(TODO|todo|ToDo|Todo)[ \t]*\\:*(.*)", + "\\2", "o,other"}, /* Prototypes (Put this in for AS1 compatibility...) */ - addTagRegex (language, ".*\\.prototype\\.([A-Za-z0-9 ]+)[ \t]*\\=([ \t]*)function( [ \t]?)*\\(", - "\\1", "r,prototype", NULL); -} + {".*\\.prototype\\.([A-Za-z0-9 ]+)[ \t]*\\=([ \t]*)function( [ \t]?)*\\(", + "\\1", "r,prototype"} +}; + +/* +* FUNCTION DEFINITIONS +* +*/ /* Create parser definition structure */ extern parserDefinition* ActionScriptParser (void) - { static const char *const extensions [] = { "as", NULL }; parserDefinition *const def = parserNew ("ActionScript"); def->extensions = extensions; - def->initialize = installActionScriptRegex; - def->regex = TRUE; + def->tagRegexTable = actionscriptTagRegexTable; + def->tagRegexCount = ARRAY_SIZE (actionscriptTagRegexTable); + def->method = METHOD_NOT_CRAFTED|METHOD_REGEX; return def; } Modified: ctags/parsers/cobol.c 38 lines changed, 20 insertions(+), 18 deletions(-) =================================================================== @@ -15,34 +15,36 @@ #include "parse.h" #include "routines.h" +static tagRegexTable cobolTagRegexTable[] = { + {"^[ \t]*[0-9]+[ \t]+([A-Z0-9][A-Z0-9-]*)[ \t]+(" + "BLANK|OCCURS|IS|JUST|PIC|REDEFINES|RENAMES|SIGN|SYNC|USAGE|VALUE" + ")", "\\1", + "d,data,data items", "i"}, + {"^[ \t]*[FSR]D[ \t]+([A-Z0-9][A-Z0-9-]*)\\.", "\\1", + "f,file,file descriptions (FD, SD, RD)", "i"}, + {"^[ \t]*[0-9]+[ \t]+([A-Z0-9][A-Z0-9-]*)\\.", "\\1", + "g,group,group items", "i"}, + {"^[ \t]*([A-Z0-9][A-Z0-9-]*)\\.", "\\1", + "p,paragraph,paragraphs", "i"}, + {"^[ \t]*PROGRAM-ID\\.[ \t]+([A-Z0-9][A-Z0-9-]*)\\.", "\\1", + "P,program,program ids", "i"}, + {"^[ \t]*([A-Z0-9][A-Z0-9-]*)[ \t]+SECTION\\.", "\\1", + "s,section,sections", "i"}, +}; + /* * FUNCTION DEFINITIONS */ -static void installCobolRegex (const langType language) -{ - addTagRegex (language, "^[ \t]*[0-9]+[ \t]+([A-Z0-9][A-Z0-9-]*)[ \t]+(BLANK|OCCURS|IS|JUST|PIC|REDEFINES|RENAMES|SIGN|SYNC|USAGE|VALUE)", - "\\1", "d,data,data items", "i"); - addTagRegex (language, "^[ \t]*[FSR]D[ \t]+([A-Z0-9][A-Z0-9-]*)\\.", - "\\1", "f,file,file descriptions (FD, SD, RD)", "i"); - addTagRegex (language, "^[ \t]*[0-9]+[ \t]+([A-Z0-9][A-Z0-9-]*)\\.", - "\\1", "g,group,group items", "i"); - addTagRegex (language, "^[ \t]*([A-Z0-9][A-Z0-9-]*)\\.", - "\\1", "p,paragraph,paragraphs", "i"); - addTagRegex (language, "^[ \t]*PROGRAM-ID\\.[ \t]+([A-Z0-9][A-Z0-9-]*)\\.", - "\\1", "P,program,program ids", "i"); - addTagRegex (language, "^[ \t]*([A-Z0-9][A-Z0-9-]*)[ \t]+SECTION\\.", - "\\1", "s,section,sections", "i"); -} - extern parserDefinition* CobolParser (void) { static const char *const extensions [] = { "cbl", "cob", "cpy", "CBL", "COB", NULL }; parserDefinition* def = parserNew ("Cobol"); def->extensions = extensions; - def->initialize = installCobolRegex; - def->regex = TRUE; + def->tagRegexTable = cobolTagRegexTable; + def->tagRegexCount = ARRAY_SIZE (cobolTagRegexTable); + def->method = METHOD_NOT_CRAFTED|METHOD_REGEX; return def; } Modified: ctags/parsers/html.c 49 lines changed, 21 insertions(+), 28 deletions(-) =================================================================== @@ -15,24 +15,15 @@ #include "parse.h" #include "routines.h" -/* -* FUNCTION DEFINITIONS -*/ - -static void installHtmlRegex (const langType language) -{ +static tagRegexTable htmlTagRegexTable [] = { #define POSSIBLE_ATTRIBUTES "([ \t]+[a-z]+=\"?[^>\"]*\"?)*" - addTagRegex (language, - "<a" - POSSIBLE_ATTRIBUTES - "[ \t]+name=\"?([^>\"]+)\"?" - POSSIBLE_ATTRIBUTES - "[ \t]*>", - "\\2", "a,anchor,named anchors", "i"); - - addTagRegex (language, "^[ \t]*function[ \t]*([A-Za-z0-9_]+)[ \t]*\\(", - "\\1", "f,function,JavaScript functions", NULL); + {"<a" + POSSIBLE_ATTRIBUTES "[ \t]+name=\"?([^>\"]+)\"?" POSSIBLE_ATTRIBUTES + "[ \t]*>", "\\2", + "a,anchor,named anchors", "i"}, + {"^[ \t]*function[ \t]*([A-Za-z0-9_]+)[ \t]*\\(", "\\1", + "f,function,JavaScript functions", NULL}, /* the following matches headings with tags inside like * <h1><a href="#id109"><i>Some Text</i></a></h1> @@ -43,27 +34,29 @@ static void installHtmlRegex (const langType language) #define INNER_HEADING \ ATTRS ">" SPACES "(<" ATTRS ">" SPACES ")*([^<]+).*" - addTagRegex (language, - "<h1" INNER_HEADING "</h1>", - "\\2", "n,namespace,H1 heading", "i"); + {"<h1" INNER_HEADING "</h1>", "\\2", + "n,namespace,H1 heading", "i"}, - addTagRegex (language, - "<h2" INNER_HEADING "</h2>", - "\\2", "c,class,H2 heading", "i"); + {"<h2" INNER_HEADING "</h2>", "\\2", + "c,class,H2 heading", "i"}, - addTagRegex (language, - "<h3" INNER_HEADING "</h3>", - "\\2", "v,variable,H3 heading", "i"); -} + {"<h3" INNER_HEADING "</h3>", "\\2", + "v,variable,H3 heading", "i"}, +}; + +/* +* FUNCTION DEFINITIONS +*/ /* Create parser definition structure */ extern parserDefinition* HtmlParser (void) { static const char *const extensions [] = { "htm", "html", NULL }; parserDefinition *const def = parserNew ("HTML"); def->extensions = extensions; - def->initialize = installHtmlRegex; - def->regex = TRUE; + def->tagRegexTable = htmlTagRegexTable; + def->tagRegexCount = ARRAY_SIZE (htmlTagRegexTable); + def->method = METHOD_NOT_CRAFTED|METHOD_REGEX; return def; } Modified: src/tagmanager/tm_ctags_wrappers.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -161,7 +161,7 @@ gchar tm_ctags_get_kind_from_name(const gchar *name, TMParserType lang) gboolean tm_ctags_is_using_regex_parser(TMParserType lang) { - return LanguageTable[lang]->regex; + return LanguageTable[lang]->method & METHOD_REGEX; } -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 7e0845: Make PathDelimiters match the declaration in header
by Jiří Techet
10 Sep '16
10 Sep '16
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Wed, 03 Aug 2016 10:20:57 UTC Commit: 7e0845b083e56f59b87390507df9444c4f99b826
https://github.com/geany/geany/commit/7e0845b083e56f59b87390507df9444c4f99b…
Log Message: ----------- Make PathDelimiters match the declaration in header Modified Paths: -------------- ctags/main/routines.c Modified: ctags/main/routines.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -160,7 +160,7 @@ * DATA DEFINITIONS */ #if defined (MSDOS_STYLE_PATH) -static const char PathDelimiters [] = ":/\\"; +const char *const PathDelimiters = ":/\\"; #endif char *CurrentDirectory; -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] 9c4c11: Remove some additional functions from ctags which we don't need in Geany
by Jiří Techet
10 Sep '16
10 Sep '16
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Wed, 03 Aug 2016 10:00:14 UTC Commit: 9c4c113488f6d5743c79865c74f2d6d4e8dd875a
https://github.com/geany/geany/commit/9c4c113488f6d5743c79865c74f2d6d4e8dd8…
Log Message: ----------- Remove some additional functions from ctags which we don't need in Geany These are useless for Geany and introduce some compilation errors at the moment so drop them for now. Modified Paths: -------------- ctags/main/main.c ctags/main/routines.c Modified: ctags/main/main.c 102 lines changed, 0 insertions(+), 102 deletions(-) =================================================================== @@ -103,108 +103,6 @@ extern boolean isDestinationStdout (void) return toStdout; } - -# if defined (WIN32) - -static boolean createTagsForMatchingEntries (char *const pattern) -{ - boolean resize = FALSE; - const size_t dirLength = baseFilename (pattern) - (char *) pattern; - vString *const filePath = vStringNew (); -#if defined (HAVE_FINDFIRST) - struct ffblk fileInfo; - int result = findfirst (pattern, &fileInfo, FA_DIREC); - while (result == 0) - { - const char *const entryName = fileInfo.ff_name; - - /* We must not recurse into the directories "." or "..". - */ - if (strcmp (entryName, ".") != 0 && strcmp (entryName, "..") != 0) - { - vStringNCopyS (filePath, pattern, dirLength); - vStringCatS (filePath, entryName); - resize |= createTagsForEntry (vStringValue (filePath)); - } - result = findnext (&fileInfo); - } -#elif defined (HAVE__FINDFIRST) - struct _finddata_t fileInfo; - long hFile = _findfirst (pattern, &fileInfo); - - if (hFile != -1L) - { - do - { - const char *const entryName = fileInfo.name; - - /* We must not recurse into the directories "." or "..". - */ - if (strcmp (entryName, ".") != 0 && strcmp (entryName, "..") != 0) - { - vStringNCopyS (filePath, pattern, dirLength); - vStringCatS (filePath, entryName); - resize |= createTagsForEntry (vStringValue (filePath)); - } - } while (_findnext (hFile, &fileInfo) == 0); - _findclose (hFile); - } -#endif - - vStringDelete (filePath); - return resize; -} - -#endif - - -static boolean recurseIntoDirectory (const char *const dirName) -{ - boolean resize = FALSE; - if (isRecursiveLink (dirName)) - verbose ("ignoring \"%s\" (recursive link)\n", dirName); - else if (! Option.recurse) - verbose ("ignoring \"%s\" (directory)\n", dirName); - else - { -#if defined (HAVE_OPENDIR) - DIR *const dir = opendir (dirName); - if (dir == NULL) - error (WARNING | PERROR, "cannot recurse into directory \"%s\"", - dirName); - else - { - struct dirent *entry; - verbose ("RECURSING into directory \"%s\"\n", dirName); - while ((entry = readdir (dir)) != NULL) - { - if (strcmp (entry->d_name, ".") != 0 && - strcmp (entry->d_name, "..") != 0) - { - vString *filePath; - if (strcmp (dirName, ".") == 0) - filePath = vStringNewInit (entry->d_name); - else - filePath = combinePathAndFile (dirName, entry->d_name); - resize |= createTagsForEntry (vStringValue (filePath)); - vStringDelete (filePath); - } - } - closedir (dir); - } -#elif defined (WIN32) - vString *const pattern = vStringNew (); - verbose ("RECURSING into directory \"%s\"\n", dirName); - vStringCopyS (pattern, dirName); - vStringPut (pattern, OUTPUT_PATH_SEPARATOR); - vStringCatS (pattern, "*.*"); - resize = createTagsForMatchingEntries (vStringValue (pattern)); - vStringDelete (pattern); -#endif /* HAVE_OPENDIR */ - } - return resize; -} - #if defined (HAVE_CLOCK) # define CLOCK_AVAILABLE # ifndef CLOCKS_PER_SEC Modified: ctags/main/routines.c 4 lines changed, 0 insertions(+), 4 deletions(-) =================================================================== @@ -181,10 +181,6 @@ extern int stat (const char *, struct stat *); extern int lstat (const char *, struct stat *); #endif -#if 0 -static boolean createTagsForEntry (const char *const entryName); -#endif - /* * FUNCTION DEFINITIONS -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
[geany/geany] eb45c8: Always define ExecutableName variable
by Jiří Techet
10 Sep '16
10 Sep '16
Branch: refs/heads/master Author: Jiří Techet <techet(a)gmail.com> Committer: Jiří Techet <techet(a)gmail.com> Date: Wed, 03 Aug 2016 10:21:51 UTC Commit: eb45c80058bc74fb3331e91d78d41e54b1ff482b
https://github.com/geany/geany/commit/eb45c80058bc74fb3331e91d78d41e54b1ff4…
Log Message: ----------- Always define ExecutableName variable Modified Paths: -------------- ctags/main/routines.c Modified: ctags/main/routines.c 3 lines changed, 0 insertions(+), 3 deletions(-) =================================================================== @@ -165,10 +165,7 @@ const char *const PathDelimiters = ":/\\"; char *CurrentDirectory; -#ifdef HAVE_MKSTEMP static const char *ExecutableProgram = NULL; -#endif - static const char *ExecutableName = "geany"; /* -------------- This E-Mail was brought to you by github_commit_mail.py (Source:
https://github.com/geany/infrastructure
).
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
Older →
Jump to page:
1
2
3
4
5
6
7
8
Results per page:
10
25
50
100
200