Source-Changes-HG archive

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

[src/netbsd-1-4]: src/usr.bin/ftp pull up rev 1.43 from trunk. (cgd)



details:   https://anonhg.NetBSD.org/src/rev/20d6c30ec1dd
branches:  netbsd-1-4
changeset: 469055:20d6c30ec1dd
user:      cgd <cgd%NetBSD.org@localhost>
date:      Fri Jun 25 01:15:32 1999 +0000

description:
pull up rev 1.43 from trunk. (cgd)

diffstat:

 usr.bin/ftp/main.c |  44 +++++++++++++++++++++++---------------------
 1 files changed, 23 insertions(+), 21 deletions(-)

diffs (157 lines):

diff -r d8bfa741b250 -r 20d6c30ec1dd usr.bin/ftp/main.c
--- a/usr.bin/ftp/main.c        Fri Jun 25 01:15:21 1999 +0000
+++ b/usr.bin/ftp/main.c        Fri Jun 25 01:15:32 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.40.2.1 1999/06/22 21:03:02 perry Exp $      */
+/*     $NetBSD: main.c,v 1.40.2.2 1999/06/25 01:15:32 cgd Exp $        */
 
 /*
  * Copyright (c) 1985, 1989, 1993, 1994
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.6 (Berkeley) 10/9/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.40.2.1 1999/06/22 21:03:02 perry Exp $");
+__RCSID("$NetBSD: main.c,v 1.40.2.2 1999/06/25 01:15:32 cgd Exp $");
 #endif
 #endif /* not lint */
 
@@ -125,7 +125,7 @@
        gatemode = 0;
        outfile = NULL;
        restartautofetch = 0;
-#ifndef SMALL
+#ifndef NO_EDITCOMPLETE
        editing = 0;
        el = NULL;
        hist = NULL;
@@ -178,14 +178,16 @@
        ttyout = stdout;
        if (isatty(fileno(ttyout))) {
                verbose = 1;            /* verbose if to a tty */
-#ifndef SMALL
                if (! dumbterm) {
+#ifndef NO_EDITCOMPLETE
                        if (fromatty)   /* editing mode on if tty is usable */
                                editing = 1;
+#endif
+#ifndef NO_PROGRESS
                        if (foregroundproc())
                                progress = 1;   /* progress bar on if fg */
+#endif
                }
-#endif
        }
 
        while ((ch = getopt(argc, argv, "Aadefgino:pP:r:RtvV")) != -1) {
@@ -205,7 +207,7 @@
                        break;
 
                case 'e':
-#ifndef SMALL
+#ifndef NO_EDITCOMPLETE
                        editing = 0;
 #endif
                        break;
@@ -334,9 +336,9 @@
                        retry_connect = 0; /* connected, stop hiding msgs */
                }
        }
-#ifndef SMALL
+#ifndef NO_EDITCOMPLETE
        controlediting();
-#endif /* !SMALL */
+#endif /* !NO_EDITCOMPLETE */
        top = setjmp(toplevel) == 0;
        if (top) {
                (void)signal(SIGINT, (sig_t)intr);
@@ -407,15 +409,15 @@
        int num;
 
        if (!top
-#ifndef SMALL
+#ifndef NO_EDITCOMPLETE
            && !editing
-#endif /* !SMALL */
+#endif /* !NO_EDITCOMPLETE */
            )
                (void)putc('\n', ttyout);
        for (;;) {
-#ifndef SMALL
+#ifndef NO_EDITCOMPLETE
                if (!editing) {
-#endif /* !SMALL */
+#endif /* !NO_EDITCOMPLETE */
                        if (fromatty) {
                                fputs(prompt(), ttyout);
                                (void)fflush(ttyout);
@@ -435,7 +437,7 @@
                                        /* void */;
                                break;
                        } /* else it was a line without a newline */
-#ifndef SMALL
+#ifndef NO_EDITCOMPLETE
                } else {
                        const char *buf;
                        HistEvent ev;
@@ -454,7 +456,7 @@
                        line[num] = '\0';
                        history(hist, &ev, H_ENTER, buf);
                }
-#endif /* !SMALL */
+#endif /* !NO_EDITCOMPLETE */
 
                makeargv();
                if (margc == 0)
@@ -465,7 +467,7 @@
                        continue;
                }
                if (c == NULL) {
-#if !defined(SMALL)
+#if !defined(NO_EDITCOMPLETE)
                        /*
                         * attempt to el_parse() unknown commands.
                         * any command containing a ':' would be parsed
@@ -475,7 +477,7 @@
                         */
                        if (strchr(margv[0], ':') != NULL ||
                            el_parse(el, margc, margv) != 0)
-#endif /* !SMALL */
+#endif /* !NO_EDITCOMPLETE */
                                fputs("?Invalid command.\n", ttyout);
                        continue;
                }
@@ -547,7 +549,7 @@
                if (argp == NULL)
                        break;
        }
-#ifndef SMALL
+#ifndef NO_EDITCOMPLETE
        if (cursor_pos == line) {
                cursor_argc = 0;
                cursor_argo = 0;
@@ -555,12 +557,12 @@
                cursor_argc = margc;
                cursor_argo = strlen(margv[margc-1]);
        }
-#endif /* !SMALL */
+#endif /* !NO_EDITCOMPLETE */
 }
 
-#ifdef SMALL
+#ifdef NO_EDITCOMPLETE
 #define INC_CHKCURSOR(x)       (x)++
-#else  /* !SMALL */
+#else  /* !NO_EDITCOMPLETE */
 #define INC_CHKCURSOR(x)       { (x)++ ; \
                                if (x == cursor_pos) { \
                                        cursor_argc = margc; \
@@ -568,7 +570,7 @@
                                        cursor_pos = NULL; \
                                } }
 
-#endif /* !SMALL */
+#endif /* !NO_EDITCOMPLETE */
 
 /*
  * Parse string into argbuf;



Home | Main Index | Thread Index | Old Index