aboutsummaryrefslogtreecommitdiff
path: root/ch6/6-01_getword-enhanced.c (follow)
AgeCommit message (Expand)AuthorFilesLines
2015-03-03Solve Exercise 6-01: Enhanced `getword`zlg1-0/+170
nohover-highlight'> This exercise is probably the most challenging "function puzzle" thus far. Modifying getword(), using various states, and the hashtable all create an example of how small building blocks can work together to make something. The implementation is very simple and nowhere near completely supporting '#define', but that's not the point. To properly support it, you'd need to build an entire preprocessor/parser, and that's far beyond the scope of both the exercise and book. to include a bunch of error-catching and "smart" stuff. When I took a second look at it and realized `itoa` returns 0 on a string, things became a bit easier. I may have been able to outsource a few things to a function or two, but overall I think it worked out. 2013-09-24Clean up 5-10's printf() callszlg1-4/+0