eval.c (7e1b7636c894be9d1130c284089ce1ea0786ecec) | eval.c (5183ddf2ed56519b669320095ed00528a71a9393) |
---|---|
1/*- 2 * Copyright (c) 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 1066 unchanged lines hidden (view full) --- 1075 if (jp) 1076 exitshell(exitstatus); 1077 } else if (cmdentry.cmdtype == CMDBUILTIN) { 1078#ifdef DEBUG 1079 trputs("builtin command: "); trargs(argv); 1080#endif 1081 mode = (cmdentry.u.index == EXECCMD)? 0 : REDIR_PUSH; 1082 if (flags == EV_BACKCMD) { | 1/*- 2 * Copyright (c) 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 1066 unchanged lines hidden (view full) --- 1075 if (jp) 1076 exitshell(exitstatus); 1077 } else if (cmdentry.cmdtype == CMDBUILTIN) { 1078#ifdef DEBUG 1079 trputs("builtin command: "); trargs(argv); 1080#endif 1081 mode = (cmdentry.u.index == EXECCMD)? 0 : REDIR_PUSH; 1082 if (flags == EV_BACKCMD) { |
1083 memout.nleft = 0; | |
1084 memout.nextc = memout.buf; | 1083 memout.nextc = memout.buf; |
1084 memout.bufend = memout.buf; |
|
1085 memout.bufsize = 64; 1086 mode |= REDIR_BACKQ; 1087 } 1088 savecmdname = commandname; 1089 savetopfile = getcurrentfile(); 1090 cmdenviron = &varlist; 1091 e = -1; 1092 savehandler = handler; --- 36 unchanged lines hidden (view full) --- 1129 out2 = &errout; 1130 freestdout(); 1131 handler = savehandler; 1132 commandname = savecmdname; 1133 if (jp) 1134 exitshell(exitstatus); 1135 if (flags == EV_BACKCMD) { 1136 backcmd->buf = memout.buf; | 1085 memout.bufsize = 64; 1086 mode |= REDIR_BACKQ; 1087 } 1088 savecmdname = commandname; 1089 savetopfile = getcurrentfile(); 1090 cmdenviron = &varlist; 1091 e = -1; 1092 savehandler = handler; --- 36 unchanged lines hidden (view full) --- 1129 out2 = &errout; 1130 freestdout(); 1131 handler = savehandler; 1132 commandname = savecmdname; 1133 if (jp) 1134 exitshell(exitstatus); 1135 if (flags == EV_BACKCMD) { 1136 backcmd->buf = memout.buf; |
1137 backcmd->nleft = memout.nextc - memout.buf; | 1137 backcmd->nleft = memout.buf != NULL ? 1138 memout.nextc - memout.buf : 0; |
1138 memout.buf = NULL; | 1139 memout.buf = NULL; |
1140 memout.nextc = NULL; 1141 memout.bufend = NULL; |
|
1139 } 1140 if (cmdentry.u.index != EXECCMD) 1141 popredir(); 1142 if (e != -1) { 1143 if ((e != EXERROR && e != EXEXEC) 1144 || cmdentry.special) 1145 exraise(e); 1146 popfilesupto(savetopfile); --- 236 unchanged lines hidden --- | 1142 } 1143 if (cmdentry.u.index != EXECCMD) 1144 popredir(); 1145 if (e != -1) { 1146 if ((e != EXERROR && e != EXEXEC) 1147 || cmdentry.special) 1148 exraise(e); 1149 popfilesupto(savetopfile); --- 236 unchanged lines hidden --- |