@@ -26,25 +26,25 @@ resources. We'll share here things we found helpful at some
2626point, and we
2727would encourage everyone in the course to do the same.
2828
29- * < http://en.wikipedia.org/wiki/Header_file >
30- * Nice review of why C has header files, and how they're typically used.
31- * < http://en.wikipedia.org/wiki/Boolean_datatype#C >
32- * On the craziness that is booleans (or the lack thereof) in C.
33- * < http://en.wikipedia.org/wiki/Struct_(C_programming_language) >
34- * A nice overview of C structs
29+ - < http://en.wikipedia.org/wiki/Header_file >
30+ - Nice review of why C has header files, and how they're typically used.
31+ - < http://en.wikipedia.org/wiki/Boolean_datatype#C >
32+ - On the craziness that is booleans (or the lack thereof) in C.
33+ - < http://en.wikipedia.org/wiki/Struct_(C_programming_language) >
34+ - A nice overview of C structs
3535
3636< http://www.cprogramming.com/tutorial.html#ctutorial > has a decent
3737on-line C tutorial, complete with little self-tests along the way. Some
3838particularly useful lessons in this context would be:
3939
40- * < http://www.cprogramming.com/tutorial/c/lesson6.html >
41- * Overview of pointers in C
42- * < http://www.cprogramming.com/tutorial/c/lesson8.html >
43- * Overview of arrays in C
44- * < http://www.cprogramming.com/tutorial/c/lesson9.html >
45- * Overview of strings in C
46- * < http://www.cprogramming.com/tutorial/c/lesson14.html >
47- * Overview of command line arguments in C.
40+ - < http://www.cprogramming.com/tutorial/c/lesson6.html >
41+ - Overview of pointers in C
42+ - < http://www.cprogramming.com/tutorial/c/lesson8.html >
43+ - Overview of arrays in C
44+ - < http://www.cprogramming.com/tutorial/c/lesson9.html >
45+ - Overview of strings in C
46+ - < http://www.cprogramming.com/tutorial/c/lesson14.html >
47+ - Overview of command line arguments in C.
4848
4949### Compiling and running a C program
5050
@@ -60,20 +60,20 @@ gcc -g -Wall -o check_whitespace check_whitespace.c
6060` gcc ` is the GNU C Compiler, which is pretty much the only C compiler
6161people use on Linux boxes these days. The meaning of the flags:
6262
63- * ` -g ` tells ` gcc ` to include debugging information in the generated
63+ - ` -g ` tells ` gcc ` to include debugging information in the generated
6464 executable. This is allows, for example, programs like ` valgrind `
6565 (described below) to list line numbers where it thinks there are
6666 problems. Without ` -g ` Valgrind (and other debugging tools) will
6767 be able to specify the name of functions where there are problems,
6868 but not give you line numbers.
69- * ` -Wall ` (it's a capital 'W') is short for "Warnings all" and turns
69+ - ` -Wall ` (it's a capital 'W') is short for "Warnings all" and turns
7070 on * all* the warnings that ` gcc ` supports. This is a Very Good Idea
7171 because there are a ton of crazy things that C will try to
7272 "understand" for you, and ` -Wall ` tells the compiler to warn you
7373 about those things instead of just quietly (mis)interpreting them.
7474 You should typically use ` -Wall ` and make sure to figure out and
7575 clean up any warnings you do get.
76- * ` -o <name> ` tells ` gcc ` to put the resulting executable in a file
76+ - ` -o <name> ` tells ` gcc ` to put the resulting executable in a file
7777 with the given name. If you don't provide the ` -o ` flag then ` gcc `
7878 will write the executable to a file called ` a.out ` for strange
7979 historical reasons.
@@ -133,8 +133,8 @@ will run the program as normal, and then print out a memory usage/leak
133133report at the end. To get more detailed information, including what
134134lines generate a leak,
135135
136- * Make sure to compile your program with the ` -g ` flag, and
137- * Add the ` --leak-check=full ` flag when running ` valgrind ` :
136+ - Make sure to compile your program with the ` -g ` flag, and
137+ - Add the ` --leak-check=full ` flag when running ` valgrind ` :
138138
139139``` bash
140140valgrind --leak-check=full ./my_prog
@@ -184,10 +184,10 @@ used again, and that's where you'd insert the necessary `free()` call.
184184
185185## What to do
186186
187- * [ ] Compile the program ` check_whitespace.c `
187+ - [ ] Compile the program ` check_whitespace.c `
188188 and run ` valgrind ` on it to find any leaks it may have (hint: it has at
189189 least one).
190- * [ ] In ` leak_report.md ` describe why the memory errors happen, and how to fix them.
191- * [ ] Actually fix the code.
192- * [ ] Commit, push, etc.
193- * [ ] Submit the URL for your repository as instructed elsewhere
190+ - [ ] In ` leak_report.md ` describe why the memory errors happen, and how to fix them.
191+ - [ ] Actually fix the code.
192+ - [ ] Commit, push, etc.
193+ - [ ] Submit the URL for your repository as instructed elsewhere
0 commit comments