diff --git a/.gitattributes b/.gitattributes index f2da782111..8ce3d68973 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,18 +2,22 @@ .gitattributes -export-ignore .hooks* export-ignore +# Custom attribute to mark sources as using our C code style. +#[attr]our-c-style whitespace=tab-in-indent format.clang-format + /GitSetup export-ignore /*.sh export-ignore eol=lf /*.bash export-ignore eol=lf /.clang-format export-ignore -*.c whitespace=tab-in-indent,no-lf-at-eof -*.h whitespace=tab-in-indent,no-lf-at-eof -*.h.in whitespace=tab-in-indent,no-lf-at-eof -*.cxx whitespace=tab-in-indent,no-lf-at-eof -*.hxx whitespace=tab-in-indent,no-lf-at-eof -*.hxx.in whitespace=tab-in-indent,no-lf-at-eof -*.txt whitespace=tab-in-indent,no-lf-at-eof -*.cmake whitespace=tab-in-indent,no-lf-at-eof +*.c our-c-style +*.c.in our-c-style +*.cxx our-c-style +*.h our-c-style +*.h.in our-c-style +*.hxx our-c-style +*.hxx.in our-c-style +*.cmake whitespace=tab-in-indent *.rst whitespace=tab-in-indent conflict-marker-size=79 +*.txt whitespace=tab-in-indent diff --git a/ConsoleBuf.hxx.in b/ConsoleBuf.hxx.in index cb588658f7..32e680ca64 100644 --- a/ConsoleBuf.hxx.in +++ b/ConsoleBuf.hxx.in @@ -25,8 +25,7 @@ namespace @KWSYS_NAMESPACE@ { #if defined(_WIN32) template > -class @KWSYS_NAMESPACE@_EXPORT BasicConsoleBuf - : public std::basic_streambuf +class BasicConsoleBuf : public std::basic_streambuf { public: typedef typename Traits::int_type int_type; diff --git a/Encoding.hxx.in b/Encoding.hxx.in index 6639efdc48..bf93f50141 100644 --- a/Encoding.hxx.in +++ b/Encoding.hxx.in @@ -13,7 +13,7 @@ class @KWSYS_NAMESPACE@_EXPORT Encoding { public: // Container class for argc/argv. - class CommandLineArguments + class @KWSYS_NAMESPACE@_EXPORT CommandLineArguments { public: // On Windows, get the program command line arguments diff --git a/FStream.hxx.in b/FStream.hxx.in index 736214f6ca..cf331a5127 100644 --- a/FStream.hxx.in +++ b/FStream.hxx.in @@ -269,7 +269,7 @@ enum BOM // If a BOM exists, the stream is advanced to after the BOM. // This function requires a seekable stream (but not a relative // seekable stream). -BOM ReadBOM(std::istream& in); +@KWSYS_NAMESPACE@_EXPORT BOM ReadBOM(std::istream& in); } }