Changeset 1328 for trunk/dll/mainwnd.c


Ignore:
Timestamp:
Dec 9, 2008, 5:28:40 AM (17 years ago)
Author:
Gregg Young
Message:

Code cleanup replace sizeof calls for threaded drive scans

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/mainwnd.c

    r1326 r1328  
    29722972              sprintf(szKey, "%sDirCnrSort.%lu", szPrefix, numsaves);
    29732973              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->sortFlags,
    2974                                   sizeInt);
     2974                                  sizeof(INT));
    29752975              sprintf(szKey, "%sDirCnrFilter.%lu", szPrefix, numsaves);
    29762976              PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & dcd->mask,
     
    30493049      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(SWP));
    30503050      sprintf(szKey, "%sDirCnrSort.%lu", szPrefix, ulTemp);
    3051       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeInt);
     3051      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(INT));
    30523052      sprintf(szKey, "%sDirCnrFilter.%lu", szPrefix, ulTemp);
    30533053      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(MASK));
    30543054      sprintf(szKey, "%sDirCnrView.%lu", szPrefix, ulTemp);
    3055       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeUlong);
     3055      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(ULONG));
    30563056      sprintf(szKey, "%sDirCnr.%lu.DetailsLongname", szPrefix, ulTemp);
    3057       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool);
     3057      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    30583058      sprintf(szKey, "%sDirCnr.%lu.DetailsSubject", szPrefix, ulTemp);
    3059       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool);
     3059      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    30603060      sprintf(szKey, "%sDirCnr.%lu.DetailsSize", szPrefix, ulTemp);
    3061       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool);
     3061      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    30623062      sprintf(szKey, "%sDirCnr.%lu.DetailsEA", szPrefix, ulTemp);
    3063       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool);
     3063      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    30643064      sprintf(szKey, "%sDirCnr.%lu.DetailsAttr", szPrefix, ulTemp);
    3065       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool);
     3065      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    30663066      sprintf(szKey, "%sDirCnr.%lu.DetailsIcon", szPrefix, ulTemp);
    3067       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool);
     3067      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    30683068      sprintf(szKey, "%sDirCnr.%lu.DetailsLWDate", szPrefix, ulTemp);
    3069       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool);
     3069      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    30703070      sprintf(szKey, "%sDirCnr.%lu.DetailsLWTime", szPrefix, ulTemp);
    3071       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool);
     3071      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    30723072      sprintf(szKey, "%sDirCnr.%lu.DetailsLADate", szPrefix, ulTemp);
    3073       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool);
     3073      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    30743074      sprintf(szKey, "%sDirCnr.%lu.DetailsLATime", szPrefix, ulTemp);
    3075       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool);
     3075      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    30763076      sprintf(szKey, "%sDirCnr.%lu.DetailsCRDate", szPrefix, ulTemp);
    3077       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool);
     3077      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    30783078      sprintf(szKey, "%sDirCnr.%lu.DetailsCRTime", szPrefix, ulTemp);
    3079       PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeBool);
     3079      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, sizeof(BOOL));
    30803080      sprintf(szKey, "%sDirCnrDir.%lu", szPrefix, ulTemp);
    30813081      PrfWriteProfileString(fmprof, FM3Str, szKey, NULL);
     
    30853085  sprintf(szKey, "%sNumDirsLastTime", szPrefix);
    30863086  if (numsaves) {
    3087     PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & numsaves, sizeUlong);
     3087    PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & numsaves, sizeof(ULONG));
    30883088    WinQueryWindowPos(WinQueryWindow(hwndClient, QW_PARENT), &swp);
    30893089    sprintf(szKey, "%sMySizeLastTime", szPrefix);
     
    30953095  }
    30963096  else if (fIsShutDownState) {
    3097     PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & numsaves, sizeUlong);
     3097    PrfWriteProfileData(fmprof, FM3Str, szKey, (PVOID) & numsaves, sizeof(ULONG));
    30983098  }
    30993099
     
    32443244  }
    32453245  sprintf(szKey, "%sNumDirsLastTime", szPrefix);
     3246  size = sizeof(ULONG);
    32463247  if (PrfQueryProfileData(fmprof,
    3247                           FM3Str, szKey, (PVOID) &numsaves, &sizeUlong)) {
     3248                          FM3Str, szKey, (PVOID) &numsaves, &size)) {
    32483249    if (fDeleteState)
    32493250      PrfWriteProfileData(fmprof, FM3Str, szKey, NULL, 0L);
     
    32683269          localdcd.ds.detailslongname = dsDirCnrDefault.detailslongname;  // Set default
    32693270          sprintf(szKey, "%sDirCnr.%lu.DetailsLongname", szPrefix, x);
     3271          size = sizeof(BOOL);
    32703272          if (PrfQueryProfileData(fmprof,
    32713273                                  FM3Str,
    32723274                                  szKey,
    32733275                                  (PVOID) &localdcd.ds.detailslongname,
    3274                                   &sizeBool))
     3276                                  &size))
    32753277          {
    32763278            if (fDeleteState)
     
    32833285                                  szKey,
    32843286                                  (PVOID) &localdcd.ds.detailssubject,
    3285                                   &sizeBool))
     3287                                  &size))
    32863288          {
    32873289            if (fDeleteState)
     
    32943296                                  szKey,
    32953297                                  (PVOID) &localdcd.ds.detailsea,
    3296                                   &sizeBool))
     3298                                  &size))
    32973299          {
    32983300            if (fDeleteState)
     
    33053307                                  szKey,
    33063308                                  (PVOID) &localdcd.ds.detailssize,
    3307                                   &sizeBool))
     3309                                  &size))
    33083310          {
    33093311            if (fDeleteState)
     
    33163318                                  szKey,
    33173319                                  (PVOID) &localdcd.ds.detailsicon,
    3318                                   &sizeBool))
     3320                                  &size))
    33193321          {
    33203322            if (fDeleteState)
     
    33273329                                  szKey,
    33283330                                  (PVOID) &localdcd.ds.detailsattr,
    3329                                   &sizeBool))
     3331                                  &size))
    33303332          {
    33313333            if (fDeleteState)
     
    33383340                                  szKey,
    33393341                                  (PVOID) &localdcd.ds.detailscrdate,
    3340                                   &sizeBool))
     3342                                  &size))
    33413343          {
    33423344            if (fDeleteState)
     
    33493351                                  szKey,
    33503352                                  (PVOID) &localdcd.ds.detailscrtime,
    3351                                   &sizeBool))
     3353                                  &size))
    33523354          {
    33533355            if (fDeleteState)
     
    33603362                                  szKey,
    33613363                                  (PVOID) &localdcd.ds.detailslwdate,
    3362                                   &sizeBool))
     3364                                  &size))
    33633365          {
    33643366            if (fDeleteState)
     
    33713373                                  szKey,
    33723374                                  (PVOID) &localdcd.ds.detailslwtime,
    3373                                   &sizeBool))
     3375                                  &size))
    33743376          {
    33753377            if (fDeleteState)
     
    33823384                                  szKey,
    33833385                                  (PVOID) &localdcd.ds.detailsladate,
    3384                                   &sizeBool))
     3386                                  &size))
    33853387          {
    33863388            if (fDeleteState)
     
    33933395                                  szKey,
    33943396                                  (PVOID) &localdcd.ds.detailslatime,
    3395                                   &sizeBool))
     3397                                  &size))
    33963398          {
    33973399            if (fDeleteState)
     
    34373439                dcd->ds.detailslwtime   = localdcd.ds.detailslwtime  ;
    34383440                sprintf(szKey, "%sDirCnrSort.%lu", szPrefix, x);
     3441                size = sizeof(INT);
    34393442                if (PrfQueryProfileData(fmprof,
    34403443                                        FM3Str,
    34413444                                        szKey,
    34423445                                        (PVOID) &dcd->sortFlags,
    3443                                         &sizeInt)) {
     3446                                        &size)) {
    34443447                  if (!dcd->sortFlags)
    34453448                    dcd->sortFlags = SORT_PATHNAME;
     
    34623465                sprintf(szKey, "%sDirCnrView.%lu", szPrefix, x);
    34633466                if (!noview) {
     3467                  size = sizeof(ULONG);
    34643468                  if (PrfQueryProfileData(fmprof,
    34653469                                          FM3Str,
    34663470                                          szKey,
    34673471                                          (PVOID) &dcd->flWindowAttr,
    3468                                           &sizeUlong)) {
     3472                                          &size)) {
    34693473
    34703474                    CNRINFO cnri;
Note: See TracChangeset for help on using the changeset viewer.