#!/usr/bin/awk -f

# kcs (c) 1995 by Joerg Hessdoerfer (joe@amber.dinoco.de)
# Permission to use and re-distribute this software is 
# granted according to the GPL

BEGIN { 
  while(getline < sprintf("%s.lookup", ENVIRON["CONFTMP"]))
    {
      taglist[$2]=$1;
    }

  FS = "=" 
}

{
  if(!match($0,/^#/) && $0 != "" )
    {
      if($2 == "y")
	{
	  printf("%s ", taglist[$1]);
	}
      else
	{
	  printf("%s.%s ", taglist[$1], $2);
	}
    }
}

