[BACK]Return to bc.y CVS log [TXT][DIR] Up to [local] / src / usr.bin / bc

Diff for /src/usr.bin/bc/bc.y between version 1.40 and 1.41

version 1.40, 2011/10/06 14:37:56 version 1.41, 2012/03/08 08:20:08
Line 1144 
Line 1144 
                         dup(p[1]);                          dup(p[1]);
                         close(p[0]);                          close(p[0]);
                         close(p[1]);                          close(p[1]);
                         if (interactive) {  
                                 gettty(&ttysaved);  
                                 el = el_init("bc", stdin, stderr, stderr);  
                                 hist = history_init();  
                                 history(hist, &he, H_SETSIZE, 100);  
                                 el_set(el, EL_HIST, history, hist);  
                                 el_set(el, EL_EDITOR, "emacs");  
                                 el_set(el, EL_SIGNAL, 0);  
                                 el_set(el, EL_PROMPT, dummy_prompt);  
                                 el_set(el, EL_ADDFN, "bc_eof", "", bc_eof);  
                                 el_set(el, EL_BIND, "^D", "bc_eof", NULL);  
                                 el_source(el, NULL);  
                         }  
                 } else {                  } else {
                         close(STDIN_FILENO);                          close(STDIN_FILENO);
                         dup(p[0]);                          dup(p[0]);
Line 1165 
Line 1152 
                         execl(_PATH_DC, "dc", "-x", (char *)NULL);                          execl(_PATH_DC, "dc", "-x", (char *)NULL);
                         err(1, "cannot find dc");                          err(1, "cannot find dc");
                 }                  }
           }
           if (interactive) {
                   gettty(&ttysaved);
                   el = el_init("bc", stdin, stderr, stderr);
                   hist = history_init();
                   history(hist, &he, H_SETSIZE, 100);
                   el_set(el, EL_HIST, history, hist);
                   el_set(el, EL_EDITOR, "emacs");
                   el_set(el, EL_SIGNAL, 0);
                   el_set(el, EL_PROMPT, dummy_prompt);
                   el_set(el, EL_ADDFN, "bc_eof", "", bc_eof);
                   el_set(el, EL_BIND, "^D", "bc_eof", NULL);
                   el_source(el, NULL);
         }          }
         yywrap();          yywrap();
         return yyparse();          return yyparse();

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41