diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-07-06 06:36:19 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-07-06 06:36:19 +0000 |
commit | a5a2935911aae732e11d584f8adca39543429155 (patch) | |
tree | 19461c299b2dfe4cffe226973b8f71ea67fec26e /MySpace/formatting.cpp | |
parent | cb0da06f1bf5a44f4841a6a3fb210373efe954f3 (diff) |
implemented list parsing (think i got rid of all encoded chars)
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@255 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'MySpace/formatting.cpp')
-rw-r--r-- | MySpace/formatting.cpp | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/MySpace/formatting.cpp b/MySpace/formatting.cpp index 130e703..e3a2336 100644 --- a/MySpace/formatting.cpp +++ b/MySpace/formatting.cpp @@ -1,7 +1,7 @@ #include "common.h"
#include "formatting.h"
-void entitize_msg(char *buff, int size) {
+void entitize_xml(char *buff, int size) {
char *tmp = new char[size];
int in = 0, out = 0;
@@ -23,7 +23,7 @@ void entitize_msg(char *buff, int size) { buff[size - 1] = 0;
}
-void unentitize_msg(char *buff) {
+void unentitize_xml(char *buff) {
int in = 0, out = 0;
while(buff[in]) {
if(buff[in] == '&') {
@@ -45,39 +45,6 @@ void unentitize_msg(char *buff) { buff[out] = 0;
}
-void entitize_nick(char *buff, int size) {
- char *tmp = new char[size];
-
- int in = 0, out = 0;
- while(buff[in] && out < size) {
- switch(buff[in]) {
- case '\'': in++; strncpy(tmp + out, "'", size - out); out += 5; break;
- default:
- tmp[out++] = buff[in++];
- }
- }
- tmp[out] = 0;
-
- strncpy(buff, tmp, size);
- delete tmp;
- buff[size - 1] = 0;
-}
-
-void unentitize_nick(char *buff) {
- int in = 0, out = 0;
- while(buff[in]) {
- if(buff[in] == '&') {
- if(strncmp(buff + in, "'", 5) == 0) {
- buff[out++] = '\''; in += 5;
- } else
- buff[out++] = buff[in++];
- } else
- buff[out++] = buff[in++];
- }
- buff[out] = 0;
-}
-
-
void strip_tags(char *buff) {
int in = 0, out = 0;
while(buff[in]) {
|