<commit_before># Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.


import sys;
import cPickle;
import types;
import string;
import re;

import stub_common;

parsed_file = open( "../glapi_parser/gl_header.parsed", "rb" )
gl_mapping = cPickle.load( parsed_file )

keys = gl_mapping.keys()
keys.sort();

stub_common.CopyrightC()

for index in range(len(keys)):
	func_name = keys[index]
	if stub_common.FindSpecial( "noexport", func_name ): continue
	( return_type, arg_names, arg_types ) = gl_mapping[func_name]

	print "\t.align 4"
	print ".globl gl%s" % func_name
	print "\t.type gl%s,@function" % func_name
	print "gl%s:" % func_name
	print "\tmovl glim+%d, %%eax" % (4*index)
	print "\tjmp *%eax"
	print ""

# Deal with NVIDIA driver lossage.  These functions will never be called, but
# the symbols need to exist.  Fooey.

nvidia_symbols = 0

if nvidia_symbols:
	GLcore_crap = [
		'__glTLSCXIndex',
		'__glXthreadGlxc',
		'__glNVTLSIndex',
		'NvRmConfigGet',
		'NvRmArchHeap',
		'NvRmConfigGetEx',
		'NvRmAllocMemory',
		'NvRmFree',
		'NvRmAllocChannelDma',
		'NvRmAllocRoot',
		'NvRmAllocDevice',
		'NvRmAllocContextDma',
		'NvRmAlloc',
		'NvRmIoFlush'
	]

	for crap in GLcore_crap:
		print "\t.align 4"
		print ".globl %s" % crap
		print "\t.type %s,@function" % crap
		print "%s:" % crap
		print "\tret"
		

<commit_msg>Generate the NVIDIA symbols by default.  I hate the fact that the NVIDIA drivers make me do this junk.<commit_after># Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.


import sys;
import cPickle;
import types;
import string;
import re;

import stub_common;

parsed_file = open( "../glapi_parser/gl_header.parsed", "rb" )
gl_mapping = cPickle.load( parsed_file )

keys = gl_mapping.keys()
keys.sort();

stub_common.CopyrightC()

for index in range(len(keys)):
	func_name = keys[index]
	if stub_common.FindSpecial( "noexport", func_name ): continue
	( return_type, arg_names, arg_types ) = gl_mapping[func_name]

	print "\t.align 4"
	print ".globl gl%s" % func_name
	print "\t.type gl%s,@function" % func_name
	print "gl%s:" % func_name
	print "\tmovl glim+%d, %%eax" % (4*index)
	print "\tjmp *%eax"
	print ""

# Deal with NVIDIA driver lossage.  These functions will never be called, but
# the symbols need to exist.  Fooey.

nvidia_symbols = 1

if nvidia_symbols:
	GLcore_crap = [
		'__glTLSCXIndex',
		'__glXthreadGlxc',
		'__glNVTLSIndex',
		'NvRmConfigGet',
		'NvRmArchHeap',
		'NvRmConfigGetEx',
		'NvRmAllocMemory',
		'NvRmFree',
		'NvRmAllocChannelDma',
		'NvRmAllocRoot',
		'NvRmAllocDevice',
		'NvRmAllocContextDma',
		'NvRmAlloc',
		'NvRmIoFlush'
	]

	for crap in GLcore_crap:
		print "\t.align 4"
		print ".globl %s" % crap
		print "\t.type %s,@function" % crap
		print "%s:" % crap
		print "\tret"
		


{'fraction_non_alphanumeric': 0.12923076923076923, 'fraction_numerical': 0.00547008547008547, 'mean_word_length': 4.358974358974359, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 2, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3717213', 'n_tokens_mistral': 1223, 'n_tokens_neox': 1147, 'n_words': 292}