Mercurial > pidgin.yaz
comparison src/buddy.c @ 4852:d1c17e81055e
[gaim-migrate @ 5179]
Gather around children, and I shall tell you a tale of goblins and witches
and bunnies. Yes, you heard me. Witches.
You see, there once was a rooster named Fredrick some away messages AND HE
WAS A MIGHTY ROOSTER with powers of they had & in them which were and one
day he said, "I shall find me an adventure!" And so he set off and they were
being truncated and so he grabbed a pitchfork and headed to the Dungeon of
Evil where pango got upset and CRASH!
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sat, 22 Mar 2003 06:11:12 +0000 |
parents | bce4d8f7dbf0 |
children | e4bfaba117e4 |
comparison
equal
deleted
inserted
replaced
4851:4b6bf5ed9c5e | 4852:d1c17e81055e |
---|---|
892 g_free(tmp); | 892 g_free(tmp); |
893 tmp = new; | 893 tmp = new; |
894 } | 894 } |
895 | 895 |
896 if(tmp) { | 896 if(tmp) { |
897 char *temp; | |
898 | |
897 g_strdelimit(tmp, "\n", ' '); | 899 g_strdelimit(tmp, "\n", ' '); |
898 if(strlen(tmp) > 20) | 900 |
901 if(strlen(tmp) > 20) { | |
902 char *c1, *c2; | |
903 | |
899 statustext = g_strdup_printf("%.20s... ", tmp); | 904 statustext = g_strdup_printf("%.20s... ", tmp); |
905 | |
906 if ((c1 = strrchr(statustext, '&')) != NULL) { | |
907 if ((c2 = strrchr(statustext, ';')) == NULL || | |
908 c2 < c1) { | |
909 | |
910 char *new_statustext; | |
911 | |
912 /* We must escape this broken entity. */ | |
913 new_statustext = g_new0(char, strlen(statustext) + 5); | |
914 | |
915 strncpy(new_statustext, statustext, c1 - statustext); | |
916 sprintf(new_statustext + (c1 - statustext), | |
917 "&%s", c1 + 1); | |
918 | |
919 g_free(statustext); | |
920 | |
921 statustext = new_statustext; | |
922 } | |
923 } | |
924 | |
925 } | |
900 else | 926 else |
901 statustext = g_strdup_printf("%s ", tmp); | 927 statustext = g_strdup_printf("%s ", tmp); |
928 | |
902 g_free(tmp); | 929 g_free(tmp); |
903 } | 930 } |
904 } | 931 } |
905 | 932 |
906 if (b->idle) { | 933 if (b->idle) { |