[BACK]Return to fep_edit.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / fep

Diff for /OpenXM_contrib2/fep/fep_edit.c between version 1.7 and 1.8

version 1.7, 2019/12/13 15:41:36 version 1.8, 2020/11/01 10:28:22
Line 13  static char rcsid[]=
Line 13  static char rcsid[]=
   
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
   #include <unistd.h>
 #include <string.h>  #include <string.h>
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/stat.h>  #include <sys/stat.h>
Line 63  jmp_buf jbuf;    /* jump buffer */
Line 64  jmp_buf jbuf;    /* jump buffer */
 FUNC    *curFuncTab;                    /* current function table */  FUNC    *curFuncTab;                    /* current function table */
 FUNC    *altFuncTab;                    /* alternative function table */  FUNC    *altFuncTab;                    /* alternative function table */
   
   void ls (DIR *dirp, char *prefixstring);
   
 /*  /*
  * Default binding table   * Default binding table
  */   */
Line 123  BINDENT emacsBindings[] = {
Line 126  BINDENT emacsBindings[] = {
 /*  /*
  * Initialize function table buffer   * Initialize function table buffer
  */   */
 init_bind_table ()  void init_bind_table ()
 {  {
   
     curFuncTab = (FUNC *) calloc (sizeof (FUNC), 256);      curFuncTab = (FUNC *) calloc (sizeof (FUNC), 256);
Line 139  init_bind_table ()
Line 142  init_bind_table ()
  */   */
 char strspace [256], *strspace_addr = strspace;  char strspace [256], *strspace_addr = strspace;
   
 init_edit_params ()  void init_edit_params ()
 {  {
     struct indirect *idp;      struct indirect *idp;
     char *cp, *getenv();      char *cp, *getenv();
Line 209  init_edit_params ()
Line 212  init_edit_params ()
 /*  /*
  * Initialize emacs bindings   * Initialize emacs bindings
  */   */
 initEmacsBindings (cft, aft)  void initEmacsBindings (FUNC cft[], FUNC aft[])
     FUNC cft[], aft[];  
 {  {
     register int i;      register int i;
     BINDENT *ftp;      BINDENT *ftp;
Line 293  initEmacsBindings (cft, aft)
Line 295  initEmacsBindings (cft, aft)
 /*  /*
  * Main function of front end program   * Main function of front end program
  */   */
 CHAR *  CHAR * mygetline()
 mygetline()  
 {  {
     int c;      int c;
     CHAR *execute_command, *check_alias();      CHAR *execute_command, *check_alias();
Line 459  RETURN:
Line 460  RETURN:
  * Invoke appropliate function according to fucntion table   * Invoke appropliate function according to fucntion table
  * Return value 1 means exit from line editing   * Return value 1 means exit from line editing
  */   */
 callfunc (ft, c)  int callfunc (FUNC ft[], int c)
     FUNC ft[];  
     int c;  
 {  {
   
     if (isIndirect(ft[(int) c])) {      if (isIndirect(ft[(int) c])) {
Line 478  callfunc (ft, c)
Line 477  callfunc (ft, c)
 /*  /*
  * Beep and do nothing   * Beep and do nothing
  */   */
 fep_abort()  int fep_abort()
 {  {
     (void) errorBell ();      (void) errorBell ();
     return (0);      return (0);
Line 487  fep_abort()
Line 486  fep_abort()
 /*  /*
  * Insert the character self   * Insert the character self
  */   */
 self_insert(c)  int self_insert(CHAR c)
     CHAR c;  
 {  {
     register int i, nbyte = 1, currentNull;      register int i, nbyte = 1, currentNull;
 #ifdef KANJI  #ifdef KANJI
Line 537  self_insert(c)
Line 535  self_insert(c)
 /*  /*
  * Insert string in current position   * Insert string in current position
  */   */
 insert_string (s)  int insert_string (CHAR *s)
     CHAR *s;  
 {  {
     register int i, nbyte = strlen (s), currentNull;      register int i, nbyte = strlen (s), currentNull;
   
Line 569  insert_string (s)
Line 566  insert_string (s)
 /*  /*
  * Yank string from kill buffer.   * Yank string from kill buffer.
  */   */
 yank_from_kill_buffer ()  void yank_from_kill_buffer ()
 {  {
     insert_string (KillBuffer);      insert_string (KillBuffer);
 }  }
Line 577  yank_from_kill_buffer ()
Line 574  yank_from_kill_buffer ()
 /*  /*
  * Set mark to current position   * Set mark to current position
  */   */
 mark ()  int mark ()
 {  {
     set_mark (CurrentPosition);      set_mark (CurrentPosition);
     return (0);      return (0);
Line 586  mark ()
Line 583  mark ()
 /*  /*
  * Set mark to specified position   * Set mark to specified position
  */   */
 set_mark (pos)  int set_mark (int pos)
     int pos;  
 {  {
     MarkPosition = pos;      MarkPosition = pos;
     return (0);      return (0);
Line 596  set_mark (pos)
Line 592  set_mark (pos)
 /*  /*
  * Delete area from mark to current position to kill buffer   * Delete area from mark to current position to kill buffer
  */   */
 delete_to_kill_buffer ()  int delete_to_kill_buffer ()
 {  {
     int n = abs (CurrentPosition - MarkPosition);      int n = abs (CurrentPosition - MarkPosition);
   
Line 618  delete_to_kill_buffer ()
Line 614  delete_to_kill_buffer ()
 /*  /*
  * Move to specified position.   * Move to specified position.
  */   */
 moveto (position)  void moveto (int position)
 {  {
     if (position < CurrentPosition)      if (position < CurrentPosition)
         while (position < CurrentPosition)          while (position < CurrentPosition)
Line 636  moveto (position)
Line 632  moveto (position)
 /*  /*
  * Move cursor to top of line   * Move cursor to top of line
  */   */
 beginning_of_line()  int beginning_of_line()
 {  {
     register int i;      register int i;
   
Line 660  beginning_of_line()
Line 656  beginning_of_line()
 /*  /*
  * Move cursor to end of line   * Move cursor to end of line
  */   */
 end_of_line()  int end_of_line()
 {  {
     register int    i;      register int    i;
   
Line 679  end_of_line()
Line 675  end_of_line()
 /*  /*
  * Move cursor left one space   * Move cursor left one space
  */   */
 backward_character()  int backward_character()
 {  {
   
     return (backward_n_character (1));      return (backward_n_character (1));
Line 688  backward_character()
Line 684  backward_character()
 /*  /*
  * Move cursor left "n" space   * Move cursor left "n" space
  */   */
 backward_n_character(n)  int backward_n_character(int n)
     int n;  
 {  {
     int space;      int space;
     int i = CurrentPosition;      int i = CurrentPosition;
Line 724  backward_n_character(n)
Line 719  backward_n_character(n)
 /*  /*
  * Move cursor backward one word   * Move cursor backward one word
  */   */
 backward_word ()  int backward_word ()
 {  {
   
     return (backward_n_word (1));      return (backward_n_word (1));
Line 733  backward_word ()
Line 728  backward_word ()
 /*  /*
  * Move cursor backward n word   * Move cursor backward n word
  */   */
 backward_n_word (n)  int backward_n_word (int n)
     int n;  
 {  {
     register int i = CurrentPosition, nchars = 0;      register int i = CurrentPosition, nchars = 0;
   
Line 785  backward_n_word (n)
Line 779  backward_n_word (n)
 /*  /*
  * Move cursor backward one Word   * Move cursor backward one Word
  */   */
 backward_Word ()  int backward_Word ()
 {  {
   
     return (backward_n_Word (1));      return (backward_n_Word (1));
Line 794  backward_Word ()
Line 788  backward_Word ()
 /*  /*
  * Move cursor backward n Word   * Move cursor backward n Word
  */   */
 backward_n_Word (n)  int backward_n_Word (int n)
     int n;  
 {  {
     register int i = CurrentPosition, nchars = 0;      register int i = CurrentPosition, nchars = 0;
   
Line 844  backward_n_Word (n)
Line 837  backward_n_Word (n)
 /*  /*
  * Move cursor forward one character   * Move cursor forward one character
  */   */
 forward_character()  int forward_character()
 {  {
   
     return (forward_n_character (1));      return (forward_n_character (1));
Line 853  forward_character()
Line 846  forward_character()
 /*  /*
  * Move cursor forward n character   * Move cursor forward n character
  */   */
 forward_n_character(n)  int forward_n_character(int n)
     int n;  
 {  {
     int space;      int space;
     register int i = CurrentPosition;      register int i = CurrentPosition;
Line 905  forward_n_character(n)
Line 897  forward_n_character(n)
 /*  /*
  * Move cursor forward one word   * Move cursor forward one word
  */   */
 forward_word ()  int forward_word ()
 {  {
     return (forward_n_word (1));      return (forward_n_word (1));
 }  }
Line 913  forward_word ()
Line 905  forward_word ()
 /*  /*
  * Move cursor forward n word   * Move cursor forward n word
  */   */
 forward_n_word (n)  int forward_n_word (int n)
     int n;  
 {  {
     register int i = CurrentPosition, nchars = 0;      register int i = CurrentPosition, nchars = 0;
   
Line 939  forward_n_word (n)
Line 930  forward_n_word (n)
 /*  /*
  * Move cursor forward one word   * Move cursor forward one word
  */   */
 forward_Word ()  int forward_Word ()
 {  {
     return (forward_n_Word (1));      return (forward_n_Word (1));
 }  }
Line 947  forward_Word ()
Line 938  forward_Word ()
 /*  /*
  * Move cursor forward n word   * Move cursor forward n word
  */   */
 forward_n_Word (n)  int forward_n_Word (int n)
     int n;  
 {  {
     register int i = CurrentPosition, nchars = 0;      register int i = CurrentPosition, nchars = 0;
   
Line 973  forward_n_Word (n)
Line 963  forward_n_Word (n)
 /*  /*
  * Forward to end of word   * Forward to end of word
  */   */
 forward_to_end_of_word ()  int forward_to_end_of_word ()
 {  {
   
     return (forward_to_end_of_n_word (1));      return (forward_to_end_of_n_word (1));
Line 982  forward_to_end_of_word ()
Line 972  forward_to_end_of_word ()
 /*  /*
  * Forward to end of n word   * Forward to end of n word
  */   */
 forward_to_end_of_n_word (n)  int forward_to_end_of_n_word (int n)
 {  {
     register int i = CurrentPosition, nchars = 0;      register int i = CurrentPosition, nchars = 0;
   
Line 1009  forward_to_end_of_n_word (n)
Line 999  forward_to_end_of_n_word (n)
 /*  /*
  * Forward to end of word   * Forward to end of word
  */   */
 forward_to_end_of_Word ()  int forward_to_end_of_Word ()
 {  {
   
     return (forward_to_end_of_n_Word (1));      return (forward_to_end_of_n_Word (1));
Line 1018  forward_to_end_of_Word ()
Line 1008  forward_to_end_of_Word ()
 /*  /*
  * Forward to end of n word   * Forward to end of n word
  */   */
 forward_to_end_of_n_Word (n)  int forward_to_end_of_n_Word (int n)
 {  {
     register int i = CurrentPosition, nchars = 0;      register int i = CurrentPosition, nchars = 0;
   
Line 1045  forward_to_end_of_n_Word (n)
Line 1035  forward_to_end_of_n_Word (n)
 /*  /*
  * Delete previous one character   * Delete previous one character
  */   */
 delete_previous_character()  int delete_previous_character()
 {  {
   
     return (delete_previous_n_character (1));      return (delete_previous_n_character (1));
Line 1054  delete_previous_character()
Line 1044  delete_previous_character()
 /*  /*
  * Delete previous n characters   * Delete previous n characters
  */   */
 delete_previous_n_character(n)  int delete_previous_n_character(int n)
     int n;  
 {  {
     register int i, nbyte;      register int i, nbyte;
     int deleteArea, restArea;      int deleteArea, restArea;
Line 1101  delete_previous_n_character(n)
Line 1090  delete_previous_n_character(n)
 /*  /*
  * Delete previous one word   * Delete previous one word
  */   */
 delete_previous_word()  int delete_previous_word()
 {  {
   
     return (delete_previous_n_word (1));      return (delete_previous_n_word (1));
Line 1110  delete_previous_word()
Line 1099  delete_previous_word()
 /*  /*
  * Delete previous n word   * Delete previous n word
  */   */
 delete_previous_n_word(n)  int delete_previous_n_word(int n)
     int n;  
 {  {
     register int i = CurrentPosition, nchars = 0;      register int i = CurrentPosition, nchars = 0;
   
Line 1162  delete_previous_n_word(n)
Line 1150  delete_previous_n_word(n)
 /*  /*
  * Delete previous one word   * Delete previous one word
  */   */
 delete_previous_Word()  int delete_previous_Word()
 {  {
   
     return (delete_previous_n_Word (1));      return (delete_previous_n_Word (1));
Line 1171  delete_previous_Word()
Line 1159  delete_previous_Word()
 /*  /*
  * Delete previous n word   * Delete previous n word
  */   */
 delete_previous_n_Word(n)  int delete_previous_n_Word(int n)
     int n;  
 {  {
     register int i = CurrentPosition, nchars = 0;      register int i = CurrentPosition, nchars = 0;
   
Line 1223  delete_previous_n_Word(n)
Line 1210  delete_previous_n_Word(n)
 /*  /*
  * Delete next one character   * Delete next one character
  */   */
 delete_next_character ()  int delete_next_character ()
 {  {
   
     return (delete_next_n_character (1));      return (delete_next_n_character (1));
Line 1232  delete_next_character ()
Line 1219  delete_next_character ()
 /*  /*
  * Delete next n character   * Delete next n character
  */   */
 delete_next_n_character (n)  int delete_next_n_character (int n)
     int n;  
 {  {
     register int i, nbyte;      register int i, nbyte;
     int deleteArea, restArea;      int deleteArea, restArea;
Line 1282  delete_next_n_character (n)
Line 1268  delete_next_n_character (n)
 /*  /*
  * Delete next one word   * Delete next one word
  */   */
 delete_next_word ()  int delete_next_word ()
 {  {
     return (delete_next_n_word (1));      return (delete_next_n_word (1));
 }  }
Line 1290  delete_next_word ()
Line 1276  delete_next_word ()
 /*  /*
  * Delete next n word   * Delete next n word
  */   */
 delete_next_n_word (n)  int delete_next_n_word (int n)
     int n;  
 {  {
     register int i = CurrentPosition, nchars = 0;      register int i = CurrentPosition, nchars = 0;
   
Line 1316  delete_next_n_word (n)
Line 1301  delete_next_n_word (n)
 /*  /*
  * Delete next one word   * Delete next one word
  */   */
 delete_next_Word ()  int delete_next_Word ()
 {  {
     return (delete_next_n_Word (1));      return (delete_next_n_Word (1));
 }  }
Line 1324  delete_next_Word ()
Line 1309  delete_next_Word ()
 /*  /*
  * Delete next n word   * Delete next n word
  */   */
 delete_next_n_Word (n)  int delete_next_n_Word (int n)
     int n;  
 {  {
     register int i = CurrentPosition, nchars = 0;      register int i = CurrentPosition, nchars = 0;
   
Line 1350  delete_next_n_Word (n)
Line 1334  delete_next_n_Word (n)
 /*  /*
  * Erase whole line   * Erase whole line
  */   */
 delete_line()  int delete_line()
 {  {
     register int i = CurrentPosition;      register int i = CurrentPosition;
     register int len;      register int len;
Line 1385  delete_line()
Line 1369  delete_line()
 /*  /*
  * Delete characters from current position to top of line   * Delete characters from current position to top of line
  */   */
 kill_to_top_of_line()  int kill_to_top_of_line()
 {  {
     int i = CurrentPosition;      int i = CurrentPosition;
   
Line 1396  kill_to_top_of_line()
Line 1380  kill_to_top_of_line()
 /*  /*
  * Delete characters from current position to end of line   * Delete characters from current position to end of line
  */   */
 kill_to_end_of_line()  int kill_to_end_of_line()
 {  {
     register int    i, backCnt = 0;      register int    i, backCnt = 0;
   
Line 1422  kill_to_end_of_line()
Line 1406  kill_to_end_of_line()
 /*  /*
  * Insert tab to current cursor position   * Insert tab to current cursor position
  */   */
 insert_tab()  int insert_tab()
 {  {
   
     /* sorry, not implemented */      /* sorry, not implemented */
Line 1432  insert_tab()
Line 1416  insert_tab()
 /*  /*
  * Process new line   * Process new line
  */   */
 new_line()  int new_line()
 {  {
   
     (void) end_of_line;      (void) end_of_line;
Line 1446  new_line()
Line 1430  new_line()
 /*  /*
  * Check current position is top-of-line   * Check current position is top-of-line
  */   */
 is_tol()  int is_tol()
 {  {
     return (CurrentPosition == 0);      return (CurrentPosition == 0);
 }  }
Line 1454  is_tol()
Line 1438  is_tol()
 /*  /*
  * Check current position is end-of-line   * Check current position is end-of-line
  */   */
 is_eol()  int is_eol()
 {  {
     return (CommandLine [CurrentPosition] == '\0');      return (CommandLine [CurrentPosition] == '\0');
 }  }
Line 1462  is_eol()
Line 1446  is_eol()
 /*  /*
  * Check command line if it refer history or not   * Check command line if it refer history or not
  */   */
 refer_history()  int refer_history()
 {  {
     char   *historyExtract ();      char   *historyExtract ();
     char   *his;      char   *his;
Line 1488  refer_history()
Line 1472  refer_history()
 #define FORWARD     1  #define FORWARD     1
 #define REVERSE     2  #define REVERSE     2
   
 search_reverse ()  int search_reverse ()
 {  {
     return (search_history (REVERSE));      return (search_history (REVERSE));
 }  }
   
 search_forward ()  int search_forward ()
 {  {
     return (search_history (FORWARD));      return (search_history (FORWARD));
 }  }
   
 search_history (direct)  int search_history (int direct)
     int direct;  
 {  {
     char *his, *search_reverse_history(), *search_forward_history();      char *his, *search_reverse_history(), *search_forward_history();
     char *(*func)();      char *(*func)();
Line 1539  AGAIN:
Line 1522  AGAIN:
 /*  /*
  * Insert the character and flush buffer   * Insert the character and flush buffer
  */   */
 insert_and_flush(c)  int insert_and_flush(char c)
     char c;  
 {  {
     (void) self_insert (c);      (void) self_insert (c);
     return (1);      return (1);
Line 1550  insert_and_flush(c)
Line 1532  insert_and_flush(c)
  * Insert the character, but it means EOL. Therefore move cursor backward and   * Insert the character, but it means EOL. Therefore move cursor backward and
  * flush buffer   * flush buffer
  */   */
 send_eof()  int send_eof()
 {  {
 #ifdef TERMIOS  #ifdef TERMIOS
     char c = initial_ttymode.c_cc[VEOF];      char c = initial_ttymode.c_cc[VEOF];
Line 1569  send_eof()
Line 1551  send_eof()
 /*  /*
  * Alarm for EOF on only the first time finding eof character   * Alarm for EOF on only the first time finding eof character
  */   */
 alarm_on_eof ()  int alarm_on_eof ()
 {  {
   
     errorBell ();      errorBell ();
Line 1581  alarm_on_eof ()
Line 1563  alarm_on_eof ()
 /*  /*
  * Clear screen   * Clear screen
  */   */
 clear_screen()  int clear_screen()
 {  {
   
     if (term_clear) {      if (term_clear) {
Line 1598  clear_screen()
Line 1580  clear_screen()
 typedef enum {HOP_INSERT, HOP_REPLACE} HISTOP;  typedef enum {HOP_INSERT, HOP_REPLACE} HISTOP;
 typedef enum {HDIR_PREV, HDIR_CURRENT, HDIR_NEXT} HISTDIR;  typedef enum {HDIR_PREV, HDIR_CURRENT, HDIR_NEXT} HISTDIR;
   
   int serv_history(HISTOP op, HISTDIR dir);
   
 /*  /*
  * Get next history entry   * Get next history entry
  */   */
 next_history()  int next_history()
 {  {
     return (serv_history (HOP_REPLACE, HDIR_NEXT));      return (serv_history (HOP_REPLACE, HDIR_NEXT));
 }  }
Line 1609  next_history()
Line 1593  next_history()
 /*  /*
  * Get next history entry   * Get next history entry
  */   */
 previous_history()  int previous_history()
 {  {
     return (serv_history (HOP_REPLACE, HDIR_PREV));      return (serv_history (HOP_REPLACE, HDIR_PREV));
 }  }
Line 1617  previous_history()
Line 1601  previous_history()
 /*  /*
  * Insert next history entry   * Insert next history entry
  */   */
 insert_current_history()  int insert_current_history()
 {  {
     return (serv_history (HOP_INSERT, HDIR_CURRENT));      return (serv_history (HOP_INSERT, HDIR_CURRENT));
 }  }
Line 1625  insert_current_history()
Line 1609  insert_current_history()
 /*  /*
  * Insert next history entry   * Insert next history entry
  */   */
 insert_next_history()  int insert_next_history()
 {  {
     return (serv_history (HOP_INSERT, HDIR_NEXT));      return (serv_history (HOP_INSERT, HDIR_NEXT));
 }  }
Line 1633  insert_next_history()
Line 1617  insert_next_history()
 /*  /*
  * Insert next history entry   * Insert next history entry
  */   */
 insert_previous_history()  int insert_previous_history()
 {  {
     return (serv_history (HOP_INSERT, HDIR_PREV));      return (serv_history (HOP_INSERT, HDIR_PREV));
 }  }
Line 1641  insert_previous_history()
Line 1625  insert_previous_history()
 /*  /*
  * Get previous history   * Get previous history
  */   */
 serv_history(op, dir)  int serv_history(HISTOP op, HISTDIR dir)
     HISTOP op;  
     HISTDIR dir;  
 {  {
     register char *cp;      register char *cp;
     char *getPreviousHistory (), *getNextHistory (), *getCurrentHistory ();      char *getPreviousHistory (), *getNextHistory (), *getCurrentHistory ();
Line 1670  serv_history(op, dir)
Line 1652  serv_history(op, dir)
 /*  /*
  * Show history   * Show history
  */   */
 show_history()  void show_history()
 {  {
   
     (void) clear_edit_line ();      (void) clear_edit_line ();
Line 1681  show_history()
Line 1663  show_history()
 /*  /*
  * Do nothing   * Do nothing
  */   */
 ignore()  int ignore()
 {  {
     return(0);      return(0);
 }  }
Line 1689  ignore()
Line 1671  ignore()
 /*  /*
  * Next character is literal   * Next character is literal
  */   */
 literal_next()  int literal_next()
 {  {
   
     return (self_insert (getcharacter ()));      return (self_insert (getcharacter ()));
Line 1698  literal_next()
Line 1680  literal_next()
 /*  /*
  * Reprint command line   * Reprint command line
  */   */
 reprint()  int reprint()
 {  {
   
     (void) clear_edit_line ();      (void) clear_edit_line ();
Line 1709  reprint()
Line 1691  reprint()
 /*  /*
  * Print whole command line and move cursor to the current position   * Print whole command line and move cursor to the current position
  */   */
 print_com_line()  void print_com_line()
 {  {
   
     printS (CommandLine);      printS (CommandLine);
Line 1722  print_com_line()
Line 1704  print_com_line()
 /*  /*
  * Calcurate space of string using "^" for control character   * Calcurate space of string using "^" for control character
  */   */
 howlong(s, n)  int howlong(char *s, int n)
     char *s;  
     int n;  
 {  {
     register char *sp;      register char *sp;
     register int area = 0;      register int area = 0;
Line 1743  howlong(s, n)
Line 1723  howlong(s, n)
 /*  /*
  * Repeat puting character n times   * Repeat puting character n times
  */   */
 repeat(c, n)  void repeat(char c, int n)
     char c;  
     register int n;  
 {  {
     for (n = n; n; n--)      for (n = n; n; n--)
         (void) putchar(c);          (void) putchar(c);
Line 1754  repeat(c, n)
Line 1732  repeat(c, n)
 /*  /*
  * Repeat putting string n times   * Repeat putting string n times
  */   */
 repeat_string(s, n)  void repeat_string(char *s, int n)
     char *s;  
     register int n;  
 {  {
     for (n = n; n; n--)      for (n = n; n; n--)
         fputs(s, stdout);          fputs(s, stdout);
Line 1765  repeat_string(s, n)
Line 1741  repeat_string(s, n)
 /*  /*
  * Expand file name   * Expand file name
  */   */
 expand_file_name ()  int expand_file_name ()
 {  {
     CHAR *cp, *start_expand;      CHAR *cp, *start_expand;
     char *x_dirname();      char *x_dirname();
Line 1887  expand_file_name ()
Line 1863  expand_file_name ()
 /*  /*
  * List file name   * List file name
  */   */
 list_file_name ()  int list_file_name ()
 {  {
     CHAR *cp;      CHAR *cp;
     char dir[256];      char dir[256];
Line 1946  list_file_name ()
Line 1922  list_file_name ()
   
 int     rememberPosition;  int     rememberPosition;
   
 clear_edit_line ()  void clear_edit_line ()
 {  {
   
     if (editstatus == NOTEDITING)      if (editstatus == NOTEDITING)
Line 1957  clear_edit_line ()
Line 1933  clear_edit_line ()
     (void) fputs ("\r\n", stdout);      (void) fputs ("\r\n", stdout);
 }  }
   
 recover_edit_line (put_prompt)  void recover_edit_line (int put_prompt)
     int put_prompt;  
 {  {
   
     if (editstatus == NOTEDITING)      if (editstatus == NOTEDITING)
Line 1978  recover_edit_line (put_prompt)
Line 1953  recover_edit_line (put_prompt)
 /*  /*
  * Do ls   * Do ls
  */   */
 ls (dirp, prefixstring)  void ls (DIR *dirp, char *prefixstring)
     DIR *dirp;  
     char *prefixstring;  
 {  {
     struct direct *dp;      struct direct *dp;
     char *fileList[MAXFILES + 1];      char *fileList[MAXFILES + 1];
Line 2062  BACK:
Line 2035  BACK:
   
 #include "../rinfo/rinfo.h"  #include "../rinfo/rinfo.h"
   
 list_remote_file (host, pattern)  void list_remote_file (char *host, char *pattern)
     char *host, *pattern;  
 {  {
     struct slist *slp, *getfilelist();      struct slist *slp, *getfilelist();
     int i, j;      int i, j;
Line 2103  list_remote_file (host, pattern)
Line 2075  list_remote_file (host, pattern)
 }  }
 #endif /* RINFO */  #endif /* RINFO */
   
 bind_key (ft, func, s, dfunc)  /*
     FUNC ft[];          /* Function table */      FUNC ft[];          Function table
     FUNC func;          /* Function to be binded */      FUNC func;          Function to be binded
     char *s;            /* String to bind */      char *s;            String to bind
     FUNC dfunc;         /* Default function for table allocating */      FUNC dfunc;         Default function for table allocating
   */
   
   int bind_key (FUNC ft[], FUNC func, char *s, FUNC dfunc)
 {  {
     char tmps[16];      char tmps[16];
   

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>