home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / PowerPC / Dev / PPCRelease / FD2Inline / lib / splitasm.awk < prev   
Encoding:
AWK Script  |  1997-07-04  |  446 b   |  26 lines

  1. #! /bin/awk -f
  2. #
  3. # splitasm.awk
  4. #
  5. # Copyright (C) 1995, 96 Kamil Iskra <iskra@student.uci.agh.edu.pl>
  6. # Distributed under terms of GNU General Public License.
  7. #
  8. # This file is part of fd2inline package.
  9. #
  10. # It is used to create linker libraries with stubs for Amiga shared libraries'
  11. # functions.
  12.  
  13. /^.globl/ {
  14.     currfn=substr($2, 2) ".s"
  15.     print ".text\n\t.even" >currfn
  16. }
  17.  
  18. currfn!="" {
  19.     print $0 >currfn
  20. }
  21.  
  22. /^\trts$/ {
  23.     close(currfn)
  24.     currfn=""
  25. }
  26.