Skip to content

Commit ad28eaa

Browse files
authored
Merge pull request #8 from keeferrourke/development
update master to v0.0.2
2 parents de7a32c + 62357c7 commit ad28eaa

27 files changed

Lines changed: 791 additions & 320 deletions

.clang-format

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
Language: Cpp
3+
# BasedOnStyle: Google
4+
AccessModifierOffset: -1
5+
AlignAfterOpenBracket: Align
6+
AlignConsecutiveAssignments: true
7+
AlignConsecutiveDeclarations: true
8+
AlignEscapedNewlines: Left
9+
AlignOperands: true
10+
AlignTrailingComments: true
11+
AllowAllParametersOfDeclarationOnNextLine: true
12+
AllowShortBlocksOnASingleLine: false
13+
AllowShortCaseLabelsOnASingleLine: false
14+
AllowShortFunctionsOnASingleLine: All
15+
AllowShortIfStatementsOnASingleLine: true
16+
AllowShortLoopsOnASingleLine: true
17+
AlwaysBreakAfterDefinitionReturnType: None
18+
AlwaysBreakAfterReturnType: None
19+
AlwaysBreakBeforeMultilineStrings: true
20+
AlwaysBreakTemplateDeclarations: true
21+
BinPackArguments: true
22+
BinPackParameters: true
23+
BraceWrapping:
24+
AfterClass: false
25+
AfterControlStatement: false
26+
AfterEnum: false
27+
AfterFunction: false
28+
AfterNamespace: false
29+
AfterObjCDeclaration: false
30+
AfterStruct: false
31+
AfterUnion: false
32+
BeforeCatch: false
33+
BeforeElse: false
34+
IndentBraces: false
35+
SplitEmptyFunction: true
36+
SplitEmptyRecord: true
37+
SplitEmptyNamespace: true
38+
BreakBeforeBinaryOperators: None
39+
BreakBeforeBraces: Attach
40+
BreakBeforeInheritanceComma: false
41+
BreakBeforeTernaryOperators: true
42+
BreakConstructorInitializersBeforeComma: false
43+
BreakConstructorInitializers: BeforeColon
44+
BreakAfterJavaFieldAnnotations: false
45+
BreakStringLiterals: true
46+
ColumnLimit: 78
47+
CommentPragmas: '^ IWYU pragma:'
48+
CompactNamespaces: false
49+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
50+
ConstructorInitializerIndentWidth: 4
51+
ContinuationIndentWidth: 4
52+
Cpp11BracedListStyle: true
53+
DerivePointerAlignment: true
54+
DisableFormat: false
55+
ExperimentalAutoDetectBinPacking: false
56+
FixNamespaceComments: true
57+
ForEachMacros:
58+
- foreach
59+
- Q_FOREACH
60+
- BOOST_FOREACH
61+
IncludeCategories:
62+
- Regex: '^<.*\.h>'
63+
Priority: 1
64+
- Regex: '^<.*'
65+
Priority: 2
66+
- Regex: '.*'
67+
Priority: 3
68+
IncludeIsMainRegex: '([-_](test|unittest))?$'
69+
IndentCaseLabels: true
70+
IndentWidth: 4
71+
IndentWrappedFunctionNames: false
72+
JavaScriptQuotes: Leave
73+
JavaScriptWrapImports: true
74+
KeepEmptyLinesAtTheStartOfBlocks: false
75+
MacroBlockBegin: ''
76+
MacroBlockEnd: ''
77+
MaxEmptyLinesToKeep: 1
78+
NamespaceIndentation: None
79+
ObjCBlockIndentWidth: 2
80+
ObjCSpaceAfterProperty: false
81+
ObjCSpaceBeforeProtocolList: false
82+
PenaltyBreakAssignment: 2
83+
PenaltyBreakBeforeFirstCallParameter: 1
84+
PenaltyBreakComment: 300
85+
PenaltyBreakFirstLessLess: 120
86+
PenaltyBreakString: 1000
87+
PenaltyExcessCharacter: 1000000
88+
PenaltyReturnTypeOnItsOwnLine: 200
89+
PointerAlignment: Left
90+
ReflowComments: true
91+
SortIncludes: true
92+
SortUsingDeclarations: true
93+
SpaceAfterCStyleCast: false
94+
SpaceAfterTemplateKeyword: true
95+
SpaceBeforeAssignmentOperators: true
96+
SpaceBeforeParens: ControlStatements
97+
SpaceInEmptyParentheses: false
98+
SpacesBeforeTrailingComments: 2
99+
SpacesInAngles: false
100+
SpacesInContainerLiterals: true
101+
SpacesInCStyleCastParentheses: false
102+
SpacesInParentheses: false
103+
SpacesInSquareBrackets: false
104+
Standard: Auto
105+
TabWidth: 4
106+
UseTab: Never
107+
...
108+

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
*.o
33
a.out
44
vgcore.*
5-
docs/*
65
lib/*
76
obj/*
7+
**/*build
88

