[C] xemacsweb: resolve issue 34, merging stephen's updates and mine