Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

103 lines
3.0 KiB

  1. /*******************************************************************
  2. ***** Header for Decompression Library (condensed from API.H and RETCODES.H)
  3. ********************************************************************/
  4. /*** API.H: Extern procs for the decompression library. ***/
  5. typedef int (far * PFNWFROMW)(int);
  6. LONG
  7. LcbCopyFile(
  8. HANDLE fhSrc,
  9. HANDLE fhDest,
  10. PFNWFROMW pfn,
  11. INT cProgTicks
  12. );
  13. LONG
  14. LcbDecompFile(
  15. HANDLE fhSrc,
  16. HANDLE fhDest,
  17. PFNWFROMW pfn,
  18. INT cProgTicks
  19. );
  20. //
  21. // Diamond routines.
  22. //
  23. BOOL
  24. InitDiamond(
  25. VOID
  26. );
  27. VOID
  28. TermDiamond(
  29. VOID
  30. );
  31. BOOL
  32. IsDiamondFile(
  33. IN PSTR FileName
  34. );
  35. LONG
  36. DecompDiamondFile(
  37. PSTR SourceFileName,
  38. HANDLE TargetFileHandle,
  39. PFNWFROMW ProgressCallback,
  40. INT NumberOfTicks
  41. );
  42. /* global variables for file header info before writing or after reading */
  43. extern SHORT vwAlgType;
  44. extern LONG vlcbSrcLength;
  45. extern BOOL vfChecksum;
  46. extern USHORT vusChecksum;
  47. extern USHORT vcbArgs;
  48. extern BYTE * vrgbArgs;
  49. extern CHAR vszBaseName[9];
  50. extern CHAR vszExtension[4];
  51. extern SZ vszText;
  52. extern USHORT vcbText;
  53. /*** RETCODES.H: Return Codes for compression module for Setup Toolkit. ***/
  54. /* error codes - quick check is anything less than rcNoError */
  55. #define rcNoError 0 /* no errors */
  56. #define rcNoHeader (-1) /* no header (eg no magic value) */
  57. #define rcUnknownAlgType (-2) /* wAlgType doesn't match knowns */
  58. #define rcBadHeader (-3) /* header too short or bad value */
  59. #define rcFilenamesTooLong (-4) /* filenames bigger than 8.3 */
  60. #define rcReadError (-5) /* reading error with fhSrc */
  61. #define rcReadSeekError (-6) /* seeking error with fhSrc */
  62. #define rcWriteError (-7) /* writing error with fhDest */
  63. #define rcWriteSeekError (-8) /* seeking error with fhDest */
  64. #define rcDestPatchError (-9) /* patching error with fhDest */
  65. #define rcCompChecksumBad (-10) /* compressed checksums mismatch */
  66. #define rcDecompChecksumBad (-11) /* decompressed checksums mismatch */
  67. #define rcCompLengthBad (-12) /* compressed length mismatch */
  68. #define rcDecompLengthBad (-13) /* decompressed length mismatch */
  69. #define rcGenericCompError (-14) /* internal compression error */
  70. #define rcGenericDecompError (-15) /* internal decompression error */
  71. #define rcSplitSizeTooSmall (-16) /* split size too small for header */
  72. #define rcOutOfMemory (-17) /* unable to alloc a buffer */
  73. #define rcDiskFull (-18) /* target is full */
  74. #define rcUserQuit (-19) /* user quit during decomp */
  75. /* each code below here has a standard header */
  76. #define wAlgTypeNil (-1) /* no algorithm type (never found) */
  77. #define wAlgTypeZK1 2 /* Steve Zeck compression algorithm */
  78. #define wAlgTypeJJJ1 3 /* Jeff J. Johnson algorithm */