Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/ftp call setlocale() on startup



details:   https://anonhg.NetBSD.org/src/rev/42ad655e76d5
branches:  trunk
changeset: 501965:42ad655e76d5
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue Jan 09 22:25:55 2001 +0000

description:
call setlocale() on startup

diffstat:

 usr.bin/ftp/main.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r d1d00de8c202 -r 42ad655e76d5 usr.bin/ftp/main.c
--- a/usr.bin/ftp/main.c        Tue Jan 09 21:38:53 2001 +0000
+++ b/usr.bin/ftp/main.c        Tue Jan 09 22:25:55 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.75 2000/12/15 02:22:51 lukem Exp $  */
+/*     $NetBSD: main.c,v 1.76 2001/01/09 22:25:55 jdolecek Exp $       */
 
 /*-
  * Copyright (c) 1996-2000 The NetBSD Foundation, Inc.
@@ -108,7 +108,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.6 (Berkeley) 10/9/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.75 2000/12/15 02:22:51 lukem Exp $");
+__RCSID("$NetBSD: main.c,v 1.76 2001/01/09 22:25:55 jdolecek Exp $");
 #endif
 #endif /* not lint */
 
@@ -127,6 +127,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <locale.h>
 
 #define        GLOBAL          /* force GLOBAL decls in ftp_var.h to be declared */
 #include "ftp_var.h"
@@ -147,6 +148,8 @@
        char *cp, *ep, *anonuser, *anonpass, *upload_path;
        int dumbterm, s, len, isupload;
 
+       setlocale(LC_ALL, "");
+
        ftpport = "ftp";
        httpport = "http";
        gateport = NULL;



Home | Main Index | Thread Index | Old Index