[vte] Do some symbol hiding



commit 296a3cbaf6b69555f7d6cdc639dc57c51f2e2bba
Author: Behdad Esfahbod <behdad behdad org>
Date:   Thu Sep 17 10:54:15 2009 -0400

    Do some symbol hiding

 configure.in        |   11 ++++++
 src/caps.c          |    4 +-
 src/caps.h          |    6 ++--
 src/debug.c         |    2 +-
 src/debug.h         |    4 +-
 src/iso2022.h       |   29 +++++++--------
 src/keymap.h        |   46 ++++++++++++------------
 src/matcher.h       |   18 +++++-----
 src/ring.h          |   20 +++++-----
 src/table.c         |    2 +-
 src/table.h         |   20 +++++-----
 src/trie.c          |    2 +-
 src/trie.h          |   26 +++++++-------
 src/vte-private.h   |   64 +++++++++++++++++-----------------
 src/vtebg.h         |   14 ++++----
 src/vteconv.h       |   28 +++++++-------
 src/vtedraw.c       |    2 +-
 src/vtedraw.h       |   96 +++++++++++++++++++++++++-------------------------
 src/vteint.h        |   12 +++---
 src/vtepangocairo.c |    2 +-
 src/vtepangocairo.h |    2 +-
 src/vteregex.h      |    8 ++--
 src/vterowdata.h    |   18 +++++-----
 src/vteskel.c       |    2 +-
 src/vteskel.h       |    2 +-
 src/vtestream.h     |   15 ++++----
 src/vtetc.c         |    2 +
 src/vtetc.h         |   24 ++++++------
 src/vtetree.c       |    2 +
 src/vtetree.h       |    8 ++--
 src/vteunistr.h     |    8 ++--
 31 files changed, 256 insertions(+), 243 deletions(-)
---
diff --git a/configure.in b/configure.in
index f1cbe25..2cea9b7 100644
--- a/configure.in
+++ b/configure.in
@@ -477,6 +477,17 @@ AC_SUBST([VTE_MICRO_VERSION],[vte_version_micro])
 
 ################################################################################
 
