fix-include-sofia-sip 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. #! /bin/sed -f
  2. #
  3. # Run this script like
  4. #
  5. # fix-include-sofia-sip -i.bak source.h source.c
  6. #
  7. # or
  8. #
  9. # find . -name '*.[hc]' -print0 | xargs -0 fix-include-sofia-sip -i.bak
  10. #
  11. /^ *# *include/ {
  12. # Not using features.h...
  13. s!include *<sofia-sip/features.h>!include <sofia-sip/sofia_features.h>!
  14. s!include *"sofia-sip/features.h"!include "sofia-sip/sofia_features.h"!
  15. s!include *<bnf.h>!include <sofia-sip/bnf.h>!
  16. s!include *<sofia_sip_features.h>!include <sofia-sip/sofia_features.h>!
  17. s!include *<http.h>!include <sofia-sip/http.h>!
  18. s!include *<http_hclasses.h>!include <sofia-sip/http_hclasses.h>!
  19. s!include *<http_header.h>!include <sofia-sip/http_header.h>!
  20. s!include *<http_parser.h>!include <sofia-sip/http_parser.h>!
  21. s!include *<http_protos.h>!include <sofia-sip/http_protos.h>!
  22. s!include *<http_status.h>!include <sofia-sip/http_status.h>!
  23. s!include *<http_tag.h>!include <sofia-sip/http_tag.h>!
  24. s!include *<http_tag_class.h>!include <sofia-sip/http_tag_class.h>!
  25. s!include *<base64.h>!include <sofia-sip/base64.h>!
  26. s!include *<rc4.h>!include <sofia-sip/rc4.h>!
  27. s!include *<sha1.h>!include <sofia-sip/sha1.h>!
  28. s!include *<string0.h>!include <sofia-sip/string0.h>!
  29. s!include *<token64.h>!include <sofia-sip/token64.h>!
  30. s!include *<uniqueid.h>!include <sofia-sip/uniqueid.h>!
  31. s!include *<utf8.h>!include <sofia-sip/utf8.h>!
  32. s!include *<auth_client.h>!include <sofia-sip/auth_client.h>!
  33. s!include *<auth_digest.h>!include <sofia-sip/auth_digest.h>!
  34. s!include *<auth_module.h>!include <sofia-sip/auth_module.h>!
  35. s!include *<auth_plugin.h>!include <sofia-sip/auth_plugin.h>!
  36. s!include *<msg.h>!include <sofia-sip/msg.h>!
  37. s!include *<msg_addr.h>!include <sofia-sip/msg_addr.h>!
  38. s!include *<msg_buffer.h>!include <sofia-sip/msg_buffer.h>!
  39. s!include *<msg_date.h>!include <sofia-sip/msg_date.h>!
  40. s!include *<msg_header.h>!include <sofia-sip/msg_header.h>!
  41. s!include *<msg_mclass.h>!include <sofia-sip/msg_mclass.h>!
  42. s!include *<msg_mclass_hash.h>!include <sofia-sip/msg_mclass_hash.h>!
  43. s!include *<msg_mime.h>!include <sofia-sip/msg_mime.h>!
  44. s!include *<msg_mime_protos.h>!include <sofia-sip/msg_mime_protos.h>!
  45. s!include *<msg_parser.h>!include <sofia-sip/msg_parser.h>!
  46. s!include *<msg_protos.h>!include <sofia-sip/msg_protos.h>!
  47. s!include *<msg_tag_class.h>!include <sofia-sip/msg_tag_class.h>!
  48. s!include *<msg_types.h>!include <sofia-sip/msg_types.h>!
  49. s!include *<nea.h>!include <sofia-sip/nea.h>!
  50. s!include *<nea_tag.h>!include <sofia-sip/nea_tag.h>!
  51. s!include *<nta.h>!include <sofia-sip/nta.h>!
  52. s!include *<nta_stateless.h>!include <sofia-sip/nta_stateless.h>!
  53. s!include *<nta_tag.h>!include <sofia-sip/nta_tag.h>!
  54. s!include *<nta_tport.h>!include <sofia-sip/nta_tport.h>!
  55. s!include *<sl_utils.h>!include <sofia-sip/sl_utils.h>!
  56. s!include *<nth.h>!include <sofia-sip/nth.h>!
  57. s!include *<nth_tag.h>!include <sofia-sip/nth_tag.h>!
  58. s!include *<nua.h>!include <sofia-sip/nua.h>!
  59. s!include *<nua_tag.h>!include <sofia-sip/nua_tag.h>!
  60. s!include *<sdp.h>!include <sofia-sip/sdp.h>!
  61. s!include *<sdp_tag.h>!include <sofia-sip/sdp_tag.h>!
  62. s!include *<sip.h>!include <sofia-sip/sip.h>!
  63. s!include *<sip_hclasses.h>!include <sofia-sip/sip_hclasses.h>!
  64. s!include *<sip_header.h>!include <sofia-sip/sip_header.h>!
  65. s!include *<sip_parser.h>!include <sofia-sip/sip_parser.h>!
  66. s!include *<sip_protos.h>!include <sofia-sip/sip_protos.h>!
  67. s!include *<sip_status.h>!include <sofia-sip/sip_status.h>!
  68. s!include *<sip_tag.h>!include <sofia-sip/sip_tag.h>!
  69. s!include *<sip_tag_class.h>!include <sofia-sip/sip_tag_class.h>!
  70. s!include *<sip_util.h>!include <sofia-sip/sip_util.h>!
  71. s!include *<soa.h>!include <sofia-sip/soa.h>!
  72. s!include *<soa_add.h>!include <sofia-sip/soa_add.h>!
  73. s!include *<soa_session.h>!include <sofia-sip/soa_session.h>!
  74. s!include *<soa_tag.h>!include <sofia-sip/soa_tag.h>!
  75. s!include *<sresolv.h>!include <sofia-sip/sresolv.h>!
  76. s!include *<stun.h>!include <sofia-sip/stun.h>!
  77. s!include *<stun_common.h>!include <sofia-sip/stun_common.h>!
  78. s!include *<stun_tag.h>!include <sofia-sip/stun_tag.h>!
  79. s!include *<htable.h>!include <sofia-sip/htable.h>!
  80. s!include *<htable2.h>!include <sofia-sip/htable2.h>!
  81. s!include *<rbtree.h>!include <sofia-sip/rbtree.h>!
  82. s!include *<su.h>!include <sofia-sip/su.h>!
  83. s!include *<su_addrinfo.h>!include <sofia-sip/su_addrinfo.h>!
  84. s!include *<su_alloc.h>!include <sofia-sip/su_alloc.h>!
  85. s!include *<su_alloc_stat.h>!include <sofia-sip/su_alloc_stat.h>!
  86. s!include *<su_memmem.h>!include <sofia-sip/su_bm.h>!
  87. s!include *<su_config.h>!include <sofia-sip/su_config.h>!
  88. s!include *<su_configure.h>!include <sofia-sip/su_configure.h>!
  89. s!include *<su_debug.h>!include <sofia-sip/su_debug.h>!
  90. s!include *<su_errno.h>!include <sofia-sip/su_errno.h>!
  91. s!include *<su_localinfo.h>!include <sofia-sip/su_localinfo.h>!
  92. s!include *<su_log.h>!include <sofia-sip/su_log.h>!
  93. s!include *<su_md5.h>!include <sofia-sip/su_md5.h>!
  94. s!include *<su_source.h>!include <sofia-sip/su_source.h>!
  95. s!include *<su_strlst.h>!include <sofia-sip/su_strlst.h>!
  96. s!include *<su_tag.h>!include <sofia-sip/su_tag.h>!
  97. s!include *<su_tag_class.h>!include <sofia-sip/su_tag_class.h>!
  98. s!include *<su_tag_inline.h>!include <sofia-sip/su_tag_inline.h>!
  99. s!include *<su_tag_io.h>!include <sofia-sip/su_tag_io.h>!
  100. s!include *<su_tagarg.h>!include <sofia-sip/su_tagarg.h>!
  101. s!include *<su_time.h>!include <sofia-sip/su_time.h>!
  102. s!include *<su_types.h>!include <sofia-sip/su_types.h>!
  103. s!include *<su_uniqueid.h>!include <sofia-sip/su_uniqueid.h>!
  104. s!include *<su_vector.h>!include <sofia-sip/su_vector.h>!
  105. s!include *<su_wait.h>!include <sofia-sip/su_wait.h>!
  106. s!include *<tstdef.h>!include <sofia-sip/tstdef.h>!
  107. s!include *<tport.h>!include <sofia-sip/tport.h>!
  108. s!include *<tport_tag.h>!include <sofia-sip/tport_tag.h>!
  109. s!include *<url.h>!include <sofia-sip/url.h>!
  110. s!include *<url_tag.h>!include <sofia-sip/url_tag.h>!
  111. s!include *<url_tag_class.h>!include <sofia-sip/url_tag_class.h>!
  112. s!include *"bnf.h"!include "sofia-sip/bnf.h"!
  113. s!include *"sofia_sip_features.h"!include "sofia-sip/sofia_features.h"!
  114. s!include *"http.h"!include "sofia-sip/http.h"!
  115. s!include *"http_hclasses.h"!include "sofia-sip/http_hclasses.h"!
  116. s!include *"http_header.h"!include "sofia-sip/http_header.h"!
  117. s!include *"http_parser.h"!include "sofia-sip/http_parser.h"!
  118. s!include *"http_protos.h"!include "sofia-sip/http_protos.h"!
  119. s!include *"http_status.h"!include "sofia-sip/http_status.h"!
  120. s!include *"http_tag.h"!include "sofia-sip/http_tag.h"!
  121. s!include *"http_tag_class.h"!include "sofia-sip/http_tag_class.h"!
  122. s!include *"base64.h"!include "sofia-sip/base64.h"!
  123. s!include *"rc4.h"!include "sofia-sip/rc4.h"!
  124. s!include *"sha1.h"!include "sofia-sip/sha1.h"!
  125. s!include *"string0.h"!include "sofia-sip/string0.h"!
  126. s!include *"token64.h"!include "sofia-sip/token64.h"!
  127. s!include *"uniqueid.h"!include "sofia-sip/uniqueid.h"!
  128. s!include *"utf8.h"!include "sofia-sip/utf8.h"!
  129. s!include *"auth_client.h"!include "sofia-sip/auth_client.h"!
  130. s!include *"auth_digest.h"!include "sofia-sip/auth_digest.h"!
  131. s!include *"auth_module.h"!include "sofia-sip/auth_module.h"!
  132. s!include *"auth_plugin.h"!include "sofia-sip/auth_plugin.h"!
  133. s!include *"msg.h"!include "sofia-sip/msg.h"!
  134. s!include *"msg_addr.h"!include "sofia-sip/msg_addr.h"!
  135. s!include *"msg_buffer.h"!include "sofia-sip/msg_buffer.h"!
  136. s!include *"msg_date.h"!include "sofia-sip/msg_date.h"!
  137. s!include *"msg_header.h"!include "sofia-sip/msg_header.h"!
  138. s!include *"msg_mclass.h"!include "sofia-sip/msg_mclass.h"!
  139. s!include *"msg_mclass_hash.h"!include "sofia-sip/msg_mclass_hash.h"!
  140. s!include *"msg_mime.h"!include "sofia-sip/msg_mime.h"!
  141. s!include *"msg_mime_protos.h"!include "sofia-sip/msg_mime_protos.h"!
  142. s!include *"msg_parser.h"!include "sofia-sip/msg_parser.h"!
  143. s!include *"msg_protos.h"!include "sofia-sip/msg_protos.h"!
  144. s!include *"msg_tag_class.h"!include "sofia-sip/msg_tag_class.h"!
  145. s!include *"msg_types.h"!include "sofia-sip/msg_types.h"!
  146. s!include *"nea.h"!include "sofia-sip/nea.h"!
  147. s!include *"nea_tag.h"!include "sofia-sip/nea_tag.h"!
  148. s!include *"nta.h"!include "sofia-sip/nta.h"!
  149. s!include *"nta_stateless.h"!include "sofia-sip/nta_stateless.h"!
  150. s!include *"nta_tag.h"!include "sofia-sip/nta_tag.h"!
  151. s!include *"nta_tport.h"!include "sofia-sip/nta_tport.h"!
  152. s!include *"sl_utils.h"!include "sofia-sip/sl_utils.h"!
  153. s!include *"nth.h"!include "sofia-sip/nth.h"!
  154. s!include *"nth_tag.h"!include "sofia-sip/nth_tag.h"!
  155. s!include *"nua.h"!include "sofia-sip/nua.h"!
  156. s!include *"nua_tag.h"!include "sofia-sip/nua_tag.h"!
  157. s!include *"sdp.h"!include "sofia-sip/sdp.h"!
  158. s!include *"sdp_tag.h"!include "sofia-sip/sdp_tag.h"!
  159. s!include *"sip.h"!include "sofia-sip/sip.h"!
  160. s!include *"sip_hclasses.h"!include "sofia-sip/sip_hclasses.h"!
  161. s!include *"sip_header.h"!include "sofia-sip/sip_header.h"!
  162. s!include *"sip_parser.h"!include "sofia-sip/sip_parser.h"!
  163. s!include *"sip_protos.h"!include "sofia-sip/sip_protos.h"!
  164. s!include *"sip_status.h"!include "sofia-sip/sip_status.h"!
  165. s!include *"sip_tag.h"!include "sofia-sip/sip_tag.h"!
  166. s!include *"sip_tag_class.h"!include "sofia-sip/sip_tag_class.h"!
  167. s!include *"sip_util.h"!include "sofia-sip/sip_util.h"!
  168. s!include *"soa.h"!include "sofia-sip/soa.h"!
  169. s!include *"soa_add.h"!include "sofia-sip/soa_add.h"!
  170. s!include *"soa_session.h"!include "sofia-sip/soa_session.h"!
  171. s!include *"soa_tag.h"!include "sofia-sip/soa_tag.h"!
  172. s!include *"sresolv.h"!include "sofia-sip/sresolv.h"!
  173. s!include *"stun.h"!include "sofia-sip/stun.h"!
  174. s!include *"stun_common.h"!include "sofia-sip/stun_common.h"!
  175. s!include *"stun_tag.h"!include "sofia-sip/stun_tag.h"!
  176. s!include *"htable.h"!include "sofia-sip/htable.h"!
  177. s!include *"htable2.h"!include "sofia-sip/htable2.h"!
  178. s!include *"rbtree.h"!include "sofia-sip/rbtree.h"!
  179. s!include *"su.h"!include "sofia-sip/su.h"!
  180. s!include *"su_addrinfo.h"!include "sofia-sip/su_addrinfo.h"!
  181. s!include *"su_alloc.h"!include "sofia-sip/su_alloc.h"!
  182. s!include *"su_alloc_stat.h"!include "sofia-sip/su_alloc_stat.h"!
  183. s!include *"su_memmem.h"!include "sofia-sip/su_bm.h"!
  184. s!include *"su_config.h"!include "sofia-sip/su_config.h"!
  185. s!include *"su_configure.h"!include "sofia-sip/su_configure.h"!
  186. s!include *"su_debug.h"!include "sofia-sip/su_debug.h"!
  187. s!include *"su_errno.h"!include "sofia-sip/su_errno.h"!
  188. s!include *"su_localinfo.h"!include "sofia-sip/su_localinfo.h"!
  189. s!include *"su_log.h"!include "sofia-sip/su_log.h"!
  190. s!include *"su_md5.h"!include "sofia-sip/su_md5.h"!
  191. s!include *"su_source.h"!include "sofia-sip/su_source.h"!
  192. s!include *"su_strlst.h"!include "sofia-sip/su_strlst.h"!
  193. s!include *"su_tag.h"!include "sofia-sip/su_tag.h"!
  194. s!include *"su_tag_class.h"!include "sofia-sip/su_tag_class.h"!
  195. s!include *"su_tag_inline.h"!include "sofia-sip/su_tag_inline.h"!
  196. s!include *"su_tag_io.h"!include "sofia-sip/su_tag_io.h"!
  197. s!include *"su_tagarg.h"!include "sofia-sip/su_tagarg.h"!
  198. s!include *"su_time.h"!include "sofia-sip/su_time.h"!
  199. s!include *"su_types.h"!include "sofia-sip/su_types.h"!
  200. s!include *"su_uniqueid.h"!include "sofia-sip/su_uniqueid.h"!
  201. s!include *"su_vector.h"!include "sofia-sip/su_vector.h"!
  202. s!include *"su_wait.h"!include "sofia-sip/su_wait.h"!
  203. s!include *"tstdef.h"!include "sofia-sip/tstdef.h"!
  204. s!include *"tport.h"!include "sofia-sip/tport.h"!
  205. s!include *"tport_tag.h"!include "sofia-sip/tport_tag.h"!
  206. s!include *"url.h"!include "sofia-sip/url.h"!
  207. s!include *"url_tag.h"!include "sofia-sip/url_tag.h"!
  208. s!include *"url_tag_class.h"!include "sofia-sip/url_tag_class.h"!
  209. }