Alright, hopefully my last Colomban-killer patchset. I tried to sync as much as possible from ctags/main here (no big parser changes at this point, only those caused by some change in main).
I'm not sure how much it's worth reviewing patch by patch (maybe except those patches that touch some Geany code or parsers) - it's much easier to diff this against universal-ctags and see the differences - there just a few of them. I made some minor changes to uctags as well so better to diff against https://github.com/techee/ctags/tree/geany_sync2 which contains those changes.
I tried to librarify ctags a bit by adding CTAGS_LIB macro by which I protect the library-specific stuff. There are however still some things which are either missing in uctags or which we should change in Geany:
- varType missing in uctags
- GRegex vs GNU regex - I kept GRegex in lregex.c (but synced all the rest) but we should think whether not to convert back to GNU regex
- isIgnoreToken() works differently than in uctags. If it simply just dropped certain tags, we could move the logic into TM but right now, it helps the C parser with parsing by suggesting whether the contents of braces should be dropped too. I'm not sure if we need to preserve this functionality (never used the ignored.tags file myself) but if we move to the new cxx parser we'd have to keep this diff unless there's some interest for this in uctags.
- lcpp contains lots of changes as it's tightly related to c.c. However, as it's used by c.c only and quite independent of the rest, if we move to the cxx parser we could keep a separate copy of lcpp for the obsolete c.c parser.
Except 829ea7d I tried to do all the work piece by piece so nothing should be lost. There wasn't much work on parsers except the mentioned patch where parsers using nestlevel had to be updated to its new API and using cork (which works so every uctags parser could be now ported to Geany).
I think it's too late for Geany 1.29 but it would be good to have it ready for early 1.30 so it can be tested during the whole release cycle.
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1263
Commit Summary
- Grab the complete uctags vString implementation
- Add generic pointer array
- Eliminate uses of g_stat()
- Drop some more unused functions from routines.c/h
- Remove most uses of glib calls
- Remove unused functions from options.c/h
- Grab uctags implementation of strlist
- Grab uctags keyword.c/h and add types.h with type declarations
- Make tempFile() return MIO
- Make combinePathAndFile() return char * instead of vString
- Use parse separator utilities in routines.c
- Make sure that file extension is taken from file (not preceding directory)
- Use uctags implementation of strstr()
- Don't initialize ExecutableProgram and ExecutableName
- Sync the rest of routines.c/h
- Grab uctags ctags.h and add repoinfo.c/h
- Grab args.c/h uctags implementation
- Define gcc attributes inside gcc-attr.h
- Move debug related code to debug.c/h
- Remove all unused code from main.c
- Grab all MIO changes from uctags
- Implement iFileGetLine() using gets()
- Grab ctags version of general.h and make related changes
- Grab ctags implementation of sort.c/h
- Create geany.c/h and put isIgnoreToken()
- Sync options.c/h (and introduce a lot of new garbage)
- Grab uctags kind.c/h
- Some sync of lcpp.c/h
- Move eTagFile from entry.h to entry.c
- Sync the beginning of entry.c/h
- entry: Take over uctags tag writing code
- entry: Some more or less formal changes
- entry: make makeTakEntry() implementation closer to uctags
- entry: Sync initTagEntry() code
- entry: Add the remaining code from uctags
- read: change macros into functions and move them into c
- c.c, lcpp.c: Avoid using File.mio
- read: move sInputFileInfo, sInputFile and File to read.c
- read: Add some extra data structures
- read: use makeFileTag()
- read: Some function renaming
- read: implement openBuffer() using openInputFile()
- read: Add function to initialize common parts of input/source files and use it
- read: introduce langStack for source files
- read: add lineFposMap
- read: add the remaining stuff from uctags
- parse: remove things unused by Geany for simpler merge
- parse: some simple syncs and include syncs
- parse: other small syncs
- lregex: sync includes
- lregex: replace regexBroken with regexAvailable
- lregex: some simple syncs
- lregex: remove unused functions
- lregex: Initialize lregex structures the universal-ctags way
- lregex: Add missing fields to regexPattern
- lregex: sync some function prototypes
- lregex: introduce findRegexTagsMainloop()
- lregex: some harmless syncs
- lregex: add new flag processing
- lregex: sync the remaining parts of the existing code
- lregex: Add the remaining missing functions from uctags
- Grab uctags version of parse.c/h and nestlevel.c/h plus additional fallout
- grab uctags debug.c/h
- Add typeRef to sTagEntryInfo
- read: backport patch from uctags
- Some minor syncs
- Sync error.c completely and create a custom error printer
- tmp
- Some initial work on ctags as a library
- Move ctags "API" from Geany to ctags
- Make LanguageTable variable private in parse.c
- Add the remaining missing files from uctags
- Annotate geany-specific diffs
File Changes
Patch Links:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.