File: CompletePolish

package info (click to toggle)
python-igraph 0.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 21,944 kB
  • sloc: ansic: 225,735; cpp: 23,208; python: 17,085; xml: 2,407; yacc: 1,164; sh: 531; lex: 486; pascal: 158; sed: 45; makefile: 23; javascript: 20; fortran: 8
file content (32 lines) | stat: -rwxr-xr-x 1,154 bytes parent folder | download
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
#!/bin/sh -
# call this Unix script "MagicScript"
# To use: MagicScript *.f 
#	  that translates *.f to *.c and polish the resulting C code from f2c. 
#
# Note: define trans_dir as the directory that contains this file.
#
# trans_dir=/home/barad-dur/jwd/users/mercedes-tmp/LAPACK_v2.0/LAPACK_Final_Release2.0/NEW_CLAPACK/CLAPACK/Translate

rm -f -r temp
mkdir temp
for file do	
       base=`echo $file | sed -e 's/\.f//g'`
   # run_stripper
       f2c -a < ${base}.f | ${trans_dir}/lenscrub > ${base}.c
   # run_macro (better vector and array indexing; from NAG)
#   	${trans_dir}/substitute_locals.exe < ${base}.c > ${base}.u
#  	${trans_dir}/test_tool.exe ${base}.u > ${base}.c
#   	rm -f ${base}.u
   # run_comment
       sed -f ${trans_dir}/delete.sed ${base}.c > ${base}.t
       mv -f ${base}.t ${base}.c
       ${trans_dir}/comment < ${base}.c > ${base}.t
       mv -f ${base}.t ${base}.c
   # run_splitter
#       sed -n -f ${trans_dir}/split.sed ${base}.c
#       mv -f ${base}.c ${base}.t
#       cat temp/header1 temp/header3 temp/comment temp/header2 temp/prologue \
#       		temp/code > ${base}.c
#       rm -f ${base}.t
done
rm -f -r temp