From 4d1a4e8e7ce047f70113d9fa52f7961c0fee6557 Mon Sep 17 00:00:00 2001 From: Derrell Lipman Date: Sat, 23 Sep 2006 19:15:27 +0000 Subject: r18848: Save the json library before I start hacking on it. I'm going to be converting it to natively use ejs objects, instead of its own internal format. (This used to be commit 119db8924a6e9c40a94c76c57198877875c53afc) --- source4/lib/json/bits.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 source4/lib/json/bits.h (limited to 'source4/lib/json/bits.h') diff --git a/source4/lib/json/bits.h b/source4/lib/json/bits.h new file mode 100644 index 0000000000..2c107cce11 --- /dev/null +++ b/source4/lib/json/bits.h @@ -0,0 +1,27 @@ +/* + * $Id: bits.h,v 1.10 2006/01/30 23:07:57 mclark Exp $ + * + * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. + * Michael Clark + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the MIT license. See COPYING for details. + * + */ + +#ifndef _bits_h_ +#define _bits_h_ + +#ifndef min +#define min(a,b) ((a) < (b) ? (a) : (b)) +#endif + +#ifndef max +#define max(a,b) ((a) > (b) ? (a) : (b)) +#endif + +#define hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9) +#define error_ptr(error) ((void*)error) +#define is_error(ptr) ((unsigned long)ptr > (unsigned long)-4000L) + +#endif -- cgit