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/kObjCache/kObjCache.c

    r3110 r3167  
    807807    /** The current dependency file. */
    808808    PDEP pCurDep;
     809    /** The core dependency collector state. */
     810    DEPGLOBALS Core;
    809811} KOCDEP;
    810812/** Pointer to a KOCDEP.  */
     
    824826    pDepState->pszFilename = NULL;
    825827    pDepState->pCurDep = NULL;
     828    depInit(&pDepState->Core);
    826829}
    827830
     
    837840    free(pDepState->pszFilename);
    838841    pDepState->pszFilename = NULL;
    839     depCleanup();
     842    depCleanup(&pDepState->Core);
    840843}
    841844
     
    908911        || cchFilename != pDepState->pCurDep->cchFilename
    909912        || strcmp(pDepState->pszFilename, pDepState->pCurDep->szFilename))
    910         pDepState->pCurDep = depAdd(pDepState->pszFilename, cchFilename);
     913        pDepState->pCurDep = depAdd(&pDepState->Core, pDepState->pszFilename, cchFilename);
    911914}
    912915
     
    10701073                            || cchFilename != pDepState->pCurDep->cchFilename
    10711074                            || strcmp(pDepState->pszFilename, pDepState->pCurDep->szFilename))
    1072                             pDepState->pCurDep = depAdd(pDepState->pszFilename, cchFilename);
     1075                            pDepState->pCurDep = depAdd(&pDepState->Core, pDepState->pszFilename, cchFilename);
    10731076                        pDepState->offFilename = 0;
    10741077                        break;
     
    11121115        FatalMsg("Failed to open dependency file '%s': %s\n", pszFilename, strerror(errno));
    11131116
    1114     depOptimize(fFixCase, fQuiet, NULL /*pszIgnoredExt*/);
     1117    depOptimize(&pDepState->Core, fFixCase, fQuiet, NULL /*pszIgnoredExt*/);
    11151118
    11161119    /* Make object file name with unix slashes. */
     
    11221125    fprintf(pFile, "%s:", pszObjFileAbs);
    11231126    free(pszObjFileAbs);
    1124     depPrint(pFile);
     1127    depPrint(&pDepState->Core, pFile);
    11251128    if (fGenStubs)
    1126         depPrintStubs(pFile);
     1129        depPrintStubs(&pDepState->Core, pFile);
    11271130
    11281131    if (fclose(pFile) != 0)
Note: See TracChangeset for help on using the changeset viewer.