annotate plugins/perl/common/XMLNode.xs @ 12711:145f76e74a9f

[gaim-migrate @ 15055] Fix SF Bug #1384698 - "Last word in text auto replace not changed" This uses astro96's idea: 'when the user types something like "Hi how r u" they will see this (where the "^" is the cursor): "Hi how are u^" When they hit enter to send the message, instead of sending the message, the last word would be replaced: [Enter] "Hi how are you^" and then if they hit enter again it would send the message.' I code a preference for this, but have #if 0'ed it before committing. I don't think we need a preference to disable this. If it turns out I'm wrong, the code is right there to use. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 04 Jan 2006 03:01:32 +0000
parents 6fd82071a7b8
children 96f9b4798012
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
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
3 MODULE = Gaim::XMLNode PACKAGE = Gaim::XMLNode PREFIX = xmlnode_
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
4 PROTOTYPES: ENABLE
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
5
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
6
12364
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
7 Gaim::XMLNode
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
8 xmlnode_copy(class, src)
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
9 xmlnode *src
12364
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
10 C_ARGS:
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
11 src
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
12
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
13 void
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
14 xmlnode_free(node)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
15 xmlnode *node
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
16
12364
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
17 Gaim::XMLNode
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
18 xmlnode_from_str(class, str, size)
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
19 const char *str
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
20 gssize size
12364
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
21 C_ARGS:
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
22 str, size
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
23
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
24 const char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
25 xmlnode_get_attrib(node, attr)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
26 xmlnode *node
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
27 const char *attr
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
28
12364
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
29 Gaim::XMLNode
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
30 xmlnode_get_child(parent, name)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
31 const xmlnode *parent
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
32 const char *name
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
33
12364
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
34 Gaim::XMLNode
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
35 xmlnode_get_child_with_namespace(parent, name, xmlns)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
36 const xmlnode *parent
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
37 const char *name
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
38 const char *xmlns
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
39
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
40 char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
41 xmlnode_get_data(node)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
42 xmlnode *node
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
43
12364
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
44 Gaim::XMLNode
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
45 xmlnode_get_next_twin(node)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
46 xmlnode *node
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
47
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
48 void
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
49 xmlnode_insert_child(parent, child)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
50 xmlnode *parent
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
51 xmlnode *child
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
52
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
53 void
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
54 xmlnode_insert_data(node, data, size)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
55 xmlnode *node
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
56 const char *data
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
57 gssize size
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
58
12364
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
59 Gaim::XMLNode
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
60 xmlnode_new(class, name)
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
61 const char *name
12364
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
62 C_ARGS:
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
63 name
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
64
12364
6fd82071a7b8 [gaim-migrate @ 14668]
Mark Doliner <mark@kingant.net>
parents: 11290
diff changeset
65 Gaim::XMLNode
11118
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
66 xmlnode_new_child(parent, name)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
67 xmlnode *parent
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
68 const char *name
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
69
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
70 void
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
71 xmlnode_remove_attrib(node, attr)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
72 xmlnode *node
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
73 const char *attr
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
74
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
75 void
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
76 xmlnode_set_attrib(node, attr, value)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
77 xmlnode *node
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
78 const char *attr
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
79 const char *value
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
80
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
81 char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
82 xmlnode_to_formatted_str(node, len)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
83 xmlnode *node
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
84 int *len
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
85
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
86 char *
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
87 xmlnode_to_str(node, len)
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
88 xmlnode *node
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
89 int *len
134d0001983d [gaim-migrate @ 13174]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
90