Mesa (master): dispatch: Add standard boilerplate and GL_APIENTRY to es1_conversion.h.

Paul Berry stereotype441 at kemper.freedesktop.org
Thu Nov 1 20:59:26 UTC 2012


Module: Mesa
Branch: master
Commit: b60244cfb90a408fd92bb6837a7824ee03ec37bc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b60244cfb90a408fd92bb6837a7824ee03ec37bc

Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Oct 23 14:23:36 2012 -0700

dispatch: Add standard boilerplate and GL_APIENTRY to es1_conversion.h.

This patch adds the usual boilerplate (copyright notice and guards
against redundant inclusion) to es1_conversion.h.  It also moves the
definition of GL_APIENTRY from es1_conversion.c.

This allows es1_conversion.h to be safely included from other .c files.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

v2: Use copyright notice from src/mesa/main/es_generator.py (the
script that used to generate this file).

---

 src/mesa/main/es1_conversion.c |    4 ----
 src/mesa/main/es1_conversion.h |   31 +++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/es1_conversion.c b/src/mesa/main/es1_conversion.c
index ae3c5ba..758fb1a 100644
--- a/src/mesa/main/es1_conversion.c
+++ b/src/mesa/main/es1_conversion.c
@@ -29,10 +29,6 @@
 #include "main/drawtex.h"
 #include "vbo/vbo.h"
 
-#ifndef GL_APIENTRY
-#define GL_APIENTRY GLAPIENTRY
-#endif
-
 #include "main/es1_conversion.h"
 
 void GL_APIENTRY
diff --git a/src/mesa/main/es1_conversion.h b/src/mesa/main/es1_conversion.h
index ece3893..eb07347 100644
--- a/src/mesa/main/es1_conversion.h
+++ b/src/mesa/main/es1_conversion.h
@@ -1,3 +1,33 @@
+/*
+ * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
+ * All Rights Reserved.
+ *
+ * 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
+ * TUNGSTEN GRAPHICS 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.
+ */
+
+#ifndef ES1_CONVERSION_H
+#define ES1_CONVERSION_H
+
+#ifndef GL_APIENTRY
+#define GL_APIENTRY GLAPIENTRY
+#endif
+
 void GL_APIENTRY
 _es_AlphaFuncx(GLenum func, GLclampx ref);
 
@@ -155,3 +185,4 @@ _es_TexParameterxv(GLenum target, GLenum pname, const GLfixed *params);
 void GL_APIENTRY
 _es_Translatex(GLfixed x, GLfixed y, GLfixed z);
 
+#endif /* ES1_CONVERSION_H */




More information about the mesa-commit mailing list