Fix a race initialization leading to incorrect handling of preprocessor
directives on the first input line.
Test case contributed by Adam Hirst, thanks.
errno is never reset to 0 by the system libraries, so if we test
its value we need to reset it to 0 before the call that may change
it to something else.
Fix spawnning command under Windows when they contain spaces in both
the executable and the arguments. Apparently system() quoting is
unexpected, and doesn't work properly if there is more than 2 quotes
in the whole command.
To work this around, spawn the command through `cmd.exe /S /C`.
To do this we change the internal types to only use types matched by
symbols_get_current_scope(). This is a bit of a hack, but the tag
types were already questionable and simply mapped to ones the
TagManager know.
This however merges Functions and Subroutines under the same top-level
item in the symbol list.
Fortran 2003 allows '[' and ']' as array constructors in addition to
the legacy '(/' and '/)'. Fortran 2008 allows '[]' as part of a
CODIMENSION specifier, which can either be `codimension[]` in
the type-spec; or as either `variable[]` or `variable()[]` in
the entry-spec.
Credit to Colomban Wendling for the skipOverSquares logic, and
treating `codimension` as a special-case.
Last part of bug #1023.
Custom command callback never checked that the doc was still valid.
Can still paste in the wrong doc if user closes and opens while
the command is running, but not crash.
This fixes 'Go to Tag definition' for parsed Python imports as before the import
statement was chosen as the definition while we prefer the class definition as
target.
This is a requirement for an upcoming Python parser fix. This new category
will be currently only used by Python, C and D parsers. Before this change,
in C & D extern variables were sorted into the category "Other", now they
have their own category.
* Add an initialization function ft_init()
* Add a function-like macro to call ft_init() with shorter arguments
* Search and replace old code with FT_INIT() usage
* Layout into columns and add documentation above
* Adds TITLE_NONE, TITLE_SCRIPT and TITLE_DOCUMENT.
* Only a few filetype titles were tweaked but we should review the
rest as we could use TITLE_SCRIPT and TITLE_DOCUMENT a lot more
probably.
* Make filetype_make_title() not care about GeanyFiletype type and
return result instead of internally setting ft state.
Mitigate parse error with generics like `foo<X<Y> x;` by avoiding
matching past a semicolon (";") or open curly brace ("{"), which
can't be part of the generic. This isn't a proper fix, but mitigates
the impact of such constructs.
g_return_if_fail() puts itself its condition in a G_LIKELY() clause,
and nested G_LIKELY() lead to warnings about shadowed variables, as
well as not being of any use.
Also, hiding G_LIKELY() in a macro may lead to unexpected use of it
which may hint the compiler incorrectly.