gplize.awk 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # add copyright banner after the first comment
  2. #
  3. # text taken from file_copyright.txt
  4. BEGIN {
  5. status=0;
  6. }
  7. status==1 {
  8. print
  9. next
  10. }
  11. # end of comment not encountered yet
  12. { comment_begin=0 }
  13. /\/\*/ { comment_begin=1; }
  14. /\*\// {
  15. status=1
  16. # if it was a one-line comment print it and start a new comment
  17. if (comment_begin==1) {
  18. print
  19. print "/*"
  20. }
  21. print " *"
  22. print " * Copyright (C) 2001-2004 FhG Fokus"
  23. print " *"
  24. print " * This file is part of ser, a free SIP server."
  25. print " *"
  26. print " * ser is free software; you can redistribute it and/or modify"
  27. print " * it under the terms of the GNU General Public License as published by"
  28. print " * the Free Software Foundation; either version 2 of the License, or"
  29. print " * (at your option) any later version"
  30. print " *"
  31. print " * For a license to use the ser software under conditions"
  32. print " * other than those described here, or to purchase support for this"
  33. print " * software, please contact iptel.org by e-mail at the following addresses:"
  34. print " * [email protected]"
  35. print " *"
  36. print " * ser is distributed in the hope that it will be useful,"
  37. print " * but WITHOUT ANY WARRANTY; without even the implied warranty of"
  38. print " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"
  39. print " * GNU General Public License for more details."
  40. print " *"
  41. print " * You should have received a copy of the GNU General Public License "
  42. print " * along with this program; if not, write to the Free Software "
  43. print " * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
  44. print " */"
  45. print ""
  46. # don't print the original end of comment
  47. next
  48. }
  49. # end of comment not encountered yet -- print the line
  50. { print }