From 8d40ca45900d899c104b0a98bc17e5dc85a5e1fb Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Fri, 11 Jul 2014 13:57:00 -0400 Subject: convert_bdf_2_1(): Write char comments --- diff --git a/bin/bdf2fbcon b/bin/bdf2fbcon index 364ccab..a266431 100755 --- a/bin/bdf2fbcon +++ b/bin/bdf2fbcon @@ -177,6 +177,7 @@ sub convert_bdf_2_1 my @argv; my $font_idx; my $font_name; + my $char; $font_w = $opts{'w'} if (exists($opts{'w'})); $font_h = $opts{'h'} if (exists($opts{'h'})); @@ -207,6 +208,7 @@ sub convert_bdf_2_1 " fontdata_%s[FONTDATAMAX] = {\n", $font_name); } elsif ($stmt eq 'STARTCHAR') { + $char = $argv[0]; $section = BDF_2_1_SECTION_CHAR; } elsif ($stmt eq 'ENDFONT') { $found_end = 1; @@ -222,7 +224,12 @@ sub convert_bdf_2_1 $section = BDF_2_1_SECTION_NONE; } } elsif ($section == BDF_2_1_SECTION_CHAR) { - if ($stmt eq 'ENDCHAR') { + if ($stmt eq 'ENCODING') { + printf($output_fh "\n\t/* %d 0x%x '%s' */\n", + $argv[0], + $argv[0], + $char); + } elsif ($stmt eq 'ENDCHAR') { $section = BDF_2_1_SECTION_NONE; } } -- cgit v0.9.1