# Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.
import sys
import apiutil
print """
/* DO NOT EDIT - THIS FILE GENERATED BY THE NULLfuncs.py SCRIPT */
#include "cr_error.h"
#include "stub.h"
"""
print "static %s SPULOAD_APIENTRY NULL_%s( %s )" % (return_type, func_name, apiutil.MakeDeclarationString(params))
print "{"
print "\t/* do nothing */"
print "\tcrWarning(\"YOU ARE CALLING A NULLED FUNCTION (%s)\");" % func_name
print "\t(void) %s;" % name
if return_type != "void":
print "\treturn 0;"
print "}"
print ""
print "DECLEXPORT(SPUDispatchTable) stubNULLDispatch = {"
print "\tNULL_%s," % (func_name)
print "\tNULL, /* copyList */"
print "\tNULL, /* copy_of */"
print "\t0, /* mark */"
print "\tNULL /* server */"
print "};"
print ""
print "/* Declare and initialize the glim dispatch table here so that we */"
print "/* can initialize all entries to no-op routines. */"
print "SPUDispatchTable glim = {"
print "\tNULL_%s," % (func_name)
print "\tNULL, /* copyList */"
print "\tNULL, /* copy_of */"
print "\t0, /* mark */"
print "\tNULL /* server */"
print "};"