Salome HOME
ca4dbb9301e02c6c7ad490ac0098f46433c987bc
[tools/hxx2salome.git] / scripts / parse01.awk
1 # This awk program deletes C like comments '*/  ...  /*'  
2 # --
3 # Copyright (C) CEA, EDF
4 # Author : Nicolas Crouzet (CEA)
5 # --
6 {
7     if (t = index($0, "/*")) {
8         if (t > 1)
9             tmp = substr($0, 1, t - 1)
10         else
11             tmp = ""
12         u = index(substr($0, t + 2), "*/")
13         while (u == 0) {
14             getline
15             t = -1
16             u = index($0, "*/")
17         }
18         if (u <= length($0) - 2)
19             $0 = tmp substr($0, t + u + 3)
20         else
21             $0 = tmp
22     }
23     print $0
24 }