Ignore:
Timestamp:
Mar 20, 2018, 10:47:25 PM (7 years ago)
Author:
bird
Message:

kDep*: no globals; dir-nt-bird.c: only main thread

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kDepPre/kDepPre.c

    r3065 r3167  
    5656 * @returns 0 on success.
    5757 * @returns 1 or other approriate exit code on failure.
     58 * @param   pThis       Pointer to the 'dep' instance.
    5859 * @param   pInput      Input stream. (probably not seekable)
    5960 */
    60 static int ParseCPrecompiler(FILE *pInput)
     61static int ParseCPrecompiler(PDEPGLOBALS pThis, FILE *pInput)
    6162{
    6263    enum
     
    186187                            ||  pDep->cchFilename != cchFilename
    187188                            ||  memcmp(pDep->szFilename, szBuf, cchFilename))
    188                             pDep = depAdd(szBuf, cchFilename);
     189                            pDep = depAdd(pThis, szBuf, cchFilename);
    189190                        break;
    190191                    }
     
    225226{
    226227    int         i;
     228    DEPGLOBALS  This;
    227229
    228230    /* Arguments. */
     
    450452     * Do the parsing.
    451453     */
    452     i = ParseCPrecompiler(pInput);
     454    depInit(&This);
     455    i = ParseCPrecompiler(&This, pInput);
    453456
    454457    /*
     
    465468    if (!i)
    466469    {
    467         depOptimize(fFixCase, 0 /* fQuiet */, NULL /*pszIgnoredExt*/);
     470        depOptimize(&This, fFixCase, 0 /* fQuiet */, NULL /*pszIgnoredExt*/);
    468471        fprintf(pOutput, "%s:", pszTarget);
    469         depPrint(pOutput);
     472        depPrint(&This, pOutput);
    470473        if (fStubs)
    471             depPrintStubs(pOutput);
     474            depPrintStubs(&This, pOutput);
    472475    }
    473476
     
    487490    }
    488491
     492    depCleanup(&This);
     493
    489494    return i;
    490495}
Note: See TracChangeset for help on using the changeset viewer.