.travis.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
sudo: false
2+
language: c
3+
4+
os:
5+
- linux
6+
- osx
7+
dist: xenial
8+
osx_image: xcode10.2
9+
10+
env:
11+
- CC=gcc
12+
- CC=clang
13+
14+
addons:
15+
apt:
16+
packages:
17+
- clang-format
18+
- cppcheck
19+
homebrew:
20+
packages:
21+
- ninja
22+
- meson
23+
- clang-format
24+
- cppcheck
25+
26+
before_install:
27+
- |+
28+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
29+
sudo apt-get -q update
30+
sudo apt-get -y install meson/xenial-backports
31+
fi
32+
33+
before_script:
34+
- meson _build
35+
- ninja -C _build cppcheck
36+
37+
script:
38+
- ninja -C _build all

LICENSE

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright 2018-2019 Keefer Rourke <mail@krourke.org>
2+
3+
Permission to use, copy, modify, and/or distribute this software for any
4+
purpose with or without fee is hereby granted, provided that the above
5+
copyright notice and this permission notice appear in all copies.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Makefile

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@ STD = -std=c99 -D_POSIX_C_SOURCE=199506L
3333
WD := $(PWD)
3434
INCLDIR = $(WD)/include
3535
SRCDIR = $(WD)/src
36-
OBJDIR = $(WD)/obj
37-
OUTDIR = $(WD)/lib
36+
BUILDDIR = $(WD)/_build
37+
OBJDIR = $(BUILDDIR)/obj
38+
OUTDIR = $(BUILDDIR)/lib
3839

3940
# DOCDIR and TEXDIR must match the appropriate directories specified in the
4041
# Doxyfile; TEXDIR is a subdirectory of DOCDIR
4142
DOCDIR = docs
42-
TEXDIR = latex
43+
BUILTDOCDIR = $(BUILDDIR)/docs
4344

4445
# library output
4546
OUTNAME = libtdd
@@ -86,31 +87,38 @@ $(OBJDIR):
8687
$(OUTDIR):
8788
@mkdir -p $(OUTDIR)
8889

90+
$(BUILTDOCDIR):
91+
@mkdir -p $(BUILTDOCDIR)
92+
8993
# generate docs with doxygen
9094
# this is intended to be used with a Doxyfile that specified LaTeX output
9195
# modify as required for different documentation formats
9296
#
9397
# inelegant, but if doxygen fails for some reason, it is not the end of the
9498
# world
9599
.PHONY: doc doc-clean
96-
doc: Doxyfile
100+
doc: $(BUILTDOCDIR) $(DOCDIR)/Doxyfile.in
101+
-@cp $(DOCDIR)/Doxyfile.in Doxyfile
102+
-@sed -i "s/@HAS_DOT@/NO/g" Doxyfile
103+
-@sed -i "s/@HTML_PAGES@/YES/g" Doxyfile
104+
-@sed -i "s/@GEN_LATEX@/NO/g" Doxyfile
105+
-@sed -i "s/@MAN_PAGES@/YES/g" Doxyfile
106+
-@sed -i "s/@PROJECT_NAME@/$(OUTNAME)/g" Doxyfile
107+
-@sed -i "s/@VERSION@//g" Doxyfile
108+
-@sed -i "s|@DOCS_OUTPUT_DIR@|$(BUILTDOCDIR)|g" Doxyfile
109+
-@sed -i "s|@INCLUDE_DIR@|$(INCLDIR)|g" Doxyfile
110+
-@sed -i "s|@README_PATH|README.md|g" Doxyfile
97111
@doxygen 2>/dev/null 1>&2
98-
-@echo 'Generating application internal documentation...'
99-
# generate PDF from LaTeX sources
100-
-@cd $(DOCDIR)/$(TEXDIR) && $(MAKE) 2>/dev/null 1>&2
101-
-@mv $(DOCDIR)/$(TEXDIR)/refman.pdf $(DOCDIR)
112+
-@rm Doxyfile
102113
-@echo 'Generated application internal documentation.'
103114

104115
doc-clean:
105-
-@rm -r $(DOCDIR)/$(TEXDIR)
106-
107-
$(DOCDIR):
108-
@mkdir -p $(DOCDIR)
116+
-@rm -r $(BUILTDDOCDIR)
109117

110118
# clean entire project directory
111119
.PHONY: clean cleaner
112120
clean:
113-
-@rm -rf $(OBJDIR) $(DOCDIR)
121+
-@rm -rf $(OBJDIR)
114122

115123
cleaner:
116124
-@rm -rf $(OUTDIR)

0 commit comments

Comments
 (0)