Removed unused variables, debug printing and added safe_realloc failure check.
Removed unused variables, debug printing and added safe_realloc failure check.

bfontaine/Dazibao,bfontaine/Dazibao,bfontaine/Dazibao