expand_number.c (173719) | expand_number.c (180347) |
---|---|
1/*- 2 * Copyright (c) 2007 Eric Anderson <anderson@FreeBSD.org> 3 * Copyright (c) 2007 Pawel Jakub Dawidek <pjd@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2007 Eric Anderson <anderson@FreeBSD.org> 3 * Copyright (c) 2007 Pawel Jakub Dawidek <pjd@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/lib/libutil/expand_number.c 173719 2007-11-18 02:20:02Z jb $"); | 29__FBSDID("$FreeBSD: head/lib/libutil/expand_number.c 180347 2008-07-07 12:20:34Z kib $"); |
30 31#include <sys/types.h> 32#include <ctype.h> 33#include <errno.h> | 30 31#include <sys/types.h> 32#include <ctype.h> 33#include <errno.h> |
34#include <inttypes.h> |
|
34#include <libutil.h> 35#include <stdint.h> 36 37/* 38 * Convert an expression of the following forms to a int64_t. 39 * 1) A positive decimal number. 40 * 2) A positive decimal number followed by a 'b' or 'B' (mult by 1). 41 * 3) A positive decimal number followed by a 'k' or 'K' (mult by 1 << 10). --- 58 unchanged lines hidden --- | 35#include <libutil.h> 36#include <stdint.h> 37 38/* 39 * Convert an expression of the following forms to a int64_t. 40 * 1) A positive decimal number. 41 * 2) A positive decimal number followed by a 'b' or 'B' (mult by 1). 42 * 3) A positive decimal number followed by a 'k' or 'K' (mult by 1 << 10). --- 58 unchanged lines hidden --- |