Mercurial > pidgin
diff libpurple/protocols/yahoo/util.c @ 22123:840e7e1b6dac
disapproval of revision '947ccb889812585e6d53eac13fc12734d8481e33'
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Thu, 17 Jan 2008 05:53:12 +0000 |
parents | 0a0fa9fd5feb |
children | 33abfb98a460 |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/util.c Wed Jan 16 06:58:48 2008 +0000 +++ b/libpurple/protocols/yahoo/util.c Thu Jan 17 05:53:12 2008 +0000 @@ -164,6 +164,20 @@ return g_strdup(""); } +char *yahoo_convert_to_numeric(const char *str) +{ + char *retstr, buf[7]; + const char *p; + + retstr = (char*)malloc(strlen(str) * 6 + 1); + memset(retstr, 0x00, sizeof(retstr)); + for (p = str; *p; p++) { + sprintf(buf, "&#%d;", (unsigned char)*p); + strcat(retstr, buf); + } + return retstr; +} + /* * I found these on some website but i don't know that they actually * work (or are supposed to work). I didn't implement them yet.