Subversion Repositories SvarDOS

Rev

Rev 2027 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2027 Rev 2028
Line 607... Line 607...
607
#ifndef STDCALL
607
#ifndef STDCALL
608
#define STDCALL __stdcall
608
#define STDCALL __stdcall
609
#endif
609
#endif
610
 
610
 
611
typedef HANDLE ( STDCALL * fFindFirstFileExA)(const char *, FINDEX_INFO_LEVELS, void *, FINDEX_SEARCH_OPS, void *, DWORD);
611
typedef HANDLE ( STDCALL * fFindFirstFileExA)(const char *, FINDEX_INFO_LEVELS, void *, FINDEX_SEARCH_OPS, void *, DWORD);
612
typedef HANDLE ( STDCALL * fFindFirstFileExW)(const WORD *, FINDEX_INFO_LEVELS, void *, FINDEX_SEARCH_OPS, void *, DWORD);
-
 
613
typedef BOOL ( STDCALL * fFindNextFileW)(HANDLE, WIN32_FIND_DATAW *);
-
 
614
 
612
 
615
/* FindFirstFileExA is only available on NT systems, so on Win9x & DOS use plain FindFirstFile */
613
/* FindFirstFileExA is only available on NT systems, so on Win9x & DOS use plain FindFirstFile */
616
HANDLE STDCALL myFindFirstFileExA(const char *fname, FINDEX_INFO_LEVELS, void * ffd, FINDEX_SEARCH_OPS, void *, DWORD)
614
HANDLE STDCALL myFindFirstFileExA(const char *fname, FINDEX_INFO_LEVELS, void * ffd, FINDEX_SEARCH_OPS, void *, DWORD)
617
{
615
{
618
  return FindFirstFileA(fname, (WIN32_FIND_DATAA *)ffd);
616
  return FindFirstFileA(fname, (WIN32_FIND_DATAA *)ffd);
619
}
617
}
620
 
618
 
621
fFindFirstFileExA pFindFirstFileExA = &myFindFirstFileExA;
619
fFindFirstFileExA pFindFirstFileExA = &myFindFirstFileExA;
622
fFindFirstFileExW pFindFirstFileExW = NULL;  // &FindFirstFileExW
-
 
623
 
620
 
624
/**
621
/**
625
 * Stores directory information obtained from FindFirst/Next that
622
 * Stores directory information obtained from FindFirst/Next that
626
 * we may wish to make use of when displaying directory entry.
623
 * we may wish to make use of when displaying directory entry.
627
 * e.g. attribute, dates, etc.
624
 * e.g. attribute, dates, etc.
Line 1065... Line 1062...
1065
 * currentpath must end in \
1062
 * currentpath must end in \
1066
 */
1063
 */
1067
HANDLE findFirstSubdir(char *currentpath, char *subdir, char *dsubdir)
1064
HANDLE findFirstSubdir(char *currentpath, char *subdir, char *dsubdir)
1068
{
1065
{
1069
  static char buffer[MAXBUF];
1066
  static char buffer[MAXBUF];
1070
  static WORD ubuf[MAXBUF];
-
 
1071
  HANDLE dir;         /* Current directory entry working with      */
1067
  HANDLE dir;         /* Current directory entry working with      */
1072
 
1068
 
1073
  /* get handle for files in current directory (using wildcard spec) */
1069
  /* get handle for files in current directory (using wildcard spec) */
1074
  strcpy(buffer, currentpath);
1070
  strcpy(buffer, currentpath);
1075
  strcat(buffer, "*");
1071
  strcat(buffer, "*");