Skip to content

Commit d9f60f8

Browse files
committed
Split main.c further, add a separate test script
1 parent 6149f03 commit d9f60f8

42 files changed

Lines changed: 2339 additions & 2299 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.travis.yml‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,4 @@ install: |
66
77
script: |
88
cd "$TRAVIS_BUILD_DIR"
9-
cd c
10-
make test
11-
cd ../cpp
12-
make test
13-
cd ../glibc
14-
make test
15-
cd ../gcc
16-
make test
9+
./test

‎Makefile_many‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# `make help` for documentation.
22

3+
-include Makefile_params
34
-include Makefile_params
45

56
# C/CPP
@@ -8,13 +9,14 @@
89
MYCC ?= gcc
910
MYCXX ?= g++
1011
DEFINES ?= #-D_XOPEN_SOURCE 700
12+
INCLUDE_DIRS ?= #-I/usr/include
1113
O ?= 0
1214
STD ?= c11
1315
PEDANTIC ?= -pedantic-errors
1416
CFLAGS ?= $(DEFINES) -O$(O) -std=$(STD) -Wextra $(PEDANTIC) $(CFLAGS_EXTRA)
1517
MYCXXFLAGS ?= $(DEFINES) -O$(O) -std=c++11 -Wextra $(PEDANTIC) $(CXXFLAGS_EXTRA)
18+
1619
LIBS ?= -lm #-lGL -lGLU -lglut
17-
INCLUDE_DIRS ?= #-I/usr/include
1820

1921
# Fortran
2022
FF ?= gfortran
@@ -35,8 +37,6 @@ RUN ?= main
3537
# If exists, will be symlinked into the same directory from which the executable will be run.
3638
# This way, the executable can suppose that this file or directory is in the current directory.
3739
RUN_INPUT ?= input
38-
# Allow users to write `make run=name`.
39-
run ?=
4040
TEST ?= test
4141

4242
ASSEMBLER_NOEXT ?= $(IN_DIR)$(RUN)
@@ -45,9 +45,6 @@ DEBUG_FLAGS ?=
4545
PROFILE_DEFINE ?= #-DDEBUG
4646
PROFILE_FLAGS ?= #
4747

48-
# Extra phony targets
49-
PHONY ?=
50-
5148
RUN_BNAME := $(RUN)$(OUT_EXT)
5249

5350
INS := $(foreach IN_EXT, $(IN_EXTS), $(wildcard $(IN_DIR)*$(IN_EXT)))
@@ -103,7 +100,7 @@ clean:
103100
if [ ! '$(OUT_DIR)' = './' ]; then \
104101
rm -rf '$(OUT_DIR)' ;\
105102
else \
106-
rm -f *'$(OBJECT_EXT)' *'$(OUT_EXT)' *'$(TMP_EXT)' ;\
103+
rm -rf *'$(OBJECT_EXT)' *'$(OUT_EXT)' *'$(TMP_EXT)' ;\
107104
fi
108105

109106
debug: clean set_debug_flags all

‎Makefile_params‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎c/README.md‎

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,26 @@
1717
1. Language
1818
1. Data
1919
1. [Identifier](identifier.c)
20-
1. [enum](enum.c)
21-
1. [typedef](typedef.c)
22-
1. [sizeof()](sizeof.c)
23-
1. [VLA](vla.c)
24-
1. [restrict](restrict.c)
20+
1. [void](void.c)
21+
1. [Array](array.c)
22+
1. [String](string.c)
23+
1. [VLA](vla.c)
24+
1. [Type qualifier](type_qualifier.c)
25+
1. [const](const.c)
26+
1. [restrict](restrict.c)
27+
1. [auto](auto.c)
28+
1. [register](register.c)
29+
1. [volatile](volatile.c)
30+
1. User defined types
31+
1. [enum](enum.c)
32+
1. [typedef](typedef.c)
33+
1. [struct](struct.c)
34+
1. [union](union.c)
35+
1. Compile time operations
36+
1. [sizeof()](sizeof.c)
37+
1. [_Generic](generic.c)
38+
1. [Constant expression](constant_expression.c)
39+
1. [_Static_assert](static_assert.c)
2540
1. [Function](function.c)
2641
1. [Function pointer](function_pointer.c)
2742
1. [inline](inline.c)
@@ -44,6 +59,8 @@
4459
1. [exit()](exit.c)
4560
1. [atexit()](atexit.c)
4661
1. [abort()](interactive/abort.c.off)
62+
1. stddef.h
63+
1. [offsetof()](offsetof.c)
4764
1. [string.h](string_h.c)
4865
1. [ctype.h](ctype_h.c)
4966
1. [time.h](time_h.c)
@@ -54,7 +71,10 @@
5471
1. [math.h](math_h.c)
5572
1. [complex.h](complex_h.c)
5673
1. [varargs_h](varargs_h.c)
74+
1. [errno.h](errno_h.c)
75+
1. [iso646.h](iso646_h.c)
5776
1. Applications
5877
1. [User input](interactive/user_input.c.off)
78+
1. [Design patterns](design_patterns.c)
5979
1. [Virtual memory](virtual_memory.c)
6080
1. [Profiling](interactive/profiling.c)

0 commit comments

Comments
 (0)