Diff

Differences From Artifact [41fecd6817]:

To Artifact [03d356e3a6]:


     5      5   	gsub(/"$/, "", file);
     6      6   
     7      7   	while(sub(/\/\/*[^\/]*\/\.\.\/\/*/, "/", file)) {}
     8      8   
     9      9   	destfile = file;
    10     10   	if (!gsub(/^.*\/gcc\/.*\/include\//, "gcc/", destfile)) {
    11     11   		if (!gsub(/^.*\/include\//, "", destfile)) {
    12         -			if (!gsub(/^.*\/include-fixed\//, "fix/", destfile)) {
    13         -				next
           12  +			if (!gsub(/^.*\/include-fixed\//, "", destfile)) {
           13  +				next;
    14     14   			}
    15     15   		}
    16     16   	}
    17     17   
    18     18   	if (file ~ /</) {
    19     19   		next;
    20     20   	}
    21     21   
    22     22   	if (file !~ /\.h$/) {
    23     23   		next;
    24     24   	}
    25     25   
           26  +	count = 0;
           27  +	origdestfile = destfile;
           28  +	while (destfiles[destfile]) {
           29  +		if (destfiles[destfile] == file) {
           30  +			break;
           31  +		}
           32  +
           33  +		destfile = count "/" origdestfile;
           34  +		count++;
           35  +	}
           36  +
           37  +	destfiles[destfile] = file;
    26     38   	copy[file] = destfile;
    27     39   }
    28     40   
    29     41   END{
    30     42   	for (key in copy) {
    31     43   		print key, copy[key];
    32     44   	}
    33     45   }