diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index 5e24cd48cf..cb0dead22e 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -780,6 +780,7 @@ unsigned int wxAuiManager::GetFlags() const } // Convenience function +static bool wxAuiManager_HasLiveResize(wxAuiManager& manager) { // With Core Graphics on Mac, it's not possible to show sash feedback, diff --git a/src/common/dcbase.cpp b/src/common/dcbase.cpp index 0ebb1fd3fc..48d719cbda 100644 --- a/src/common/dcbase.cpp +++ b/src/common/dcbase.cpp @@ -697,11 +697,15 @@ void wxDCImpl::DrawSpline(int n, const wxPoint points[]) // ----------------------------------- spline code ---------------------------------------- +static void wx_quadratic_spline(double a1, double b1, double a2, double b2, double a3, double b3, double a4, double b4); +static void wx_clear_stack(); +static int wx_spline_pop(double *x1, double *y1, double *x2, double *y2, double *x3, double *y3, double *x4, double *y4); +static void wx_spline_push(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4); static bool wx_spline_add_point(double x, double y); diff --git a/src/common/dcsvg.cpp b/src/common/dcsvg.cpp index 76a79736ac..ca44afcac3 100644 --- a/src/common/dcsvg.cpp +++ b/src/common/dcsvg.cpp @@ -121,6 +121,7 @@ wxString wxBrushString(wxColour c, int style = wxBRUSHSTYLE_SOLID) return s; } +static wxString wxGetPenPattern(wxPen& pen) { wxString s; diff --git a/src/common/fdiodispatcher.cpp b/src/common/fdiodispatcher.cpp index 6f0be00973..760899e234 100644 --- a/src/common/fdiodispatcher.cpp +++ b/src/common/fdiodispatcher.cpp @@ -33,6 +33,7 @@ #include "wx/unix/private/epolldispatcher.h" #endif +static wxFDIODispatcher *gs_dispatcher = NULL; // ============================================================================ diff --git a/src/common/imagpcx.cpp b/src/common/imagpcx.cpp index 15bb97daf4..41a3f2d8bb 100644 --- a/src/common/imagpcx.cpp +++ b/src/common/imagpcx.cpp @@ -41,6 +41,7 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxPCXHandler,wxImageHandler); // RLE encoding and decoding //----------------------------------------------------------------------------- +static void RLEencode(unsigned char *p, unsigned int size, wxOutputStream& s) { unsigned int data, last, cont; @@ -84,6 +85,7 @@ void RLEencode(unsigned char *p, unsigned int size, wxOutputStream& s) s.PutC((char) last); } +static void RLEdecode(unsigned char *p, unsigned int size, wxInputStream& s) { // Read 'size' bytes. The PCX official specs say there will be @@ -156,6 +158,7 @@ enum { // Returns wxPCX_OK on success, or an error code otherwise // (see above for error codes) // +static int ReadPCX(wxImage *image, wxInputStream& stream) { unsigned char hdr[128]; // PCX header @@ -303,6 +306,7 @@ int ReadPCX(wxImage *image, wxInputStream& stream) // PCX if possible, and then fall back to 24-bit if there // are more than 256 different colours. // +static int SavePCX(wxImage *image, wxOutputStream& stream) { unsigned char hdr[128]; // PCX header diff --git a/src/common/imagpnm.cpp b/src/common/imagpnm.cpp index b244dc2aaf..de2bab1d76 100644 --- a/src/common/imagpnm.cpp +++ b/src/common/imagpnm.cpp @@ -32,6 +32,7 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxPNMHandler,wxImageHandler); #if wxUSE_STREAMS +static void Skip_Comment(wxInputStream &stream) { wxTextInputStream text_stream(stream); diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index d90989fd89..6f90877e3d 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -4461,6 +4461,7 @@ int wxListMainWindow::GetItemWidthWithImage(wxListItem * item) static wxListCtrlCompare list_ctrl_compare_func_2; static wxIntPtr list_ctrl_compare_data; +static int LINKAGEMODE list_ctrl_compare_func_1( wxListLineData **arg1, wxListLineData **arg2 ) { wxListLineData *line1 = *arg1; diff --git a/src/gtk/animate.cpp b/src/gtk/animate.cpp index 23bfda42ae..afb78b9ca9 100644 --- a/src/gtk/animate.cpp +++ b/src/gtk/animate.cpp @@ -32,6 +32,8 @@ // implementation // ============================================================================ +extern "C" { +static void gdk_pixbuf_area_updated(GdkPixbufLoader *loader, gint WXUNUSED(x), gint WXUNUSED(y), @@ -46,7 +48,7 @@ void gdk_pixbuf_area_updated(GdkPixbufLoader *loader, anim->SetPixbuf(gdk_pixbuf_loader_get_animation(loader)); } } - +} //----------------------------------------------------------------------------- // wxAnimation diff --git a/src/gtk/nativewin.cpp b/src/gtk/nativewin.cpp index 11f266c0a4..03baa60d35 100644 --- a/src/gtk/nativewin.cpp +++ b/src/gtk/nativewin.cpp @@ -83,7 +83,8 @@ void wxNativeWindow::DoDisown() // TODO: we probably need equivalent code for other GDK platforms #ifdef GDK_WINDOWING_X11 -extern "C" GdkFilterReturn +extern "C" { +static GdkFilterReturn wxNativeContainerWindowFilter(GdkXEvent *gdkxevent, GdkEvent *event, gpointer data) @@ -101,6 +102,7 @@ wxNativeContainerWindowFilter(GdkXEvent *gdkxevent, return GDK_FILTER_CONTINUE; } +} #endif // GDK_WINDOWING_X11 diff --git a/src/gtk/popupwin.cpp b/src/gtk/popupwin.cpp index 18ded2d935..1b211db1c4 100644 --- a/src/gtk/popupwin.cpp +++ b/src/gtk/popupwin.cpp @@ -63,6 +63,7 @@ static gint gtk_popup_button_press (GtkWidget *widget, GdkEvent *gdk_event, wxPo //----------------------------------------------------------------------------- extern "C" { +static bool gtk_dialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxPopupWindow *win ) { if (win->IsEnabled()) diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 235b371c46..2ca26fc029 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -444,7 +444,7 @@ extern "C" { // Normal version used for detecting IME input and generating appropriate // events for it. -void +static void wx_insert_text_callback(GtkTextBuffer* buffer, GtkTextIter* WXUNUSED(end), gchar *text, diff --git a/src/gtk/textentry.cpp b/src/gtk/textentry.cpp index b2f3208e63..f6cf2e362c 100644 --- a/src/gtk/textentry.cpp +++ b/src/gtk/textentry.cpp @@ -58,8 +58,8 @@ static unsigned int GetEntryTextLength(GtkEntry* entry) // ============================================================================ // "insert_text" handler for GtkEntry -extern "C" -void +extern "C" { +static void wx_gtk_insert_text_callback(GtkEditable *editable, const gchar * new_text, gint new_text_length, @@ -146,6 +146,7 @@ wx_gtk_insert_text_callback(GtkEditable *editable, g_signal_stop_emission_by_name (editable, "insert_text"); } } +} //----------------------------------------------------------------------------- // clipboard events: "copy-clipboard", "cut-clipboard", "paste-clipboard" diff --git a/src/html/htmlpars.cpp b/src/html/htmlpars.cpp index 943f5ff6b5..8d97ab74f6 100644 --- a/src/html/htmlpars.cpp +++ b/src/html/htmlpars.cpp @@ -539,7 +539,8 @@ struct wxHtmlEntityInfo unsigned code; }; -extern "C" int LINKAGEMODE wxHtmlEntityCompare(const void *key, const void *item) +extern "C" { +static int LINKAGEMODE wxHtmlEntityCompare(const void *key, const void *item) { #if wxUSE_UNICODE_UTF8 return strcmp((char*)key, ((wxHtmlEntityInfo*)item)->name); @@ -547,6 +548,7 @@ extern "C" int LINKAGEMODE wxHtmlEntityCompare(const void *key, const void *item return wxStrcmp((wxChar*)key, ((wxHtmlEntityInfo*)item)->name); #endif } +} wxChar wxHtmlEntitiesParser::GetEntityChar(const wxString& entity) const { diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index fd73dd0a57..28388e758c 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -471,6 +471,7 @@ void wxPGTextCtrlEditor::SetControlStringValue( wxPGProperty* property, wxWindow } +static void wxPGTextCtrlEditor_OnFocus( wxPGProperty* property, wxTextCtrl* tc ) { @@ -957,6 +958,7 @@ void wxPropertyGrid::OnComboItemPaint( const wxPGComboBox* pCb, } } +static bool wxPGChoiceEditor_SetCustomPaintWidth( wxPropertyGrid* propGrid, wxPGComboBox* cb, int cmnVal ) { wxPGProperty* property = propGrid->GetSelectedProperty(); diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 39b185b9b2..3caf24177a 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -348,6 +348,7 @@ bool wxIntProperty::IntToValue( wxVariant& variant, int value, int WXUNUSED(argF // back to it when mode is wxPG_PROPERTY_VALIDATION_SATURATE or wxPG_PROPERTY_VALIDATION_WRAP. // For argument 'value' of type 'double' there is a specialized function (below). // +namespace { template bool NumericValidation( const wxPGProperty* property, T& value, @@ -549,6 +550,7 @@ bool NumericValidation( const wxPGProperty* property, } return true; } +} // namespace #if wxUSE_LONGLONG bool wxIntProperty::DoValidation( const wxPGProperty* property, diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index a9e14037fb..af41437237 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -10105,6 +10105,7 @@ bool wxRichTextTable::Draw(wxDC& dc, wxRichTextDrawingContext& context, const wx } // Helper function for Layout() that clears the space needed by a cell with rowspan > 1 +static int GetRowspanDisplacement(const wxRichTextTable* table, int row, int col, int paddingX, const wxArrayInt& colWidths) { // If one or more cells above-left of this one has rowspan > 1, the affected cells below it @@ -10146,6 +10147,7 @@ int GetRowspanDisplacement(const wxRichTextTable* table, int row, int col, int p } // Helper function for Layout() that expands any cell with rowspan > 1 +static void ExpandCellsWithRowspan(const wxRichTextTable* table, int paddingY, int& bottomY, wxDC& dc, wxRichTextDrawingContext& context, const wxRect& availableSpace, int style) { // This is called when the table's cell layout is otherwise complete. diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 6b3b66b5a8..aac8d1d795 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -688,9 +688,11 @@ extern "C" #ifdef wxHAVE_PTHREAD_CLEANUP // thread exit function + static void wxPthreadCleanup(void *ptr); #endif // wxHAVE_PTHREAD_CLEANUP +static void *wxPthreadStart(void *ptr); } // extern "C" diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index de2e55010e..49f385d131 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -1402,7 +1402,8 @@ bool wxUnsetEnv(const wxString& variable) #include -extern "C" void wxFatalSignalHandler(wxTYPE_SA_HANDLER) +extern "C" { +static void wxFatalSignalHandler(wxTYPE_SA_HANDLER) { if ( wxTheApp ) { @@ -1412,6 +1413,7 @@ extern "C" void wxFatalSignalHandler(wxTYPE_SA_HANDLER) abort(); } +} bool wxHandleFatalExceptions(bool doit) {