From: fliep Date: Mon, 30 Mar 2009 21:36:05 +0000 (+0000) Subject: Added 'static' and 'G_GNUC_INTERNAL' to hide all symbols that shouldn't be exported X-Git-Tag: v0.9~428 X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=be17c5d5762dbf66acf50cf0698e63295d47d5cb;p=projects%2Fchimara%2Fchimara.git Added 'static' and 'G_GNUC_INTERNAL' to hide all symbols that shouldn't be exported --- diff --git a/src/abort.c b/src/abort.c index 4ae157a..61234a0 100644 --- a/src/abort.c +++ b/src/abort.c @@ -34,7 +34,7 @@ glk_set_interrupt_handler(void (*func)(void)) /* Internal function: abort this Glk program, freeing resources and calling the user's interrupt handler. */ -void +static void abort_glk() { if(glk_data->interrupt_handler) @@ -69,5 +69,3 @@ check_for_abort() } g_mutex_unlock(glk_data->abort_lock); } - - diff --git a/src/abort.h b/src/abort.h index 1420b96..1ba2bcc 100644 --- a/src/abort.h +++ b/src/abort.h @@ -1,8 +1,8 @@ #ifndef ABORT_H #define ABORT_H -void check_for_abort(); -void signal_abort(); +G_GNUC_INTERNAL void check_for_abort(); +G_GNUC_INTERNAL void signal_abort(); #endif diff --git a/src/charset.h b/src/charset.h index 0a18295..c170e93 100644 --- a/src/charset.h +++ b/src/charset.h @@ -7,12 +7,12 @@ #define PLACEHOLDER_STRING "?" /* Our placeholder character is '?'; other options are possible, like printing "0x7F" or something */ -gchar *convert_latin1_to_utf8(const gchar *s, const gsize len); -gchar *convert_latin1_to_ucs4be_string(const gchar *s, const gsize len); -gchar *convert_utf8_to_latin1(const gchar *s, gsize *bytes_written); -gunichar *convert_utf8_to_ucs4(const gchar *s, glong *items_written); -gchar *convert_ucs4_to_utf8(const gunichar *buf, const glong len); -gchar *convert_ucs4_to_latin1_binary(const gunichar *buf, const glong len); -gchar *convert_ucs4_to_ucs4be_string(const gunichar *buf, const glong len); +G_GNUC_INTERNAL gchar *convert_latin1_to_utf8(const gchar *s, const gsize len); +G_GNUC_INTERNAL gchar *convert_latin1_to_ucs4be_string(const gchar *s, const gsize len); +G_GNUC_INTERNAL gchar *convert_utf8_to_latin1(const gchar *s, gsize *bytes_written); +G_GNUC_INTERNAL gunichar *convert_utf8_to_ucs4(const gchar *s, glong *items_written); +G_GNUC_INTERNAL gchar *convert_ucs4_to_utf8(const gunichar *buf, const glong len); +G_GNUC_INTERNAL gchar *convert_ucs4_to_latin1_binary(const gunichar *buf, const glong len); +G_GNUC_INTERNAL gchar *convert_ucs4_to_ucs4be_string(const gunichar *buf, const glong len); #endif /* CHARSET_H */ diff --git a/src/event.h b/src/event.h index b70491b..7cf80bd 100644 --- a/src/event.h +++ b/src/event.h @@ -7,6 +7,6 @@ #define EVENT_QUEUE_MAX_LENGTH (100) #define evtype_Abort (-1) -void event_throw(glui32 type, winid_t win, glui32 val1, glui32 val2); +G_GNUC_INTERNAL void event_throw(glui32 type, winid_t win, glui32 val1, glui32 val2); #endif diff --git a/src/input.h b/src/input.h index 775a150..e4080fd 100644 --- a/src/input.h +++ b/src/input.h @@ -9,7 +9,8 @@ #include "window.h" #include "event.h" -gboolean on_window_key_press_event(GtkWidget *widget, GdkEventKey *event, winid_t win); -void after_window_insert_text(GtkTextBuffer *textbuffer, GtkTextIter *location, gchar *text, gint len, winid_t win); -void on_input_entry_activate(GtkEntry *input_entry, winid_t win); +G_GNUC_INTERNAL gboolean on_window_key_press_event(GtkWidget *widget, GdkEventKey *event, winid_t win); +G_GNUC_INTERNAL void after_window_insert_text(GtkTextBuffer *textbuffer, GtkTextIter *location, gchar *text, gint len, winid_t win); +G_GNUC_INTERNAL void on_input_entry_activate(GtkEntry *input_entry, winid_t win); + #endif diff --git a/src/magic.h b/src/magic.h index 155882c..406b570 100644 --- a/src/magic.h +++ b/src/magic.h @@ -11,8 +11,8 @@ #define MAGIC_FILEREF 0x46494C45 /* "FILE" */ #define MAGIC_SCHANNEL 0x53434841 /* "SCHA" */ -gboolean magic_is_valid_or_null(const glui32 goodmagic, const glui32 realmagic, const gchar *function); -gboolean magic_is_valid(const void *obj, const glui32 goodmagic, const glui32 realmagic, const gchar *function); +G_GNUC_INTERNAL gboolean magic_is_valid_or_null(const glui32 goodmagic, const glui32 realmagic, const gchar *function); +G_GNUC_INTERNAL gboolean magic_is_valid(const void *obj, const glui32 goodmagic, const glui32 realmagic, const gchar *function); #define VALID_MAGIC(obj, goodmagic, die) \ if( !magic_is_valid(obj, goodmagic, obj->magic, G_STRFUNC) ) die diff --git a/src/stream.h b/src/stream.h index 80df9c9..578b140 100644 --- a/src/stream.h +++ b/src/stream.h @@ -45,6 +45,6 @@ struct glk_stream_struct gchar *filename; /* Displayable filename in UTF-8 for error handling */ }; -strid_t window_stream_new(winid_t window); -void stream_close_common(strid_t str, stream_result_t *result); +G_GNUC_INTERNAL strid_t window_stream_new(winid_t window); +G_GNUC_INTERNAL void stream_close_common(strid_t str, stream_result_t *result); #endif