comparison src/util.h @ 11135:f2755f58a7da

[gaim-migrate @ 13196] Straighten out some comments and get rid of a warning in gtkutils.c committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Wed, 20 Jul 2005 23:10:33 +0000
parents a4611130e3eb
children 096020ae09a9
comparison
equal deleted inserted replaced
11134:f78e7e982cf4 11135:f2755f58a7da
130 * pass in NULL if you're sure that you know 130 * pass in NULL if you're sure that you know
131 * the length of the decoded data, or if you 131 * the length of the decoded data, or if you
132 * know you'll be able to use strlen to 132 * know you'll be able to use strlen to
133 * determine the length, etc. 133 * determine the length, etc.
134 * 134 *
135 * @return The raw data. Must be g'free'd when no longer needed. 135 * @return The raw data. Must be g_free'd when no longer needed.
136 */ 136 */
137 guint8 *gaim_quotedp_decode(const char *str, gsize *ret_len); 137 guint8 *gaim_quotedp_decode(const char *str, gsize *ret_len);
138 138
139 /*@}*/ 139 /*@}*/
140 140
148 * according to RFC 2047. Basically, a header is plain ASCII and can 148 * according to RFC 2047. Basically, a header is plain ASCII and can
149 * contain any number of sections called "encoded-words." The format 149 * contain any number of sections called "encoded-words." The format
150 * of an encoded word is =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= 150 * of an encoded word is =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?=
151 * =? designates the beginning of the encoded-word 151 * =? designates the beginning of the encoded-word
152 * ?= designates the end of the encoded-word 152 * ?= designates the end of the encoded-word
153 * ? segments the encoded word into three pieces. The first piece is 153 *
154 * the character set, the second piece is the encoding, and the 154 * An encoded word is segmented into three pieces by the use of a
155 * third piece is the encoded text. 155 * question mark. The first piece is the character set, the second
156 * 156 * piece is the encoding, and the third piece is the encoded text.
157 * @param str The string to convert back. 157 *
158 * 158 * @param str The ASCII string, possibly containing any number of
159 * @return The readable string. 159 * encoded-word sections.
160 */ 160 *
161 char *gaim_mime_decode_field (const char *str); 161 * @return The string, with any encoded-word sections decoded and
162 * converted to UTF-8. Must be g_free'd when no longer
163 * needed.
164 */
165 char *gaim_mime_decode_field(const char *str);
162 166
163 /*@}*/ 167 /*@}*/
164 168
165 169
166 /**************************************************************************/ 170 /**************************************************************************/
220 /** 224 /**
221 * Creates a string according to a time and format string 225 * Creates a string according to a time and format string
222 * 226 *
223 * This function just calls strftime. The only advantage to using it 227 * This function just calls strftime. The only advantage to using it
224 * is that gcc won't give a warning if you use %c 228 * is that gcc won't give a warning if you use %c
229 *
230 * TODO: The warning is gone in gcc4, and this function can
231 * eventually be removed.
225 */ 232 */
226 size_t gaim_strftime(char *s, size_t max, const char *format, const struct tm *tm); 233 size_t gaim_strftime(char *s, size_t max, const char *format, const struct tm *tm);
227 234
228 /*@}*/ 235 /*@}*/
229 236
232 /** @name Markup Functions */ 239 /** @name Markup Functions */
233 /**************************************************************************/ 240 /**************************************************************************/
234 /*@{*/ 241 /*@{*/
235 242
236 /** 243 /**
237 * Finds a HTML tag matching the given name. 244 * Finds an HTML tag matching the given name.
238 * 245 *
239 * This locates an HTML tag's start and end, and stores its attributes 246 * This locates an HTML tag's start and end, and stores its attributes
240 * in a GData hash table. The names of the attributes are lower-cased 247 * in a GData hash table. The names of the attributes are lower-cased
241 * in the hash table, and the name of the tag is case insensitive. 248 * in the hash table, and the name of the tag is case insensitive.
242 * 249 *
712 * @return True if the email address is syntactically correct. 719 * @return True if the email address is syntactically correct.
713 */ 720 */
714 gboolean gaim_email_is_valid(const char *address); 721 gboolean gaim_email_is_valid(const char *address);
715 722
716 /** 723 /**
717 * This function extracts a list of URIs from the a "text/uri-list" string 724 * This function extracts a list of URIs from the a "text/uri-list"
718 * It was "borrowed" from gnome_uri_list_extract_uris 725 * string. It was "borrowed" from gnome_uri_list_extract_uris
719 * 726 *
720 * @param uri_list an uri-list in the standard format. 727 * @param uri_list An uri-list in the standard format.
721 * 728 *
722 * @return a GList containing strings allocated with g_malloc that have been 729 * @return A GList containing strings allocated with g_malloc
723 * splitted from uri-list. 730 * that have been splitted from uri-list.
724 */ 731 */
725 GList* gaim_uri_list_extract_uris (const gchar* uri_list); 732 GList *gaim_uri_list_extract_uris(const gchar *uri_list);
726 733
727 /** 734 /**
728 * This function extracts a list of filenames from the a "text/uri-list" string 735 * This function extracts a list of filenames from a
729 * It was "borrowed" from gnome_uri_list_extract_filenames 736 * "text/uri-list" string. It was "borrowed" from
730 * 737 * gnome_uri_list_extract_filenames
731 * @param uri_list an uri-list in the standard format. 738 *
732 * 739 * @param uri_list A uri-list in the standard format.
733 * @return a GList containing strings allocated with g_malloc that contain the 740 *
734 * filenames in the uri-list. Note that unlike gaim_uri_list_extract_uris() 741 * @return A GList containing strings allocated with g_malloc that
735 * function, this will discard any non-file uri from the result value. 742 * contain the filenames in the uri-list. Note that unlike
736 */ 743 * gaim_uri_list_extract_uris() function, this will discard
737 GList* gaim_uri_list_extract_filenames (const gchar* uri_list); 744 * any non-file uri from the result value.
745 */
746 GList *gaim_uri_list_extract_filenames(const gchar *uri_list);
738 747
739 /*@}*/ 748 /*@}*/
740 749
741 /************************************************************************** 750 /**************************************************************************
742 * UTF8 String Functions 751 * UTF8 String Functions