dtcm: Coverity 89670, 88380 and 88201
[oweals/cde.git] / cde / programs / dtprintinfo / msg.awk
1 #
2 # file: msg.awk
3 #
4 #
5 BEGIN{ 
6 }
7    /^\$set/ { SET_NAME = $2 }
8    # if a line does not start with $, and the first character of the second
9    # argument is a double quote, then delete the first argument from $0,
10    # then delete $1 from $0, concatenate TXT_,SET_NAME,_, and  $1, and print
11    # $0 (w/t $1)  
12    /^[^\$]/ { if (substr($2,1,1) == "\"") 
13                { arg1=$1;
14                  sub($1,"",$0);
15                  print "#define TXT_" SET_NAME "_" arg1 " " $0
16                }
17               else
18                  print $0
19             }   
20    /^$/ { print $0 }  # print line if blank
21   /^\$/ { sub(/^\$/ ,"/*",$0);
22           sub( /$/," */",$0);
23           print $0; # C style comments
24         }
25    
26 END {
27
28 }