Ignore:
Timestamp:
Dec 14, 2001, 11:41:33 PM (24 years ago)
Author:
umoeller
Message:

Lots of changes for icons and refresh.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/configsys.c

    r117 r123  
    9191    }
    9292
    93     arc = doshLoadTextFile(pcszFile,
    94                            ppszContents);
    95 
    96     if (arc == NO_ERROR)
     93    if (!(arc = doshLoadTextFile(pcszFile,
     94                                 ppszContents)))
    9795    {
    9896        // convert all \r\n to \n
     
    316314                     ULONG cbCopyTo)            // out: sizeof(*pszCopyTo)
    317315{
    318     PSZ     p = csysFindKey(pcszSearchIn, pcszKey, NULL, NULL),
     316    PSZ     p,
    319317            prc = NULL;
    320318
    321     if (p)
     319    if (p = csysFindKey(pcszSearchIn, pcszKey, NULL, NULL))
    322320    {
    323321        prc = p + strlen(pcszKey);
     
    326324            // copy to pszCopyTo
    327325            ULONG cb;
    328             PSZ pEOL = strhFindEOL(prc, &cb);
    329             if (pEOL)
     326            PSZ pEOL;
     327            if (pEOL = strhFindEOL(prc, &cb))
    330328            {
    331329                if (cb > cbCopyTo)
     
    370368{
    371369    BOOL    fIsAllUpperCase = FALSE;
    372     PSZ     pKey = csysFindKey(*ppszBuf,
    373                                pcszKey,
    374                                NULL,
    375                                &fIsAllUpperCase),
     370    PSZ     pKey,
    376371            pReturn = NULL;
    377     if (pKey)
     372    if (pKey = csysFindKey(*ppszBuf,
     373                           pcszKey,
     374                           NULL,
     375                           &fIsAllUpperCase))
    378376    {
    379377        // key found in file:
     
    381379
    382380        // replace existing parameter
    383         PSZ pOldParam = pKey + strlen(pcszKey);
    384         // pOldParam now has the old parameter, which we
    385         // will overwrite now; pOldParam points into *ppszBuf
    386 
    387         if (pOldParam)
    388         {
     381        PSZ pOldParam;
     382        if (pOldParam = pKey + strlen(pcszKey))
     383        {
     384            // pOldParam now has the old parameter, which we
     385            // will overwrite now; pOldParam points into *ppszBuf
     386
    389387            ULONG   ulOldParamOfs = pOldParam - *ppszBuf;
    390388
    391             PSZ pEOL = strhFindEOL(pOldParam, NULL);
    392             // pEOL now has first end-of-line after the parameter
    393 
    394             if (pEOL)
     389            PSZ pEOL;
     390            if (pEOL = strhFindEOL(pOldParam, NULL))
    395391            {
     392                // pEOL now has first end-of-line after the parameter
     393
    396394                // char count to replace
    397395                ULONG   ulToReplace = pEOL - pOldParam;
     
    477475    BOOL    fIsAllUpperCase = FALSE;
    478476    PSZ     pStartOfLine = NULL;
    479     PSZ     pKey = csysFindKey(pszSearchIn,
    480                                pszKey,
    481                                &pStartOfLine,
    482                                &fIsAllUpperCase);
     477    PSZ     pKey;
    483478    BOOL    brc = FALSE;
    484479
    485     if (pKey)
    486     {
    487         PSZ pEOL = strhFindEOL(pKey, NULL);
    488         // pEOL now has first end-of-line after the key
    489         if (pEOL)
    490         {
     480    if (pKey = csysFindKey(pszSearchIn,
     481                           pszKey,
     482                           &pStartOfLine,
     483                           &fIsAllUpperCase))
     484    {
     485        PSZ pEOL;
     486        if (pEOL = strhFindEOL(pKey, NULL))
     487        {
     488            // pEOL now has first end-of-line after the key;
    491489            // go to first character after EOL
    492490            while (    (*pEOL)
     
    604602
    605603    // First, check if the new-line string has a "=" char
    606     PSZ pSep = strchr(pManip->pszNewLine, '=');
    607     if (pSep)
     604    PSZ pSep;
     605    if (pSep = strchr(pManip->pszNewLine, '='))
    608606    {
    609607        // yes: separate in two strings
     
    751749                // Manip.pszSearchString has the search string
    752750                // before whose line we must insert
    753                 PSZ pFound = strhistr(*ppszContents,
    754                                       pManip->pszVerticalSearchString);
    755                 if (pFound)
     751                PSZ pFound;
     752                if (pFound = strhistr(*ppszContents,
     753                                      pManip->pszVerticalSearchString))
    756754                {
    757755                    // search string found:
     
    777775                // Manip.pszSearchString has the search string
    778776                // after whose line we must insert
    779                 PSZ pFound = strhistr(*ppszContents, pManip->pszVerticalSearchString);
    780                 if (pFound)
     777                PSZ pFound;
     778                if (pFound = strhistr(*ppszContents,
     779                                      pManip->pszVerticalSearchString))
    781780                {
    782781                    // search string found:
Note: See TracChangeset for help on using the changeset viewer.