From 9bbcfa6e63f05f3aacca46deaf40b2206810cf2c Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Tue, 5 Apr 2016 11:06:01 +1000 Subject: [PATCH] make header paths more explicit --- geom/aabb.cpp | 4 ++-- geom/plane.cpp | 6 +++--- hash/adler.cpp | 6 +++--- hash/crc.cpp | 6 +++--- hash/fletcher.hpp | 3 ++- hash/hmac.cpp | 2 +- hash/md2.cpp | 12 +++++++++++- hash/md4.cpp | 6 +++--- hash/md5.cpp | 2 +- hash/ripemd.cpp | 6 +++--- hash/sha1.cpp | 12 ++++++------ hash/sha2.cpp | 4 ++-- json/schema.cpp | 6 +++--- json/tree.cpp | 14 +++++++------- test/string.cpp | 6 +++--- test/view.cpp | 4 ++-- 16 files changed, 55 insertions(+), 44 deletions(-) diff --git a/geom/aabb.cpp b/geom/aabb.cpp index ef48dc5e..5145394f 100644 --- a/geom/aabb.cpp +++ b/geom/aabb.cpp @@ -15,8 +15,8 @@ */ -#include "aabb.hpp" -#include "debug.hpp" +#include "./aabb.hpp" +#include "../debug.hpp" using util::geom::AABB; diff --git a/geom/plane.cpp b/geom/plane.cpp index 50f1f287..a8a45d4d 100644 --- a/geom/plane.cpp +++ b/geom/plane.cpp @@ -17,12 +17,12 @@ #include "plane.hpp" -#include "debug.hpp" +#include "../debug.hpp" using util::geom::plane; -//----------------------------------------------------------------------------- +/////////////////////////////////////////////////////////////////////////////// template plane::plane (point _p, vector _n): @@ -33,6 +33,6 @@ plane::plane (point _p, } -//----------------------------------------------------------------------------- +/////////////////////////////////////////////////////////////////////////////// template struct util::geom::plane<2,float>; template struct util::geom::plane<3,float>; diff --git a/hash/adler.cpp b/hash/adler.cpp index 3edb8193..37206e59 100644 --- a/hash/adler.cpp +++ b/hash/adler.cpp @@ -14,10 +14,10 @@ * Copyright 2010-2014 Danny Robson */ -#include "adler.hpp" +#include "./adler.hpp" -#include "debug.hpp" -#include "fletcher.hpp" +#include "./fletcher.hpp" +#include "../debug.hpp" static const unsigned MODULUS = 65521; diff --git a/hash/crc.cpp b/hash/crc.cpp index b22453dc..f29ce7ab 100644 --- a/hash/crc.cpp +++ b/hash/crc.cpp @@ -14,10 +14,10 @@ * Copyright 2011 Danny Robson */ -#include "crc.hpp" +#include "./crc.hpp" -#include "debug.hpp" -#include "endian.hpp" +#include "../endian.hpp" +#include "../debug.hpp" uint32_t crc32 (const void *restrict, size_t) { diff --git a/hash/fletcher.hpp b/hash/fletcher.hpp index 0e2463a5..ca0210ce 100644 --- a/hash/fletcher.hpp +++ b/hash/fletcher.hpp @@ -17,12 +17,13 @@ #ifndef __UTIL_FLETCHER_HPP #define __UTIL_FLETCHER_HPP -#include "types/bits.hpp" +#include "../types/bits.hpp" #include #include +/////////////////////////////////////////////////////////////////////////////// template < unsigned OUTPUT, unsigned MODULUS, diff --git a/hash/hmac.cpp b/hash/hmac.cpp index 46b6d54e..8534d580 100644 --- a/hash/hmac.cpp +++ b/hash/hmac.cpp @@ -16,7 +16,7 @@ #include "hmac.hpp" -#include "debug.hpp" +#include "../debug.hpp" #include diff --git a/hash/md2.cpp b/hash/md2.cpp index 35d04bc2..bfdbc017 100644 --- a/hash/md2.cpp +++ b/hash/md2.cpp @@ -16,13 +16,14 @@ #include "md2.hpp" -#include "types.hpp" +#include "../types.hpp" #include #include #include +/////////////////////////////////////////////////////////////////////////////// using util::hash::MD2; using std::array; @@ -31,6 +32,7 @@ using std::end; using std::fill; +/////////////////////////////////////////////////////////////////////////////// static array S = { { 41, 46, 67, 201, 162, 216, 124, 1, 61, 54, 84, 161, 236, 240, 6, 19, 98, 167, 5, 243, 192, 199, 115, 140, 152, 147, 43, 217, 188, 76, 130, 202, @@ -51,12 +53,14 @@ static array S = { { } }; +/////////////////////////////////////////////////////////////////////////////// MD2::MD2 () { reset (); } +//----------------------------------------------------------------------------- void MD2::reset (void) { m_total = 0; @@ -65,14 +69,18 @@ MD2::reset (void) { } +//----------------------------------------------------------------------------- void MD2::update (const void *data, size_t size) { update (static_cast (data), size); } +//----------------------------------------------------------------------------- static const size_t M_OFFSET = 16; static const size_t M_LENGTH = 16; + +//----------------------------------------------------------------------------- void MD2::update (const uint8_t *data, size_t size) { uint8_t *M = X + M_OFFSET; @@ -104,6 +112,7 @@ MD2::update (const uint8_t *data, size_t size) { } +//----------------------------------------------------------------------------- MD2::digest_t MD2::digest (void) const { digest_t d; @@ -112,6 +121,7 @@ MD2::digest (void) const { } +//----------------------------------------------------------------------------- void MD2::transform (void) { uint8_t *M = X + M_OFFSET; diff --git a/hash/md4.cpp b/hash/md4.cpp index 0b46eea7..78616847 100644 --- a/hash/md4.cpp +++ b/hash/md4.cpp @@ -16,9 +16,9 @@ #include "md4.hpp" -#include "bitwise.hpp" -#include "types.hpp" -#include "endian.hpp" +#include "../bitwise.hpp" +#include "../types.hpp" +#include "../endian.hpp" #include diff --git a/hash/md5.cpp b/hash/md5.cpp index 7c4d922a..c969fc4d 100644 --- a/hash/md5.cpp +++ b/hash/md5.cpp @@ -16,7 +16,7 @@ #include "md5.hpp" -#include "bitwise.hpp" +#include "../bitwise.hpp" #include diff --git a/hash/ripemd.cpp b/hash/ripemd.cpp index 1952094b..9680cda7 100644 --- a/hash/ripemd.cpp +++ b/hash/ripemd.cpp @@ -15,10 +15,10 @@ * 2014, Danny Robson */ -#include "ripemd.hpp" +#include "./ripemd.hpp" -#include "debug.hpp" -#include "bitwise.hpp" +#include "../debug.hpp" +#include "../bitwise.hpp" #include #include diff --git a/hash/sha1.cpp b/hash/sha1.cpp index 612a518f..06bd1e1b 100644 --- a/hash/sha1.cpp +++ b/hash/sha1.cpp @@ -14,13 +14,13 @@ * Copyright 2013 Danny Robson */ -#include "sha1.hpp" +#include "./sha1.hpp" -#include "bitwise.hpp" -#include "debug.hpp" -#include "endian.hpp" -#include "types.hpp" -#include "cast.hpp" +#include "../bitwise.hpp" +#include "../debug.hpp" +#include "../endian.hpp" +#include "../types.hpp" +#include "../cast.hpp" #include #include diff --git a/hash/sha2.cpp b/hash/sha2.cpp index 44feae4e..55057667 100644 --- a/hash/sha2.cpp +++ b/hash/sha2.cpp @@ -17,8 +17,8 @@ #include "sha2.hpp" -#include "bitwise.hpp" -#include "endian.hpp" +#include "../bitwise.hpp" +#include "../endian.hpp" #include diff --git a/json/schema.cpp b/json/schema.cpp index 91933a0e..9c1dd603 100644 --- a/json/schema.cpp +++ b/json/schema.cpp @@ -14,12 +14,12 @@ * Copyright 2015 Danny Robson */ -#include "schema.hpp" +#include "./schema.hpp" -#include "debug.hpp" -#include "maths.hpp" #include "./tree.hpp" #include "./except.hpp" +#include "../debug.hpp" +#include "../maths.hpp" #include diff --git a/json/tree.cpp b/json/tree.cpp index 36ec24ed..98e12494 100644 --- a/json/tree.cpp +++ b/json/tree.cpp @@ -15,15 +15,15 @@ */ -#include "json/tree.hpp" +#include "./tree.hpp" -#include "json/except.hpp" -#include "json/flat.hpp" +#include "./except.hpp" +#include "./flat.hpp" -#include "debug.hpp" -#include "io.hpp" -#include "maths.hpp" -#include "cast.hpp" +#include "../debug.hpp" +#include "../io.hpp" +#include "../maths.hpp" +#include "../cast.hpp" #include #include diff --git a/test/string.cpp b/test/string.cpp index 0edd34d3..2c36c79d 100644 --- a/test/string.cpp +++ b/test/string.cpp @@ -1,6 +1,6 @@ -#include -#include -#include +#include "tap.hpp" +#include "string.hpp" +#include "types.hpp" int main (int, char**) diff --git a/test/view.cpp b/test/view.cpp index 6fdad047..a3322cec 100644 --- a/test/view.cpp +++ b/test/view.cpp @@ -1,5 +1,5 @@ -#include -#include +#include "tap.hpp" +#include "view.hpp" int main (int, char**)