You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

bits.h 872 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * $Id: bits.h,v 1.9 2006/01/26 02:16:28 mclark Exp $
  3. *
  4. * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
  5. * Michael Clark <michael@metaparadigm.com>
  6. *
  7. * This library is free software; you can redistribute it and/or modify
  8. * it under the terms of the MIT license. See COPYING for details.
  9. *
  10. */
  11. #ifndef _bits_h_
  12. #define _bits_h_
  13. #include "config.h"
  14. #if STDC_HEADERS
  15. # include <stddef.h>
  16. #endif /* STDC_HEADERS */
  17. /* CAW: wrapped in ifndef's to make win32 compliant
  18. ** this fails to take over GCC specifics, but this
  19. ** seems to be unimportant.
  20. */
  21. #ifndef min
  22. #define min(a,b) ((a) < (b) ? (a) : (b))
  23. #endif
  24. #ifndef max
  25. #define max(a,b) ((a) > (b) ? (a) : (b))
  26. #endif
  27. #define hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9)
  28. #define error_ptr(error) ((void*)error)
  29. #define is_error(ptr) ((unsigned long)ptr > (unsigned long)-4000L)
  30. #endif

No Description

Contributors (1)