Changeset 3257 for trunk/src


Ignore:
Timestamp:
Mar 28, 2000, 5:28:54 PM (25 years ago)
Author:
cbratschi
Message:

floppy name resource, release fix (don't use pdump)

Location:
trunk/src/shell32
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/pidl.cpp

    r3243 r3257  
    1 /* $Id: pidl.cpp,v 1.6 2000-03-26 16:34:42 cbratschi Exp $ */
     1/* $Id: pidl.cpp,v 1.7 2000-03-28 15:28:43 cbratschi Exp $ */
    22
    33/*
     
    5050ODINDEBUGCHANNEL(SHELL32-PIDL)
    5151
     52#ifdef DEBUG
    5253void pdump (LPCITEMIDLIST pidl)
    5354{  DWORD type;
     
    100101
    101102}
     103#endif
     104
    102105#define BYTES_PRINTED 32
    103106BOOL pcheck (LPCITEMIDLIST pidl)
  • trunk/src/shell32/pidl.h

    r3243 r3257  
    1 /* $Id: pidl.h,v 1.3 2000-03-26 16:34:43 cbratschi Exp $ */
     1/* $Id: pidl.h,v 1.4 2000-03-28 15:28:45 cbratschi Exp $ */
    22
    33/*
     
    137137BOOL    WINAPI _ILGetExtension          (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
    138138void    WINAPI _ILGetFileType           (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
    139 DWORD   WINAPI _ILGetFileAttributes     (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
     139DWORD   WINAPI _ILGetFileAttributes     (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
    140140DWORD   WINAPI _ILGetFileSizeKB         (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
    141141
     
    182182 * debug helper
    183183 */
     184#ifdef DEBUG
    184185void pdump (LPCITEMIDLIST pidl);
     186#else
     187#define pdump(pidl)
     188#endif
     189//CB: needed in release build
    185190BOOL pcheck (LPCITEMIDLIST pidl);
    186191
  • trunk/src/shell32/shell32_En.orc

    r3243 r3257  
    1 /* $Id: shell32_En.orc,v 1.2 2000-03-26 16:34:45 cbratschi Exp $ */
     1/* $Id: shell32_En.orc,v 1.3 2000-03-28 15:28:46 cbratschi Exp $ */
    22LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
    33
     
    6363    IDS_LOCALHARDRIVES      "Local Hard Drives"
    6464    IDS_FILENOTFOUND        "File not found"
     65    IDS_35FLOPPY            "3.5 disk"
     66    IDS_525FLOPPY           "5.25 disk"
    6567}
    6668
  • trunk/src/shell32/shellpath.cpp

    r3243 r3257  
    1 /* $Id: shellpath.cpp,v 1.7 2000-03-26 16:34:52 cbratschi Exp $ */
     1/* $Id: shellpath.cpp,v 1.8 2000-03-28 15:28:52 cbratschi Exp $ */
    22
    33/*
     
    555555  return 0;
    556556}
     557
    557558static BOOL PathMatchSingleMaskW(LPCWSTR name, LPCWSTR mask)
    558559{
    559   while (*name && *mask && *mask!=';') {
    560     if (*mask=='*') {
    561       do {
    562    if (PathMatchSingleMaskW(name,mask+1)) return 1;  /* try substrings */
     560  while (*name && *mask && (*mask != ';'))
     561  {
     562    if (*mask == '*')
     563    {
     564      do
     565      {
     566        if (PathMatchSingleMaskW(name,mask+1)) return 1;  /* try substrings */
    563567      } while (*name++);
    564       return 0;
     568      return FALSE;
    565569    }
    566     if (towupper(*mask)!=towupper(*name) && *mask!='?') return 0;
     570    if ((towupper(*mask) != towupper(*name)) && (*mask != '?')) return 0;
    567571    name++;
    568572    mask++;
    569573  }
    570   if (!*name) {
    571     while (*mask=='*') mask++;
    572     if (!*mask || *mask==';') return 1;
     574  if (!*name)
     575  {
     576    while (*mask == '*') mask++;
     577    if (!*mask || (*mask == ';')) return TRUE;
    573578  }
    574   return 0;
     579
     580  return FALSE;
    575581}
    576582/*************************************************************************
     
    586592  TRACE("%s %s\n",name,mask);
    587593
    588   if (!lstrcmpA( mask, "*.*" )) return 1;   /* we don't require a period */
    589 
    590   while (*mask) {
    591     if (PathMatchSingleMaskA(name,mask)) return 1;    /* helper function */
     594  if (!lstrcmpA( mask, "*.*" )) return TRUE;   /* we don't require a period */
     595
     596  while (*mask)
     597  {
     598    if (PathMatchSingleMaskA(name,mask)) return TRUE;    /* helper function */
    592599    while (*mask && *mask!=';') mask++;
    593     if (*mask==';') {
     600    if (*mask==';')
     601    {
    594602      mask++;
    595603      while (*mask==' ') mask++;      /*  masks may be separated by "; " */
    596      }
    597    }
    598   return 0;
    599 }
     604    }
     605  }
     606
     607  return FALSE;
     608}
     609
    600610ODINFUNCTION2(BOOL, PathMatchSpecW,
    601611              LPCWSTR, name,
    602612              LPCWSTR, mask)
    603 {  WCHAR stemp[4];
     613{
    604614  TRACE("%ls %ls\n",name,mask);
    605    lstrcpyAtoW(stemp,"*.*");
    606   if (!lstrcmpW( mask, stemp )) return 1;   /* we don't require a period */
    607 
    608   while (*mask) {
    609     if (PathMatchSingleMaskW(name,mask)) return 1;    /* helper function */
    610     while (*mask && *mask!=';') mask++;
    611     if (*mask==';') {
     615
     616  if (!lstrcmpW( mask, (WCHAR*)L"*.*" )) return TRUE;   /* we don't require a period */
     617
     618  while (*mask)
     619  {
     620    if (PathMatchSingleMaskW(name,mask)) return TRUE;    /* helper function */
     621    while (*mask && (*mask != ';')) mask++;
     622    if (*mask == ';')
     623    {
    612624      mask++;
    613625      while (*mask==' ') mask++;       /* masks may be separated by "; " */
    614      }
    615    }
    616   return 0;
     626    }
     627  }
     628
     629  return FALSE;
    617630}
    618631ODINFUNCTION2(BOOL, PathMatchSpecAW,
    619632              LPVOID, name,
    620633              LPVOID, mask)
    621 {  if (VERSION_OsIsUnicode())
     634{
     635   if (VERSION_OsIsUnicode())
    622636     return PathMatchSpecW( (LPWSTR)name, (LPWSTR)mask );
    623637   return PathMatchSpecA( (LPSTR)name, (LPSTR)mask );
     
    12951309    FIXME("(%p),stub!\n", pSubKey);
    12961310
    1297         return ERROR_SUCCESS;  /* return success */
     1311        return ERROR_SUCCESS;  /* return success */
    12981312}
    12991313
     
    13091323    FIXME("(%p),stub!\n", pSubKey);
    13101324
    1311         return ERROR_SUCCESS;  /* return success */
     1325        return ERROR_SUCCESS;  /* return success */
    13121326}
    13131327
     
    13271341    FIXME("(%p),stub!\n", pSubKey);
    13281342
    1329         return ERROR_SUCCESS;  /* return success */
     1343        return ERROR_SUCCESS;  /* return success */
    13301344}
    13311345
     
    13431357    FIXME("(%p),stub!\n", pSubKey);
    13441358
    1345         return ERROR_SUCCESS;  /* return success */
    1346 }
    1347 
     1359        return ERROR_SUCCESS;  /* return success */
     1360}
     1361
  • trunk/src/shell32/shlfolder.cpp

    r3250 r3257  
    1 /* $Id: shlfolder.cpp,v 1.10 2000-03-27 15:09:21 cbratschi Exp $ */
     1/* $Id: shlfolder.cpp,v 1.11 2000-03-28 15:28:53 cbratschi Exp $ */
    22/*
    33 * Shell Folder stuff
     
    114114   /* get the shellfolder for the child pidl and let it analyse further */
    115115   hr = IShellFolder_BindToObject(psf, *pidlInOut, NULL, &IID_IShellFolder, (LPVOID*)&psfChild);
    116 dprintf(("C 1"));
     116
    117117   if (psfChild)
    118118   {  dprintf(("C 1a %d",psfChild/*,(psfChild)->fnParseDisplayName()*/));
    119119     hr = IShellFolder_ParseDisplayName(psfChild, hwndOwner, NULL, szNext, pEaten, &pidlOut, pdwAttributes);
    120 dprintf(("C 1b"));
     120
    121121     IShellFolder_Release(psfChild);
    122 dprintf(("C 2"));
    123122     pidlTemp = ILCombine(*pidlInOut, pidlOut);
    124 dprintf(("C 3"));
    125123     if (pidlOut)
    126124       ILFree(pidlOut);
    127125   }
    128 dprintf(("C 4"));
     126
    129127   ILFree(*pidlInOut);
    130128   *pidlInOut = pidlTemp;
     
    798796   {
    799797     LPPIDLDATA pd1, pd2;
     798
    800799     pd1 = _ILGetDataPointer(pidl1);
    801800     pd2 = _ILGetDataPointer(pidl2);
     
    20992098       if ((szPath[0] == 'A') || (szPath[0] == 'a') || (szPath[0] == 'B') || (szPath[0] == 'b'))
    21002099       {
    2101 //CB: todo: move to resource, German name is "3,5-Diskette" -> English "3.5-Disk"?
    2102          strcpy(szDrive,"Floppy drive");
     2100         //floppy
     2101         strncpy(szDrive,szPath,2);
     2102         //3.5 floppy
     2103         LoadStringA(shell32_hInstance,IDS_35FLOPPY,szPath,sizeof(szPath)-10);
     2104         //CB: todo: 5.25 floppy check
     2105         strcat(szPath," (");
     2106         strncat(szPath,szDrive,2);
     2107         strcat(szPath,")");
    21032108       } else
    21042109       {
    21052110         GetVolumeInformationA(szPath,szDrive,12,&dwVolumeSerialNumber,&dwMaximumComponetLength,&dwFileSystemFlags,NULL,0);
     2111         strcat (szDrive," (");
     2112         strncat (szDrive, szPath, 2);
     2113         strcat (szDrive,")");
     2114         strcpy (szPath, szDrive);
    21062115       }
    2107        strcat (szDrive," (");
    2108        strncat (szDrive, szPath, 2);
    2109        strcat (szDrive,")");
    2110        strcpy (szPath, szDrive);
    21112116     }
    21122117   }
  • trunk/src/shell32/shlview.cpp

    r3250 r3257  
    1 /* $Id: shlview.cpp,v 1.10 2000-03-27 15:09:22 cbratschi Exp $ */
     1/* $Id: shlview.cpp,v 1.11 2000-03-28 15:28:54 cbratschi Exp $ */
    22/*
    33 * ShellView
     
    115115#define FILEDIALOG_COLUMN_TIME 3
    116116#define FILEDIALOG_COLUMN_ATTRIB 4
    117 //CB: todo: drive view!
    118117
    119118/*menu items */
     
    184183 */
    185184static BOOL IsInCommDlg(IShellViewImpl * This)
    186 {  return(This->pCommDlgBrowser != NULL);
     185{
     186  return(This->pCommDlgBrowser != NULL);
    187187}
    188188
     
    502502
    503503//CB: really slow, even without debug information
     504//    too much transfers
    504505   TRACE("%p\n",This);
    505506
     
    507508//    OS/2's APIs can read more than one file per call -> much faster
    508509//    -> add a new API for faster handling
     510
    509511   /* get the itemlist from the shfolder*/
    510512   hRes = IShellFolder_EnumObjects(This->pSFParent,This->hWnd, SHCONTF_NONFOLDERS | SHCONTF_FOLDERS, &pEnumIDList);
     
    526528   while((S_OK == IEnumIDList_Next(pEnumIDList,1,(LPITEMIDLIST*)&pidl,&dwFetched)) && dwFetched)
    527529   {
    528      if (pDPA_InsertPtr(hdpa, 0x7fff, pidl) == -1)
     530     if (IncludeObject(This,pidl) == S_OK) /* in a commdlg This works as a filemask*/
    529531     {
    530        SHFree(pidl);
    531      }
     532       if (pDPA_InsertPtr(hdpa, 0x7fff, pidl) == -1)
     533       {
     534         SHFree(pidl);
     535       }
     536     } else SHFree(pidl);
    532537   }
    533538
     
    548553     pidl = (LPITEMIDLIST)DPA_GetPtr(hdpa, i);
    549554
    550      if (IncludeObject(This, pidl) == S_OK) /* in a commdlg This works as a filemask*/
    551      {
    552        lvItem.iItem = iPos;                                      /*add the item to the end of the list*/
    553        lvItem.lParam = (LPARAM)pidl;                         /*set the item's data*/
    554        ListView_InsertItemA(This->hWndList, &lvItem);
    555        iPos++;
    556      }
    557      else
    558        SHFree(pidl);                     /* the listview has the COPY*/
     555     lvItem.iItem = iPos;                                 /*add the item to the end of the list*/
     556     lvItem.lParam = (LPARAM)pidl;                        /*set the item's data*/
     557     ListView_InsertItemA(This->hWndList, &lvItem);
     558     iPos++;
    559559   }
    560560
  • trunk/src/shell32/shresdef.h

    r3243 r3257  
    1 /* $Id: shresdef.h,v 1.4 2000-03-26 16:34:56 cbratschi Exp $ */
     1/* $Id: shresdef.h,v 1.5 2000-03-28 15:28:54 cbratschi Exp $ */
    22
    33/*
     
    4242#define IDS_SHV_INVALID_MOVE           31
    4343
    44 #define ID_LISTVIEW     2000
     44#define ID_LISTVIEW     2000
    4545#define ID_NEWFOLDER    0x7053
    4646
     
    5757#define IDS_LOCALHARDRIVES              113
    5858#define IDS_FILENOTFOUND                114
     59#define IDS_35FLOPPY                    115
     60#define IDS_525FLOPPY                   116
    5961
    6062#endif /* __WINE_SHELL_RES_H */
Note: See TracChangeset for help on using the changeset viewer.