File: FCreate

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (30 lines) | stat: -rwxr-xr-x 993 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh
# scilinktab name file
# name : name of the table 
# file : the file which contains the list of routines 
# Output FTables/name.h

links='fydot ffeval fres fadda fj2 fjac dgetx dgety fcoldg fcolg fcolf fcoldf fcolgu fintg fint2d fint3d fsolvf fsolvj foptim fschur fydot2 fresd fjacd fsurf fsurfd fbutn interf'

fout=FTables.h ; rm -f $fout 
echo "/******* Please do not edit *************/" >> $fout 

for f in $links 
do 
	echo "/**************** $f ***************/" >> $fout
   	files=` grep "${f}_list=" Flist | sed -e "s/${f}_list=//" `
	echo files : $files
	for i in $files 	
		do ( echo "extern void C2F($i)(ARGS_$f);"  >> $fout ;) done
	echo " " >> $fout 
	echo "FTAB FTab_$f[] ={" >> $fout
	rm -f $fout-temp$$
	touch $fout-temp$$
	for i in $files 
		do  (  echo "{\"$i\", (voidf)  C2F($i)}," >> $fout-temp$$ ;) done ;
	sort $fout-temp$$ >> $fout; 
	echo "{(char *) 0, (voidf) 0}};" >> $fout ;
done 
rm -f $fout-temp$$
echo "/***********************************/" >> $fout