fix NSTextAlignment -> kCTTextAlignment.., fix fmemopen cast warning