Deleted Added
full compact
ldpart.c (72442) ldpart.c (73253)
1/*
2 * Copyright (c) 2000, 2001 Alexey Zelkin
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
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 *
1/*
2 * Copyright (c) 2000, 2001 Alexey Zelkin
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

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

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
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 * $FreeBSD: head/lib/libc/locale/ldpart.c 72442 2001-02-13 15:29:39Z phantom $
26 * $FreeBSD: head/lib/libc/locale/ldpart.c 73253 2001-03-01 04:59:01Z deischen $
27 */
28
29#include "namespace.h"
30#include <sys/types.h>
31#include <sys/stat.h>
32#include <sys/syslimits.h>
33#include <fcntl.h>
34#include "un-namespace.h"

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

91 strcpy(filename, _PathLocale);
92 strcat(filename, "/");
93 strcat(filename, name);
94 strcat(filename, "/");
95 strcat(filename, category_name);
96 fd = _open(filename, O_RDONLY);
97 if (fd < 0)
98 goto no_locale;
27 */
28
29#include "namespace.h"
30#include <sys/types.h>
31#include <sys/stat.h>
32#include <sys/syslimits.h>
33#include <fcntl.h>
34#include "un-namespace.h"

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

91 strcpy(filename, _PathLocale);
92 strcat(filename, "/");
93 strcat(filename, name);
94 strcat(filename, "/");
95 strcat(filename, category_name);
96 fd = _open(filename, O_RDONLY);
97 if (fd < 0)
98 goto no_locale;
99 if (fstat(fd, &st) != 0)
99 if (_fstat(fd, &st) != 0)
100 goto bad_locale;
101 if (st.st_size <= 0)
102 goto bad_locale;
103 bufsize = namesize + st.st_size;
104 locale_buf = NULL;
105 lbuf = (lbuf == NULL || lbuf == locale_buf_C) ?
106 malloc(bufsize) : reallocf(lbuf, bufsize);
107 if (lbuf == NULL)

--- 63 unchanged lines hidden ---
100 goto bad_locale;
101 if (st.st_size <= 0)
102 goto bad_locale;
103 bufsize = namesize + st.st_size;
104 locale_buf = NULL;
105 lbuf = (lbuf == NULL || lbuf == locale_buf_C) ?
106 malloc(bufsize) : reallocf(lbuf, bufsize);
107 if (lbuf == NULL)

--- 63 unchanged lines hidden ---