blob: fff2c0a4100689614f28e1f316a83c338f06ca01 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
.defcolor blue rgb 0.1f 0.1f 1.0f
.defcolor bsdred rgb #990000
.defcolor codered rgb #600000
.defcolor grey rgb #aaaaaa
.defcolor black rgb #000000
.color
.de bsdr
.gcolor bsdred
..
.de endc
.gcolor
..
.de xa
.XA \\$1
.ps 12p
.B "\m[bsdred]\\$2\m[]" \\$3 \\$4
..
.de b
.B "\m[bsdred]\\$1\m[]" \\$2 \\$3
..
.de code
.gcolor bsdred
.CW \\$1 \\$2 \\$3
.gcolor
..
.de nh1
.gcolor bsdred
.NH 1
.ps 14p
\\$1
.gcolor
..
.de nh2
.gcolor bsdred
.NH 2
.ps 13p
\\$1
.gcolor
..
.de bu
.IP \(bu 2
..
.
.
.
.
.nr PS 12p
.nr PO 1.0i
.nr LL 6.5i
.RP no
.P1
.ND
.
.
.
.
.gcolor black
.bsdr
.TL
.LG
.ps 17p
Dergods' Style and good practices for C/C++ projects
.endc
.AU
.ps 15p
Joe
.AI
42 Lyon Auvergne-Rhône-Alpes
.
.
.XS 1
.ps 12p
.b "1. Introduction"
.xa 1 "2. Projects and version control"
.xa 1 " 2.1 Directories"
.XE
.bsdr
.PX
.endc
.
.
.nh1 "Introduction"
.PP
The following is a description of
.b "Dergods' Style"
code and project
formatting to put in use if you work on Dergods' Realm-related code or if you
just need a personal good-looking norm to improve your code readablity. It
is heavily inspired by
.b FreeBSD® 's
.pdfhref W -D \
https://www.freebsd.org/cgi/man.cgi?query=style&apropos=0&sektion=0&\
manpath=FreeBSD+12.1-RELEASE+and+Ports&arch=default&format=html \
-A \m[black],\m[] \
\f(CW\m[codered]style(9)\m[]\f[]
.gcolor
with some changes.
.nh1 "Projects and version control"
.nh2 "Directories"
.RS
.bu
Working on a
.b program :
.RS
.bu
All
.b source
and
.b "header files"
should be in the
.code src/
directory.
.bu
Necessary
.b "media files"
such as images, sounds, fonts, etc... Necessary to the program execution
should be in the
.code media/
directory.
.bu
Compilation-generated
.b "object files"
should be located in the
.code obj/
directory.
.bu
.b Sub-programs
or
.b utilities
should be located in the
.code utils/
directory.
.bu
Optional
.b "man page(s)"
can be made for the project and its specularities and should be located in the
.code man/
directory.
.RE
.bu
Working on a
.b library :
.RS
.bu
All
.b "source files"
should be located in the
.code src/
directory.
.bu
Compilation-generated
.b "object files"
should be located in the
.code obj/
directory.
.bu
Non-optional
.b "man pages"
for every function intended to be used externally
should be located in the
.code man/
directory.
.bu
.b "Header files"
should be located in the
.code include/
directory.
.RE
.RE
|