Carbonise, mostly by replacing addresource() with c2pstrcpy() and