feb96a61 |
1 | #!/bin/sh |
8022df01 |
2 | set -e |
feb96a61 |
3 | |
368deb23 |
4 | echo -n > $3 |
feb96a61 |
5 | |
8022df01 |
6 | cat $1 | fromdos | sed -e \ |
feb96a61 |
7 | '1,/^_rdata.*segment/d;/^_data_last/q;/^[[:blank:];]/d;/^;/d;/^_r\?data\>/d;' | awk '{print $1}' | \ |
8 | while read a; do |
9 | test -z "$a" && continue |
7b64f7cd |
10 | case $a in |
11 | __IMPORT_DESCRIPTOR*) |
12 | continue |
13 | ;; |
14 | *) |
15 | ;; |
16 | esac |
17 | |
368deb23 |
18 | echo "_$a equ $a" >> $3 |
19 | echo "PUBLIC _$a" >> $3 |
20 | done |
21 | |
22 | echo "; funcs called from C" >> $3 |
23 | |
24 | cat $2 | \ |
25 | while read a; do |
57e4efe9 |
26 | # echo "_$a equ $a" >> $3 |
27 | # echo "PUBLIC _$a" >> $3 |
54e763a1 |
28 | a=`echo $a | awk -F@ '{print $1}'` |
57e4efe9 |
29 | echo "PUBLIC $a" >> $3 |
feb96a61 |
30 | done |