summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-10-04 16:06:34 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-10-04 16:06:34 +0000
commit9934562291b4604c611776063ced8b75e111d3f2 (patch)
treea7a3b4f9d5327cf9f001de090b223a75ec0347ee /src
parentmerge from trunk (r11734) (diff)
parentcode cleanup: make more functions static, add includes. (diff)
downloadinkscape-9934562291b4604c611776063ced8b75e111d3f2.tar.gz
inkscape-9934562291b4604c611776063ced8b75e111d3f2.zip
merge from trunk (r11737)
(bzr r11668.1.23)
Diffstat (limited to 'src')
-rw-r--r--src/arc-context.cpp2
-rw-r--r--src/bind/dobinding.cpp2
-rw-r--r--src/bind/javabind.cpp28
-rw-r--r--src/box3d.cpp2
-rw-r--r--src/color.cpp2
-rw-r--r--src/conn-avoid-ref.cpp2
-rw-r--r--src/debug/timestamp.cpp1
-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/dialogs/find.cpp48
-rw-r--r--src/dir-util.cpp1
-rw-r--r--src/document.cpp12
-rw-r--r--src/dom/prop-css.cpp2
-rw-r--r--src/dom/prop-css2.cpp2
-rw-r--r--src/dom/util/ziptool.cpp2
-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/extension/init.cpp2
-rw-r--r--src/extension/internal/svg.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/helper/gnome-utils.cpp2
-rw-r--r--src/helper/stock-items.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/io/ftos.cpp4
-rw-r--r--src/live_effects/lpe-gears.cpp3
-rw-r--r--src/live_effects/lpe-knot.cpp7
-rw-r--r--src/live_effects/lpe-powerstroke.cpp16
-rw-r--r--src/live_effects/lpe-rough-hatches.cpp4
-rw-r--r--src/live_effects/spiro.cpp8
-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/trace/quantize.cpp16
-rw-r--r--src/tweak-context.cpp40
-rw-r--r--src/ui/dialog/align-and-distribute.cpp6
-rw-r--r--src/ui/dialog/debug.cpp8
-rw-r--r--src/ui/dialog/dialog.cpp4
-rw-r--r--src/ui/dialog/filter-effects-dialog.cpp8
-rw-r--r--src/ui/dialog/inkscape-preferences.cpp2
-rw-r--r--src/ui/dialog/swatches.cpp7
-rw-r--r--src/ui/dialog/tile.cpp4
-rw-r--r--src/ui/dialog/transformation.cpp10
-rw-r--r--src/unclump.cpp19
-rw-r--r--src/vanishing-point.cpp2
-rw-r--r--src/widgets/eek-preview.cpp4
-rw-r--r--src/widgets/font-selector.cpp2
-rw-r--r--src/widgets/gradient-toolbar.cpp5
-rw-r--r--src/widgets/gradient-vector.cpp2
-rw-r--r--src/widgets/paint-selector.cpp4
-rw-r--r--src/widgets/select-toolbar.cpp1
-rw-r--r--src/widgets/shrink-wrap-button.cpp2
-rw-r--r--src/widgets/spinbutton-events.cpp1
-rw-r--r--src/widgets/spw-utilities.cpp3
-rw-r--r--src/widgets/text-toolbar.cpp4
-rw-r--r--src/xml/node-fns.cpp1
-rw-r--r--src/xml/quote.cpp1
-rw-r--r--src/xml/repr-sorting.cpp1
-rw-r--r--src/xml/repr-util.cpp2
96 files changed, 298 insertions, 256 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/bind/dobinding.cpp b/src/bind/dobinding.cpp
index 6da754716..03b16a9dd 100644
--- a/src/bind/dobinding.cpp
+++ b/src/bind/dobinding.cpp
@@ -180,7 +180,7 @@ static NativeClass nc_DOMBase =
//########################################################################
-void JNICALL DOMImplementation_nCreateDocument
+static void JNICALL DOMImplementation_nCreateDocument
(JNIEnv *env, jobject obj)
{
DOMImplementationImpl domImpl;
diff --git a/src/bind/javabind.cpp b/src/bind/javabind.cpp
index 0831ddf19..d2d01f0b3 100644
--- a/src/bind/javabind.cpp
+++ b/src/bind/javabind.cpp
@@ -111,7 +111,7 @@ String normalizePath(const String &str)
/**
* Convert a java string to a C++ string
*/
-String getString(JNIEnv *env, jstring jstr)
+static String getString(JNIEnv *env, jstring jstr)
{
const char *chars = env->GetStringUTFChars(jstr, JNI_FALSE);
String str = chars;
@@ -138,62 +138,62 @@ String getExceptionString(JNIEnv *env)
return buf;
}
-jint getObjInt(JNIEnv *env, jobject obj, const char *name)
+static jint getObjInt(JNIEnv *env, jobject obj, const char *name)
{
jfieldID fid = env->GetFieldID(env->GetObjectClass(obj), name, "I");
return env->GetIntField(obj, fid);
}
-void setObjInt(JNIEnv *env, jobject obj, const char *name, jint val)
+static void setObjInt(JNIEnv *env, jobject obj, const char *name, jint val)
{
jfieldID fid = env->GetFieldID(env->GetObjectClass(obj), name, "I");
env->SetIntField(obj, fid, val);
}
-jlong getObjLong(JNIEnv *env, jobject obj, const char *name)
+static jlong getObjLong(JNIEnv *env, jobject obj, const char *name)
{
jfieldID fid = env->GetFieldID(env->GetObjectClass(obj), name, "J");
return env->GetLongField(obj, fid);
}
-void setObjLong(JNIEnv *env, jobject obj, const char *name, jlong val)
+static void setObjLong(JNIEnv *env, jobject obj, const char *name, jlong val)
{
jfieldID fid = env->GetFieldID(env->GetObjectClass(obj), name, "J");
env->SetLongField(obj, fid, val);
}
-jfloat getObjFloat(JNIEnv *env, jobject obj, const char *name)
+static jfloat getObjFloat(JNIEnv *env, jobject obj, const char *name)
{
jfieldID fid = env->GetFieldID(env->GetObjectClass(obj), name, "F");
return env->GetFloatField(obj, fid);
}
-void setObjFloat(JNIEnv *env, jobject obj, const char *name, jfloat val)
+static void setObjFloat(JNIEnv *env, jobject obj, const char *name, jfloat val)
{
jfieldID fid = env->GetFieldID(env->GetObjectClass(obj), name, "F");
env->SetFloatField(obj, fid, val);
}
-jdouble getObjDouble(JNIEnv *env, jobject obj, const char *name)
+static jdouble getObjDouble(JNIEnv *env, jobject obj, const char *name)
{
jfieldID fid = env->GetFieldID(env->GetObjectClass(obj), name, "D");
return env->GetDoubleField(obj, fid);
}
-void setObjDouble(JNIEnv *env, jobject obj, const char *name, jdouble val)
+static void setObjDouble(JNIEnv *env, jobject obj, const char *name, jdouble val)
{
jfieldID fid = env->GetFieldID(env->GetObjectClass(obj), name, "D");
env->SetDoubleField(obj, fid, val);
}
-String getObjString(JNIEnv *env, jobject obj, const char *name)
+static String getObjString(JNIEnv *env, jobject obj, const char *name)
{
jfieldID fid = env->GetFieldID(env->GetObjectClass(obj), name, "Ljava/lang/String;");
jstring jstr = (jstring)env->GetObjectField(obj, fid);
return getString(env, jstr);
}
-void setObjString(JNIEnv *env, jobject obj, const char *name, const String &val)
+static void setObjString(JNIEnv *env, jobject obj, const char *name, const String &val)
{
jstring jstr = env->NewStringUTF(val.c_str());
jfieldID fid = env->GetFieldID(env->GetObjectClass(obj), name, "Ljava/lang/String;");
@@ -725,7 +725,7 @@ static void populateClassPath(const String &javaroot,
* This is provided to scripts can grab the current copy or the
* repr tree. If anyone has a smarter way of doing this, please implement.
*/
-jstring JNICALL documentGet(JNIEnv *env, jobject /*obj*/, jlong /*ptr*/)
+static jstring JNICALL documentGet(JNIEnv *env, jobject /*obj*/, jlong /*ptr*/)
{
//JavaBinderyImpl *bind = (JavaBinderyImpl *)ptr;
String buf = sp_repr_save_buf((SP_ACTIVE_DOCUMENT)->rdoc);
@@ -737,7 +737,7 @@ jstring JNICALL documentGet(JNIEnv *env, jobject /*obj*/, jlong /*ptr*/)
* This is provided to scripts can load an XML tree into Inkscape.
* If anyone has a smarter way of doing this, please implement.
*/
-jboolean JNICALL documentSet(JNIEnv */*env*/, jobject /*obj*/, jlong /*ptr*/, jstring /*jstr*/)
+static jboolean JNICALL documentSet(JNIEnv */*env*/, jobject /*obj*/, jlong /*ptr*/, jstring /*jstr*/)
{
/*
JavaBinderyImpl *bind = (JavaBinderyImpl *)ptr;
@@ -752,7 +752,7 @@ jboolean JNICALL documentSet(JNIEnv */*env*/, jobject /*obj*/, jlong /*ptr*/, js
* redirect its logging stream here.
* For the main C++/Java bindings, see dobinding.cpp
*/
-void JNICALL logWrite(JNIEnv */*env*/, jobject /*obj*/, jlong ptr, jint ch)
+static void JNICALL logWrite(JNIEnv */*env*/, jobject /*obj*/, jlong ptr, jint ch)
{
JavaBinderyImpl *bind = reinterpret_cast<JavaBinderyImpl *>(ptr);
bind->log(ch);
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/debug/timestamp.cpp b/src/debug/timestamp.cpp
index e100134c8..6de03a463 100644
--- a/src/debug/timestamp.cpp
+++ b/src/debug/timestamp.cpp
@@ -13,6 +13,7 @@
#include <glib.h>
#include <glibmm/ustring.h>
#include "debug/simple-event.h"
+#include "timestamp.h"
namespace Inkscape {
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/dialogs/find.cpp b/src/dialogs/find.cpp
index 41d7f3418..8acc96596 100644
--- a/src/dialogs/find.cpp
+++ b/src/dialogs/find.cpp
@@ -18,7 +18,7 @@
//TODO : delete this
GtkWidget * sp_find_dialog_old (void);
-void
+static void
//GtkWidget *
sp_find_dialog(){
// DialogFind::get().present();
@@ -102,7 +102,7 @@ static gboolean sp_find_dialog_delete(GObject *, GdkEvent *, gpointer /*data*/)
return FALSE; // which means, go ahead and destroy it
}
-void
+static void
sp_find_squeeze_window()
{
GtkRequisition r;
@@ -114,7 +114,7 @@ sp_find_squeeze_window()
gtk_window_resize ((GtkWindow *) dlg, r.width, r.height);
}
-bool
+static bool
item_id_match (SPItem *item, const gchar *id, bool exact)
{
if (item->getRepr() == NULL) {
@@ -138,7 +138,7 @@ item_id_match (SPItem *item, const gchar *id, bool exact)
}
}
-bool
+static bool
item_text_match (SPItem *item, const gchar *text, bool exact)
{
if (item->getRepr() == NULL) {
@@ -162,7 +162,7 @@ item_text_match (SPItem *item, const gchar *text, bool exact)
return false;
}
-bool
+static bool
item_style_match (SPItem *item, const gchar *text, bool exact)
{
if (item->getRepr() == NULL) {
@@ -181,7 +181,8 @@ item_style_match (SPItem *item, const gchar *text, bool exact)
}
}
-bool item_attr_match(SPItem *item, const gchar *name, bool exact)
+static bool
+item_attr_match(SPItem *item, const gchar *name, bool exact)
{
bool result = false;
if (item->getRepr()) {
@@ -196,7 +197,7 @@ bool item_attr_match(SPItem *item, const gchar *name, bool exact)
}
-GSList *
+static GSList *
filter_onefield (GSList *l, GObject *dlg, const gchar *field, bool (*match_function)(SPItem *, const gchar *, bool), bool exact)
{
GtkWidget *widget = GTK_WIDGET (g_object_get_data(G_OBJECT (dlg), field));
@@ -218,13 +219,13 @@ filter_onefield (GSList *l, GObject *dlg, const gchar *field, bool (*match_funct
}
-bool
+static bool
type_checkbox (GtkWidget *widget, const gchar *data)
{
return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (g_object_get_data(G_OBJECT (widget), data)));
}
-bool
+static bool
item_type_match (SPItem *item, GtkWidget *widget)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
@@ -263,7 +264,7 @@ item_type_match (SPItem *item, GtkWidget *widget)
return false;
}
-GSList *
+static GSList *
filter_types (GSList *l, GObject *dlg, bool (*match_function)(SPItem *, GtkWidget *))
{
GtkWidget *widget = GTK_WIDGET (g_object_get_data(G_OBJECT (dlg), "types"));
@@ -283,7 +284,7 @@ filter_types (GSList *l, GObject *dlg, bool (*match_function)(SPItem *, GtkWidge
}
-GSList *
+static GSList *
filter_list (GSList *l, GObject *dlg, bool exact)
{
l = filter_onefield (l, dlg, "text", item_text_match, exact);
@@ -296,7 +297,7 @@ filter_list (GSList *l, GObject *dlg, bool exact)
return l;
}
-GSList *
+static GSList *
all_items (SPObject *r, GSList *l, bool hidden, bool locked)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
@@ -321,7 +322,7 @@ all_items (SPObject *r, GSList *l, bool hidden, bool locked)
return l;
}
-GSList *
+static GSList *
all_selection_items (Inkscape::Selection *s, GSList *l, SPObject *ancestor, bool hidden, bool locked)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
@@ -343,7 +344,8 @@ all_selection_items (Inkscape::Selection *s, GSList *l, SPObject *ancestor, bool
}
-void sp_find_dialog_find(GObject *, GObject *dlg)
+static void
+sp_find_dialog_find(GObject *, GObject *dlg)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
@@ -392,7 +394,7 @@ void sp_find_dialog_find(GObject *, GObject *dlg)
}
}
-void
+static void
sp_find_reset_searchfield (GObject *dlg, const gchar *field)
{
GtkWidget *widget = GTK_WIDGET (g_object_get_data(G_OBJECT (dlg), field));
@@ -400,7 +402,7 @@ sp_find_reset_searchfield (GObject *dlg, const gchar *field)
}
-void
+static void
sp_find_dialog_reset (GObject *, GObject *dlg)
{
sp_find_reset_searchfield (dlg, "text");
@@ -417,7 +419,7 @@ sp_find_dialog_reset (GObject *, GObject *dlg)
#define FIND_LABELWIDTH 80
-void
+static void
sp_find_new_searchfield (GtkWidget *dlg, GtkWidget *vb, const gchar *label, const gchar *id, const gchar *tip)
{
#if GTK_CHECK_VERSION(3,0,0)
@@ -442,7 +444,7 @@ sp_find_new_searchfield (GtkWidget *dlg, GtkWidget *vb, const gchar *label, cons
gtk_box_pack_start (GTK_BOX (vb), hb, FALSE, FALSE, 0);
}
-void
+static void
sp_find_new_button (GtkWidget *dlg, GtkWidget *hb, const gchar *label, const gchar *tip, void (*function) (GObject *, GObject *))
{
GtkWidget *b = gtk_button_new_with_mnemonic (label);
@@ -452,7 +454,7 @@ sp_find_new_button (GtkWidget *dlg, GtkWidget *hb, const gchar *label, const gch
gtk_widget_show (b);
}
-void
+static void
toggle_alltypes (GtkToggleButton *tb, gpointer data)
{
GtkWidget *alltypes_pane = GTK_WIDGET (g_object_get_data(G_OBJECT (data), "all-pane"));
@@ -475,7 +477,7 @@ toggle_alltypes (GtkToggleButton *tb, gpointer data)
sp_find_squeeze_window();
}
-void
+static void
toggle_shapes (GtkToggleButton *tb, gpointer data)
{
GtkWidget *shapes_pane = GTK_WIDGET (g_object_get_data(G_OBJECT (data), "shapes-pane"));
@@ -492,7 +494,7 @@ toggle_shapes (GtkToggleButton *tb, gpointer data)
}
-GtkWidget *
+static GtkWidget *
sp_find_types_checkbox (GtkWidget *w, const gchar *data, gboolean active,
const gchar *tip,
const gchar *label,
@@ -520,7 +522,7 @@ sp_find_types_checkbox (GtkWidget *w, const gchar *data, gboolean active,
return hb;
}
-GtkWidget *
+static GtkWidget *
sp_find_types_checkbox_indented (GtkWidget *w, const gchar *data, gboolean active,
const gchar *tip,
const gchar *label,
@@ -548,7 +550,7 @@ sp_find_types_checkbox_indented (GtkWidget *w, const gchar *data, gboolean activ
}
-GtkWidget *
+static GtkWidget *
sp_find_types ()
{
#if GTK_CHECK_VERSION(3,0,0)
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/dom/prop-css.cpp b/src/dom/prop-css.cpp
index a0d66d939..9922b4935 100644
--- a/src/dom/prop-css.cpp
+++ b/src/dom/prop-css.cpp
@@ -1137,7 +1137,7 @@ NULL
-bool printTable()
+static bool printTable()
{
for (CssProp *prop=cssProps; prop->name ; prop++)
{
diff --git a/src/dom/prop-css2.cpp b/src/dom/prop-css2.cpp
index 33548fbb9..9fe998552 100644
--- a/src/dom/prop-css2.cpp
+++ b/src/dom/prop-css2.cpp
@@ -1279,7 +1279,7 @@ bool parseProperty(char *name, char *value)
}
-bool printTable()
+static bool printTable()
{
for (CssProp *prop=cssProps; prop->name ; prop++)
{
diff --git a/src/dom/util/ziptool.cpp b/src/dom/util/ziptool.cpp
index 081bcbbc4..9d9d5685c 100644
--- a/src/dom/util/ziptool.cpp
+++ b/src/dom/util/ziptool.cpp
@@ -126,7 +126,7 @@ static unsigned long crc_table[256];
/**
* make the table for a fast CRC.
*/
-void makeCrcTable()
+static void makeCrcTable()
{
if (crc_table_ready)
return;
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/extension/init.cpp b/src/extension/init.cpp
index 425c0743b..6e35ca9d1 100644
--- a/src/extension/init.cpp
+++ b/src/extension/init.cpp
@@ -100,6 +100,8 @@
#include "internal/filter/filter.h"
+#include "init.h"
+
extern gboolean inkscape_app_use_gui( Inkscape::Application const *app );
namespace Inkscape {
diff --git a/src/extension/internal/svg.cpp b/src/extension/internal/svg.cpp
index 9b1098afd..8b272af60 100644
--- a/src/extension/internal/svg.cpp
+++ b/src/extension/internal/svg.cpp
@@ -44,7 +44,7 @@ using Inkscape::XML::Node;
-void pruneExtendedAttributes( Inkscape::XML::Node *repr )
+static void pruneExtendedAttributes( Inkscape::XML::Node *repr )
{
if (repr) {
if ( repr->type() == Inkscape::XML::ELEMENT_NODE ) {
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/helper/gnome-utils.cpp b/src/helper/gnome-utils.cpp
index aa70dd1a2..d0bcaf8cd 100644
--- a/src/helper/gnome-utils.cpp
+++ b/src/helper/gnome-utils.cpp
@@ -16,6 +16,8 @@
#include <ctype.h>
#include <glib.h>
+#include "gnome-utils.h"
+
/**
* gnome_uri_list_extract_uris:
* @uri_list: an uri-list in the standard format.
diff --git a/src/helper/stock-items.cpp b/src/helper/stock-items.cpp
index 902aebdeb..a00507330 100644
--- a/src/helper/stock-items.cpp
+++ b/src/helper/stock-items.cpp
@@ -33,7 +33,7 @@
#include "inkscape.h"
#include "io/sys.h"
-
+#include "stock-items.h"
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/io/ftos.cpp b/src/io/ftos.cpp
index 658c768e8..d0764d86c 100644
--- a/src/io/ftos.cpp
+++ b/src/io/ftos.cpp
@@ -172,7 +172,7 @@ using namespace std;
// This routine counts from the end of a string like '10229000' to find the index
// of the first non-'0' character (5 would be returned for the above number.)
-int countDigs(char *p)
+static int countDigs(char *p)
{
int length =0;
while (*(p+length)!='\0') length++; // Count total length
@@ -186,7 +186,7 @@ int countDigs(char *p)
// is between 0 and 1. Returns 1 if v==0. Return value is positive for numbers
// greater than or equal to 1, negative for numbers less than 0.1, and zero for
// numbers between 0.1 and 1.
-int countLhsDigits(double v)
+static int countLhsDigits(double v)
{
if (v<0) v = -v; // Take abs value
else if (v==0) return 1; // Special case if v==0
diff --git a/src/live_effects/lpe-gears.cpp b/src/live_effects/lpe-gears.cpp
index e57f5112e..003e22567 100644
--- a/src/live_effects/lpe-gears.cpp
+++ b/src/live_effects/lpe-gears.cpp
@@ -112,7 +112,8 @@ private:
}
};
-void makeContinuous(D2<SBasis> &a, Point const b) {
+static void
+makeContinuous(D2<SBasis> &a, Point const b) {
for(unsigned d=0;d<2;d++)
a[d][0][0] = b[d];
}
diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp
index d3dd10d26..746dbbb7a 100644
--- a/src/live_effects/lpe-knot.cpp
+++ b/src/live_effects/lpe-knot.cpp
@@ -51,7 +51,7 @@ public:
};
-Geom::Path::size_type size_nondegenerate(Geom::Path const &path) {
+static Geom::Path::size_type size_nondegenerate(Geom::Path const &path) {
Geom::Path::size_type retval = path.size_open();
// if path is closed and closing segment is not degenerate
@@ -283,7 +283,7 @@ CrossingPoints::get(unsigned const i, unsigned const ni)
return CrossingPoint();
}
-unsigned
+static unsigned
idx_of_nearest(CrossingPoints const &cpts, Geom::Point const &p)
{
double dist=-1;
@@ -500,7 +500,8 @@ LPEKnot::doEffect_path (std::vector<Geom::Path> const &path_in)
//recursively collect gpaths and stroke widths (stolen from "sp-lpe_item.cpp").
-void collectPathsAndWidths (SPLPEItem const *lpeitem, std::vector<Geom::Path> &paths, std::vector<double> &stroke_widths){
+static void
+collectPathsAndWidths (SPLPEItem const *lpeitem, std::vector<Geom::Path> &paths, std::vector<double> &stroke_widths){
if (SP_IS_GROUP(lpeitem)) {
GSList const *item_list = sp_item_group_item_list(SP_GROUP(lpeitem));
for ( GSList const *iter = item_list; iter; iter = iter->next ) {
diff --git a/src/live_effects/lpe-powerstroke.cpp b/src/live_effects/lpe-powerstroke.cpp
index 88a20c68a..69d0808e4 100644
--- a/src/live_effects/lpe-powerstroke.cpp
+++ b/src/live_effects/lpe-powerstroke.cpp
@@ -36,7 +36,7 @@ namespace Geom {
/** Find the point where two straight lines cross.
*/
-boost::optional<Point> intersection_point( Point const & origin_a, Point const & vector_a,
+static boost::optional<Point> intersection_point( Point const & origin_a, Point const & vector_a,
Point const & origin_b, Point const & vector_b)
{
Coord denom = cross(vector_b, vector_a);
@@ -47,7 +47,7 @@ boost::optional<Point> intersection_point( Point const & origin_a, Point const &
return boost::none;
}
-Geom::CubicBezier sbasis_to_cubicbezier(Geom::D2<Geom::SBasis> const & sbasis_in)
+static Geom::CubicBezier sbasis_to_cubicbezier(Geom::D2<Geom::SBasis> const & sbasis_in)
{
std::vector<Geom::Point> temp;
sbasis_to_bezier(temp, sbasis_in, 4);
@@ -205,12 +205,12 @@ static bool compare_offsets (Geom::Point first, Geom::Point second)
return first[Geom::X] < second[Geom::X];
}
-Geom::Path path_from_piecewise_fix_cusps( Geom::Piecewise<Geom::D2<Geom::SBasis> > const & B,
- Geom::Piecewise<Geom::SBasis> const & y, // width path
- LineJoinType jointype,
- double miter_limit,
- bool /*forward_direction*/,
- double tol=Geom::EPSILON)
+static Geom::Path path_from_piecewise_fix_cusps( Geom::Piecewise<Geom::D2<Geom::SBasis> > const & B,
+ Geom::Piecewise<Geom::SBasis> const & y, // width path
+ LineJoinType jointype,
+ double miter_limit,
+ bool /*forward_direction*/,
+ double tol=Geom::EPSILON)
{
/* per definition, each discontinuity should be fixed with a join-ending, as defined by linejoin_type
*/
diff --git a/src/live_effects/lpe-rough-hatches.cpp b/src/live_effects/lpe-rough-hatches.cpp
index de40d4fb5..f52977fcb 100644
--- a/src/live_effects/lpe-rough-hatches.cpp
+++ b/src/live_effects/lpe-rough-hatches.cpp
@@ -68,7 +68,7 @@ struct LevelCrossingInfoOrder {
typedef std::vector<LevelCrossing> LevelCrossings;
-std::vector<double>
+static std::vector<double>
discontinuities(Piecewise<D2<SBasis> > const &f){
std::vector<double> result;
if (f.size()==0) return result;
@@ -211,7 +211,7 @@ public:
// Bend a path...
//-------------------------------------------------------
-Piecewise<D2<SBasis> > bend(Piecewise<D2<SBasis> > const &f, Piecewise<SBasis> bending){
+static Piecewise<D2<SBasis> > bend(Piecewise<D2<SBasis> > const &f, Piecewise<SBasis> bending){
D2<Piecewise<SBasis> > ff = make_cuts_independent(f);
ff[X] += compose(bending, ff[Y]);
return sectionize(ff);
diff --git a/src/live_effects/spiro.cpp b/src/live_effects/spiro.cpp
index 14df5e92e..f50399a77 100644
--- a/src/live_effects/spiro.cpp
+++ b/src/live_effects/spiro.cpp
@@ -83,7 +83,7 @@ int n = 4;
#endif
/* Integrate polynomial spiral curve over range -.5 .. .5. */
-void
+static void
integrate_spiro(const double ks[4], double xy[2])
{
#if 0
@@ -631,7 +631,7 @@ banbks11(const bandmat *m, const int *perm, double *v, int n)
}
}
-int compute_jinc(char ty0, char ty1)
+static int compute_jinc(char ty0, char ty1)
{
if (ty0 == 'o' || ty1 == 'o' ||
ty0 == ']' || ty1 == '[')
@@ -645,7 +645,7 @@ int compute_jinc(char ty0, char ty1)
return 0;
}
-int count_vec(const spiro_seg *s, int nseg)
+static int count_vec(const spiro_seg *s, int nseg)
{
int i;
int n = 0;
@@ -807,7 +807,7 @@ spiro_iter(spiro_seg *s, bandmat *m, int *perm, double *v, int n)
return norm;
}
-int
+static int
solve_spiro(spiro_seg *s, int nseg)
{
bandmat *m;
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 ec82306af..b2ab3d9e6 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -1977,7 +1977,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,
@@ -2181,7 +2181,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/trace/quantize.cpp b/src/trace/quantize.cpp
index 2db1bbf34..ba9306da8 100644
--- a/src/trace/quantize.cpp
+++ b/src/trace/quantize.cpp
@@ -16,6 +16,7 @@
#include "pool.h"
#include "imagemap.h"
+#include "quantize.h"
typedef struct Ocnode_def Ocnode;
@@ -211,16 +212,19 @@ static void ocnodePrint(Ocnode *node, int indent)
ocnodePrint(node->child[i], indent+2);
}
}
+
+#if 0
void octreePrint(Ocnode *node)
{
printf("<<octree>>\n");
if (node) printf("[r:%p] ", node); ocnodePrint(node, 2);
}
+#endif
/**
* builds a single <rgb> color leaf at location <ref>
*/
-void ocnodeLeaf(pool<Ocnode> *pool, Ocnode **ref, RGB rgb)
+static void ocnodeLeaf(pool<Ocnode> *pool, Ocnode **ref, RGB rgb)
{
assert(ref);
Ocnode *node = ocnodeNew(pool);
@@ -237,7 +241,7 @@ void ocnodeLeaf(pool<Ocnode> *pool, Ocnode **ref, RGB rgb)
/**
* merge nodes <node1> and <node2> at location <ref> with parent <parent>
*/
-int octreeMerge(pool<Ocnode> *pool, Ocnode *parent, Ocnode **ref, Ocnode *node1, Ocnode *node2)
+static int octreeMerge(pool<Ocnode> *pool, Ocnode *parent, Ocnode **ref, Ocnode *node1, Ocnode *node2)
{
assert(ref);
if (!node1 && !node2) return 0;
@@ -415,7 +419,7 @@ static void ocnodeStrip(pool<Ocnode> *pool, Ocnode **ref, int *count, unsigned l
/**
* reduce the leaves of an octree to a given number
*/
-void octreePrune(pool<Ocnode> *pool, Ocnode **ref, int ncolor)
+static void octreePrune(pool<Ocnode> *pool, Ocnode **ref, int ncolor)
{
assert(ref);
assert(ncolor > 0);
@@ -435,8 +439,8 @@ void octreePrune(pool<Ocnode> *pool, Ocnode **ref, int ncolor)
* build an octree associated to the area of a color map <rgbmap>,
* included in the specified (x1,y1)--(x2,y2) rectangle.
*/
-void octreeBuildArea(pool<Ocnode> *pool, RgbMap *rgbmap, Ocnode **ref,
- int x1, int y1, int x2, int y2, int ncolor)
+static void octreeBuildArea(pool<Ocnode> *pool, RgbMap *rgbmap, Ocnode **ref,
+ int x1, int y1, int x2, int y2, int ncolor)
{
int dx = x2 - x1, dy = y2 - y1;
int xm = x1 + dx/2, ym = y1 + dy/2;
@@ -465,7 +469,7 @@ void octreeBuildArea(pool<Ocnode> *pool, RgbMap *rgbmap, Ocnode **ref,
* build an octree associated to the <rgbmap> color map,
* pruned to <ncolor> colors.
*/
-Ocnode *octreeBuild(pool<Ocnode> *pool, RgbMap *rgbmap, int ncolor)
+static Ocnode *octreeBuild(pool<Ocnode> *pool, RgbMap *rgbmap, int ncolor)
{
//create the octree
Ocnode *node = 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/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp
index 67980cdc1..4b0f773b5 100644
--- a/src/ui/dialog/align-and-distribute.cpp
+++ b/src/ui/dialog/align-and-distribute.cpp
@@ -755,7 +755,7 @@ struct Baselines
{}
};
-bool operator< (const Baselines &a, const Baselines &b)
+static bool operator< (const Baselines &a, const Baselines &b)
{
return (a._base[a._orientation] < b._base[b._orientation]);
}
@@ -873,14 +873,14 @@ private :
-void on_tool_changed(Inkscape::Application */*inkscape*/, SPEventContext */*context*/, AlignAndDistribute *daad)
+static void on_tool_changed(Inkscape::Application */*inkscape*/, SPEventContext */*context*/, AlignAndDistribute *daad)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop && sp_desktop_event_context(desktop))
daad->setMode(tools_active(desktop) == TOOLS_NODES);
}
-void on_selection_changed(Inkscape::Application */*inkscape*/, Inkscape::Selection */*selection*/, AlignAndDistribute *daad)
+static void on_selection_changed(Inkscape::Application */*inkscape*/, Inkscape::Selection */*selection*/, AlignAndDistribute *daad)
{
daad->randomize_bbox = Geom::OptRect();
}
diff --git a/src/ui/dialog/debug.cpp b/src/ui/dialog/debug.cpp
index a026f3501..da38e2dde 100644
--- a/src/ui/dialog/debug.cpp
+++ b/src/ui/dialog/debug.cpp
@@ -171,10 +171,10 @@ void DebugDialog::showInstance()
/*##### THIS IS THE IMPORTANT PART ##### */
-void dialogLoggingFunction(const gchar */*log_domain*/,
- GLogLevelFlags /*log_level*/,
- const gchar *messageText,
- gpointer user_data)
+static void dialogLoggingFunction(const gchar */*log_domain*/,
+ GLogLevelFlags /*log_level*/,
+ const gchar *messageText,
+ gpointer user_data)
{
DebugDialogImpl *dlg = static_cast<DebugDialogImpl *>(user_data);
dlg->message(messageText);
diff --git a/src/ui/dialog/dialog.cpp b/src/ui/dialog/dialog.cpp
index f5f712103..f27d344fa 100644
--- a/src/ui/dialog/dialog.cpp
+++ b/src/ui/dialog/dialog.cpp
@@ -61,7 +61,7 @@ void sp_dialog_shutdown(GObject * /*object*/, gpointer dlgPtr)
}
-void hideCallback(GObject * /*object*/, gpointer dlgPtr)
+static void hideCallback(GObject * /*object*/, gpointer dlgPtr)
{
g_return_if_fail( dlgPtr != NULL );
@@ -69,7 +69,7 @@ void hideCallback(GObject * /*object*/, gpointer dlgPtr)
dlg->onHideF12();
}
-void unhideCallback(GObject * /*object*/, gpointer dlgPtr)
+static void unhideCallback(GObject * /*object*/, gpointer dlgPtr)
{
g_return_if_fail( dlgPtr != NULL );
diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp
index c3c44f6c3..a755cfccd 100644
--- a/src/ui/dialog/filter-effects-dialog.cpp
+++ b/src/ui/dialog/filter-effects-dialog.cpp
@@ -83,7 +83,7 @@ using Inkscape::UI::Widget::SpinScale;
// Returns the number of inputs available for the filter primitive type
-int input_count(const SPFilterPrimitive* prim)
+static int input_count(const SPFilterPrimitive* prim)
{
if(!prim)
return 0;
@@ -1087,8 +1087,8 @@ FilterEffectsDialog::LightSourceControl* FilterEffectsDialog::Settings::add_ligh
return ls;
}
-Glib::RefPtr<Gtk::Menu> create_popup_menu(Gtk::Widget& parent, sigc::slot<void> dup,
- sigc::slot<void> rem)
+static Glib::RefPtr<Gtk::Menu> create_popup_menu(Gtk::Widget& parent, sigc::slot<void> dup,
+ sigc::slot<void> rem)
{
Glib::RefPtr<Gtk::Menu> menu(new Gtk::Menu);
@@ -2123,7 +2123,7 @@ bool FilterEffectsDialog::PrimitiveList::on_button_release_event(GdkEventButton*
}
// Checks all of prim's inputs, removes any that use result
-void check_single_connection(SPFilterPrimitive* prim, const int result)
+static void check_single_connection(SPFilterPrimitive* prim, const int result)
{
if (prim && (result >= 0)) {
if (prim->image_in == result) {
diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp
index 62f48cce0..fbaebfbec 100644
--- a/src/ui/dialog/inkscape-preferences.cpp
+++ b/src/ui/dialog/inkscape-preferences.cpp
@@ -200,7 +200,7 @@ void InkscapePreferences::AddDotSizeSpinbutton(DialogPage &p, Glib::ustring cons
}
-void StyleFromSelectionToTool(Glib::ustring const &prefs_path, StyleSwatch *swatch)
+static void StyleFromSelectionToTool(Glib::ustring const &prefs_path, StyleSwatch *swatch)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
diff --git a/src/ui/dialog/swatches.cpp b/src/ui/dialog/swatches.cpp
index 68bafe549..3baba3460 100644
--- a/src/ui/dialog/swatches.cpp
+++ b/src/ui/dialog/swatches.cpp
@@ -237,6 +237,9 @@ static void removeit( GtkWidget *widget, gpointer data )
gtk_container_remove( GTK_CONTAINER(data), widget );
}
+/* extern'ed from colot-item.cpp */
+gboolean colorItemHandleButtonPress( GtkWidget* widget, GdkEventButton* event, gpointer user_data );
+
gboolean colorItemHandleButtonPress( GtkWidget* widget, GdkEventButton* event, gpointer user_data )
{
gboolean handled = FALSE;
@@ -371,13 +374,13 @@ static char* trim( char* str ) {
return ret;
}
-void skipWhitespace( char*& str ) {
+static void skipWhitespace( char*& str ) {
while ( *str == ' ' || *str == '\t' ) {
str++;
}
}
-bool parseNum( char*& str, int& val ) {
+static bool parseNum( char*& str, int& val ) {
val = 0;
while ( '0' <= *str && *str <= '9' ) {
val = val * 10 + (*str - '0');
diff --git a/src/ui/dialog/tile.cpp b/src/ui/dialog/tile.cpp
index 5031a60b6..1ce78a278 100644
--- a/src/ui/dialog/tile.cpp
+++ b/src/ui/dialog/tile.cpp
@@ -42,7 +42,7 @@
* 0 *elem1 == *elem2
* >0 *elem1 goes after *elem2
*/
-int sp_compare_x_position(SPItem *first, SPItem *second)
+static int sp_compare_x_position(SPItem *first, SPItem *second)
{
using Geom::X;
using Geom::Y;
@@ -84,7 +84,7 @@ int sp_compare_x_position(SPItem *first, SPItem *second)
/*
* Sort items by their y co-ordinates.
*/
-int
+static int
sp_compare_y_position(SPItem *first, SPItem *second)
{
Geom::OptRect a = first->documentVisualBounds();
diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp
index 1c9d6689b..329450b52 100644
--- a/src/ui/dialog/transformation.cpp
+++ b/src/ui/dialog/transformation.cpp
@@ -42,16 +42,16 @@ namespace Inkscape {
namespace UI {
namespace Dialog {
-void on_selection_changed(Inkscape::Application */*inkscape*/, Inkscape::Selection *selection, Transformation *daad)
+static void on_selection_changed(Inkscape::Application */*inkscape*/, Inkscape::Selection *selection, Transformation *daad)
{
int page = daad->getCurrentPage();
daad->updateSelection((Inkscape::UI::Dialog::Transformation::PageType)page, selection);
}
-void on_selection_modified( Inkscape::Application */*inkscape*/,
- Inkscape::Selection *selection,
- guint /*flags*/,
- Transformation *daad )
+static void on_selection_modified( Inkscape::Application */*inkscape*/,
+ Inkscape::Selection *selection,
+ guint /*flags*/,
+ Transformation *daad )
{
int page = daad->getCurrentPage();
daad->updateSelection((Inkscape::UI::Dialog::Transformation::PageType)page, selection);
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;
diff --git a/src/widgets/eek-preview.cpp b/src/widgets/eek-preview.cpp
index e0c5d9eac..953beb69d 100644
--- a/src/widgets/eek-preview.cpp
+++ b/src/widgets/eek-preview.cpp
@@ -583,7 +583,7 @@ static gboolean eek_preview_button_release_cb( GtkWidget* widget, GdkEventButton
return FALSE;
}
-gboolean eek_preview_key_press_event( GtkWidget* widget, GdkEventKey* event)
+static gboolean eek_preview_key_press_event( GtkWidget* widget, GdkEventKey* event)
{
(void)widget;
(void)event;
@@ -591,7 +591,7 @@ gboolean eek_preview_key_press_event( GtkWidget* widget, GdkEventKey* event)
return FALSE;
}
-gboolean eek_preview_key_release_event( GtkWidget* widget, GdkEventKey* event)
+static gboolean eek_preview_key_release_event( GtkWidget* widget, GdkEventKey* event)
{
(void)widget;
(void)event;
diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp
index 61c6261bf..1cb94a8e5 100644
--- a/src/widgets/font-selector.cpp
+++ b/src/widgets/font-selector.cpp
@@ -129,7 +129,7 @@ static void sp_font_selector_class_init(SPFontSelectorClass *c)
object_class->dispose = sp_font_selector_dispose;
}
-void sp_font_selector_set_size_tooltip(SPFontSelector *fsel)
+static void sp_font_selector_set_size_tooltip(SPFontSelector *fsel)
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
int unit = prefs->getInt("/options/font/unitType", SP_CSS_UNIT_PT);
diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp
index ea88b96fa..b5fc0a0f2 100644
--- a/src/widgets/gradient-toolbar.cpp
+++ b/src/widgets/gradient-toolbar.cpp
@@ -55,6 +55,7 @@
#include "svg/svg-color.h"
#include "desktop-style.h"
#include "gradient-context.h"
+#include "gradient-toolbar.h"
#include "toolbox.h"
@@ -918,7 +919,7 @@ static void gr_new_fillstroke_changed( EgeSelectOneAction *act, GObject * /*tbl*
/*
* User selected a gradient from the combobox
*/
-void gr_gradient_combo_changed(EgeSelectOneAction *act, gpointer data)
+static void gr_gradient_combo_changed(EgeSelectOneAction *act, gpointer data)
{
if (blocked) {
return;
@@ -947,7 +948,7 @@ void gr_gradient_combo_changed(EgeSelectOneAction *act, gpointer data)
}
-void gr_spread_change(EgeSelectOneAction *act, GtkWidget *widget)
+static void gr_spread_change(EgeSelectOneAction *act, GtkWidget *widget)
{
if (blocked) {
return;
diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp
index 88fe15dca..51013a2cd 100644
--- a/src/widgets/gradient-vector.cpp
+++ b/src/widgets/gradient-vector.cpp
@@ -377,7 +377,7 @@ unsigned long sp_gradient_to_hhssll(SPGradient *gr)
return ((int)(hsl[0]*100 * 10000)) + ((int)(hsl[1]*100 * 100)) + ((int)(hsl[2]*100 * 1));
}
-GSList *get_all_doc_items(GSList *list, SPObject *from, bool onlyvisible, bool onlysensitive, bool ingroups, GSList const *exclude)
+static GSList *get_all_doc_items(GSList *list, SPObject *from, bool onlyvisible, bool onlysensitive, bool ingroups, GSList const *exclude)
{
for ( SPObject *child = from->firstChild() ; child; child = child->getNext() ) {
if (SP_IS_ITEM(child)) {
diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp
index 6450abf52..5a6e774f5 100644
--- a/src/widgets/paint-selector.cpp
+++ b/src/widgets/paint-selector.cpp
@@ -359,7 +359,7 @@ sp_paint_selector_fillrule_toggled(GtkToggleButton *tb, SPPaintSelector *psel)
}
}
-void
+static void
sp_paint_selector_show_fillrule(SPPaintSelector *psel, bool is_fill)
{
if (psel->fillrulebox) {
@@ -791,7 +791,7 @@ static void sp_psel_pattern_change(GtkWidget * /*widget*/, SPPaintSelector *psel
* Returns a list of patterns in the defs of the given source document as a GSList object
* Returns NULL if there are no patterns in the document.
*/
-GSList *
+static GSList *
ink_pattern_list_get (SPDocument *source)
{
if (source == NULL)
diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp
index 61b04121a..3ccfa9cf9 100644
--- a/src/widgets/select-toolbar.cpp
+++ b/src/widgets/select-toolbar.cpp
@@ -52,6 +52,7 @@
#include "ink-action.h"
#include <2geom/rect.h>
#include "ui/icon-names.h"
+#include "select-toolbar.h"
using Inkscape::UnitTracker;
using Inkscape::DocumentUndo;
diff --git a/src/widgets/shrink-wrap-button.cpp b/src/widgets/shrink-wrap-button.cpp
index fc844f5ec..941a0466c 100644
--- a/src/widgets/shrink-wrap-button.cpp
+++ b/src/widgets/shrink-wrap-button.cpp
@@ -16,6 +16,8 @@
#include <gtkmm/button.h>
#include <gtk/gtk.h>
+#include "shrink-wrap-button.h"
+
namespace Inkscape {
namespace Widgets {
diff --git a/src/widgets/spinbutton-events.cpp b/src/widgets/spinbutton-events.cpp
index 290b0bb75..444aa278e 100644
--- a/src/widgets/spinbutton-events.cpp
+++ b/src/widgets/spinbutton-events.cpp
@@ -20,6 +20,7 @@
#include "sp-widget.h"
#include "widget-sizes.h"
+#include "spinbutton-events.h"
gboolean
spinbutton_focus_in (GtkWidget *w, GdkEventKey */*event*/, gpointer /*data*/)
diff --git a/src/widgets/spw-utilities.cpp b/src/widgets/spw-utilities.cpp
index e7db45581..8adc72cd7 100644
--- a/src/widgets/spw-utilities.cpp
+++ b/src/widgets/spw-utilities.cpp
@@ -24,6 +24,7 @@
#include "selection.h"
#include "helper/unit-menu.h"
+#include "spw-utilities.h"
#include <gtk/gtk.h>
@@ -194,7 +195,7 @@ spw_unit_selector(GtkWidget * dialog, GtkWidget * table,
return sb;
}
-void
+static void
sp_set_font_size_recursive (GtkWidget *w, gpointer font)
{
guint size = GPOINTER_TO_UINT (font);
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index 60ede002f..352276b21 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -1087,7 +1087,7 @@ static void sp_text_orientation_mode_changed( EgeSelectOneAction *act, GObject *
/*
* Set the default list of font sizes, scaled to the users preferred unit
*/
-void sp_text_set_sizes(GtkListStore* model_size, int unit)
+static void sp_text_set_sizes(GtkListStore* model_size, int unit)
{
gtk_list_store_clear(model_size);
@@ -1434,7 +1434,7 @@ static void sp_text_toolbox_selection_modified(Inkscape::Selection *selection, g
sp_text_toolbox_selection_changed (selection, tbl);
}
-void
+static void
sp_text_toolbox_subselection_changed (gpointer /*tc*/, GObject *tbl)
{
sp_text_toolbox_selection_changed (NULL, tbl);
diff --git a/src/xml/node-fns.cpp b/src/xml/node-fns.cpp
index 20e9fbc38..eb3870978 100644
--- a/src/xml/node-fns.cpp
+++ b/src/xml/node-fns.cpp
@@ -9,6 +9,7 @@
#include "xml/node-iterators.h"
#include "util/find-if-before.h"
+#include "node-fns.h"
namespace Inkscape {
namespace XML {
diff --git a/src/xml/quote.cpp b/src/xml/quote.cpp
index 51f9ffb97..030a6c764 100644
--- a/src/xml/quote.cpp
+++ b/src/xml/quote.cpp
@@ -13,6 +13,7 @@
#include <cstring>
#include <glib.h>
+#include "quote.h"
/** \return strlen(xml_quote_strdup(\a val)) (without doing the malloc).
diff --git a/src/xml/repr-sorting.cpp b/src/xml/repr-sorting.cpp
index fd485925b..09a39acb2 100644
--- a/src/xml/repr-sorting.cpp
+++ b/src/xml/repr-sorting.cpp
@@ -2,6 +2,7 @@
#include "util/longest-common-suffix.h"
#include "xml/repr.h"
#include "xml/node-iterators.h"
+#include "repr-sorting.h"
static bool same_repr(Inkscape::XML::Node const &a, Inkscape::XML::Node const &b)
{
diff --git a/src/xml/repr-util.cpp b/src/xml/repr-util.cpp
index 5b8ab12ae..7e9f9c484 100644
--- a/src/xml/repr-util.cpp
+++ b/src/xml/repr-util.cpp
@@ -75,7 +75,7 @@ static char *sp_xml_ns_auto_prefix(char const *uri);
/**
* Locale-independent double to string conversion
*/
-unsigned int sp_xml_dtoa(gchar *buf, double val, unsigned int tprec, unsigned int fprec, unsigned int padf)
+static unsigned int sp_xml_dtoa(gchar *buf, double val, unsigned int tprec, unsigned int fprec, unsigned int padf)
{
double dival, fval, epsilon;
int idigits, ival, i;