[BACK]Return to clit.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / pmdb

Diff for /src/usr.bin/pmdb/Attic/clit.c between version 1.4 and 1.5

version 1.4, 2002/08/09 02:23:48 version 1.5, 2003/10/31 08:47:31
Line 136 
Line 136 
 cmdinit(struct clit *cmds, int ncmds)  cmdinit(struct clit *cmds, int ncmds)
 {  {
         struct clitenv *env;          struct clitenv *env;
 #ifdef __NetBSD__  
         HistEvent ev;          HistEvent ev;
 #endif  
   
         if ((env = malloc(sizeof(*env))) == NULL)          if ((env = malloc(sizeof(*env))) == NULL)
                 err(1, "Can't init cmd interpreter.");                  err(1, "Can't init cmd interpreter.");
Line 147 
Line 145 
         env->ncmds = ncmds;          env->ncmds = ncmds;
   
         env->hist = history_init();          env->hist = history_init();
 #ifdef __NetBSD__  
         history(env->hist, &ev, H_SETSIZE, 100);          history(env->hist, &ev, H_SETSIZE, 100);
 #else  
         history(env->hist, H_EVENT, 100);  
 #endif  
   
 #ifdef __NetBSD__  
         env->el = el_init(__progname, stdin, stdout, stderr);          env->el = el_init(__progname, stdin, stdout, stderr);
 #else  
         env->el = el_init(__progname, stdin, stdout);  
 #endif  
         el_set(env->el, EL_EDITOR, "emacs");          el_set(env->el, EL_EDITOR, "emacs");
         el_set(env->el, EL_PROMPT, prompt);          el_set(env->el, EL_PROMPT, prompt);
         el_set(env->el, EL_HIST, history, env->hist);          el_set(env->el, EL_HIST, history, env->hist);
Line 203 
Line 194 
                 struct clit *cmdp;                  struct clit *cmdp;
                 char **ap;                  char **ap;
                 int argc, res;                  int argc, res;
 #ifdef __NetBSD__  
                 HistEvent ev;                  HistEvent ev;
 #endif  
   
                 memset(argv, 0, sizeof(char *) * maxargs);                  memset(argv, 0, sizeof(char *) * maxargs);
   
 #ifdef __NetBSD__  
                 history(hist, &ev, H_ENTER, elline);                  history(hist, &ev, H_ENTER, elline);
 #else  
                 history(hist, H_ENTER, elline);  
 #endif  
   
                 orgline = line = strdup(elline);                  orgline = line = strdup(elline);
                 if (line == NULL)                  if (line == NULL)
Line 237 
Line 222 
                 /*                  /*
                  * Editline commands.                   * Editline commands.
                  */                   */
                 if (el_parse(el, argc, argv) != -1)                  if (el_parse(el, argc, (const char **)argv) != -1)
                         goto cmdout;                          goto cmdout;
   
                 if ((res = name_to_cmd(argv[0], env->cmds, env->ncmds,                  if ((res = name_to_cmd(argv[0], env->cmds, env->ncmds,

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5