summaryrefslogtreecommitdiff
path: root/MySpace/formatting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'MySpace/formatting.cpp')
-rw-r--r--MySpace/formatting.cpp37
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, "&#39;", 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, "&#39;", 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]) {