+AH_VERBATIM([SINGLE_FILE_BUILD], [
+#ifndef VTE_EXTERN
+#define VTE_EXTERN extern G_GNUC_INTERNAL
+#endif
+#ifndef VTE_STATIC
+#define VTE_STATIC G_GNUC_INTERNAL
+#endif
+])
+
+################################################################################
+
 AC_CONFIG_FILES([
 Makefile
 src/Makefile
diff --git a/src/caps.c b/src/caps.c
index 0f2c95b..a175696 100644
--- a/src/caps.c
+++ b/src/caps.c
@@ -41,7 +41,7 @@
 
 /* This list combined from the Linux termcap(5) man page, and
  * termcap_&_terminfo by Strang, Mui, and O'Reilly. */
-struct _vte_capability_quark _vte_terminal_capability_strings[] = {
+VTE_STATIC struct _vte_capability_quark _vte_terminal_capability_strings[] = {
 	{"!1", TRUE, 0},
 	{"!2", TRUE, 0},
 	{"!3", TRUE, 0},
@@ -362,7 +362,7 @@ struct _vte_capability_quark _vte_terminal_capability_strings[] = {
 
 /* From some really old XTerm docs we had at the office, and an updated
  * version at Moy, Gildea, and Dickey. */
-struct _vte_capability_string _vte_xterm_capability_strings[] = {
+VTE_STATIC struct _vte_capability_string _vte_xterm_capability_strings[] = {
 	{ENQ, "return-terminal-status", 0},
 	{VT,  "vertical-tab", 0},
 	{FF,  "form-feed", 0},
diff --git a/src/caps.h b/src/caps.h
index e74e35f..31f17c3 100644
--- a/src/caps.h
+++ b/src/caps.h
@@ -49,13 +49,13 @@ struct _vte_capability_string {
 };
 
 /* The known capability strings in termcap entries, terminated by NULLs. */
-extern struct _vte_capability_quark _vte_terminal_capability_strings[];
+VTE_EXTERN struct _vte_capability_quark _vte_terminal_capability_strings[];
 
 /* The xterm-specific terminal control strings, terminated by NULLs. */
-extern struct _vte_capability_string _vte_xterm_capability_strings[];
+VTE_EXTERN struct _vte_capability_string _vte_xterm_capability_strings[];
 
 /* Initialize the Quarks in the various tables. */
-void _vte_capability_init(void);
+VTE_STATIC void _vte_capability_init(void);
 
 G_END_DECLS
 
diff --git a/src/debug.c b/src/debug.c
index 2810087..49f669e 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -21,7 +21,7 @@
 #include <glib.h>
 #include "debug.h"
 
-VteDebugFlags _vte_debug_flags;
+VTE_STATIC VteDebugFlags _vte_debug_flags;
 
 void
 _vte_debug_init(void)
diff --git a/src/debug.h b/src/debug.h
index b9d23c6..36d8b96 100644
--- a/src/debug.h
+++ b/src/debug.h
@@ -52,9 +52,9 @@ typedef enum {
 	VTE_DEBUG_WIDGET_SIZE   = 1 << 21
 } VteDebugFlags;
 
-void _vte_debug_init(void);
+VTE_STATIC void _vte_debug_init(void);
 
-extern VteDebugFlags _vte_debug_flags;
+VTE_EXTERN VteDebugFlags _vte_debug_flags;
 static inline gboolean _vte_debug_on(VteDebugFlags flags) G_GNUC_CONST G_GNUC_UNUSED;
 
 static inline gboolean
diff --git a/src/iso2022.h b/src/iso2022.h
index cb54f81..d3a41db 100644
--- a/src/iso2022.h
+++ b/src/iso2022.h
@@ -32,26 +32,25 @@ G_BEGIN_DECLS
 struct _vte_iso2022_state;
 typedef void (*_vte_iso2022_codeset_changed_cb_fn)(struct _vte_iso2022_state *,
 						   gpointer);
-struct _vte_iso2022_state *_vte_iso2022_state_new(const char *native_codeset,
-						  _vte_iso2022_codeset_changed_cb_fn,
-						  gpointer);
-void _vte_iso2022_state_set_codeset(struct _vte_iso2022_state *state,
-				    const char *codeset);
-const char *_vte_iso2022_state_get_codeset(struct _vte_iso2022_state *state);
-gsize _vte_iso2022_process(struct _vte_iso2022_state *state,
-			  guchar *input, gsize length,
-			  GArray *gunichars);
-gunichar _vte_iso2022_process_single(struct _vte_iso2022_state *state,
-				     gunichar c, gunichar map);
-void _vte_iso2022_state_free(struct _vte_iso2022_state *);
+VTE_STATIC struct _vte_iso2022_state *_vte_iso2022_state_new(const char *native_codeset,
+							     _vte_iso2022_codeset_changed_cb_fn,
+							     gpointer);
+VTE_STATIC void _vte_iso2022_state_set_codeset(struct _vte_iso2022_state *state,
+					       const char *codeset);
+VTE_STATIC const char *_vte_iso2022_state_get_codeset(struct _vte_iso2022_state *state);
+VTE_STATIC gsize _vte_iso2022_process(struct _vte_iso2022_state *state,
+				      guchar *input, gsize length,
+				      GArray *gunichars);
+VTE_STATIC gunichar _vte_iso2022_process_single(struct _vte_iso2022_state *state,
+					        gunichar c, gunichar map);
+VTE_STATIC void _vte_iso2022_state_free(struct _vte_iso2022_state *);
 
 
 #define VTE_ISO2022_ENCODED_WIDTH_BIT_OFFSET	28
 #define VTE_ISO2022_ENCODED_WIDTH_MASK		(3 << VTE_ISO2022_ENCODED_WIDTH_BIT_OFFSET)
 #define VTE_ISO2022_HAS_ENCODED_WIDTH(__c)	(((__c) & VTE_ISO2022_ENCODED_WIDTH_MASK) != 0)
-int _vte_iso2022_get_encoded_width(gunichar c);
-int _vte_iso2022_unichar_width(struct _vte_iso2022_state *state,
-			       gunichar c);
+VTE_STATIC int _vte_iso2022_get_encoded_width(gunichar c);
+VTE_STATIC int _vte_iso2022_unichar_width(struct _vte_iso2022_state *state, gunichar c);
 
 G_END_DECLS
 
diff --git a/src/keymap.h b/src/keymap.h
index 3a4cefe..7ca135c 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -32,33 +32,33 @@ G_BEGIN_DECLS
 
 /* Map the specified keyval/modifier setup, dependent on the mode, to either
  * a literal string or a capability name. */
-void _vte_keymap_map(guint keyval,
-		     GdkModifierType modifiers,
-		     gboolean sun_mode,
-		     gboolean hp_mode,
-		     gboolean legacy_mode,
-		     gboolean vt220_mode,
-		     gboolean app_cursor_keys,
-		     gboolean app_keypad_keys,
-		     struct _vte_termcap *termcap,
-		     const char *term,
-		     char **normal,
-		     gssize *normal_length,
-		     const char **special);
+VTE_STATIC void _vte_keymap_map(guint keyval,
+				GdkModifierType modifiers,
+				gboolean sun_mode,
+				gboolean hp_mode,
+				gboolean legacy_mode,
+				gboolean vt220_mode,
+				gboolean app_cursor_keys,
+				gboolean app_keypad_keys,
+				struct _vte_termcap *termcap,
+				const char *term,
+				char **normal,
+				gssize *normal_length,
+				const char **special);
 
 /* Return TRUE if a keyval is just a modifier key. */
-gboolean _vte_keymap_key_is_modifier(guint keyval);
+VTE_STATIC gboolean _vte_keymap_key_is_modifier(guint keyval);
 
 /* Add modifiers to the sequence if they're needed. */
-void _vte_keymap_key_add_key_modifiers(guint keyval,
-				       GdkModifierType modifiers,
-				       gboolean sun_mode,
-				       gboolean hp_mode,
-				       gboolean legacy_mode,
-				       gboolean vt220_mode,
-				       gboolean app_cursor_keys,
-				       char **normal,
-				       gssize *normal_length);
+VTE_STATIC void _vte_keymap_key_add_key_modifiers(guint keyval,
+						  GdkModifierType modifiers,
+						  gboolean sun_mode,
+						  gboolean hp_mode,
+						  gboolean legacy_mode,
+						  gboolean vt220_mode,
+						  gboolean app_cursor_keys,
+						  char **normal,
+						  gssize *normal_length);
 
 G_END_DECLS
 
diff --git a/src/matcher.h b/src/matcher.h
index 540cf97..b6654bc 100644
--- a/src/matcher.h
+++ b/src/matcher.h
@@ -53,23 +53,23 @@ struct _vte_matcher_class{
 };
 
 /* Create and init matcher. */
-struct _vte_matcher *_vte_matcher_new(const char *emulation,
-				      struct _vte_termcap *termcap);
+VTE_STATIC struct _vte_matcher *_vte_matcher_new(const char *emulation,
+						 struct _vte_termcap *termcap);
 
 /* Free a matcher. */
-void _vte_matcher_free(struct _vte_matcher *matcher);
+VTE_STATIC void _vte_matcher_free(struct _vte_matcher *matcher);
 
 /* Check if a string matches a sequence the matcher knows about. */
-const char *_vte_matcher_match(struct _vte_matcher *matcher,
-			       const gunichar *pattern, gssize length,
-			       const char **res, const gunichar **consumed,
-			       GQuark *quark, GValueArray **array);
+VTE_STATIC const char *_vte_matcher_match(struct _vte_matcher *matcher,
+					  const gunichar *pattern, gssize length,
+					  const char **res, const gunichar **consumed,
+					  GQuark *quark, GValueArray **array);
 
 /* Dump out the contents of a matcher, mainly for debugging. */
-void _vte_matcher_print(struct _vte_matcher *matcher);
+VTE_STATIC void _vte_matcher_print(struct _vte_matcher *matcher);
 
 /* Free a parameter array. */
-void _vte_matcher_free_params_array(struct _vte_matcher *matcher, GValueArray *params);
+VTE_STATIC void _vte_matcher_free_params_array(struct _vte_matcher *matcher, GValueArray *params);
 
 G_END_DECLS
 
diff --git a/src/ring.h b/src/ring.h
index 9019664..d4ea487 100644
--- a/src/ring.h
+++ b/src/ring.h
@@ -65,16 +65,16 @@ struct _VteRing {
 #define _vte_ring_length(__ring) ((__ring)->end - (__ring)->start)
 #define _vte_ring_next(__ring) ((__ring)->end + 0)
 
-const VteRowData *_vte_ring_index (VteRing *ring, guint position);
-VteRowData *_vte_ring_index_writable (VteRing *ring, guint position);
-
-void _vte_ring_init (VteRing *ring, guint max_rows);
-void _vte_ring_fini (VteRing *ring);
-void _vte_ring_resize (VteRing *ring, guint max_rows);
-void _vte_ring_shrink (VteRing *ring, guint max_len);
-VteRowData *_vte_ring_insert (VteRing *ring, guint position);
-VteRowData *_vte_ring_append (VteRing *ring);
-void _vte_ring_remove (VteRing *ring, guint position);
+VTE_STATIC const VteRowData *_vte_ring_index (VteRing *ring, guint position);
+VTE_STATIC VteRowData *_vte_ring_index_writable (VteRing *ring, guint position);
+
+VTE_STATIC void _vte_ring_init (VteRing *ring, guint max_rows);
+VTE_STATIC void _vte_ring_fini (VteRing *ring);
+VTE_STATIC void _vte_ring_resize (VteRing *ring, guint max_rows);
+VTE_STATIC void _vte_ring_shrink (VteRing *ring, guint max_len);
+VTE_STATIC VteRowData *_vte_ring_insert (VteRing *ring, guint position);
+VTE_STATIC VteRowData *_vte_ring_append (VteRing *ring);
+VTE_STATIC void _vte_ring_remove (VteRing *ring, guint position);
 
 G_END_DECLS
 
diff --git a/src/table.c b/src/table.c
index 24f8766..7b6992c 100644
--- a/src/table.c
+++ b/src/table.c
@@ -923,7 +923,7 @@ main(int argc, char **argv)
 }
 #endif
 
-const struct _vte_matcher_class _vte_matcher_table = {
+VTE_STATIC const struct _vte_matcher_class _vte_matcher_table = {
 	(_vte_matcher_create_func)_vte_table_new,
 	(_vte_matcher_add_func)_vte_table_add,
 	(_vte_matcher_print_func)_vte_table_print,
diff --git a/src/table.h b/src/table.h
index 31989f2..583cf1f 100644
--- a/src/table.h
+++ b/src/table.h
@@ -32,22 +32,22 @@ struct _vte_table;
 struct _vte_table *_vte_table_new(void);
 
 /* Free a table tree. */
-void _vte_table_free(struct _vte_table *table);
+VTE_STATIC void _vte_table_free(struct _vte_table *table);
 
 /* Add a string to the matching tree. */
-void _vte_table_add(struct _vte_table *table,
-		    const char *pattern, gssize length,
-		    const char *result, GQuark quark);
+VTE_STATIC void _vte_table_add(struct _vte_table *table,
+			       const char *pattern, gssize length,
+			       const char *result, GQuark quark);
 
 /* Check if a string matches something in the tree. */
-const char *_vte_table_match(struct _vte_table *table,
-			     const gunichar *pattern, gssize length,
-			     const char **res, const gunichar **consumed,
-			     GQuark *quark, GValueArray **array);
+VTE_STATIC const char *_vte_table_match(struct _vte_table *table,
+					const gunichar *pattern, gssize length,
+					const char **res, const gunichar **consumed,
+					GQuark *quark, GValueArray **array);
 /* Dump out the contents of a tree. */
-void _vte_table_print(struct _vte_table *table);
+VTE_STATIC void _vte_table_print(struct _vte_table *table);
 
-extern const struct _vte_matcher_class _vte_matcher_table;
+VTE_EXTERN const struct _vte_matcher_class _vte_matcher_table;
 
 G_END_DECLS
 
diff --git a/src/trie.c b/src/trie.c
index 7b40a35..d1590c8 100644
--- a/src/trie.c
+++ b/src/trie.c
@@ -1101,7 +1101,7 @@ main(int argc, char **argv)
 }
 #endif
 
-const struct _vte_matcher_class _vte_matcher_trie = {
+VTE_STATIC const struct _vte_matcher_class _vte_matcher_trie = {
 	(_vte_matcher_create_func)_vte_trie_new,
 	(_vte_matcher_add_func)_vte_trie_add,
 	(_vte_matcher_print_func)_vte_trie_print,
diff --git a/src/trie.h b/src/trie.h
index 3e23c2c..b93d8dd 100644
--- a/src/trie.h
+++ b/src/trie.h
@@ -30,16 +30,16 @@ G_BEGIN_DECLS
 struct _vte_trie;
 
 /* Create a new trie structure. */
-struct _vte_trie *_vte_trie_new(void);
+VTE_STATIC struct _vte_trie *_vte_trie_new(void);
 
 /* Free a trie structure. */
-void _vte_trie_free(struct _vte_trie *trie);
+VTE_STATIC void _vte_trie_free(struct _vte_trie *trie);
 
 /* Add a string to the trie, along with its associated result and an optional
  * Quark to store with it. */
-void _vte_trie_add(struct _vte_trie *trie,
-		   const char *pattern, size_t length,
-		   const char *result, GQuark quark);
+VTE_STATIC void _vte_trie_add(struct _vte_trie *trie,
+			      const char *pattern, size_t length,
+			      const char *result, GQuark quark);
 
 /* See if a given pattern of a given length is in the trie.  The result is
  * returned both as the result of the function, and in the pointer res (if
@@ -48,17 +48,17 @@ void _vte_trie_add(struct _vte_trie *trie,
  * empty string is returned for the answer.  If no match is found, and the
  * passed-in string can not be an initial substring of one of the strings in
  * the trie, then NULL is returned. */
-const char *_vte_trie_match(struct _vte_trie *trie,
-			    const gunichar *pattern, size_t length,
-			    const char **res,
-			    const gunichar **consumed,
-			    GQuark *quark,
-			    GValueArray **array);
+VTE_STATIC const char *_vte_trie_match(struct _vte_trie *trie,
+				       const gunichar *pattern, size_t length,
+				       const char **res,
+				       const gunichar **consumed,
+				       GQuark *quark,
+				       GValueArray **array);
 
 /* Print the contents of the trie (mainly for diagnostic purposes). */
-void _vte_trie_print(struct _vte_trie *trie);
+VTE_STATIC void _vte_trie_print(struct _vte_trie *trie);
 
-extern const struct _vte_matcher_class _vte_matcher_trie;
+VTE_EXTERN const struct _vte_matcher_class _vte_matcher_trie;
 
 G_END_DECLS
 
diff --git a/src/vte-private.h b/src/vte-private.h
index 594b44d..4de4d17 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -386,41 +386,41 @@ struct _VteTerminalPrivate {
 
 
 VteRowData *_vte_terminal_ensure_row(VteTerminal *terminal);
-void _vte_terminal_set_pointer_visible(VteTerminal *terminal, gboolean visible);
-void _vte_invalidate_all(VteTerminal *terminal);
-void _vte_invalidate_cells(VteTerminal *terminal,
-			   glong column_start, gint column_count,
-			   glong row_start, gint row_count);
-void _vte_invalidate_cell(VteTerminal *terminal, glong col, glong row);
-void _vte_invalidate_cursor_once(VteTerminal *terminal, gboolean periodic);
+VTE_STATIC  void _vte_terminal_set_pointer_visible(VteTerminal *terminal, gboolean visible);
+VTE_STATIC  void _vte_invalidate_all(VteTerminal *terminal);
+VTE_STATIC  void _vte_invalidate_cells(VteTerminal *terminal,
+				       glong column_start, gint column_count,
+				       glong row_start, gint row_count);
+VTE_STATIC  void _vte_invalidate_cell(VteTerminal *terminal, glong col, glong row);
+VTE_STATIC  void _vte_invalidate_cursor_once(VteTerminal *terminal, gboolean periodic);
 VteRowData * _vte_new_row_data(VteTerminal *terminal);
-void _vte_terminal_adjust_adjustments(VteTerminal *terminal);
-void _vte_terminal_queue_contents_changed(VteTerminal *terminal);
-void _vte_terminal_emit_text_deleted(VteTerminal *terminal);
-void _vte_terminal_emit_text_inserted(VteTerminal *terminal);
-void _vte_terminal_cursor_down (VteTerminal *terminal);
-gboolean _vte_terminal_insert_char(VteTerminal *terminal, gunichar c,
-			       gboolean force_insert_mode,
-			       gboolean invalidate_cells);
-void _vte_terminal_scroll_region(VteTerminal *terminal,
-				 long row, glong count, glong delta);
-void _vte_terminal_set_default_attributes(VteTerminal *terminal);
-void _vte_terminal_clear_tabstop(VteTerminal *terminal, int column);
-gboolean _vte_terminal_get_tabstop(VteTerminal *terminal, int column);
-void _vte_terminal_set_tabstop(VteTerminal *terminal, int column);
-void _vte_terminal_update_insert_delta(VteTerminal *terminal);
-void _vte_terminal_cleanup_tab_fragments_at_cursor (VteTerminal *terminal);
-void _vte_terminal_audible_beep(VteTerminal *terminal);
-void _vte_terminal_visible_beep(VteTerminal *terminal);
-void _vte_terminal_beep(VteTerminal *terminal);
-
-void _vte_terminal_inline_error_message(VteTerminal *terminal, const char *format, ...) G_GNUC_PRINTF(2,3);
+VTE_STATIC  void _vte_terminal_adjust_adjustments(VteTerminal *terminal);
+VTE_STATIC  void _vte_terminal_queue_contents_changed(VteTerminal *terminal);
+VTE_STATIC  void _vte_terminal_emit_text_deleted(VteTerminal *terminal);
+VTE_STATIC  void _vte_terminal_emit_text_inserted(VteTerminal *terminal);
+VTE_STATIC  void _vte_terminal_cursor_down (VteTerminal *terminal);
+VTE_STATIC  gboolean _vte_terminal_insert_char(VteTerminal *terminal, gunichar c,
+					       gboolean force_insert_mode,
+					       gboolean invalidate_cells);
+VTE_STATIC  void _vte_terminal_scroll_region(VteTerminal *terminal,
+					     long row, glong count, glong delta);
+VTE_STATIC  void _vte_terminal_set_default_attributes(VteTerminal *terminal);
+VTE_STATIC  void _vte_terminal_clear_tabstop(VteTerminal *terminal, int column);
+VTE_STATIC  gboolean _vte_terminal_get_tabstop(VteTerminal *terminal, int column);
+VTE_STATIC  void _vte_terminal_set_tabstop(VteTerminal *terminal, int column);
+VTE_STATIC  void _vte_terminal_update_insert_delta(VteTerminal *terminal);
+VTE_STATIC  void _vte_terminal_cleanup_tab_fragments_at_cursor (VteTerminal *terminal);
+VTE_STATIC  void _vte_terminal_audible_beep(VteTerminal *terminal);
+VTE_STATIC  void _vte_terminal_visible_beep(VteTerminal *terminal);
+VTE_STATIC  void _vte_terminal_beep(VteTerminal *terminal);
+
+VTE_STATIC  void _vte_terminal_inline_error_message(VteTerminal *terminal, const char *format, ...) G_GNUC_PRINTF(2,3);
 
 /* vteseq.c: */
-void _vte_terminal_handle_sequence(VteTerminal *terminal,
-				   const char *match_s,
-				   GQuark match,
-				   GValueArray *params);
+VTE_STATIC  void _vte_terminal_handle_sequence(VteTerminal *terminal,
+					       const char *match_s,
+					       GQuark match,
+					       GValueArray *params);
 
 G_END_DECLS
 
diff --git a/src/vtebg.h b/src/vtebg.h
index cd36ed4..8be2eee 100644
--- a/src/vtebg.h
+++ b/src/vtebg.h
@@ -48,9 +48,9 @@ struct _VteBgClass {
 #define VTE_IS_BG_CLASS(klass) G_TYPE_CHECK_CLASS_TYPE((klass), VTE_TYPE_BG)
 #define VTE_BG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), VTE_TYPE_BG, VteBgClass))
 
-GType vte_bg_get_type(void);
+VTE_STATIC GType vte_bg_get_type(void);
 
-VteBg *vte_bg_get_for_screen(GdkScreen *screen);
+VTE_STATIC VteBg *vte_bg_get_for_screen(GdkScreen *screen);
 
 enum VteBgSourceType {
 	VTE_BG_SOURCE_NONE,
@@ -59,11 +59,11 @@ enum VteBgSourceType {
 	VTE_BG_SOURCE_FILE
 };
 
-GdkPixmap *vte_bg_get_pixmap(VteBg *bg, enum VteBgSourceType source_type,
-			     GdkPixbuf *source_pixbuf,
-			     const char *source_file,
-			     const GdkColor *tint, double saturation,
-			     GdkColormap *colormap);
+VTE_STATIC GdkPixmap *vte_bg_get_pixmap(VteBg *bg, enum VteBgSourceType source_type,
+				        GdkPixbuf *source_pixbuf,
+				        const char *source_file,
+				        const GdkColor *tint, double saturation,
+				        GdkColormap *colormap);
 
 G_END_DECLS
 
diff --git a/src/vteconv.h b/src/vteconv.h
index 88485ae..26d33a8 100644
--- a/src/vteconv.h
+++ b/src/vteconv.h
@@ -32,20 +32,20 @@ G_BEGIN_DECLS
 struct _VteConv;
 typedef struct _VteConv *VteConv;
 
-VteConv _vte_conv_open(const char *target, const char *source);
-size_t _vte_conv(VteConv converter,
-		 const guchar **inbuf, gsize *inbytes_left,
-		 guchar **outbuf, gsize *outbytes_left);
-size_t _vte_conv_uc(VteConv converter,
-		    const gunichar **inbuf, gsize *inbytes_left,
-		    guchar **outbuf, gsize *outbytes_left);
-size_t _vte_conv_uu(VteConv converter,
-		    const gunichar **inbuf, gsize *inbytes_left,
-		    gunichar **outbuf, gsize *outbytes_left);
-size_t _vte_conv_cu(VteConv converter,
-		    const guchar **inbuf, gsize *inbytes_left,
-		    gunichar **outbuf, gsize *outbytes_left);
-gint _vte_conv_close(VteConv converter);
+VTE_STATIC VteConv _vte_conv_open(const char *target, const char *source);
+VTE_STATIC size_t _vte_conv(VteConv converter,
+			    const guchar **inbuf, gsize *inbytes_left,
+			    guchar **outbuf, gsize *outbytes_left);
+VTE_STATIC size_t _vte_conv_uc(VteConv converter,
+			       const gunichar **inbuf, gsize *inbytes_left,
+			       guchar **outbuf, gsize *outbytes_left);
+VTE_STATIC size_t _vte_conv_uu(VteConv converter,
+			       const gunichar **inbuf, gsize *inbytes_left,
+			       gunichar **outbuf, gsize *outbytes_left);
+VTE_STATIC size_t _vte_conv_cu(VteConv converter,
+			       const guchar **inbuf, gsize *inbytes_left,
+			       gunichar **outbuf, gsize *outbytes_left);
+VTE_STATIC gint _vte_conv_close(VteConv converter);
 
 G_END_DECLS
 
diff --git a/src/vtedraw.c b/src/vtedraw.c
index 1eeeb9b..2bff521 100644
--- a/src/vtedraw.c
+++ b/src/vtedraw.c
@@ -281,7 +281,7 @@ _vte_draw_clear (struct _vte_draw *draw, gint x, gint y, gint width, gint height
 	_vte_debug_print (VTE_DEBUG_DRAW, "draw_clear (%d, %d, %d, %d)\n",
 			  x,y,width, height);
 
-	draw->impl->clear (draw, x, y, width, height);
+	(draw->impl->clear) (draw, x, y, width, height);
 }
 
 void
diff --git a/src/vtedraw.h b/src/vtedraw.h
index cfdbdef..17bca14 100644
--- a/src/vtedraw.h
+++ b/src/vtedraw.h
@@ -115,61 +115,61 @@ struct _vte_draw {
 };
 
 /* Create and destroy a draw structure. */
-struct _vte_draw *_vte_draw_new(GtkWidget *widget);
-void _vte_draw_free(struct _vte_draw *draw);
+VTE_STATIC  struct _vte_draw *_vte_draw_new(GtkWidget *widget);
+VTE_STATIC  void _vte_draw_free(struct _vte_draw *draw);
 
 /* Get the visual and colormap the draw structure desires.  Certain draw
    implementations may require that this visual/colormap pair be used when
    creating a window, and may fail otherwise. */
-GdkVisual *_vte_draw_get_visual(struct _vte_draw *draw);
-GdkColormap *_vte_draw_get_colormap(struct _vte_draw *draw,
-				    gboolean maybe_use_default);
+VTE_STATIC  GdkVisual *_vte_draw_get_visual(struct _vte_draw *draw);
+VTE_STATIC  GdkColormap *_vte_draw_get_colormap(struct _vte_draw *draw,
+						gboolean maybe_use_default);
 
 /* Begin and end a drawing operation.  If anything is buffered locally, it is
    flushed to the window system when _end() is called. */
-void _vte_draw_start(struct _vte_draw *draw);
-void _vte_draw_end(struct _vte_draw *draw);
-
-void _vte_draw_set_background_solid(struct _vte_draw *draw,
-				    GdkColor *color,
-				    guint16 opacity);
-void _vte_draw_set_background_image(struct _vte_draw *draw,
-				    enum VteBgSourceType type,
-				    GdkPixbuf *pixbuf,
-				    const char *file,
-				    const GdkColor *color,
-				    double saturation);
-void _vte_draw_set_background_scroll(struct _vte_draw *draw,
-				     gint x, gint y);
-
-gboolean _vte_draw_clip(struct _vte_draw *draw, GdkRegion *region);
-gboolean _vte_draw_requires_clear (struct _vte_draw *draw);
-void _vte_draw_clear(struct _vte_draw *draw,
-		     gint x, gint y, gint width, gint height);
-
-void _vte_draw_set_text_font(struct _vte_draw *draw,
-			     const PangoFontDescription *fontdesc,
-			     VteTerminalAntiAlias anti_alias);
-void _vte_draw_get_text_metrics(struct _vte_draw *draw,
-				gint *width, gint *height, gint *ascent);
-int _vte_draw_get_char_width(struct _vte_draw *draw, vteunistr c, int columns,
-			     gboolean bold);
-
-void _vte_draw_text(struct _vte_draw *draw,
-		    struct _vte_draw_text_request *requests, gsize n_requests,
-		    GdkColor *color, guchar alpha, gboolean);
-gboolean _vte_draw_char(struct _vte_draw *draw,
-			struct _vte_draw_text_request *request,
-			GdkColor *color, guchar alpha, gboolean bold);
-gboolean _vte_draw_has_char(struct _vte_draw *draw, vteunistr c, gboolean bold);
-
-
-void _vte_draw_fill_rectangle(struct _vte_draw *draw,
-			      gint x, gint y, gint width, gint height,
-			      GdkColor *color, guchar alpha);
-void _vte_draw_draw_rectangle(struct _vte_draw *draw,
-			      gint x, gint y, gint width, gint height,
-			      GdkColor *color, guchar alpha);
+VTE_STATIC  void _vte_draw_start(struct _vte_draw *draw);
+VTE_STATIC  void _vte_draw_end(struct _vte_draw *draw);
+
+VTE_STATIC  void _vte_draw_set_background_solid(struct _vte_draw *draw,
+						GdkColor *color,
+						guint16 opacity);
+VTE_STATIC  void _vte_draw_set_background_image(struct _vte_draw *draw,
+						enum VteBgSourceType type,
+						GdkPixbuf *pixbuf,
+						const char *file,
+						const GdkColor *color,
+						double saturation);
+VTE_STATIC  void _vte_draw_set_background_scroll(struct _vte_draw *draw,
+						 gint x, gint y);
+
+VTE_STATIC  gboolean _vte_draw_clip(struct _vte_draw *draw, GdkRegion *region);
+VTE_STATIC  gboolean _vte_draw_requires_clear (struct _vte_draw *draw);
+VTE_STATIC  void _vte_draw_clear(struct _vte_draw *draw,
+				 gint x, gint y, gint width, gint height);
+
+VTE_STATIC  void _vte_draw_set_text_font(struct _vte_draw *draw,
+					 const PangoFontDescription *fontdesc,
+					 VteTerminalAntiAlias anti_alias);
+VTE_STATIC  void _vte_draw_get_text_metrics(struct _vte_draw *draw,
+					    gint *width, gint *height, gint *ascent);
+VTE_STATIC  int _vte_draw_get_char_width(struct _vte_draw *draw, vteunistr c, int columns,
+					 gboolean bold);
+
+VTE_STATIC  void _vte_draw_text(struct _vte_draw *draw,
+				struct _vte_draw_text_request *requests, gsize n_requests,
+				GdkColor *color, guchar alpha, gboolean);
+VTE_STATIC  gboolean _vte_draw_char(struct _vte_draw *draw,
+				    struct _vte_draw_text_request *request,
+				    GdkColor *color, guchar alpha, gboolean bold);
+VTE_STATIC  gboolean _vte_draw_has_char(struct _vte_draw *draw, vteunistr c, gboolean bold);
+
+
+VTE_STATIC  void _vte_draw_fill_rectangle(struct _vte_draw *draw,
+					  gint x, gint y, gint width, gint height,
+					  GdkColor *color, guchar alpha);
+VTE_STATIC  void _vte_draw_draw_rectangle(struct _vte_draw *draw,
+					  gint x, gint y, gint width, gint height,
+					  GdkColor *color, guchar alpha);
 
 G_END_DECLS
 
diff --git a/src/vteint.h b/src/vteint.h
index d7a2af6..cfbfef2 100644
--- a/src/vteint.h
+++ b/src/vteint.h
@@ -24,12 +24,12 @@
 
 G_BEGIN_DECLS
 
-void _vte_terminal_accessible_ref(VteTerminal *terminal);
-char* _vte_terminal_get_selection(VteTerminal *terminal);
-void _vte_terminal_get_start_selection(VteTerminal *terminal, long *x, long *y);
-void _vte_terminal_get_end_selection(VteTerminal *terminal, long *x, long *y);
-void _vte_terminal_select_text(VteTerminal *terminal, long start_x, long start_y, long end_x, long end_y, int start_offset, int end_offset);
-void _vte_terminal_remove_selection(VteTerminal *terminal);
+VTE_STATIC  void _vte_terminal_accessible_ref(VteTerminal *terminal);
+VTE_STATIC  char* _vte_terminal_get_selection(VteTerminal *terminal);
+VTE_STATIC  void _vte_terminal_get_start_selection(VteTerminal *terminal, long *x, long *y);
+VTE_STATIC  void _vte_terminal_get_end_selection(VteTerminal *terminal, long *x, long *y);
+VTE_STATIC  void _vte_terminal_select_text(VteTerminal *terminal, long start_x, long start_y, long end_x, long end_y, int start_offset, int end_offset);
+VTE_STATIC  void _vte_terminal_remove_selection(VteTerminal *terminal);
 
 G_END_DECLS
 
diff --git a/src/vtepangocairo.c b/src/vtepangocairo.c
index 7532c51..a023224 100644
--- a/src/vtepangocairo.c
+++ b/src/vtepangocairo.c
@@ -1117,7 +1117,7 @@ _vte_pangocairo_fill_rectangle (struct _vte_draw *draw,
 	cairo_fill (data->cr);
 }
 
-const struct _vte_draw_impl _vte_draw_pangocairo = {
+VTE_STATIC const struct _vte_draw_impl _vte_draw_pangocairo = {
 	"pangocairo",
 	NULL, /* check */
 	_vte_pangocairo_create,
diff --git a/src/vtepangocairo.h b/src/vtepangocairo.h
index d1abfc7..17948df 100644
--- a/src/vtepangocairo.h
+++ b/src/vtepangocairo.h
@@ -26,7 +26,7 @@
 
 G_BEGIN_DECLS
 
-extern const struct _vte_draw_impl _vte_draw_pangocairo;
+VTE_EXTERN const struct _vte_draw_impl _vte_draw_pangocairo;
 
 G_END_DECLS
 
diff --git a/src/vteregex.h b/src/vteregex.h
index 26fc884..54f7791 100644
--- a/src/vteregex.h
+++ b/src/vteregex.h
@@ -29,10 +29,10 @@ struct _vte_regex_match {
 };
 struct _vte_regex;
 
-struct _vte_regex * _vte_regex_compile(const char *pattern);
-void _vte_regex_free(struct _vte_regex *regex);
-int _vte_regex_exec(struct _vte_regex *regex, const char *string,
-		    gsize nmatch, struct _vte_regex_match *matches);
+VTE_STATIC  struct _vte_regex * _vte_regex_compile(const char *pattern);
+VTE_STATIC  void _vte_regex_free(struct _vte_regex *regex);
+VTE_STATIC  int _vte_regex_exec(struct _vte_regex *regex, const char *string,
+				gsize nmatch, struct _vte_regex_match *matches);
 G_END_DECLS
 
 #endif
diff --git a/src/vterowdata.h b/src/vterowdata.h
index 32bef72..6ff1b25 100644
--- a/src/vterowdata.h
+++ b/src/vterowdata.h
@@ -159,15 +159,15 @@ _vte_row_data_get_writable (VteRowData *row, guint col)
 	return &row->cells[col];
 }
 
-void _vte_row_data_init (VteRowData *row);
-void _vte_row_data_clear (VteRowData *row);
-void _vte_row_data_fini (VteRowData *row);
-gboolean _vte_row_data_ensure (VteRowData *row, guint len);
-void _vte_row_data_insert (VteRowData *row, guint col, const VteCell *cell);
-void _vte_row_data_append (VteRowData *row, const VteCell *cell);
-void _vte_row_data_remove (VteRowData *row, guint col);
-void _vte_row_data_fill (VteRowData *row, const VteCell *cell, guint len);
-void _vte_row_data_shrink (VteRowData *row, guint max_len);
+VTE_STATIC  void _vte_row_data_init (VteRowData *row);
+VTE_STATIC  void _vte_row_data_clear (VteRowData *row);
+VTE_STATIC  void _vte_row_data_fini (VteRowData *row);
+VTE_STATIC  gboolean _vte_row_data_ensure (VteRowData *row, guint len);
+VTE_STATIC  void _vte_row_data_insert (VteRowData *row, guint col, const VteCell *cell);
+VTE_STATIC  void _vte_row_data_append (VteRowData *row, const VteCell *cell);
+VTE_STATIC  void _vte_row_data_remove (VteRowData *row, guint col);
+VTE_STATIC  void _vte_row_data_fill (VteRowData *row, const VteCell *cell, guint len);
+VTE_STATIC  void _vte_row_data_shrink (VteRowData *row, guint max_len);
 
 
 G_END_DECLS
diff --git a/src/vteskel.c b/src/vteskel.c
index 274b6de..9b49bc5 100644
--- a/src/vteskel.c
+++ b/src/vteskel.c
@@ -60,7 +60,7 @@ _vte_skel_fill_rectangle(struct _vte_draw *draw,
 		   x, y, width, height);
 }
 
-const struct _vte_draw_impl _vte_draw_skel = {
+VTE_STATIC const struct _vte_draw_impl _vte_draw_skel = {
 	"null",
 	NULL, /* check */
 	NULL, /* create */
diff --git a/src/vteskel.h b/src/vteskel.h
index e202632..010c11f 100644
--- a/src/vteskel.h
+++ b/src/vteskel.h
@@ -26,7 +26,7 @@
 
 G_BEGIN_DECLS
 
-extern const struct _vte_draw_impl _vte_draw_skel;
+VTE_EXTERN const struct _vte_draw_impl _vte_draw_skel;
 
 G_END_DECLS
 
diff --git a/src/vtestream.h b/src/vtestream.h
index 56df5a0..7ddb6c0 100644
--- a/src/vtestream.h
+++ b/src/vtestream.h
@@ -27,18 +27,17 @@ G_BEGIN_DECLS
 
 typedef struct _VteStream VteStream;
 
-void _vte_stream_reset (VteStream *stream, gsize offset);
-gsize _vte_stream_append (VteStream *stream, const char *data, gsize len);
-gboolean _vte_stream_read (VteStream *stream, gsize offset, char *data, gsize len);
-void _vte_stream_truncate (VteStream *stream, gsize offset);
-void _vte_stream_new_page (VteStream *stream);
-gsize _vte_stream_head (VteStream *stream);
+VTE_STATIC  void _vte_stream_reset (VteStream *stream, gsize offset);
+VTE_STATIC  gsize _vte_stream_append (VteStream *stream, const char *data, gsize len);
+VTE_STATIC  gboolean _vte_stream_read (VteStream *stream, gsize offset, char *data, gsize len);
+VTE_STATIC  void _vte_stream_truncate (VteStream *stream, gsize offset);
+VTE_STATIC  void _vte_stream_new_page (VteStream *stream);
+VTE_STATIC  gsize _vte_stream_head (VteStream *stream);
 
 
 /* Various streams */
 
-VteStream *
-_vte_file_stream_new (void);
+VTE_STATIC VteStream * _vte_file_stream_new (void);
 
 G_END_DECLS
 
diff --git a/src/vtetc.c b/src/vtetc.c
index fe43550..6396ece 100644
--- a/src/vtetc.c
+++ b/src/vtetc.c
@@ -17,6 +17,8 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <config.h>
+
 #include <string.h>
 #include <stdlib.h>
 #include <glib.h>
diff --git a/src/vtetc.h b/src/vtetc.h
index 585ab22..2e28692 100644
--- a/src/vtetc.h
+++ b/src/vtetc.h
@@ -29,33 +29,33 @@ G_BEGIN_DECLS
 struct _vte_termcap;
 
 /* Create a new termcap structure. */
-struct _vte_termcap *_vte_termcap_new(const char *filename);
+VTE_STATIC  struct _vte_termcap *_vte_termcap_new(const char *filename);
 
 /* Free a termcap structure. */
-void _vte_termcap_free(struct _vte_termcap *termcap);
+VTE_STATIC  void _vte_termcap_free(struct _vte_termcap *termcap);
 
 /* Read a boolean capability for a given terminal. */
-gboolean _vte_termcap_find_boolean(struct _vte_termcap *termcap,
-				   const char *tname, const char *cap);
+VTE_STATIC  gboolean _vte_termcap_find_boolean(struct _vte_termcap *termcap,
+					       const char *tname, const char *cap);
 
 /* Read a numeric capability for a given terminal. */
-long _vte_termcap_find_numeric(struct _vte_termcap *termcap, const char *tname,
-			       const char *cap);
+VTE_STATIC  long _vte_termcap_find_numeric(struct _vte_termcap *termcap, const char *tname,
+					   const char *cap);
 
 /* Read a string capability for a given terminal.  The returned string should
  * be freed with g_free(). */
-char *_vte_termcap_find_string(struct _vte_termcap *termcap, const char *tname,
-			       const char *cap);
+VTE_STATIC  char *_vte_termcap_find_string(struct _vte_termcap *termcap, const char *tname,
+					   const char *cap);
 
 /* Read a string capability for a given terminal, and return the length of
  * the result in addition to the result itself.  The returned string should
  * be freed with g_free(). */
-char *_vte_termcap_find_string_length(struct _vte_termcap *termcap,
-				      const char *tname,
-				      const char *cap, gssize *length);
+VTE_STATIC  char *_vte_termcap_find_string_length(struct _vte_termcap *termcap,
+						  const char *tname,
+						  const char *cap, gssize *length);
 
 /* Preprocess a termcap-style string, expanding any escape sequences. */
-void _vte_termcap_strip(const char *termcap, char **stripped, gssize *len);
+VTE_STATIC  void _vte_termcap_strip(const char *termcap, char **stripped, gssize *len);
 
 G_END_DECLS
 
diff --git a/src/vtetree.c b/src/vtetree.c
index c2b8054..f8cc5f4 100644
--- a/src/vtetree.c
+++ b/src/vtetree.c
@@ -18,6 +18,8 @@
 
 /* The interfaces in this file are subject to change at any time. */
 
+#include <config.h>
+
 #include "vtetree.h"
 
 VteTree *
diff --git a/src/vtetree.h b/src/vtetree.h
index 6c78143..2dd8288 100644
--- a/src/vtetree.h
+++ b/src/vtetree.h
@@ -39,10 +39,10 @@ struct _VteTree {
   gpointer array[VTE_TREE_ARRAY_SIZE];
 };
 
-VteTree *_vte_tree_new(GCompareFunc key_compare_func);
-void _vte_tree_destroy(VteTree *tree);
-void _vte_tree_insert(VteTree *tree, gpointer key, gpointer value);
-gpointer _vte_tree_lookup(VteTree *tree, gconstpointer key);
+VTE_STATIC  VteTree *_vte_tree_new(GCompareFunc key_compare_func);
+VTE_STATIC  void _vte_tree_destroy(VteTree *tree);
+VTE_STATIC  void _vte_tree_insert(VteTree *tree, gpointer key, gpointer value);
+VTE_STATIC  gpointer _vte_tree_lookup(VteTree *tree, gconstpointer key);
 /* extend as needed */
 
 G_END_DECLS
diff --git a/src/vteunistr.h b/src/vteunistr.h
index 3c22bee..a5ff1a2 100644
--- a/src/vteunistr.h
+++ b/src/vteunistr.h
@@ -54,10 +54,10 @@ typedef guint32 vteunistr;
  *
  * Returns: the new #vteunistr value
  **/
-vteunistr
+VTE_STATIC  vteunistr
 _vte_unistr_append_unichar (vteunistr s, gunichar c);
 
-gunichar
+VTE_STATIC  gunichar
 _vte_unistr_get_base (vteunistr s);
 
 /**
@@ -68,7 +68,7 @@ _vte_unistr_get_base (vteunistr s);
  * Appends @s to @gs.  This is how one converts a #vteunistr to a
  * traditional string.
  **/
-void
+VTE_STATIC  void
 _vte_unistr_append_to_string (vteunistr s, GString *gs);
 
 /**
@@ -79,7 +79,7 @@ _vte_unistr_append_to_string (vteunistr s, GString *gs);
  *
  * Returns: length of @s in characters.
  **/
-int
+VTE_STATIC  int
 _vte_unistr_strlen (vteunistr s);
 
 G_END_DECLS



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]