Deleted Added
full compact
strfmon.c (104943) strfmon.c (104944)
1/*-
2 * Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/lib/libc/stdlib/strfmon.c 104943 2002-10-11 23:04:59Z tjr $");
29__FBSDID("$FreeBSD: head/lib/libc/stdlib/strfmon.c 104944 2002-10-11 23:08:03Z tjr $");
30
31#include <sys/types.h>
32#include <ctype.h>
33#include <errno.h>
34#include <limits.h>
35#include <locale.h>
36#include <stdarg.h>
37#include <stdio.h>

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

386}
387
388static void
389__setup_vars(int flags, char *cs_precedes, char *sep_by_space,
390 char *sign_posn, char **signstr) {
391
392 struct lconv *lc = localeconv();
393
30
31#include <sys/types.h>
32#include <ctype.h>
33#include <errno.h>
34#include <limits.h>
35#include <locale.h>
36#include <stdarg.h>
37#include <stdio.h>

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

386}
387
388static void
389__setup_vars(int flags, char *cs_precedes, char *sep_by_space,
390 char *sign_posn, char **signstr) {
391
392 struct lconv *lc = localeconv();
393
394 if (flags & IS_NEGATIVE) {
394 if ((flags & IS_NEGATIVE) && (flags & USE_INTL_CURRENCY)) {
395 *cs_precedes = lc->int_n_cs_precedes;
396 *sep_by_space = lc->int_n_sep_by_space;
397 *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->int_n_sign_posn;
398 *signstr = (lc->negative_sign == '\0') ? "-"
399 : lc->negative_sign;
400 } else if (flags & USE_INTL_CURRENCY) {
401 *cs_precedes = lc->int_p_cs_precedes;
402 *sep_by_space = lc->int_p_sep_by_space;
403 *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->int_p_sign_posn;
404 *signstr = lc->positive_sign;
405 } else if (flags & IS_NEGATIVE) {
395 *cs_precedes = lc->n_cs_precedes;
396 *sep_by_space = lc->n_sep_by_space;
397 *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->n_sign_posn;
398 *signstr = (lc->negative_sign == '\0') ? "-"
399 : lc->negative_sign;
400 } else {
401 *cs_precedes = lc->p_cs_precedes;
402 *sep_by_space = lc->p_sep_by_space;

--- 189 unchanged lines hidden ---
406 *cs_precedes = lc->n_cs_precedes;
407 *sep_by_space = lc->n_sep_by_space;
408 *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->n_sign_posn;
409 *signstr = (lc->negative_sign == '\0') ? "-"
410 : lc->negative_sign;
411 } else {
412 *cs_precedes = lc->p_cs_precedes;
413 *sep_by_space = lc->p_sep_by_space;

--- 189 unchanged lines hidden ---