Coding and hacking

Katoob, the baby has a new father.

Body

This post has a bit of my history and emotions. It can be skipped!

The summary is: Katoob has a new maintainer.

...

Yes, a long time.

Back in 2002, Gtk 2.x was just released. Efforts were spent porting, rewriting and redesigning parts of GNOME. The aim was GNOME 2.0 and later on 2.x

Automatically insert a statement in each function in C++

Body

And I thought I'll never do such things again ?
I wanted to insert a debugging statement at the beginning of each function.

for i in *.cc *.c; do sed -i -e 's/\([a-zA-Z0-9 _*:~]*([^).]*) *{\)/\1 \nprintf("%s\\n", __PRETTY_FUNCTION__); /g' $i; done

It can probably be used to insert anything too.

It's dirty but it worked for me. Just keep a backup or make sure the latest code is in any RCS just in case.