summaryrefslogtreecommitdiff
path: root/glx/glapi.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-03-21 12:55:09 -0700
committerKeith Packard <keithp@keithp.com>2012-03-21 13:54:42 -0700
commit9838b7032ea9792bec21af424c53c07078636d21 (patch)
treeb72d0827dac50f0f3b8eab29b3b7639546d735d7 /glx/glapi.h
parent75199129c603fc8567185ac31866c9518193cb78 (diff)
Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'glx/glapi.h')
-rw-r--r--glx/glapi.h62
1 files changed, 26 insertions, 36 deletions
diff --git a/glx/glapi.h b/glx/glapi.h
index 27395d87c..bad791eab 100644
--- a/glx/glapi.h
+++ b/glx/glapi.h
@@ -22,7 +22,6 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-
/**
* \mainpage Mesa GL API Module
*
@@ -40,7 +39,6 @@
* with the X/DRI libGL also.
*/
-
#ifndef _GLAPI_H
#define _GLAPI_H
@@ -50,13 +48,11 @@
#include "GL/glext.h"
#include "glthread.h"
-
struct _glapi_table;
-typedef void (*_glapi_proc)(void); /* generic function pointer */
-
-typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
+typedef void (*_glapi_proc) (void); /* generic function pointer */
+typedef void (*_glapi_warning_func) (void *ctx, const char *str, ...);
#if defined(USE_MGL_NAMESPACE)
#define _glapi_set_dispatch _mglapi_set_dispatch
@@ -67,13 +63,11 @@ typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
#define _glapi_Dispatch _mglapi_Dispatch
#endif
-
/*
* Number of extension functions which we can dynamically add at runtime.
*/
#define MAX_EXTENSION_FUNCS 300
-
/**
** Define the GET_CURRENT_CONTEXT() macro.
** \param C local variable which will hold the current context.
@@ -83,63 +77,59 @@ typedef void (*_glapi_warning_func)(void *ctx, const char *str, ...);
const extern void *_glapi_Context;
const extern struct _glapi_table *_glapi_Dispatch;
-extern TLS void * _glapi_tls_Context;
+extern TLS void *_glapi_tls_Context;
-# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_tls_Context
+#define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_tls_Context
#else
extern void *_glapi_Context;
extern struct _glapi_table *_glapi_Dispatch;
-# ifdef THREADS
-# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context())
-# else
-# define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_Context
-# endif
-
-#endif /* defined (GLX_USE_TLS) */
+#ifdef THREADS
+#define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) (_glapi_Context ? _glapi_Context : _glapi_get_context())
+#else
+#define GET_CURRENT_CONTEXT(C) GLcontext *C = (GLcontext *) _glapi_Context
+#endif
+#endif /* defined (GLX_USE_TLS) */
/**
** GL API public functions
**/
extern void
-_glapi_check_multithread(void);
+ _glapi_check_multithread(void);
extern void
-_glapi_set_context(void *context);
+ _glapi_set_context(void *context);
-extern void *
-_glapi_get_context(void);
+extern void *_glapi_get_context(void);
extern void
-_glapi_set_dispatch(struct _glapi_table *dispatch);
+ _glapi_set_dispatch(struct _glapi_table *dispatch);
-extern struct _glapi_table *
-_glapi_get_dispatch(void);
+extern struct _glapi_table *_glapi_get_dispatch(void);
extern int
-_glapi_begin_dispatch_override(struct _glapi_table *override);
+ _glapi_begin_dispatch_override(struct _glapi_table *override);
extern void
-_glapi_end_dispatch_override(int layer);
+ _glapi_end_dispatch_override(int layer);
-struct _glapi_table *
-_glapi_get_override_dispatch(int layer);
+struct _glapi_table *_glapi_get_override_dispatch(int layer);
-extern GLuint
-_glapi_get_dispatch_table_size(void);
+extern GLuint _glapi_get_dispatch_table_size(void);
extern int
-_glapi_add_dispatch( const char * const * function_names,
- const char * parameter_signature );
-extern _glapi_proc
-_glapi_get_proc_address(const char *funcName);
+_glapi_add_dispatch(const char *const *function_names,
+ const char *parameter_signature);
+
+extern _glapi_proc _glapi_get_proc_address(const char *funcName);
-extern struct _glapi_table *
-_glapi_create_table_from_handle(void *handle, const char *symbol_prefix);
+extern struct _glapi_table *_glapi_create_table_from_handle(void *handle,
+ const char
+ *symbol_prefix);
#endif