Deleted Added
full compact
subr_scanf.c (43300) subr_scanf.c (43311)
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Chris Torek.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Chris Torek.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 19 unchanged lines hidden (view full) ---

28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * $Id: subr_scanf.c,v 1.1 1999/01/15 00:03:39 msmith Exp $
36 * $Id: subr_scanf.c,v 1.2 1999/01/27 21:36:14 dillon Exp $
37 * From: Id: vfscanf.c,v 1.13 1998/09/25 12:20:27 obrien Exp
38 */
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>
43#include <machine/limits.h>
44

--- 589 unchanged lines hidden (view full) ---

634
635/*
636 * Convert a string to an unsigned quad integer.
637 *
638 * Ignores `locale' stuff. Assumes that the upper and lower case
639 * alphabets and digits are each contiguous.
640 */
641u_quad_t
37 * From: Id: vfscanf.c,v 1.13 1998/09/25 12:20:27 obrien Exp
38 */
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>
43#include <machine/limits.h>
44

--- 589 unchanged lines hidden (view full) ---

634
635/*
636 * Convert a string to an unsigned quad integer.
637 *
638 * Ignores `locale' stuff. Assumes that the upper and lower case
639 * alphabets and digits are each contiguous.
640 */
641u_quad_t
642strtouq(const char *nptr, char **endptr, int base)
642strtouq(const char *nptr, const char **endptr, int base)
643{
644 const char *s = nptr;
645 u_quad_t acc;
646 unsigned char c;
647 u_quad_t qbase, cutoff;
648 int neg, any, cutlim;
649
650 /*

--- 52 unchanged lines hidden (view full) ---

703
704/*
705 * Convert a string to a quad integer.
706 *
707 * Ignores `locale' stuff. Assumes that the upper and lower case
708 * alphabets and digits are each contiguous.
709 */
710quad_t
643{
644 const char *s = nptr;
645 u_quad_t acc;
646 unsigned char c;
647 u_quad_t qbase, cutoff;
648 int neg, any, cutlim;
649
650 /*

--- 52 unchanged lines hidden (view full) ---

703
704/*
705 * Convert a string to a quad integer.
706 *
707 * Ignores `locale' stuff. Assumes that the upper and lower case
708 * alphabets and digits are each contiguous.
709 */
710quad_t
711strtoq(const char *nptr, char **endptr, int base)
711strtoq(const char *nptr, const char **endptr, int base)
712{
713 const char *s;
714 u_quad_t acc;
715 unsigned char c;
716 u_quad_t qbase, cutoff;
717 int neg, any, cutlim;
718
719 /*

--- 74 unchanged lines hidden ---
712{
713 const char *s;
714 u_quad_t acc;
715 unsigned char c;
716 u_quad_t qbase, cutoff;
717 int neg, any, cutlim;
718
719 /*

--- 74 unchanged lines hidden ---