root/src/json-lib/bits.h

Revision efa9375336eec306ede14a9a1032985a71482810, 0.6 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 4 years ago)

refs #294 resmon no support arbitrary json objects

  • Property mode set to 100644
Line 
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
12 #ifndef _bits_h_
13 #define _bits_h_
14
15 #ifndef json_min
16 #define json_min(a,b) ((a) < (b) ? (a) : (b))
17 #endif
18
19 #ifndef json_max
20 #define json_max(a,b) ((a) > (b) ? (a) : (b))
21 #endif
22
23 #define hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9)
24 #define error_ptr(error) ((void*)error)
25 #define is_error(ptr) ((unsigned long)ptr > (unsigned long)-4000L)
26
27 #endif
Note: See TracBrowser for help on using the browser.