File: FCreate

package info (click to toggle)
scilab 4.0-12
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 100,640 kB
  • ctags: 57,333
  • sloc: ansic: 377,889; fortran: 242,862; xml: 179,819; tcl: 42,062; sh: 10,593; ml: 9,441; makefile: 4,377; cpp: 1,354; java: 621; csh: 260; yacc: 247; perl: 130; lex: 126; asm: 72; lisp: 30
file content (35 lines) | stat: -rwxr-xr-x 1,170 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
31
32
33
34
35
#!/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 schsel zchsel gshsel gzhsel fydot2 fresd fjacd fsurf fsurfd fbutn interf lsqrsolvf lsqrsolvj'

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" >> $fout-temp$$ ;) done ;
	files=`sort $fout-temp$$`
	rm -f $fout-temp$$
	touch $fout-temp$$
	for i in $files 
		do  (  echo "{\"$i\", (voidf)  C2F($i)}," >> $fout-temp$$ ;) done ;
	cat $fout-temp$$ >> $fout; 
	echo "{(char *) 0, (voidf) 0}};" >> $fout ;
done 
rm -f $fout-temp$$
echo "/***********************************/" >> $fout