FILEGLOB.CPP 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. ** Command & Conquer Red Alert(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***************************************************************************
  19. ** C O N F I D E N T I A L --- W E S T W O O D A S S O C I A T E S **
  20. ***************************************************************************
  21. * *
  22. * Project Name : FILEIO Library *
  23. * *
  24. * File Name : FILEGLOB.C *
  25. * *
  26. * Programmer : Scott K. Bowen *
  27. * *
  28. * Start Date : April 11, 1994 *
  29. * *
  30. * Last Update : April 11, 1994 [SKB] *
  31. * *
  32. *-------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #ifndef WWSTD_H
  36. #include <wwstd.h>
  37. #endif
  38. #ifndef FILE_H
  39. #include "_file.h"
  40. #endif
  41. #include <process.h>
  42. /*=========================================================================*/
  43. /* The following PRIVATE functions are in this file: */
  44. /*=========================================================================*/
  45. /*= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =*/
  46. /* Global varaiables */
  47. BYTE ExecPath[XMAXPATH + 1];
  48. BYTE DataPath[XMAXPATH + 1];
  49. BYTE StartPath[XMAXPATH + 1];
  50. BOOL UseCD;
  51. /* File System only Global varaiables */
  52. BYTE CallingDOSInt; // Indicate we are performing a DOS function
  53. BYTE MaxDevice,DefaultDrive;
  54. BYTE MultiDriveSearch = TRUE; // Multiple drive search flag
  55. FileDataType *FileDataPtr = NULL;
  56. FileHandleType FileHandleTable[TABLE_MAX];
  57. UWORD NumFiles; // Number of files, except PAK, in file table.
  58. UWORD NumPAKFiles; // Number of PAK files in filetable.
  59. VOID *FileCacheHeap = NULL; // Pointer to the cache in memory.
  60. WORD DiskNumber; // Where file was found (-1 == current directory).
  61. WORD MaxDirNum = 0;
  62. WORD (*Open_Error)(FileErrorType, BYTE const *) = NULL;