Leaked source code of windows server 2003
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.

141 lines
3.0 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. comp.hxx
  5. Abstract:
  6. Author:
  7. Barry J. Gilhuly
  8. Environment:
  9. ULIB, User Mode
  10. --*/
  11. #if !defined( _BINARY_COMP_ )
  12. #define _BINARY_COMP_
  13. //
  14. // Define an enumerated type for the style of output information - Hex,
  15. // Decimal, or Ascii
  16. //
  17. enum OUTPUT_TYPE {
  18. OUTPUT_HEX,
  19. OUTPUT_DECIMAL,
  20. OUTPUT_ASCII
  21. };
  22. // Define the maximum number of comparison errors...
  23. #define MAX_DIFF 10
  24. // Define the various error levels returned by this program
  25. #define NO_ERRORS 0
  26. #define NO_MEM_AVAIL 1
  27. #define CANT_OPEN_FILE 2
  28. #define CANT_READ_FILE 3
  29. #define SYNT_ERR 4
  30. #define BAD_NUMERIC_ARG 5
  31. #define DIFFERENT_SIZES 16
  32. #define NEED_DELIM_CHAR 17
  33. #define COULD_NOT_EXP 20
  34. #define TEN_MISM 32
  35. #define INCORRECT_DOS_VER 33
  36. #define UNEXP_EOF 34
  37. #define INV_SWITCH 35
  38. #define FILE1_LINES 36
  39. #define FILE2_LINES 37
  40. #define FILES_SKIPPED 41
  41. #define INTERNAL_ERROR 99
  42. #define FILES_ARE_EQUAL 0
  43. #define FILES_ARE_DIFFERENT 1
  44. #define CANNOT_COMPARE_FILES 2
  45. #include "object.hxx"
  46. #include "keyboard.hxx"
  47. #include "program.hxx"
  48. DECLARE_CLASS( COMP );
  49. class COMP : public PROGRAM {
  50. public:
  51. DECLARE_CONSTRUCTOR( COMP );
  52. NONVIRTUAL
  53. VOID
  54. Destruct(
  55. );
  56. NONVIRTUAL
  57. BOOLEAN
  58. Initialize(
  59. );
  60. NONVIRTUAL
  61. VOID
  62. Start(
  63. );
  64. private:
  65. NONVIRTUAL
  66. VOID
  67. Construct(
  68. );
  69. #ifdef FE_SB // v-junm - 08/30/93
  70. BOOLEAN
  71. CharEqual(
  72. PUCHAR,
  73. PUCHAR
  74. );
  75. #endif
  76. NONVIRTUAL
  77. VOID
  78. DoCompare(
  79. );
  80. NONVIRTUAL
  81. VOID
  82. BinaryCompare(
  83. );
  84. NONVIRTUAL
  85. BOOLEAN
  86. IsOffline(
  87. PFSN_FILE
  88. );
  89. BOOLEAN _CaseInsensitive; // Case sensitive compare
  90. BOOLEAN _Limited; // Compare a limited number of lines
  91. BOOLEAN _Numbered; // Number the lines or use byte offsets
  92. BOOLEAN _SkipOffline; // Skip offline files
  93. BOOLEAN _OptionsFound; // Options were present on the command line
  94. LONG _NumberOfLines; // The number of lines to compare
  95. OUTPUT_TYPE _Mode; // The comparison mode: HEX, DECIMAL, or ASCII
  96. PPATH _InputPath1; // The paths requested...
  97. PPATH _InputPath2;
  98. PFSN_FILE _File1;
  99. PFSN_FILE _File2;
  100. PFILE_STREAM _FileStream1;
  101. PFILE_STREAM _FileStream2;
  102. BYTE_STREAM _ByteStream1;
  103. BYTE_STREAM _ByteStream2;
  104. };
  105. #endif // _BINARY_COMP_