/[gcl]/gcl/o/readline.d
ViewVC logotype

Diff of /gcl/o/readline.d

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by camm, Sun Feb 3 18:44:08 2002 UTC revision 1.3 by camm, Tue Jun 25 23:19:39 2002 UTC
# Line 94  static char *rl_completion_words(char *t Line 94  static char *rl_completion_words(char *t
94     the word to complete.  We can use the entire contents of rl_line_buffer     the word to complete.  We can use the entire contents of rl_line_buffer
95     in case we want to do some simple parsing.  Return the array of matches,     in case we want to do some simple parsing.  Return the array of matches,
96     or NULL if there aren't any. */     or NULL if there aren't any. */
97    extern char **completion_matches(char *,char *(*)(char *,int));
98  static char **rl_completion(char *text, int start, int end) {  static char **rl_completion(char *text, int start, int end) {
99          return completion_matches(text, rl_completion_words);          return completion_matches(text, rl_completion_words);
100  }  }
# Line 224  static siLreadline_init() { Line 225  static siLreadline_init() {
225                  readline_on = 1;                  readline_on = 1;
226    
227                  if (type_of(program_name)==t_string) {                  if (type_of(program_name)==t_string) {
228                          if (rl_readline_name)  
229                                  free(rl_readline_name);                          static char *mrln;
230                          rl_readline_name = malloc(program_name->st.st_fillp+1);  
231                          if (rl_readline_name==NULL) FEerror("Out of memory.", 0);                          if (mrln)
232                                    free(mrln);
233                            mrln = malloc(program_name->st.st_fillp+1);
234                            if (!mrln) FEerror("Out of memory.", 0);
235                          for (i=0; i<program_name->st.st_fillp; i++)                          for (i=0; i<program_name->st.st_fillp; i++)
236                                  rl_readline_name[i] = program_name->ust.ust_self[i];                                  mrln[i] = program_name->ust.ust_self[i];
237                          rl_readline_name[i] = 0;                          mrln[i] = 0;
238                            rl_readline_name=mrln;
239                          rl_initialize();                          rl_initialize();
240                  } else {                  } else {
241                          FEerror("~S is not a string.", 1, program_name);                          FEerror("~S is not a string.", 1, program_name);

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26