Move mboot documentation to the doc/ directory
[profile/ivi/syslinux.git] / lss16toppm
index 8a9d59c..18b7f64 100755 (executable)
@@ -1,14 +1,13 @@
 #!/usr/bin/perl
-## $Id$
 ## -----------------------------------------------------------------------
-##   
-##   Copyright 2001 H. Peter Anvin - All Rights Reserved
+##
+##   Copyright 2001-2008 H. Peter Anvin - All Rights Reserved
 ##
 ##   This program is free software; you can redistribute it and/or modify
 ##   it under the terms of the GNU General Public License as published by
-##   the Free Software Foundation, Inc., 675 Mass Ave, Cambridge MA 02139,
-##   USA; either version 2 of the License, or (at your option) any later
-##   version; incorporated herein by reference.
+##   the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+##   Boston MA 02111-1307, USA; either version 2 of the License, or
+##   (at your option) any later version; incorporated herein by reference.
 ##
 ## -----------------------------------------------------------------------
 
 ## The -map causes the color map to be output on stderr.
 ##
 
+eval { use bytes; };
+eval { binmode STDIN; };
+eval { binmode STDOUT; };
+
 $map = 0;
 foreach $arg ( @ARGV ) {
     if ( $arg eq '-map' ) {
@@ -101,11 +104,8 @@ for ( $y = 0 ; $y < $ysize ; $y++ ) {
            # Truncate overlong runs
            $c = $xsize-$x if ( $c > $xsize-$x );
            # Output run
-           while ( $c ) {
-               print $color{$n};
-               $c--;
-               $x++;
-           }
+           print $color{$n} x $c;
+           $x += $c;
        }
     }
 }