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 641 B

123456789101112131415161718192021222324252627
  1. /*
  2. * $Id: bits.h,v 1.10 2006/01/30 23:07:57 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. #ifndef min
  14. #define min(a,b) ((a) < (b) ? (a) : (b))
  15. #endif
  16. #ifndef max
  17. #define max(a,b) ((a) > (b) ? (a) : (b))
  18. #endif
  19. #define hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9)
  20. #define error_ptr(error) ((void*)error)
  21. #define is_error(ptr) ((unsigned long)ptr > (unsigned long)-4000L)
  22. #endif

No Description

Contributors (1)