param.h 381 B

12345678910111213141516171819202122
  1. /*
  2. * Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <endian.h>
  8. #include <limits.h>
  9. #ifndef MIN
  10. # define MIN(a, b) (((a) < (b)) ? (a) : (b))
  11. #endif
  12. #ifndef MAX
  13. # define MAX(a, b) (((a) > (b)) ? (a) : (b))
  14. #endif
  15. #ifndef howmany
  16. # define howmany(x, y) (((x) + ((y)-1)) / (y))
  17. #endif