<feed xmlns='http://www.w3.org/2005/Atom'>
<title>knr/ch8, branch master</title>
<subtitle>Category-0 solutions to The C Programming Language, 2nd Edition</subtitle>
<id>https://git.zlg.space/knr/atom/ch8?h=master</id>
<link rel='self' href='https://git.zlg.space/knr/atom/ch8?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zlg.space/knr/'/>
<updated>2022-01-24T07:19:22Z</updated>
<entry>
<title>Solve Exercise 8-8: bfree()</title>
<updated>2022-01-24T07:19:22Z</updated>
<author>
<name>zlg</name>
<email>zlg@zlg.space</email>
</author>
<published>2022-01-24T07:19:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zlg.space/knr/commit/?id=45f0db25dac2d5e69a71bd402039a698549abfdb'/>
<id>urn:sha1:45f0db25dac2d5e69a71bd402039a698549abfdb</id>
<content type='text'>
Well, here it is. The final solution to the final exercise! These last
few exercise solutions are not ideal by any measure of coding
excellence, but they function.

I plan to come back to this some day, with better debugging knowledge.
Then I can correct any issues.
</content>
</entry>
<entry>
<title>Solve Exercise 8-7: malloc &amp; free, improved</title>
<updated>2022-01-24T05:20:25Z</updated>
<author>
<name>zlg</name>
<email>zlg@zlg.space</email>
</author>
<published>2022-01-24T05:20:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zlg.space/knr/commit/?id=06988a01833c5f669f83b16b35f0b3f70c36f807'/>
<id>urn:sha1:06988a01833c5f669f83b16b35f0b3f70c36f807</id>
<content type='text'>
There wasn't much to check for, but I checked for what I could think of.
</content>
</entry>
<entry>
<title>Solve Exercise 8-6: calloc()</title>
<updated>2022-01-24T01:59:56Z</updated>
<author>
<name>zlg</name>
<email>zlg@zlg.space</email>
</author>
<published>2022-01-24T01:59:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zlg.space/knr/commit/?id=2bbb384783f667226e117e62992779498bc7e5b8'/>
<id>urn:sha1:2bbb384783f667226e117e62992779498bc7e5b8</id>
<content type='text'>
I chose to implement calloc() by calling malloc.

This exercise went well, but I found it difficult to verify the contents
of the headers and buffers within memory. Valgrind showed the correct
number of bytes allocated, and a memory dump pointed to a good
result, but research was not conclusive.
</content>
</entry>
<entry>
<title>Solve Exercise 8-05: fsize extended</title>
<updated>2022-01-19T05:58:37Z</updated>
<author>
<name>zlg</name>
<email>zlg@zlg.space</email>
</author>
<published>2022-01-19T05:58:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zlg.space/knr/commit/?id=b1805ae57e314be9d56c099a282206053043fa4b'/>
<id>urn:sha1:b1805ae57e314be9d56c099a282206053043fa4b</id>
<content type='text'>
This exercise uses the standard library instead of the homegrown
dirent.h outlined in the book. This is due to misbehavior in outputting
the file or directory names. This pointed to a data mismatch between the
data model supplied by the book and the data model actually used by my
operating system (GNU/Linux).
</content>
</entry>
<entry>
<title>Solve Exercise 8-4: fseek() implementation</title>
<updated>2022-01-10T04:18:52Z</updated>
<author>
<name>zlg</name>
<email>zlg@zlg.space</email>
</author>
<published>2022-01-10T04:18:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zlg.space/knr/commit/?id=bfd18a52e1baa4da7040b8df04a3f29e83b0d6b6'/>
<id>urn:sha1:bfd18a52e1baa4da7040b8df04a3f29e83b0d6b6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Solve exercise 8-3: fflush and fclose</title>
<updated>2022-01-10T00:46:25Z</updated>
<author>
<name>zlg</name>
<email>zlg@zlg.space</email>
</author>
<published>2022-01-10T00:46:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zlg.space/knr/commit/?id=41d86a29051af9e3b5fe7e37bd4c0c0a18993767'/>
<id>urn:sha1:41d86a29051af9e3b5fe7e37bd4c0c0a18993767</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Refactor syscalls.h for ch8 exercises</title>
<updated>2022-01-10T00:41:26Z</updated>
<author>
<name>zlg</name>
<email>zlg@zlg.space</email>
</author>
<published>2022-01-10T00:41:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zlg.space/knr/commit/?id=2b68c3d06fb2961ae3797d1ef461cff655f328b2'/>
<id>urn:sha1:2b68c3d06fb2961ae3797d1ef461cff655f328b2</id>
<content type='text'>
The refactor includes implementations for fflush and fclose as well,
needed in 8-03.
</content>
</entry>
<entry>
<title>Solve Exercise 8-2: fopen and fillbuf</title>
<updated>2018-12-22T09:23:35Z</updated>
<author>
<name>zlg</name>
<email>zlg@zlg.space</email>
</author>
<published>2018-12-22T09:23:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zlg.space/knr/commit/?id=4ad4e6c7f6d2fb414d22dd3e55801c85b02c1af7'/>
<id>urn:sha1:4ad4e6c7f6d2fb414d22dd3e55801c85b02c1af7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>perfeeerrrrrm</title>
<updated>2017-05-21T05:48:50Z</updated>
<author>
<name>zlg</name>
<email>zlg@zlg.space</email>
</author>
<published>2017-05-21T05:48:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zlg.space/knr/commit/?id=f3e194ceb2405d2063501bd46b270d988931d36b'/>
<id>urn:sha1:f3e194ceb2405d2063501bd46b270d988931d36b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>8-1: Correct superfluous increment, comment</title>
<updated>2017-05-20T08:21:01Z</updated>
<author>
<name>zlg</name>
<email>zlg@zlg.space</email>
</author>
<published>2017-05-20T08:21:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zlg.space/knr/commit/?id=3a80ead1cbe94d23205a490c8bf469feb5960f95'/>
<id>urn:sha1:3a80ead1cbe94d23205a490c8bf469feb5960f95</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Solve Exercise 8-1: `cat` remastered</title>
<updated>2017-05-20T08:13:28Z</updated>
<author>
<name>zlg</name>
<email>zlg@zlg.space</email>
</author>
<published>2017-05-20T08:13:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zlg.space/knr/commit/?id=443c8b479d7ca0bf45f691ab2da6fb8d35045d1f'/>
<id>urn:sha1:443c8b479d7ca0bf45f691ab2da6fb8d35045d1f</id>
<content type='text'>
</content>
</entry>
</feed>
