fix-casts.sh

Wed, 04 Mar 2009 10:39:38 +0000

author
Mark Doliner <markdoliner@pidgin.im>
date
Wed, 04 Mar 2009 10:39:38 +0000
changeset 26064
f3efb46c4a43
parent 24975
7abe1341dc45
permissions
-rwxr-xr-x

Change the way oscar deals with account->perm_deny a little bit.
1. We no longer read the privacy setting from the server for ICQ accounts
2. We no longer change account->perm_deny when an ICQ account changes
its status (or ever)
3. When going invisible, we still override the permit deny setting and
set it to "invisible to everyone except the people in my allow list,"
but this change is only made on the server and not account->perm_deny

Refs #1009
Fixes #5263 I think

24973
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
1 #!/bin/sh
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
2
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
3 if [ $# -eq 0 ]; then
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
4 echo "Usage: `basename "$0"` PurpleFoo..."
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
5 echo
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
6 echo "This script searches the *current working directory* and replaces casts"
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
7 echo "with GObject-style type checking and casting macros."
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
8 echo 'For example, "(PurpleBuddy *)b" becomes "PURPLE_BUDDY(b)".'
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
9 exit 0
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
10 fi
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
11
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
12 for struct in $* ; do
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
13 cast=`echo $struct | sed "s|[A-Z]|_\0|g" | tr "a-z" "A-Z" | sed "s|^_||"`
24975
7abe1341dc45 Minor fixes to the cast changing script.
Richard Laager <rlaager@pidgin.im>
parents: 24973
diff changeset
14 for file in `grep -rl "([[:space:]]*$struct[[:space:]]*\*[[:space:]]*)" . --include=*.c --exclude=purple-client-bindings.c` ; do
7abe1341dc45 Minor fixes to the cast changing script.
Richard Laager <rlaager@pidgin.im>
parents: 24973
diff changeset
15 sed -i "s|([[:space:]]*$struct[[:space:]]*\*[[:space:]]*)[[:space:]]*(|$cast(|g" $file
7abe1341dc45 Minor fixes to the cast changing script.
Richard Laager <rlaager@pidgin.im>
parents: 24973
diff changeset
16 sed -i "s|([[:space:]]*$struct[[:space:]]*\*[[:space:]]*)[[:space:]]*\([^(][^,);]*\)|$cast(\1)|g" $file
24973
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
17 done
d021d316a53d Add a script to change casts to GObject macros. We'll run this later.
Richard Laager <rlaager@pidgin.im>
parents:
diff changeset
18 done

mercurial