Besides the global variable and fixed-size array, both of which seem undesirable and avoidable, I'm bothered by the inconsistency between arrays and pointers. Why do we recurse into the pointer type for arrays, but not for pointers? I don't have midl handy, so I can't easily check, but it seems suspicious that the logic is different there in the first place.