csev / cc4e

C Programming for Everybody
https://www.cc4e.com/
Other
262 stars 90 forks source link

Update chap00.md and chap01.md #30

Closed SarveshMD closed 2 years ago

SarveshMD commented 2 years ago

Extracted code from chap01.md and created a comment in chap01.md, created new file in book/code and added those new files to unit.sh. Completed fixing formatting errors in chap00.md, and half way through chap01.md. I created a file book/code/c_006_01.c without #include <stdio.h> since it wasn't there in the book, but gcc -ansi book/code/c_006_01.c works without any errors, it just spits out some warnings. I wanted to ask if it is okay or I should undo that file creation.

And one more question, can I add this [comment] <> (code c_006_02.c) in note files which are located in book/notes, which themselves are added to the main chap**.md by [comment] <> (note n_006_01.md) and expect the code to show up in the site ?, because I noticed that book/notes/n_006_01.md has some code which could be replaced with a [comment] <> (code c_006_02.c) It would be better if we can see our changes in the site with our changes to the markdown by hosting our copy of the site as localhost. But I don't know how to do that. Can you provide us with the steps to host a local copy of the site's book pages if possible ?

csev commented 2 years ago

@Savish - I don't want to move every bit of C code into the ancillary files. For short snippets, I just want to leave it inline - in particular, the two that you moved in chap01 - I meant for them not to be moved. There are notes comments and code comments. In generally I will be adding the notes comments as I work through the chapters and prepare the lectures. SO you should leave the notes alone. In terms of c samples in later chapters, yes you need to set up the localhost to make it work - I need to write some documentation and I will get back to you in a couple of days.

SarveshMD commented 2 years ago

@csev Thanks, I'll undo the new file creations and create another pull request without those new files.

csev commented 2 years ago

Thanks - While I want to write the text of the notes, you can add a comment like this:

I will go through and write the notes - they need to be in my voice and have a consistent style - but I am happy to have suggestions for good places for notes.

csev commented 2 years ago

I just added a top level README.md as to how to install locally.