summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-01-23 18:16:33 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-01-23 18:16:33 +0000
commitbea2868e3ab0934c56a3c27b473426a5135ad966 (patch)
tree1584fb4cc3fed700d5faa0f3f5fad3f7cf8cf157 /lib
parent67fd0e60b2e70eea37c22e633e61808113dfad56 (diff)
Removing Functions.c and related files. This is probably the wrong
approach for what I wanted to do, but may be resurrected at some point. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1281 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r--lib/sbin/Create_cctki_Functions_h.pl122
1 files changed, 0 insertions, 122 deletions
diff --git a/lib/sbin/Create_cctki_Functions_h.pl b/lib/sbin/Create_cctki_Functions_h.pl
deleted file mode 100644
index 9a8f14d2..00000000
--- a/lib/sbin/Create_cctki_Functions_h.pl
+++ /dev/null
@@ -1,122 +0,0 @@
-#! /usr/bin/perl -s
-# /*@@
-# @header Create_cctki_Functions_h.pl
-# @date Sat Dec 4 14:11:35 1999
-# @author Tom Goodale
-# @desc
-# Perl script to generate cctki_Functions.h
-# Takes one argument
-# -max_args
-# which is the maximum number of arguments a function may take.
-# @enddesc
-# @version $Header$
-# @@*/
-
-# Set the default number of arguments if it isn't defined.
-if(!defined $max_args)
-{
- $max_args = 255;
-}
-
-# Make a copy of the STDOUT file descriptor (allows us to change things later).
-*OUTSTREAM = STDOUT;
-
-# Print the GRDOC header.
-print OUTSTREAM " /*\@\@
- \@header cctki_Functions.h
- \@date Sat Dec 4 14:11:35 1999
- \@author Tom Goodale
- \@desc
- Header file for calling functions.
- This was generated by a perl script - please don't edit by hand !
- \@enddesc
- \@version \$Header\$
- \@\@*/
-";
-
-print OUTSTREAM "\n";
-
-print OUTSTREAM "#define CCTK_MAX_ARGS $max_args\n";
-
-print OUTSTREAM "\n";
-
-# Define the types of functions.
-for($i = 0; $i <= $max_args; $i++)
-{
- print OUTSTREAM "#define CCTK_FUNCTION_$i(xtype) xtype (*)(";
-
- if($i == 0)
- {
- print OUTSTREAM "void";
- }
- else
- {
- $sep = "";
- for($arg = 0 ; $arg < $i; $arg++)
- {
- print OUTSTREAM "$sep void *";
-
- $sep = ",";
- }
- }
-
- print OUTSTREAM ")\n";
-}
-
-print OUTSTREAM "\n";
-
-# switch/case statement for functions which return nothing.
-print OUTSTREAM "#define CCTK_CALLVOIDFUNC(xcount, xarray, xfunction) \\\n";
-print OUTSTREAM " switch(xcount) \\\n";
-print OUTSTREAM " { \\\n";
-
-for($i = 0; $i <= $max_args; $i++)
-{
- print OUTSTREAM " case $i: ((CCTK_FUNCTION_$i(void))(xfunction))(";
-
- if($i > 0)
- {
- $sep = "";
- for($arg = 0 ; $arg < $i; $arg++)
- {
- print OUTSTREAM "$sep"."(xarray)[$arg]";
-
- $sep = ", ";
- }
- }
-
- print OUTSTREAM "); break; \\\n";
-}
-
-print OUTSTREAM " default: fprintf(stderr, \"Internal error: %d functions unsupported\\n\", xcount);\\\n";
-
-print OUTSTREAM " }\n";
-
-print OUTSTREAM "\n";
-
-# switch/case statement for functions which return xtype
-print OUTSTREAM "#define CCTK_CALLRETFUNC(xret, xtype, xcount, xarray, xfunction) \\\n";
-print OUTSTREAM " switch(xcount) \\\n";
-print OUTSTREAM " { \\\n";
-
-for($i = 0; $i <= $max_args; $i++)
-{
- print OUTSTREAM " case $i: xret = ((CCTK_FUNCTION_$i(xtype))(xfunction))(";
-
- if($i > 0)
- {
- $sep = "";
- for($arg = 0 ; $arg < $i; $arg++)
- {
- print OUTSTREAM "$sep"."(xarray)[$arg]";
-
- $sep = ", ";
- }
- }
-
- print OUTSTREAM "); break; \\\n";
-}
-
-print OUTSTREAM " default: fprintf(stderr, \"Internal error: %d functions unsupported\\n\", xcount);\\\n";
-
-print OUTSTREAM " }\n";