From 1c391cc69846713b0406545146ea232efc5f34e2 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sat, 17 Feb 2001 23:30:48 +0000 Subject: include string.h 2001-02-17 Havoc Pennington * gthread.c: include string.h Applied patch from Soeren Sandmann: * testglib.c: const fixes * gwin32.h: format cleanups * gutils.c (g_atexit): constify a variable (g_find_program_in_path): constification (g_basename): G_CONST_RETURN (g_path_skip_root): G_CONST_RETURN (g_getenv): G_CONST_RETURN (g_get_user_name): G_CONST_RETURN (g_get_real_name): G_CONST_RETURN (g_get_home_dir): G_CONST_RETURN (g_get_tmp_dir): G_CONST_RETURN (g_get_prgname): G_CONST_RETURN (_glib_gettext): G_CONST_RETURN * gunicode.h: formatting cleanups * gstrfuncs.c (g_strerror): G_CONST_RETURN (g_strsignal): G_CONST_RETURN * gspawn.c (g_execute): const on variables * gmessages.c (printf_string_upper_bound): fix const on a variable * gmem.c (g_mem_chunk_new): make the "name" arg const (struct _GRealMemChunk): make the "name" field const * gfileutils.c (g_file_open_tmp): store const return in a const gchar* variable * gdataset.c (g_quark_to_string): G_CONST_RETURN 2001-02-17 Havoc Pennington Applied patch from Soeren Sandmann: * gvaluetypes.c (g_value_get_string): G_CONST_RETURN * gtype.c (g_type_name): G_CONST_RETURN * gsignal.c (g_signal_name): G_CONST_RETURN * gobject-query.c (main): const fix 2001-02-17 Havoc Pennington Applied patch from Soeren Sandmann: * gmodule.c (g_module_error): G_CONST_RETURN (g_module_name): G_CONST_RETURN --- glib/gstrfuncs.h | 102 +++++++++++++++++++++++++++---------------------------- 1 file changed, 51 insertions(+), 51 deletions(-) (limited to 'glib/gstrfuncs.h') diff --git a/glib/gstrfuncs.h b/glib/gstrfuncs.h index 4d33272fc..11064c327 100644 --- a/glib/gstrfuncs.h +++ b/glib/gstrfuncs.h @@ -36,58 +36,58 @@ G_BEGIN_DECLS * return a constant string that must not be freed. */ #define G_STR_DELIMITERS "_-|> <." -gchar* g_strdelimit (gchar *string, - const gchar *delimiters, - gchar new_delimiter); -gchar* g_strcanon (gchar *string, - const gchar *valid_chars, - gchar subsitutor); -gdouble g_strtod (const gchar *nptr, - gchar **endptr); -gchar* g_strerror (gint errnum) G_GNUC_CONST; -gchar* g_strsignal (gint signum) G_GNUC_CONST; -gint g_strcasecmp (const gchar *s1, - const gchar *s2); -gint g_strncasecmp (const gchar *s1, - const gchar *s2, - guint n); -gchar* g_strdown (gchar *string); -gchar* g_strup (gchar *string); -gchar* g_strreverse (gchar *string); -gsize g_strlcpy (gchar *dest, - const gchar *src, - gsize dest_size); -gsize g_strlcat (gchar *dest, - const gchar *src, - gsize dest_size); +gchar* g_strdelimit (gchar *string, + const gchar *delimiters, + gchar new_delimiter); +gchar* g_strcanon (gchar *string, + const gchar *valid_chars, + gchar subsitutor); +gdouble g_strtod (const gchar *nptr, + gchar **endptr); +G_CONST_RETURN gchar* g_strerror (gint errnum) G_GNUC_CONST; +G_CONST_RETURN gchar* g_strsignal (gint signum) G_GNUC_CONST; +gint g_strcasecmp (const gchar *s1, + const gchar *s2); +gint g_strncasecmp (const gchar *s1, + const gchar *s2, + guint n); +gchar* g_strdown (gchar *string); +gchar* g_strup (gchar *string); +gchar* g_strreverse (gchar *string); +gsize g_strlcpy (gchar *dest, + const gchar *src, + gsize dest_size); +gsize g_strlcat (gchar *dest, + const gchar *src, + gsize dest_size); /* removes leading spaces */ -gchar* g_strchug (gchar *string); +gchar* g_strchug (gchar *string); /* removes trailing spaces */ -gchar* g_strchomp (gchar *string); +gchar* g_strchomp (gchar *string); /* removes leading & trailing spaces */ #define g_strstrip( string ) g_strchomp (g_strchug (string)) /* String utility functions that return a newly allocated string which * ought to be freed with g_free from the caller at some point. */ -gchar* g_strdup (const gchar *str); -gchar* g_strdup_printf (const gchar *format, - ...) G_GNUC_PRINTF (1, 2); -gchar* g_strdup_vprintf (const gchar *format, - va_list args); -gchar* g_strndup (const gchar *str, - guint n); -gchar* g_strnfill (guint length, - gchar fill_char); -gchar* g_strconcat (const gchar *string1, - ...); /* NULL terminated */ -gchar* g_strjoin (const gchar *separator, - ...); /* NULL terminated */ +gchar* g_strdup (const gchar *str); +gchar* g_strdup_printf (const gchar *format, + ...) G_GNUC_PRINTF (1, 2); +gchar* g_strdup_vprintf (const gchar *format, + va_list args); +gchar* g_strndup (const gchar *str, + guint n); +gchar* g_strnfill (guint length, + gchar fill_char); +gchar* g_strconcat (const gchar *string1, + ...); /* NULL terminated */ +gchar* g_strjoin (const gchar *separator, + ...); /* NULL terminated */ /* Make a copy of a string interpreting C string -style escape * sequences. Inverse of g_strescape. The recognized sequences are \b * \f \n \r \t \\ \" and the octal format. */ -gchar* g_strcompress (const gchar *source); +gchar* g_strcompress (const gchar *source); /* Copy a string escaping nonprintable characters like in C strings. * Inverse of g_strcompress. The exceptions parameter, if non-NULL, points @@ -97,11 +97,11 @@ gchar* g_strcompress (const gchar *source); * Luckily this function wasn't used much, using NULL as second parameter * provides mostly identical semantics. */ -gchar* g_strescape (const gchar *source, - const gchar *exceptions); +gchar* g_strescape (const gchar *source, + const gchar *exceptions); -gpointer g_memdup (gconstpointer mem, - guint byte_size); +gpointer g_memdup (gconstpointer mem, + guint byte_size); /* NULL terminated string arrays. * g_strsplit() splits up string into max_tokens tokens at delim and @@ -111,13 +111,13 @@ gpointer g_memdup (gconstpointer mem, * g_strfreev() frees the array itself and all of its strings. * g_strdupv() copies a NULL-terminated array of strings */ -gchar** g_strsplit (const gchar *string, - const gchar *delimiter, - gint max_tokens); -gchar* g_strjoinv (const gchar *separator, - gchar **str_array); -void g_strfreev (gchar **str_array); -gchar** g_strdupv (gchar **str_array); +gchar** g_strsplit (const gchar *string, + const gchar *delimiter, + gint max_tokens); +gchar* g_strjoinv (const gchar *separator, + gchar **str_array); +void g_strfreev (gchar **str_array); +gchar** g_strdupv (gchar **str_array); G_END_DECLS -- cgit v1.2.3