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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
# delete the header produced by f2c
/\/\* -- trans.*/,/\*\//{
d
}
# extract the first line of including f2c.h
/#include/,/^$/{
w temp/header1
d
}
# possible local constants produced by f2c
/\/\* Table of constant values \*\//{
s/^/ /
w temp/header2
d
}
/^static.*=.*/,/^$/{
s/^/ /
w temp/header2
d
}
# matches /* Subroutine */..._( or /* Complex */..._(
/^\/\* .*_(/,/^\{/{
w temp/header3
/^\{/!{
d
}
}
# matches any function declaration line
/^[a-zA-Z].*_(/,/^\{/{
w temp/header3
/^\{/!{
d
}
}
/^\{/,/\/\*.*LAPACK/{
/\/\*.*LAPACK/!{
/^$/d
/^\{/d
w temp/prologue
d
}
}
/\/\*.*LAPACK/,/\*\//{
w temp/comment
d
}
w temp/code
|