Been fiddling with this for days now and still can't get any sense out of it. Guess my coding skills just aren't up to scratch!

lol
Please don't hesitate to ask your questions (but not about cgminer inner structure, I have spent couple hours trying to get my head around it and gave up).