comparison src/util.h @ 7107:9220c7490cd1

[gaim-migrate @ 7672] This is a big one: normalize() -> gaim_normalize, linkify_text() -> gaim_markup_linkify(), gaim_get_size_string() -> gaim_str_size_to_units(), and moved clean_pid() to main.c. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 01 Oct 2003 06:17:28 +0000
parents db6bd3e794d8
children 6faeeecab0dc
comparison
equal deleted inserted replaced
7106:db6bd3e794d8 7107:9220c7490cd1
44 * 44 *
45 * @param str The string to normalize. 45 * @param str The string to normalize.
46 * 46 *
47 * @return A pointer to the normalized version stored in a static buffer. 47 * @return A pointer to the normalized version stored in a static buffer.
48 */ 48 */
49 char *normalize(const char *str); 49 char *gaim_normalize(const char *str);
50 50
51 /** 51 /**
52 * Converts a string to its base-64 equivalent. 52 * Converts a string to its base-64 equivalent.
53 * 53 *
54 * @param buf The data to convert. 54 * @param buf The data to convert.
94 * @see tobase16() 94 * @see tobase16()
95 */ 95 */
96 int gaim_base16_decode(const char *str, unsigned char **ret_str); 96 int gaim_base16_decode(const char *str, unsigned char **ret_str);
97 97
98 /** 98 /**
99 * Waits for all child processes to terminate.
100 */
101 void clean_pid(void);
102
103 /**
104 * Returns the current local time in hour:minute:second form. 99 * Returns the current local time in hour:minute:second form.
105 * 100 *
106 * The returned string is stored in a static buffer, so the result 101 * The returned string is stored in a static buffer, so the result
107 * should be g_strdup()'d if it's intended to be used for long. 102 * should be g_strdup()'d if it's intended to be used for long.
108 * 103 *
109 * @return The current local time. 104 * @return The current local time.
110 * 105 *
111 * @see full_date() 106 * @see full_date()
112 */ 107 */
113 char *date(void); 108 char *date(void);
114
115 /**
116 * Adds the necessary HTML code to turn URIs into HTML links in a string.
117 *
118 * @param str The string to linkify.
119 *
120 * @return The linkified text.
121 */
122 char *linkify_text(const char *str);
123 109
124 /** 110 /**
125 * Converts seconds into a human-readable form. 111 * Converts seconds into a human-readable form.
126 * 112 *
127 * @param sec The seconds. 113 * @param sec The seconds.
317 * This is like strstr, except that it ignores ASCII case in 303 * This is like strstr, except that it ignores ASCII case in
318 * searching for the substring. 304 * searching for the substring.
319 * 305 *
320 * @param haystack The string to search in. 306 * @param haystack The string to search in.
321 * @param needle The substring to find. 307 * @param needle The substring to find.
308 *
322 * @return the location of the substring if found, or NULL if not 309 * @return the location of the substring if found, or NULL if not
323 */ 310 */
324 const char *gaim_strcasestr(const char *haystack, const char *needle); 311 const char *gaim_strcasestr(const char *haystack, const char *needle);
325 312
326 /** 313 /**
327 * Returns a string representing a filesize in the appropriate 314 * Returns a string representing a filesize in the appropriate
328 * units (MB, KB, GB, etc.) 315 * units (MB, KB, GB, etc.)
329 * 316 *
330 * @param size The size 317 * @param size The size
331 */ 318 *
332 char *gaim_get_size_string(size_t size); 319 * @return The string in units form. This must be freed.
320 */
321 char *gaim_str_size_to_units(size_t size);
333 322
334 /** 323 /**
335 * Finds a HTML tag matching the given name. 324 * Finds a HTML tag matching the given name.
336 * 325 *
337 * This locates an HTML tag's start and end, and stores its attributes 326 * This locates an HTML tag's start and end, and stores its attributes
397 * @return The new string without HTML. This must be freed. 386 * @return The new string without HTML. This must be freed.
398 */ 387 */
399 char *gaim_markup_strip_html(const char *str); 388 char *gaim_markup_strip_html(const char *str);
400 389
401 /** 390 /**
391 * Adds the necessary HTML code to turn URIs into HTML links in a string.
392 *
393 * @param str The string to linkify.
394 *
395 * @return The linkified text.
396 */
397 char *gaim_markup_linkify(const char *str);
398
399 /**
402 * Parses a URL, returning its host, port, and file path. 400 * Parses a URL, returning its host, port, and file path.
403 * 401 *
404 * The returned data must be freed. 402 * The returned data must be freed.
405 * 403 *
406 * @param url The URL to parse. 404 * @param url The URL to parse.