Artifact [03d356e3a6]

Artifact 03d356e3a607fb6145e7f14c738f519ee356176f:


/^# [0-9][0-9]* /{
	file = $3;

	gsub(/^"/, "", file);
	gsub(/"$/, "", file);

	while(sub(/\/\/*[^\/]*\/\.\.\/\/*/, "/", file)) {}

	destfile = file;
	if (!gsub(/^.*\/gcc\/.*\/include\//, "gcc/", destfile)) {
		if (!gsub(/^.*\/include\//, "", destfile)) {
			if (!gsub(/^.*\/include-fixed\//, "", destfile)) {
				next;
			}
		}
	}

	if (file ~ /</) {
		next;
	}

	if (file !~ /\.h$/) {
		next;
	}

	count = 0;
	origdestfile = destfile;
	while (destfiles[destfile]) {
		if (destfiles[destfile] == file) {
			break;
		}

		destfile = count "/" origdestfile;
		count++;
	}

	destfiles[destfile] = file;
	copy[file] = destfile;
}

END{
	for (key in copy) {
		print key, copy[key];
	}
}