VirtualBox

Changeset 98373 in vbox


Ignore:
Timestamp:
Feb 1, 2023 9:44:12 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
155615
Message:

scm: Dropped the efforts in rewrite_Makefile_kmk to detect whether it made modifications and instead just return kScmMaybeModified. bugref:10348

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bldprogs/scmrw.cpp

    r98368 r98373  
    26022602static bool scmKmkTailComment(KMKPARSER *pParser, const char *pchLine, size_t cchLine, size_t offSrc, char **ppszDst)
    26032603{
     2604    /* Wind back offSrc to the first blank space (not all callers can do this). */
     2605    Assert(offSrc <= cchLine);
     2606    while (offSrc > 0 && RT_C_IS_SPACE(pchLine[offSrc - 1]))
     2607        offSrc--;
    26042608    size_t const offSrcStart = offSrc;
    26052609
     
    26262630
    26272631        *ppszDst = pszDst = (char *)mempcpy(pszDst, &pchLine[offSrc], cchLine - offSrc);
    2628         return cchLine - offSrcStart != (size_t)(pszDst - &pParser->szBuf[offDst])
    2629             || memcmp(&pParser->szBuf[offDst], &pchLine[offSrcStart], cchLine - offSrcStart) != 0;
     2632        return false; /*dummy*/
    26302633    }
    26312634
     
    26342637             pParser->iLine, offSrc, cchLine - offSrc, &pchLine[offSrc]);
    26352638    *ppszDst = (char *)mempcpy(pszDst, &pchLine[offSrcStart], cchLine - offSrcStart);
    2636     return false;
     2639    return false; /*dummy*/
    26372640}
    26382641
     
    26402643/**
    26412644 * Deals with: ifeq, ifneq, if1of and ifn1of
     2645 *
     2646 * @returns dummy (false) to facility return + call.
    26422647 */
    26432648static bool scmKmkHandleIfParentheses(KMKPARSER *pParser, size_t offToken, KMKTOKEN enmToken, size_t cchToken, bool fElse)
     
    26802685    pszDst += cchToken;
    26812686
    2682     size_t offSrc    = offToken + cchToken;
    2683     bool   fModified = offSrc != (size_t)(pszDst - &pParser->szBuf[0])
    2684                     || memcmp(pchLine, pszDst, offSrc) != 0;
     2687    size_t offSrc = offToken + cchToken;
    26852688
    26862689    /*
     
    26912694    else
    26922695    {
    2693         fModified = true;
    26942696        while (offSrc < cchLine && RT_C_IS_BLANK(pchLine[offSrc]))
    26952697            offSrc++;
     
    27022704
    27032705    /*
    2704      * There shall be no blanks after the opening parenthesis.
    2705      */
    2706     if (RT_C_IS_SPACE(pchLine[offSrc]))
    2707     {
    2708         fModified = true;
    2709         while (offSrc < cchLine && RT_C_IS_BLANK(pchLine[offSrc]))
    2710             offSrc++;
    2711     }
     2706     * Skip spaces after the opening parenthesis.
     2707     */
     2708    while (offSrc < cchLine && RT_C_IS_BLANK(pchLine[offSrc]))
     2709        offSrc++;
    27122710
    27132711    /*
     
    27252723        size_t cchCopy = offSrc - offSrcStart;
    27262724        while (cchCopy > 0 && RT_C_IS_BLANK(pchLine[offSrcStart + cchCopy - 1]))
    2727         {
    2728             fModified = true;
    27292725            cchCopy--;
    2730         }
    27312726
    27322727        pszDst = (char *)mempcpy(pszDst, &pchLine[offSrcStart], cchCopy);
     
    27492744    }
    27502745    while (offSrc < cchLine && RT_C_IS_BLANK(pchLine[offSrc]))
    2751     {
    2752         fModified = true;
    27532746        offSrc++;
    2754     }
    27552747
    27562748    if (pchLine[offSrc] != ')')
     
    27632755        size_t cchCopy = offSrc - offSrcStart;
    27642756        while (cchCopy > 0 && RT_C_IS_BLANK(pchLine[offSrcStart + cchCopy - 1]))
    2765         {
    2766             fModified = true;
    27672757            cchCopy--;
    2768         }
    27692758
    27702759        pszDst = (char *)mempcpy(pszDst, &pchLine[offSrcStart], cchCopy);
     
    27802769     */
    27812770    if (offSrc < cchLine)
    2782         fModified |= scmKmkTailComment(pParser, pchLine, cchLine, offSrc, &pszDst);
     2771        scmKmkTailComment(pParser, pchLine, cchLine, offSrc, &pszDst);
    27832772
    27842773    /*
     
    27872776    *pszDst = '\0';
    27882777    ScmStreamPutLine(pParser->pOut, pParser->szBuf, pszDst - pParser->szBuf, pParser->enmEol);
    2789     return fModified;
     2778    return false; /* dummy */
    27902779}
    27912780
     
    27932782/**
    27942783 * Deals with: if, ifdef and ifndef
     2784 *
     2785 * @returns dummy (false) to facility return + call.
    27952786 */
    27962787static bool scmKmkHandleIfSpace(KMKPARSER *pParser, size_t offToken, KMKTOKEN enmToken, size_t cchToken, bool fElse)
     
    28572848    pszDst += cchToken;
    28582849
    2859     size_t offSrc    = offToken + cchToken;
    2860     bool   fModified = offSrc != (size_t)(pszDst - &pParser->szBuf[0])
    2861                     || memcmp(pchLine, pszDst, offSrc) != 0;
     2850    size_t offSrc = offToken + cchToken;
    28622851
    28632852    /*
     
    28682857    while (offSrc < cchLine && RT_C_IS_BLANK(pchLine[offSrc]))
    28692858    {
    2870         fModified |= pchLine[offSrc] != ' ';
    28712859        cchSpaces++;
    28722860        offSrc++;
     
    28812869    if (enmToken != kKmkToken_if)
    28822870    {
    2883         fModified |= cchSpaces != 1;
    2884 
    28852871        size_t const offSrcStart = offSrc;
    28862872        offSrc = scmKmkSkipExpString(pchLine, cchLine, offSrc, ' ', '\t'); /** @todo probably not entirely correct */
     
    28982884        /* Single line expression: Just assume the expression goes up to the
    28992885           EOL or comment hash. Strip and copy as-is for now. */
    2900         fModified |= cchSpaces != 1;
    2901 
    29022886        const char *pchSrcHash = (const char *)memchr(&pchLine[offSrc], '#', cchLine - offSrc);
    29032887        size_t      cchExpr    = pchSrcHash ? pchSrcHash - &pchLine[offSrc] : cchLine - offSrc;
     
    29372921                                "Bogus multi-line 'if' expression! Extra lines must start with operator (cchMaxLeadWord=%u).",
    29382922                                cchMaxLeadWord);
    2939         fModified |= cchSpaces != cchMaxLeadWord + 1;
    29402923        memset(pszDst, ' ', cchMaxLeadWord);
    29412924        pszDst += cchMaxLeadWord;
     
    29752958            *pszDst   = '\0';
    29762959            size_t cchDst = (size_t)(pszDst - pParser->szBuf);
    2977             fModified |= cchDst != cchLine
    2978                       || memcmp(pParser->szBuf, pchLine, cchLine) != 0;
    29792960            ScmStreamPutLine(pParser->pOut, pParser->szBuf, cchDst, pParser->enmEol);
    29802961
     
    30293010    {
    30303011        char * const pszDstSrc = pszDst;
    3031         fModified |= scmKmkTailComment(pParser, pchLine, cchLine, offSrc, &pszDst);
     3012        scmKmkTailComment(pParser, pchLine, cchLine, offSrc, &pszDst);
    30323013        *pszDst = '\0';
    30333014
     
    30463027     */
    30473028    ScmStreamPutLine(pParser->pOut, pParser->szBuf, pszDst - pParser->szBuf, pParser->enmEol);
    3048     return fModified;
     3029    return false; /* dummy */
    30493030}
    30503031
     
    30523033/**
    30533034 * Deals with: else
     3035 *
     3036 * @returns dummy (false) to facility return + call.
    30543037 */
    30553038static bool scmKmkHandleElse(KMKPARSER *pParser, size_t offToken)
     
    31163099
    31173100    offSrc = offToken + 4;
    3118     bool   fModified = offSrc != (size_t)(pszDst - &pParser->szBuf[0])
    3119                     || memcmp(pchLine, pszDst, offSrc) != 0;
    31203101
    31213102    /*
     
    31233104     */
    31243105    if (offSrc < cchLine)
    3125         fModified |= scmKmkTailComment(pParser, pchLine, cchLine, offSrc, &pszDst);
     3106        scmKmkTailComment(pParser, pchLine, cchLine, offSrc, &pszDst);
    31263107
    31273108    /*
     
    31303111    *pszDst = '\0';
    31313112    ScmStreamPutLine(pParser->pOut, pParser->szBuf, pszDst - pParser->szBuf, pParser->enmEol);
    3132     return fModified;
     3113    return false; /* dummy */
    31333114}
    31343115
     
    31363117/**
    31373118 * Deals with: endif
     3119 *
     3120 * @returns dummy (false) to facility return + call.
    31383121 */
    31393122static bool scmKmkHandleEndif(KMKPARSER *pParser, size_t offToken)
     
    31763159    pszDst = (char *)mempcpy(&pszDst[cchIndent], RT_STR_TUPLE("endif"));
    31773160
    3178     size_t offSrc    = offToken + 5;
    3179     bool   fModified = offSrc != (size_t)(pszDst - &pParser->szBuf[0])
    3180                     || memcmp(pchLine, pszDst, offSrc) != 0;
     3161    size_t offSrc = offToken + 5;
    31813162
    31823163    /*
     
    31843165     */
    31853166    if (offSrc < cchLine)
    3186         fModified |= scmKmkTailComment(pParser, pchLine, cchLine, offSrc, &pszDst);
     3167        scmKmkTailComment(pParser, pchLine, cchLine, offSrc, &pszDst);
    31873168
    31883169    /*
     
    31913172    *pszDst = '\0';
    31923173    ScmStreamPutLine(pParser->pOut, pParser->szBuf, pszDst - pParser->szBuf, pParser->enmEol);
    3193     return fModified;
     3174    return false; /* dummy */
    31943175}
    31953176
     
    32073188        ScmStreamPutLine(pParser->pOut, pParser->pchLine, pParser->cchLine, pParser->enmEol);
    32083189    }
    3209     return false;
     3190    return false; /* dummy */
    32103191}
    32113192
     
    32133194/**
    32143195 * For dealing with a directive w/o special formatting rules (yet).
     3196 *
     3197 * @returns dummy (false) to facility return + call.
    32153198 */
    32163199static bool scmKmkHandleSimple(KMKPARSER *pParser, size_t offToken, bool fIndentIt = true)
     
    32273210    ScmStreamPutEol(pParser->pOut, pParser->enmEol);
    32283211
    3229     bool fModified = cchIndent != offToken
    3230                 || !memcmp(pchLine, g_szSpaces, cchIndent);
    3231 
    32323212    /*
    32333213     * Check for line continuation and output concatenated lines.
    32343214     */
    32353215    scmKmkPassThruLineContinuationLines(pParser);
    3236     return fModified;
     3216    return false; /* dummy */
    32373217}
    32383218
     
    32673247
    32683248
     3249/**
     3250 * @returns dummy (false) to facility return + call.
     3251 */
    32693252static bool scmKmkHandleAssignment2(KMKPARSER *pParser, size_t offVarStart, size_t offVarEnd, KMKASSIGNTYPE enmType,
    32703253                                    size_t offAssignOp, unsigned fFlags)
     
    33283311            Assert(iSubLine + 1 < cLines);
    33293312            pParser->pchLine = pchLine = ScmStreamGetLine(pParser->pIn, &pParser->cchLine, &pParser->enmEol);
    3330             AssertReturn(pchLine, true);
     3313            AssertReturn(pchLine, false /*dummy*/);
    33313314            cchLine = pParser->cchLine;
    33323315            iSubLine++;
     
    33913374     * Skip space till we hit the value or comment.
    33923375     */
    3393     size_t cchSpaces = 0;
    33943376    while (offLine < cchLine && RT_C_IS_SPACE(pchLine[offLine]))
    3395         cchSpaces++, offLine++;
     3377        offLine++;
    33963378
    33973379/** @todo this block can probably be merged into the final loop below. */
    33983380    unsigned       cPendingEols    = 0;
    3399     bool           fModified       = false;
    34003381    unsigned const iSubLineStart1 = iSubLine;
    34013382    while (iSubLine + 1 < cLines && offLine + 1 == cchLine && pchLine[offLine] == '\\')
    34023383    {
    34033384        pParser->pchLine = pchLine = ScmStreamGetLine(pParser->pIn, &pParser->cchLine, &pParser->enmEol);
    3404         AssertReturn(pchLine, fModified);
     3385        AssertReturn(pchLine, false /*dummy*/);
    34053386        cchLine = pParser->cchLine;
    34063387        iSubLine++;
     
    34153396        cPendingEols = 1;
    34163397
    3417         /* Deal with indent/whitespace. */
     3398        /* Skip indent/whitespace. */
    34183399        offLine = 0;
    3419         if (   memcmp(pchLine, g_szSpaces, cchIndent) == 0
    3420             && pchLine[cchIndent] == '\t')
    3421             offLine = cchIndent + 1;
    3422         cchSpaces = 0;
    34233400        while (offLine < cchLine && RT_C_IS_SPACE(pchLine[offLine]))
    3424             cchSpaces++, offLine++;
    3425         fModified |= cchSpaces != 0 && pchLine[offLine] != '#';
    3426     }
    3427     fModified |= iSubLine > iSubLineStart1 + 1;
     3401            offLine++;
     3402    }
    34283403
    34293404    /*
     
    34403415            *pszDst = '\0';
    34413416            ScmStreamPutLine(pParser->pOut, pParser->szBuf, pszDst - pParser->szBuf, pParser->enmEol);
    3442             return fModified || cPendingEols > 0;
     3417            return false; /* dummy */
    34433418        }
    34443419
     
    34543429            else
    34553430            {
    3456                 fModified |= cPendingEols > 2;
    34573431                cPendingEols = RT_MIN(2, cPendingEols); /* reduce to two, i.e. only one empty separator line */
    34583432                do
     
    34783452            Assert(offValueEnd > offLine);
    34793453
    3480             fModified |= !pchHash && offValueEnd != cchLine - (iSubLine + 1 < cLines ? 2 : 0);
    3481 
    34823454            /* Append the value part we found. */
    34833455            pszDst = (char *)mempcpy(pszDst, &pchLine[offLine], offValueEnd - offLine);
     
    34933465        {
    34943466            if (cPendingEols == 0)
    3495                 scmKmkTailComment(pParser, pchLine, cchLine, offLine - cchSpaces, &pszDst);
     3467                scmKmkTailComment(pParser, pchLine, cchLine, offLine, &pszDst);
    34963468            size_t const cchDst = (size_t)(pszDst - pParser->szBuf);
    34973469            *pszDst = '\0';
    34983470            ScmStreamPutLine(pParser->pOut, pParser->szBuf, cchDst, pParser->enmEol);
    3499             fModified |= cPendingEols > 0
    3500                       || cchLine != cchDst
    3501                       || memcmp(pParser->szBuf, pchLine, cchLine) != 0;
    35023471
    35033472            if (cPendingEols > 1)
     
    35073476                ScmStreamPutLine(pParser->pOut, pchLine, cchLine, pParser->enmEol);
    35083477            scmKmkPassThruLineContinuationLines(pParser);
    3509             return fModified;
     3478            return false; /* dummy */
    35103479        }
    35113480
     
    35223491            {
    35233492                pParser->pchLine = pchLine = ScmStreamGetLine(pParser->pIn, &pParser->cchLine, &pParser->enmEol);
    3524                 AssertReturn(pchLine, fModified);
     3493                AssertReturn(pchLine, false /*dummy*/);
    35253494                cchLine = pParser->cchLine;
    35263495                iSubLine++;
     
    35393508                /* Deal with indent/whitespace. */
    35403509                offLine = 0;
    3541                 if (   memcmp(pchLine, g_szSpaces, cchIndent) == 0
    3542                     && pchLine[cchIndent] == '\t')
    3543                     offLine = cchIndent + 1;
    3544                 cchSpaces = 0;
    35453510                while (offLine < cchLine && RT_C_IS_SPACE(pchLine[offLine]))
    3546                     cchSpaces++, offLine++;
    3547                 fModified |= cchSpaces != 0 && pchLine[offLine] != '#';
     3511                    offLine++;
    35483512            }
    3549             fModified |= iSubLine > iSubLineStart2 + 1;
    35503513        }
    35513514    }
     
    35573520 *
    35583521 * This is a bit involved. Sigh.
     3522 *
     3523 * @returns dummy (false) to facility return + call.
    35593524 */
    35603525static bool scmKmkHandleRule(KMKPARSER *pParser, size_t offFirstWord, bool fDoubleColon, size_t offColon)
     
    35823547     * Indent it.
    35833548     */
    3584     bool fModified = offFirstWord != cchIndent
    3585                   || memcmp(pchLine, g_szSpaces, cchIndent) != 0;
    35863549    ScmStreamWrite(pOut, g_szSpaces, cchIndent);
    35873550    size_t offLine = offFirstWord;
     
    36043567
    36053568        /* Skip whitespace (if any). */
    3606         size_t cchSpaces = 0;
    36073569        while (offLine < cchLine && RT_C_IS_SPACE(pchLine[offLine]))
    3608         {
    3609             fModified |= pchLine[offLine] != ' ';
    3610             cchSpaces++;
    36113570            offLine++;
    3612         }
    36133571
    36143572        /* Have we reached the colon already? */
    36153573        if (offLine >= offColon)
    36163574        {
    3617             fModified |= cchSpaces != 0;
    3618 
    36193575            Assert(pchLine[offLine] == ':');
    36203576            Assert(!fDoubleColon || pchLine[offLine + 1] == ':');
     
    36303586        if (offLine + 1 == cchLine && pchLine[offLine] == '\\')
    36313587        {
    3632             fModified |= cchSpaces > 1;
    3633 
    36343588            /* Get the next input line. */
    36353589            for (;;)
     
    36383592                Assert(iSubLine + 1 < cLines);
    36393593                pParser->pchLine = pchLine = ScmStreamGetLine(pParser->pIn, &pParser->cchLine, &pParser->enmEol);
    3640                 AssertReturn(pchLine, fModified);
     3594                AssertReturn(pchLine, false /*dummy*/);
    36413595                cchLine = pParser->cchLine;
    36423596                iSubLine++;
     
    36513605                offLine = 0;
    36523606                while (offLine < cchLine && RT_C_IS_SPACE(pchLine[offLine]))
    3653                 {
    3654                     fModified |= pchLine[offLine] != ' ';
    36553607                    offLine++;
    3656                 }
    3657                 fModified |= offLine == cchIndent
    3658                           || memcmp(pchLine, g_szSpaces, cchIndent) != 0;
    36593608
    36603609                /* Just drop empty lines. */
    36613610                if (offLine + 1 == cchLine && pchLine[offLine] == '\\')
    3662                 {
    3663                     fModified = true;
    36643611                    continue;
    3665                 }
    36663612
    36673613                /* Complete the current line and emit indent, unless we reached the colon: */
    36683614                if (offLine >= offColon)
    36693615                {
    3670                     fModified = true;
    36713616                    Assert(pchLine[offLine] == ':');
    36723617                    Assert(!fDoubleColon || pchLine[offLine + 1] == ':');
     
    36883633        }
    36893634        else
    3690         {
    3691             fModified |= cchSpaces != 1;
    36923635            ScmStreamPutCh(pOut, ' ');
    3693         }
    36943636        enmCtx = kKmkWordCtx_TargetFile;
    36953637    }
     
    37003642     */
    37013643    /* Skip spaces - there should be exactly one. */
    3702     fModified |= pchLine[offLine] != ' ';
    3703     if (offLine < cchLine && RT_C_IS_SPACE(pchLine[offLine]))
     3644    while (offLine < cchLine && RT_C_IS_SPACE(pchLine[offLine]))
    37043645        offLine++;
    3705     while (offLine < cchLine && RT_C_IS_SPACE(pchLine[offLine]))
    3706     {
    3707         fModified = true;
    3708         offLine++;
    3709     }
    37103646
    37113647    /* Deal with new lines: */
     
    37163652        Assert(iSubLine + 1 < cLines);
    37173653        pParser->pchLine = pchLine = ScmStreamGetLine(pParser->pIn, &pParser->cchLine, &pParser->enmEol);
    3718         AssertReturn(pchLine, fModified);
     3654        AssertReturn(pchLine, false /*dummy*/);
    37193655        cchLine = pParser->cchLine;
    37203656        iSubLine++;
     
    37243660         /* Skip leading spaces. */
    37253661         offLine = 0;
    3726          if (memcmp(pchLine, g_szSpaces, cchIndent) == 0 && pchLine[cchIndent] == '\t' && pchLine[cchIndent + 1] == '\t')
    3727              offLine += cchIndent + 2;
    37283662         while (offLine < cchLine && RT_C_IS_SPACE(pchLine[offLine]))
    3729          {
    3730              fModified = true;
    37313663             offLine++;
    3732          }
    37333664
    37343665         /* Just drop empty lines. */
    37353666         if (offLine + 1 == cchLine && pchLine[offLine] == '\\')
    3736          {
    3737              fModified = true;
    37383667             continue;
    3739          }
    37403668    }
    37413669
     
    37463674    {
    37473675        ScmStreamPutEol(pOut, pParser->enmEol);
    3748         return fModified;
     3676        return false /*dummy*/;
    37493677    }
    37503678
     
    37533681     * (Pattern rules will also end up here, but we'll just ignore that for now.)
    37543682     */
    3755     /** @todo fModified isn't updated right here.   */
    37563683    enmCtx = kKmkWordCtx_DepFileOrAssignment;
    37573684    for (;;)
     
    37803707        while (offLine < cchLine && RT_C_IS_SPACE(pchLine[offLine]))
    37813708        {
    3782             fModified |= pchLine[offLine] != ' ';
    37833709            cchSpaces++;
    37843710            offLine++;
     
    37883714        if (iSubLine + 1 < cLines && offLine + 1 == cchLine && pchLine[offLine] == '\\')
    37893715        {
    3790             fModified |= cchSpaces > 1;
    3791 
    37923716            /* Get the next input line. */
    37933717            unsigned cEmptyLines = 0;
     
    37963720                Assert(iSubLine + 1 < cLines);
    37973721                pParser->pchLine = pchLine = ScmStreamGetLine(pParser->pIn, &pParser->cchLine, &pParser->enmEol);
    3798                 AssertReturn(pchLine, fModified);
     3722                AssertReturn(pchLine, false /*dummy*/);
    37993723                cchLine = pParser->cchLine;
    38003724                iSubLine++;
     
    38043728                /* Skip leading spaces. */
    38053729                offLine = 0;
    3806                 if (memcmp(pchLine, g_szSpaces, cchIndent) == 0 && pchLine[cchIndent] == '\t' && pchLine[cchIndent + 1] == '\t')
    3807                     offLine += cchIndent + 2;
    38083730                while (offLine < cchLine && RT_C_IS_SPACE(pchLine[offLine]))
    3809                 {
    3810                     fModified = true;
    38113731                    offLine++;
    3812                 }
    38133732
    38143733                /* Just drop empty lines, we'll re-add one of them afterward if we find more dependencies. */
     
    38223741                break;
    38233742            }
    3824             cchSpaces = 1;
    3825         }
    3826 
    3827         if (offLine < cchLine)
    3828             fModified |= cchSpaces != 1;
    3829         else
     3743        }
     3744
     3745        if (offLine >= cchLine)
    38303746        {
    38313747            /* End of input. */
     
    38333749            Assert(iSubLine + 1 == cLines);
    38343750            ScmStreamPutEol(pOut, pParser->enmEol);
    3835             return fModified;
     3751            return false; /* dummmy */
    38363752        }
    38373753        enmCtx = kKmkWordCtx_DepFile;
     
    40143930 * Rewrite a kBuild makefile.
    40153931 *
    4016  * @returns Modification state.
     3932 * @returns kScmMaybeModified or kScmUnmodified.
    40173933 * @param   pIn                 The input stream.
    40183934 * @param   pOut                The output stream.
     
    40463962     * Iterate the file.
    40473963     */
    4048     bool        fModified = false;
    40493964    const char *pchLine;
    40503965    while ((Parser.pchLine = pchLine = ScmStreamGetLine(pIn, &Parser.cchLine, &Parser.enmEol)) != NULL)
     
    40964011                    case kKmkToken_if1of:
    40974012                    case kKmkToken_ifn1of:
    4098                         fModified |= scmKmkHandleIfParentheses(&Parser, offLine, enmToken, cchWord, false /*fElse*/);
     4013                        scmKmkHandleIfParentheses(&Parser, offLine, enmToken, cchWord, false /*fElse*/);
    40994014                        continue;
    41004015
     
    41024017                    case kKmkToken_ifndef:
    41034018                    case kKmkToken_if:
    4104                         fModified |= scmKmkHandleIfSpace(&Parser, offLine, enmToken, cchWord, false /*fElse*/);
     4019                        scmKmkHandleIfSpace(&Parser, offLine, enmToken, cchWord, false /*fElse*/);
    41054020                        continue;
    41064021
    41074022                    case kKmkToken_else:
    4108                         fModified |= scmKmkHandleElse(&Parser, offLine);
     4023                        scmKmkHandleElse(&Parser, offLine);
    41094024                        continue;
    41104025
    41114026                    case kKmkToken_endif:
    4112                         fModified |= scmKmkHandleEndif(&Parser, offLine);
     4027                        scmKmkHandleEndif(&Parser, offLine);
    41134028                        continue;
    41144029
     
    41204035                    case kKmkToken_includedep_queue:
    41214036                    case kKmkToken_includedep_flush:
    4122                         fModified |= scmKmkHandleSimple(&Parser, offLine);
     4037                        scmKmkHandleSimple(&Parser, offLine);
    41234038                        continue;
    41244039
    41254040                    /* Others: */
    41264041                    case kKmkToken_define:
    4127                         fModified |= scmKmkHandleDefine(&Parser, offLine);
     4042                        scmKmkHandleDefine(&Parser, offLine);
    41284043                        continue;
    41294044                    case kKmkToken_endef:
    4130                         fModified |= scmKmkHandleEndef(&Parser, offLine);
     4045                        scmKmkHandleEndef(&Parser, offLine);
    41314046                        continue;
    41324047
    41334048                    case kKmkToken_override:
    41344049                    case kKmkToken_local:
    4135                         fModified |= scmKmkHandleAssignKeyword(&Parser, offLine, enmToken, cchWord, true /*fMustBeAssignment*/);
     4050                        scmKmkHandleAssignKeyword(&Parser, offLine, enmToken, cchWord, true /*fMustBeAssignment*/);
    41364051                        continue;
    41374052
    41384053                    case kKmkToken_export:
    4139                         fModified |= scmKmkHandleAssignKeyword(&Parser, offLine, enmToken, cchWord, false /*fMustBeAssignment*/);
     4054                        scmKmkHandleAssignKeyword(&Parser, offLine, enmToken, cchWord, false /*fMustBeAssignment*/);
    41404055                        continue;
    41414056
    41424057                    case kKmkToken_unexport:
    41434058                    case kKmkToken_undefine:
    4144                         fModified |= scmKmkHandleSimple(&Parser, offLine);
     4059                        scmKmkHandleSimple(&Parser, offLine);
    41454060                        break;
    41464061
     
    41584073                        if (scmKmkIsLineWithContinuation(pchLine, cchLine))
    41594074                            Parser.cchTotalLine = scmKmkLineContinuationPeek(&Parser, &Parser.cLines, NULL);
    4160                         fModified |= scmKmkHandleAssignmentOrRule(&Parser, offLine);
     4075                        scmKmkHandleAssignmentOrRule(&Parser, offLine);
    41614076                        continue;
    41624077                    }
     
    41804095    }
    41814096
    4182     return fModified ? kScmModified : kScmUnmodified;
     4097    return kScmMaybeModified; /* Make the caller check */
    41834098}
    41844099
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette