summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/arc-context.cpp2
-rw-r--r--src/box3d.cpp2
-rw-r--r--src/color.cpp2
-rw-r--r--src/conn-avoid-ref.cpp2
-rw-r--r--src/desktop-events.cpp1
-rw-r--r--src/desktop-handles.cpp1
-rw-r--r--src/desktop-style.cpp6
-rw-r--r--src/device-manager.cpp4
-rw-r--r--src/dir-util.cpp1
-rw-r--r--src/document.cpp12
-rw-r--r--src/draw-context.cpp3
-rw-r--r--src/dropper-context.cpp2
-rw-r--r--src/dyna-draw-context.cpp2
-rw-r--r--src/ege-adjustment-action.cpp2
-rw-r--r--src/eraser-context.cpp2
-rw-r--r--src/event-context.cpp2
-rw-r--r--src/extract-uri.cpp2
-rw-r--r--src/filter-chemistry.cpp2
-rw-r--r--src/flood-context.cpp2
-rw-r--r--src/gradient-chemistry.cpp7
-rw-r--r--src/gradient-context.cpp4
-rw-r--r--src/gradient-drag.cpp2
-rw-r--r--src/ink-comboboxentry-action.cpp2
-rw-r--r--src/inkscape.cpp6
-rw-r--r--src/interface.cpp16
-rw-r--r--src/main.cpp10
-rw-r--r--src/measure-context.cpp4
-rw-r--r--src/mod360.cpp2
-rw-r--r--src/pen-context.cpp10
-rw-r--r--src/rect-context.cpp2
-rw-r--r--src/removeoverlap.cpp1
-rw-r--r--src/resource-manager.cpp4
-rw-r--r--src/satisfied-guide-cns.cpp11
-rw-r--r--src/select-context.cpp4
-rw-r--r--src/selection-chemistry.cpp24
-rw-r--r--src/selection-describer.cpp6
-rw-r--r--src/sp-image.cpp8
-rw-r--r--src/sp-item-notify-moveto.cpp1
-rw-r--r--src/sp-item-rm-unsatisfied-cns.cpp1
-rw-r--r--src/sp-item-transform.cpp1
-rw-r--r--src/sp-item-update-cns.cpp5
-rw-r--r--src/sp-item.cpp4
-rw-r--r--src/sp-mesh-array.cpp4
-rw-r--r--src/sp-object-repr.cpp1
-rw-r--r--src/sp-object.cpp2
-rw-r--r--src/sp-offset.cpp2
-rw-r--r--src/sp-pattern.cpp6
-rw-r--r--src/spiral-context.cpp2
-rw-r--r--src/splivarot.cpp4
-rw-r--r--src/spray-context.cpp34
-rw-r--r--src/star-context.cpp2
-rw-r--r--src/style.cpp6
-rw-r--r--src/text-chemistry.cpp10
-rw-r--r--src/tweak-context.cpp40
-rw-r--r--src/unclump.cpp19
-rw-r--r--src/vanishing-point.cpp2
56 files changed, 169 insertions, 152 deletions
diff --git a/src/arc-context.cpp b/src/arc-context.cpp
index 95ff05b37..9675df8e3 100644
--- a/src/arc-context.cpp
+++ b/src/arc-context.cpp
@@ -159,7 +159,7 @@ static void sp_arc_context_dispose(GObject *object)
* Callback that processes the "changed" signal on the selection;
* destroys old and creates new knotholder.
*/
-void sp_arc_context_selection_changed(Inkscape::Selection * selection, gpointer data)
+static void sp_arc_context_selection_changed(Inkscape::Selection * selection, gpointer data)
{
SPArcContext *ac = SP_ARC_CONTEXT(data);
SPEventContext *ec = SP_EVENT_CONTEXT(ac);
diff --git a/src/box3d.cpp b/src/box3d.cpp
index 23f934b64..a011b1567 100644
--- a/src/box3d.cpp
+++ b/src/box3d.cpp
@@ -366,7 +366,7 @@ box3d_set_transform(SPItem *item, Geom::Affine const &xform)
return Geom::identity();
}
-Proj::Pt3
+static Proj::Pt3
box3d_get_proj_corner (guint id, Proj::Pt3 const &c0, Proj::Pt3 const &c7) {
return Proj::Pt3 ((id & Box3D::X) ? c7[Proj::X] : c0[Proj::X],
(id & Box3D::Y) ? c7[Proj::Y] : c0[Proj::Y],
diff --git a/src/color.cpp b/src/color.cpp
index 187a6ba6a..0a07d3f21 100644
--- a/src/color.cpp
+++ b/src/color.cpp
@@ -352,7 +352,7 @@ sp_color_rgb_to_hsl_floatv (float *hsl, float r, float g, float b)
}
}
-float
+static float
hue_2_rgb (float v1, float v2, float h)
{
if (h < 0) h += 6.0;
diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp
index d6f02e875..c0882c526 100644
--- a/src/conn-avoid-ref.cpp
+++ b/src/conn-avoid-ref.cpp
@@ -86,7 +86,7 @@ void SPAvoidRef::setAvoid(char const *value)
}
}
-void print_connection_points(std::map<int, ConnectionPoint>& cp)
+static void print_connection_points(std::map<int, ConnectionPoint>& cp)
{
std::map<int, ConnectionPoint>::iterator i;
for (i=cp.begin(); i!=cp.end(); ++i)
diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp
index 6b47bdad6..1377fef9d 100644
--- a/src/desktop-events.cpp
+++ b/src/desktop-events.cpp
@@ -23,6 +23,7 @@
#include "ui/dialog/guides.h"
#include "desktop.h"
+#include "desktop-events.h"
#include "desktop-handles.h"
#include "dialogs/dialog-events.h"
#include "display/canvas-axonomgrid.h"
diff --git a/src/desktop-handles.cpp b/src/desktop-handles.cpp
index d35df6454..aed2eec34 100644
--- a/src/desktop-handles.cpp
+++ b/src/desktop-handles.cpp
@@ -13,6 +13,7 @@
#include "display/sp-canvas.h"
#include "display/sp-canvas-item.h"
#include "desktop.h"
+#include "desktop-handles.h"
SPEventContext *
sp_desktop_event_context (SPDesktop const * desktop)
diff --git a/src/desktop-style.cpp b/src/desktop-style.cpp
index 74e15e3e2..410e71730 100644
--- a/src/desktop-style.cpp
+++ b/src/desktop-style.cpp
@@ -1117,7 +1117,7 @@ objects_query_fontstyle (GSList *objects, SPStyle *style_res)
/**
* Write to style_res the baseline numbers.
*/
-int
+static int
objects_query_baselines (GSList *objects, SPStyle *style_res)
{
bool different = false;
@@ -1273,7 +1273,7 @@ objects_query_fontfamily (GSList *objects, SPStyle *style_res)
}
}
-int
+static int
objects_query_fontspecification (GSList *objects, SPStyle *style_res)
{
bool different = false;
@@ -1335,7 +1335,7 @@ objects_query_fontspecification (GSList *objects, SPStyle *style_res)
}
}
-int
+static int
objects_query_blend (GSList *objects, SPStyle *style_res)
{
const int empty_prev = -2;
diff --git a/src/device-manager.cpp b/src/device-manager.cpp
index 059e1b52d..5c7048613 100644
--- a/src/device-manager.cpp
+++ b/src/device-manager.cpp
@@ -113,7 +113,7 @@ static std::map<Glib::ustring, Gdk::AxisUse> &getStringToAxis()
return mapping;
}
-std::map<Gdk::AxisUse, Glib::ustring> &getAxisToString()
+static std::map<Gdk::AxisUse, Glib::ustring> &getAxisToString()
{
static bool init = false;
static std::map<Gdk::AxisUse, Glib::ustring> mapping;
@@ -139,7 +139,7 @@ static std::map<Glib::ustring, Gdk::InputMode> &getStringToMode()
return mapping;
}
-std::map<Gdk::InputMode, Glib::ustring> &getModeToString()
+static std::map<Gdk::InputMode, Glib::ustring> &getModeToString()
{
static bool init = false;
static std::map<Gdk::InputMode, Glib::ustring> mapping;
diff --git a/src/dir-util.cpp b/src/dir-util.cpp
index 7d4054745..c9b88b007 100644
--- a/src/dir-util.cpp
+++ b/src/dir-util.cpp
@@ -7,6 +7,7 @@
#include <string>
#include <cstring>
#include <glib.h>
+#include "dir-util.h"
std::string sp_relative_path_from_path( std::string const &path, std::string const &base)
{
diff --git a/src/document.cpp b/src/document.cpp
index e28356969..9d8291db0 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -1107,7 +1107,7 @@ static GSList *find_items_in_area(GSList *s, SPGroup *group, unsigned int dkey,
/**
Returns true if an item is among the descendants of group (recursively).
*/
-bool item_is_in_group(SPItem *item, SPGroup *group)
+static bool item_is_in_group(SPItem *item, SPGroup *group)
{
bool inGroup = false;
for ( SPObject *o = group->firstChild() ; o && !inGroup; o = o->getNext() ) {
@@ -1158,7 +1158,7 @@ items. If upto != NULL, then if item upto is encountered (at any level), stops s
upwards in z-order and returns what it has found so far (i.e. the found item is
guaranteed to be lower than upto).
*/
-SPItem *find_item_at_point(unsigned int dkey, SPGroup *group, Geom::Point const p, gboolean into_groups, bool take_insensitive = false, SPItem *upto = NULL)
+static SPItem *find_item_at_point(unsigned int dkey, SPGroup *group, Geom::Point const p, gboolean into_groups, bool take_insensitive = false, SPItem *upto = NULL)
{
SPItem *seen = NULL;
SPItem *newseen = NULL;
@@ -1203,7 +1203,7 @@ SPItem *find_item_at_point(unsigned int dkey, SPGroup *group, Geom::Point const
Returns the topmost non-layer group from the descendants of group which is at point
p, or NULL if none. Recurses into layers but not into groups.
*/
-SPItem *find_group_at_point(unsigned int dkey, SPGroup *group, Geom::Point const p)
+static SPItem *find_group_at_point(unsigned int dkey, SPGroup *group, Geom::Point const p)
{
SPItem *seen = NULL;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
@@ -1374,7 +1374,7 @@ sp_document_resource_list_free(gpointer /*key*/, gpointer value, gpointer /*data
return TRUE;
}
-unsigned int count_objects_recursive(SPObject *obj, unsigned int count)
+static unsigned int count_objects_recursive(SPObject *obj, unsigned int count)
{
count++; // obj itself
@@ -1385,12 +1385,12 @@ unsigned int count_objects_recursive(SPObject *obj, unsigned int count)
return count;
}
-unsigned int objects_in_document(SPDocument *document)
+static unsigned int objects_in_document(SPDocument *document)
{
return count_objects_recursive(document->getRoot(), 0);
}
-void vacuum_document_recursive(SPObject *obj)
+static void vacuum_document_recursive(SPObject *obj)
{
if (SP_IS_DEFS(obj)) {
for ( SPObject *def = obj->firstChild(); def; def = def->getNext()) {
diff --git a/src/draw-context.cpp b/src/draw-context.cpp
index e33c94bda..daff0794a 100644
--- a/src/draw-context.cpp
+++ b/src/draw-context.cpp
@@ -44,6 +44,7 @@
#include "live_effects/lpe-powerstroke.h"
#include "style.h"
#include "ui/control-manager.h"
+#include "draw-context.h"
#include <gdk/gdkkeysyms.h>
@@ -304,7 +305,7 @@ static void spdc_apply_powerstroke_shape(const std::vector<Geom::Point> & points
lpe->getRepr()->setAttribute("interpolator_beta", "0.2");
}
-void spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item, SPCurve *curve)
+static void spdc_check_for_and_apply_waiting_LPE(SPDrawContext *dc, SPItem *item, SPCurve *curve)
{
using namespace Inkscape::LivePathEffect;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
diff --git a/src/dropper-context.cpp b/src/dropper-context.cpp
index 6ac00887b..4742f5cff 100644
--- a/src/dropper-context.cpp
+++ b/src/dropper-context.cpp
@@ -149,7 +149,7 @@ static void sp_dropper_context_finish(SPEventContext *ec)
/**
* Returns the current dropper context icc-color.
*/
-SPColor* sp_dropper_context_get_icc_color(SPEventContext */*ec*/)
+static SPColor* sp_dropper_context_get_icc_color(SPEventContext */*ec*/)
{
//TODO: implement-me!
diff --git a/src/dyna-draw-context.cpp b/src/dyna-draw-context.cpp
index be767a3f3..3f488eca4 100644
--- a/src/dyna-draw-context.cpp
+++ b/src/dyna-draw-context.cpp
@@ -500,7 +500,7 @@ sp_dyna_draw_brush(SPDynaDrawContext *dc)
dc->npoints++;
}
-void
+static void
sp_ddc_update_toolbox (SPDesktop *desktop, const gchar *id, double value)
{
desktop->setToolboxAdjustmentValue (id, value);
diff --git a/src/ege-adjustment-action.cpp b/src/ege-adjustment-action.cpp
index cf179478d..78f3f48d6 100644
--- a/src/ege-adjustment-action.cpp
+++ b/src/ege-adjustment-action.cpp
@@ -778,7 +778,7 @@ static GtkWidget* create_menu_item( GtkAction* action )
return item;
}
-void value_changed_cb( GtkSpinButton* spin, EgeAdjustmentAction* act )
+static void value_changed_cb( GtkSpinButton* spin, EgeAdjustmentAction* act )
{
if ( gtk_widget_has_focus( GTK_WIDGET(spin) ) ) {
gint start = 0, end = 0;
diff --git a/src/eraser-context.cpp b/src/eraser-context.cpp
index 0442d768c..76ea5c252 100644
--- a/src/eraser-context.cpp
+++ b/src/eraser-context.cpp
@@ -443,7 +443,7 @@ sp_eraser_brush(SPEraserContext *dc)
dc->npoints++;
}
-void
+static void
sp_erc_update_toolbox (SPDesktop *desktop, const gchar *id, double value)
{
desktop->setToolboxAdjustmentValue (id, value);
diff --git a/src/event-context.cpp b/src/event-context.cpp
index b8a2dc797..6f89e862e 100644
--- a/src/event-context.cpp
+++ b/src/event-context.cpp
@@ -174,7 +174,7 @@ static void sp_event_context_dispose(GObject *object) {
/**
* Set the cursor to a standard GDK cursor
*/
-void sp_event_context_set_cursor(SPEventContext *event_context, GdkCursorType cursor_type) {
+static void sp_event_context_set_cursor(SPEventContext *event_context, GdkCursorType cursor_type) {
GtkWidget *w = GTK_WIDGET(sp_desktop_canvas(event_context->desktop));
GdkDisplay *display = gdk_display_get_default();
diff --git a/src/extract-uri.cpp b/src/extract-uri.cpp
index 76778bacb..a25c8bb70 100644
--- a/src/extract-uri.cpp
+++ b/src/extract-uri.cpp
@@ -1,6 +1,8 @@
#include <string.h>
#include <glib.h>
+#include "extract-uri.h"
+
// FIXME: kill this ugliness when we have a proper CSS parser
// Functions as per 4.3.4 of CSS 2.1
diff --git a/src/filter-chemistry.cpp b/src/filter-chemistry.cpp
index 81cbbf401..fc74ee8a2 100644
--- a/src/filter-chemistry.cpp
+++ b/src/filter-chemistry.cpp
@@ -242,7 +242,7 @@ new_filter_gaussian_blur (SPDocument *document, gdouble radius, double expansion
* Creates a simple filter with a blend primitive and a blur primitive of specified radius for
* an item with the given matrix expansion, width and height
*/
-SPFilter *
+static SPFilter *
new_filter_blend_gaussian_blur (SPDocument *document, const char *blendmode, gdouble radius, double expansion,
double expansionX, double expansionY, double width, double height)
{
diff --git a/src/flood-context.cpp b/src/flood-context.cpp
index f7c4ca365..a6c7fa0dc 100644
--- a/src/flood-context.cpp
+++ b/src/flood-context.cpp
@@ -167,7 +167,7 @@ static void sp_flood_context_dispose(GObject *object)
* Callback that processes the "changed" signal on the selection;
* destroys old and creates new knotholder.
*/
-void sp_flood_context_selection_changed(Inkscape::Selection *selection, gpointer data)
+static void sp_flood_context_selection_changed(Inkscape::Selection *selection, gpointer data)
{
SPFloodContext *rc = SP_FLOOD_CONTEXT(data);
SPEventContext *ec = SP_EVENT_CONTEXT(rc);
diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp
index ed4e81f0d..0038e9325 100644
--- a/src/gradient-chemistry.cpp
+++ b/src/gradient-chemistry.cpp
@@ -42,6 +42,7 @@
#include "sp-stop.h"
#include "widgets/gradient-vector.h"
#include "gradient-drag.h"
+#include "gradient-chemistry.h"
#include "sp-text.h"
#include "sp-tspan.h"
@@ -173,7 +174,7 @@ static SPGradient *sp_gradient_get_private_normalized(SPDocument *document, SPGr
/**
Count how many times gr is used by the styles of o and its descendants
*/
-guint count_gradient_hrefs(SPObject *o, SPGradient *gr)
+static guint count_gradient_hrefs(SPObject *o, SPGradient *gr)
{
if (!o)
return 1;
@@ -207,8 +208,8 @@ guint count_gradient_hrefs(SPObject *o, SPGradient *gr)
/**
* If gr has other users, create a new private; also check if gr links to vector, relink if not
*/
-SPGradient *sp_gradient_fork_private_if_necessary(SPGradient *gr, SPGradient *vector,
- SPGradientType type, SPObject *o)
+static SPGradient *sp_gradient_fork_private_if_necessary(SPGradient *gr, SPGradient *vector,
+ SPGradientType type, SPObject *o)
{
#ifdef SP_GR_VERBOSE
g_message("sp_gradient_fork_private_if_necessary(%p, %p, %d, %p)", gr, vector, type, o);
diff --git a/src/gradient-context.cpp b/src/gradient-context.cpp
index 5b0e261de..231490771 100644
--- a/src/gradient-context.cpp
+++ b/src/gradient-context.cpp
@@ -266,7 +266,7 @@ sp_gradient_context_is_over_line (SPGradientContext *rc, SPItem *item, Geom::Poi
return close;
}
-std::vector<Geom::Point>
+static std::vector<Geom::Point>
sp_gradient_context_get_stop_intervals (GrDrag *drag, GSList **these_stops, GSList **next_stops)
{
std::vector<Geom::Point> coords;
@@ -419,7 +419,7 @@ sp_gradient_context_add_stops_between_selected_stops (SPGradientContext *rc)
g_slist_free (new_stops);
}
-double sqr(double x) {return x*x;}
+static double sqr(double x) {return x*x;}
static void
sp_gradient_simplify(SPGradientContext *rc, double tolerance)
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index c72e47350..c775a19d7 100644
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
@@ -132,7 +132,7 @@ static void gr_drag_sel_modified(Inkscape::Selection */*selection*/, guint /*fla
* skip), and fill the \a style with the averaged color of all draggables of the selected dragger, if
* any.
*/
-int gr_drag_style_query(SPStyle *style, int property, gpointer data)
+static int gr_drag_style_query(SPStyle *style, int property, gpointer data)
{
GrDrag *drag = (GrDrag *) data;
diff --git a/src/ink-comboboxentry-action.cpp b/src/ink-comboboxentry-action.cpp
index 99a48ae5d..14f8f83a6 100644
--- a/src/ink-comboboxentry-action.cpp
+++ b/src/ink-comboboxentry-action.cpp
@@ -789,7 +789,7 @@ static gboolean match_selected_cb( GtkEntryCompletion* /*widget*/, GtkTreeModel*
return false;
}
-void ink_comboboxentry_action_defocus( Ink_ComboBoxEntry_Action* action )
+static void ink_comboboxentry_action_defocus( Ink_ComboBoxEntry_Action* action )
{
if ( action->focusWidget ) {
gtk_widget_grab_focus( action->focusWidget );
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 8548b398f..b1cc53b4e 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -1065,7 +1065,7 @@ inkscape_find_desktop_by_dkey (unsigned int dkey)
-unsigned int
+static unsigned int
inkscape_maximum_dkey()
{
unsigned int dkey = 0;
@@ -1081,7 +1081,7 @@ inkscape_maximum_dkey()
-SPDesktop *
+static SPDesktop *
inkscape_next_desktop ()
{
SPDesktop *d = NULL;
@@ -1112,7 +1112,7 @@ inkscape_next_desktop ()
-SPDesktop *
+static SPDesktop *
inkscape_prev_desktop ()
{
SPDesktop *d = NULL;
diff --git a/src/interface.cpp b/src/interface.cpp
index f26b7ac74..2ee188ef7 100644
--- a/src/interface.cpp
+++ b/src/interface.cpp
@@ -396,7 +396,7 @@ sp_ui_menu_deselect(gpointer object)
/**
* Creates and attaches a scaled icon to the given menu item.
*/
-void
+static void
sp_ui_menuitem_add_icon( GtkWidget *item, gchar *icon_name )
{
static bool iconsInjected = false;
@@ -686,7 +686,7 @@ static gboolean update_view_menu(GtkWidget *widget, GdkEventExpose * /*event*/,
return FALSE;
}
-void
+static void
sp_ui_menu_append_check_item_from_verb(GtkMenu *menu, Inkscape::UI::View::View *view, gchar const *label, gchar const *tip, gchar const *pref,
void (*callback_toggle)(GtkCheckMenuItem *, gpointer user_data),
#if GTK_CHECK_VERSION(3,0,0)
@@ -806,7 +806,7 @@ compare_file_basenames(gchar const *a, gchar const *b) {
return rc;
}
-void
+static void
sp_menu_get_svg_filenames_from_dir(gchar const *dirname, std::list<gchar const*> *files)
{
if ( Inkscape::IO::file_test( dirname, (GFileTest)(G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR) ) ) {
@@ -840,7 +840,7 @@ sp_menu_get_svg_filenames_from_dir(gchar const *dirname, std::list<gchar const*>
files->sort(compare_file_basenames);
}
-void
+static void
sp_menu_add_filenames_to_menu(GtkWidget *menu, Inkscape::UI::View::View *view, std::list<gchar const*> *files)
{
if (!files->empty()) {
@@ -876,7 +876,7 @@ sp_menu_add_filenames_to_menu(GtkWidget *menu, Inkscape::UI::View::View *view, s
}
}
-void
+static void
sp_menu_append_new_templates(GtkWidget *menu, Inkscape::UI::View::View *view)
{
// user's local dir
@@ -891,7 +891,7 @@ sp_menu_append_new_templates(GtkWidget *menu, Inkscape::UI::View::View *view)
}
-void
+static void
sp_ui_checkboxes_menus(GtkMenu *m, Inkscape::UI::View::View *view)
{
//sp_ui_menu_append_check_item_from_verb(m, view, _("_Menu"), _("Show or hide the menu bar"), "menu",
@@ -915,7 +915,7 @@ sp_ui_checkboxes_menus(GtkMenu *m, Inkscape::UI::View::View *view)
}
-void addTaskMenuItems(GtkMenu *menu, Inkscape::UI::View::View *view)
+static void addTaskMenuItems(GtkMenu *menu, Inkscape::UI::View::View *view)
{
gchar const* data[] = {
C_("Interface setup", "Default"), _("Default interface setup"),
@@ -982,7 +982,7 @@ private:
* @param menu Menu to be added to
* @param view The View that this menu is being built for
*/
-void sp_ui_build_dyn_menus(Inkscape::XML::Node *menus, GtkWidget *menu, Inkscape::UI::View::View *view)
+static void sp_ui_build_dyn_menus(Inkscape::XML::Node *menus, GtkWidget *menu, Inkscape::UI::View::View *view)
{
if (menus == NULL) return;
if (menu == NULL) return;
diff --git a/src/main.cpp b/src/main.cpp
index 48d2e4de3..d1e087cac 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -731,7 +731,7 @@ main(int argc, char **argv)
-void fixupSingleFilename( gchar **orig, gchar **spare )
+static void fixupSingleFilename( gchar **orig, gchar **spare )
{
if ( orig && *orig && **orig ) {
GError *error = NULL;
@@ -749,7 +749,7 @@ void fixupSingleFilename( gchar **orig, gchar **spare )
-GSList *fixupFilenameEncoding( GSList* fl )
+static GSList *fixupFilenameEncoding( GSList* fl )
{
GSList *newFl = NULL;
while ( fl ) {
@@ -788,7 +788,7 @@ GSList *fixupFilenameEncoding( GSList* fl )
return newFl;
}
-int sp_common_main( int argc, char const **argv, GSList **flDest )
+static int sp_common_main( int argc, char const **argv, GSList **flDest )
{
/// \todo fixme: Move these to some centralized location (Lauris)
sp_object_type_register("sodipodi:namedview", SP_TYPE_NAMEDVIEW);
@@ -1002,7 +1002,7 @@ sp_main_gui(int argc, char const **argv)
/**
* Process file list
*/
-int sp_process_file_list(GSList *fl)
+static int sp_process_file_list(GSList *fl)
{
int retVal = 0;
while (fl) {
@@ -1108,7 +1108,7 @@ int sp_process_file_list(GSList *fl)
* Run the application as an interactive shell, parsing command lines from stdin
* Returns -1 on error.
*/
-int sp_main_shell(char const* command_name)
+static int sp_main_shell(char const* command_name)
{
int retval = 0;
diff --git a/src/measure-context.cpp b/src/measure-context.cpp
index cc6a9b04e..7a04b9915 100644
--- a/src/measure-context.cpp
+++ b/src/measure-context.cpp
@@ -306,7 +306,7 @@ static gint sp_measure_context_item_handler(SPEventContext *event_context, SPIte
return ret;
}
-bool GeomPointSortPredicate(const Geom::Point& p1, const Geom::Point& p2)
+static bool GeomPointSortPredicate(const Geom::Point& p1, const Geom::Point& p2)
{
if (p1[Geom::Y] == p2[Geom::Y]) {
return p1[Geom::X] < p2[Geom::X];
@@ -315,7 +315,7 @@ bool GeomPointSortPredicate(const Geom::Point& p1, const Geom::Point& p2)
}
}
-void calculate_intersections(SPDesktop * /*desktop*/, SPItem* item, Geom::PathVector const &lineseg, SPCurve *curve, std::vector<Geom::Point> &intersections)
+static void calculate_intersections(SPDesktop * /*desktop*/, SPItem* item, Geom::PathVector const &lineseg, SPCurve *curve, std::vector<Geom::Point> &intersections)
{
curve->transform(item->i2doc_affine());
diff --git a/src/mod360.cpp b/src/mod360.cpp
index 13e9aa36a..ce5cea33a 100644
--- a/src/mod360.cpp
+++ b/src/mod360.cpp
@@ -1,6 +1,8 @@
#include <glib.h>
#include <math.h>
+#include "mod360.h"
+
/** Returns \a x wrapped around to between 0 and less than 360,
or 0 if \a x isn't finite.
**/
diff --git a/src/pen-context.cpp b/src/pen-context.cpp
index ade041019..cb20eb3eb 100644
--- a/src/pen-context.cpp
+++ b/src/pen-context.cpp
@@ -861,7 +861,7 @@ static gint pen_handle_2button_press(SPPenContext *const pc, GdkEventButton cons
return ret;
}
-void pen_redraw_all (SPPenContext *const pc)
+static void pen_redraw_all (SPPenContext *const pc)
{
// green
if (pc->green_bpaths) {
@@ -915,7 +915,7 @@ void pen_redraw_all (SPPenContext *const pc)
}
}
-void pen_lastpoint_move (SPPenContext *const pc, gdouble x, gdouble y)
+static void pen_lastpoint_move (SPPenContext *const pc, gdouble x, gdouble y)
{
if (pc->npoints != 5)
return;
@@ -936,12 +936,12 @@ void pen_lastpoint_move (SPPenContext *const pc, gdouble x, gdouble y)
pen_redraw_all(pc);
}
-void pen_lastpoint_move_screen (SPPenContext *const pc, gdouble x, gdouble y)
+static void pen_lastpoint_move_screen (SPPenContext *const pc, gdouble x, gdouble y)
{
pen_lastpoint_move (pc, x / pc->desktop->current_zoom(), y / pc->desktop->current_zoom());
}
-void pen_lastpoint_tocurve (SPPenContext *const pc)
+static void pen_lastpoint_tocurve (SPPenContext *const pc)
{
if (pc->npoints != 5)
return;
@@ -956,7 +956,7 @@ void pen_lastpoint_tocurve (SPPenContext *const pc)
pen_redraw_all(pc);
}
-void pen_lastpoint_toline (SPPenContext *const pc)
+static void pen_lastpoint_toline (SPPenContext *const pc)
{
if (pc->npoints != 5)
return;
diff --git a/src/rect-context.cpp b/src/rect-context.cpp
index d96ddf09a..33ccee93c 100644
--- a/src/rect-context.cpp
+++ b/src/rect-context.cpp
@@ -168,7 +168,7 @@ static void sp_rect_context_dispose(GObject *object)
* Callback that processes the "changed" signal on the selection;
* destroys old and creates new knotholder.
*/
-void sp_rect_context_selection_changed(Inkscape::Selection *selection, gpointer data)
+static void sp_rect_context_selection_changed(Inkscape::Selection *selection, gpointer data)
{
SPRectContext *rc = SP_RECT_CONTEXT(data);
SPEventContext *ec = SP_EVENT_CONTEXT(rc);
diff --git a/src/removeoverlap.cpp b/src/removeoverlap.cpp
index 0c45e34a9..ba5740e55 100644
--- a/src/removeoverlap.cpp
+++ b/src/removeoverlap.cpp
@@ -17,6 +17,7 @@
#include "sp-item-transform.h"
#include "libvpsc/generate-constraints.h"
#include "libvpsc/remove_rectangle_overlap.h"
+#include "removeoverlap.h"
using vpsc::Rectangle;
diff --git a/src/resource-manager.cpp b/src/resource-manager.cpp
index c42ce6feb..8e2e95988 100644
--- a/src/resource-manager.cpp
+++ b/src/resource-manager.cpp
@@ -28,7 +28,7 @@
namespace Inkscape {
-std::vector<std::string> splitPath( std::string const &path )
+static std::vector<std::string> splitPath( std::string const &path )
{
std::vector<std::string> parts;
@@ -50,7 +50,7 @@ std::vector<std::string> splitPath( std::string const &path )
return parts;
}
-std::string convertPathToRelative( std::string const &path, std::string const &docbase )
+static std::string convertPathToRelative( std::string const &path, std::string const &docbase )
{
std::string result = path;
diff --git a/src/satisfied-guide-cns.cpp b/src/satisfied-guide-cns.cpp
index 7aca3b0bd..57d4ffce3 100644
--- a/src/satisfied-guide-cns.cpp
+++ b/src/satisfied-guide-cns.cpp
@@ -1,8 +1,9 @@
-#include <desktop-handles.h>
-#include <sp-guide.h>
-#include <sp-guide-constraint.h>
-#include <sp-namedview.h>
-#include <approx-equal.h>
+#include "desktop-handles.h"
+#include "sp-guide.h"
+#include "sp-guide-constraint.h"
+#include "sp-namedview.h"
+#include "approx-equal.h"
+#include "satisfied-guide-cns.h"
void satisfied_guide_cns(SPDesktop const &desktop,
std::vector<Inkscape::SnapCandidatePoint> const &snappoints,
diff --git a/src/select-context.cpp b/src/select-context.cpp
index 4555e51aa..7fecc7167 100644
--- a/src/select-context.cpp
+++ b/src/select-context.cpp
@@ -272,7 +272,7 @@ sp_select_context_abort(SPEventContext *event_context)
return false;
}
-bool
+static bool
key_is_a_modifier (guint key) {
return (key == GDK_KEY_Alt_L ||
key == GDK_KEY_Alt_R ||
@@ -284,7 +284,7 @@ key_is_a_modifier (guint key) {
key == GDK_KEY_Meta_R);
}
-void
+static void
sp_select_context_up_one_layer(SPDesktop *desktop)
{
/* Click in empty place, go up one level -- but don't leave a layer to root.
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index 4cdab4336..332e9a34e 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -256,7 +256,7 @@ void SelectionHelper::selectPrev(SPDesktop *dt)
* Copies repr and its inherited css style elements, along with the accumulated transform 'full_t',
* then prepends the copy to 'clip'.
*/
-void sp_selection_copy_one(Inkscape::XML::Node *repr, Geom::Affine full_t, GSList **clip, Inkscape::XML::Document* xml_doc)
+static void sp_selection_copy_one(Inkscape::XML::Node *repr, Geom::Affine full_t, GSList **clip, Inkscape::XML::Document* xml_doc)
{
Inkscape::XML::Node *copy = repr->duplicate(xml_doc);
@@ -275,7 +275,7 @@ void sp_selection_copy_one(Inkscape::XML::Node *repr, Geom::Affine full_t, GSLis
*clip = g_slist_prepend(*clip, copy);
}
-void sp_selection_copy_impl(GSList const *items, GSList **clip, Inkscape::XML::Document* xml_doc)
+static void sp_selection_copy_impl(GSList const *items, GSList **clip, Inkscape::XML::Document* xml_doc)
{
// Sort items:
GSList *sorted_items = g_slist_copy(const_cast<GSList *>(items));
@@ -290,7 +290,7 @@ void sp_selection_copy_impl(GSList const *items, GSList **clip, Inkscape::XML::D
g_slist_free(static_cast<GSList *>(sorted_items));
}
-GSList *sp_selection_paste_impl(SPDocument *doc, SPObject *parent, GSList **clip)
+static GSList *sp_selection_paste_impl(SPDocument *doc, SPObject *parent, GSList **clip)
{
Inkscape::XML::Document *xml_doc = doc->getReprDoc();
@@ -321,7 +321,7 @@ GSList *sp_selection_paste_impl(SPDocument *doc, SPObject *parent, GSList **clip
return copied;
}
-void sp_selection_delete_impl(GSList const *items, bool propagate = true, bool propagate_descendants = true)
+static void sp_selection_delete_impl(GSList const *items, bool propagate = true, bool propagate_descendants = true)
{
for (GSList const *i = items ; i ; i = i->next ) {
sp_object_ref((SPObject *)i->data, NULL);
@@ -372,7 +372,7 @@ void sp_selection_delete(SPDesktop *desktop)
_("Delete"));
}
-void add_ids_recursive(std::vector<const gchar *> &ids, SPObject *obj)
+static void add_ids_recursive(std::vector<const gchar *> &ids, SPObject *obj)
{
if (obj) {
ids.push_back(obj->getId());
@@ -540,7 +540,7 @@ GSList *get_all_items(GSList *list, SPObject *from, SPDesktop *desktop, bool onl
return list;
}
-void sp_edit_select_all_full(SPDesktop *dt, bool force_all_layers, bool invert)
+static void sp_edit_select_all_full(SPDesktop *dt, bool force_all_layers, bool invert)
{
if (!dt)
return;
@@ -626,7 +626,7 @@ void sp_edit_invert_in_all_layers(SPDesktop *desktop)
sp_edit_select_all_full(desktop, true, true);
}
-void sp_selection_group_impl(GSList *p, Inkscape::XML::Node *group, Inkscape::XML::Document *xml_doc, SPDocument *doc) {
+static void sp_selection_group_impl(GSList *p, Inkscape::XML::Node *group, Inkscape::XML::Document *xml_doc, SPDocument *doc) {
p = g_slist_sort(p, (GCompareFunc) sp_repr_compare_position);
@@ -845,7 +845,7 @@ enclose_items(GSList const *items)
}
// TODO determine if this is intentionally different from SPObject::getPrev()
-SPObject *prev_sibling(SPObject *child)
+static SPObject *prev_sibling(SPObject *child)
{
SPObject *prev = 0;
if ( child && SP_IS_GROUP(child->parent) ) {
@@ -1153,7 +1153,7 @@ void sp_selection_paste_livepatheffect(SPDesktop *desktop)
}
-void sp_selection_remove_livepatheffect_impl(SPItem *item)
+static void sp_selection_remove_livepatheffect_impl(SPItem *item)
{
if ( item && SP_IS_LPE_ITEM(item) &&
sp_lpe_item_has_path_effect(SP_LPE_ITEM(item))) {
@@ -1344,7 +1344,7 @@ void sp_selection_to_layer(SPDesktop *dt, SPObject *moveto, bool suppressDone)
g_slist_free(const_cast<GSList *>(items));
}
-bool
+static bool
selection_contains_original(SPItem *item, Inkscape::Selection *selection)
{
bool contains_original = false;
@@ -1371,7 +1371,7 @@ selection_contains_original(SPItem *item, Inkscape::Selection *selection)
}
-bool
+static bool
selection_contains_both_clone_and_original(Inkscape::Selection *selection)
{
bool clone_with_original = false;
@@ -1882,7 +1882,7 @@ GSList *sp_get_same_fill_or_stroke_color(SPItem *sel, GSList *src, SPSelectStrok
return matches;
}
-bool item_type_match (SPItem *i, SPItem *j)
+static bool item_type_match (SPItem *i, SPItem *j)
{
if ( SP_IS_RECT(i)) {
return ( SP_IS_RECT(j) );
diff --git a/src/selection-describer.cpp b/src/selection-describer.cpp
index 3d1b97b04..c141c3da5 100644
--- a/src/selection-describer.cpp
+++ b/src/selection-describer.cpp
@@ -36,7 +36,7 @@
#include "sp-polyline.h"
#include "sp-spiral.h"
-const gchar *
+static const gchar *
type2term(GType type)
{
if (type == SP_TYPE_ANCHOR)
@@ -80,7 +80,7 @@ type2term(GType type)
return NULL;
}
-GSList *collect_terms (GSList *items)
+static GSList *collect_terms (GSList *items)
{
GSList *r = NULL;
for (GSList *i = items; i != NULL; i = i->next) {
@@ -92,7 +92,7 @@ GSList *collect_terms (GSList *items)
}
// Returns the number of filtered items in the list
-int count_filtered (GSList *items)
+static int count_filtered (GSList *items)
{
int count=0;
SPItem *item=NULL;
diff --git a/src/sp-image.cpp b/src/sp-image.cpp
index 07885ff4d..aa16bcdd4 100644
--- a/src/sp-image.cpp
+++ b/src/sp-image.cpp
@@ -234,7 +234,7 @@ private:
PushPull(const PushPull& other);
};
-void user_read_data( png_structp png_ptr, png_bytep data, png_size_t length )
+static void user_read_data( png_structp png_ptr, png_bytep data, png_size_t length )
{
// g_message( "user_read_data(%d)", length );
@@ -255,12 +255,12 @@ void user_read_data( png_structp png_ptr, png_bytep data, png_size_t length )
// g_message("things out");
}
-void user_write_data( png_structp /*png_ptr*/, png_bytep /*data*/, png_size_t /*length*/ )
+static void user_write_data( png_structp /*png_ptr*/, png_bytep /*data*/, png_size_t /*length*/ )
{
//g_message( "user_write_data(%d)", length );
}
-void user_flush_data( png_structp /*png_ptr*/ )
+static void user_flush_data( png_structp /*png_ptr*/ )
{
//g_message( "user_flush_data" );
}
@@ -424,7 +424,7 @@ static bool readPngAndHeaders( PushPull &youme, gint & dpiX, gint & dpiY )
return good;
}
-static GdkPixbuf* pixbuf_new_from_file( const char *filename, time_t &modTime, gchar*& pixPath, GError **/*error*/ )
+GdkPixbuf* pixbuf_new_from_file( const char *filename, time_t &modTime, gchar*& pixPath, GError **/*error*/ )
{
GdkPixbuf* buf = NULL;
PushPull youme;
diff --git a/src/sp-item-notify-moveto.cpp b/src/sp-item-notify-moveto.cpp
index fd27c896a..0f5117289 100644
--- a/src/sp-item-notify-moveto.cpp
+++ b/src/sp-item-notify-moveto.cpp
@@ -6,6 +6,7 @@
#include <2geom/transforms.h>
#include <sp-guide.h>
#include <sp-item-rm-unsatisfied-cns.h>
+#include <sp-item-notify-moveto.h>
using std::vector;
diff --git a/src/sp-item-rm-unsatisfied-cns.cpp b/src/sp-item-rm-unsatisfied-cns.cpp
index de4c7dca1..c35e4fa48 100644
--- a/src/sp-item-rm-unsatisfied-cns.cpp
+++ b/src/sp-item-rm-unsatisfied-cns.cpp
@@ -6,6 +6,7 @@
#include "sp-guide.h"
#include "sp-guide-constraint.h"
#include "sp-item.h"
+#include "sp-item-rm-unsatisfied-cns.h"
using std::vector;
diff --git a/src/sp-item-transform.cpp b/src/sp-item-transform.cpp
index a8d553e9f..a27a1bc78 100644
--- a/src/sp-item-transform.cpp
+++ b/src/sp-item-transform.cpp
@@ -16,6 +16,7 @@
#include <2geom/transforms.h>
#include "sp-item.h"
+#include "sp-item-transform.h"
void sp_item_rotate_rel(SPItem *item, Geom::Rotate const &rotation)
{
diff --git a/src/sp-item-update-cns.cpp b/src/sp-item-update-cns.cpp
index 315d09108..750f0d94f 100644
--- a/src/sp-item-update-cns.cpp
+++ b/src/sp-item-update-cns.cpp
@@ -1,8 +1,9 @@
#include "satisfied-guide-cns.h"
#include "sp-guide-constraint.h"
-#include <sp-guide.h>
-#include <sp-item.h>
+#include "sp-item-update-cns.h"
+#include "sp-guide.h"
+#include "sp-item.h"
#include <algorithm>
using std::find;
using std::vector;
diff --git a/src/sp-item.cpp b/src/sp-item.cpp
index b1eb5a24a..a21ff3968 100644
--- a/src/sp-item.cpp
+++ b/src/sp-item.cpp
@@ -1204,7 +1204,7 @@ void SPItem::adjust_stroke( gdouble ex )
/**
* Find out the inverse of previous transform of an item (from its repr)
*/
-Geom::Affine sp_item_transform_repr (SPItem *item)
+static Geom::Affine sp_item_transform_repr (SPItem *item)
{
Geom::Affine t_old(Geom::identity());
gchar const *t_attr = item->getRepr()->attribute("transform");
@@ -1253,7 +1253,7 @@ void SPItem::freeze_stroke_width_recursive(bool freeze)
/**
* Recursively adjust rx and ry of rects.
*/
-void
+static void
sp_item_adjust_rects_recursive(SPItem *item, Geom::Affine advertized_transform)
{
if (SP_IS_RECT (item)) {
diff --git a/src/sp-mesh-array.cpp b/src/sp-mesh-array.cpp
index 2b7611bde..3b2d33bbd 100644
--- a/src/sp-mesh-array.cpp
+++ b/src/sp-mesh-array.cpp
@@ -72,7 +72,7 @@
enum { ROW, COL };
-void swap_p( Geom::Point *p1, Geom::Point *p2 ) {
+static void swap_p( Geom::Point *p1, Geom::Point *p2 ) {
Geom::Point temp = *p1;
*p1 = *p2;
*p2 = temp;
@@ -957,7 +957,7 @@ void SPMeshNodeArray::write( SPMeshGradient *mg ) {
Find default color based on color of first stop in "vector" gradient.
This should be rewritten if dependence on "vector" is removed.
*/
-SPColor default_color( SPItem *item ) {
+static SPColor default_color( SPItem *item ) {
// Set initial color to the color of the object before adding the mesh.
// This is a bit tricky as at the moment, a "vector" gradient is created
diff --git a/src/sp-object-repr.cpp b/src/sp-object-repr.cpp
index 16e64ff49..992001f99 100644
--- a/src/sp-object-repr.cpp
+++ b/src/sp-object-repr.cpp
@@ -20,6 +20,7 @@
#include "sp-mesh-gradient-fns.h"
#include "sp-mesh-row-fns.h"
#include "sp-mesh-patch-fns.h"
+#include "sp-object-repr.h"
#include "sp-path.h"
#include "sp-radial-gradient-fns.h"
#include "sp-rect.h"
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index 9ceeaf262..c16dbaeef 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -339,7 +339,7 @@ SPObject const *SPObject::nearestCommonAncestor(SPObject const *object) const {
return longest_common_suffix<SPObject::ConstParentIterator>(this, object, NULL, &same_objects);
}
-SPObject const *AncestorSon(SPObject const *obj, SPObject const *ancestor) {
+static SPObject const *AncestorSon(SPObject const *obj, SPObject const *ancestor) {
SPObject const *result = 0;
if ( obj && ancestor ) {
if (obj->parent == ancestor) {
diff --git a/src/sp-offset.cpp b/src/sp-offset.cpp
index 817db92e8..b98399171 100644
--- a/src/sp-offset.cpp
+++ b/src/sp-offset.cpp
@@ -750,7 +750,7 @@ static void sp_offset_snappoints(SPItem const *item, std::vector<Inkscape::SnapC
* dot(A, rot90(B))*dot(C, rot90(B)) == -1.
* -- njh
*/
-bool
+static bool
vectors_are_clockwise (Geom::Point A, Geom::Point B, Geom::Point C)
{
using Geom::rot90;
diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp
index 03afc1bf3..19c0180a7 100644
--- a/src/sp-pattern.cpp
+++ b/src/sp-pattern.cpp
@@ -290,7 +290,7 @@ sp_pattern_set (SPObject *object, unsigned int key, const gchar *value)
/* fixme: We need ::order_changed handler too (Lauris) */
-GSList *pattern_getchildren(SPPattern *pat)
+static GSList *pattern_getchildren(SPPattern *pat)
{
GSList *l = NULL;
@@ -381,7 +381,7 @@ static void pattern_ref_modified (SPObject */*ref*/, guint /*flags*/, SPPattern
/**
Count how many times pat is used by the styles of o and its descendants
*/
-guint
+static guint
count_pattern_hrefs(SPObject *o, SPPattern *pat)
{
if (!o)
@@ -590,7 +590,7 @@ Geom::OptRect pattern_viewBox (SPPattern *pat)
return viewbox;
}
-bool pattern_hasItemChildren (SPPattern *pat)
+static bool pattern_hasItemChildren (SPPattern *pat)
{
bool hasChildren = false;
for (SPObject *child = pat->firstChild() ; child && !hasChildren ; child = child->getNext() ) {
diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp
index f344a3d92..052c9e853 100644
--- a/src/spiral-context.cpp
+++ b/src/spiral-context.cpp
@@ -162,7 +162,7 @@ sp_spiral_context_dispose(GObject *object)
* Callback that processes the "changed" signal on the selection;
* destroys old and creates new knotholder.
*/
-void sp_spiral_context_selection_changed(Inkscape::Selection *selection, gpointer data)
+static void sp_spiral_context_selection_changed(Inkscape::Selection *selection, gpointer data)
{
SPSpiralContext *sc = SP_SPIRAL_CONTEXT(data);
SPEventContext *ec = SP_EVENT_CONTEXT(sc);
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index 4c1421684..f1360adda 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -1778,7 +1778,7 @@ sp_selected_path_simplify_items(SPDesktop *desktop,
//return true if we changed something, else false
-bool
+static bool
sp_selected_path_simplify_item(SPDesktop *desktop,
Inkscape::Selection *selection, SPItem *item,
float threshold, bool justCoalesce,
@@ -1982,7 +1982,7 @@ sp_selected_path_simplify_items(SPDesktop *desktop,
return didSomething;
}
-void
+static void
sp_selected_path_simplify_selection(SPDesktop *desktop, float threshold, bool justCoalesce,
float angleLimit, bool breakableAngles)
{
diff --git a/src/spray-context.cpp b/src/spray-context.cpp
index bcdc69805..fe478583c 100644
--- a/src/spray-context.cpp
+++ b/src/spray-context.cpp
@@ -134,7 +134,7 @@ static void sp_spray_context_class_init(SPSprayContextClass *klass)
}
/* Method to rotate items */
-void sp_spray_rotate_rel(Geom::Point c, SPDesktop */*desktop*/, SPItem *item, Geom::Rotate const &rotation)
+static void sp_spray_rotate_rel(Geom::Point c, SPDesktop */*desktop*/, SPItem *item, Geom::Rotate const &rotation)
{
Geom::Translate const s(c);
Geom::Affine affine = Geom::Affine(s).inverse() * Geom::Affine(rotation) * Geom::Affine(s);
@@ -150,7 +150,7 @@ void sp_spray_rotate_rel(Geom::Point c, SPDesktop */*desktop*/, SPItem *item, Ge
}
/* Method to scale items */
-void sp_spray_scale_rel(Geom::Point c, SPDesktop */*desktop*/, SPItem *item, Geom::Scale const &scale)
+static void sp_spray_scale_rel(Geom::Point c, SPDesktop */*desktop*/, SPItem *item, Geom::Scale const &scale)
{
Geom::Translate const s(c);
item->set_i2d_affine(item->i2dt_affine() * s.inverse() * scale * s);
@@ -207,7 +207,7 @@ static void sp_spray_context_dispose(GObject *object)
G_OBJECT_CLASS(parent_class)->dispose(object);
}
-bool is_transform_modes(gint mode)
+static bool is_transform_modes(gint mode)
{
return (mode == SPRAY_MODE_COPY ||
mode == SPRAY_MODE_CLONE ||
@@ -215,7 +215,7 @@ bool is_transform_modes(gint mode)
mode == SPRAY_OPTION);
}
-void sp_spray_update_cursor(SPSprayContext *tc, bool /*with_shift*/)
+static void sp_spray_update_cursor(SPSprayContext *tc, bool /*with_shift*/)
{
SPEventContext *event_context = SP_EVENT_CONTEXT(tc);
SPDesktop *desktop = event_context->desktop;
@@ -342,12 +342,12 @@ static void sp_spray_extinput(SPSprayContext *tc, GdkEvent *event)
}
}
-double get_dilate_radius(SPSprayContext *tc)
+static double get_dilate_radius(SPSprayContext *tc)
{
return 250 * tc->width/SP_EVENT_CONTEXT(tc)->desktop->current_zoom();
}
-double get_path_force(SPSprayContext *tc)
+static double get_path_force(SPSprayContext *tc)
{
double force = 8 * (tc->usepressure? tc->pressure : TC_DEFAULT_PRESSURE)
/sqrt(SP_EVENT_CONTEXT(tc)->desktop->current_zoom());
@@ -357,28 +357,28 @@ double get_path_force(SPSprayContext *tc)
return force * tc->force;
}
-double get_path_mean(SPSprayContext *tc)
+static double get_path_mean(SPSprayContext *tc)
{
return tc->mean;
}
-double get_path_standard_deviation(SPSprayContext *tc)
+static double get_path_standard_deviation(SPSprayContext *tc)
{
return tc->standard_deviation;
}
-double get_move_force(SPSprayContext *tc)
+static double get_move_force(SPSprayContext *tc)
{
double force = (tc->usepressure? tc->pressure : TC_DEFAULT_PRESSURE);
return force * tc->force;
}
-double get_move_mean(SPSprayContext *tc)
+static double get_move_mean(SPSprayContext *tc)
{
return tc->mean;
}
-double get_move_standard_deviation(SPSprayContext *tc)
+static double get_move_standard_deviation(SPSprayContext *tc)
{
return tc->standard_deviation;
}
@@ -392,7 +392,7 @@ double get_move_standard_deviation(SPSprayContext *tc)
* @param[in] choice :
*/
-void random_position(double &radius, double &angle, double &a, double &s, int /*choice*/)
+static void random_position(double &radius, double &angle, double &a, double &s, int /*choice*/)
{
// angle is taken from an uniform distribution
angle = g_random_double_range(0, M_PI*2.0);
@@ -411,7 +411,7 @@ void random_position(double &radius, double &angle, double &a, double &s, int /*
}
-bool sp_spray_recursive(SPDesktop *desktop,
+static bool sp_spray_recursive(SPDesktop *desktop,
Inkscape::Selection *selection,
SPItem *item,
Geom::Point p,
@@ -572,7 +572,7 @@ bool sp_spray_recursive(SPDesktop *desktop,
return did;
}
-bool sp_spray_dilate(SPSprayContext *tc, Geom::Point /*event_p*/, Geom::Point p, Geom::Point vector, bool reverse)
+static bool sp_spray_dilate(SPSprayContext *tc, Geom::Point /*event_p*/, Geom::Point p, Geom::Point vector, bool reverse)
{
Inkscape::Selection *selection = sp_desktop_selection(SP_EVENT_CONTEXT(tc)->desktop);
SPDesktop *desktop = SP_EVENT_CONTEXT(tc)->desktop;
@@ -617,7 +617,7 @@ bool sp_spray_dilate(SPSprayContext *tc, Geom::Point /*event_p*/, Geom::Point p,
return did;
}
-void sp_spray_update_area(SPSprayContext *tc)
+static void sp_spray_update_area(SPSprayContext *tc)
{
double radius = get_dilate_radius(tc);
Geom::Affine const sm ( Geom::Scale(radius/(1-tc->ratio), radius/(1+tc->ratio)) );
@@ -625,7 +625,7 @@ void sp_spray_update_area(SPSprayContext *tc)
sp_canvas_item_show(tc->dilate_area);
}
-void sp_spray_switch_mode(SPSprayContext *tc, gint mode, bool with_shift)
+static void sp_spray_switch_mode(SPSprayContext *tc, gint mode, bool with_shift)
{
// select the button mode
SP_EVENT_CONTEXT(tc)->desktop->setToolboxSelectOneValue("spray_tool_mode", mode);
@@ -634,7 +634,7 @@ void sp_spray_switch_mode(SPSprayContext *tc, gint mode, bool with_shift)
sp_spray_update_cursor(tc, with_shift);
}
-void sp_spray_switch_mode_temporarily(SPSprayContext *tc, gint mode, bool with_shift)
+static void sp_spray_switch_mode_temporarily(SPSprayContext *tc, gint mode, bool with_shift)
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
// Juggling about so that prefs have the old value but tc->mode and the button show new mode:
diff --git a/src/star-context.cpp b/src/star-context.cpp
index 7861354e9..66e6b3116 100644
--- a/src/star-context.cpp
+++ b/src/star-context.cpp
@@ -170,7 +170,7 @@ sp_star_context_dispose (GObject *object)
*
* @param selection Should not be NULL.
*/
-void sp_star_context_selection_changed (Inkscape::Selection * selection, gpointer data)
+static void sp_star_context_selection_changed (Inkscape::Selection * selection, gpointer data)
{
g_assert (selection != NULL);
diff --git a/src/style.cpp b/src/style.cpp
index 616474298..3e58a0404 100644
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -4567,7 +4567,7 @@ sp_css_attr_unset_text(SPCSSAttr *css)
return css;
}
-bool
+static bool
is_url(char const *p)
{
if (p == NULL)
@@ -4607,7 +4607,7 @@ sp_css_attr_unset_uris(SPCSSAttr *css)
/**
* Scale a single-value property.
*/
-void
+static void
sp_css_attr_scale_property_single(SPCSSAttr *css, gchar const *property,
double ex, bool only_with_units = false)
{
@@ -4631,7 +4631,7 @@ sp_css_attr_scale_property_single(SPCSSAttr *css, gchar const *property,
/**
* Scale a list-of-values property.
*/
-void
+static void
sp_css_attr_scale_property_list(SPCSSAttr *css, gchar const *property, double ex)
{
gchar const *string = sp_repr_css_property(css, property, NULL);
diff --git a/src/text-chemistry.cpp b/src/text-chemistry.cpp
index 3446795ed..2046784f1 100644
--- a/src/text-chemistry.cpp
+++ b/src/text-chemistry.cpp
@@ -40,7 +40,7 @@
using Inkscape::DocumentUndo;
-SPItem *
+static SPItem *
text_in_selection(Inkscape::Selection *selection)
{
for (GSList *items = (GSList *) selection->itemList();
@@ -52,7 +52,7 @@ text_in_selection(Inkscape::Selection *selection)
return NULL;
}
-SPItem *
+static SPItem *
flowtext_in_selection(Inkscape::Selection *selection)
{
for (GSList *items = (GSList *) selection->itemList();
@@ -64,7 +64,7 @@ flowtext_in_selection(Inkscape::Selection *selection)
return NULL;
}
-SPItem *
+static SPItem *
text_or_flowtext_in_selection(Inkscape::Selection *selection)
{
for (GSList *items = (GSList *) selection->itemList();
@@ -76,7 +76,7 @@ text_or_flowtext_in_selection(Inkscape::Selection *selection)
return NULL;
}
-SPItem *
+static SPItem *
shape_in_selection(Inkscape::Selection *selection)
{
for (GSList *items = (GSList *) selection->itemList();
@@ -233,7 +233,7 @@ text_remove_from_path()
}
}
-void
+static void
text_remove_all_kerns_recursively(SPObject *o)
{
o->getRepr()->setAttribute("dx", NULL);
diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp
index 0205fc703..33dab447c 100644
--- a/src/tweak-context.cpp
+++ b/src/tweak-context.cpp
@@ -176,7 +176,7 @@ sp_tweak_context_dispose(GObject *object)
G_OBJECT_CLASS(parent_class)->dispose(object);
}
-bool is_transform_mode (gint mode)
+static bool is_transform_mode (gint mode)
{
return (mode == TWEAK_MODE_MOVE ||
mode == TWEAK_MODE_MOVE_IN_OUT ||
@@ -186,12 +186,12 @@ bool is_transform_mode (gint mode)
mode == TWEAK_MODE_MORELESS);
}
-bool is_color_mode (gint mode)
+static bool is_color_mode (gint mode)
{
return (mode == TWEAK_MODE_COLORPAINT || mode == TWEAK_MODE_COLORJITTER || mode == TWEAK_MODE_BLUR);
}
-void
+static void
sp_tweak_update_cursor (SPTweakContext *tc, bool with_shift)
{
SPEventContext *event_context = SP_EVENT_CONTEXT(tc);
@@ -376,14 +376,14 @@ sp_tweak_extinput(SPTweakContext *tc, GdkEvent *event)
}
}
-double
+static double
get_dilate_radius (SPTweakContext *tc)
{
// 10 times the pen width:
return 500 * tc->width/SP_EVENT_CONTEXT(tc)->desktop->current_zoom();
}
-double
+static double
get_path_force (SPTweakContext *tc)
{
double force = 8 * (tc->usepressure? tc->pressure : TC_DEFAULT_PRESSURE)
@@ -394,14 +394,14 @@ get_path_force (SPTweakContext *tc)
return force * tc->force;
}
-double
+static double
get_move_force (SPTweakContext *tc)
{
double force = (tc->usepressure? tc->pressure : TC_DEFAULT_PRESSURE);
return force * tc->force;
}
-bool
+static bool
sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::Point p, Geom::Point vector, gint mode, double radius, double force, double fidelity, bool reverse)
{
bool did = false;
@@ -697,7 +697,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P
return did;
}
-void
+static void
tweak_colorpaint (float *color, guint32 goal, double force, bool do_h, bool do_s, bool do_l)
{
float rgb_g[3];
@@ -729,7 +729,7 @@ tweak_colorpaint (float *color, guint32 goal, double force, bool do_h, bool do_s
}
}
-void
+static void
tweak_colorjitter (float *color, double force, bool do_h, bool do_s, bool do_l)
{
float hsl_c[3];
@@ -754,7 +754,7 @@ tweak_colorjitter (float *color, double force, bool do_h, bool do_s, bool do_l)
sp_color_hsl_to_rgb_floatv (color, hsl_c[0], hsl_c[1], hsl_c[2]);
}
-void
+static void
tweak_color (guint mode, float *color, guint32 goal, double force, bool do_h, bool do_s, bool do_l)
{
if (mode == TWEAK_MODE_COLORPAINT) {
@@ -764,7 +764,7 @@ tweak_color (guint mode, float *color, guint32 goal, double force, bool do_h, bo
}
}
-void
+static void
tweak_opacity (guint mode, SPIScale24 *style_opacity, double opacity_goal, double force)
{
double opacity = SP_SCALE24_TO_FLOAT (style_opacity->value);
@@ -780,7 +780,7 @@ tweak_opacity (guint mode, SPIScale24 *style_opacity, double opacity_goal, doubl
}
-double
+static double
tweak_profile (double dist, double radius)
{
if (radius == 0) {
@@ -797,9 +797,9 @@ tweak_profile (double dist, double radius)
}
}
-void tweak_colors_in_gradient(SPItem *item, Inkscape::PaintTarget fill_or_stroke,
- guint32 const rgb_goal, Geom::Point p_w, double radius, double force, guint mode,
- bool do_h, bool do_s, bool do_l, bool /*do_o*/)
+static void tweak_colors_in_gradient(SPItem *item, Inkscape::PaintTarget fill_or_stroke,
+ guint32 const rgb_goal, Geom::Point p_w, double radius, double force, guint mode,
+ bool do_h, bool do_s, bool do_l, bool /*do_o*/)
{
SPGradient *gradient = getGradient(item, fill_or_stroke);
@@ -917,7 +917,7 @@ void tweak_colors_in_gradient(SPItem *item, Inkscape::PaintTarget fill_or_stroke
}
}
-bool
+static bool
sp_tweak_color_recursive (guint mode, SPItem *item, SPItem *item_at_point,
guint32 fill_goal, bool do_fill,
guint32 stroke_goal, bool do_stroke,
@@ -1051,7 +1051,7 @@ sp_tweak_color_recursive (guint mode, SPItem *item, SPItem *item_at_point,
}
-bool
+static bool
sp_tweak_dilate (SPTweakContext *tc, Geom::Point event_p, Geom::Point p, Geom::Point vector, bool reverse)
{
Inkscape::Selection *selection = sp_desktop_selection(SP_EVENT_CONTEXT(tc)->desktop);
@@ -1141,7 +1141,7 @@ sp_tweak_dilate (SPTweakContext *tc, Geom::Point event_p, Geom::Point p, Geom::P
return did;
}
-void
+static void
sp_tweak_update_area (SPTweakContext *tc)
{
double radius = get_dilate_radius(tc);
@@ -1150,7 +1150,7 @@ sp_tweak_update_area (SPTweakContext *tc)
sp_canvas_item_show(tc->dilate_area);
}
-void
+static void
sp_tweak_switch_mode (SPTweakContext *tc, gint mode, bool with_shift)
{
SP_EVENT_CONTEXT(tc)->desktop->setToolboxSelectOneValue ("tweak_tool_mode", mode);
@@ -1159,7 +1159,7 @@ sp_tweak_switch_mode (SPTweakContext *tc, gint mode, bool with_shift)
sp_tweak_update_cursor (tc, with_shift);
}
-void
+static void
sp_tweak_switch_mode_temporarily (SPTweakContext *tc, gint mode, bool with_shift)
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
diff --git a/src/unclump.cpp b/src/unclump.cpp
index 43bcf5005..1427e8eab 100644
--- a/src/unclump.cpp
+++ b/src/unclump.cpp
@@ -15,6 +15,7 @@
#include <map>
#include <2geom/transforms.h>
#include "sp-item.h"
+#include "unclump.h"
// Taking bbox of an item is an expensive operation, and we need to do it many times, so here we
@@ -27,7 +28,7 @@ std::map<const gchar *, Geom::Point> wh_cache;
/**
Center of bbox of item
*/
-Geom::Point
+static Geom::Point
unclump_center (SPItem *item)
{
std::map<const gchar *, Geom::Point>::iterator i = c_cache.find(item->getId());
@@ -46,7 +47,7 @@ unclump_center (SPItem *item)
}
}
-Geom::Point
+static Geom::Point
unclump_wh (SPItem *item)
{
Geom::Point wh;
@@ -71,7 +72,7 @@ Distance between "edges" of item1 and item2. An item is considered to be an elli
so its radius (distance from center to edge) depends on the w/h and the angle towards the other item.
May be negative if the edge of item1 is between the center and the edge of item2.
*/
-double
+static double
unclump_dist (SPItem *item1, SPItem *item2)
{
Geom::Point c1 = unclump_center (item1);
@@ -166,7 +167,7 @@ unclump_dist (SPItem *item1, SPItem *item2)
/**
Average unclump_dist from item to others
*/
-double unclump_average (SPItem *item, GSList *others)
+static double unclump_average (SPItem *item, GSList *others)
{
int n = 0;
double sum = 0;
@@ -190,7 +191,7 @@ double unclump_average (SPItem *item, GSList *others)
/**
Closest to item among others
*/
-SPItem *unclump_closest (SPItem *item, GSList *others)
+static SPItem *unclump_closest (SPItem *item, GSList *others)
{
double min = HUGE_VAL;
SPItem *closest = NULL;
@@ -214,7 +215,7 @@ SPItem *unclump_closest (SPItem *item, GSList *others)
/**
Most distant from item among others
*/
-SPItem *unclump_farest (SPItem *item, GSList *others)
+static SPItem *unclump_farest (SPItem *item, GSList *others)
{
double max = -HUGE_VAL;
SPItem *farest = NULL;
@@ -240,7 +241,7 @@ Removes from the \a rest list those items that are "behind" \a closest as seen f
i.e. those on the other side of the line through \a closest perpendicular to the direction from \a
item to \a closest. Returns a newly created list which must be freed.
*/
-GSList *
+static GSList *
unclump_remove_behind (SPItem *item, SPItem *closest, GSList *rest)
{
Geom::Point it = unclump_center (item);
@@ -282,7 +283,7 @@ unclump_remove_behind (SPItem *item, SPItem *closest, GSList *rest)
/**
Moves \a what away from \a from by \a dist
*/
-void
+static void
unclump_push (SPItem *from, SPItem *what, double dist)
{
Geom::Point it = unclump_center (what);
@@ -305,7 +306,7 @@ unclump_push (SPItem *from, SPItem *what, double dist)
/**
Moves \a what towards \a to by \a dist
*/
-void
+static void
unclump_pull (SPItem *to, SPItem *what, double dist)
{
Geom::Point it = unclump_center (what);
diff --git a/src/vanishing-point.cpp b/src/vanishing-point.cpp
index f342f2c69..3adcfbb40 100644
--- a/src/vanishing-point.cpp
+++ b/src/vanishing-point.cpp
@@ -204,7 +204,7 @@ vp_knot_moved_handler (SPKnot *knot, Geom::Point const *ppointer, guint state, g
dragger->dragging_started = true;
}
-void
+static void
vp_knot_grabbed_handler (SPKnot */*knot*/, unsigned int /*state*/, gpointer data)
{
VPDragger *dragger = (VPDragger *) data;