printf("\rReading... Done.\n");
doRun(void){    int retval = 0;    /*     ** Create the new trace-malloc reader.     */    globals.mTMR = tmreader_new(globals.mProgramName, NULL);    if (NULL != globals.mTMR) {        int tmResult = 0;        int outputResult = 0;#if defined(DEBUG_dp)        PRIntervalTime start = PR_IntervalNow();        fprintf(stderr, "DEBUG: reading tracemalloc data...\n");#endif        tmResult =            tmreader_eventloop(globals.mTMR,                               globals.mCommandLineOptions.mFileName,                               tmEventHandler);#if defined(DEBUG_dp)        fprintf(stderr,                "DEBUG: reading tracemalloc data ends: %dms [%d allocations]\n",                PR_IntervalToMilliseconds(PR_IntervalNow() - start),                globals.mRun.mAllocationCount);#endif        if (0 == tmResult) {            REPORT_ERROR(__LINE__, tmreader_eventloop);            retval = __LINE__;        }        if (0 == retval) {            /*             ** Decide if we're going into batch mode or server mode.             */            if (0 != globals.mCommandLineOptions.mBatchRequestCount) {                /*                 ** Output in one big step while everything still exists.                 */                outputResult = batchMode();                if (0 != outputResult) {                    REPORT_ERROR(__LINE__, batchMode);                    retval = __LINE__;                }            }            else {                int serverRes = 0;                /*                 ** httpd time.                 */                serverRes = serverMode();                if (0 != serverRes) {                    REPORT_ERROR(__LINE__, serverMode);                    retval = __LINE__;                }            }            /*             ** Clear our categorization tree             */            freeCategories(&globals);        }    }    else {        REPORT_ERROR(__LINE__, tmreader_new);        retval = __LINE__;    }    return retval;}