summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-10-04 01:47:32 +0000
committerCampbell Barton <ideasman42@gmail.com>2012-10-04 01:47:32 +0000
commit864134765a33823e2040c012ec383bebd7dd5743 (patch)
treec96543a601418602694e3222b11151264e52d96a /src
parentcode cleanup: add own includes to cpp files or make the functions static if t... (diff)
downloadinkscape-864134765a33823e2040c012ec383bebd7dd5743.tar.gz
inkscape-864134765a33823e2040c012ec383bebd7dd5743.zip
code cleanup: make more functions static or include their own headers.
(bzr r11736)
Diffstat (limited to 'src')
-rw-r--r--src/bind/dobinding.cpp2
-rw-r--r--src/bind/javabind.cpp28
-rw-r--r--src/debug/timestamp.cpp1
-rw-r--r--src/dialogs/find.cpp48
-rw-r--r--src/extension/internal/svg.cpp2
-rw-r--r--src/helper/gnome-utils.cpp2
-rw-r--r--src/helper/stock-items.cpp2
-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/ui/dialog/align-and-distribute.cpp4
-rw-r--r--src/ui/dialog/tile.cpp4
-rw-r--r--src/ui/dialog/transformation.cpp2
-rw-r--r--src/widgets/eek-preview.cpp4
-rw-r--r--src/widgets/font-selector.cpp2
-rw-r--r--src/widgets/text-toolbar.cpp4
-rw-r--r--src/xml/quote.cpp1
20 files changed, 78 insertions, 70 deletions
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/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/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/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/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/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/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp
index 67980cdc1..7545a613e 100644
--- a/src/ui/dialog/align-and-distribute.cpp
+++ b/src/ui/dialog/align-and-distribute.cpp
@@ -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/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..bbc218b83 100644
--- a/src/ui/dialog/transformation.cpp
+++ b/src/ui/dialog/transformation.cpp
@@ -42,7 +42,7 @@ 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);
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/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/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).