Hello,

The local function print_expansions() is a wrapper for
x_print_expansions(). Going back to revision 1.1 of vi.c
reveals the command parameter wasn't used then either.

- Michael


Index: vi.c
===================================================================
RCS file: /cvs/src/bin/ksh/vi.c,v
retrieving revision 1.53
diff -u -p -u -r1.53 vi.c
--- vi.c        6 Jan 2018 16:28:58 -0000       1.53
+++ vi.c        11 Jan 2018 09:28:10 -0000
@@ -61,7 +61,7 @@ static void   display(char *, char *, int)
 static void    ed_mov_opt(int, char *);
 static int     expand_word(int);
 static int     complete_word(int, int);
-static int     print_expansions(struct edstate *, int);
+static int     print_expansions(struct edstate *);
 static int     char_len(int);
 static void    x_vi_zotc(int);
 static void    vi_pprompt(int);
@@ -648,7 +648,7 @@ vi_insert(int ch)
                break;
 
        case CTRL('e'):
-               print_expansions(es, 0);
+               print_expansions(es);
                break;
 
        case CTRL('i'):
@@ -1125,7 +1125,7 @@ vi_cmd(int argcnt, const char *cmd)
 
                case '=':                       /* at&t ksh */
                case CTRL('e'):                 /* Nonstandard vi/ksh */
-                       print_expansions(es, 1);
+                       print_expansions(es);
                        break;
 
 
@@ -2052,7 +2052,7 @@ complete_word(int command, int count)
 
        /* Undo previous completion */
        if (command == 0 && expanded == COMPLETE && buf) {
-               print_expansions(buf, 0);
+               print_expansions(buf);
                expanded = PRINT;
                return 0;
        }
@@ -2143,7 +2143,7 @@ complete_word(int command, int count)
 }
 
 static int
-print_expansions(struct edstate *e, int command)
+print_expansions(struct edstate *e)
 {
        int nwords;
        int start, end;

Reply via email to