Deleted Added
full compact
collate.c (19129) collate.c (19964)
1/*-
2 * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
3 * at Electronni Visti IA, Kiev, Ukraine.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
1/*-
2 * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
3 * at Electronni Visti IA, Kiev, Ukraine.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * $Id: collate.c,v 1.7 1996/10/15 21:53:22 ache Exp $
27 * $Id: collate.c,v 1.8 1996/10/23 15:35:43 ache Exp $
28 */
29
30#include <rune.h>
31#include <stdio.h>
32#include <stdlib.h>
33#include <string.h>
34#include <errno.h>
35#include <unistd.h>

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

62 int save_load_error;
63
64 save_load_error = __collate_load_error;
65 __collate_load_error = 1;
66 if (!encoding) {
67 __collate_load_error = save_load_error;
68 return -1;
69 }
28 */
29
30#include <rune.h>
31#include <stdio.h>
32#include <stdlib.h>
33#include <string.h>
34#include <errno.h>
35#include <unistd.h>

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

62 int save_load_error;
63
64 save_load_error = __collate_load_error;
65 __collate_load_error = 1;
66 if (!encoding) {
67 __collate_load_error = save_load_error;
68 return -1;
69 }
70 if (!*encoding || !strcmp(encoding, "C") || !strcmp(encoding, "POSIX"))
70 if (!strcmp(encoding, "C") || !strcmp(encoding, "POSIX"))
71 return 0;
71 return 0;
72 if (!_PathLocale && !(_PathLocale = getenv("PATH_LOCALE")))
73 _PathLocale = _PATH_LOCALE;
72 if (!_PathLocale) {
73 __collate_load_error = save_load_error;
74 return -1;
75 }
74 strcpy(buf, _PathLocale);
75 strcat(buf, "/");
76 strcat(buf, encoding);
77 strcat(buf, "/LC_COLLATE");
78 if ((fp = fopen(buf, "r")) == NULL) {
79 __collate_load_error = save_load_error;
80 return -1;
81 }

--- 113 unchanged lines hidden ---
76 strcpy(buf, _PathLocale);
77 strcat(buf, "/");
78 strcat(buf, encoding);
79 strcat(buf, "/LC_COLLATE");
80 if ((fp = fopen(buf, "r")) == NULL) {
81 __collate_load_error = save_load_error;
82 return -1;
83 }

--- 113 unchanged lines hidden ---