Ignore:
Timestamp:
Sep 30, 2023, 11:06:42 PM (23 months ago)
Author:
erdmann
Message:

Created branch v2.9_Lars.

Location:
branches/v2.9_Lars
Files:
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/v2.9_Lars/classes/c/c_audio/cwaudio.c

    r60 r74  
     1
     2/*
     3 *  This file was generated by the SOM Compiler.
     4 *  Generated using:
     5 *     SOM incremental update: 2.47
     6 */
     7
    18
    29/*
     
    666673 * The prototype for cwaudio_cwmmSetTrackInfo was replaced by the following prototype:
    667674 */
     675
     676/*
     677 * SOM_Scope BOOL  SOMLINK cwaudio_cwmmSetTrackInfo(MMAudio *somSelf,
     678 *                                                  char* chrString,
     679 *                                                  ULONG ulValue,
     680 *                                                  int iWhich)
     681 */
     682
     683/*
     684 * The prototype for cwaudio_cwmmSetTrackInfo was replaced by the following prototype:
     685 */
    668686SOM_Scope BOOL  SOMLINK cwaudio_cwmmSetTrackInfo(MMAudio *somSelf,
    669687                                                 char* chrString,
    670688                                                 ULONG ulValue,
    671                                                  int iWhich)
     689                                                 ULONG iWhich)
    672690{
    673691  ULONG ulError;
     
    941959/* successful completion.                                */
    942960/*!!******************************************************/
     961
     962/*
     963 * SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf,
     964 *                                                     PSZ chrString,
     965 *                                                     ULONG ulSize,
     966 *                                                     int iWhich)
     967 */
     968
     969/*
     970 * The prototype for cwaudio_cwmmQueryTrackInfo was replaced by the following prototype:
     971 */
    943972SOM_Scope ULONG  SOMLINK cwaudio_cwmmQueryTrackInfo(MMAudio *somSelf,
    944973                                                    PSZ chrString,
    945974                                                    ULONG ulSize,
    946                                                     int iWhich)
     975                                                    ULONG iWhich)
    947976{
    948977  MMAudioData *somThis = MMAudioGetData(somSelf);
  • branches/v2.9_Lars/classes/c/c_audio/cwcdtrack.c

    r2 r74  
     1
     2/*
     3 *  This file was generated by the SOM Compiler.
     4 *  Generated using:
     5 *     SOM incremental update: 2.47
     6 */
     7
    18
    29/*
     
    281288 * The prototype for cwcdtrack_cwmmQueryTrackInfo was replaced by the following prototype:
    282289 */
     290
     291/*
     292 * SOM_Scope ULONG  SOMLINK cwcdtrack_cwmmQueryTrackInfo(MMCDTrack *somSelf,
     293 *                                                       PSZ chrString,
     294 *                                                       ULONG ulSize,
     295 *                                                       int iWhich)
     296 */
     297
     298/*
     299 * The prototype for cwcdtrack_cwmmQueryTrackInfo was replaced by the following prototype:
     300 */
    283301SOM_Scope ULONG  SOMLINK cwcdtrack_cwmmQueryTrackInfo(MMCDTrack *somSelf,
    284302                                                      PSZ chrString,
    285303                                                      ULONG ulSize,
    286                                                       int iWhich)
     304                                                      ULONG iWhich)
    287305{
    288306    MMCDTrackData *somThis = MMCDTrackGetData(somSelf);
  • branches/v2.9_Lars/classes/c/c_audio/cwmp3.c

    r2 r74  
     1
     2/*
     3 *  This file was generated by the SOM Compiler.
     4 *  Generated using:
     5 *     SOM incremental update: 2.47
     6 */
     7
     8
    19/*
    210 * (C) Chris Wohlgemuth 2002-2004
     
    847855 *    cwmmAddTrackNamePage      : override;
    848856 */
     857
     858/*
     859 * SOM_Scope ULONG  SOMLINK cwmp3_cwmmQueryTrackInfo(MMMP3 *somSelf,
     860 *                                                   PSZ chrString,
     861 *                                                   ULONG ulSize,
     862 *                                                   int iWhich)
     863 */
     864
     865/*
     866 * The prototype for cwmp3_cwmmQueryTrackInfo was replaced by the following prototype:
     867 */
    849868SOM_Scope ULONG  SOMLINK cwmp3_cwmmQueryTrackInfo(MMMP3 *somSelf,
    850869                                                  PSZ chrString,
    851870                                                  ULONG ulSize,
    852                                                   int iWhich)
     871                                                  ULONG iWhich)
    853872{
    854873  somId id;
  • branches/v2.9_Lars/classes/c/c_audio/cwogg.c

    r2 r74  
     1
     2/*
     3 *  This file was generated by the SOM Compiler.
     4 *  Generated using:
     5 *     SOM incremental update: 2.47
     6 */
     7
     8
    19/*
    210 * (C) Chris Wohlgemuth 2002-2004
     
    8896 * The prototype for cwogg_cwmmQueryTrackInfo was replaced by the following prototype:
    8997 */
     98
     99/*
     100 * SOM_Scope ULONG  SOMLINK cwogg_cwmmQueryTrackInfo(MMOGG *somSelf,
     101 *                                                   PSZ chrString,
     102 *                                                   ULONG ulSize,
     103 *                                                   int iWhich)
     104 */
     105
     106/*
     107 * The prototype for cwogg_cwmmQueryTrackInfo was replaced by the following prototype:
     108 */
    90109SOM_Scope ULONG  SOMLINK cwogg_cwmmQueryTrackInfo(MMOGG *somSelf,
    91110                                                  PSZ chrString,
    92111                                                  ULONG ulSize,
    93                                                   int iWhich)
     112                                                  ULONG iWhich)
    94113{
    95114  /*     MMOGGData *somThis = MMOGGGetData(somSelf); */
  • branches/v2.9_Lars/classes/c/c_common/except.c

    r41 r74  
    459459
    460460  return 'c';
    461 } 
     461}
    462462
    463463ULONG _System excHandler(PEXCEPTIONREPORTRECORD pERepRec,
     
    515515{
    516516  ULONG rc = XCPT_CONTINUE_SEARCH;
    517  
     517
    518518  if (pERepRec->fHandlerFlags & EH_EXIT_UNWIND)
    519519    return (XCPT_CONTINUE_SEARCH);
     
    522522  if (pERepRec->fHandlerFlags & EH_NESTED_CALL)
    523523    return (XCPT_CONTINUE_SEARCH);
    524  
     524
    525525  if ((pERepRec->ExceptionNum & XCPT_SEVERITY_CODE) == XCPT_FATAL_EXCEPTION)
    526526    {
     
    655655          }
    656656#endif
    657        
     657
    658658        fAlreadyTrapped = TRUE;
    659659        /* end  John Currier's recursion prevention */
     
    11811181}
    11821182
    1183 #include <exe.h>
    11841183#include <newexe.h>
    11851184#define  FOR_EXEHDR  1  /* avoid define conflicts between newexe.h and exe386.h */
     
    18351834               do {
    18361835                  read(fh,(void *)&FirstLine,sizeof(FirstLine));
    1837    
     1836
    18381837                  if (FirstLine.LineNum!=0) {
    18391838                     fprintf(hTrap,"Missing Line table information\n");
     
    18641863                        }
    18651864                        break;
    1866    
     1865
    18671866                     case 1:
    18681867                        lseek(fh, sizeof(struct linlist_rec), SEEK_CUR);
    18691868                        break;
    1870    
     1869
    18711870                     case 2:
    18721871                        lseek(fh, sizeof(struct linsourcelist_rec), SEEK_CUR);
    18731872                        break;
    1874    
     1873
    18751874                     case 3:
    18761875                        lseek(fh, sizeof(struct filenam_rec), SEEK_CUR);
    18771876                        break;
    1878    
     1877
    18791878                     case 4:
    18801879                        lseek(fh, sizeof(struct pathtab_rec), SEEK_CUR);
    18811880                        break;
    1882    
     1881
    18831882                  }
    18841883               }
  • branches/v2.9_Lars/classes/c/c_common/helper.c

    r57 r74  
    1919/*
    2020 * If you need another license for your prject/product contact me at
    21  * 
     21 *
    2222 * http://www.os2world.com/cdwriting
    2323 * http://www.geocities.com/SiliconValley/Sector/5785/
     
    4141
    4242#ifndef BS_NOTEBOOKBUTTON
    43 #define BS_NOTEBOOKBUTTON 8L   /* Warp 4 notebook style */ 
     43#define BS_NOTEBOOKBUTTON 8L   /* Warp 4 notebook style */
    4444#endif
    4545
     
    6666
    6767
    68   memset(&pDetails, 0, sizeof(pDetails)); 
     68  memset(&pDetails, 0, sizeof(pDetails));
    6969  pDetails.Length          = sizeof(PROGDETAILS);
    7070  pDetails.progt.progc     = PROG_DEFAULT;
     
    8181  }
    8282  pDetails.pszExecutable   = wrapperExe;
    83  
     83
    8484  pDetails.pszEnvironment  = NULLHANDLE;
    8585  pDetails.swpInitial.fl   = SWP_ACTIVATE|SWP_ZORDER; /* window positioning */
     
    9292  //  pDetails.swpInitial.ulReserved1      = 0;
    9393  //  pDetails.swpInitial.ulReserved2      = 0;
    94  
     94
    9595  /* Create an object window which will process the WM_APPTERMINATE message. While processing of this
    9696   message the view item (see below) will be removed from the inuse list thus removing the inuse emphasis. */
     
    150150  if(!hModule)
    151151    {
    152      
     152
    153153      if(queryModuleHandle())
    154154        {
     
    170170              if(NO_ERROR!=DosScanEnv("LANG", &pszLang))
    171171                break;
    172              
     172
    173173              /* Skip leading spaces */
    174174              chrPtr=pszLang;
    175175              while(*chrPtr==' ')
    176176                chrPtr++;
    177              
     177
    178178              /* Check if value seems to be valid. The var must be something like xx_XX thus length is 5 */
    179179              if(strlen(chrPtr)<5)
    180180                break;
    181              
    182               /* Extract the first two chars */       
     181
     182              /* Extract the first two chars */
    183183              sprintf(buf, RESDLLNAME, chrPtr[0], chrPtr[1]);
    184184              strcat(resDLLPath,buf);
     
    187187              //  HlpWriteToTrapLog(resDLLPath);
    188188              //  HlpWriteToTrapLog("\n");
    189        
     189
    190190              rc=DosLoadModule(buf,sizeof(buf), resDLLPath, &hModule);
    191191              if(rc==NO_ERROR)
    192192                break;
    193        
     193
    194194              /* Insert message in Logfile */
    195195              //  writeLog("Ressource-DLL for the current countrycode not found. Trying to load default one (CDFLD001.DLL).\n");
    196        
     196
    197197              /* NLS DLL not found. Try to load default */
    198198              found=strrchr(resDLLPath,'\\');
    199199              if(!found)
    200200                break;
    201              
     201
    202202              *found=0;
    203203
     
    206206              //   HlpWriteToTrapLog(resDLLPath);
    207207              //   HlpWriteToTrapLog("\n");
    208              
     208
    209209              rc=DosLoadModule(buf,sizeof(buf), resDLLPath, &hModule);
    210210              if(rc!=NO_ERROR) {
     
    215215                //writeLog("Ressource DLL loaded.\n");
    216216              }
    217              
     217
    218218              break;
    219219            }while(TRUE);
     
    242242      ULONG ulObj, ulBufLen, ulOffset;
    243243      char thePath[CCHMAXPATH];
    244      
     244
    245245      if(DosQueryModFromEIP( &hModule,
    246246                             &ulObj,
     
    248248                             thePath,
    249249                             &ulOffset,
    250                              (PVOID)queryModuleHandle )!=NO_ERROR) {
     250                             (ULONG)queryModuleHandle )!=NO_ERROR) {
    251251        SysWriteToTrapLog("Can't get module handle for CWMM class DLL!\n");
    252252        hModule=0;
     
    291291      strncpy(classDLLPath,moduleName, sizeof(classDLLPath));
    292292      classDLLPath[sizeof(classDLLPath)-1]=0;
    293      
     293
    294294      /* Get install dir */
    295295      strncpy(chrInstallDir,moduleName, sizeof(chrInstallDir));
     
    303303        strncpy(classDLLPath,chrInstallDir, sizeof(classDLLPath));
    304304        classDLLPath[sizeof(classDLLPath)-1]=0;
    305        
     305
    306306        /* Get install dir */
    307307        if((chrPtr=strrchr(chrInstallDir,'\\'))!=NULLHANDLE)
     
    352352    HENUM henum;
    353353    HWND hwnd;
    354    
     354
    355355    /* Move the default notebook buttons */
    356356    if((henum=WinBeginEnumWindows(hwndDlg))!=NULLHANDLE) {
     
    396396    {
    397397      snprintf(setup, sizeof(setup), "LOCATOR=%s;%s", chrUrl, "OPEN=DEFAULT");
    398       WinCreateObject("WPUrl","tempUrl", setup, tempDir, 
     398      WinCreateObject("WPUrl","tempUrl", setup, tempDir,
    399399                      CO_UPDATEIFEXISTS);
    400400        /* WinDestroyObject(hObject); Don't use it, blocks PM */
     
    402402}
    403403
    404 /* This function checks if the given file exists */ 
     404/* This function checks if the given file exists */
    405405ULONG checkFileSize(char* chrFileName)
    406406{
     
    410410  if(stat(chrFileName , &statBuf)==-1)
    411411    return 0;
    412  
     412
    413413  return statBuf.st_size;
    414414}
  • branches/v2.9_Lars/classes/c/c_mm/mmfolder.c

    r69 r74  
    1717 * along with this program; see the file COPYING.  If not, write to
    1818 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
    19  */         
     19 */
    2020/*
    2121 * If you need another license for your project/product (commercial,
    2222 * noncommercial, whatever) contact me at
    23  * 
     23 *
    2424 * http://www.os2world.com/cdwriting
    2525 * http://www.geocities.com/SiliconValley/Sector/5785/
     
    2828/*
    2929 *  This file was generated by the SOM Compiler and Emitter Framework.
    30  *  Generated using: 
     30 *  Generated using:
    3131 *      SOM Emitter emitctm: 2.42
    3232 */
     
    7777  somId mySomId;
    7878  static SOMClass * mWPFolderClass=NULLHANDLE;
    79  
     79
    8080  if(!mWPFolderClass) {
    8181    if((mySomId=somIdFromString("WPFolder"))!=NULLHANDLE) {
     
    107107  somId mySomId;
    108108  static SOMClass *mWPImgClass=NULL;
    109  
     109
    110110  if(!mWPImgClass) {
    111111    if((mySomId=somIdFromString("MMBitmap"))!=NULLHANDLE) {
     
    117117}
    118118
    119 MRESULT EXPENTRY mmFolderContainerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
     119MRESULT EXPENTRY mmFolderContainerProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    120120{
    121121  HWND hwndStore;
     
    136136
    137137        if(pCnrInfo) {
    138           //      writeLog("flWindowAttr: 0x%x, Mask: 0x%x, cxTreeIndent: %d, cyLineSpacing: %d\n", 
     138          //      writeLog("flWindowAttr: 0x%x, Mask: 0x%x, cxTreeIndent: %d, cyLineSpacing: %d\n",
    139139          //       pCnrInfo->flWindowAttr, LONGFROMMP(mp2), pCnrInfo->cxTreeIndent, pCnrInfo->cyLineSpacing);
    140140
     
    147147                somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
    148148                if(somIsObj(somSelf)) {
    149                   MMFolderData *somThis = MMFolderGetData(somSelf); 
    150                  
     149                  MMFolderData *somThis = MMFolderGetData(somSelf);
     150
    151151                  pCnrInfo->flWindowAttr&=~CA_DRAWICON;
    152152                  pCnrInfo->flWindowAttr|=CA_DRAWBITMAP|CA_OWNERDRAW;
    153153                  pCnrInfo->slBitmapOrIcon.cx=_ulCurrentSize;
    154154                  pCnrInfo->slBitmapOrIcon.cy=_ulCurrentSize;
    155                  
     155
    156156                  mp2=MPFROMLONG(LONGFROMMP(mp2)|CMA_SLBITMAPORICON|CMA_FLWINDOWATTR);
    157157                }
     
    183183          somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
    184184          if(somIsObj(somSelf)) {
    185             MMFolderData *somThis = MMFolderGetData(somSelf); 
     185            MMFolderData *somThis = MMFolderGetData(somSelf);
    186186            if(_oldContainerProc)
    187187              return _oldContainerProc(hwnd, msg, mp1, mp2);
    188188          }
    189189        }
    190     }   
     190    }
    191191  return WinDefWindowProc(hwnd, msg, mp1, mp2);
    192192}
     
    239239  HPOINTER hptrTemplate;
    240240  HMODULE hmodTemplate;
    241  
     241
    242242  if(!DosQueryModuleHandle("PMWP",&hmodTemplate))
    243243    {
    244244      ULONG ulIconSize;
    245      
     245
    246246      hptrTemplate=WinLoadPointer(HWND_DESKTOP, hmodTemplate, 20);
    247247      WinDrawPointer(hps, rcl->xLeft, rcl->yBottom, hptrTemplate, (flCnr &  CV_MINI ? DP_MINI:DP_NORMAL));
     
    255255      return DP_MINI;
    256256    }
    257  
     257
    258258  return DP_NORMAL;
    259259}
    260260
    261261
    262 MRESULT EXPENTRY mmFolderFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) 
     262MRESULT EXPENTRY mmFolderFrameProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
    263263{
    264264  HWND hwndStore;
     
    273273      {
    274274        POWNERITEM pOwnerItem=(POWNERITEM)PVOIDFROMMP(mp2);
    275  
     275
    276276
    277277        /* We only draw icons not text */
     
    299299            POINTL pointl;
    300300
    301             WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE);           
     301            WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE);
    302302            GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG2);
    303303            pointl.x = rclTemp.xLeft;
     
    307307            pointl.y = rclTemp.yTop - 1;
    308308            GpiSetColor(pOwnerItem->hps, CLR_BLACK);
    309             GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);         
    310            
     309            GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);
     310
    311311          }
    312312          /* Check if record is in use */
     
    314314            POINTL pointl;
    315315
    316             WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE);           
     316            WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE);
    317317            GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG1);
    318318            pointl.x = rclTemp.xLeft;
     
    322322            pointl.y = rclTemp.yTop - 1;
    323323            GpiSetColor(pOwnerItem->hps, CLR_BLACK);
    324             GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);                   
     324            GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);
    325325          }
    326326          /* or is it only selected? */
     
    330330          else
    331331            WinFillRect(pOwnerItem->hps, &rclTemp, CLR_WHITE);
    332           /* Emphasis drawn */         
     332          /* Emphasis drawn */
    333333
    334334          /********************************************/
     
    340340            WPObject *wpObject;
    341341            ULONG ulIconSize=150;/* Default if query fails */
    342            
     342
    343343            wpObject=(WPObject*)OBJECT_FROM_PREC(mrc); // Get object
    344344            wpObject=somGetFileSystemObject(wpObject);  // Get Filesystem object
     
    356356                SysWriteToTrapLog("Object is an image. (%s line: %d)\n", __FUNCTION__, __LINE__);
    357357#endif
    358                 /* Get object pointer of lighttable folder */               
     358                /* Get object pointer of lighttable folder */
    359359                if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE)
    360360                  {
    361361                    somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
    362362                    if(somIsObj(somSelf)) {
    363                       MMFolderData *somThis = MMFolderGetData(somSelf); 
     363                      MMFolderData *somThis = MMFolderGetData(somSelf);
    364364                      ulIconSize=_ulCurrentSize;
    365365                    }
     
    423423                      /* And now draw the bitmap */
    424424#if 0
    425                       if(pBmpInfoHeader2->cclrUsed==2) {                       
     425                      if(pBmpInfoHeader2->cclrUsed==2) {
    426426                        WinDrawBitmap(pOwnerItem->hps, hbm, NULL, (PPOINTL)&rcl,//pOwnerItem->rclItem,
    427427                                      CLR_WHITE, CLR_BLACK, DBM_STRETCH /*| DBM_IMAGEATTRS*/);
     
    437437                    /* Done */
    438438                    if(_somIsA(wpObject, cwImageClass)) {
    439                       MMImage_cwmmFreeSmallBitmap((MMImage *)wpObject);
    440                     }
    441                     else {
    442                      MMBitmap_cwmmFreeSmallBitmap((MMBitmap*)wpObject);
     439                       MMImage_cwmmFreeSmallBitmap((MMImage *)wpObject);
     440                    }
     441                    else {
     442                       MMBitmap_cwmmFreeSmallBitmap((MMBitmap*)wpObject);
    443443                    }
    444444                    return (MRESULT) TRUE;
     
    474474                  {
    475475                    SOMClass* wpFolderClass=queryWpFolderClass();
    476                    
     476
    477477                    if(somIsObj(wpFolderClass)) {
    478                       if(_somIsA(wpObject, wpFolderClass)) {   
     478                      if(_somIsA(wpObject, wpFolderClass)) {
    479479                        /* It's a folder */
    480480                        HPOINTER hptr;
    481                        
     481
    482482                        pOwnerItem->rclItem.xLeft=rcl.xLeft;
    483483                        pOwnerItem->rclItem.yBottom=rcl.yBottom;
    484                        
     484
    485485                        /* The following is only for Warp 4 but Warp 3 isn't supported anyway...*/
    486486                        hptr=_wpQueryIconN(wpObject,1);
     
    489489                          return (MRESULT) TRUE;
    490490                        }
    491                        
     491
    492492                      }
    493493                    }/* if(somIsObj(wpFolderClass)) */
    494494                  }/* if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE) */
    495                
     495
    496496                if(WinDrawPointer(pOwnerItem->hps, rcl.xLeft, rcl.yBottom, mrc->hptrIcon, ulMiniOrNormal)) {
    497497                  cwDraw2ColorBorder(pOwnerItem->hps, &rclTemp, CLR_BLACK, CLR_DARKGRAY);
     
    508508          /*************************/
    509509          PCNRDRAWITEMINFO pCnrDrawItemInfo=(PCNRDRAWITEMINFO)pOwnerItem->hItem;
    510          
     510
    511511          if(pCnrDrawItemInfo && pCnrDrawItemInfo->pFieldInfo->flData & CFA_BITMAPORICON) {
    512512            PMINIRECORDCORE mrc=(PMINIRECORDCORE)((PCNRDRAWITEMINFO)pOwnerItem->hItem)->pRecord;
     
    517517              HWND hwndCnr=WinWindowFromID(hwnd, FID_CLIENT);
    518518              RECTL rclTemp=pOwnerItem->rclItem;
    519              
     519
    520520              wpObjToRefresh=(WPObject*)OBJECT_FROM_PREC(mrc);//Get object
    521521              wpObject=somGetFileSystemObject(wpObjToRefresh);
    522              
     522
    523523              /* Draw Background */
    524524              rclTemp.xLeft+=2;
     
    526526              rclTemp.yBottom+=2;
    527527              rclTemp.yTop-=2;
    528              
     528
    529529              /* Check if record is selected and in use... */
    530530              if((pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE)
    531531                 && (pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_SELECTED)) {
    532532                POINTL pointl;
    533                
     533
    534534                GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG2);
    535535                pointl.x = rclTemp.xLeft;
     
    539539                pointl.y = rclTemp.yTop - 1;
    540540                GpiSetColor(pOwnerItem->hps, CLR_BLACK);
    541                 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);         
    542                
     541                GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);
     542
    543543              }
    544544              /* or only in use... */
    545545              else if(pCnrDrawItemInfo->pRecord->flRecordAttr & CRA_INUSE) {
    546546                POINTL pointl;
    547                
     547
    548548                GpiSetPattern(pOwnerItem->hps,PATSYM_DIAG1);
    549549                pointl.x = rclTemp.xLeft;
     
    553553                pointl.y = rclTemp.yTop - 1;
    554554                GpiSetColor(pOwnerItem->hps, CLR_BLACK);
    555                 GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);         
     555                GpiBox(pOwnerItem->hps,DRO_FILL,&pointl,1,1);
    556556              }
    557557              /* or only selected. */
     
    564564                SOMClass* cwBitmapClass=queryCWBitmapFileClass();
    565565                SOMClass* cwImageClass=queryCWImageFileClass();
    566                
     566
    567567                if(somIsObj(cwImageClass)||somIsObj(cwBitmapClass)) {
    568568                  HBITMAP hbm=NULLHANDLE;
    569569                  PBITMAPINFOHEADER2 pBmpInfoHeader2;
    570                  
     570
    571571                  /* Query object pointer */
    572572                  if((hwndStore=WinWindowFromID(hwnd, STOREWINDOWID))!=NULLHANDLE)
     
    574574                      somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
    575575                      if(somIsObj(somSelf)) {
    576                         MMFolderData *somThis = MMFolderGetData(somSelf); 
     576                        MMFolderData *somThis = MMFolderGetData(somSelf);
    577577                        ulIconSize=_ulCurrentSize;
    578578                      }
    579579                    }
    580                   /* Get the small bitmap from the object */ 
     580                  /* Get the small bitmap from the object */
    581581                  if(_somIsA(wpObject, cwImageClass)) {
    582582                    hbm=MMImage_cwmmQuerySmallBitmapHandle( (MMImage*) wpObject, ulIconSize, mrc, hwndCnr);
     
    584584                  }
    585585                  else if(_somIsA(wpObject, cwBitmapClass)) {
    586                     hbm=MMBitmap_cwmmQuerySmallBitmapHandle( (MMImage*) wpObject, ulIconSize);
     586                    hbm=MMBitmap_cwmmQuerySmallBitmapHandle( (MMBitmap*) wpObject, ulIconSize);
    587587                    pBmpInfoHeader2=(PBITMAPINFOHEADER2)_wpQueryBitmapInfoHeader((MMBitmap*)wpObject);
    588588                  }
     
    636636                      }
    637637                      if(_somIsA(wpObject, cwImageClass)) {
    638                       MMImage_cwmmFreeSmallBitmap((MMImage *)wpObject);
    639                     }
    640                     else {
    641                       MMBitmap_cwmmFreeSmallBitmap((MMBitmap*)wpObject);
    642                     }
     638                         MMImage_cwmmFreeSmallBitmap((MMImage *)wpObject);
     639                      }
     640                      else {
     641                         MMBitmap_cwmmFreeSmallBitmap((MMBitmap*)wpObject);
     642                      }
    643643                      return (MRESULT) TRUE;
    644644                    }/* hbm */
     
    684684          somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
    685685          if(somIsObj(somSelf)) {
    686             MMFolderData *somThis = MMFolderGetData(somSelf); 
     686            MMFolderData *somThis = MMFolderGetData(somSelf);
    687687            switch(_usLastSelMenuItem)
    688688              {
     
    701701                      /* insert separator */
    702702                      menuInsertMenuSeparator( HWNDFROMMP(mp2), NULLHANDLE, MIT_END);
    703                      
     703
    704704                      /* Load the menu from the resource */
    705705                      hwndMenu=WinLoadMenu(hwnd,queryResModuleHandle(), ID_MENUICONSIZE);
    706                      
     706
    707707                      /* Fill the MENUITEM structure */
    708708                      mi.iPosition=MIT_END;
    709709                      mi.afStyle=MIS_TEXT|MIS_SUBMENU;
    710710                      mi.id=ID_MENUICONSIZE;
    711                       mi.afAttribute=NULLHANDLE;               
     711                      mi.afAttribute=NULLHANDLE;
    712712                      mi.hwndSubMenu=hwndMenu;
    713713                      mi.hItem=NULLHANDLE;
     
    715715                        strcpy(text, "Icon ~size");;
    716716                      menuInsertMenuItem(HWNDFROMMP(mp2), hwndMenu, MIT_END, ID_MENUICONSIZE, text);
    717                      
     717
    718718                      /* check current menuitem */
    719719                      switch(_ulCurrentSize)
     
    738738                          break;
    739739                        default:
    740                           break; 
     740                          break;
    741741                        }
    742742                    }
     
    755755          somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
    756756          if(somIsObj(somSelf)) {
    757             MMFolderData *somThis = MMFolderGetData(somSelf); 
     757            MMFolderData *somThis = MMFolderGetData(somSelf);
    758758            _usLastSelMenuItem=SHORT1FROMMP(mp1);
    759759          }
     
    768768      somSelf=(MMFolder*) WinQueryWindowULong(hwndStore,QWL_USER);
    769769      if(somIsObj(somSelf)) {
    770         MMFolderData *somThis = MMFolderGetData(somSelf); 
     770        MMFolderData *somThis = MMFolderGetData(somSelf);
    771771        if(_oldFrameProc)
    772772          return _oldFrameProc(hwnd, msg, mp1, mp2);
    773773      }
    774774    }
    775  
     775
    776776  return WinDefWindowProc(hwnd, msg, mp1, mp2);
    777777}
     
    781781 */
    782782
    783 SOM_Scope HWND  SOMLINK mmfldr_wpOpen(MMFolder *somSelf, HWND hwndCnr, 
     783SOM_Scope HWND  SOMLINK mmfldr_wpOpen(MMFolder *somSelf, HWND hwndCnr,
    784784                                      ULONG ulView, ULONG param)
    785785{
    786786  HWND hwnd;
    787787
    788   MMFolderData *somThis = MMFolderGetData(somSelf); 
     788  MMFolderData *somThis = MMFolderGetData(somSelf);
    789789    MMFolderMethodDebug("MMFolder","mmfldr_wpOpen");
    790790
    791     hwnd=(MMFolder_parent_WPFolder_wpOpen(somSelf, hwndCnr, 
     791    hwnd=(MMFolder_parent_WPFolder_wpOpen(somSelf, hwndCnr,
    792792                                            ulView, param));
    793793
    794794    /* Only subclass folder frames, not settings notebooks */
    795     if(ulView!=OPEN_SETTINGS){   
     795    if(ulView!=OPEN_SETTINGS){
    796796      HWND hwndStore;
    797797
     
    799799                         hwnd, HWND_BOTTOM, STOREWINDOWID, NULLHANDLE, NULLHANDLE))!=NULLHANDLE)
    800800        {
    801           HWND hwndContainer;     
     801          HWND hwndContainer;
    802802
    803803          WinSetWindowULong(hwndStore, QWL_USER, (ULONG)somSelf);
    804804          _oldFrameProc=WinSubclassWindow(hwnd, mmFolderFrameProc);
    805          
     805
    806806          if(hwnd)
    807807            {
    808808              CNRINFO cnrInfo;
    809809              HWND hwndContainer=WinWindowFromID(hwnd,FID_CLIENT);
    810  
     810
    811811              /* Change the containerflags */
    812812              if(WinSendMsg(hwndContainer,CM_QUERYCNRINFO, MPFROMP(&cnrInfo),
    813813                            MPFROMSHORT(sizeof(cnrInfo))))
    814814                {
    815                   if(cnrInfo.flWindowAttr & CV_ICON) {             
     815                  if(cnrInfo.flWindowAttr & CV_ICON) {
    816816                    cnrInfo.slBitmapOrIcon.cx=_ulCurrentSize;
    817817                    cnrInfo.slBitmapOrIcon.cy=_ulCurrentSize;
     
    834834
    835835#if 0
    836 SOM_Scope BOOL  SOMLINK mmfldr_wpSetupOnce(MMFolder *somSelf, 
     836SOM_Scope BOOL  SOMLINK mmfldr_wpSetupOnce(MMFolder *somSelf,
    837837                                           PSZ pszSetupString)
    838838{
     
    859859#endif
    860860
    861 SOM_Scope BOOL  SOMLINK mmfldr_wpRestoreState(MMFolder *somSelf, 
     861SOM_Scope BOOL  SOMLINK mmfldr_wpRestoreState(MMFolder *somSelf,
    862862                                              ULONG ulReserved)
    863863{
     
    870870    }
    871871
    872     return (MMFolder_parent_WPFolder_wpRestoreState(somSelf, 
     872    return (MMFolder_parent_WPFolder_wpRestoreState(somSelf,
    873873                                                    ulReserved));
    874874}
    875875
    876 SOM_Scope BOOL  SOMLINK mmfldr_wpRestoreData(MMFolder *somSelf, 
    877                                              PSZ pszClass, ULONG ulKey, 
     876SOM_Scope BOOL  SOMLINK mmfldr_wpRestoreData(MMFolder *somSelf,
     877                                             PSZ pszClass, ULONG ulKey,
    878878                                             PBYTE pValue, PULONG pcbValue)
    879879{
     
    882882    MMFolderMethodDebug("MMFolder","mmfldr_wpRestoreData");
    883883
    884     rc= (MMFolder_parent_WPFolder_wpRestoreData(somSelf, pszClass, 
    885                                                    ulKey, pValue, 
     884    rc= (MMFolder_parent_WPFolder_wpRestoreData(somSelf, pszClass,
     885                                                   ulKey, pValue,
    886886                                                   pcbValue));
    887887    switch(ulKey)
     
    919919    MMFolderData *somThis = MMFolderGetData(somSelf);
    920920    MMFolderMethodDebug("MMFolder","mmfldr_wpSaveState");
    921    
     921
    922922    _wpSaveLong( somSelf, "MMFolder", KEY_ICONSIZE, _ulCurrentSize);
    923923
     
    926926
    927927
    928 SOM_Scope BOOL  SOMLINK mmfldr_wpSaveData(MMFolder *somSelf, 
    929                                           PSZ pszClass, ULONG ulKey, 
     928SOM_Scope BOOL  SOMLINK mmfldr_wpSaveData(MMFolder *somSelf,
     929                                          PSZ pszClass, ULONG ulKey,
    930930                                          PBYTE pValue, ULONG cbValue)
    931931{
     
    937937       the address of the instance data containing grid spacing and view. So
    938938       we force the object to save the instance data and in wpSaveData we
    939        finally get the right addresses to change the object view to gridded. 
     939       finally get the right addresses to change the object view to gridded.
    940940       This change is done in wpObjectReady() where we called wpSaveImmediate(). */
    941941
     
    946946      Check ID for NULL to prevent crash in stricmp().
    947947     */
    948     psz=_wpQueryObjectID(somSelf);         
     948    psz=_wpQueryObjectID(somSelf);
    949949    //  if(!stricmp(_wpQueryObjectID(somSelf), "<MMPM2_MMFOLDERTEMPLATE>"))
    950950    if(psz && !stricmp(psz, "<MMPM2_MMFOLDERTEMPLATE>"))
     
    982982      }
    983983
    984     return (MMFolder_parent_WPFolder_wpSaveData(somSelf, pszClass, 
    985                                                 ulKey, pValue, 
     984    return (MMFolder_parent_WPFolder_wpSaveData(somSelf, pszClass,
     985                                                ulKey, pValue,
    986986                                                cbValue));
    987987}
    988988
    989 SOM_Scope BOOL  SOMLINK mmfldr_wpMenuItemSelected(MMFolder *somSelf, 
    990                                                   HWND hwndFrame, 
     989SOM_Scope BOOL  SOMLINK mmfldr_wpMenuItemSelected(MMFolder *somSelf,
     990                                                  HWND hwndFrame,
    991991                                                  ULONG ulMenuId)
    992992{
     
    10041004          char text[200];
    10051005          CNRINFO cnrInfo2=cnrInfo;
    1006    
     1006
    10071007          switch(ulMenuId)
    10081008            {
     
    10541054          }
    10551055
    1056           _wpSetup(somSelf, "MENUITEMSELECTED=716");/* Change to icon view */         
     1056          _wpSetup(somSelf, "MENUITEMSELECTED=716");/* Change to icon view */
    10571057          _wpSetup(somSelf, "MENUITEMSELECTED=309");/* Arrange */
    10581058
     
    10621062        }
    10631063    }/* if() */
    1064     return (MMFolder_parent_WPFolder_wpMenuItemSelected(somSelf, 
    1065                                                         hwndFrame, 
     1064    return (MMFolder_parent_WPFolder_wpMenuItemSelected(somSelf,
     1065                                                        hwndFrame,
    10661066                                                        ulMenuId));
    10671067}
     
    10711071 *wpSetup:override;
    10721072 */
    1073 SOM_Scope void  SOMLINK mmfldr_wpObjectReady(MMFolder *somSelf, 
     1073SOM_Scope void  SOMLINK mmfldr_wpObjectReady(MMFolder *somSelf,
    10741074                                             ULONG ulCode, WPObject* refObject)
    10751075{
     
    11001100
    11011101          /* If no ID result is NULL */
    1102           psz=_wpQueryObjectID(somSelf);         
     1102          psz=_wpQueryObjectID(somSelf);
    11031103          if(psz && !stricmp(psz, "<MMPM2_MMFOLDERTEMPLATE>")) {
    11041104            /* When the template is created wpRestoreData() isn't called so we don't have
     
    11061106               we force the object to save the instance data and in wpSaveData we
    11071107               finally get the right addresses to change the object view to gridded. */
    1108            
     1108
    11091109            _wpSaveImmediate(somSelf);
    11101110            /* Set default view to gridded */
    1111            
     1111
    11121112            if(_pFldrLongArray!=NULLHANDLE) {
    11131113              *_pFldrLongArray=0x80;
     
    11201120              *(_pulGridSpacing--)=_ulCurrentSize+MMFLDR_SPACINGDELTA_Y;
    11211121            }
    1122            
     1122
    11231123          }
    11241124          break;
     
    11371137    MMFolderMethodDebug("MMFolder","mmfldr_wpSetup");
    11381138
    1139     bufferSize=sizeof(buffer); 
     1139    bufferSize=sizeof(buffer);
    11401140    if(_wpScanSetupString(somSelf, pszSetupString, SETUP_MMTHUMBSIZE, buffer, &bufferSize))
    11411141      {
     
    11801180            pViewItem=_wpFindViewItem(somSelf,VIEW_CONTENTS|VIEW_TREE|VIEW_DETAILS, pViewItem))
    11811181          {
    1182             _wpMenuItemSelected(somSelf, 
    1183                                 pViewItem->handle, 
     1182            _wpMenuItemSelected(somSelf,
     1183                                pViewItem->handle,
    11841184                                ulMenuId);
    11851185          }
     
    11891189
    11901190
    1191 SOM_Scope BOOL  SOMLINK mmfldrM_wpclsCreateDefaultTemplates(M_MMFolder *somSelf, 
     1191SOM_Scope BOOL  SOMLINK mmfldrM_wpclsCreateDefaultTemplates(M_MMFolder *somSelf,
    11921192                                                            WPObject* Folder)
    11931193{
     
    12051205  wpFolder=_wpclsQueryFolder(somSelf, MMTEMPLATE_FOLDER_ID, FALSE);
    12061206  _wpclsNew(somSelf, _wpclsQueryTitle(somSelf), chrSetup, wpFolder,FALSE);
    1207  
     1207
    12081208  return TRUE;
    12091209}
     
    12241224
    12251225
    1226 SOM_Scope ULONG  SOMLINK mmfldrM_wpclsQueryIconData(M_MMFolder *somSelf, 
     1226SOM_Scope ULONG  SOMLINK mmfldrM_wpclsQueryIconData(M_MMFolder *somSelf,
    12271227                                                    PICONINFO pIconInfo)
    12281228{
     
    12461246
    12471247
    1248 SOM_Scope ULONG  SOMLINK mmfldrM_wpclsQueryIconDataN(M_MMFolder *somSelf, 
    1249                                                      ICONINFO* pIconInfo, 
     1248SOM_Scope ULONG  SOMLINK mmfldrM_wpclsQueryIconDataN(M_MMFolder *somSelf,
     1249                                                     ICONINFO* pIconInfo,
    12501250                                                     ULONG ulIconIndex)
    12511251{
Note: See TracChangeset for help on using the changeset viewer.