summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-29 19:59:35 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-29 19:59:35 (EDT)
commit35c731ecf369e0dcd6ebcefbda1460276a029a75 (patch)
treedf0eb095ad3cca27cff466bcc83628a38ff95fcd
parent8b38f44cd3e9059c7f7bdcf79b3f2ade4682e346 (diff)
Prefer single quotes
-rwxr-xr-xbin/bdf2fbcon54
1 files changed, 27 insertions, 27 deletions
diff --git a/bin/bdf2fbcon b/bin/bdf2fbcon
index b06d22a..6979330 100755
--- a/bin/bdf2fbcon
+++ b/bin/bdf2fbcon
@@ -26,7 +26,7 @@ sub warning
{
my ($fmt, @args) = @_;
- STDERR->printf("bdf2fbcon: Warning: " . $fmt . "\n", @args);
+ STDERR->printf('bdf2fbcon: Warning: ' . $fmt . "\n", @args);
return;
}
@@ -35,7 +35,7 @@ sub error
{
my ($fmt, @args) = @_;
- STDERR->printf("bdf2fbcon: Error: " . $fmt . "\n", @args);
+ STDERR->printf('bdf2fbcon: Error: ' . $fmt . "\n", @args);
return;
}
@@ -165,7 +165,7 @@ sub parse_bdf_2_1
}
}
- warning("Missing end of font") unless ($found_end);
+ warning('Missing end of font') unless ($found_end);
return 1;
}
@@ -193,11 +193,11 @@ sub write_fbcon
if (not defined ($output)) {
$output = 'font_' . $font->{'id'} . '.c';
}
- if ($output eq "-") {
+ if ($output eq '-') {
$output_fh = *STDOUT;
} else {
- if (not open($output_fh, ">", $output . "~")) {
- error("%s: %s", $output . "~", $!);
+ if (not open($output_fh, '>', $output . '~')) {
+ error('%s: %s', $output . '~', $!);
return;
}
}
@@ -209,7 +209,7 @@ sub write_fbcon
$output_fh->printf("#include <linux/font.h>\n\n");
$output_fh->printf("#define FONTDATAMAX %d\n\n",
$bytes_x * $font->{'height'} * 256);
- $output_fh->printf("static const unsigned char" .
+ $output_fh->printf('static const unsigned char' .
" fontdata_%s[FONTDATAMAX] = {\n",
$font->{'id'});
@@ -224,10 +224,10 @@ sub write_fbcon
$shifted_bitmap = $bitmap;
$shifted_bitmap <<= $bytes_x * 8 - $font->{'width'};
foreach my $k (reverse(0 .. ($bytes_x - 1))) {
- $output_fh->printf("0x%02x, ",
+ $output_fh->printf('0x%02x, ',
($shifted_bitmap >> ($k * 8)) & 0xFF);
}
- $output_fh->printf("/* %0" . $font->{'width'} . "b */\n",
+ $output_fh->printf('/* %0' . $font->{'width'} . "b */\n",
$bitmap);
}
}
@@ -243,10 +243,10 @@ sub write_fbcon
$output_fh->printf("\t.pref\t= %d,\n", $font->{'pref'});
$output_fh->printf("};\n");
- if ($output ne "-") {
+ if ($output ne '-') {
close($output_fh);
- if (not rename($output . "~", $output)) {
- error("%s: %s", $output, $!);
+ if (not rename($output . '~', $output)) {
+ error('%s: %s', $output, $!);
return;
}
}
@@ -261,15 +261,15 @@ sub convert
my $line;
my $font;
- if ($input eq $output and $input ne "-") {
- warning("Input and output files are equal");
+ if ($input eq $output and $input ne '-') {
+ warning('Input and output files are equal');
}
- if ($input eq "-") {
+ if ($input eq '-') {
$input_fh = *STDIN;
} else {
- if (not open($input_fh, "<", $input)) {
- error("%s: %s", $input, $!);
+ if (not open($input_fh, '<', $input)) {
+ error('%s: %s', $input, $!);
return;
}
}
@@ -279,11 +279,11 @@ sub convert
if ($line =~ m/^STARTFONT 2.[12]$/) {
parse_bdf_2_1($input_fh, $font);
} else {
- error("Unsupported input format");
+ error('Unsupported input format');
return;
}
- if ($input ne "-") {
+ if ($input ne '-') {
close($input_fh);
}
@@ -339,15 +339,15 @@ sub main
my %opts;
my %convert_opts;
- Getopt::Long::Configure("no_ignore_case", "bundling", "gnu_compat",
- "no_getopt_compat");
+ Getopt::Long::Configure('no_ignore_case', 'bundling', 'gnu_compat',
+ 'no_getopt_compat');
if (not GetOptions(\%opts,
- "o=s",
- "n=s",
- "s=s",
- "p=s",
- "h|help",
- "V|version",
+ 'o=s',
+ 'n=s',
+ 's=s',
+ 'p=s',
+ 'h|help',
+ 'V|version',
)) {
usage(*STDERR);
return 4;