extract.awk 708 B

1234567891011121314151617181920212223242526
  1. # Code from http://www.loudhush.ro/Loudhush_iaxclient_iLBC.html
  2. BEGIN { srcname = "nothing"; }
  3. { if (/^A\.[0-9][0-9]*\.* *[a-zA-Z][a-zA-Z_0-9]*\.[ch]/) {
  4. if (srcname != "nothing")
  5. close(srcname);
  6. srcname = $2;
  7. printf("creating source file %s\n", srcname);
  8. }else if (srcname != "nothing") {
  9. if (/Andersen,* *et* *al\./)
  10. printf("skipping %s\n", $0);
  11. else if (/^L/)
  12. printf("skipping2 %s\n", $0);
  13. else if (/Internet Low Bit Rate Codec *December 2004/)
  14. printf("skipping3 %s\n", $0);
  15. else if (/Authors' *Addresses/){
  16. close(srcname);
  17. exit;}
  18. else
  19. print $0 >> srcname;
  20. }
  21. }
  22. END {
  23. printf("ending file %s\n", srcname);
  24. close(srcname);
  25. }