| # | Line 145 | Line 145 | r_comout() /* print string to command line */ | |
|---|---|---|
| 145 | ||
| 146 | r_comin() /* read string from command line */ | |
| 147 | { | |
| 148 | < | char buf[256]; |
| 148 | > | char buf[256], *prompt; |
| 149 | > | /* get prompt */ |
| 150 | > | if (getc(devin)) { |
| 151 | > | mygets(buf, devin); |
| 152 | > | prompt = buf; |
| 153 | > | } else |
| 154 | > | prompt = NULL; |
| 155 | /* get string */ | |
| 156 | < | (*dev->comin)(buf); |
| 156 | > | (*dev->comin)(buf, prompt); |
| 157 | /* reply */ | |
| 158 | putc(COM_COMIN, devout); | |
| 159 | myputs(buf, devout); | |
| – | Removed lines |
| + | Added lines |
| < | Changed lines (old) |
| > | Changed lines (new) |