[Mesa-dev] [RFC] docs: Add a copyright.c template we can copy when making new files.
Kenneth Graunke
kenneth at whitecape.org
Fri Oct 19 17:51:36 UTC 2018
Usually when making a new file, people copy some random other file
to get the copyright header comments. Unfortunately, some of them
are commented in a decades-old style, are word wrapped poorly, or
worse, have a few subtle variations in the text. While we've tried
to clean those up, we're not going to get every copy to be perfect.
Instead, this commit adds docs/copyright.c, which contains a copy of
the license header which is well-formatted and has the correct text.
The idea is that you can start from this when making a new file, which
should help with consistency.
---
docs/copyright.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 docs/copyright.c
Hey all,
I noticed when writing my new Iris driver that I had a couple subtle
variations of copyright headers creep in, even in a brand new project.
Mostly word wrapping differences. To combat that, I made a copyright.c
and made sure to use it when I created new files. It seemed to help.
So, the thinking is to just actually put that in the project under docs.
Maybe it helps other people as well?
--Ken
diff --git a/docs/copyright.c b/docs/copyright.c
new file mode 100644
index 00000000000..db92f27e641
--- /dev/null
+++ b/docs/copyright.c
@@ -0,0 +1,22 @@
+/*
+ * Copyright © 2018 <Insert Name Here>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
--
2.19.0
More information about the mesa-dev
mailing list