* SOFTWARE.
*/
+#if !defined( _INDIRECT_H_ )
+# define _INDIRECT_H_
/**
* \file
* \author Ian Romanick <idr@us.ibm.com>
*/
-#if !defined( _INDIRECT_H_ )
-# define _INDIRECT_H_
-
-
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
# define HIDDEN __attribute__((visibility("hidden")))
# else
extern HIDDEN void __indirect_glMultiDrawElementsEXT(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount);
extern HIDDEN void __indirect_glActiveStencilFaceEXT(GLenum face);
# undef HIDDEN
+
#endif /* !defined( _INDIRECT_H_ ) */
* SOFTWARE.
*/
+#if !defined( _INDIRECT_SIZE_H_ )
+# define _INDIRECT_SIZE_H_
/**
* \file
* \author Ian Romanick <idr@us.ibm.com>
*/
-#if !defined( _GLXSIZE_H_ )
-# define _GLXSIZE_H_
-
-
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
# define PURE __attribute__((pure))
# else
# undef INTERNAL
# undef PURE
# undef FASTCALL
-#endif /* !defined( _GLXSIZE_H_ ) */
+
+#endif /* !defined( _INDIRECT_SIZE_H_ ) */
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_send.py -m init_c > ../../glx/x11/indirect_init.c
../../glx/x11/indirect_size.h: $(COMMON_GLX) glX_proto_size.py
- $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_h --only-set > ../../glx/x11/indirect_size.h
+ $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_h --only-set -h _INDIRECT_SIZE_H_ > ../../glx/x11/indirect_size.h
../../glx/x11/indirect_size.c: $(COMMON_GLX) glX_proto_size.py
$(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_c --only-set > ../../glx/x11/indirect_size.c
self.license = license.bsd_license_template % ( \
"""Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
(C) Copyright IBM Corporation 2004""", "PRECISION INSIGHT, IBM")
-
+ self.header_tag = "_INDIRECT_H_"
def printRealHeader(self):
- print """
-/**
+ print """/**
* \\file
* Prototypes for indirect rendering functions.
*
* \\author Kevin E. Martin <kevin@precisioninsight.com>
* \\author Ian Romanick <idr@us.ibm.com>
*/
-
-#if !defined( _INDIRECT_H_ )
-# define _INDIRECT_H_
-
"""
glX_XML.printVisibility( "HIDDEN", "hidden" )
def printRealFooter(self):
print "# undef HIDDEN"
- print "#endif /* !defined( _INDIRECT_H_ ) */"
+
def printFunction(self, f):
if f.fn_offset < 0 or f.ignore: return
class PrintGlxSizeStubs_h(PrintGlxSizeStubs_common):
def printRealHeader(self):
- print """
-/**
+ print """/**
* \\file
* Prototypes for functions used to determine the number of data elements in
* various GLX protocol messages.
*
* \\author Ian Romanick <idr@us.ibm.com>
*/
-
-#if !defined( _GLXSIZE_H_ )
-# define _GLXSIZE_H_
-
"""
glX_XML.printPure();
print ''
print "# undef INTERNAL"
print "# undef PURE"
print "# undef FASTCALL"
- print "#endif /* !defined( _GLXSIZE_H_ ) */"
def printFunction(self, f):
file_name = "gl_API.xml"
try:
- (args, trail) = getopt.getopt(sys.argv[1:], "f:m:", ["only-get", "only-set", "get-alias-set"])
+ (args, trail) = getopt.getopt(sys.argv[1:], "f:m:h:", ["only-get", "only-set", "get-alias-set", "header-tag"])
except Exception,e:
show_usage()
mode = None
+ header_tag = None
which_functions = PrintGlxSizeStubs_common.do_get | PrintGlxSizeStubs_common.do_set
for (arg,val) in args:
which_functions = PrintGlxSizeStubs_common.do_set
elif arg == "--get-alias-set":
which_functions |= PrintGlxSizeStubs_common.do_get_alias_set
+ elif (arg == '-h') or (arg == "--header-tag"):
+ header_tag = val
if mode == "size_c":
dh = PrintGlxSizeStubs_c( which_functions )
elif mode == "size_h":
dh = PrintGlxSizeStubs_h( which_functions )
+ if header_tag:
+ dh.header_tag = header_tag
else:
show_usage()
self.types = {}
self.xref = {}
self.factory = glItemFactory()
+ self.header_tag = None
def find_type(self,type_name):
print ' * ' + self.license.replace('\n', '\n * ')
print ' */'
print ''
+ if self.header_tag:
+ print '#if !defined( %s )' % (self.header_tag)
+ print '# define %s' % (self.header_tag)
+ print ''
self.printRealHeader();
return
self.printFunctions()
self.printRealFooter()
+ if self.header_tag:
+ print ''
+ print '#endif /* !defined( %s ) */' % (self.header_tag)
def get_category_define(self):
def __init__(self):
gl_XML.FilterGLAPISpecBase.__init__(self)
+ self.header_tag = '_GLAPI_OFFSETS_H_'
self.license = license.bsd_license_template % ( \
"""Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM")
if f.fn_offset < 0: return
print '#define _gloffset_%s %d' % (f.name, f.fn_offset)
- def printRealHeader(self):
- print '#ifndef _GLAPI_OFFSETS_H_'
- print '#define _GLAPI_OFFSETS_H_'
- print ''
- return
-
- def printRealFooter(self):
- print ''
- print '#endif'
- return
def show_usage():
print "Usage: %s [-f input_file_name]" % sys.argv[0]
def __init__(self):
gl_XML.FilterGLAPISpecBase.__init__(self)
+ self.header_tag = '_GLAPI_TABLE_H_'
self.license = license.bsd_license_template % ( \
"""Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
(C) Copyright IBM Corporation 2004""", "BRIAN PAUL, IBM")
(f.fn_return_type, f.name, arg_string, f.fn_offset)
def printRealHeader(self):
- print '#ifndef _GLAPI_TABLE_H_'
- print '#define _GLAPI_TABLE_H_'
- print ''
print '#ifndef GLAPIENTRYP'
print '#define GLAPIENTRYP'
print '#endif'
def printRealFooter(self):
print '};'
- print ''
- print '#endif'
return
* SOFTWARE.
*/
-#ifndef _GLAPI_OFFSETS_H_
-#define _GLAPI_OFFSETS_H_
+#if !defined( _GLAPI_OFFSETS_H_ )
+# define _GLAPI_OFFSETS_H_
#define _gloffset_NewList 0
#define _gloffset_EndList 1
#define _gloffset_StencilOpSeparate 797
#define _gloffset_StencilMaskSeparate 798
-#endif
+#endif /* !defined( _GLAPI_OFFSETS_H_ ) */
* SOFTWARE.
*/
-#ifndef _GLAPI_TABLE_H_
-#define _GLAPI_TABLE_H_
+#if !defined( _GLAPI_TABLE_H_ )
+# define _GLAPI_TABLE_H_
#ifndef GLAPIENTRYP
#define GLAPIENTRYP
void (GLAPIENTRYP StencilMaskSeparate)(GLenum face, GLuint mask); /* 798 */
};
-#endif
+#endif /* !defined( _GLAPI_TABLE_H_ ) */