Format.h 597 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
  3. * Copyright (c) 2023, Shannon Booth <shannon.ml.booth@gmail.com>
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #pragma once
  8. #include <AK/Error.h>
  9. #include <AK/Forward.h>
  10. #include <LibDiff/Hunks.h>
  11. namespace Diff {
  12. DeprecatedString generate_only_additions(StringView);
  13. enum class ColorOutput {
  14. Yes,
  15. No,
  16. };
  17. ErrorOr<void> write_unified(Hunk const& hunk, Stream& stream, ColorOutput color_output = ColorOutput::No);
  18. ErrorOr<void> write_normal(Hunk const& hunk, Stream& stream, ColorOutput color_output = ColorOutput::No);
  19. }