Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion book/src/c/initial.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ application, implementing most of the new logic in Rust.
The initial code is included in full below
if you want to familiarize yourself with it:

`src/main.cpp` - the entry point
`src/main.c` - the entry point

```c
#include "modules/file/file.h"
Expand Down Expand Up @@ -98,6 +98,7 @@ void print_result(const uint64_t result) {
#pragma once

#include <stdlib.h>
#include <stdint.h>

typedef struct File {
const char* filename;
Expand Down
2 changes: 0 additions & 2 deletions c/chap1/src/modules/file/file.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "file.h"

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

File file_read(const char* filename) {
Expand Down
1 change: 1 addition & 0 deletions c/chap1/src/modules/file/file.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <stdlib.h>
#include <stdint.h>

typedef struct File {
const char* filename;
Expand Down
2 changes: 0 additions & 2 deletions c/chap2/src/modules/file/file.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "file.h"

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

File file_read(const char* filename) {
Expand Down
1 change: 1 addition & 0 deletions c/chap2/src/modules/file/file.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <stdlib.h>
#include <stdint.h>

typedef struct File {
const char* filename;
Expand Down
2 changes: 0 additions & 2 deletions c/chap3/src/modules/file/file.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "file.h"

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

File file_read(const char* filename) {
Expand Down
1 change: 1 addition & 0 deletions c/chap3/src/modules/file/file.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <stdlib.h>
#include <stdint.h>

typedef struct File {
const char* filename;
Expand Down
2 changes: 0 additions & 2 deletions c/chap4/src/modules/file/file.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "file.h"

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

File file_read(const char* filename) {
Expand Down
1 change: 1 addition & 0 deletions c/chap4/src/modules/file/file.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <stdlib.h>
#include <stdint.h>

typedef struct File {
const char* filename;
Expand Down
2 changes: 0 additions & 2 deletions c/chap5/src/modules/file/file.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "file.h"

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

File file_read(const char* filename) {
Expand Down
1 change: 1 addition & 0 deletions c/chap5/src/modules/file/file.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <stdlib.h>
#include <stdint.h>

typedef struct File {
const char* filename;
Expand Down
2 changes: 0 additions & 2 deletions c/chap6/src/modules/file/file.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "file.h"

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

File file_read(const char* filename) {
Expand Down
1 change: 1 addition & 0 deletions c/chap6/src/modules/file/file.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <stdlib.h>
#include <stdint.h>

typedef struct File {
const char* filename;
Expand Down
2 changes: 0 additions & 2 deletions c/chap7/src/modules/file/file.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "file.h"

#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

File file_read(const char* filename) {
Expand Down
1 change: 1 addition & 0 deletions c/chap7/src/modules/file/file.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <stdlib.h>
#include <stdint.h>

typedef struct File {
const char* filename;
Expand Down