Fix the bounds checking on included styles only to check for inclusion
actually defined styles, not to include random styles based on
uninitialized array indices.
A faulty bound checking resulted in reading a byte past the document
end, which resulted in Scintilla returning byte 0 because the position
was invalid. By adding this NUL byte to the string used to build the
body, the body was truncated after the last document byte (as C strings
are NUL-terminated), leading to any format structure after it to be
missing from the output.
This broke HTML and LaTeX export if the last line didn't end with a
newline, as the last line's style closing structure were missing.
At commit 160e5e stamp was changed from a gchar[512] to a gchar*
but the copy loop still used stamp and sizeof(stamp) as the buffer.
Now gchar[512] buffer is used again.
Use the GtkComboBoxText API and the GtkComboBoxEntry replacement API
and map those to the old equivalents if not available.
This changes the type exposed by ui_combo_box_add_to_history() from
GtkComboBoxEntry to either GtkComboBox (under GTK2) or GtkComboBoxText
(under GTK3). This should not be too much of an issue since
GtkComboBoxEntry and GtkComboBoxtext are subclasses of GtkComboBox,
but this will still emit warnings when when the calling code passes
a GtkComboBoxEntry pointer to ui_combo_box_add_to_history().
However, this requires the calling code to use the same mapping as we
do (GtkComboBoxText = GtkComboBox on GTK2, even on 2.24), or things
will blow and it'll be hard to understand why. This wouldn't be an
issue if the calling code includes our gtkcompat.h header everywhere
it deals with combo boxes, which will be the case if it includes the
Geany headers everywhere but probably won't otherwise. Oh dear.
A possible kind of workaround may be for ui_combo_box_add_to_history()
to do type-checking on its argument and use the actually correct API
for that type.
The export plugin uses the pow() function from libm without linking against
it. It has worked so far because Geany itself has a link against libm, but
should that be removed in the future, this would fail to resolve symbols.
Signed-off-by: Chow Loong Jin <hyperair@debian.org>
Signed-off-by: Colomban Wendling <ban@herbesfolles.org>
Split ctags and tagmanager sources, as follows:
tagmanager/ctags: the parsers, more or less upstream CTags;
tagmanager/mio: local MIO library copy;
tagmanager/src: actual tagmanager sources.
Although go to marker commands (or other keybindings) don't work, the
marker margin can still be useful, and improves alignment with the
original sci widget when using the Top & Bottom split.
This makes the code more readable, potentially more future-proof (if
the actual string changes) and better style (catches possible typos at
build-time).
Use two spaces instead of tabs, spaces between function and opening
argument bracket, and various minor changes.
Add dummy gpointer to private struct so the class can be compiled
without modification.
* Processed with rstrip-whitespace.py script added to scripts/ directory.
* Script run on all .c and .h files in src/ and plugins/ directories.
* Also remove more than one newline at the end of files.
config.h is not distributed, and we includ it from geany.h. Even
though it was only included it HAVE_CONFIG_H was defined, an Autotools
based build system is likely to define it, and it becomes a problem if
that very build system uses another header name than config.h.
Closes#3384026
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5882 ea778897-0a13-0410-b9d1-a72fbfd435f5