From d2f111fca7949aee688d31dce49d2afe92b6b6b0 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 25 Nov 2007 06:05:06 +0000 Subject: [PATCH] Require gtk-doc 1.8. 2007-11-25 Matthias Clasen * configure.in: Require gtk-doc 1.8. * glib/gasyncqueue.c: * glib/gdate.c: * glib/gfileutils.c: * glib/gmain.c: * glib/gmarkup.c: * glib/gregex.c: * glib/gtestutils.c: * glib/gutils.c: Use gtk-doc abbreviations for examples in doc comments. svn path=/trunk/; revision=5933 --- ChangeLog | 14 ++++++++++++++ configure.in | 2 +- glib/gasyncqueue.c | 4 ++-- glib/gdate.c | 4 ++-- glib/gfileutils.c | 14 +++++++------- glib/gmain.c | 8 ++++---- glib/gmarkup.c | 4 ++-- glib/gregex.c | 8 ++++---- glib/gtestutils.c | 4 ++-- glib/gutils.c | 19 +++++++------------ 10 files changed, 45 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5746d0425..b4e0abca4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2007-11-25 Matthias Clasen + + * configure.in: Require gtk-doc 1.8. + + * glib/gasyncqueue.c: + * glib/gdate.c: + * glib/gfileutils.c: + * glib/gmain.c: + * glib/gmarkup.c: + * glib/gregex.c: + * glib/gtestutils.c: + * glib/gutils.c: Use gtk-doc abbreviations for + examples in doc comments. + 2007-11-24 Matthias Clasen * */Makefile.am: Replace INCLUDES by AM_CPPFLAGS, other diff --git a/configure.in b/configure.in index adc3ab520..86512d6e9 100644 --- a/configure.in +++ b/configure.in @@ -2299,7 +2299,7 @@ dnl ************************** dnl *** Checks for gtk-doc *** dnl ************************** -GTK_DOC_CHECK([1.4]) +GTK_DOC_CHECK([1.8]) AC_ARG_ENABLE(man, [AC_HELP_STRING([--enable-man], diff --git a/glib/gasyncqueue.c b/glib/gasyncqueue.c index 646efd261..dbaebde59 100644 --- a/glib/gasyncqueue.c +++ b/glib/gasyncqueue.c @@ -565,7 +565,7 @@ g_async_queue_length_unlocked (GAsyncQueue* queue) * * If you were sorting a list of priority numbers to make sure the * lowest priority would be at the top of the queue, you could use: - * + * |[ * gint32 id1; * gint32 id2; * @@ -573,7 +573,7 @@ g_async_queue_length_unlocked (GAsyncQueue* queue) * id2 = GPOINTER_TO_INT (element2); * * return (id1 > id2 ? +1 : id1 == id2 ? 0 : -1); - * + * ]| * * Since: 2.10 **/ diff --git a/glib/gdate.c b/glib/gdate.c index 2224fe332..2b4bebf37 100644 --- a/glib/gdate.c +++ b/glib/gdate.c @@ -864,9 +864,9 @@ g_date_set_parse (GDate *d, * Sets the value of a date from a time_t value. * * To set the value of a date to the current day, you could write: - * + * |[ * g_date_set_time_t (date, time (NULL)); - * + * ]| * * Since: 2.10 */ diff --git a/glib/gfileutils.c b/glib/gfileutils.c index 040ed7bc0..5025b3aef 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -154,14 +154,14 @@ g_mkdir_with_parents (const gchar *pathname, * For example, you might think you could use %G_FILE_TEST_IS_SYMLINK * to know whether it is is safe to write to a file without being * tricked into writing into a different location. It doesn't work! - * - * + * |[ * /* DON'T DO THIS */ - * if (!g_file_test (filename, G_FILE_TEST_IS_SYMLINK)) { - * fd = g_open (filename, O_WRONLY); - * /* write to fd */ - * } - * + * if (!g_file_test (filename, G_FILE_TEST_IS_SYMLINK)) + * { + * fd = g_open (filename, O_WRONLY); + * /* write to fd */ + * } + * ]| * * Another thing to note is that %G_FILE_TEST_EXISTS and * %G_FILE_TEST_IS_EXECUTABLE are implemented using the access() diff --git a/glib/gmain.c b/glib/gmain.c index 52b1c21eb..74a3c800b 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -1897,7 +1897,7 @@ g_main_current_source (void) * from within idle handlers, but may have freed the object * before the dispatch of your idle handler. * - * + * |[ * static gboolean * idle_callback (gpointer data) * { @@ -1927,7 +1927,7 @@ g_main_current_source (void) * * G_OBJECT_CLASS (parent_class)->finalize (object); * } - * + * ]| * * This will fail in a multi-threaded application if the * widget is destroyed before the idle handler fires due @@ -1935,7 +1935,7 @@ g_main_current_source (void) * this particular problem, is to check to if the source * has already been destroy within the callback. * - * + * |[ * static gboolean * idle_callback (gpointer data) * { @@ -1950,7 +1950,7 @@ g_main_current_source (void) * * return FALSE; * } - * + * ]| * * Return value: %TRUE if the source has been destroyed * diff --git a/glib/gmarkup.c b/glib/gmarkup.c index ca6c4453d..2399c70ec 100644 --- a/glib/gmarkup.c +++ b/glib/gmarkup.c @@ -2296,7 +2296,7 @@ g_markup_vprintf_escaped (const char *format, * output, without having to worry that the strings * might themselves contain markup. * - * + * |[ * const char *store = "Fortnum & Mason"; * const char *item = "Tea"; * char *output; @@ -2306,7 +2306,7 @@ g_markup_vprintf_escaped (const char *format, * "<item>%s</item>" * "</purchase>", * store, item); - * + * ]| * * Return value: newly allocated result from formatting * operation. Free with g_free(). diff --git a/glib/gregex.c b/glib/gregex.c index b5bc6a1ca..227fcfd2a 100644 --- a/glib/gregex.c +++ b/glib/gregex.c @@ -1103,7 +1103,7 @@ g_regex_match_simple (const gchar *pattern, * To retrieve all the non-overlapping matches of the pattern in * string you can use g_match_info_next(). * - * + * |[ * static void * print_uppercase_words (const gchar *string) * { @@ -1123,7 +1123,7 @@ g_regex_match_simple (const gchar *pattern, * g_match_info_free (match_info); * g_regex_unref (regex); * } - * + * ]| * * Returns: %TRUE is the string matched, %FALSE otherwise * @@ -1172,7 +1172,7 @@ g_regex_match (const GRegex *regex, * To retrieve all the non-overlapping matches of the pattern in * string you can use g_match_info_next(). * - * + * |[ * static void * print_uppercase_words (const gchar *string) * { @@ -1198,7 +1198,7 @@ g_regex_match (const GRegex *regex, * g_error_free (error); * } * } - * + * ]| * * Returns: %TRUE is the string matched, %FALSE otherwise * diff --git a/glib/gtestutils.c b/glib/gtestutils.c index 8335a5892..4543017fb 100644 --- a/glib/gtestutils.c +++ b/glib/gtestutils.c @@ -1275,7 +1275,7 @@ test_time_stamp (void) * The forking parent process then asserts successfull child program * termination and validates cihld program outputs. * - * + * |[ * static void * test_fork_patterns (void) * { @@ -1289,7 +1289,7 @@ test_time_stamp (void) * g_test_trap_assert_stdout ("*somagic17*"); * g_test_trap_assert_stderr ("*semagic43*"); * } - * + * ]| * * Returns: %TRUE for the forked child and %FALSE for the executing parent process. */ diff --git a/glib/gutils.c b/glib/gutils.c index 1e3b4fbbd..dd9d0e1b5 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include /* For tolower() */ @@ -1781,11 +1782,11 @@ g_get_real_name (void) * g_get_homedir() not pay attention to HOME and to * return the real home directory for the user. If applications * want to pay attention to HOME, they can do: - * + * |[ * const char *homedir = g_getenv ("HOME"); * if (!homedir) * homedir = g_get_homedir (); - * + * ]| * * Returns: the current user's home directory */ @@ -3130,10 +3131,6 @@ _g_utils_thread_init (void) g_get_language_names (); } -#ifdef ENABLE_NLS - -#include - #ifdef G_OS_WIN32 /** @@ -3182,11 +3179,11 @@ _glib_gettext (const gchar *str) if (!_glib_gettext_initialized) { #ifdef G_OS_WIN32 - gchar *tmp = _glib_get_locale_dir(); - bindtextdomain(GETTEXT_PACKAGE, tmp); - g_free(tmp); + gchar *tmp = _glib_get_locale_dir (); + bindtextdomain (GETTEXT_PACKAGE, tmp); + g_free (tmp); #else - bindtextdomain(GETTEXT_PACKAGE, GLIB_LOCALE_DIR); + bindtextdomain (GETTEXT_PACKAGE, GLIB_LOCALE_DIR); #endif # ifdef HAVE_BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); @@ -3197,8 +3194,6 @@ _glib_gettext (const gchar *str) return dgettext (GETTEXT_PACKAGE, str); } -#endif /* ENABLE_NLS */ - #ifdef G_OS_WIN32 /* Binary compatibility versions. Not for newly compiled code. */