4 # another program to remove comments
8 { while( t = index($0 , "/*") )
10 printf "%s" , substr($0,1,t-1)
11 $0 = eat_comment( substr($0, t+2) )
18 function eat_comment(s, t)
20 #replace comment by one space
23 while ( (t = index(s, "*/")) == 0 )
25 { # input error -- unterminated comment
26 system("/bin/sh -c 'echo unterminated comment' 1>&2")