knr-exr

Solutions to the exercises in 'The C Programming Language' by KnR.
git clone git://git.hellocld.com/knr-exr
Log | Files | Refs

DateCommit messageAuthorFiles+-
2019-08-13 01:19Tried writing the skip stuff by hand first. Still doesn't work.Christopher Ray Langford3+48-37
2019-08-06 20:22Started working on skipping in getsymbol. IncompleteChristopher Ray Langford2+28-32
2019-08-06 16:55Created new struct for variable node (vnode)Christopher Ray Langford4+74-19
2019-08-06 11:16Forgot to commit changes to getwordChristopher Ray Langford1+1-1
2019-08-04 15:00Commented out string const removal to test. Prog ends but doesn't print anything :(Christopher Ray Langford1+30-9
2019-08-04 14:31Fixed bug with getsymbol only returning individual charactersChristopher Ray Langford2+39-5
2019-08-02 16:01Initial work on 6-02. Def not completeChris Langford3+54-10
2019-08-01 20:29Comment blocked 6-02Chris Langford1+22-2
2019-08-01 20:14Started 6-02. Split tnode funcs out into separate src fileChris Langford6+76-47
2019-08-01 19:38Added some example progs from Ch6 and some source material for testingChris Langford11+9143-0
2019-08-01 15:09Was accidentally tracking .swo filesChris Langford2+1-0
2019-07-31 16:54Skips strings and comments! 6-1 complete!Chris Langford2+14-14
2019-07-31 15:19Broke skip_comment out into func. Works but fails on string constsChris Langford1+29-21
2019-07-31 00:04getword identifies start and end of a comment, but it gets stuck afterChris Langford1+23-0
2019-07-30 23:01Got underscores and #define/#include search workingChris Langford2+18-13
2019-07-30 20:49Copied sample code for use with 6-1Chris Langford3+114-0
2019-07-30 19:305-20 still isn't solved, but I think I'm gonna move on.Chris Langford2+1-11
2019-07-30 01:32Still working on 5-20Christopher Ray Langford3+15-2
2019-07-29 23:575-19 Complete!Christopher Ray Langford3+42-2
2019-07-29 23:085-18 complete!Christopher Ray Langford2+12-2
2019-07-18 21:45Moved gettoken into it's own fileChris Langford5+55-38
2019-07-18 20:57Added a nifty tags fileChris Langford1+470-0
2019-07-18 16:12DCL copied from K&RChris Langford4+118-0
2019-07-17 20:56Empty files for 5-18Chris Langford4+0-0
2019-07-16 17:13Something got squirrelly in one of my previous commits. 5-17 works.Chris Langford2+32-36
2019-07-16 16:59Column selection works, but somewhere the sort itself is brokenChris Langford2+34-39
2019-07-15 01:05Sorting doesn't work, but it's getting closerChristopher Ray Langford2+40-17
2019-07-15 00:15Updated data for 5-17. Added cmd arg for selecting columnChristopher Ray Langford2+20-19
2019-07-12 19:38I think 5-16 is working?Chris Langford2+26-13
2019-07-12 19:25Fairly certain 5-15 is complete?Chris Langford2+29-14
2019-07-12 19:10Swapped out string strcmp with custom strcmpbChris Langford1+10-1
2019-07-12 19:05Just some more data to verify sorting is working correctlyChris Langford1+5-1
2019-07-12 19:025-14 completeChris Langford3+171-0
2019-07-12 16:50Tail completeChris Langford1+64-1
2019-07-12 16:16Started tail (5-13)Chris Langford2+49-0
2019-07-12 15:41I'm calling it on 5-12. I got the pointChris Langford1+7-6
2019-07-11 17:00Fixed segfault bugChris Langford1+2-4
2019-07-10 00:38Corrected '+' case pointer reference. Still segfaultsChris Langford1+4-4
2019-07-09 02:27Added a whole bunch of debug stuff to 5-12Christopher Ray Langford3+41-25
2019-06-27 17:47Started 5-12. Paramater analysis don't work.Christopher Ray Langford5+207-0
2019-06-26 00:205-11 complete!Christopher Ray Langford5+106-2
2019-06-24 01:44Fixed the issue with errant additional output!Chris Langford1+1-2
2019-06-20 21:04Removed unnecessary check for end of lineChristopher Ray Langford1+1-2
2019-06-20 20:37Added check for \0. Seems piped data isn't workingChristopher Ray Langford1+1-1
2019-06-20 20:34Added a data file for testing, and debug showing tablen settingChristopher Ray Langford2+3-0
2019-06-20 11:56detab now works (always initialize your variables, yo!)Christopher Ray Langford1+3-5
2019-06-20 02:02detab works once, but following lines break.Christopher Ray Langford1+80-0
2019-06-14 17:075-10 completeChristopher Ray Langford1+14-12
2019-06-13 21:20Started the calc. Doesn't work.Christopher Ray Langford1+81-0
2019-06-13 19:145-9 completeChristopher Ray Langford1+2-2
2019-06-12 20:34Started 5-09. Don't totally quiite get it yet.Christopher Ray Langford1+50-0
2019-06-12 17:125-8 completeChristopher Ray Langford2+56-0
2019-06-12 16:38Time difference is minimal (5-7 complete)Christopher Ray Langford2+218-0
2019-06-12 15:10strindex implemented. 5-06 completeChristopher Ray Langford1+18-0
2019-06-12 14:33itoa implementedChristopher Ray Langford1+19-0
2019-06-12 14:20Reverse implementedChristopher Ray Langford1+16-0
2019-06-12 13:22atoi workingChristopher Ray Langford1+6-5
2019-06-12 01:03Started atoi, but doesn't workChristopher Ray Langford1+20-2
2019-06-12 00:155-6 started. getlineb implementedChristopher Ray Langford1+36-0
2019-06-05 20:585-5 completeChristopher Ray Langford1+6-1
2019-06-05 20:45strncpyb works. Fixed(?) segfault issueChristopher Ray Langford1+3-1
2019-06-05 20:33strncatb() works, but segfaults? Not sure why yet.Christopher Ray Langford1+11-4
2019-06-05 20:18Fixed strncpybChristopher Ray Langford1+3-1
2019-06-05 17:53strncpyb is written, but returning garbage. Why?Chris Langford1+7-3
2019-06-05 02:26Started work on 5-5Christopher Ray Langford1+45-0
2019-06-04 23:275-04 completeChristopher Ray Langford2+37-0
2019-06-04 23:065-03 complete...Christopher Ray Langford2+29-0
2019-06-02 14:435-02 completeChristopher Ray Langford7+108-0
2019-06-02 14:145-01 completeChristopher Ray Langford6+8-5
2019-05-30 20:545-01 written but untested :oChristopher Ray Langford4+92-0
2019-05-30 19:354-14 completeChristopher Ray Langford2+22-0
2019-05-30 19:004-13 completeChristopher Ray Langford2+47-0
2019-05-30 18:414-12 works!Christopher Ray Langford1+6-7
2019-05-30 14:394-12 written but throwing weird segfault in for()Chris Langford3+43-9
2019-05-29 00:53Barely started 4-12Chris Langford2+36-0
2019-05-23 20:014-11 completeChris Langford1+20-11
2019-05-23 19:14Broke the calc example into separate files per section 4.5Chris Langford6+168-0
2019-05-23 17:224-10 not tested, but good enoughChris Langford2+275-0
2019-05-23 15:374-09 completeChris Langford1+254-0
2019-05-22 20:394-08 completeChris Langford1+253-0
2019-05-22 20:324-07 completeChris Langford1+253-0
2019-05-22 19:584-06 complete!Chris Langford2+241-0
2019-05-16 15:284-05 completeChris Langford2+209-0
2019-05-16 15:014-04 completeChris Langford2+203-0
2019-05-13 21:13Negative numbers work!Chris Langford1+11-7
2019-05-06 20:14Started implementing negative number support, but it don't work :(Chris Langford1+14-3
2019-05-06 18:38Typed in calc from chapter, need to do the exercise nextChris Langford2+125-0
2019-04-24 12:44Ex 4-03 to 4-10 comment-block addedChris Langford8+36-0
2019-04-23 17:284-02 completeChris Langford2+23-4
2019-04-23 15:05Started 4-02Chris Langford1+36-0
2019-04-22 16:484-01 completeChris Langford2+48-0
2019-04-20 00:543-06 completeChris Langford2+44-0
2019-04-19 20:363-05 completeChris Langford2+46-0
2019-04-17 19:51Just adding files with exercise commentsChris Langford2+11-0
2019-04-16 23:593-04 works, and I kinda get why, but not 100%.Chris Langford2+64-1
2019-04-16 22:31Minor tweak to 3-03Chris Langford1+2-3
2019-04-16 22:283-03 complete (enough)Chris Langford2+42-0
2019-04-16 17:45Added makefile edits and started 3-03Chris Langford4+164-2
2019-04-14 19:133-02 completeChris Langford2+22-3
2019-04-14 15:53Forgot to add test text fileChris Langford1+2-0
2019-04-14 15:523-02 half-completeChris Langford1+65-0
2019-04-14 15:193-01 completeChris Langford1+69-0
2019-04-14 14:352-10 completeChris Langford1+50-0
2019-04-14 14:172-09 complete (enough)Chris Langford1+21-1
2019-04-09 02:40Can't quite figure out this two's compliment thingChris Langford2+14-10
2019-04-09 01:082-8 completeChris Langford1+21-0
2019-04-08 20:39Testing post-receive scriptChris Langford1+2-0
2019-04-08 01:16Fixed 2-6, which fixed 2-7Chris Langford2+5-9
2019-04-04 02:47Just shortened the function up a bit (unnecessary var)Chris Langford1+1-2
2019-04-04 02:21I thought 2-6 was complete, but setbits doesn't seem to work in 2-7Chris Langford1+36-0
2019-04-04 01:422-6 completeChris Langford1+5-7
2019-04-02 02:18Damn close to solving 2-6Chris Langford2+27-2
2019-04-01 01:32Just starting bitwise operators sectionChris Langford1+21-0
2019-04-01 01:162-5 completeChris Langford1+60-0
2019-04-01 01:052-4 completeChris Langford1+64-0
2019-03-31 21:242-3 completeChris Langford1+60-0
2019-03-31 20:522-02 completeChris Langford1+40-0
2019-03-31 14:222-01 completeChris Langford1+65-0
2019-03-31 13:18Calling 1-24 good enough.Chris Langford1+81-0
2019-03-30 16:181-23 completeChris Langford1+72-0
2019-03-29 16:561-22 completeChris Langford2+46-0
2019-03-29 15:06Removed cruft from earlier code, moved all ex to ch dirChris Langford27+0-388
2019-03-28 02:13I think I got it??Chris Langford1+24-13
2019-03-26 02:01Not quite right, but close (1-21)Chris Langford1+48-0
2019-03-24 22:57Completed 1-20Chris Langford2+76-0
2019-03-24 19:20Had to hackily fix corrupt git dirChris Langford19+314-155
2019-03-15 19:51Some unsaved editsChris Langford5+0-76
2019-03-15 19:48Started work on 1.9 ex. Not finished yet.Chris Langford9+221-0
2019-03-15 16:39Finished 1.6 exercisesChris Langford7+138-0
2019-03-15 01:28Did some stuffChris Langford6+86-0
2019-03-14 21:59Added .gitignoreChris Langford1+2-0
2019-03-14 21:16Init commitChris Langford8+69-0