3 # ARGV: 0 = replacement text, 1 = file w. list of files
7 $retain = 1; # 1 = retain old status
9 #----------------------------------------------------------------------
10 $header = 0; # 0 = not seen header yet; 1 = seen beginning; 2 = seen end
17 # Get replacement text
20 # Get files of interest
25 # Remove file name suffixes
29 print "--> added [$_]\n" if $debug;
35 # Find an ignore header
37 $header = $header + 1;
44 if(/^([0-9a-zA-Z_-]+)\.c\s*$/) {
47 print "--> currentfile: [$currentfile]\n" if $debug;
51 if(/^(\s+\*\s+)\[status\]([ \t\f]*)(\S*)$/) {
54 print "--> $currentfile [$currentstatus]\n" if $debug;
56 if(grep {/^$currentfile$/} @files) {
57 s/^(\s+\*\s+\[status\])[ \t\f]*(.*)$/\1 $replace/;
58 print "==>" if $debug;
60 if($retain && ($currentstatus ne "")) {
61 $oldstatus = " * [old-status] $currentstatus\n";
74 if($oldstatus ne "") {