annotate plugins/perl/common/Util.xs @ 12910:3097275dbbdd

[gaim-migrate @ 15263] Fix the perl compilation. Hopefully somebody will evaluate if this is correct. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 17 Jan 2006 06:09:47 +0000
parents 520d9abca2aa
children 69b3d5cbd2b1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
1 #include "module.h"
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
2
11290
b284c703d398 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
3 typedef struct {
b284c703d398 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
4 char *cb;
b284c703d398 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
5 } GaimPerlUrlData;
b284c703d398 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
6
12412
a88ca6da0b38 [gaim-migrate @ 14719]
Richard Laager <rlaager@wiktel.com>
parents: 11920
diff changeset
7 static void gaim_perl_util_url_cb(void *data, const char *url_data, size_t size) {
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
8 GaimPerlUrlData *gpr = (GaimPerlUrlData *)data;
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
9 dSP;
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
10 ENTER;
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
11 SAVETMPS;
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
12 PUSHMARK(sp);
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
13
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
14 XPUSHs(sv_2mortal(newSVpv(url_data, 0)));
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
15 PUTBACK;
11290
b284c703d398 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
16
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
17 call_pv(gpr->cb, G_EVAL | G_SCALAR);
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
18 SPAGAIN;
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
19
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
20 PUTBACK;
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
21 FREETMPS;
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
22 LEAVE;
11290
b284c703d398 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
23 }
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
24
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
25 MODULE = Gaim::Util PACKAGE = Gaim::Util PREFIX = gaim_
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
26 PROTOTYPES: ENABLE
11290
b284c703d398 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
27
b284c703d398 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
28 void
b284c703d398 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
29 gaim_url_fetch(handle, url, full, user_agent, http11, cb)
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
30 Gaim::Plugin handle
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
31 const char *url
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
32 gboolean full
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
33 const char *user_agent
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
34 gboolean http11
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
35 SV * cb
11290
b284c703d398 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
36 CODE:
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
37 GaimPerlUrlData *gpr;
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
38 STRLEN len;
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
39 char *basename, *package;
11290
b284c703d398 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
40
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
41 basename = g_path_get_basename(handle->path);
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
42 gaim_perl_normalize_script_name(basename);
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
43 package = g_strdup_printf("Gaim::Script::%s", basename);
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
44 gpr = g_new(GaimPerlUrlData, 1);
11290
b284c703d398 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
45
b284c703d398 [gaim-migrate @ 13490]
John H. Kelm <johnkelm@gmail.com>
parents: 11118
diff changeset
46 gpr->cb = g_strdup_printf("%s::%s", package, SvPV(cb, len));
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
47 gaim_url_fetch(url, full, user_agent, http11, gaim_perl_util_url_cb, gpr);
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
48
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
49 int
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
50 gaim_build_dir(path, mode)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
51 const char *path
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
52 int mode
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
53
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
54 const char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
55 gaim_date()
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
56
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
57 const char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
58 gaim_date_full()
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
59
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
60 gboolean
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
61 gaim_email_is_valid(address)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
62 const char *address
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
63
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
64 const char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
65 gaim_escape_filename(str)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
66 const char *str
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
67
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
68 char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
69 gaim_fd_get_ip(fd)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
70 int fd
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
71
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
72 const gchar *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
73 gaim_home_dir()
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
74
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
75 gboolean
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
76 gaim_markup_extract_info_field(str, len, dest, start_token, skip, end_token, check_value, no_value_token, display_name, is_link, link_prefix)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
77 const char *str
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
78 int len
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
79 GString *dest
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
80 const char *start_token
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
81 int skip
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
82 const char *end_token
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
83 char check_value
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
84 const char *no_value_token
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
85 const char *display_name
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
86 gboolean is_link
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
87 const char *link_prefix
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
88
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
89 gboolean
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
90 gaim_markup_find_tag(needle, haystack, start, end, attributes)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
91 const char *needle
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
92 const char *haystack
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
93 const char **start
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
94 const char **end
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
95 GData **attributes
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
96
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
97 char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
98 gaim_markup_get_tag_name(tag)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
99 const char *tag
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
100
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
101 void
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
102 gaim_markup_html_to_xhtml(html, dest_xhtml, dest_plain)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
103 const char *html
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
104 char **dest_xhtml
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
105 char **dest_plain
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
106
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
107 char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
108 gaim_markup_linkify(str)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
109 const char *str
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
110
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
111 char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
112 gaim_markup_slice(str, x, y)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
113 const char *str
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
114 guint x
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
115 guint y
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
116
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
117 char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
118 gaim_markup_strip_html(str)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
119 const char *str
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
120
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
121 gboolean
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
122 gaim_message_meify(message, len)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
123 char *message
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
124 size_t len
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
125
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
126 FILE *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
127 gaim_mkstemp(path, binary)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
128 char **path
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
129 gboolean binary
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
130
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
131 const char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
132 gaim_normalize(account, str)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
133 Gaim::Account account
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
134 const char *str
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
135
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
136 gboolean
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
137 gaim_program_is_valid(program)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
138 const char *program
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
139
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
140 char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
141 gaim_str_add_cr(str)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
142 const char *str
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
143
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
144 char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
145 gaim_str_binary_to_ascii(binary, len)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
146 const unsigned char *binary
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
147 guint len
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
148
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
149 gboolean
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
150 gaim_str_has_prefix(s, p)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
151 const char *s
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
152 const char *p
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
153
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
154 gboolean
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
155 gaim_str_has_suffix(s, x)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
156 const char *s
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
157 const char *x
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
158
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
159 char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
160 gaim_str_seconds_to_string(sec)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
161 guint sec
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
162
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
163 char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
164 gaim_str_size_to_units(size)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
165 size_t size
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
166
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
167 void
11920
52f27ffe68a5 [gaim-migrate @ 14211]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
168 gaim_str_strip_char(str, thechar)
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
169 char *str
11920
52f27ffe68a5 [gaim-migrate @ 14211]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
170 char thechar
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
171
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
172 gchar *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
173 gaim_str_sub_away_formatters(str, name)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
174 const char *str
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
175 const char *name
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
176
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
177 time_t
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
178 gaim_str_to_time(timestamp, utc)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
179 const char *timestamp
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
180 gboolean utc
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
181
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
182 gchar *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
183 gaim_strcasereplace(string, delimiter, replacement)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
184 const char *string
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
185 const char *delimiter
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
186 const char *replacement
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
187
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
188 const char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
189 gaim_strcasestr(haystack, needle)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
190 const char *haystack
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
191 const char *needle
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
192
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
193 gchar *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
194 gaim_strdup_withhtml(src)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
195 const gchar *src
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
196
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
197 size_t
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
198 gaim_strftime(s, max, format, tm)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
199 char *s
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
200 size_t max
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
201 const char *format
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
202 const struct tm *tm
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
203
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
204 gchar *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
205 gaim_strreplace(string, delimiter, replacement)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
206 const char *string
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
207 const char *delimiter
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
208 const char *replacement
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
209
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
210 char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
211 gaim_text_strip_mnemonic(in)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
212 const char *in
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
213
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
214 time_t
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
215 gaim_time_build(year, month, day, hour, min, sec)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
216 int year
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
217 int month
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
218 int day
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
219 int hour
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
220 int min
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
221 int sec
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
222
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
223 const char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
224 gaim_unescape_filename(str)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
225 const char *str
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
226
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
227 char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
228 gaim_unescape_html(html)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
229 const char *html
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
230
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
231 const char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
232 gaim_url_decode(str)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
233 const char *str
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
234
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
235 const char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
236 gaim_url_encode(str)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
237 const char *str
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
238
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
239 gboolean
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
240 gaim_url_parse(url, ret_host, ret_port, ret_path, ret_user, ret_passwd)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
241 const char *url
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
242 char **ret_host
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
243 int *ret_port
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
244 char **ret_path
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
245 char **ret_user
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
246 char **ret_passwd
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
247
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
248 const char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
249 gaim_user_dir()
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
250
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
251 void
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
252 gaim_util_set_user_dir(dir)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
253 const char *dir
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
254
12783
520d9abca2aa [gaim-migrate @ 15130]
Etan Reisner <pidgin@unreliablesource.net>
parents: 12412
diff changeset
255 gboolean
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
256 gaim_util_write_data_to_file(filename, data, size)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
257 const char *filename
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
258 const char *data
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
259 size_t size