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.
In build_run_cmd() the script was not deleted when any one of
several errors occurred. The errors are not related to script
contents so it makes no sense to leave the script.
Also fixes failure to delete script if a working dir was set.
fileEOF() actually returns TRUE anywhere after the last newline when
using the file*() API, which includes a last line without newline.
This is an implementation detail which makes this function not usable
with the rest of the file*() API. fileEOF() should actually probably
be called iFileEOF(), but that's outside the scope of this parser.
However, even if fileEOF() did work properly with fileGetc(), the very
last byte in the input would have been omitted because we actually
read ahead by one byte, which means the actual read reaches EOF one
byte before our "current byte" does.
Checking whether we reached EOF by checking whether our current byte
isn't equal to `EOF` fixes it, and isn't worse since it's actually how
fileEOF() is implemented anyway.
Although GtkIconFactory implements GtkBuildable properly and works just
fine, Glade can't handle it and keeps removing it upon save. So, drop
the automatic setup to a manual one so the UI description is editable
with Glade again, and which also has the small advantage of not
repeating the stock ID strings.
Properly exit when passed --list-documents, even if no other instance
were already running. This makes this option behave the same in any
case, making it easier to use in e.g. scripts.
Do not truncate the document list to the size of the buffer used for
communication.
Since we now read multiple times, we need to make sure to always send
ETX so a reader don't hang reading the next chunk if the data sent had
exactly the size of the buffer.
Enable Automake option "subdir-object" to put all object files next to
their source file rather than in the directory containing the Makefile.
This is quite expected, and will be the future behavior of Automake in
all cases, so enabling it now avoids future unexpected change.
Change utils_parse_color() to use gdk_color_parse() and follow its
syntax, additionally supporting our "0x" prefix as a synonym for the
"#" prefix; and use this everywhere.
Also add utils_color_to_bgr() and utils_parse_color_to_bgr() to provide
conversion to the 24 bits BGR format used by Scintilla.