vfprintf.c (31968) | vfprintf.c (31980) |
---|---|
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 --- 25 unchanged lines hidden (view full) --- 34 * SUCH DAMAGE. 35 */ 36 37#if defined(LIBC_SCCS) && !defined(lint) 38#if 0 39static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93"; 40#endif 41static const char rcsid[] = | 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 --- 25 unchanged lines hidden (view full) --- 34 * SUCH DAMAGE. 35 */ 36 37#if defined(LIBC_SCCS) && !defined(lint) 38#if 0 39static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93"; 40#endif 41static const char rcsid[] = |
42 "$Id: vfprintf.c,v 1.13 1997/12/19 21:59:22 bde Exp $"; | 42 "$Id: vfprintf.c,v 1.14 1997/12/24 13:47:13 ache Exp $"; |
43#endif /* LIBC_SCCS and not lint */ 44 45/* 46 * Actual printf innards. 47 * 48 * This code is large and complicated... 49 */ 50 --- 587 unchanged lines hidden (view full) --- 638 size = ndig + (expt > 0 ? 639 1 : 2 - expt); 640 641 if (softsign) 642 sign = '-'; 643 break; 644#endif /* FLOATING_POINT */ 645 case 'n': | 43#endif /* LIBC_SCCS and not lint */ 44 45/* 46 * Actual printf innards. 47 * 48 * This code is large and complicated... 49 */ 50 --- 587 unchanged lines hidden (view full) --- 638 size = ndig + (expt > 0 ? 639 1 : 2 - expt); 640 641 if (softsign) 642 sign = '-'; 643 break; 644#endif /* FLOATING_POINT */ 645 case 'n': |
646 n = ret; 647 if ((fp->_flags & __SSTR) && 648 fp->_bf._size < n) 649 n = fp->_bf._size; | |
650 if (flags & QUADINT) | 646 if (flags & QUADINT) |
651 *GETARG(quad_t *) = n; | 647 *GETARG(quad_t *) = ret; |
652 else if (flags & LONGINT) | 648 else if (flags & LONGINT) |
653 *GETARG(long *) = n; | 649 *GETARG(long *) = ret; |
654 else if (flags & SHORTINT) | 650 else if (flags & SHORTINT) |
655 *GETARG(short *) = n; | 651 *GETARG(short *) = ret; |
656 else | 652 else |
657 *GETARG(int *) = n; | 653 *GETARG(int *) = ret; |
658 continue; /* no output */ 659 case 'O': 660 flags |= LONGINT; 661 /*FALLTHROUGH*/ 662 case 'o': 663 if (flags & QUADINT) 664 uqval = GETARG(u_quad_t); 665 else --- 612 unchanged lines hidden --- | 654 continue; /* no output */ 655 case 'O': 656 flags |= LONGINT; 657 /*FALLTHROUGH*/ 658 case 'o': 659 if (flags & QUADINT) 660 uqval = GETARG(u_quad_t); 661 else --- 612 unchanged lines hidden --- |