Mercurial > pidgin.yaz
view fix-casts.sh @ 30363:984cb1d0ea5d
Two small fixes to improve sending/receiving HTML-formatted messages
over ICQ.
* Treat all incoming messages as HTML because a) this is what the official
client does and b) we don't have a reliable way to check if a message is
HTML anyway.
* Wrap outgoing HTML in proper HTML tags to make ICQ6 happy.
This was tested with ICQ 6/7, Miranda, Trillian, QIP, and iChat.
author | ivan.komarov@soc.pidgin.im |
---|---|
date | Mon, 03 May 2010 20:49:14 +0000 |
parents | c3ca613ab550 |
children |
line wrap: on
line source
#!/bin/sh if [ $# -eq 0 ]; then echo "Usage: `basename "$0"` PurpleFoo..." echo echo "This script searches the *current working directory* and replaces casts" echo "with GObject-style type checking and casting macros." echo 'For example, "(PurpleBuddy *)b" becomes "PURPLE_BUDDY(b)".' exit 0 fi for struct in $* ; do cast=`echo $struct | sed "s|[A-Z]|_\0|g" | tr "a-z" "A-Z" | sed "s|^_||"` for file in `grep -rl "([[:space:]]*$struct[[:space:]]*\*[[:space:]]*)" . --include=*.c --exclude=purple-client-bindings.c` ; do sed -i "s|([[:space:]]*$struct[[:space:]]*\*[[:space:]]*)[[:space:]]*(|$cast(|g" $file sed -i "s|([[:space:]]*$struct[[:space:]]*\*[[:space:]]*)[[:space:]]*\([^(][^,);]*\)|$cast(\1)|g" $file done done