|
Fri, May 02, 2008
![[Link]](http://geekblog.oneandoneis2.org/img/chain_link.gif)
Section 4.3, pages 76-78
I realise that this is a long shot, but: Can anyone tell me why the buffer used by getch() and ungetch() is an array of 100 chars?
Because no matter how I follow the logic, I can't see any way that you'll ever have more than one char going into the buffer: getop() only puts a maximum of one char into the buffer at the end of its run, and the first thing it does when it's called is to take a char from the buffer if there is one.
Am I missing something, or is this array here for future-proof flexibility or something?
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |