Initialize locale on startup.
This commit is contained in:
parent
4220708c27
commit
89e0b77a2f
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: cp.c,v 1.27 1999/03/01 18:57:29 mjl Exp $ */
|
/* $NetBSD: cp.c,v 1.28 1999/09/05 16:14:43 kleink Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1988, 1993, 1994
|
* Copyright (c) 1988, 1993, 1994
|
||||||
@ -47,7 +47,7 @@ __COPYRIGHT(
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)cp.c 8.5 (Berkeley) 4/29/95";
|
static char sccsid[] = "@(#)cp.c 8.5 (Berkeley) 4/29/95";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: cp.c,v 1.27 1999/03/01 18:57:29 mjl Exp $");
|
__RCSID("$NetBSD: cp.c,v 1.28 1999/09/05 16:14:43 kleink Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
@ -72,6 +72,7 @@ __RCSID("$NetBSD: cp.c,v 1.27 1999/03/01 18:57:29 mjl Exp $");
|
|||||||
#include <err.h>
|
#include <err.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fts.h>
|
#include <fts.h>
|
||||||
|
#include <locale.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -105,6 +106,8 @@ main(argc, argv)
|
|||||||
int Hflag, Lflag, Pflag, ch, fts_options, r;
|
int Hflag, Lflag, Pflag, ch, fts_options, r;
|
||||||
char *target;
|
char *target;
|
||||||
|
|
||||||
|
(void)setlocale(LC_ALL, "");
|
||||||
|
|
||||||
Hflag = Lflag = Pflag = Rflag = 0;
|
Hflag = Lflag = Pflag = Rflag = 0;
|
||||||
while ((ch = getopt(argc, argv, "HLPRfipr")) != -1)
|
while ((ch = getopt(argc, argv, "HLPRfipr")) != -1)
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
|
Loading…
Reference in New Issue
Block a user