Recover the Mac calc-expression compiler's identity and signed integer result
Mac002eb300 is the counterpart of Windows SKILLS_ParseCalcExpression006c1ae0: both compile skill/skilldesc/item/missile expressions through six inputs, the same three callback roles,64-entry operator stacks and constant folding through their formula evaluator. The Mac physical routine has one RET002ec5ab;002ec59f returns full EAX=ESI, from write-pointer-minus-output-base or an explicit zero path. All four direct callers TEST EAX/JLE and use accepted EAX as the byte count. Persist int instead of undefined and recover the paired name, preserving input storage/meaning and cdecl. Raw-byte decoding traced4785 bytes and all three jump tables because Ghidra owns only1389 bytes and loses case blocks. This API/name correction does not repair that control flow, define callback types or guarantee zero on every failure. The decompiler already infers int on recovered paths; no build/runtime gain is claimed.
Changes 2, applied together
Set prototype
mac 0x002eb300signatureundefined FUN_002eb300(char * szFormula, byte * pOutput, int nOutputSize, undefined * pfnFunctionLookup, undefined4 param_5, undefined * pfnIdentifierLookup)→int FUN_002eb300(char * szFormula, byte * pOutput, int nOutputSize, undefined1 * pfnFunctionLookup, undefined4 param_5, undefined1 * pfnIdentifierLookup)convention__cdeclRename function
mac 0x002eb300nameFUN_002eb300→SKILLS_ParseCalcExpression