Refactor the code to emit multiple-inclusion protection to

FilterGLAPISpecBase.  Since the size_h mode of glX_proto_size.py will be
used to generate multiple header files, add an option to specify the define
that is used for multiple-inclusion protection.

The changes to the header files in this commit are just a side-effect of the
changes to the Python scripts.
This commit is contained in:
Ian Romanick
2005-01-28 19:00:54 +00:00
parent 8d27148bbd
commit 16c3c74018
10 changed files with 34 additions and 47 deletions

View File

@@ -758,28 +758,23 @@ class PrintGlxProtoInit_h(glX_XML.GlxProto):
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