errChk() and tsErrChk are not function calls, but rather compiler macros. The following are the definitions of the macros:
#define errChk(fCall) if (error = (fCall), error < 0) \
{ goto Error; } else
#define tsErrChk(fCall) \
if ((error = (fCall)) < 0) { \
TS_GetOLEErrorMsg(error, &errorInfo, errMsg, 0, 0, ERRMSG_SIZE);\
error = (error == DISP_E_EXCEPTION ? errorInfo.sCode : error);\
if(error < 0) goto Error;\
} else
Basically, this macro assumes you have the appropriate error variables defined for each function (error, errorInfo, and errMsg) and you have a label at the end of each of your functions with the error label (Error). For example
int myFunc(void)
{
int error = 0;
ERRORINFO errorInfo = {0, 0, "", "", "", 0, 0};
ErrMsg errMSg = ""
// some more declarations
// some code here
tsErrChk( TS_StartModalDialog(context, errorInfo, &TS_ModalData));
errChk( InstallPopup(panel));
// some more code here
Error:;
// cleanup and memory deallocation code here
return error;
}
Basically, this works because library functions follow the convention that a negative return value is an error condition. If the library call returns a negative value, the path of execution jumps down to the Error label.