Deleted Added
full compact
subr_scanf.c (53648) subr_scanf.c (104363)
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 * $FreeBSD: head/sys/kern/subr_scanf.c 53648 1999-11-24 01:03:08Z archie $
36 * $FreeBSD: head/sys/kern/subr_scanf.c 104363 2002-10-02 09:09:25Z phk $
37 * From: Id: vfscanf.c,v 1.13 1998/09/25 12:20:27 obrien Exp
38 * From: static char sccsid[] = "@(#)strtol.c 8.1 (Berkeley) 6/4/93";
39 * From: static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93";
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/ctype.h>

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

286 size_t sum = 0;
287 for (;;) {
288 if ((n = inr) < width) {
289 sum += n;
290 width -= n;
291 inp += n;
292 if (sum == 0)
293 goto input_failure;
37 * From: Id: vfscanf.c,v 1.13 1998/09/25 12:20:27 obrien Exp
38 * From: static char sccsid[] = "@(#)strtol.c 8.1 (Berkeley) 6/4/93";
39 * From: static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93";
40 */
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/ctype.h>

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

286 size_t sum = 0;
287 for (;;) {
288 if ((n = inr) < width) {
289 sum += n;
290 width -= n;
291 inp += n;
292 if (sum == 0)
293 goto input_failure;
294 break;
294 break;
295 } else {
296 sum += width;
297 inr -= width;
298 inp += width;
299 break;
300 }
301 }
302 nread += sum;

--- 326 unchanged lines hidden ---
295 } else {
296 sum += width;
297 inr -= width;
298 inp += width;
299 break;
300 }
301 }
302 nread += sum;

--- 326 unchanged lines hidden ---