
BEGIN {
   	while (0 < (getline contained_tag < contents))
	  {
            wanted_tags[contained_tag] = contained_tag;
# print "WANTED " contained_tag | "cat 1>&2"; 
	  }

	if (0 >= getline)
     	  exit(0);

	wanted = match($0, "^[^ \t]") && wanted_tags[$1];
	tag = $1;
# print "TAG(1) " tag " " wanted | "cat 1>&2";

	while (!wanted)
	  {
	    while (0 < getline)
	      {
		wanted = match($0, "^[^ \t]") && wanted_tags[$1];
		tag = $1;
# print "TAG(2) " tag " " wanted | "cat 1>&2";
		if (wanted)
		  break;
	      }
	    if (!wanted)
	      exit(0);
	  }
      }

{

  print "<tr>";
  print "  <td>";

  print "<b>" tag "</b>"
  print "<p>"

  while (match($0, "^[ \t]"))
    {
# print "DATA " $0 | "cat 1>&2";
      revision = $1;
      ops = $2;			# I A M R D
      new_name = $3;

      lvl = revision;
      sub(".*--", "", lvl);

# print "OPS " ops " " tag | "cat 1>&2";
      if (index(ops, "I"))
	{
	  print "<i>inherited in</i>";
	  print "<a target=\"new_window\" href=\"../patches-full.d/loc-" lvl ".html#" lvl "\">";
	  print "<code>" lvl "</code>"
	  print "</a>";
	  print "<i>as</i>";
	  print "<a target=\"new_window\" type=\"text/plain\" href=\"" lib_vsn_prefix "--" lvl "/" new_name "\">";
	  print "<code>" new_name "</code>";
	  print "</a><br>";
	}

      if (index(ops, "A"))
	{
	  print "<i>added in</i>";
	  print "<a target=\"new_window\" href=\"../patches-full.d/loc-" lvl ".html#" lvl "\">";
	  print "<code>" lvl "</code>"
	  print "</a>";
	  print "<i>as</i>";
	  print "<a target=\"new_window\" type=\"text/plain\" href=\"" lib_vsn_prefix "--" lvl "/" new_name "\">";
	  print "<code>" new_name "</code>";
	  print "</a><br>";
	}

      if (index(ops, "M"))
	{
	  print "<i>modified in</i>";
	  print "<a target=\"new_window\" href=\"../patches-full.d/loc-" lvl ".html#" lvl "\">";
	  print "<code>" lvl "</code>"
	  print "</a>";
	  print "<a target=\"new_window\" type=\"text/plain\" href=\"=REPORT.html\">";
	  print "<i>" (patch set) "</i>";
	  print "</a><br>";
	}

      if (index(ops, "D"))
	{
	  print "<i>deleted in</i>";
	  print "<a target=\"new_window\" href=\"../patches-full.d/loc-" lvl ".html#" lvl "\">";
	  print "<code>" lvl "</code>"
	  print "</a>";
	  print "<a target=\"new_window\" type=\"text/plain\" href=\"=REPORT.html\">";
	  print "<i>" (patch set) "</i>";
	  print "</a><br>";
	}

      if (index(ops, "R"))
	{
	  print "<i>renamed in</i>";
	  print "<a target=\"new_window\" href=\"../patches-full.d/loc-" lvl ".html#" lvl "\">";
	  print "<code>" lvl "</code>"
	  print "</a>";
	  print "<i>to</i>";
	  print "<a target=\"new_window\" type=\"text/plain\" href=\"" lib_vsn_prefix "--" lvl "\">";
	  print "<code>" new_name "</code>";
	  print "</a><br>";
	}

      if (0 >= getline)
	exit(0);
    }

  print "  </td>";
  print "</tr>";

  wanted = match($0, "^[^ \t]") && wanted_tags[$1];
  tag = $1;
# print "TAG(3) " tag " " wanted | "cat 1>&2";

   while (!wanted)
     {
       while (0 < getline)
	 {
	   wanted = match($0, "^[^ \t]") && wanted_tags[$1];
	   tag = $1;
# print "TAG(4) " tag " " wanted | "cat 1>&2";
	   if (wanted)
	     break;
	}
	if (!wanted)
	  exit(0);
     }


  if (!wanted)
    exit(0);
}


# tag: Tom Lord Tue Jan 29 02:56:46 2002 (web/file-details.awk)
#
