#!/usr/local/bin/perl
# file: mkadobe

while (<>)
{
  next if (/^#/);

  if (/^([^ 	]+)[ 	]+([^ 	]+)[#	 ]+(.*)\n/)
  {
    $adobe = $1;
    if ($adobe eq 'quotedblebase')
    {
      $adobe = 'quotedblbase';
    }
    if ($adobe eq 'hyphen')
    {
      $ucs2 = 'hyphen' ;
    }
    else
    {
      $ucs2 = $3;
      $ucs2 =~ tr/[A-Z] -/[a-z]__/;
      if ($ucs2 =~ /to_(proportional_to)/)
      {
	$ucs2 = $1;
      }
      elsif ($ucs2 eq 'rotated_heavy_black_heart_bullet')
      {
	$adobe = 'a106'; # not a105
      }
      elsif ($ucs2 eq 'floral_heart')
      {
	$adobe = 'a107'; # not a106
      }
      elsif ($ucs2 eq 'rotated_floral_heart_bullet')
      {
	$adobe = 'a108'; # not a107
      }
    }

    print "  \"$adobe\",", ("\t" x ((26-length ($adobe))/8));
    print "UCS2_$ucs2,", ("\t" x ((57-length ($ucs2))/8));
    print "/* $2 */\n";
  }
}
