Changeset 1673 for trunk/dll/inis.c


Ignore:
Timestamp:
Dec 30, 2012, 7:51:01 PM (13 years ago)
Author:
Gregg Young
Message:

Update to Doxygen comment style Ticket 55. Also some minor code cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/inis.c

    r1554 r1673  
    244244                                      (PSZ) inirec->app,
    245245                                      NULL, (PULONG) & ulSize) && ulSize) {
    246                 pDataK = xmalloc(ulSize, pszSrcFile, __LINE__); /* allocate space for keynames */
     246                pDataK = xmalloc(ulSize, pszSrcFile, __LINE__); // allocate space for keynames
    247247                if (pDataK) {
    248                   /* get keynames */
     248                  // get keynames
    249249                  if (PrfQueryProfileString(hiniTo,
    250250                                            (PSZ) inirec->app,
    251251                                            NULL, "\0", pDataK, ulSize)) {
    252252                    pCurrentK = pDataK;
    253                     /* step through keynames */
     253                    // step through keynames
    254254                    while (*pCurrentK) {
    255255                      if (PrfQueryProfileSize(hiniTo, inirec->app,
     
    258258                        pData = xmalloc(ulSize, pszSrcFile, __LINE__);
    259259                        if (pData) {
    260                           /* get data */
     260                          // get data
    261261                          if (PrfQueryProfileData(hiniTo, inirec->app,
    262262                                                  pCurrentK,
    263263                                                  pData, (PULONG) & ulSize))
    264                             /* write data to new ini file */
     264                            // write data to new ini file
    265265                            PrfWriteProfileData(hiniFrom, ((*inirec->app2) ?
    266266                                                        inirec->
    267267                                                        app2 : inirec->app),
    268268                                                pCurrentK, pData, ulSize);
    269                           free(pData);  /* free data */
     269                          free(pData);  // free data
    270270                        }
    271271                      }
    272                       while (*pCurrentK)        /* next keyname */
     272                      while (*pCurrentK)        // next keyname
    273273                        pCurrentK++;
    274274                      pCurrentK++;
    275275                    }
    276276                  }
    277                   free(pDataK);         /* free keynames */
     277                  free(pDataK);         // free keynames
    278278                }
    279279              }
     
    301301                pData = xmalloc(ulSize, pszSrcFile, __LINE__);
    302302                if (pData) {
    303                   /* get data */
     303                  // get data
    304304                  if (PrfQueryProfileData(hiniTo, inirec->app,
    305305                                          inirec->key,
    306306                                          pData, (PULONG) & ulSize))
    307                     /* write data to new ini file */
     307                    // write data to new ini file
    308308                    PrfWriteProfileData(hiniFrom, ((*inirec->app2) ?
    309309                                                inirec->app2 : inirec->app),
     
    311311                                         inirec->key2 : inirec->key),
    312312                                        pData, ulSize);
    313                   free(pData);          /* free data */
     313                  free(pData);          // free data
    314314                }
    315315              }
     
    429429            if (PrfQueryProfileSize(orig, NULL, NULL, (PULONG) & ulSize)
    430430                && ulSize) {
    431               pDataA = xmalloc(ulSize, pszSrcFile, __LINE__);   /* allocate space for applnames */
     431              pDataA = xmalloc(ulSize, pszSrcFile, __LINE__);   /// allocate space for applnames
    432432              if (pDataA) {
    433                 /* get applnames */
     433                // get applnames
    434434                if (PrfQueryProfileString
    435435                    (orig, NULL, NULL, "\0", pDataA, ulSize)) {
    436436                  pCurrentA = pDataA;
    437                   /* step through applnames */
     437                  // step through applnames
    438438                  while (*pCurrentA) {
    439                     /* now keynames for this applname */
     439                    // now keynames for this applname
    440440                    if (PrfQueryProfileSize(orig, (PSZ) pCurrentA, NULL,
    441441                                            (PULONG) & ulSize) && ulSize) {
    442                       pDataK = xmalloc(ulSize, pszSrcFile, __LINE__);   /* allocate space for keynames */
     442                      pDataK = xmalloc(ulSize, pszSrcFile, __LINE__);   // allocate space for keynames
    443443                      if (pDataK) {
    444                         /* get keynames */
     444                        // get keynames
    445445                        if (PrfQueryProfileString(orig, (PSZ) pCurrentA, NULL,
    446446                                                  "\0", pDataK, ulSize)) {
    447447                          pCurrentK = pDataK;
    448                           /* step through keynames */
     448                          // step through keynames
    449449                          while (*pCurrentK) {
    450450                            if (PrfQueryProfileSize(orig, pCurrentA,
     
    454454                              pData = xmalloc(ulSize, pszSrcFile, __LINE__);
    455455                              if (pData) {
    456                                 /* get data */
     456                                // get data
    457457                                if (PrfQueryProfileData(orig, pCurrentA,
    458458                                                        pCurrentK,
    459459                                                        pData,
    460460                                                        (PULONG) & ulSize))
    461                                   /* write data to new ini file */
     461                                  // write data to new ini file
    462462                                  PrfWriteProfileData(new, pCurrentA,
    463463                                                      pCurrentK, pData,
    464464                                                      ulSize);
    465                                 free(pData);    /* free data */
     465                                free(pData);    // free data
    466466                              }
    467467                            }
    468                             while (*pCurrentK)  /* next keyname */
     468                            while (*pCurrentK)  // next keyname
    469469                              pCurrentK++;
    470470                            pCurrentK++;
    471471                          }
    472472                        }
    473                         free(pDataK);   /* free keynames */
     473                        free(pDataK);   // free keynames
    474474                      }
    475475                    }
    476                     while (*pCurrentA)  /* next applname */
     476                    while (*pCurrentA)  // next applname
    477477                      pCurrentA++;
    478478                    pCurrentA++;
    479479                  }
    480480                }
    481                 free(pDataA);           /* free applnames */
     481                free(pDataA);           // free applnames
    482482              }
    483483            }
     
    11781178        }
    11791179        CloseProfile(testini, FALSE);
    1180         /* make copies of new inis */
     1180        // make copies of new inis
    11811181        *tempuserini = 0;
    11821182        *tempsysini = 0;
     
    12171217        }
    12181218        else {
    1219           /* backup old inis */
     1219          // backup old inis
    12201220          strcpy(tempuserini2, olduserini);
    12211221          p = strrchr(tempuserini2, '\\');
     
    12601260            break;
    12611261          }
    1262           /* copy new inis to old ini names */
     1262          // copy new inis to old ini names
    12631263          rc = DosCopy(userini, olduserini, DCPY_EXISTING);
    12641264          if (rc) {
     
    12851285            break;
    12861286          }
    1287           /* replace temp inis with new permanent inis */
     1287          // replace temp inis with new permanent inis
    12881288          memset(&prfp, 0, sizeof(PRFPROFILE));
    12891289          prfp.cchUserName = strlen(oldsysini);
     
    15151515HWND StartIniEditor(HWND hwnd, CHAR *fname, INT flags)
    15161516{
    1517   /*
     1517  /**
    15181518   * create an ini editor window
    15191519   * bitmapped flags:
     
    16991699      else {
    17001700        pDItem = DrgQueryDragitemPtr(pDInfo,0);
    1701         /* Check valid rendering mechanisms and data */
     1701        // Check valid rendering mechanisms and data
    17021702        if (DrgVerifyRMF(pDItem, (CHAR *) DRM_OS2FILE, NULL)) {
    17031703          DrgFreeDraginfo(pDInfo);
    1704           return (MRFROM2SHORT(DOR_DROP, DO_LINK));     /* OK to drop */
     1704          return (MRFROM2SHORT(DOR_DROP, DO_LINK));     // OK to drop
    17051705        }
    17061706        else if (DrgVerifyRMF(pDItem, (CHAR *) DRM_FM2INIRECORD, (CHAR *) DRF_FM2INI)) {
     
    17241724    {
    17251725      PDRAGINFO pDInfo = (PDRAGINFO) mp1;
    1726       PDRAGITEM pDItem;         /* Pointer to DRAGITEM */
     1726      PDRAGITEM pDItem;         // Pointer to DRAGITEM
    17271727      ULONG numitems, curitem, len;
    17281728      USHORT action;
     
    20442044    return 0;
    20452045
    2046   case UM_INITIALSIZE:                  /* kludge */
     2046  case UM_INITIALSIZE:                  // kludge
    20472047    inidata = INSTDATA(hwnd);
    20482048    if (!inidata)
     
    20862086
    20872087  case UM_LOADFILE:
    2088     /* load initial file */
     2088    // load initial file
    20892089    inidata = INSTDATA(hwnd);
    20902090    if (!inidata)
     
    21372137        WinFillRect(hps, &rcl, CLR_PALEGRAY);
    21382138        WinEndPaint(hps);
    2139         /*
    2140          * tell status window to paint its box
    2141          */
     2139        // tell status window to paint its box
    21422140        PaintRecessedWindow(WinWindowFromID(hwnd, INI_APPHDR),
    21432141                            (HPS) 0, FALSE, FALSE);
Note: See TracChangeset for help on using the changeset viewer.